@sanity/ui 4.2.0 → 5.0.0-alpha.10
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/README.md +194 -28
- package/bin/sanity-ui.js +14 -0
- package/dist/_chunks-es/LazyRefractor.js +20 -0
- package/dist/_chunks-es/LazyRefractor.js.map +1 -0
- package/dist/cli/checks.js +148 -0
- package/dist/cli/config.js +23 -0
- package/dist/cli/detect.js +181 -0
- package/dist/cli/doctor.js +49 -0
- package/dist/cli/index.js +69 -0
- package/dist/cli/init.js +189 -0
- package/dist/cli/install.js +79 -0
- package/dist/cli/log.js +66 -0
- package/dist/cli/selfPackage.js +11 -0
- package/dist/cli/styles.js +185 -0
- package/dist/cli/test-utils.js +8 -0
- package/dist/cli/tsconfig.js +236 -0
- package/dist/cli/types.js +1 -0
- package/dist/cli/versions.js +45 -0
- package/dist/index.d.ts +1203 -1469
- package/dist/index.js +2123 -1989
- package/dist/index.js.map +1 -1
- package/dist/polyfills.d.ts +1 -0
- package/dist/polyfills.js +5 -0
- package/dist/polyfills.js.map +1 -0
- package/dist/styles.css +1 -547
- package/package.json +57 -58
- package/src/cli/checks.test.ts +38 -0
- package/src/cli/checks.ts +200 -0
- package/src/cli/config.ts +44 -0
- package/src/cli/detect.test.ts +191 -0
- package/src/cli/detect.ts +205 -0
- package/src/cli/doctor.test.ts +52 -0
- package/src/cli/doctor.ts +65 -0
- package/src/cli/index.ts +77 -0
- package/src/cli/init.ts +225 -0
- package/src/cli/install.test.ts +52 -0
- package/src/cli/install.ts +108 -0
- package/src/cli/log.ts +79 -0
- package/src/cli/selfPackage.ts +14 -0
- package/src/cli/styles.test.ts +130 -0
- package/src/cli/styles.ts +205 -0
- package/src/cli/test-utils.ts +10 -0
- package/src/cli/tsconfig.test.ts +174 -0
- package/src/cli/tsconfig.ts +282 -0
- package/src/cli/types.ts +77 -0
- package/src/cli/versions.test.ts +35 -0
- package/src/cli/versions.ts +41 -0
- package/src/components/badge/Badge.tsx +53 -0
- package/src/components/badge/badge.css +6 -0
- package/src/components/badge/badge.props.ts +31 -0
- package/src/components/box/Box.tsx +30 -0
- package/src/components/box/box.css +4 -0
- package/src/components/box/box.props.ts +29 -0
- package/src/components/button/Button.tsx +78 -0
- package/src/components/button/button.css +72 -0
- package/src/components/button/button.props.ts +122 -0
- package/src/components/card/Card.tsx +31 -0
- package/src/components/card/card.css +4 -0
- package/src/components/card/card.props.ts +58 -0
- package/src/components/checkbox/Checkbox.tsx +64 -0
- package/src/components/checkbox/checkbox.css +100 -0
- package/src/components/checkbox/checkbox.props.ts +33 -0
- package/src/components/code/Code.tsx +38 -0
- package/src/components/code/LazyRefractor.tsx +9 -0
- package/src/components/code/code.css +40 -0
- package/src/components/code/code.props.ts +44 -0
- package/src/components/container/Container.tsx +30 -0
- package/src/components/container/container.css +4 -0
- package/src/components/container/container.props.ts +28 -0
- package/src/components/dialog/Dialog.tsx +139 -0
- package/src/components/dialog/dialog.css +49 -0
- package/src/components/dialog/dialog.props.ts +45 -0
- package/src/components/divider/Divider.tsx +23 -0
- package/src/components/divider/divider.props.ts +9 -0
- package/src/components/eyebrow/Eyebrow.tsx +54 -0
- package/src/components/eyebrow/eyebrow.css +11 -0
- package/src/components/eyebrow/eyebrow.props.ts +28 -0
- package/src/components/flex/Flex.tsx +30 -0
- package/src/components/flex/flex.css +4 -0
- package/src/components/flex/flex.props.ts +33 -0
- package/src/components/grid/Grid.tsx +30 -0
- package/src/components/grid/grid.css +4 -0
- package/src/components/grid/grid.props.ts +33 -0
- package/src/components/h-stack/HStack.tsx +34 -0
- package/src/components/h-stack/hStack.props.ts +17 -0
- package/src/components/heading/Heading.tsx +54 -0
- package/src/components/heading/heading.css +9 -0
- package/src/components/heading/heading.props.ts +31 -0
- package/src/components/icon/Icon.tsx +24 -0
- package/src/components/icon/icon.css +17 -0
- package/src/components/icon/icon.props.ts +35 -0
- package/src/components/icon-button/IconButton.tsx +32 -0
- package/src/components/icon-button/iconButton.props.ts +31 -0
- package/src/components/index.css +28 -0
- package/src/components/indicator/Indicator.tsx +42 -0
- package/src/components/indicator/indicator.css +4 -0
- package/src/components/indicator/indicator.props.ts +24 -0
- package/src/components/indicator-stack/IndicatorStack.tsx +31 -0
- package/src/components/indicator-stack/indicator-stack.css +7 -0
- package/src/components/indicator-stack/indicatorStack.props.ts +15 -0
- package/src/components/inline/Inline.tsx +38 -0
- package/src/components/inline/inline.css +4 -0
- package/src/components/inline/inline.props.ts +100 -0
- package/src/components/label/Label.tsx +34 -0
- package/src/components/label/label.css +3 -0
- package/src/components/label/label.props.ts +25 -0
- package/src/components/link/Link.tsx +29 -0
- package/src/components/link/link.css +12 -0
- package/src/components/link/link.props.ts +23 -0
- package/src/components/list/List.tsx +167 -0
- package/src/components/list/list.css +25 -0
- package/src/components/list/list.props.ts +130 -0
- package/src/components/popover/Popover.tsx +85 -0
- package/src/components/popover/popover.css +21 -0
- package/src/components/popover/popover.props.ts +38 -0
- package/src/components/press-area/PressArea.tsx +29 -0
- package/src/components/press-area/press-area.css +22 -0
- package/src/components/press-area/pressArea.props.ts +16 -0
- package/src/components/radio/Radio.tsx +48 -0
- package/src/components/radio/radio.css +97 -0
- package/src/components/radio/radio.props.ts +25 -0
- package/src/components/skip-to-content/SkipToContent.tsx +35 -0
- package/src/components/skip-to-content/skip-to-content.css +9 -0
- package/src/components/skip-to-content/skipToContent.props.ts +25 -0
- package/src/components/spinner/Spinner.tsx +28 -0
- package/src/components/spinner/spinner.css +10 -0
- package/src/components/spinner/spinner.props.ts +19 -0
- package/src/components/switch/Switch.tsx +48 -0
- package/src/components/switch/switch.css +119 -0
- package/src/components/switch/switch.props.ts +25 -0
- package/src/components/text/Text.tsx +53 -0
- package/src/components/text/text.css +9 -0
- package/src/components/text/text.props.ts +28 -0
- package/src/components/tooltip/Tooltip.tsx +97 -0
- package/src/components/tooltip/tooltip.css +31 -0
- package/src/components/tooltip/tooltip.props.ts +36 -0
- package/src/components/tooltip-group/TooltipGroup.tsx +64 -0
- package/src/components/tooltip-group/tooltipGroup.props.ts +15 -0
- package/src/components/v-stack/VStack.tsx +32 -0
- package/src/components/v-stack/vStack.props.ts +17 -0
- package/src/components/visually-hidden/VisuallyHidden.tsx +29 -0
- package/src/components/visually-hidden/visually-hidden.css +9 -0
- package/src/components/visually-hidden/visuallyHidden.props.ts +23 -0
- package/src/css/classes/dynamic/flex-child.css +5 -0
- package/src/css/classes/dynamic/grid-child.css +8 -0
- package/src/css/classes/dynamic/grid-parent.css +6 -0
- package/src/css/classes/dynamic/height.css +5 -0
- package/src/css/classes/dynamic/index.css +7 -0
- package/src/css/classes/dynamic/line-clamp.css +5 -0
- package/src/css/classes/dynamic/readme.md +3 -0
- package/src/css/classes/dynamic/width.css +7 -0
- package/src/css/classes/dynamic/z-index.css +3 -0
- package/src/css/classes/generic/display.css +10 -0
- package/src/css/classes/generic/flex.css +24 -0
- package/src/css/classes/generic/grid.css +7 -0
- package/src/css/classes/generic/index.css +7 -0
- package/src/css/classes/generic/overflow.css +19 -0
- package/src/css/classes/generic/placement.css +202 -0
- package/src/css/classes/generic/position.css +7 -0
- package/src/css/classes/generic/readme.md +3 -0
- package/src/css/classes/generic/text-align.css +5 -0
- package/src/css/classes/index.css +4 -0
- package/src/css/classes/local/animation.css +4 -0
- package/src/css/classes/local/border.css +20 -0
- package/src/css/classes/local/index.css +6 -0
- package/src/css/classes/local/readme.md +3 -0
- package/src/css/classes/local/text-overflow.css +5 -0
- package/src/css/classes/local/text-trim.css +45 -0
- package/src/css/classes/local/tone.css +75 -0
- package/src/css/classes/local/top-anchor.css +4 -0
- package/src/css/classes/system/color.css +223 -0
- package/src/css/classes/system/container.css +8 -0
- package/src/css/classes/system/font-family.css +2 -0
- package/src/css/classes/system/font-weight.css +4 -0
- package/src/css/classes/system/gap.css +37 -0
- package/src/css/classes/system/index.css +10 -0
- package/src/css/classes/system/inset.css +56 -0
- package/src/css/classes/system/margin.css +148 -0
- package/src/css/classes/system/padding.css +78 -0
- package/src/css/classes/system/radius.css +10 -0
- package/src/css/classes/system/readme.md +3 -0
- package/src/css/classes/system/shadow.css +6 -0
- package/src/css/classes/system/typography.css +31 -0
- package/src/css/global/font-face.css +20 -0
- package/src/css/global/index.css +2 -0
- package/src/css/global/reset.css +76 -0
- package/src/css/tokens/index.css +3 -0
- package/src/css/tokens/opacity.css +6 -0
- package/src/css/tokens/semantic.css +25 -0
- package/src/css/tokens/surface.css +27 -0
- package/src/hooks/useIsClient.ts +10 -0
- package/src/index.css +18 -0
- package/src/index.ts +65 -0
- package/src/polyfills.ts +15 -0
- package/src/props/border.ts +51 -0
- package/src/props/flexChild.ts +29 -0
- package/src/props/flexParent.ts +47 -0
- package/src/props/gap.ts +31 -0
- package/src/props/gridChild.ts +50 -0
- package/src/props/gridParent.ts +45 -0
- package/src/props/height.ts +29 -0
- package/src/props/layout.ts +44 -0
- package/src/props/margin.ts +59 -0
- package/src/props/overflow.ts +30 -0
- package/src/props/padding.ts +59 -0
- package/src/props/placement.ts +16 -0
- package/src/props/position.ts +52 -0
- package/src/props/shadow.ts +15 -0
- package/src/props/tone.ts +15 -0
- package/src/props/typography.ts +62 -0
- package/src/props/width.ts +29 -0
- package/src/props/zIndex.ts +15 -0
- package/src/styles.css.d.ts +1 -0
- package/src/styles.css.node.js +2 -0
- package/src/styles.css.test.ts +24 -0
- package/src/types/Button.ts +8 -0
- package/src/types/Code.ts +6 -0
- package/src/types/Container.ts +3 -0
- package/src/types/Density.ts +3 -0
- package/src/types/Display.ts +11 -0
- package/src/types/Eyebrow.ts +3 -0
- package/src/types/Flex.ts +22 -0
- package/src/types/FontWeight.ts +3 -0
- package/src/types/Grid.ts +3 -0
- package/src/types/Heading.ts +6 -0
- package/src/types/Icon.ts +3 -0
- package/src/types/Interactive.ts +8 -0
- package/src/types/List.ts +2 -0
- package/src/types/Overflow.ts +3 -0
- package/src/types/Placement.ts +16 -0
- package/src/types/Position.ts +3 -0
- package/src/types/PropDef.ts +73 -0
- package/src/types/Radius.ts +3 -0
- package/src/types/Responsive.ts +10 -0
- package/src/types/Shadow.ts +3 -0
- package/src/types/Space.ts +15 -0
- package/src/types/Text.ts +3 -0
- package/src/types/TextAlign.ts +3 -0
- package/src/types/Tone.ts +3 -0
- package/src/utils/getProps.test.ts +156 -0
- package/src/utils/getProps.ts +156 -0
- package/src/utils/mergeTriggerProps.ts +66 -0
- package/src/utils/renderPortal.tsx +14 -0
- package/src/utils/suffixClassName.ts +5 -0
- package/src/version.ts +3 -0
- package/LICENSE +0 -21
- package/dist/_system-CTe2lb5l.d.ts +0 -40
- package/dist/_system-CTe2lb5l.d.ts.map +0 -1
- package/dist/arrow-BmX6qbAS.js +0 -170
- package/dist/arrow-BmX6qbAS.js.map +0 -1
- package/dist/autocomplete.d.ts +0 -140
- package/dist/autocomplete.d.ts.map +0 -1
- package/dist/autocomplete.js +0 -470
- package/dist/autocomplete.js.map +0 -1
- package/dist/breadcrumbs.d.ts +0 -18
- package/dist/breadcrumbs.d.ts.map +0 -1
- package/dist/breadcrumbs.js +0 -119
- package/dist/breadcrumbs.js.map +0 -1
- package/dist/button-BNyKSDyA.js +0 -180
- package/dist/button-BNyKSDyA.js.map +0 -1
- package/dist/button-dnqMFkWg.d.ts +0 -76
- package/dist/button-dnqMFkWg.d.ts.map +0 -1
- package/dist/card-C0a0wQTc.d.ts +0 -7
- package/dist/card-C0a0wQTc.d.ts.map +0 -1
- package/dist/code.d.ts +0 -20
- package/dist/code.d.ts.map +0 -1
- package/dist/code.js +0 -90
- package/dist/code.js.map +0 -1
- package/dist/codeFontStyle-84SMhFtI.js +0 -11
- package/dist/codeFontStyle-84SMhFtI.js.map +0 -1
- package/dist/component-DVlwaWB-.d.ts +0 -25
- package/dist/component-DVlwaWB-.d.ts.map +0 -1
- package/dist/element-BYgCE_iK.js +0 -51
- package/dist/element-BYgCE_iK.js.map +0 -1
- package/dist/factory-BzXTX8_Q.js +0 -3056
- package/dist/factory-BzXTX8_Q.js.map +0 -1
- package/dist/flex-DmbDG2ks.js +0 -76
- package/dist/flex-DmbDG2ks.js.map +0 -1
- package/dist/font-EtfxKPUz.d.ts +0 -49
- package/dist/font-EtfxKPUz.d.ts.map +0 -1
- package/dist/getElementRef-Jw7gY0eV.js +0 -102
- package/dist/getElementRef-Jw7gY0eV.js.map +0 -1
- package/dist/getScopedTheme-C-sZsyAz.js +0 -267
- package/dist/getScopedTheme-C-sZsyAz.js.map +0 -1
- package/dist/getTheme_v2-y09KqtEb.js +0 -487
- package/dist/getTheme_v2-y09KqtEb.js.map +0 -1
- package/dist/grid-6JSgMj1O.js +0 -115
- package/dist/grid-6JSgMj1O.js.map +0 -1
- package/dist/helpers-C8xxXAQC.js +0 -63
- package/dist/helpers-C8xxXAQC.js.map +0 -1
- package/dist/hotkeys-CaHsQlsO.js +0 -168
- package/dist/hotkeys-CaHsQlsO.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/layer-Bl5R3uNR.js +0 -61
- package/dist/layer-Bl5R3uNR.js.map +0 -1
- package/dist/layer-ChlP9Ik6.d.ts +0 -242
- package/dist/layer-ChlP9Ik6.d.ts.map +0 -1
- package/dist/menu.d.ts +0 -146
- package/dist/menu.d.ts.map +0 -1
- package/dist/menu.js +0 -626
- package/dist/menu.js.map +0 -1
- package/dist/popover-B7-28L8y.js +0 -408
- package/dist/popover-B7-28L8y.js.map +0 -1
- package/dist/popover-CMlQeKn0.d.ts +0 -96
- package/dist/popover-CMlQeKn0.d.ts.map +0 -1
- package/dist/popover.d.ts +0 -2
- package/dist/popover.js +0 -3
- package/dist/refractor-CC48DwHi.js +0 -20
- package/dist/refractor-CC48DwHi.js.map +0 -1
- package/dist/responsiveFont-CilwaORG.js +0 -55
- package/dist/responsiveFont-CilwaORG.js.map +0 -1
- package/dist/rgba-BSYaEUW6.d.ts +0 -846
- package/dist/rgba-BSYaEUW6.d.ts.map +0 -1
- package/dist/selectable-B0GUIL74.d.ts +0 -7
- package/dist/selectable-B0GUIL74.d.ts.map +0 -1
- package/dist/stack-rsNFPq2-.js +0 -112
- package/dist/stack-rsNFPq2-.js.map +0 -1
- package/dist/styles-css.d.ts +0 -2
- package/dist/styles-css.js +0 -4
- package/dist/textInput-pSfQjkmx.js +0 -313
- package/dist/textInput-pSfQjkmx.js.map +0 -1
- package/dist/theme.d.ts +0 -280
- package/dist/theme.d.ts.map +0 -1
- package/dist/theme.js +0 -55
- package/dist/theme.js.map +0 -1
- package/dist/toast.d.ts +0 -73
- package/dist/toast.d.ts.map +0 -1
- package/dist/toast.js +0 -302
- package/dist/toast.js.map +0 -1
- package/dist/tooltip.d.ts +0 -88
- package/dist/tooltip.d.ts.map +0 -1
- package/dist/tooltip.js +0 -435
- package/dist/tooltip.js.map +0 -1
- package/dist/useClickOutsideEvent-wGLGWBZN.js +0 -36
- package/dist/useClickOutsideEvent-wGLGWBZN.js.map +0 -1
- package/dist/useElementSize-BJvbGHq8.js +0 -51
- package/dist/useElementSize-BJvbGHq8.js.map +0 -1
- package/dist/useLayer-D1usxIE0.js +0 -712
- package/dist/useLayer-D1usxIE0.js.map +0 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {type GapProps, gapProps} from '../../props/gap'
|
|
2
|
+
import {type GridParentProps, gridParentProps} from '../../props/gridParent'
|
|
3
|
+
import {type LayoutProps, layoutProps} from '../../props/layout'
|
|
4
|
+
import {DISPLAY_GRID, type DisplayGrid} from '../../types/Display'
|
|
5
|
+
import {type PropDef} from '../../types/PropDef'
|
|
6
|
+
import type {Responsive} from '../../types/Responsive'
|
|
7
|
+
|
|
8
|
+
/** @public */
|
|
9
|
+
export interface GridProps<T extends React.ElementType = 'div'>
|
|
10
|
+
extends GridParentProps, GapProps, LayoutProps {
|
|
11
|
+
/**
|
|
12
|
+
* HTML element or component to render.
|
|
13
|
+
*/
|
|
14
|
+
as?: T
|
|
15
|
+
/**
|
|
16
|
+
* CSS `display` property.
|
|
17
|
+
*/
|
|
18
|
+
display?: Responsive<DisplayGrid>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export const gridProps: Record<string, PropDef> = {
|
|
22
|
+
as: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
},
|
|
25
|
+
display: {
|
|
26
|
+
type: 'union',
|
|
27
|
+
className: 'display',
|
|
28
|
+
values: DISPLAY_GRID,
|
|
29
|
+
},
|
|
30
|
+
...gridParentProps,
|
|
31
|
+
...gapProps,
|
|
32
|
+
...layoutProps,
|
|
33
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import type {ComponentPropsWithRef, ElementType} from 'react'
|
|
3
|
+
|
|
4
|
+
import {getProps} from '../../utils/getProps'
|
|
5
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
6
|
+
import {Flex} from '../flex/Flex'
|
|
7
|
+
import {type HStackProps, hStackProps} from './hStack.props'
|
|
8
|
+
|
|
9
|
+
const hStackClassName = suffixClassName('sui-HStack')
|
|
10
|
+
|
|
11
|
+
/** @public */
|
|
12
|
+
export function HStack<T extends ElementType = 'div'>(
|
|
13
|
+
props: HStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof HStackProps<T>>,
|
|
14
|
+
) {
|
|
15
|
+
const {as, children, className, style, ...rest} = getProps(props, hStackProps)
|
|
16
|
+
const Component = as || 'div'
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Flex
|
|
20
|
+
as={Component}
|
|
21
|
+
className={clsx(hStackClassName, className)}
|
|
22
|
+
style={style}
|
|
23
|
+
data-ui="HStack"
|
|
24
|
+
display="inline-flex"
|
|
25
|
+
alignItems="center"
|
|
26
|
+
flexWrap="wrap"
|
|
27
|
+
{...rest}
|
|
28
|
+
>
|
|
29
|
+
{children}
|
|
30
|
+
</Flex>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type {HStackProps}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {type GapProps, gapProps} from '../../props/gap'
|
|
2
|
+
import {type PropDef} from '../../types/PropDef'
|
|
3
|
+
|
|
4
|
+
/** @public */
|
|
5
|
+
export interface HStackProps<T extends React.ElementType = 'div'> extends Pick<GapProps, 'gap'> {
|
|
6
|
+
/**
|
|
7
|
+
* HTML element or component to render.
|
|
8
|
+
*/
|
|
9
|
+
as?: T
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export const hStackProps: Record<string, PropDef> = {
|
|
13
|
+
as: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
gap: gapProps['gap'] as PropDef,
|
|
17
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import type {ComponentPropsWithRef, ElementType} from 'react'
|
|
3
|
+
|
|
4
|
+
import {getProps} from '../../utils/getProps'
|
|
5
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
6
|
+
import {type HeadingProps, headingProps} from './heading.props'
|
|
7
|
+
|
|
8
|
+
const headingClassName = suffixClassName('sui-Heading')
|
|
9
|
+
|
|
10
|
+
/** @public */
|
|
11
|
+
export function Heading<T extends ElementType = 'h2'>({
|
|
12
|
+
size = 2,
|
|
13
|
+
weight = 'bold',
|
|
14
|
+
...props
|
|
15
|
+
}: HeadingProps & Omit<ComponentPropsWithRef<T>, keyof HeadingProps>) {
|
|
16
|
+
const {as, children, className, style, ...rest} = getProps({size, weight, ...props}, headingProps)
|
|
17
|
+
const Component = as || 'h2'
|
|
18
|
+
|
|
19
|
+
if (props.truncate && props.trim) {
|
|
20
|
+
return (
|
|
21
|
+
<Component
|
|
22
|
+
className={clsx(
|
|
23
|
+
headingClassName,
|
|
24
|
+
className?.replace('sui-line-clamp', '').replace('sui-text-overflow', ''),
|
|
25
|
+
)}
|
|
26
|
+
style={style}
|
|
27
|
+
data-ui="Heading"
|
|
28
|
+
{...rest}
|
|
29
|
+
>
|
|
30
|
+
<span
|
|
31
|
+
className={clsx(
|
|
32
|
+
'sui-overflow-hidden',
|
|
33
|
+
props.truncate === 1 ? 'sui-text-overflow' : 'sui-line-clamp',
|
|
34
|
+
)}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
</span>
|
|
38
|
+
</Component>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<Component
|
|
44
|
+
className={clsx(headingClassName, props.truncate && 'sui-overflow-hidden', className)}
|
|
45
|
+
style={style}
|
|
46
|
+
data-ui="Heading"
|
|
47
|
+
{...rest}
|
|
48
|
+
>
|
|
49
|
+
{children}
|
|
50
|
+
</Component>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export type {HeadingProps}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {type TypographyProps, typographyProps} from '../../props/typography'
|
|
2
|
+
import {HEADING_SIZE, HEADING_TAG, type HeadingSize, type HeadingTag} from '../../types/Heading'
|
|
3
|
+
import {type PropDef} from '../../types/PropDef'
|
|
4
|
+
import type {Responsive} from '../../types/Responsive'
|
|
5
|
+
|
|
6
|
+
/** @public */
|
|
7
|
+
export interface HeadingProps extends TypographyProps {
|
|
8
|
+
/**
|
|
9
|
+
* Semantic heading element to render.
|
|
10
|
+
* @remarks Always set this explicitly.
|
|
11
|
+
*/
|
|
12
|
+
as?: HeadingTag
|
|
13
|
+
/**
|
|
14
|
+
* Sets font size.
|
|
15
|
+
* @remarks Independent of `as`.
|
|
16
|
+
*/
|
|
17
|
+
size?: Responsive<HeadingSize>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const headingProps: Record<string, PropDef> = {
|
|
21
|
+
as: {
|
|
22
|
+
type: 'union',
|
|
23
|
+
values: HEADING_TAG,
|
|
24
|
+
},
|
|
25
|
+
size: {
|
|
26
|
+
type: 'union',
|
|
27
|
+
className: 'text-heading',
|
|
28
|
+
values: HEADING_SIZE,
|
|
29
|
+
},
|
|
30
|
+
...typographyProps,
|
|
31
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
|
|
3
|
+
import {getProps} from '../../utils/getProps'
|
|
4
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
5
|
+
import {type IconProps, iconProps} from './icon.props'
|
|
6
|
+
|
|
7
|
+
const iconClassName = suffixClassName('sui-Icon')
|
|
8
|
+
|
|
9
|
+
/** @public */
|
|
10
|
+
export function Icon({size = 2, ...props}: IconProps) {
|
|
11
|
+
const {className, style, icon: Component, ...rest} = getProps({size, ...props}, iconProps)
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<Component
|
|
15
|
+
className={clsx(iconClassName, className)}
|
|
16
|
+
data-ui="Icon"
|
|
17
|
+
style={style}
|
|
18
|
+
aria-hidden={props['aria-label'] ? undefined : true}
|
|
19
|
+
{...rest}
|
|
20
|
+
/>
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type {IconProps}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.sui-Icon {
|
|
2
|
+
--icon-color: var(--foreground-high);
|
|
3
|
+
color: var(--icon-color);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.sui-Icon:where(.sui-text-muted) {
|
|
7
|
+
--icon-color-muted: var(--foreground-low);
|
|
8
|
+
color: var(--icon-color-muted);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
@breakpoints {
|
|
12
|
+
.sui-icon-body0 { font-size: 17px; }
|
|
13
|
+
.sui-icon-body1 { font-size: 21px; }
|
|
14
|
+
.sui-icon-body2 { font-size: 25px; }
|
|
15
|
+
.sui-icon-body3 { font-size: 29px; }
|
|
16
|
+
.sui-icon-body4 { font-size: 33px; }
|
|
17
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type {ComponentProps, SVGProps} from 'react'
|
|
2
|
+
|
|
3
|
+
import {type MarginProps, marginProps} from '../../props/margin'
|
|
4
|
+
import {type ToneProps, toneProps} from '../../props/tone'
|
|
5
|
+
import {type TypographyProps, typographyProps} from '../../props/typography'
|
|
6
|
+
import {ICON_SIZE, type IconSize} from '../../types/Icon'
|
|
7
|
+
import {type PropDef} from '../../types/PropDef'
|
|
8
|
+
import type {Responsive} from '../../types/Responsive'
|
|
9
|
+
|
|
10
|
+
/** @public */
|
|
11
|
+
export interface IconProps
|
|
12
|
+
extends ComponentProps<'svg'>, Pick<TypographyProps, 'muted'>, MarginProps, ToneProps {
|
|
13
|
+
/**
|
|
14
|
+
* The icon component to render.
|
|
15
|
+
*/
|
|
16
|
+
icon: React.ComponentType<SVGProps<SVGSVGElement>>
|
|
17
|
+
/**
|
|
18
|
+
* Sets icon size.
|
|
19
|
+
*/
|
|
20
|
+
size?: Responsive<IconSize>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const iconProps: Record<string, PropDef> = {
|
|
24
|
+
icon: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
},
|
|
27
|
+
size: {
|
|
28
|
+
type: 'union',
|
|
29
|
+
className: 'icon-body',
|
|
30
|
+
values: ICON_SIZE,
|
|
31
|
+
},
|
|
32
|
+
muted: typographyProps['muted'] as PropDef,
|
|
33
|
+
...toneProps,
|
|
34
|
+
...marginProps,
|
|
35
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import type {ComponentPropsWithRef, ElementType} from 'react'
|
|
3
|
+
|
|
4
|
+
import {getProps} from '../../utils/getProps'
|
|
5
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
6
|
+
import {Button} from '../button/Button'
|
|
7
|
+
import {Icon} from '../icon/Icon'
|
|
8
|
+
import {type IconButtonProps, iconButtonProps} from './iconButton.props'
|
|
9
|
+
|
|
10
|
+
const iconButtonClassName = suffixClassName('sui-IconButton')
|
|
11
|
+
|
|
12
|
+
/** @public */
|
|
13
|
+
export function IconButton<T extends ElementType = 'button'>(
|
|
14
|
+
props: IconButtonProps<T> & Omit<ComponentPropsWithRef<T>, keyof IconButtonProps<T>>,
|
|
15
|
+
) {
|
|
16
|
+
const {as, className, style, icon: IconProp, ...rest} = getProps(props, iconButtonProps)
|
|
17
|
+
const Component = as || 'button'
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Button
|
|
21
|
+
as={Component}
|
|
22
|
+
className={clsx(iconButtonClassName, className)}
|
|
23
|
+
style={style}
|
|
24
|
+
data-ui="IconButton"
|
|
25
|
+
{...rest}
|
|
26
|
+
>
|
|
27
|
+
<Icon icon={IconProp} margin={-2} size={1} />
|
|
28
|
+
</Button>
|
|
29
|
+
)
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type {IconButtonProps}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {SVGProps} from 'react'
|
|
2
|
+
import type React from 'react'
|
|
3
|
+
|
|
4
|
+
import {type PropDef} from '../../types/PropDef'
|
|
5
|
+
import {type ButtonProps, buttonProps} from '../button/button.props'
|
|
6
|
+
|
|
7
|
+
/** @public */
|
|
8
|
+
export interface IconButtonProps<T extends React.ElementType = 'button'> extends Pick<
|
|
9
|
+
ButtonProps<T>,
|
|
10
|
+
'as' | 'density' | 'level' | 'loading' | 'tone'
|
|
11
|
+
> {
|
|
12
|
+
/**
|
|
13
|
+
* Accessible name for the button.
|
|
14
|
+
* @remarks Because IconButtons have no visible text, this is required.
|
|
15
|
+
*/
|
|
16
|
+
'aria-label': string
|
|
17
|
+
/**
|
|
18
|
+
* Icon to render.
|
|
19
|
+
*/
|
|
20
|
+
'icon': React.ComponentType<SVGProps<SVGSVGElement>>
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const iconButtonProps: Record<string, PropDef> = {
|
|
24
|
+
'aria-label': {
|
|
25
|
+
type: 'string',
|
|
26
|
+
},
|
|
27
|
+
'as': buttonProps['as'] as PropDef,
|
|
28
|
+
'icon': {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@import './badge/badge.css';
|
|
2
|
+
@import './box/box.css';
|
|
3
|
+
@import './button/button.css';
|
|
4
|
+
@import './card/card.css';
|
|
5
|
+
@import './checkbox/checkbox.css';
|
|
6
|
+
@import './code/code.css';
|
|
7
|
+
@import './container/container.css';
|
|
8
|
+
@import './dialog/dialog.css';
|
|
9
|
+
@import './eyebrow/eyebrow.css';
|
|
10
|
+
@import './flex/flex.css';
|
|
11
|
+
@import './grid/grid.css';
|
|
12
|
+
@import './heading/heading.css';
|
|
13
|
+
@import './icon/icon.css';
|
|
14
|
+
@import './indicator/indicator.css';
|
|
15
|
+
@import './indicator-stack/indicator-stack.css';
|
|
16
|
+
@import './inline/inline.css';
|
|
17
|
+
@import './label/label.css';
|
|
18
|
+
@import './link/link.css';
|
|
19
|
+
@import './list/list.css';
|
|
20
|
+
@import './popover/popover.css';
|
|
21
|
+
@import './press-area/press-area.css';
|
|
22
|
+
@import './radio/radio.css';
|
|
23
|
+
@import './spinner/spinner.css';
|
|
24
|
+
@import './skip-to-content/skip-to-content.css';
|
|
25
|
+
@import './switch/switch.css';
|
|
26
|
+
@import './text/text.css';
|
|
27
|
+
@import './tooltip/tooltip.css';
|
|
28
|
+
@import './visually-hidden/visually-hidden.css';
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import type {ComponentPropsWithRef, ElementType} from 'react'
|
|
3
|
+
|
|
4
|
+
import {getProps} from '../../utils/getProps'
|
|
5
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
6
|
+
import {Box} from '../box/Box'
|
|
7
|
+
import {type IndicatorProps, indicatorProps} from './indicator.props'
|
|
8
|
+
|
|
9
|
+
const indicatorClassName = suffixClassName('sui-Indicator')
|
|
10
|
+
|
|
11
|
+
/** @beta */
|
|
12
|
+
export function Indicator<T extends ElementType = 'span'>({
|
|
13
|
+
tone = 'neutral',
|
|
14
|
+
...props
|
|
15
|
+
}: IndicatorProps<T> & Omit<ComponentPropsWithRef<T>, keyof IndicatorProps<T>>) {
|
|
16
|
+
const {as, children, className, style, label, ...rest} = getProps(
|
|
17
|
+
{tone, ...props},
|
|
18
|
+
indicatorProps,
|
|
19
|
+
)
|
|
20
|
+
const Component = as || 'span'
|
|
21
|
+
const ariaLabel = label || rest['aria-label']
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<Box
|
|
25
|
+
as={Component}
|
|
26
|
+
className={clsx(indicatorClassName, className)}
|
|
27
|
+
style={style}
|
|
28
|
+
data-ui="Indicator"
|
|
29
|
+
width="5px"
|
|
30
|
+
height="5px"
|
|
31
|
+
radius="full"
|
|
32
|
+
aria-label={ariaLabel}
|
|
33
|
+
aria-hidden={ariaLabel ? undefined : true}
|
|
34
|
+
role={ariaLabel ? 'img' : undefined}
|
|
35
|
+
{...rest}
|
|
36
|
+
>
|
|
37
|
+
{children}
|
|
38
|
+
</Box>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export type {IndicatorProps}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {type ToneProps, toneProps} from '../../props/tone'
|
|
2
|
+
import {type PropDef} from '../../types/PropDef'
|
|
3
|
+
|
|
4
|
+
/** @beta */
|
|
5
|
+
export interface IndicatorProps<T extends React.ElementType = 'span'> extends ToneProps {
|
|
6
|
+
/**
|
|
7
|
+
* HTML element to render.
|
|
8
|
+
*/
|
|
9
|
+
as?: T
|
|
10
|
+
/**
|
|
11
|
+
* Accessible label.
|
|
12
|
+
*/
|
|
13
|
+
label?: string
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const indicatorProps: Record<string, PropDef> = {
|
|
17
|
+
as: {
|
|
18
|
+
type: 'string',
|
|
19
|
+
},
|
|
20
|
+
label: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
},
|
|
23
|
+
...toneProps,
|
|
24
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import type {ComponentPropsWithRef, ElementType} from 'react'
|
|
3
|
+
|
|
4
|
+
import {getProps} from '../../utils/getProps'
|
|
5
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
6
|
+
import {HStack} from '../h-stack/HStack'
|
|
7
|
+
import {type IndicatorStackProps, indicatorStackProps} from './indicatorStack.props'
|
|
8
|
+
|
|
9
|
+
const indicatorStackClassName = suffixClassName('sui-IndicatorStack')
|
|
10
|
+
|
|
11
|
+
/** @public */
|
|
12
|
+
export function IndicatorStack<T extends ElementType = 'div'>(
|
|
13
|
+
props: IndicatorStackProps<T> & Omit<ComponentPropsWithRef<T>, keyof IndicatorStackProps<T>>,
|
|
14
|
+
) {
|
|
15
|
+
const {as, children, className, style, ...rest} = getProps(props, indicatorStackProps)
|
|
16
|
+
const Component = as || 'div'
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<HStack
|
|
20
|
+
as={Component}
|
|
21
|
+
className={clsx(indicatorStackClassName, className)}
|
|
22
|
+
style={style}
|
|
23
|
+
data-ui="IndicatorStack"
|
|
24
|
+
{...rest}
|
|
25
|
+
>
|
|
26
|
+
{children}
|
|
27
|
+
</HStack>
|
|
28
|
+
)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export type {IndicatorStackProps}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import {type PropDef} from '../../types/PropDef'
|
|
2
|
+
|
|
3
|
+
/** @public */
|
|
4
|
+
export interface IndicatorStackProps<T extends React.ElementType = 'div'> {
|
|
5
|
+
/**
|
|
6
|
+
* HTML element to render.
|
|
7
|
+
*/
|
|
8
|
+
as?: T
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const indicatorStackProps: Record<string, PropDef> = {
|
|
12
|
+
as: {
|
|
13
|
+
type: 'string',
|
|
14
|
+
},
|
|
15
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
import {Children, type ComponentPropsWithRef, type ElementType} from 'react'
|
|
3
|
+
|
|
4
|
+
import {getProps} from '../../utils/getProps'
|
|
5
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
6
|
+
import {inlineChildrenProps, type InlineProps, inlineProps} from './inline.props'
|
|
7
|
+
|
|
8
|
+
const inlineClassName = suffixClassName('sui-Inline')
|
|
9
|
+
|
|
10
|
+
/** @deprecated Use HStack component instead */
|
|
11
|
+
/** @public */
|
|
12
|
+
export function Inline<T extends ElementType = 'div'>(
|
|
13
|
+
// oxlint-disable-next-line no-deprecated
|
|
14
|
+
props: InlineProps<T> & Omit<ComponentPropsWithRef<T>, keyof InlineProps<T>>,
|
|
15
|
+
) {
|
|
16
|
+
const {as, children: childrenProp, className, style, ...rest} = getProps(props, inlineProps)
|
|
17
|
+
const {className: childrenClassName} = getProps(props, inlineChildrenProps)
|
|
18
|
+
const Component = as || 'div'
|
|
19
|
+
|
|
20
|
+
const children = Children.map(
|
|
21
|
+
childrenProp,
|
|
22
|
+
(child) => child && <div className={childrenClassName}>{child}</div>,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Component
|
|
27
|
+
className={clsx(inlineClassName, className)}
|
|
28
|
+
style={style}
|
|
29
|
+
data-ui="Inline"
|
|
30
|
+
{...rest}
|
|
31
|
+
>
|
|
32
|
+
{children}
|
|
33
|
+
</Component>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// oxlint-disable-next-line no-deprecated
|
|
38
|
+
export type {InlineProps}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import {marginProps} from '../../props/margin'
|
|
2
|
+
import {type PaddingProps, paddingProps} from '../../props/padding'
|
|
3
|
+
import {type PropDef} from '../../types/PropDef'
|
|
4
|
+
import type {Responsive} from '../../types/Responsive'
|
|
5
|
+
import {SPACE, type SpaceInherit} from '../../types/Space'
|
|
6
|
+
|
|
7
|
+
/** @deprecated Use HStack component instead */
|
|
8
|
+
/** @public */
|
|
9
|
+
export interface InlineProps<T extends React.ElementType = 'div'> extends PaddingProps {
|
|
10
|
+
/**
|
|
11
|
+
* HTML element or component to render.
|
|
12
|
+
*/
|
|
13
|
+
as?: T
|
|
14
|
+
/**
|
|
15
|
+
* Space between children.
|
|
16
|
+
*/
|
|
17
|
+
gap?: Responsive<SpaceInherit>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const inlineProps: Record<string, PropDef> = {
|
|
21
|
+
as: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
},
|
|
24
|
+
gap: {
|
|
25
|
+
type: 'composite',
|
|
26
|
+
values: SPACE,
|
|
27
|
+
composition: {
|
|
28
|
+
marginTop: {
|
|
29
|
+
propDef: marginProps['marginTop'] as PropDef,
|
|
30
|
+
mapping: {
|
|
31
|
+
0: 0,
|
|
32
|
+
1: -1,
|
|
33
|
+
2: -2,
|
|
34
|
+
3: -3,
|
|
35
|
+
4: -4,
|
|
36
|
+
5: -5,
|
|
37
|
+
6: -6,
|
|
38
|
+
7: -7,
|
|
39
|
+
8: -8,
|
|
40
|
+
9: -9,
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
marginLeft: {
|
|
44
|
+
propDef: marginProps['marginLeft'] as PropDef,
|
|
45
|
+
mapping: {
|
|
46
|
+
0: 0,
|
|
47
|
+
1: -1,
|
|
48
|
+
2: -2,
|
|
49
|
+
3: -3,
|
|
50
|
+
4: -4,
|
|
51
|
+
5: -5,
|
|
52
|
+
6: -6,
|
|
53
|
+
7: -7,
|
|
54
|
+
8: -8,
|
|
55
|
+
9: -9,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
...paddingProps,
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export const inlineChildrenProps: Record<string, PropDef> = {
|
|
64
|
+
gap: {
|
|
65
|
+
type: 'composite',
|
|
66
|
+
values: SPACE,
|
|
67
|
+
composition: {
|
|
68
|
+
paddingTop: {
|
|
69
|
+
propDef: paddingProps['paddingTop'] as PropDef,
|
|
70
|
+
mapping: {
|
|
71
|
+
0: 0,
|
|
72
|
+
1: 1,
|
|
73
|
+
2: 2,
|
|
74
|
+
3: 3,
|
|
75
|
+
4: 4,
|
|
76
|
+
5: 5,
|
|
77
|
+
6: 6,
|
|
78
|
+
7: 7,
|
|
79
|
+
8: 8,
|
|
80
|
+
9: 9,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
paddingLeft: {
|
|
84
|
+
propDef: paddingProps['paddingLeft'] as PropDef,
|
|
85
|
+
mapping: {
|
|
86
|
+
0: 0,
|
|
87
|
+
1: 1,
|
|
88
|
+
2: 2,
|
|
89
|
+
3: 3,
|
|
90
|
+
4: 4,
|
|
91
|
+
5: 5,
|
|
92
|
+
6: 6,
|
|
93
|
+
7: 7,
|
|
94
|
+
8: 8,
|
|
95
|
+
9: 9,
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import clsx from 'clsx'
|
|
2
|
+
|
|
3
|
+
import {getProps} from '../../utils/getProps'
|
|
4
|
+
import {suffixClassName} from '../../utils/suffixClassName'
|
|
5
|
+
import {Text} from '../text/Text'
|
|
6
|
+
import {type LabelProps, labelProps} from './label.props'
|
|
7
|
+
|
|
8
|
+
const labelClassName = suffixClassName('sui-Label')
|
|
9
|
+
|
|
10
|
+
/** @beta */
|
|
11
|
+
export function Label(props: LabelProps) {
|
|
12
|
+
const {children, className, style, disabled, error, ...rest} = getProps(props, labelProps)
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Text
|
|
16
|
+
as="label"
|
|
17
|
+
size={1}
|
|
18
|
+
muted={disabled}
|
|
19
|
+
className={clsx(
|
|
20
|
+
labelClassName,
|
|
21
|
+
'sui-display-flex sui-align-items-center sui-gap2',
|
|
22
|
+
error && 'sui-error',
|
|
23
|
+
className,
|
|
24
|
+
)}
|
|
25
|
+
style={style}
|
|
26
|
+
data-ui="Label"
|
|
27
|
+
{...rest}
|
|
28
|
+
>
|
|
29
|
+
{children}
|
|
30
|
+
</Text>
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export type {LabelProps}
|