@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Misoto22
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# `@misoto22/kioku-ui`
|
|
2
|
+
|
|
3
|
+
Product-neutral React 19 components, semantic theme contracts, and compiled
|
|
4
|
+
styles for Kioku UI.
|
|
5
|
+
|
|
6
|
+
Compiled consumers import the runtime and both core stylesheets:
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import {Button} from '@misoto22/kioku-ui';
|
|
10
|
+
import '@misoto22/kioku-ui/reset.css';
|
|
11
|
+
import '@misoto22/kioku-ui/styles.css';
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Source consumers use `@misoto22/kioku-ui/source` with the build integration
|
|
15
|
+
from `@misoto22/kioku-ui-build`. StyleX recipes that only need the public
|
|
16
|
+
semantic variables can import `@misoto22/kioku-ui/authoring.stylex`; the
|
|
17
|
+
compiled `@misoto22/kioku-ui/authoring` entry is available when no source
|
|
18
|
+
transform is configured.
|
|
19
|
+
|
|
20
|
+
The host application supplies themes, routing adapters, and persistence. This
|
|
21
|
+
package contains no Kioku routes, APIs, domain records, or theme defaults.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import type { StatusTone } from '../Badge/index.js';
|
|
3
|
+
export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'role'> {
|
|
4
|
+
readonly icon?: ReactNode;
|
|
5
|
+
readonly tone?: StatusTone;
|
|
6
|
+
}
|
|
7
|
+
export declare function Alert({ children, icon, tone, ...props }: AlertProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const alertDoc = {
|
|
3
|
+
name: 'Alert',
|
|
4
|
+
description: 'Announces feedback with a quiet status boundary and polite or assertive live semantics.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'icon',
|
|
7
|
+
description: 'Overrides the tone-specific decorative status icon without adding an announcement.'
|
|
8
|
+
}, {
|
|
9
|
+
name: 'tone',
|
|
10
|
+
description: 'Selects the semantic status tone and live behavior.'
|
|
11
|
+
}],
|
|
12
|
+
inheritedProps: ['HTMLAttributes<HTMLDivElement> except className and role'],
|
|
13
|
+
example: '<Alert tone="danger">Unable to save.</Alert>',
|
|
14
|
+
storyId: 'core-alert--default'
|
|
15
|
+
};
|
|
@@ -0,0 +1,149 @@
|
|
|
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 styles = {
|
|
6
|
+
base: {
|
|
7
|
+
kGNEyG: "x1cy8zhl",
|
|
8
|
+
kaIpWk: "x8kq9my",
|
|
9
|
+
ksu8eU: "x1jnjmdy",
|
|
10
|
+
kMzoRj: "xpxnlqs",
|
|
11
|
+
k1xSpc: "x78zum5",
|
|
12
|
+
kMv6JI: "xj0sio9",
|
|
13
|
+
kGuDYH: "x1ti3rys",
|
|
14
|
+
kOIVth: "xtl099x",
|
|
15
|
+
kLWn49: "x1ezks3f",
|
|
16
|
+
kmVPX3: "x14rluyd",
|
|
17
|
+
$$css: true
|
|
18
|
+
},
|
|
19
|
+
info: {
|
|
20
|
+
kWkggS: "x1760qql",
|
|
21
|
+
kVAM5u: "x124ze02",
|
|
22
|
+
kMwMTN: "x1ursi0k",
|
|
23
|
+
$$css: true
|
|
24
|
+
},
|
|
25
|
+
success: {
|
|
26
|
+
kWkggS: "xjdu3ya",
|
|
27
|
+
kVAM5u: "x86rt86",
|
|
28
|
+
kMwMTN: "xw2tli",
|
|
29
|
+
$$css: true
|
|
30
|
+
},
|
|
31
|
+
warning: {
|
|
32
|
+
kWkggS: "xqpqlc7",
|
|
33
|
+
kVAM5u: "xkfpxyo",
|
|
34
|
+
kMwMTN: "x6rqny5",
|
|
35
|
+
$$css: true
|
|
36
|
+
},
|
|
37
|
+
danger: {
|
|
38
|
+
kWkggS: "x12uiudv",
|
|
39
|
+
kVAM5u: "xcf5wgx",
|
|
40
|
+
kMwMTN: "x8bm3zx",
|
|
41
|
+
$$css: true
|
|
42
|
+
},
|
|
43
|
+
icon: {
|
|
44
|
+
kGNEyG: "x6s0dn4",
|
|
45
|
+
k1xSpc: "x78zum5",
|
|
46
|
+
kmuXW: "x2lah0s",
|
|
47
|
+
kZKoxP: "x7s8d8b",
|
|
48
|
+
kjj79g: "xl56j7k",
|
|
49
|
+
kzqmXN: "x1psh5v9",
|
|
50
|
+
$$css: true
|
|
51
|
+
},
|
|
52
|
+
content: {
|
|
53
|
+
kUk6DE: "x98rzlu",
|
|
54
|
+
k7Eaqz: "xeuugli",
|
|
55
|
+
$$css: true
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function DefaultAlertIcon({
|
|
59
|
+
tone
|
|
60
|
+
}) {
|
|
61
|
+
const sharedProps = {
|
|
62
|
+
fill: 'none',
|
|
63
|
+
height: '100%',
|
|
64
|
+
stroke: 'currentColor',
|
|
65
|
+
strokeLinecap: 'round',
|
|
66
|
+
strokeLinejoin: 'round',
|
|
67
|
+
strokeWidth: 2,
|
|
68
|
+
viewBox: '0 0 20 20',
|
|
69
|
+
width: '100%'
|
|
70
|
+
};
|
|
71
|
+
if (tone === 'success') {
|
|
72
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
73
|
+
...sharedProps,
|
|
74
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
75
|
+
cx: "10",
|
|
76
|
+
cy: "10",
|
|
77
|
+
r: "8"
|
|
78
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
79
|
+
d: "m6.5 10 2.2 2.2 4.8-5"
|
|
80
|
+
})]
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (tone === 'warning') {
|
|
84
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
85
|
+
...sharedProps,
|
|
86
|
+
children: [/*#__PURE__*/_jsx("path", {
|
|
87
|
+
d: "M10 2.5 18 17H2L10 2.5Z"
|
|
88
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
89
|
+
d: "M10 7v4"
|
|
90
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
91
|
+
d: "M10 14h.01"
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
if (tone === 'danger') {
|
|
96
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
97
|
+
...sharedProps,
|
|
98
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
99
|
+
cx: "10",
|
|
100
|
+
cy: "10",
|
|
101
|
+
r: "8"
|
|
102
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
103
|
+
d: "m7 7 6 6M13 7l-6 6"
|
|
104
|
+
})]
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
return /*#__PURE__*/_jsxs("svg", {
|
|
108
|
+
...sharedProps,
|
|
109
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
110
|
+
cx: "10",
|
|
111
|
+
cy: "10",
|
|
112
|
+
r: "8"
|
|
113
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
114
|
+
d: "M10 9v5"
|
|
115
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
116
|
+
d: "M10 6h.01"
|
|
117
|
+
})]
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
export function Alert({
|
|
121
|
+
children,
|
|
122
|
+
icon,
|
|
123
|
+
tone = 'info',
|
|
124
|
+
...props
|
|
125
|
+
}) {
|
|
126
|
+
const isDanger = tone === 'danger';
|
|
127
|
+
const hasCustomIcon = icon !== undefined && icon !== null && icon !== false;
|
|
128
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
129
|
+
...props,
|
|
130
|
+
"aria-live": isDanger ? 'assertive' : 'polite',
|
|
131
|
+
role: isDanger ? 'alert' : 'status',
|
|
132
|
+
...stylex.props(styles.base, styles[tone]),
|
|
133
|
+
children: [/*#__PURE__*/_jsx("span", {
|
|
134
|
+
"aria-hidden": "true",
|
|
135
|
+
"data-alert-icon": hasCustomIcon ? 'custom' : tone,
|
|
136
|
+
...{
|
|
137
|
+
className: "x6s0dn4 x78zum5 x2lah0s x7s8d8b xl56j7k x1psh5v9"
|
|
138
|
+
},
|
|
139
|
+
children: hasCustomIcon ? icon : /*#__PURE__*/_jsx(DefaultAlertIcon, {
|
|
140
|
+
tone: tone
|
|
141
|
+
})
|
|
142
|
+
}), /*#__PURE__*/_jsx("div", {
|
|
143
|
+
...{
|
|
144
|
+
className: "x98rzlu xeuugli"
|
|
145
|
+
},
|
|
146
|
+
children: children
|
|
147
|
+
})]
|
|
148
|
+
});
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert, type AlertProps } from './Alert.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type AsyncStateValue<T> = {
|
|
3
|
+
readonly kind: 'loading';
|
|
4
|
+
readonly label?: string;
|
|
5
|
+
} | {
|
|
6
|
+
readonly kind: 'empty';
|
|
7
|
+
readonly title: ReactNode;
|
|
8
|
+
readonly detail?: ReactNode;
|
|
9
|
+
readonly action?: ReactNode;
|
|
10
|
+
} | {
|
|
11
|
+
readonly kind: 'error';
|
|
12
|
+
readonly title: ReactNode;
|
|
13
|
+
readonly detail?: ReactNode;
|
|
14
|
+
readonly retry?: ReactNode;
|
|
15
|
+
} | {
|
|
16
|
+
readonly kind: 'ready';
|
|
17
|
+
readonly data: T;
|
|
18
|
+
};
|
|
19
|
+
type PendingAsyncStateValue<T> = Exclude<AsyncStateValue<T>, {
|
|
20
|
+
kind: 'ready';
|
|
21
|
+
}>;
|
|
22
|
+
export type AsyncStateProps<T> = {
|
|
23
|
+
readonly children: (data: T) => ReactNode;
|
|
24
|
+
readonly state: AsyncStateValue<T>;
|
|
25
|
+
} | {
|
|
26
|
+
readonly children?: never;
|
|
27
|
+
readonly state: PendingAsyncStateValue<T>;
|
|
28
|
+
};
|
|
29
|
+
export declare function AsyncState<T>({ children, state }: AsyncStateProps<T>): import("react").JSX.Element;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const asyncStateDoc: {
|
|
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,16 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const asyncStateDoc = {
|
|
3
|
+
name: 'AsyncState',
|
|
4
|
+
description: 'Renders distinct loading, empty, error, and ready states.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'children',
|
|
7
|
+
description: 'Renders ready data and is required for the ready state.'
|
|
8
|
+
}, {
|
|
9
|
+
name: 'state',
|
|
10
|
+
description: 'Provides the current discriminated async state.',
|
|
11
|
+
required: true
|
|
12
|
+
}],
|
|
13
|
+
inheritedProps: ['No inherited DOM attributes'],
|
|
14
|
+
example: '<AsyncState state={{kind: "ready", data}}>{renderData}</AsyncState>',
|
|
15
|
+
storyId: 'core-async-state--default'
|
|
16
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Alert } from '../Alert/index.js';
|
|
2
|
+
import { EmptyStateContent } from '../EmptyState/index.js';
|
|
3
|
+
import { SpinnerVisual } from '../Spinner/index.js';
|
|
4
|
+
import "../styles/stylex.css";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
export function AsyncState({
|
|
7
|
+
children,
|
|
8
|
+
state
|
|
9
|
+
}) {
|
|
10
|
+
if (state.kind === 'ready' && !children) {
|
|
11
|
+
throw new Error('AsyncState requires a renderer for ready data');
|
|
12
|
+
}
|
|
13
|
+
const loadingLabel = state.kind === 'loading' ? state.label ?? 'Loading' : undefined;
|
|
14
|
+
const statusContent = state.kind === 'loading' ? /*#__PURE__*/_jsx(SpinnerVisual, {}) : state.kind === 'empty' ? /*#__PURE__*/_jsx(EmptyStateContent, {
|
|
15
|
+
action: state.action,
|
|
16
|
+
detail: state.detail,
|
|
17
|
+
title: state.title
|
|
18
|
+
}) : state.kind === 'ready' ? children(state.data) : null;
|
|
19
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
20
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
21
|
+
"aria-atomic": "true",
|
|
22
|
+
"aria-busy": state.kind === 'loading',
|
|
23
|
+
"aria-label": loadingLabel,
|
|
24
|
+
"aria-live": "polite",
|
|
25
|
+
role: "status",
|
|
26
|
+
children: statusContent
|
|
27
|
+
}), state.kind === 'error' ? /*#__PURE__*/_jsxs(Alert, {
|
|
28
|
+
tone: "danger",
|
|
29
|
+
children: [/*#__PURE__*/_jsx("div", {
|
|
30
|
+
children: state.title
|
|
31
|
+
}), state.detail ? /*#__PURE__*/_jsx("div", {
|
|
32
|
+
children: state.detail
|
|
33
|
+
}) : null, state.retry]
|
|
34
|
+
}) : null]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AsyncState, type AsyncStateProps, type AsyncStateValue, } from './AsyncState.js';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
/** Semantic feedback tones shared by status components. */
|
|
3
|
+
export type StatusTone = 'info' | 'success' | 'warning' | 'danger';
|
|
4
|
+
/** Compact badge tones, including a non-status neutral treatment. */
|
|
5
|
+
export type BadgeTone = 'neutral' | StatusTone;
|
|
6
|
+
/** Props for compact status or category text. */
|
|
7
|
+
export interface BadgeProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'className'> {
|
|
8
|
+
readonly tone?: BadgeTone;
|
|
9
|
+
}
|
|
10
|
+
export declare function Badge({ children, tone, ...props }: BadgeProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const badgeDoc = {
|
|
3
|
+
name: 'Badge',
|
|
4
|
+
description: 'Displays compact, non-live status or category text.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'tone',
|
|
7
|
+
description: 'Selects the neutral default or a semantic status tone.'
|
|
8
|
+
}],
|
|
9
|
+
inheritedProps: ['HTMLAttributes<HTMLSpanElement> except className'],
|
|
10
|
+
example: '<Badge tone="success">Available</Badge>',
|
|
11
|
+
storyId: 'core-badge--default'
|
|
12
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
3
|
+
|
|
4
|
+
/** Semantic feedback tones shared by status components. */
|
|
5
|
+
import "../styles/stylex.css";
|
|
6
|
+
/** Compact badge tones, including a non-status neutral treatment. */
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
const styles = {
|
|
9
|
+
base: {
|
|
10
|
+
kaIpWk: "x8kq9my",
|
|
11
|
+
k1xSpc: "x3nfvp2",
|
|
12
|
+
kMv6JI: "xj0sio9",
|
|
13
|
+
kGuDYH: "xnlz8j1",
|
|
14
|
+
k63SB2: "x1m30uz7",
|
|
15
|
+
k8WAf4: "x10y07nz",
|
|
16
|
+
kg3NbH: "x1qtbwip",
|
|
17
|
+
$$css: true
|
|
18
|
+
},
|
|
19
|
+
neutral: {
|
|
20
|
+
kWkggS: "xavu78a",
|
|
21
|
+
kMwMTN: "x17y7oyd",
|
|
22
|
+
$$css: true
|
|
23
|
+
},
|
|
24
|
+
info: {
|
|
25
|
+
kWkggS: "x1760qql",
|
|
26
|
+
kMwMTN: "x1ursi0k",
|
|
27
|
+
$$css: true
|
|
28
|
+
},
|
|
29
|
+
success: {
|
|
30
|
+
kWkggS: "xjdu3ya",
|
|
31
|
+
kMwMTN: "xw2tli",
|
|
32
|
+
$$css: true
|
|
33
|
+
},
|
|
34
|
+
warning: {
|
|
35
|
+
kWkggS: "xqpqlc7",
|
|
36
|
+
kMwMTN: "x6rqny5",
|
|
37
|
+
$$css: true
|
|
38
|
+
},
|
|
39
|
+
danger: {
|
|
40
|
+
kWkggS: "x12uiudv",
|
|
41
|
+
kMwMTN: "x8bm3zx",
|
|
42
|
+
$$css: true
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/** Props for compact status or category text. */
|
|
47
|
+
|
|
48
|
+
export function Badge({
|
|
49
|
+
children,
|
|
50
|
+
tone = 'neutral',
|
|
51
|
+
...props
|
|
52
|
+
}) {
|
|
53
|
+
return /*#__PURE__*/_jsx("span", {
|
|
54
|
+
...props,
|
|
55
|
+
...stylex.props(styles.base, styles[tone]),
|
|
56
|
+
children: children
|
|
57
|
+
});
|
|
58
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Badge, type BadgeProps, type BadgeTone, type StatusTone, } from './Badge.js';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
/** Visual sizes shared by native action controls. */
|
|
3
|
+
export type ControlSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
/** Semantic emphasis variants shared by native action controls. */
|
|
5
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'destructive';
|
|
6
|
+
/** Props for a text-labelled native action button. */
|
|
7
|
+
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className'> {
|
|
8
|
+
readonly loading?: boolean;
|
|
9
|
+
readonly size?: ControlSize;
|
|
10
|
+
readonly variant?: ButtonVariant;
|
|
11
|
+
}
|
|
12
|
+
interface ActionControlProps extends ButtonProps {
|
|
13
|
+
readonly iconOnly?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/** @internal Shared native implementation for Button and IconButton. */
|
|
16
|
+
export declare function ActionControl({ 'aria-busy': ariaBusy, children, disabled, iconOnly, loading, size, type, variant, ...props }: ActionControlProps): import("react").JSX.Element;
|
|
17
|
+
export declare function Button(props: ButtonProps): import("react").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "../styles/stylex.css";
|
|
2
|
+
export const buttonDoc = {
|
|
3
|
+
name: 'Button',
|
|
4
|
+
description: 'Triggers an action through native button semantics.',
|
|
5
|
+
props: [{
|
|
6
|
+
name: 'loading',
|
|
7
|
+
description: 'Shows progress and disables native activation.'
|
|
8
|
+
}, {
|
|
9
|
+
name: 'size',
|
|
10
|
+
description: 'Selects the fixed control height.'
|
|
11
|
+
}, {
|
|
12
|
+
name: 'variant',
|
|
13
|
+
description: 'Selects a semantic visual emphasis.'
|
|
14
|
+
}],
|
|
15
|
+
inheritedProps: ['ButtonHTMLAttributes<HTMLButtonElement> except className'],
|
|
16
|
+
example: '<Button onClick={save}>Save</Button>',
|
|
17
|
+
storyId: 'core-button--default'
|
|
18
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import * as stylex from '@stylexjs/stylex';
|
|
2
|
+
import { semanticTokens } from '../authoring.stylex.js';
|
|
3
|
+
import { SpinnerVisual } from '../Spinner/index.js';
|
|
4
|
+
import "../styles/stylex.css";
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const styles = {
|
|
7
|
+
base: {
|
|
8
|
+
kGNEyG: "x6s0dn4",
|
|
9
|
+
kB7OPa: "x9f619",
|
|
10
|
+
kaIpWk: "x8kq9my",
|
|
11
|
+
ksu8eU: "x1jnjmdy",
|
|
12
|
+
kMzoRj: "xpxnlqs",
|
|
13
|
+
k1xSpc: "x3nfvp2",
|
|
14
|
+
kMv6JI: "xj0sio9",
|
|
15
|
+
k63SB2: "x1m30uz7",
|
|
16
|
+
kOIVth: "x1ap6kct",
|
|
17
|
+
kjj79g: "xl56j7k",
|
|
18
|
+
kLWn49: "x1ezks3f",
|
|
19
|
+
kVAEAm: "x1n2onr6",
|
|
20
|
+
kD2jPA: "x48zea8",
|
|
21
|
+
kdODIN: "x1oulntk",
|
|
22
|
+
kWC4TW: "x609gy3",
|
|
23
|
+
kZs9gx: "x15meki4",
|
|
24
|
+
kiEn40: "xz32tfx",
|
|
25
|
+
k7shQP: "x1p22nma",
|
|
26
|
+
kPJHz1: "x17lds6u",
|
|
27
|
+
$$css: true
|
|
28
|
+
},
|
|
29
|
+
sm: {
|
|
30
|
+
kGuDYH: "xltg2ad",
|
|
31
|
+
kZKoxP: "x1vbl8lt",
|
|
32
|
+
kg3NbH: "x1qtbwip",
|
|
33
|
+
$$css: true
|
|
34
|
+
},
|
|
35
|
+
md: {
|
|
36
|
+
kGuDYH: "x1ti3rys",
|
|
37
|
+
kZKoxP: "xr8hsnb",
|
|
38
|
+
kg3NbH: "x1wkw8jr",
|
|
39
|
+
$$css: true
|
|
40
|
+
},
|
|
41
|
+
lg: {
|
|
42
|
+
kGuDYH: "x1ti3rys",
|
|
43
|
+
kZKoxP: "xscltuj",
|
|
44
|
+
kg3NbH: "x1q83fih",
|
|
45
|
+
$$css: true
|
|
46
|
+
},
|
|
47
|
+
primary: {
|
|
48
|
+
kWkggS: "x1j40q36",
|
|
49
|
+
kVAM5u: "x10ghty7",
|
|
50
|
+
kMwMTN: "x8ect3v",
|
|
51
|
+
ktLb98: "xahjstz",
|
|
52
|
+
ksVfMn: "xx21tl2",
|
|
53
|
+
kDKVdO: "xzpaccd",
|
|
54
|
+
kRIasW: "x6v1che",
|
|
55
|
+
$$css: true
|
|
56
|
+
},
|
|
57
|
+
secondary: {
|
|
58
|
+
kWkggS: "x1ixvsy6",
|
|
59
|
+
kVAM5u: "x1wxkff4",
|
|
60
|
+
kMwMTN: "x1y4yzzg",
|
|
61
|
+
ktLb98: "x1975ut4",
|
|
62
|
+
ksVfMn: "x1be0cy8",
|
|
63
|
+
kDKVdO: "xbo0ryh",
|
|
64
|
+
kRIasW: "x1u44if6",
|
|
65
|
+
$$css: true
|
|
66
|
+
},
|
|
67
|
+
ghost: {
|
|
68
|
+
kWkggS: "xjbqb8w",
|
|
69
|
+
kVAM5u: "x9r1u3d",
|
|
70
|
+
kMwMTN: "x1y4yzzg",
|
|
71
|
+
ktLb98: "x1975ut4",
|
|
72
|
+
kDKVdO: "xbo0ryh",
|
|
73
|
+
$$css: true
|
|
74
|
+
},
|
|
75
|
+
destructive: {
|
|
76
|
+
kWkggS: "x12uiudv",
|
|
77
|
+
kVAM5u: "xcf5wgx",
|
|
78
|
+
kMwMTN: "x8bm3zx",
|
|
79
|
+
k90Bq6: "xuc1b5w",
|
|
80
|
+
kFepIV: "x1pg383a",
|
|
81
|
+
$$css: true
|
|
82
|
+
},
|
|
83
|
+
loading: {
|
|
84
|
+
kkrTdU: "x19v85br",
|
|
85
|
+
$$css: true
|
|
86
|
+
},
|
|
87
|
+
iconOnly: {
|
|
88
|
+
kg3NbH: "xnjsko4",
|
|
89
|
+
$$css: true
|
|
90
|
+
},
|
|
91
|
+
iconSm: {
|
|
92
|
+
kzqmXN: "x9mi25i",
|
|
93
|
+
$$css: true
|
|
94
|
+
},
|
|
95
|
+
iconMd: {
|
|
96
|
+
kzqmXN: "x4ml2zf",
|
|
97
|
+
$$css: true
|
|
98
|
+
},
|
|
99
|
+
iconLg: {
|
|
100
|
+
kzqmXN: "x1089um4",
|
|
101
|
+
$$css: true
|
|
102
|
+
},
|
|
103
|
+
iconHitTarget: {
|
|
104
|
+
kgeoSG: "x1cpjm7i",
|
|
105
|
+
kgzTxl: "x17f96yv",
|
|
106
|
+
k96MEf: "x1knuo7r",
|
|
107
|
+
kSJ0CW: "xfbisj7",
|
|
108
|
+
kEoFBp: "x1hmns74",
|
|
109
|
+
kcTAPf: "xbnewub",
|
|
110
|
+
kOlAkY: "x1o8qpxl",
|
|
111
|
+
$$css: true
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const iconSizes = {
|
|
115
|
+
sm: styles.iconSm,
|
|
116
|
+
md: styles.iconMd,
|
|
117
|
+
lg: styles.iconLg
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
/** Visual sizes shared by native action controls. */
|
|
121
|
+
|
|
122
|
+
/** Semantic emphasis variants shared by native action controls. */
|
|
123
|
+
|
|
124
|
+
/** Props for a text-labelled native action button. */
|
|
125
|
+
|
|
126
|
+
/** @internal Shared native implementation for Button and IconButton. */
|
|
127
|
+
export function ActionControl({
|
|
128
|
+
'aria-busy': ariaBusy,
|
|
129
|
+
children,
|
|
130
|
+
disabled,
|
|
131
|
+
iconOnly = false,
|
|
132
|
+
loading = false,
|
|
133
|
+
size = 'md',
|
|
134
|
+
type = 'button',
|
|
135
|
+
variant = 'primary',
|
|
136
|
+
...props
|
|
137
|
+
}) {
|
|
138
|
+
return /*#__PURE__*/_jsxs("button", {
|
|
139
|
+
...props,
|
|
140
|
+
"aria-busy": loading ? 'true' : ariaBusy,
|
|
141
|
+
disabled: disabled || loading,
|
|
142
|
+
...stylex.props(styles.base, styles[size], styles[variant], loading && styles.loading, iconOnly && styles.iconOnly, iconOnly && iconSizes[size], iconOnly && styles.iconHitTarget),
|
|
143
|
+
type: type,
|
|
144
|
+
children: [loading ? /*#__PURE__*/_jsx(SpinnerVisual, {}) : null, iconOnly && loading ? null : children]
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
export function Button(props) {
|
|
148
|
+
return /*#__PURE__*/_jsx(ActionControl, {
|
|
149
|
+
...props
|
|
150
|
+
});
|
|
151
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ActionControl, Button, type ButtonProps, type ButtonVariant, type ControlSize, } from './Button.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HTMLAttributes } from 'react';
|
|
2
|
+
export type CardElevation = 'none' | 'low' | 'medium';
|
|
3
|
+
export interface CardProps extends Omit<HTMLAttributes<HTMLElement>, 'className'> {
|
|
4
|
+
readonly elevation?: CardElevation;
|
|
5
|
+
}
|
|
6
|
+
export declare function Card({ children, elevation, ...props }: CardProps): import("react").JSX.Element;
|