@lumx/react 4.0.1-alpha.5 → 4.0.1-alpha.6
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/_internal/{BYSwKsj4.js → ClSM3-wl.js} +3 -85
- package/_internal/ClSM3-wl.js.map +1 -0
- package/index.d.ts +7 -44
- package/index.js +489 -554
- package/index.js.map +1 -1
- package/package.json +6 -3
- package/utils/index.d.ts +1 -25
- package/utils/index.js +1 -1
- package/_internal/BYSwKsj4.js.map +0 -1
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React__default, { useContext, useEffect, createContext, useMemo, useRef } from 'react';
|
|
2
2
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import isEmpty from 'lodash/isEmpty';
|
|
4
|
-
import
|
|
5
|
-
import '@lumx/core/js/constants';
|
|
4
|
+
import { createPortal } from 'react-dom';
|
|
6
5
|
|
|
7
6
|
const DisabledStateContext = /*#__PURE__*/React__default.createContext({
|
|
8
7
|
state: null
|
|
@@ -28,21 +27,6 @@ function useDisabledStateContext() {
|
|
|
28
27
|
return useContext(DisabledStateContext);
|
|
29
28
|
}
|
|
30
29
|
|
|
31
|
-
/**
|
|
32
|
-
* Optional global `window` instance (not defined when running SSR).
|
|
33
|
-
*/
|
|
34
|
-
const WINDOW = typeof window !== 'undefined' ? window : undefined;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Optional global `document` instance (not defined when running SSR).
|
|
38
|
-
*/
|
|
39
|
-
const DOCUMENT = typeof document !== 'undefined' ? document : undefined;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Check if we are running in a true browser
|
|
43
|
-
*/
|
|
44
|
-
const IS_BROWSER = typeof navigator !== 'undefined' && !navigator.userAgent.includes('jsdom');
|
|
45
|
-
|
|
46
30
|
const EVENT_TYPES = ['mousedown', 'touchstart'];
|
|
47
31
|
function isClickAway(targets, refs) {
|
|
48
32
|
// The targets elements are not contained in any of the listed element references.
|
|
@@ -132,11 +116,6 @@ const ClickAwayProvider = ({
|
|
|
132
116
|
};
|
|
133
117
|
ClickAwayProvider.displayName = 'ClickAwayProvider';
|
|
134
118
|
|
|
135
|
-
/** Check if user prefers reduced motion */
|
|
136
|
-
function isReducedMotion() {
|
|
137
|
-
return WINDOW?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
119
|
/**
|
|
141
120
|
* Portal initializing function.
|
|
142
121
|
* If it does not provide a container, the Portal children will render in classic React tree and not in a portal.
|
|
@@ -176,66 +155,5 @@ const Portal = ({
|
|
|
176
155
|
return /*#__PURE__*/createPortal(children, context.container);
|
|
177
156
|
};
|
|
178
157
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if (maybeElement instanceof Element) return maybeElement;
|
|
182
|
-
return maybeElement?.current;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
function setupViewTransitionName(groups, type) {
|
|
186
|
-
const resets = [];
|
|
187
|
-
for (const group of groups) {
|
|
188
|
-
const element = unref(group[type]);
|
|
189
|
-
if (element instanceof HTMLElement) {
|
|
190
|
-
const originalName = element.style.viewTransitionName;
|
|
191
|
-
resets.push(() => {
|
|
192
|
-
element.style.viewTransitionName = originalName;
|
|
193
|
-
});
|
|
194
|
-
element.style.viewTransitionName = group.name;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return () => {
|
|
198
|
-
for (const reset of resets) {
|
|
199
|
-
reset();
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
/**
|
|
205
|
-
* Wrapper around the `document.startViewTransition` handling browser incompatibilities, react DOM flush and
|
|
206
|
-
* user preference.
|
|
207
|
-
*
|
|
208
|
-
* @param updateCallback callback containing the changes to apply within the view transition.
|
|
209
|
-
* @param groups setup groups of old and new element pair to transition between.
|
|
210
|
-
*/
|
|
211
|
-
async function startViewTransition(updateCallback, {
|
|
212
|
-
groups = []
|
|
213
|
-
} = {}) {
|
|
214
|
-
const start = document?.startViewTransition?.bind(document);
|
|
215
|
-
const prefersReducedMotion = isReducedMotion();
|
|
216
|
-
const {
|
|
217
|
-
flushSync
|
|
218
|
-
} = ReactDOM;
|
|
219
|
-
if (prefersReducedMotion || !start || !flushSync) {
|
|
220
|
-
// Skip, apply changes without a transition
|
|
221
|
-
updateCallback();
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
// Setup view transition name on old elements
|
|
226
|
-
const resetOldElement = setupViewTransitionName(groups, 'old');
|
|
227
|
-
let resetNewElements;
|
|
228
|
-
|
|
229
|
-
// Start view transition, apply changes & flush to DOM
|
|
230
|
-
await start(() => {
|
|
231
|
-
resetOldElement();
|
|
232
|
-
flushSync(updateCallback);
|
|
233
|
-
|
|
234
|
-
// Setup view transition name on new elements
|
|
235
|
-
resetNewElements = setupViewTransitionName(groups, 'new');
|
|
236
|
-
}).updateCallbackDone;
|
|
237
|
-
resetNewElements?.();
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export { ClickAwayProvider as C, DisabledStateProvider as D, IS_BROWSER as I, Portal as P, WINDOW as W, PortalProvider as a, DOCUMENT as b, isReducedMotion as i, startViewTransition as s, useDisabledStateContext as u };
|
|
241
|
-
//# sourceMappingURL=BYSwKsj4.js.map
|
|
158
|
+
export { ClickAwayProvider as C, DisabledStateProvider as D, Portal as P, PortalProvider as a, useDisabledStateContext as u };
|
|
159
|
+
//# sourceMappingURL=ClSM3-wl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClSM3-wl.js","sources":["../../src/utils/disabled/DisabledStateContext.tsx","../../src/hooks/useClickAway.tsx","../../src/utils/ClickAwayProvider/ClickAwayProvider.tsx","../../src/utils/Portal/PortalProvider.tsx","../../src/utils/Portal/Portal.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\n/** Disable state */\ntype DisabledStateContextValue =\n | {\n state: 'disabled';\n }\n | { state: undefined | null };\n\nexport const DisabledStateContext = React.createContext<DisabledStateContextValue>({ state: null });\n\nexport type DisabledStateProviderProps = DisabledStateContextValue & {\n children: React.ReactNode;\n};\n\n/**\n * Disabled state provider.\n * All nested LumX Design System components inherit this disabled state.\n */\nexport function DisabledStateProvider({ children, ...value }: DisabledStateProviderProps) {\n return <DisabledStateContext.Provider value={value}>{children}</DisabledStateContext.Provider>;\n}\n\n/**\n * Get DisabledState context value\n */\nexport function useDisabledStateContext(): DisabledStateContextValue {\n return useContext(DisabledStateContext);\n}\n","import { RefObject, useEffect } from 'react';\n\nimport { Falsy } from '@lumx/react/utils/type';\n\nimport isEmpty from 'lodash/isEmpty';\n\nconst EVENT_TYPES = ['mousedown', 'touchstart'];\n\nfunction isClickAway(targets: HTMLElement[], refs: Array<RefObject<HTMLElement>>): boolean {\n // The targets elements are not contained in any of the listed element references.\n return !refs.some((ref) => targets.some((target) => ref?.current?.contains(target)));\n}\n\nexport interface ClickAwayParameters {\n /**\n * A callback function to call when the user clicks away from the elements.\n */\n callback: EventListener | Falsy;\n /**\n * Elements considered within the click away context (clicking outside them will trigger the click away callback).\n */\n childrenRefs: RefObject<Array<RefObject<HTMLElement>>>;\n}\n\n/**\n * Listen to clicks away from the given elements and callback the passed in function.\n *\n * Warning: If you need to detect click away on nested React portals, please use the `ClickAwayProvider` component.\n */\nexport function useClickAway({ callback, childrenRefs }: ClickAwayParameters): void {\n useEffect(() => {\n const { current: currentRefs } = childrenRefs;\n if (!callback || !currentRefs || isEmpty(currentRefs)) {\n return undefined;\n }\n const listener: EventListener = (evt) => {\n const targets = [evt.composedPath?.()[0], evt.target] as HTMLElement[];\n if (isClickAway(targets, currentRefs)) {\n callback(evt);\n }\n };\n\n EVENT_TYPES.forEach((evtType) => document.addEventListener(evtType, listener));\n return () => {\n EVENT_TYPES.forEach((evtType) => document.removeEventListener(evtType, listener));\n };\n }, [callback, childrenRefs]);\n}\n","import { createContext, RefObject, useContext, useEffect, useMemo, useRef } from 'react';\nimport { ClickAwayParameters, useClickAway } from '@lumx/react/hooks/useClickAway';\n\ninterface ContextValue {\n childrenRefs: Array<RefObject<HTMLElement>>;\n addRefs(...newChildrenRefs: Array<RefObject<HTMLElement>>): void;\n}\n\nconst ClickAwayAncestorContext = createContext<ContextValue | null>(null);\n\ninterface ClickAwayProviderProps extends ClickAwayParameters {\n /**\n * (Optional) Element that should be considered as part of the parent\n */\n parentRef?: RefObject<HTMLElement>;\n /**\n * Children\n */\n children?: React.ReactNode;\n}\n\n/**\n * Component combining the `useClickAway` hook with a React context to hook into the React component tree and make sure\n * we take into account both the DOM tree and the React tree to detect click away.\n *\n * @return the react component.\n */\nexport const ClickAwayProvider: React.FC<ClickAwayProviderProps> = ({\n children,\n callback,\n childrenRefs,\n parentRef,\n}) => {\n const parentContext = useContext(ClickAwayAncestorContext);\n const currentContext = useMemo(() => {\n const context: ContextValue = {\n childrenRefs: [],\n /**\n * Add element refs to the current context and propagate to the parent context.\n */\n addRefs(...newChildrenRefs) {\n // Add element refs that should be considered as inside the click away context.\n context.childrenRefs.push(...newChildrenRefs);\n\n if (parentContext) {\n // Also add then to the parent context\n parentContext.addRefs(...newChildrenRefs);\n if (parentRef) {\n // The parent element is also considered as inside the parent click away context but not inside the current context\n parentContext.addRefs(parentRef);\n }\n }\n },\n };\n return context;\n }, [parentContext, parentRef]);\n\n useEffect(() => {\n const { current: currentRefs } = childrenRefs;\n if (!currentRefs) {\n return;\n }\n currentContext.addRefs(...currentRefs);\n }, [currentContext, childrenRefs]);\n\n useClickAway({ callback, childrenRefs: useRef(currentContext.childrenRefs) });\n return <ClickAwayAncestorContext.Provider value={currentContext}>{children}</ClickAwayAncestorContext.Provider>;\n};\nClickAwayProvider.displayName = 'ClickAwayProvider';\n","import React from 'react';\n\ntype Container = DocumentFragment | Element;\n\n/**\n * Portal initializing function.\n * If it does not provide a container, the Portal children will render in classic React tree and not in a portal.\n */\nexport type PortalInit = () => {\n container?: Container;\n teardown?: () => void;\n};\n\nexport const PortalContext = React.createContext<PortalInit>(() => ({ container: document.body }));\n\nexport interface PortalProviderProps {\n children?: React.ReactNode;\n value: PortalInit;\n}\n\n/**\n * Customize where <Portal> wrapped elements render (tooltip, popover, dialog, etc.)\n */\nexport const PortalProvider: React.FC<PortalProviderProps> = PortalContext.Provider;\n","import React from 'react';\nimport { createPortal } from 'react-dom';\nimport { PortalContext } from './PortalProvider';\n\nexport interface PortalProps {\n enabled?: boolean;\n children: React.ReactNode;\n}\n\n/**\n * Render children in a portal outside the current DOM position\n * (defaults to `document.body` but can be customized with the PortalContextProvider)\n */\nexport const Portal: React.FC<PortalProps> = ({ children, enabled = true }) => {\n const init = React.useContext(PortalContext);\n const context = React.useMemo(\n () => {\n return enabled ? init() : null;\n },\n // Only update on 'enabled'\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [enabled],\n );\n\n React.useLayoutEffect(() => {\n return context?.teardown;\n }, [context?.teardown, enabled]);\n\n if (!context?.container) {\n return <>{children}</>;\n }\n return createPortal(children, context.container);\n};\n"],"names":["DisabledStateContext","React","createContext","state","DisabledStateProvider","children","value","_jsx","Provider","useDisabledStateContext","useContext","EVENT_TYPES","isClickAway","targets","refs","some","ref","target","current","contains","useClickAway","callback","childrenRefs","useEffect","currentRefs","isEmpty","undefined","listener","evt","composedPath","forEach","evtType","document","addEventListener","removeEventListener","ClickAwayAncestorContext","ClickAwayProvider","parentRef","parentContext","currentContext","useMemo","context","addRefs","newChildrenRefs","push","useRef","displayName","PortalContext","container","body","PortalProvider","Portal","enabled","init","useLayoutEffect","teardown","_Fragment","createPortal"],"mappings":";;;;;AASO,MAAMA,oBAAoB,gBAAGC,cAAK,CAACC,aAAa,CAA4B;AAAEC,EAAAA,KAAK,EAAE;AAAK,CAAC,CAAC;AAMnG;AACA;AACA;AACA;AACO,SAASC,qBAAqBA,CAAC;EAAEC,QAAQ;EAAE,GAAGC;AAAkC,CAAC,EAAE;AACtF,EAAA,oBAAOC,GAAA,CAACP,oBAAoB,CAACQ,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AQ,EAAEoC,OAAO,CAACO,SAAS,CAAC;AACpD;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -5,6 +5,12 @@ import { GenericProps, HasTheme, ValueOf, HasCloseMode, TextElement, HeadingElem
|
|
|
5
5
|
export * from '@lumx/core/js/types';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import React__default, { Ref, ReactElement, ReactNode, SyntheticEvent, MouseEventHandler, KeyboardEventHandler, AriaAttributes, DetailedHTMLProps, ButtonHTMLAttributes, InputHTMLAttributes, RefObject, ImgHTMLAttributes, CSSProperties, SetStateAction, Key, ElementType, ComponentProps } from 'react';
|
|
8
|
+
import { InputLabelProps } from '@lumx/core/js/components/InputLabel';
|
|
9
|
+
export { InputLabelProps } from '@lumx/core/js/components/InputLabel';
|
|
10
|
+
import { IconProps } from '@lumx/core/js/components/Icon';
|
|
11
|
+
export { IconProps, IconSizes } from '@lumx/core/js/components/Icon';
|
|
12
|
+
import { InputHelperProps } from '@lumx/core/js/components/InputHelper';
|
|
13
|
+
export { InputHelperProps } from '@lumx/core/js/components/InputHelper';
|
|
8
14
|
|
|
9
15
|
/** LumX Component Type. */
|
|
10
16
|
type Comp<P, T = HTMLElement> = {
|
|
@@ -1312,27 +1318,6 @@ interface GridColumnProps extends GenericProps {
|
|
|
1312
1318
|
*/
|
|
1313
1319
|
declare const GridColumn: Comp<GridColumnProps, HTMLElement>;
|
|
1314
1320
|
|
|
1315
|
-
type IconSizes = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;
|
|
1316
|
-
/**
|
|
1317
|
-
* Defines the props of the component.
|
|
1318
|
-
*/
|
|
1319
|
-
interface IconProps extends GenericProps, HasTheme {
|
|
1320
|
-
/** Color variant. */
|
|
1321
|
-
color?: ColorWithVariants;
|
|
1322
|
-
/** Lightened or darkened variant of the selected icon color. */
|
|
1323
|
-
colorVariant?: ColorVariant;
|
|
1324
|
-
/** Whether the icon has a shape. */
|
|
1325
|
-
hasShape?: boolean;
|
|
1326
|
-
/**
|
|
1327
|
-
* Icon (SVG path) draw code (`d` property of the `<path>` SVG element).
|
|
1328
|
-
* See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
|
|
1329
|
-
*/
|
|
1330
|
-
icon: string;
|
|
1331
|
-
/** Size variant. */
|
|
1332
|
-
size?: IconSizes;
|
|
1333
|
-
/** Sets an alternative text on the svg. Will set an `img` role to the svg. */
|
|
1334
|
-
alt?: string;
|
|
1335
|
-
}
|
|
1336
1321
|
/**
|
|
1337
1322
|
* Icon component.
|
|
1338
1323
|
*
|
|
@@ -1598,15 +1583,6 @@ interface InlineListProps extends GenericProps {
|
|
|
1598
1583
|
*/
|
|
1599
1584
|
declare const InlineList: Comp<InlineListProps, HTMLElement>;
|
|
1600
1585
|
|
|
1601
|
-
/**
|
|
1602
|
-
* Defines the props of the component.
|
|
1603
|
-
*/
|
|
1604
|
-
interface InputHelperProps extends GenericProps, HasTheme {
|
|
1605
|
-
/** Helper content. */
|
|
1606
|
-
children: string | ReactNode;
|
|
1607
|
-
/** Helper variant. */
|
|
1608
|
-
kind?: Kind;
|
|
1609
|
-
}
|
|
1610
1586
|
/**
|
|
1611
1587
|
* InputHelper component.
|
|
1612
1588
|
*
|
|
@@ -1616,19 +1592,6 @@ interface InputHelperProps extends GenericProps, HasTheme {
|
|
|
1616
1592
|
*/
|
|
1617
1593
|
declare const InputHelper: Comp<InputHelperProps, HTMLParagraphElement>;
|
|
1618
1594
|
|
|
1619
|
-
/**
|
|
1620
|
-
* Defines the props of the component.
|
|
1621
|
-
*/
|
|
1622
|
-
interface InputLabelProps extends GenericProps, HasTheme {
|
|
1623
|
-
/** Typography variant. */
|
|
1624
|
-
typography?: Typography;
|
|
1625
|
-
/** Label content. */
|
|
1626
|
-
children: string | ReactNode;
|
|
1627
|
-
/** Native htmlFor property. */
|
|
1628
|
-
htmlFor: string;
|
|
1629
|
-
/** Whether the component is required or not. */
|
|
1630
|
-
isRequired?: boolean;
|
|
1631
|
-
}
|
|
1632
1595
|
/**
|
|
1633
1596
|
* InputLabel component.
|
|
1634
1597
|
*
|
|
@@ -3185,4 +3148,4 @@ declare const ThemeProvider: React__default.FC<{
|
|
|
3185
3148
|
declare function useTheme(): ThemeContextValue;
|
|
3186
3149
|
|
|
3187
3150
|
export { AlertDialog, Autocomplete, AutocompleteMultiple, Avatar, Badge, BadgeWrapper, Button, ButtonEmphasis, ButtonGroup, Checkbox, Chip, ChipGroup, CommentBlock, CommentBlockVariant, DatePicker, DatePickerControlled, DatePickerField, Dialog, Divider, DragHandle, Dropdown, ExpansionPanel, Flag, FlexBox, GenericBlock, GenericBlockGapSize, Grid, GridColumn, GridItem, Heading, HeadingLevelProvider, Icon, IconButton, ImageBlock, ImageBlockCaptionPosition, ImageLightbox, InlineList, InputHelper, InputLabel, Lightbox, Link, LinkPreview, List, ListDivider, ListItem, ListSubheader, Message, Mosaic, Navigation, Notification, Placement, Popover, PopoverDialog, PostBlock, Progress, ProgressCircular, ProgressLinear, ProgressTracker, ProgressTrackerProvider, ProgressTrackerStep, ProgressTrackerStepPanel, ProgressVariant, RadioButton, RadioGroup, RawInputText, RawInputTextarea, Select, SelectMultiple, SelectMultipleField, SelectVariant, SideNavigation, SideNavigationItem, SkeletonCircle, SkeletonRectangle, SkeletonRectangleVariant, SkeletonTypography, Slider, Slides, Slideshow, SlideshowControls, SlideshowItem, Switch, Tab, TabList, TabListLayout, TabPanel, TabProvider, Table, TableBody, TableCell, TableCellVariant, TableHeader, TableRow, Text, TextField, ThOrder, ThemeProvider, Thumbnail, ThumbnailAspectRatio, ThumbnailObjectFit, ThumbnailVariant, Toolbar, Tooltip, Uploader, UploaderVariant, UserBlock, clamp, isClickable, useFocusPointStyle, useHeadingLevel, useTheme };
|
|
3188
|
-
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps,
|
|
3151
|
+
export type { AlertDialogProps, AutocompleteMultipleProps, AutocompleteProps, AvatarProps, AvatarSize, BadgeProps, BadgeWrapperProps, BaseButtonProps, ButtonGroupProps, ButtonProps, ButtonSize, CheckboxProps, ChipGroupProps, ChipProps, CommentBlockProps, DatePickerControlledProps, DatePickerFieldProps, DatePickerProps, DialogProps, DialogSizes, DividerProps, DragHandleProps, DropdownProps, Elevation, ExpansionPanelProps, FlagProps, FlexBoxProps, FlexHorizontalAlignment, FlexVerticalAlignment, FocusPoint, GapSize, GenericBlockProps, GridColumnGapSize, GridColumnProps, GridItemProps, GridProps, HeadingLevelProviderProps, HeadingProps, IconButtonProps, ImageBlockProps, ImageBlockSize, ImageLightboxProps, InlineListProps, LightboxProps, LinkPreviewProps, LinkProps, ListDividerProps, ListItemProps, ListItemSize, ListProps, ListSubheaderProps, MarginAutoAlignment, MessageProps, MosaicProps, NavigationProps, NotificationProps, Offset, PopoverDialogProps, PopoverProps, PostBlockProps, ProgressCircularProps, ProgressCircularSize, ProgressLinearProps, ProgressProps, ProgressTrackerProps, ProgressTrackerProviderProps, ProgressTrackerStepPanelProps, ProgressTrackerStepProps, RadioButtonProps, RadioGroupProps, RawInputTextProps, RawInputTextareaProps, SelectMultipleProps, SelectProps, SideNavigationItemProps, SideNavigationProps, SkeletonCircleProps, SkeletonRectangleProps, SkeletonTypographyProps, SliderProps, SlidesProps, SlideshowControlsProps, SlideshowItemProps, SlideshowProps, SwitchProps, TabListProps, TabPanelProps, TabProps, TabProviderProps, TableBodyProps, TableCellProps, TableHeaderProps, TableProps, TableRowProps, TextFieldProps, TextProps, ThumbnailProps, ThumbnailSize, ToolbarProps, TooltipPlacement, TooltipProps, UploaderProps, UploaderSize, UserBlockProps, UserBlockSize };
|