@misoto22/kioku-ui 0.0.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/LICENSE +21 -0
- package/README.md +21 -0
- package/dist/Alert/Alert.d.ts +7 -0
- package/dist/Alert/Alert.doc.d.ts +11 -0
- package/dist/Alert/Alert.doc.js +15 -0
- package/dist/Alert/Alert.js +149 -0
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Alert/index.js +2 -0
- package/dist/AsyncState/AsyncState.d.ts +30 -0
- package/dist/AsyncState/AsyncState.doc.d.ts +16 -0
- package/dist/AsyncState/AsyncState.doc.js +16 -0
- package/dist/AsyncState/AsyncState.js +36 -0
- package/dist/AsyncState/index.d.ts +1 -0
- package/dist/AsyncState/index.js +2 -0
- package/dist/Badge/Badge.d.ts +10 -0
- package/dist/Badge/Badge.doc.d.ts +11 -0
- package/dist/Badge/Badge.doc.js +12 -0
- package/dist/Badge/Badge.js +58 -0
- package/dist/Badge/index.d.ts +1 -0
- package/dist/Badge/index.js +2 -0
- package/dist/Button/Button.d.ts +18 -0
- package/dist/Button/Button.doc.d.ts +11 -0
- package/dist/Button/Button.doc.js +18 -0
- package/dist/Button/Button.js +151 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Button/index.js +2 -0
- package/dist/Card/Card.d.ts +6 -0
- package/dist/Card/Card.doc.d.ts +11 -0
- package/dist/Card/Card.doc.js +15 -0
- package/dist/Card/Card.js +41 -0
- package/dist/Card/index.d.ts +1 -0
- package/dist/Card/index.js +2 -0
- package/dist/CardFooter/CardFooter.d.ts +3 -0
- package/dist/CardFooter/CardFooter.doc.d.ts +11 -0
- package/dist/CardFooter/CardFooter.doc.js +12 -0
- package/dist/CardFooter/CardFooter.js +16 -0
- package/dist/CardFooter/index.d.ts +1 -0
- package/dist/CardFooter/index.js +2 -0
- package/dist/CardHeader/CardHeader.d.ts +3 -0
- package/dist/CardHeader/CardHeader.doc.d.ts +11 -0
- package/dist/CardHeader/CardHeader.doc.js +12 -0
- package/dist/CardHeader/CardHeader.js +16 -0
- package/dist/CardHeader/index.d.ts +1 -0
- package/dist/CardHeader/index.js +2 -0
- package/dist/Center/Center.d.ts +3 -0
- package/dist/Center/Center.doc.d.ts +11 -0
- package/dist/Center/Center.doc.js +12 -0
- package/dist/Center/Center.js +15 -0
- package/dist/Center/index.d.ts +1 -0
- package/dist/Center/index.js +2 -0
- package/dist/Divider/Divider.d.ts +3 -0
- package/dist/Divider/Divider.doc.d.ts +11 -0
- package/dist/Divider/Divider.doc.js +12 -0
- package/dist/Divider/Divider.js +12 -0
- package/dist/Divider/index.d.ts +1 -0
- package/dist/Divider/index.js +2 -0
- package/dist/EmptyState/EmptyState.d.ts +11 -0
- package/dist/EmptyState/EmptyState.doc.d.ts +16 -0
- package/dist/EmptyState/EmptyState.doc.js +25 -0
- package/dist/EmptyState/EmptyState.js +55 -0
- package/dist/EmptyState/index.d.ts +1 -0
- package/dist/EmptyState/index.js +2 -0
- package/dist/Field/Field.d.ts +21 -0
- package/dist/Field/Field.doc.d.ts +16 -0
- package/dist/Field/Field.doc.js +28 -0
- package/dist/Field/Field.js +117 -0
- package/dist/Field/index.d.ts +1 -0
- package/dist/Field/index.js +2 -0
- package/dist/Grid/Grid.d.ts +7 -0
- package/dist/Grid/Grid.doc.d.ts +11 -0
- package/dist/Grid/Grid.doc.js +15 -0
- package/dist/Grid/Grid.js +76 -0
- package/dist/Grid/index.d.ts +1 -0
- package/dist/Grid/index.js +2 -0
- package/dist/Heading/Heading.d.ts +293 -0
- package/dist/Heading/Heading.doc.d.ts +16 -0
- package/dist/Heading/Heading.doc.js +19 -0
- package/dist/Heading/Heading.js +47 -0
- package/dist/Heading/index.d.ts +1 -0
- package/dist/Heading/index.js +2 -0
- package/dist/IconButton/IconButton.d.ts +9 -0
- package/dist/IconButton/IconButton.doc.d.ts +16 -0
- package/dist/IconButton/IconButton.doc.js +22 -0
- package/dist/IconButton/IconButton.js +11 -0
- package/dist/IconButton/index.d.ts +1 -0
- package/dist/IconButton/index.js +2 -0
- package/dist/MetricGrid/MetricGrid.d.ts +10 -0
- package/dist/MetricGrid/MetricGrid.doc.d.ts +12 -0
- package/dist/MetricGrid/MetricGrid.doc.js +13 -0
- package/dist/MetricGrid/MetricGrid.js +37 -0
- package/dist/MetricGrid/index.d.ts +1 -0
- package/dist/MetricGrid/index.js +2 -0
- package/dist/Section/Section.d.ts +6 -0
- package/dist/Section/Section.doc.d.ts +11 -0
- package/dist/Section/Section.doc.js +12 -0
- package/dist/Section/Section.js +49 -0
- package/dist/Section/index.d.ts +1 -0
- package/dist/Section/index.js +2 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +31 -0
- package/dist/SegmentedControl/SegmentedControl.doc.d.ts +16 -0
- package/dist/SegmentedControl/SegmentedControl.doc.js +34 -0
- package/dist/SegmentedControl/SegmentedControl.js +108 -0
- package/dist/SegmentedControl/index.d.ts +1 -0
- package/dist/SegmentedControl/index.js +2 -0
- package/dist/Skeleton/Skeleton.d.ts +5 -0
- package/dist/Skeleton/Skeleton.doc.d.ts +11 -0
- package/dist/Skeleton/Skeleton.doc.js +12 -0
- package/dist/Skeleton/Skeleton.js +20 -0
- package/dist/Skeleton/index.d.ts +1 -0
- package/dist/Skeleton/index.js +2 -0
- package/dist/Spinner/Spinner.d.ts +6 -0
- package/dist/Spinner/Spinner.doc.d.ts +12 -0
- package/dist/Spinner/Spinner.doc.js +13 -0
- package/dist/Spinner/Spinner.js +25 -0
- package/dist/Spinner/index.d.ts +1 -0
- package/dist/Spinner/index.js +2 -0
- package/dist/Stack/Stack.d.ts +7 -0
- package/dist/Stack/Stack.doc.d.ts +11 -0
- package/dist/Stack/Stack.doc.js +15 -0
- package/dist/Stack/Stack.js +77 -0
- package/dist/Stack/index.d.ts +1 -0
- package/dist/Stack/index.js +2 -0
- package/dist/StatusDot/StatusDot.d.ts +8 -0
- package/dist/StatusDot/StatusDot.doc.d.ts +16 -0
- package/dist/StatusDot/StatusDot.doc.js +16 -0
- package/dist/StatusDot/StatusDot.js +46 -0
- package/dist/StatusDot/index.d.ts +1 -0
- package/dist/StatusDot/index.js +2 -0
- package/dist/Table/Table.d.ts +20 -0
- package/dist/Table/Table.doc.d.ts +92 -0
- package/dist/Table/Table.doc.js +94 -0
- package/dist/Table/Table.js +205 -0
- package/dist/Table/index.d.ts +1 -0
- package/dist/Table/index.js +2 -0
- package/dist/Text/Text.d.ts +7 -0
- package/dist/Text/Text.doc.d.ts +11 -0
- package/dist/Text/Text.doc.js +15 -0
- package/dist/Text/Text.js +50 -0
- package/dist/Text/index.d.ts +1 -0
- package/dist/Text/index.js +2 -0
- package/dist/TextArea/TextArea.d.ts +16 -0
- package/dist/TextArea/TextArea.doc.d.ts +11 -0
- package/dist/TextArea/TextArea.doc.js +30 -0
- package/dist/TextArea/TextArea.js +47 -0
- package/dist/TextArea/index.d.ts +1 -0
- package/dist/TextArea/index.js +2 -0
- package/dist/TextInput/TextInput.d.ts +16 -0
- package/dist/TextInput/TextInput.doc.d.ts +11 -0
- package/dist/TextInput/TextInput.doc.js +30 -0
- package/dist/TextInput/TextInput.js +49 -0
- package/dist/TextInput/index.d.ts +1 -0
- package/dist/TextInput/index.js +2 -0
- package/dist/Toggle/Toggle.d.ts +16 -0
- package/dist/Toggle/Toggle.doc.d.ts +11 -0
- package/dist/Toggle/Toggle.doc.js +21 -0
- package/dist/Toggle/Toggle.js +64 -0
- package/dist/Toggle/index.d.ts +1 -0
- package/dist/Toggle/index.js +2 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +3 -0
- package/dist/VisuallyHidden/VisuallyHidden.doc.d.ts +11 -0
- package/dist/VisuallyHidden/VisuallyHidden.doc.js +12 -0
- package/dist/VisuallyHidden/VisuallyHidden.js +15 -0
- package/dist/VisuallyHidden/index.d.ts +1 -0
- package/dist/VisuallyHidden/index.js +2 -0
- package/dist/authoring.stylex.d.ts +75 -0
- package/dist/authoring.stylex.js +77 -0
- package/dist/components/Alert.d.ts +7 -0
- package/dist/components/Alert.doc.d.ts +11 -0
- package/dist/components/Alert.doc.js +15 -0
- package/dist/components/Alert.js +149 -0
- package/dist/components/AsyncState.d.ts +30 -0
- package/dist/components/AsyncState.doc.d.ts +16 -0
- package/dist/components/AsyncState.doc.js +16 -0
- package/dist/components/AsyncState.js +36 -0
- package/dist/components/Badge.d.ts +10 -0
- package/dist/components/Badge.doc.d.ts +11 -0
- package/dist/components/Badge.doc.js +12 -0
- package/dist/components/Badge.js +58 -0
- package/dist/components/Button.d.ts +18 -0
- package/dist/components/Button.doc.d.ts +11 -0
- package/dist/components/Button.doc.js +18 -0
- package/dist/components/Button.js +151 -0
- package/dist/components/Card.d.ts +6 -0
- package/dist/components/Card.doc.d.ts +11 -0
- package/dist/components/Card.doc.js +15 -0
- package/dist/components/Card.js +41 -0
- package/dist/components/CardFooter.d.ts +3 -0
- package/dist/components/CardFooter.doc.d.ts +11 -0
- package/dist/components/CardFooter.doc.js +12 -0
- package/dist/components/CardFooter.js +16 -0
- package/dist/components/CardHeader.d.ts +3 -0
- package/dist/components/CardHeader.doc.d.ts +11 -0
- package/dist/components/CardHeader.doc.js +12 -0
- package/dist/components/CardHeader.js +16 -0
- package/dist/components/Center.d.ts +3 -0
- package/dist/components/Center.doc.d.ts +11 -0
- package/dist/components/Center.doc.js +12 -0
- package/dist/components/Center.js +15 -0
- package/dist/components/Divider.d.ts +3 -0
- package/dist/components/Divider.doc.d.ts +11 -0
- package/dist/components/Divider.doc.js +12 -0
- package/dist/components/Divider.js +12 -0
- package/dist/components/EmptyState.d.ts +11 -0
- package/dist/components/EmptyState.doc.d.ts +16 -0
- package/dist/components/EmptyState.doc.js +25 -0
- package/dist/components/EmptyState.js +55 -0
- package/dist/components/Field.d.ts +21 -0
- package/dist/components/Field.doc.d.ts +16 -0
- package/dist/components/Field.doc.js +28 -0
- package/dist/components/Field.js +117 -0
- package/dist/components/Grid.d.ts +7 -0
- package/dist/components/Grid.doc.d.ts +11 -0
- package/dist/components/Grid.doc.js +15 -0
- package/dist/components/Grid.js +76 -0
- package/dist/components/Heading.d.ts +293 -0
- package/dist/components/Heading.doc.d.ts +16 -0
- package/dist/components/Heading.doc.js +19 -0
- package/dist/components/Heading.js +46 -0
- package/dist/components/IconButton.d.ts +9 -0
- package/dist/components/IconButton.doc.d.ts +16 -0
- package/dist/components/IconButton.doc.js +22 -0
- package/dist/components/IconButton.js +11 -0
- package/dist/components/MetricGrid.d.ts +10 -0
- package/dist/components/MetricGrid.doc.d.ts +12 -0
- package/dist/components/MetricGrid.doc.js +13 -0
- package/dist/components/MetricGrid.js +37 -0
- package/dist/components/Section.d.ts +6 -0
- package/dist/components/Section.doc.d.ts +11 -0
- package/dist/components/Section.doc.js +12 -0
- package/dist/components/Section.js +49 -0
- package/dist/components/SegmentedControl.d.ts +31 -0
- package/dist/components/SegmentedControl.doc.d.ts +16 -0
- package/dist/components/SegmentedControl.doc.js +34 -0
- package/dist/components/SegmentedControl.js +108 -0
- package/dist/components/Skeleton.d.ts +5 -0
- package/dist/components/Skeleton.doc.d.ts +11 -0
- package/dist/components/Skeleton.doc.js +12 -0
- package/dist/components/Skeleton.js +20 -0
- package/dist/components/Spinner.d.ts +6 -0
- package/dist/components/Spinner.doc.d.ts +12 -0
- package/dist/components/Spinner.doc.js +13 -0
- package/dist/components/Spinner.js +25 -0
- package/dist/components/Stack.d.ts +7 -0
- package/dist/components/Stack.doc.d.ts +11 -0
- package/dist/components/Stack.doc.js +15 -0
- package/dist/components/Stack.js +77 -0
- package/dist/components/StatusDot.d.ts +8 -0
- package/dist/components/StatusDot.doc.d.ts +16 -0
- package/dist/components/StatusDot.doc.js +16 -0
- package/dist/components/StatusDot.js +46 -0
- package/dist/components/Table.d.ts +20 -0
- package/dist/components/Table.doc.d.ts +92 -0
- package/dist/components/Table.doc.js +94 -0
- package/dist/components/Table.js +205 -0
- package/dist/components/Text.d.ts +7 -0
- package/dist/components/Text.doc.d.ts +11 -0
- package/dist/components/Text.doc.js +15 -0
- package/dist/components/Text.js +50 -0
- package/dist/components/TextArea.d.ts +16 -0
- package/dist/components/TextArea.doc.d.ts +11 -0
- package/dist/components/TextArea.doc.js +30 -0
- package/dist/components/TextArea.js +47 -0
- package/dist/components/TextInput.d.ts +16 -0
- package/dist/components/TextInput.doc.d.ts +11 -0
- package/dist/components/TextInput.doc.js +30 -0
- package/dist/components/TextInput.js +49 -0
- package/dist/components/Toggle.d.ts +16 -0
- package/dist/components/Toggle.doc.d.ts +11 -0
- package/dist/components/Toggle.doc.js +21 -0
- package/dist/components/Toggle.js +64 -0
- package/dist/components/VisuallyHidden.d.ts +3 -0
- package/dist/components/VisuallyHidden.doc.d.ts +11 -0
- package/dist/components/VisuallyHidden.doc.js +12 -0
- package/dist/components/VisuallyHidden.js +15 -0
- package/dist/components/index.d.ts +27 -0
- package/dist/components/index.js +28 -0
- package/dist/docs/index.d.ts +33 -0
- package/dist/docs/index.js +33 -0
- package/dist/docs/types.d.ts +15 -0
- package/dist/docs/types.js +25 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.js +32 -0
- package/dist/navigation/LinkProvider.d.ts +9 -0
- package/dist/navigation/LinkProvider.doc.d.ts +27 -0
- package/dist/navigation/LinkProvider.doc.js +27 -0
- package/dist/navigation/LinkProvider.js +22 -0
- package/dist/navigation/index.d.ts +1 -0
- package/dist/navigation/index.js +2 -0
- package/dist/styles/global.stylex.d.ts +20 -0
- package/dist/styles/global.stylex.js +22 -0
- package/dist/styles/index.css +14 -0
- package/dist/styles/reset.css +35 -0
- package/dist/styles/stylex.css +212 -0
- package/dist/theme/Theme.d.ts +24 -0
- package/dist/theme/Theme.doc.d.ts +16 -0
- package/dist/theme/Theme.doc.js +27 -0
- package/dist/theme/Theme.js +110 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/index.js +2 -0
- package/dist/tokens/contracts.d.ts +140 -0
- package/dist/tokens/contracts.js +102 -0
- package/package.json +93 -0
- package/src/Alert/Alert.doc.ts +21 -0
- package/src/Alert/Alert.tsx +129 -0
- package/src/Alert/index.ts +1 -0
- package/src/AsyncState/AsyncState.doc.ts +21 -0
- package/src/AsyncState/AsyncState.tsx +75 -0
- package/src/AsyncState/index.ts +5 -0
- package/src/Badge/Badge.doc.ts +15 -0
- package/src/Badge/Badge.tsx +58 -0
- package/src/Badge/index.ts +6 -0
- package/src/Button/Button.doc.ts +17 -0
- package/src/Button/Button.tsx +176 -0
- package/src/Button/index.ts +7 -0
- package/src/Card/Card.doc.ts +22 -0
- package/src/Card/Card.tsx +44 -0
- package/src/Card/index.ts +1 -0
- package/src/CardFooter/CardFooter.doc.ts +12 -0
- package/src/CardFooter/CardFooter.tsx +27 -0
- package/src/CardFooter/index.ts +1 -0
- package/src/CardHeader/CardHeader.doc.ts +12 -0
- package/src/CardHeader/CardHeader.tsx +27 -0
- package/src/CardHeader/index.ts +1 -0
- package/src/Center/Center.doc.ts +12 -0
- package/src/Center/Center.tsx +20 -0
- package/src/Center/index.ts +1 -0
- package/src/Divider/Divider.doc.ts +12 -0
- package/src/Divider/Divider.tsx +20 -0
- package/src/Divider/index.ts +1 -0
- package/src/EmptyState/EmptyState.doc.ts +31 -0
- package/src/EmptyState/EmptyState.tsx +87 -0
- package/src/EmptyState/index.ts +6 -0
- package/src/Field/Field.doc.ts +34 -0
- package/src/Field/Field.tsx +126 -0
- package/src/Field/index.ts +6 -0
- package/src/Grid/Grid.doc.ts +16 -0
- package/src/Grid/Grid.tsx +54 -0
- package/src/Grid/index.ts +1 -0
- package/src/Heading/Heading.doc.ts +26 -0
- package/src/Heading/Heading.tsx +48 -0
- package/src/Heading/index.ts +1 -0
- package/src/IconButton/IconButton.doc.ts +24 -0
- package/src/IconButton/IconButton.tsx +18 -0
- package/src/IconButton/index.ts +1 -0
- package/src/MetricGrid/MetricGrid.doc.ts +19 -0
- package/src/MetricGrid/MetricGrid.tsx +72 -0
- package/src/MetricGrid/index.ts +5 -0
- package/src/Section/Section.doc.ts +12 -0
- package/src/Section/Section.tsx +38 -0
- package/src/Section/index.ts +1 -0
- package/src/SegmentedControl/SegmentedControl.doc.ts +51 -0
- package/src/SegmentedControl/SegmentedControl.tsx +238 -0
- package/src/SegmentedControl/index.ts +5 -0
- package/src/Skeleton/Skeleton.doc.ts +15 -0
- package/src/Skeleton/Skeleton.tsx +45 -0
- package/src/Skeleton/index.ts +1 -0
- package/src/Spinner/Spinner.doc.ts +19 -0
- package/src/Spinner/Spinner.tsx +47 -0
- package/src/Spinner/index.ts +1 -0
- package/src/Stack/Stack.doc.ts +13 -0
- package/src/Stack/Stack.tsx +57 -0
- package/src/Stack/index.ts +1 -0
- package/src/StatusDot/StatusDot.doc.ts +23 -0
- package/src/StatusDot/StatusDot.tsx +35 -0
- package/src/StatusDot/index.ts +1 -0
- package/src/Table/Table.doc.ts +104 -0
- package/src/Table/Table.tsx +222 -0
- package/src/Table/index.ts +18 -0
- package/src/Text/Text.doc.ts +17 -0
- package/src/Text/Text.tsx +43 -0
- package/src/Text/index.ts +1 -0
- package/src/TextArea/TextArea.doc.ts +43 -0
- package/src/TextArea/TextArea.tsx +119 -0
- package/src/TextArea/index.ts +1 -0
- package/src/TextInput/TextInput.doc.ts +43 -0
- package/src/TextInput/TextInput.tsx +122 -0
- package/src/TextInput/index.ts +1 -0
- package/src/Toggle/Toggle.doc.ts +30 -0
- package/src/Toggle/Toggle.tsx +139 -0
- package/src/Toggle/index.ts +1 -0
- package/src/VisuallyHidden/VisuallyHidden.doc.ts +18 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +28 -0
- package/src/VisuallyHidden/index.ts +1 -0
- package/src/authoring.stylex.ts +76 -0
- package/src/docs/index.ts +122 -0
- package/src/docs/types.ts +51 -0
- package/src/index.ts +102 -0
- package/src/navigation/LinkProvider.doc.ts +32 -0
- package/src/navigation/LinkProvider.tsx +32 -0
- package/src/navigation/index.ts +7 -0
- package/src/styles/global.stylex.ts +23 -0
- package/src/styles/index.css +14 -0
- package/src/styles/reset.css +35 -0
- package/src/theme/Theme.doc.ts +38 -0
- package/src/theme/Theme.tsx +195 -0
- package/src/theme/index.ts +9 -0
- package/src/tokens/contracts.ts +210 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const headingDoc: {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: ({
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
required?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: true;
|
|
12
|
+
})[];
|
|
13
|
+
inheritedProps: string[];
|
|
14
|
+
example: string;
|
|
15
|
+
storyId: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const headingDoc = {
|
|
3
|
+
name: 'Heading',
|
|
4
|
+
description: 'Renders a native heading at the requested document level.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'family',
|
|
7
|
+
description: 'Optional "interface" family, or explicit "display" family for page-level and editorial headings.'
|
|
8
|
+
}, {
|
|
9
|
+
name: 'level',
|
|
10
|
+
description: 'Required native heading level from 1 through 6.',
|
|
11
|
+
required: true
|
|
12
|
+
}, {
|
|
13
|
+
name: 'size',
|
|
14
|
+
description: 'Optional semantic size: "page", "section", or "subsection".'
|
|
15
|
+
}],
|
|
16
|
+
inheritedProps: ['HTMLAttributes<HTMLHeadingElement> except className'],
|
|
17
|
+
example: '<Heading level={2} size="section">Section title</Heading>',
|
|
18
|
+
storyId: 'core-heading--default'
|
|
19
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { createElement } from 'react';
|
|
3
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
4
|
+
import "../styles/stylex.css";
|
|
5
|
+
const styles = {
|
|
6
|
+
base: {
|
|
7
|
+
kMwMTN: "x1y4yzzg",
|
|
8
|
+
kMv6JI: "x69it5h",
|
|
9
|
+
k63SB2: "x1sa4947",
|
|
10
|
+
kLWn49: "x1vslzj6",
|
|
11
|
+
kogj98: "x1ghz6dp",
|
|
12
|
+
$$css: true
|
|
13
|
+
},
|
|
14
|
+
page: {
|
|
15
|
+
kGuDYH: "x18wzw5v",
|
|
16
|
+
$$css: true
|
|
17
|
+
},
|
|
18
|
+
section: {
|
|
19
|
+
kGuDYH: "xfuxfq0",
|
|
20
|
+
$$css: true
|
|
21
|
+
},
|
|
22
|
+
subsection: {
|
|
23
|
+
kGuDYH: "x1fkw5ar",
|
|
24
|
+
$$css: true
|
|
25
|
+
},
|
|
26
|
+
interface: {
|
|
27
|
+
kMv6JI: "x69it5h",
|
|
28
|
+
$$css: true
|
|
29
|
+
},
|
|
30
|
+
display: {
|
|
31
|
+
kMv6JI: "x13fdfvb",
|
|
32
|
+
$$css: true
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export function Heading({
|
|
36
|
+
children,
|
|
37
|
+
family = 'interface',
|
|
38
|
+
level,
|
|
39
|
+
size = 'section',
|
|
40
|
+
...props
|
|
41
|
+
}) {
|
|
42
|
+
return createElement(`h${level}`, {
|
|
43
|
+
...props,
|
|
44
|
+
...stylex.props(styles.base, styles[size], styles[family])
|
|
45
|
+
}, children);
|
|
46
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ButtonProps, type ButtonVariant, type ControlSize } from './Button.js';
|
|
2
|
+
/** Props for an icon-only native action button with a required name. */
|
|
3
|
+
export interface IconButtonProps extends Omit<ButtonProps, 'aria-label'> {
|
|
4
|
+
readonly 'aria-label': string;
|
|
5
|
+
readonly loading?: boolean;
|
|
6
|
+
readonly size?: ControlSize;
|
|
7
|
+
readonly variant?: ButtonVariant;
|
|
8
|
+
}
|
|
9
|
+
export declare function IconButton(props: IconButtonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const iconButtonDoc: {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: ({
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
required: true;
|
|
8
|
+
} | {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required?: undefined;
|
|
12
|
+
})[];
|
|
13
|
+
inheritedProps: string[];
|
|
14
|
+
example: string;
|
|
15
|
+
storyId: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const iconButtonDoc = {
|
|
3
|
+
name: 'IconButton',
|
|
4
|
+
description: 'Triggers an icon-only action with a required accessible label.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'aria-label',
|
|
7
|
+
description: 'Names the icon-only action.',
|
|
8
|
+
required: true
|
|
9
|
+
}, {
|
|
10
|
+
name: 'loading',
|
|
11
|
+
description: 'Shows progress and disables native activation.'
|
|
12
|
+
}, {
|
|
13
|
+
name: 'size',
|
|
14
|
+
description: 'Selects the fixed square control size.'
|
|
15
|
+
}, {
|
|
16
|
+
name: 'variant',
|
|
17
|
+
description: 'Selects a semantic visual emphasis.'
|
|
18
|
+
}],
|
|
19
|
+
inheritedProps: ['ButtonHTMLAttributes<HTMLButtonElement> except aria-label and className'],
|
|
20
|
+
example: '<IconButton aria-label="Close"><CloseIcon /></IconButton>',
|
|
21
|
+
storyId: 'core-icon-button--default'
|
|
22
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ActionControl } from './Button.js';
|
|
2
|
+
|
|
3
|
+
/** Props for an icon-only native action button with a required name. */
|
|
4
|
+
import "../styles/stylex.css";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export function IconButton(props) {
|
|
7
|
+
return /*#__PURE__*/_jsx(ActionControl, {
|
|
8
|
+
...props,
|
|
9
|
+
iconOnly: true
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface MetricGridItem {
|
|
3
|
+
readonly detail?: ReactNode;
|
|
4
|
+
readonly label: ReactNode;
|
|
5
|
+
readonly value: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface MetricGridProps extends Omit<HTMLAttributes<HTMLDListElement>, 'children' | 'className'> {
|
|
8
|
+
readonly items: readonly MetricGridItem[];
|
|
9
|
+
}
|
|
10
|
+
export declare function MetricGrid({ items, ...props }: MetricGridProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const metricGridDoc = {
|
|
3
|
+
name: 'MetricGrid',
|
|
4
|
+
description: 'Presents consumer-supplied labels and values with responsive description-list hierarchy.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'items',
|
|
7
|
+
description: 'Supplies metric labels, values, and optional detail.',
|
|
8
|
+
required: true
|
|
9
|
+
}],
|
|
10
|
+
inheritedProps: ['HTMLAttributes<HTMLDListElement> except children and className'],
|
|
11
|
+
example: '<MetricGrid items={[{label: "Total", value: "24"}]} />',
|
|
12
|
+
storyId: 'core-metric-grid--default'
|
|
13
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
3
|
+
import "../styles/stylex.css";
|
|
4
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
const minimumColumnWidth = `calc(${semanticTokens.spacing2xl} + ${semanticTokens.spacing2xl} + ${semanticTokens.spacing2xl} + ${semanticTokens.spacing2xl} + ${semanticTokens.spacing2xl} + ${semanticTokens.spacing2xl} + ${semanticTokens.spacing2xl} + ${semanticTokens.spacing2xl})`;
|
|
6
|
+
export function MetricGrid({
|
|
7
|
+
items,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/_jsx("dl", {
|
|
11
|
+
...props,
|
|
12
|
+
...{
|
|
13
|
+
className: "xrvj5dj x4nws80 x1tyajke x1ghz6dp"
|
|
14
|
+
},
|
|
15
|
+
children: items.map((item, index) => /*#__PURE__*/_jsxs("div", {
|
|
16
|
+
...{
|
|
17
|
+
className: "x1ixvsy6 xilcjya x7xrhi9 x1jnjmdy xpxnlqs xrvj5dj x1iwn5ga x1cfciu7"
|
|
18
|
+
},
|
|
19
|
+
children: [/*#__PURE__*/_jsx("dt", {
|
|
20
|
+
...{
|
|
21
|
+
className: "x17y7oyd xj0sio9 xltg2ad"
|
|
22
|
+
},
|
|
23
|
+
children: item.label
|
|
24
|
+
}), /*#__PURE__*/_jsx("dd", {
|
|
25
|
+
...{
|
|
26
|
+
className: "x1y4yzzg x69it5h xfuxfq0 x1sa4947 x1ghz6dp"
|
|
27
|
+
},
|
|
28
|
+
children: item.value
|
|
29
|
+
}), item.detail ? /*#__PURE__*/_jsx("dd", {
|
|
30
|
+
...{
|
|
31
|
+
className: "x1mgtvnk xj0sio9 xltg2ad x1ghz6dp"
|
|
32
|
+
},
|
|
33
|
+
children: item.detail
|
|
34
|
+
}) : null]
|
|
35
|
+
}, index))
|
|
36
|
+
});
|
|
37
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
import type { Space } from './Stack.js';
|
|
3
|
+
export interface SectionProps extends Omit<HTMLAttributes<HTMLElement>, 'className'> {
|
|
4
|
+
readonly padding?: Space;
|
|
5
|
+
}
|
|
6
|
+
export declare function Section({ children, padding, ...props }: SectionProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const sectionDoc = {
|
|
3
|
+
name: 'Section',
|
|
4
|
+
description: 'Groups related content in a native section landmark.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'padding',
|
|
7
|
+
description: 'Optional semantic block-padding token.'
|
|
8
|
+
}],
|
|
9
|
+
inheritedProps: ['HTMLAttributes<HTMLElement> except className'],
|
|
10
|
+
example: '<Section aria-label="Preferences"><Text>Content</Text></Section>',
|
|
11
|
+
storyId: 'core-section--default'
|
|
12
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
3
|
+
import "../styles/stylex.css";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const styles = {
|
|
6
|
+
paddingXs: {
|
|
7
|
+
k8WAf4: "x10y07nz",
|
|
8
|
+
$$css: true
|
|
9
|
+
},
|
|
10
|
+
paddingSm: {
|
|
11
|
+
k8WAf4: "xoeao9w",
|
|
12
|
+
$$css: true
|
|
13
|
+
},
|
|
14
|
+
paddingMd: {
|
|
15
|
+
k8WAf4: "x1lr58ck",
|
|
16
|
+
$$css: true
|
|
17
|
+
},
|
|
18
|
+
paddingLg: {
|
|
19
|
+
k8WAf4: "x17uk85o",
|
|
20
|
+
$$css: true
|
|
21
|
+
},
|
|
22
|
+
paddingXl: {
|
|
23
|
+
k8WAf4: "x18wayz0",
|
|
24
|
+
$$css: true
|
|
25
|
+
},
|
|
26
|
+
padding2xl: {
|
|
27
|
+
k8WAf4: "x3x1fh3",
|
|
28
|
+
$$css: true
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const paddings = {
|
|
32
|
+
xs: styles.paddingXs,
|
|
33
|
+
sm: styles.paddingSm,
|
|
34
|
+
md: styles.paddingMd,
|
|
35
|
+
lg: styles.paddingLg,
|
|
36
|
+
xl: styles.paddingXl,
|
|
37
|
+
'2xl': styles.padding2xl
|
|
38
|
+
};
|
|
39
|
+
export function Section({
|
|
40
|
+
children,
|
|
41
|
+
padding = 'xl',
|
|
42
|
+
...props
|
|
43
|
+
}) {
|
|
44
|
+
return /*#__PURE__*/_jsx("section", {
|
|
45
|
+
...props,
|
|
46
|
+
...stylex.props(paddings[padding]),
|
|
47
|
+
children: children
|
|
48
|
+
});
|
|
49
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
export interface SegmentedControlOption<Value extends string = string> {
|
|
3
|
+
readonly disabled?: boolean;
|
|
4
|
+
readonly label: ReactNode;
|
|
5
|
+
readonly value: Value;
|
|
6
|
+
}
|
|
7
|
+
type SharedSegmentedControlProps<Value extends string> = Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'aria-labelledby' | 'className' | 'defaultValue' | 'onChange'> & {
|
|
8
|
+
readonly disabled?: boolean;
|
|
9
|
+
readonly onValueChange?: (value: Value) => void;
|
|
10
|
+
readonly options: readonly SegmentedControlOption<Value>[];
|
|
11
|
+
readonly orientation?: 'horizontal' | 'vertical';
|
|
12
|
+
};
|
|
13
|
+
type SegmentedControlAccessibleName = {
|
|
14
|
+
readonly 'aria-label': string;
|
|
15
|
+
readonly 'aria-labelledby'?: string;
|
|
16
|
+
} | {
|
|
17
|
+
readonly 'aria-label'?: string;
|
|
18
|
+
readonly 'aria-labelledby': string;
|
|
19
|
+
};
|
|
20
|
+
type ControlledSegmentedControlProps<Value extends string> = SharedSegmentedControlProps<Value> & {
|
|
21
|
+
readonly defaultValue?: never;
|
|
22
|
+
readonly onValueChange: (value: Value) => void;
|
|
23
|
+
readonly value: Value;
|
|
24
|
+
};
|
|
25
|
+
type UncontrolledSegmentedControlProps<Value extends string> = SharedSegmentedControlProps<Value> & {
|
|
26
|
+
readonly defaultValue?: Value;
|
|
27
|
+
readonly value?: never;
|
|
28
|
+
};
|
|
29
|
+
export type SegmentedControlProps<Value extends string = string> = (ControlledSegmentedControlProps<Value> | UncontrolledSegmentedControlProps<Value>) & SegmentedControlAccessibleName;
|
|
30
|
+
export declare function SegmentedControl<Value extends string = string>({ 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, defaultValue, disabled, onValueChange, options, orientation, value, ...props }: SegmentedControlProps<Value>): import("react").JSX.Element;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const segmentedControlDoc: {
|
|
2
|
+
name: string;
|
|
3
|
+
description: string;
|
|
4
|
+
props: ({
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
required?: undefined;
|
|
8
|
+
} | {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
required: true;
|
|
12
|
+
})[];
|
|
13
|
+
inheritedProps: string[];
|
|
14
|
+
example: string;
|
|
15
|
+
storyId: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const segmentedControlDoc = {
|
|
3
|
+
name: 'SegmentedControl',
|
|
4
|
+
description: 'Chooses one supplied option with roving radio-group keyboard behavior.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'aria-label',
|
|
7
|
+
description: 'Directly names the radiogroup when no external label is used.'
|
|
8
|
+
}, {
|
|
9
|
+
name: 'aria-labelledby',
|
|
10
|
+
description: 'References the element that names the radiogroup.'
|
|
11
|
+
}, {
|
|
12
|
+
name: 'defaultValue',
|
|
13
|
+
description: 'Sets the initial value for uncontrolled selection while preserving roving focus.'
|
|
14
|
+
}, {
|
|
15
|
+
name: 'disabled',
|
|
16
|
+
description: 'Disables every option and removes the group from tab order.'
|
|
17
|
+
}, {
|
|
18
|
+
name: 'onValueChange',
|
|
19
|
+
description: 'Receives the next value selected by pointer or keyboard.'
|
|
20
|
+
}, {
|
|
21
|
+
name: 'options',
|
|
22
|
+
description: 'Supplies labels, values, and disabled states.',
|
|
23
|
+
required: true
|
|
24
|
+
}, {
|
|
25
|
+
name: 'orientation',
|
|
26
|
+
description: 'Selects horizontal or vertical arrow-key behavior.'
|
|
27
|
+
}, {
|
|
28
|
+
name: 'value',
|
|
29
|
+
description: 'Controls the current selected value; pointer and keyboard intent is reported through onValueChange.'
|
|
30
|
+
}],
|
|
31
|
+
inheritedProps: ['HTMLAttributes<HTMLDivElement> except aria-label, aria-labelledby, className, defaultValue, and onChange'],
|
|
32
|
+
example: '<SegmentedControl aria-label="Alignment" options={options} />',
|
|
33
|
+
storyId: 'core-segmented-control--default'
|
|
34
|
+
};
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { useRef, useState } from 'react';
|
|
3
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
4
|
+
import "../styles/stylex.css";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
export function SegmentedControl({
|
|
7
|
+
'aria-label': ariaLabel,
|
|
8
|
+
'aria-labelledby': ariaLabelledBy,
|
|
9
|
+
defaultValue,
|
|
10
|
+
disabled = false,
|
|
11
|
+
onValueChange,
|
|
12
|
+
options,
|
|
13
|
+
orientation = 'horizontal',
|
|
14
|
+
value,
|
|
15
|
+
...props
|
|
16
|
+
}) {
|
|
17
|
+
if (!ariaLabel?.trim() && !ariaLabelledBy?.trim()) {
|
|
18
|
+
throw new Error('SegmentedControl requires an accessible name');
|
|
19
|
+
}
|
|
20
|
+
const firstEnabledValue = options.find(option => !option.disabled)?.value;
|
|
21
|
+
const [internalValue, setInternalValue] = useState(defaultValue ?? firstEnabledValue);
|
|
22
|
+
const requestedValue = value ?? internalValue;
|
|
23
|
+
const selectedValue = options.some(option => option.value === requestedValue && !option.disabled) ? requestedValue : firstEnabledValue;
|
|
24
|
+
const optionRefs = useRef(new Map());
|
|
25
|
+
const enabledOptions = options.filter(option => !disabled && !option.disabled);
|
|
26
|
+
function select(nextValue) {
|
|
27
|
+
if (value === undefined) {
|
|
28
|
+
setInternalValue(nextValue);
|
|
29
|
+
}
|
|
30
|
+
onValueChange?.(nextValue);
|
|
31
|
+
}
|
|
32
|
+
function moveSelection(currentValue, direction) {
|
|
33
|
+
if (enabledOptions.length === 0) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const currentIndex = enabledOptions.findIndex(option => option.value === currentValue);
|
|
37
|
+
let nextIndex;
|
|
38
|
+
if (direction === 'first') {
|
|
39
|
+
nextIndex = 0;
|
|
40
|
+
} else if (direction === 'last') {
|
|
41
|
+
nextIndex = enabledOptions.length - 1;
|
|
42
|
+
} else if (direction === 'next') {
|
|
43
|
+
nextIndex = (currentIndex + 1 + enabledOptions.length) % enabledOptions.length;
|
|
44
|
+
} else {
|
|
45
|
+
nextIndex = (currentIndex - 1 + enabledOptions.length) % enabledOptions.length;
|
|
46
|
+
}
|
|
47
|
+
const nextOption = enabledOptions[nextIndex];
|
|
48
|
+
if (!nextOption) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
select(nextOption.value);
|
|
52
|
+
optionRefs.current.get(nextOption.value)?.focus();
|
|
53
|
+
}
|
|
54
|
+
function handleKeyDown(event, currentValue) {
|
|
55
|
+
const nextKey = orientation === 'horizontal' ? 'ArrowRight' : 'ArrowDown';
|
|
56
|
+
const previousKey = orientation === 'horizontal' ? 'ArrowLeft' : 'ArrowUp';
|
|
57
|
+
const direction = event.key === nextKey ? 'next' : event.key === previousKey ? 'previous' : event.key === 'Home' ? 'first' : event.key === 'End' ? 'last' : undefined;
|
|
58
|
+
if (direction) {
|
|
59
|
+
event.preventDefault();
|
|
60
|
+
moveSelection(currentValue, direction);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return /*#__PURE__*/_jsx("div", {
|
|
64
|
+
...props,
|
|
65
|
+
"aria-label": ariaLabel,
|
|
66
|
+
"aria-labelledby": ariaLabelledBy,
|
|
67
|
+
"aria-disabled": disabled || undefined,
|
|
68
|
+
"aria-orientation": orientation,
|
|
69
|
+
role: "radiogroup",
|
|
70
|
+
...{
|
|
71
|
+
0: {
|
|
72
|
+
className: "xavu78a x8kq9my x3nfvp2 x1iwn5ga x1tkv3ku"
|
|
73
|
+
},
|
|
74
|
+
1: {
|
|
75
|
+
className: "xavu78a x8kq9my x3nfvp2 x1iwn5ga x1tkv3ku xdt5ytf"
|
|
76
|
+
}
|
|
77
|
+
}[!!(orientation === 'vertical') << 0],
|
|
78
|
+
children: options.map(option => {
|
|
79
|
+
const isDisabled = disabled || Boolean(option.disabled);
|
|
80
|
+
const isSelected = option.value === selectedValue;
|
|
81
|
+
return /*#__PURE__*/_jsx("button", {
|
|
82
|
+
"aria-checked": isSelected,
|
|
83
|
+
disabled: isDisabled,
|
|
84
|
+
onClick: () => select(option.value),
|
|
85
|
+
onKeyDown: event => handleKeyDown(event, option.value),
|
|
86
|
+
ref: element => {
|
|
87
|
+
if (element) {
|
|
88
|
+
optionRefs.current.set(option.value, element);
|
|
89
|
+
} else {
|
|
90
|
+
optionRefs.current.delete(option.value);
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
role: "radio",
|
|
94
|
+
tabIndex: isSelected && !isDisabled ? 0 : -1,
|
|
95
|
+
...{
|
|
96
|
+
0: {
|
|
97
|
+
className: "xjbqb8w x1l6hjkl xng3xce x9f619 x1y4yzzg xj0sio9 x1ti3rys xmm8wyw x10y07nz x1qtbwip x609gy3 x15meki4 xz32tfx x1p22nma x17lds6u xbo0ryh x1ipqx2d"
|
|
98
|
+
},
|
|
99
|
+
1: {
|
|
100
|
+
className: "x1l6hjkl xng3xce x9f619 xj0sio9 x1ti3rys xmm8wyw x10y07nz x1qtbwip x609gy3 x15meki4 xz32tfx x1p22nma x17lds6u x40o0ze x1elh21b x1y4yzzg"
|
|
101
|
+
}
|
|
102
|
+
}[!!isSelected << 0],
|
|
103
|
+
type: "button",
|
|
104
|
+
children: option.label
|
|
105
|
+
}, option.value);
|
|
106
|
+
})
|
|
107
|
+
});
|
|
108
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface SkeletonProps extends Omit<HTMLAttributes<HTMLDivElement>, 'aria-label' | 'children' | 'className' | 'role'> {
|
|
3
|
+
readonly label?: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Skeleton({ label, ...props }: SkeletonProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const skeletonDoc = {
|
|
3
|
+
name: 'Skeleton',
|
|
4
|
+
description: 'Displays a decorative or explicitly labelled loading placeholder with a static reduced-motion fallback.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'label',
|
|
7
|
+
description: 'Optionally announces what is loading.'
|
|
8
|
+
}],
|
|
9
|
+
inheritedProps: ['HTMLAttributes<HTMLDivElement> except aria-label, children, className, and role'],
|
|
10
|
+
example: '<Skeleton label="Loading summary" />',
|
|
11
|
+
storyId: 'core-skeleton--default'
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
3
|
+
import "../styles/stylex.css";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const pulse = "x1vfr86i-B";
|
|
6
|
+
export function Skeleton({
|
|
7
|
+
label,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/_jsx("div", {
|
|
11
|
+
...props,
|
|
12
|
+
"aria-busy": label ? 'true' : undefined,
|
|
13
|
+
"aria-hidden": label ? undefined : 'true',
|
|
14
|
+
"aria-label": label,
|
|
15
|
+
role: label ? 'status' : undefined,
|
|
16
|
+
...{
|
|
17
|
+
className: "xpz12be xslpo9u xa4qsjk x125lowv x1aquc0h xsus3lq xavu78a x8kq9my xmm8wyw xh8yej3"
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export interface SpinnerProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'aria-label' | 'children' | 'className' | 'role'> {
|
|
3
|
+
readonly label: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function Spinner({ label, ...props }: SpinnerProps): import("react").JSX.Element;
|
|
6
|
+
export declare function SpinnerVisual(): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const spinnerDoc = {
|
|
3
|
+
name: 'Spinner',
|
|
4
|
+
description: 'Announces indeterminate progress with a required accessible label and a static reduced-motion fallback.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'label',
|
|
7
|
+
description: 'Names the operation in progress.',
|
|
8
|
+
required: true
|
|
9
|
+
}],
|
|
10
|
+
inheritedProps: ['HTMLAttributes<HTMLSpanElement> except aria-label, children, className, and role'],
|
|
11
|
+
example: '<Spinner label="Loading items" />',
|
|
12
|
+
storyId: 'core-spinner--default'
|
|
13
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
3
|
+
import "../styles/stylex.css";
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const spin = "x1fy8ia8-B";
|
|
6
|
+
export function Spinner({
|
|
7
|
+
label,
|
|
8
|
+
...props
|
|
9
|
+
}) {
|
|
10
|
+
return /*#__PURE__*/_jsx("span", {
|
|
11
|
+
...props,
|
|
12
|
+
"aria-busy": "true",
|
|
13
|
+
"aria-label": label,
|
|
14
|
+
role: "status",
|
|
15
|
+
children: /*#__PURE__*/_jsx(SpinnerVisual, {})
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
export function SpinnerVisual() {
|
|
19
|
+
return /*#__PURE__*/_jsx("span", {
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
...{
|
|
22
|
+
className: "xslpo9u xa4qsjk xpedhrg x1aquc0h xsus3lq x11a5md6 x2nywlj xnpwncj x1jnjmdy xpxnlqs x1rg5ohu x7s8d8b x1psh5v9"
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type Space = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
3
|
+
export interface StackProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className'> {
|
|
4
|
+
readonly gap?: Space;
|
|
5
|
+
readonly align?: 'stretch' | 'start' | 'center' | 'end';
|
|
6
|
+
}
|
|
7
|
+
export declare function Stack({ gap, align, children, ...props }: StackProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const stackDoc = {
|
|
3
|
+
name: 'Stack',
|
|
4
|
+
description: 'Arranges children vertically with semantic spacing.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'gap',
|
|
7
|
+
description: 'Optional semantic gap token.'
|
|
8
|
+
}, {
|
|
9
|
+
name: 'align',
|
|
10
|
+
description: 'Optional cross-axis alignment.'
|
|
11
|
+
}],
|
|
12
|
+
inheritedProps: ['HTMLAttributes<HTMLDivElement> except className'],
|
|
13
|
+
example: '<Stack gap="md"><Text>First</Text><Text>Second</Text></Stack>',
|
|
14
|
+
storyId: 'core-stack--default'
|
|
15
|
+
};
|