@serendie/ui 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/dist/components/Accordion.d.ts +23 -0
- package/dist/components/AccordionGroup.d.ts +2 -0
- package/dist/components/Avatar.d.ts +40 -0
- package/dist/components/Badge.d.ts +90 -0
- package/dist/components/Banner.d.ts +43 -0
- package/dist/components/BottomNavigation.d.ts +2 -0
- package/dist/components/BottomNavigationItem.d.ts +30 -0
- package/dist/components/Button.d.ts +133 -0
- package/dist/components/CheckBox.d.ts +47 -0
- package/dist/components/ChoiceBox.d.ts +8 -0
- package/dist/components/DashboardWidget.d.ts +13 -0
- package/dist/components/Divider.d.ts +33 -0
- package/dist/components/Drawer.d.ts +40 -0
- package/dist/components/DropdownMenu.d.ts +14 -0
- package/dist/components/IconButton.d.ts +81 -0
- package/dist/components/List.d.ts +2 -0
- package/dist/components/ListItem.d.ts +46 -0
- package/dist/components/ModalDialog.d.ts +15 -0
- package/dist/components/NotificationBadge.d.ts +54 -0
- package/dist/components/ProgressIndicator.d.ts +29 -0
- package/dist/components/RadioButton.d.ts +30 -0
- package/dist/components/RadioGroup.d.ts +2 -0
- package/dist/components/Search.d.ts +51 -0
- package/dist/components/Select.d.ts +63 -0
- package/dist/components/SvgIcon.d.ts +75 -0
- package/dist/components/SvgIcon.stories.d.ts +7 -0
- package/dist/components/Switch.d.ts +10 -0
- package/dist/components/TabItem.d.ts +22 -0
- package/dist/components/Tabs.d.ts +3 -0
- package/dist/components/TextArea.d.ts +8 -0
- package/dist/components/TextField.d.ts +7 -0
- package/dist/components/Toast.d.ts +35 -0
- package/dist/components/TopAppBar.d.ts +37 -0
- package/dist/index.cjs +65 -0
- package/dist/index.d.ts +33 -0
- package/dist/index.js +19523 -0
- package/dist/preset.d.ts +534 -0
- package/dist/recipes/index.d.ts +2 -0
- package/dist/styles.css +1 -0
- package/dist/tokens/getToken.d.ts +789 -0
- package/dist/tokens/index.d.ts +1808 -0
- package/dist/tokens/keyframes/index.d.ts +10 -0
- package/package.json +100 -0
- package/styled-system/css/conditions.js +34 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.js +45 -0
- package/styled-system/css/cva.d.ts +6 -0
- package/styled-system/css/cva.js +87 -0
- package/styled-system/css/cx.d.ts +5 -0
- package/styled-system/css/cx.js +15 -0
- package/styled-system/css/index.d.ts +5 -0
- package/styled-system/css/index.js +4 -0
- package/styled-system/css/sva.d.ts +4 -0
- package/styled-system/css/sva.js +41 -0
- package/styled-system/helpers.js +326 -0
- package/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/styled-system/jsx/aspect-ratio.js +14 -0
- package/styled-system/jsx/bleed.d.ts +10 -0
- package/styled-system/jsx/bleed.js +14 -0
- package/styled-system/jsx/box.d.ts +10 -0
- package/styled-system/jsx/box.js +14 -0
- package/styled-system/jsx/center.d.ts +10 -0
- package/styled-system/jsx/center.js +14 -0
- package/styled-system/jsx/circle.d.ts +10 -0
- package/styled-system/jsx/circle.js +14 -0
- package/styled-system/jsx/container.d.ts +10 -0
- package/styled-system/jsx/container.js +14 -0
- package/styled-system/jsx/cq.d.ts +10 -0
- package/styled-system/jsx/cq.js +14 -0
- package/styled-system/jsx/divider.d.ts +10 -0
- package/styled-system/jsx/divider.js +14 -0
- package/styled-system/jsx/factory-helper.js +22 -0
- package/styled-system/jsx/factory.d.ts +3 -0
- package/styled-system/jsx/factory.js +80 -0
- package/styled-system/jsx/flex.d.ts +10 -0
- package/styled-system/jsx/flex.js +14 -0
- package/styled-system/jsx/float.d.ts +10 -0
- package/styled-system/jsx/float.js +14 -0
- package/styled-system/jsx/grid-item.d.ts +10 -0
- package/styled-system/jsx/grid-item.js +14 -0
- package/styled-system/jsx/grid.d.ts +10 -0
- package/styled-system/jsx/grid.js +14 -0
- package/styled-system/jsx/hstack.d.ts +10 -0
- package/styled-system/jsx/hstack.js +14 -0
- package/styled-system/jsx/index.d.ts +24 -0
- package/styled-system/jsx/index.js +22 -0
- package/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/styled-system/jsx/is-valid-prop.js +17 -0
- package/styled-system/jsx/link-overlay.d.ts +10 -0
- package/styled-system/jsx/link-overlay.js +14 -0
- package/styled-system/jsx/spacer.d.ts +10 -0
- package/styled-system/jsx/spacer.js +14 -0
- package/styled-system/jsx/square.d.ts +10 -0
- package/styled-system/jsx/square.js +14 -0
- package/styled-system/jsx/stack.d.ts +10 -0
- package/styled-system/jsx/stack.js +14 -0
- package/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/styled-system/jsx/visually-hidden.js +14 -0
- package/styled-system/jsx/vstack.d.ts +10 -0
- package/styled-system/jsx/vstack.js +14 -0
- package/styled-system/jsx/wrap.d.ts +10 -0
- package/styled-system/jsx/wrap.js +14 -0
- package/styled-system/patterns/aspect-ratio.d.ts +21 -0
- package/styled-system/patterns/aspect-ratio.js +38 -0
- package/styled-system/patterns/bleed.d.ts +22 -0
- package/styled-system/patterns/bleed.js +24 -0
- package/styled-system/patterns/box.d.ts +21 -0
- package/styled-system/patterns/box.js +15 -0
- package/styled-system/patterns/center.d.ts +21 -0
- package/styled-system/patterns/center.js +21 -0
- package/styled-system/patterns/circle.d.ts +21 -0
- package/styled-system/patterns/circle.js +25 -0
- package/styled-system/patterns/container.d.ts +21 -0
- package/styled-system/patterns/container.js +21 -0
- package/styled-system/patterns/cq.d.ts +22 -0
- package/styled-system/patterns/cq.js +21 -0
- package/styled-system/patterns/divider.d.ts +23 -0
- package/styled-system/patterns/divider.js +25 -0
- package/styled-system/patterns/flex.d.ts +27 -0
- package/styled-system/patterns/flex.js +26 -0
- package/styled-system/patterns/float.d.ts +24 -0
- package/styled-system/patterns/float.js +52 -0
- package/styled-system/patterns/grid-item.d.ts +26 -0
- package/styled-system/patterns/grid-item.js +25 -0
- package/styled-system/patterns/grid.d.ts +25 -0
- package/styled-system/patterns/grid.js +27 -0
- package/styled-system/patterns/hstack.d.ts +22 -0
- package/styled-system/patterns/hstack.js +24 -0
- package/styled-system/patterns/index.d.ts +21 -0
- package/styled-system/patterns/index.js +20 -0
- package/styled-system/patterns/link-overlay.d.ts +21 -0
- package/styled-system/patterns/link-overlay.js +24 -0
- package/styled-system/patterns/spacer.d.ts +21 -0
- package/styled-system/patterns/spacer.js +21 -0
- package/styled-system/patterns/square.d.ts +21 -0
- package/styled-system/patterns/square.js +24 -0
- package/styled-system/patterns/stack.d.ts +24 -0
- package/styled-system/patterns/stack.js +24 -0
- package/styled-system/patterns/visually-hidden.d.ts +21 -0
- package/styled-system/patterns/visually-hidden.js +18 -0
- package/styled-system/patterns/vstack.d.ts +22 -0
- package/styled-system/patterns/vstack.js +24 -0
- package/styled-system/patterns/wrap.d.ts +25 -0
- package/styled-system/patterns/wrap.js +25 -0
- package/styled-system/themes/asagi.json +5 -0
- package/styled-system/themes/index.d.ts +36 -0
- package/styled-system/themes/index.js +24 -0
- package/styled-system/themes/kurikawa.json +5 -0
- package/styled-system/themes/sumire.json +5 -0
- package/styled-system/themes/theme-asagi.json +5 -0
- package/styled-system/themes/theme-kurikawa.json +5 -0
- package/styled-system/themes/theme-sumire.json +5 -0
- package/styled-system/themes/theme-tsutsuji.json +5 -0
- package/styled-system/themes/tsutsuji.json +5 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.js +3548 -0
- package/styled-system/tokens/tokens.d.ts +48 -0
- package/styled-system/types/composition.d.ts +138 -0
- package/styled-system/types/conditions.d.ts +214 -0
- package/styled-system/types/csstype.d.ts +21298 -0
- package/styled-system/types/global.d.ts +19 -0
- package/styled-system/types/index.d.ts +8 -0
- package/styled-system/types/jsx.d.ts +52 -0
- package/styled-system/types/parts.d.ts +8 -0
- package/styled-system/types/pattern.d.ts +78 -0
- package/styled-system/types/prop-type.d.ts +237 -0
- package/styled-system/types/recipe.d.ts +181 -0
- package/styled-system/types/selectors.d.ts +59 -0
- package/styled-system/types/static-css.d.ts +51 -0
- package/styled-system/types/style-props.d.ts +7468 -0
- package/styled-system/types/system-types.d.ts +88 -0
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Serendie UI
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
[](https://storybook.serendie.design/)
|
|
5
|
+
|
|
6
|
+
[Serendie UI Kit (Figma)](https://www.figma.com/community/file/1433690846108785966)と対となるReactベースのUIコンポーネント集です。Figma Code Connectにも対応しており、Storybookと同等の内容が[Figma Devモードでも確認](https://serendie.design/get-started/dev/#section-1)できます。
|
|
7
|
+
|
|
8
|
+
## 使い方
|
|
9
|
+
|
|
10
|
+
### インストール
|
|
11
|
+
|
|
12
|
+
デザイントークンも同梱されるので同時インストールは不要です。
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
npm install @serendie/ui
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
### プロジェクトへの導入
|
|
19
|
+
|
|
20
|
+
rootのCSSに対して、次の2行を設定してください。1行目は、Serendie UIに対して、スタイルを適切に当てるためにカスケードレイヤーの指定をするもの、2行目は同梱のデザイントークンやデフォルトスタイルを読み込むものです。
|
|
21
|
+
|
|
22
|
+
```css
|
|
23
|
+
@layer reset, base, tokens, recipes, utilities;
|
|
24
|
+
@import "@serendie/ui/styles.css";
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### コンポーネントを使う
|
|
28
|
+
|
|
29
|
+
使いたいComponentをimportしたうえで、通常のReact Componentとして使用してください。各Componentが持つpropsについては、[ドキュメント](https://serendie.design/components/button/)や、[Storybook](https://storybook.serendie.design/?path=/story/components-button--medium)、Figma Code Connectを参照してください。
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import { Button } from "@serendie/ui";
|
|
33
|
+
|
|
34
|
+
<Button size="medium">Login</Button>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### テーマ切り替え
|
|
38
|
+
|
|
39
|
+
Serendie Design Systemには5つのカラーテーマがあり、デザイントークンもそれに対応します。htmlタグなどに、`data-panda-theme`属性 (`konjo`, `asagi`, `sumire`, `tsutusji`, `kurikawa`)を付与することでカラーテーマを切り替えることができます。
|
|
40
|
+
各テーマについては[こちら](https://serendie.design/foundations/theming/)を参照してください。
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<html data-panda-theme="asagi"></html>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## スタイリングライブラリと併用する
|
|
47
|
+
|
|
48
|
+
あるコンポーネントのmarginを微修正したいなど、Serendie UIのスタイルをカスタムしたいシーンでは、プロジェクト側にスタイリングライブラリ(CSS-in-JSなど)を導入してください。どのスタイリングライブラリでも併用は可能ですが、ここではSerendie UIの内部でも使用している[Panda CSS](https://panda-css.com/)の例を紹介します。
|
|
49
|
+
|
|
50
|
+
### SerendiePresetの追加
|
|
51
|
+
|
|
52
|
+
Panda CSS導入後に生成される`panda.config.ts`に下記を追記することで、Panda CSSの[Preset](https://panda-css.com/docs/customization/presets)とSerendie Design Systemのデザイントークンを繋ぎこみます。
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
+import { SerendiePreset } from "@serendie/ui";
|
|
56
|
+
|
|
57
|
+
export default defineConfig({
|
|
58
|
+
+ jsxFramework: "react",
|
|
59
|
+
+ presets: [SerendiePreset],
|
|
60
|
+
});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
より実践的な例は、こちらの[サンプルプロジェクト](https://github.com/serendie/bootcamp?tab=readme-ov-file#%E3%82%B9%E3%82%BF%E3%82%A4%E3%83%AA%E3%83%B3%E3%82%B0%E3%83%A9%E3%82%A4%E3%83%96%E3%83%A9%E3%83%AA%E3%81%A8%E4%BD%B5%E7%94%A8%E3%81%99%E3%82%8B)を参考にしてください。
|
|
64
|
+
|
|
65
|
+
## APIを詳しく知る
|
|
66
|
+
|
|
67
|
+
Serendie UIはヘッドレスUIとして、[Ark UI](https://ark-ui.com/)を内部的に利用しており、各コンポーネントのAPIはArk UIを継承します。Selectコンポーネントなどインタラクションが複雑なコンポーネントは、Ark UIの[APIリファレンス](https://ark-ui.com/react/docs/components/select#api-reference)を合わせて参照してください。
|
|
68
|
+
|
|
69
|
+
## 開発
|
|
70
|
+
|
|
71
|
+
Serendie UIに新しくコンポーネントを追加する場合は、Ark UIをベースにしてください。
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
npm run dev # run storybook
|
|
75
|
+
npm run build
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Figma Code Connect
|
|
79
|
+
|
|
80
|
+
Serendie UIでは、Figma Code ConnectをStorybookと繋ぎこむ形で導入しています。下記のコマンドで各コンポーネント毎のstoriesファイルの内容を、Figmaにpublishします。
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
npm run connect:publish
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
storiesファイルに変更が入ると上記が[GitHub Actions](https://github.com/serendie/serendie/blob/main/.github/workflows/publish-code-connect.yml)によって実行されます。
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { AccordionItemProps } from '@ark-ui/react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/types';
|
|
3
|
+
declare const AccordionStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"description" | "title" | "item" | "itemIndicator" | "icon", {
|
|
4
|
+
isLeftIcon: {
|
|
5
|
+
true: {
|
|
6
|
+
item: {
|
|
7
|
+
flexDirection: "row-reverse";
|
|
8
|
+
};
|
|
9
|
+
itemIndicator: {
|
|
10
|
+
transform: "rotate(-90deg)";
|
|
11
|
+
_open: {
|
|
12
|
+
transform: "rotate(0deg)";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}>;
|
|
18
|
+
export type AccordionProps = {
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
} & RecipeVariantProps<typeof AccordionStyle> & AccordionItemProps;
|
|
22
|
+
export declare const Accordion: React.FC<AccordionProps>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AvatarRootProps } from '@ark-ui/react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/css';
|
|
3
|
+
export declare const AvatarStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"image" | "root" | "fallback", {
|
|
4
|
+
size: {
|
|
5
|
+
small: {
|
|
6
|
+
root: {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
};
|
|
10
|
+
fallback: {
|
|
11
|
+
fontSize: number;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
medium: {
|
|
15
|
+
root: {
|
|
16
|
+
width: number;
|
|
17
|
+
height: number;
|
|
18
|
+
};
|
|
19
|
+
fallback: {
|
|
20
|
+
fontSize: number;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
large: {
|
|
24
|
+
root: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
};
|
|
28
|
+
fallback: {
|
|
29
|
+
fontSize: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}>;
|
|
34
|
+
export type AvatarProps = {
|
|
35
|
+
src?: string;
|
|
36
|
+
alt?: string;
|
|
37
|
+
text?: string;
|
|
38
|
+
placeholder?: "filled" | "outlined";
|
|
39
|
+
} & RecipeVariantProps<typeof AvatarStyle> & AvatarRootProps;
|
|
40
|
+
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/types';
|
|
3
|
+
export declare const BadgeStyle: import('../../styled-system/types').RecipeRuntimeFn<{
|
|
4
|
+
size: {
|
|
5
|
+
small: {
|
|
6
|
+
height: "16px";
|
|
7
|
+
pr: "sd.system.dimension.spacing.twoExtraSmall";
|
|
8
|
+
pl: "sd.system.dimension.spacing.twoExtraSmall";
|
|
9
|
+
textStyle: "sd.system.typography.label.small_compact";
|
|
10
|
+
expanded: {
|
|
11
|
+
textStyle: "sd.system.typography.label.small_expanded";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
medium: {
|
|
15
|
+
height: "24px";
|
|
16
|
+
pr: "sd.system.dimension.spacing.extraSmall";
|
|
17
|
+
pl: "sd.system.dimension.spacing.extraSmall";
|
|
18
|
+
textStyle: "sd.system.typography.label.medium_compact";
|
|
19
|
+
expanded: {
|
|
20
|
+
textStyle: "sd.system.typography.label.medium_expanded";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
large: {
|
|
24
|
+
height: "32px";
|
|
25
|
+
pr: "sd.system.dimension.spacing.medium";
|
|
26
|
+
pl: "sd.system.dimension.spacing.medium";
|
|
27
|
+
textStyle: "sd.system.typography.label.large_compact";
|
|
28
|
+
expanded: {
|
|
29
|
+
textStyle: "sd.system.typography.label.large_expanded";
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
styleColor: {
|
|
34
|
+
gray: {
|
|
35
|
+
bg: "sd.reference.color.scale.gray.600";
|
|
36
|
+
color: "sd.system.color.component.inverseOnSurface";
|
|
37
|
+
};
|
|
38
|
+
blue: {
|
|
39
|
+
bg: "sd.reference.color.scale.blue.600";
|
|
40
|
+
color: "sd.system.color.component.inverseOnSurface";
|
|
41
|
+
};
|
|
42
|
+
green: {
|
|
43
|
+
bg: "sd.reference.color.scale.green.600";
|
|
44
|
+
color: "sd.system.color.component.inverseOnSurface";
|
|
45
|
+
};
|
|
46
|
+
yellow: {
|
|
47
|
+
bg: "sd.reference.color.scale.yellow.600";
|
|
48
|
+
color: "sd.system.color.component.inverseOnSurface";
|
|
49
|
+
};
|
|
50
|
+
chestnut: {
|
|
51
|
+
bg: "sd.reference.color.scale.chestnut.600";
|
|
52
|
+
color: "sd.system.color.component.inverseOnSurface";
|
|
53
|
+
};
|
|
54
|
+
red: {
|
|
55
|
+
bg: "sd.reference.color.scale.red.600";
|
|
56
|
+
color: "sd.system.color.component.inverseOnSurface";
|
|
57
|
+
};
|
|
58
|
+
"gray-subtle": {
|
|
59
|
+
bg: "sd.reference.color.scale.gray.100";
|
|
60
|
+
color: "sd.reference.color.scale.gray.800";
|
|
61
|
+
};
|
|
62
|
+
"blue-subtle": {
|
|
63
|
+
bg: "sd.reference.color.scale.blue.100";
|
|
64
|
+
color: "sd.reference.color.scale.blue.800";
|
|
65
|
+
};
|
|
66
|
+
"green-subtle": {
|
|
67
|
+
bg: "sd.reference.color.scale.green.100";
|
|
68
|
+
color: "sd.reference.color.scale.green.800";
|
|
69
|
+
};
|
|
70
|
+
"yellow-subtle": {
|
|
71
|
+
bg: "sd.reference.color.scale.yellow.100";
|
|
72
|
+
color: "sd.reference.color.scale.yellow.800";
|
|
73
|
+
};
|
|
74
|
+
"chestnut-subtle": {
|
|
75
|
+
bg: "sd.reference.color.scale.chestnut.100";
|
|
76
|
+
color: "sd.reference.color.scale.chestnut.800";
|
|
77
|
+
};
|
|
78
|
+
"red-subtle": {
|
|
79
|
+
bg: "sd.reference.color.scale.red.100";
|
|
80
|
+
color: "sd.reference.color.scale.red.800";
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
}>;
|
|
84
|
+
type BadgeProps = ComponentProps<"span"> & RecipeVariantProps<typeof BadgeStyle> & {
|
|
85
|
+
closeButton?: React.ReactElement<BadgeCloseButtonProps>;
|
|
86
|
+
};
|
|
87
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
88
|
+
type BadgeCloseButtonProps = React.FC<ComponentProps<"button">>;
|
|
89
|
+
export declare const BadgeCloseButton: React.FC<ComponentProps<"button">>;
|
|
90
|
+
export {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/css';
|
|
3
|
+
declare const BannerStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"container" | "description" | "title" | "icon", {
|
|
4
|
+
type: {
|
|
5
|
+
information: {
|
|
6
|
+
container: {
|
|
7
|
+
bg: "sd.system.color.component.surface";
|
|
8
|
+
color: "sd.system.color.component.onSurface";
|
|
9
|
+
borderWidth: "sd.system.dimension.border.medium";
|
|
10
|
+
borderStyle: "solid";
|
|
11
|
+
borderColor: "sd.system.color.component.outline";
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
error: {
|
|
15
|
+
container: {
|
|
16
|
+
bg: "sd.system.color.impression.negativeContainer";
|
|
17
|
+
color: "sd.system.color.impression.onNegativeContainer";
|
|
18
|
+
borderWidth: "sd.system.dimension.border.medium";
|
|
19
|
+
borderStyle: "solid";
|
|
20
|
+
borderColor: "sd.system.color.impression.negativeContainer";
|
|
21
|
+
};
|
|
22
|
+
icon: {
|
|
23
|
+
color: "sd.system.color.impression.negative";
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
warning: {
|
|
27
|
+
container: {
|
|
28
|
+
bg: "sd.system.color.impression.noticeContainer";
|
|
29
|
+
color: "sd.system.color.impression.onNoticeContainer";
|
|
30
|
+
borderWidth: "sd.system.dimension.border.medium";
|
|
31
|
+
borderStyle: "solid";
|
|
32
|
+
borderColor: "sd.system.color.impression.noticeContainer";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
}>;
|
|
37
|
+
type BannerProps = {
|
|
38
|
+
title: string;
|
|
39
|
+
description: string;
|
|
40
|
+
icon?: React.ReactElement;
|
|
41
|
+
} & ComponentProps<"div">;
|
|
42
|
+
export declare const Banner: React.FC<BannerProps & RecipeVariantProps<typeof BannerStyle>>;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/css';
|
|
3
|
+
export declare const BottomNavigationItemStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"label" | "icon" | "root" | "iconGroup" | "badge", {
|
|
4
|
+
isActive: {
|
|
5
|
+
true: {
|
|
6
|
+
label: {
|
|
7
|
+
color: "sd.system.color.impression.primary";
|
|
8
|
+
};
|
|
9
|
+
icon: {
|
|
10
|
+
color: "sd.system.color.impression.primary";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
dot: {
|
|
15
|
+
true: {
|
|
16
|
+
badge: {
|
|
17
|
+
top: "-2.5px";
|
|
18
|
+
right: "4px";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}>;
|
|
23
|
+
type Props = {
|
|
24
|
+
icon: React.ReactNode;
|
|
25
|
+
label: string;
|
|
26
|
+
count?: number;
|
|
27
|
+
};
|
|
28
|
+
export type BottomNavigationItemProps = Props & ComponentProps<"button"> & RecipeVariantProps<typeof BottomNavigationItemStyle>;
|
|
29
|
+
export declare const BottomNavigationItem: React.FC<BottomNavigationItemProps>;
|
|
30
|
+
export {};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const ButtonStyle: import('../../styled-system/types').RecipeRuntimeFn<{
|
|
3
|
+
styleType: {
|
|
4
|
+
filled: {
|
|
5
|
+
bg: "sd.system.color.impression.primaryContainer";
|
|
6
|
+
color: "sd.system.color.impression.onPrimaryContainer";
|
|
7
|
+
_enabled: {
|
|
8
|
+
_hover: {
|
|
9
|
+
_after: {
|
|
10
|
+
content: "''";
|
|
11
|
+
position: "absolute";
|
|
12
|
+
inset: "0";
|
|
13
|
+
bg: "sd.system.color.interaction.hovered";
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
_focusVisible: {
|
|
17
|
+
outlineWidth: "sd.system.dimension.border.medium";
|
|
18
|
+
outlineStyle: "solid";
|
|
19
|
+
outlineColor: "sd.system.color.interaction.hovered";
|
|
20
|
+
_after: {
|
|
21
|
+
content: "''";
|
|
22
|
+
position: "absolute";
|
|
23
|
+
inset: "0";
|
|
24
|
+
bg: "sd.system.color.interaction.hovered";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
_disabled: {
|
|
29
|
+
bg: "sd.system.color.interaction.disabled";
|
|
30
|
+
color: "sd.system.color.interaction.disabledOnSurface";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
ghost: {
|
|
34
|
+
color: "sd.system.color.impression.primary";
|
|
35
|
+
_enabled: {
|
|
36
|
+
_hover: {
|
|
37
|
+
bgColor: "sd.system.color.interaction.hoveredVariant";
|
|
38
|
+
};
|
|
39
|
+
_focusVisible: {
|
|
40
|
+
bgColor: "sd.system.color.interaction.hoveredVariant";
|
|
41
|
+
outlineWidth: "sd.system.dimension.border.medium";
|
|
42
|
+
outlineStyle: "solid";
|
|
43
|
+
outlineColor: "sd.system.color.component.outlineVariant";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
_disabled: {
|
|
47
|
+
color: "sd.system.color.interaction.disabledOnSurface";
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
outlined: {
|
|
51
|
+
color: string;
|
|
52
|
+
outlineWidth: string;
|
|
53
|
+
outlineStyle: string;
|
|
54
|
+
outlineColor: string;
|
|
55
|
+
bgColor: string;
|
|
56
|
+
_enabled: {
|
|
57
|
+
_hover: {
|
|
58
|
+
bgColor: string;
|
|
59
|
+
};
|
|
60
|
+
_focusVisible: {
|
|
61
|
+
outlineColor: string;
|
|
62
|
+
bgColor: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
_disabled: {
|
|
66
|
+
bgColor: string;
|
|
67
|
+
color: string;
|
|
68
|
+
outline: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
rectangle: {
|
|
72
|
+
borderRadius: "sd.system.dimension.radius.medium";
|
|
73
|
+
color: string;
|
|
74
|
+
outlineWidth: string;
|
|
75
|
+
outlineStyle: string;
|
|
76
|
+
outlineColor: string;
|
|
77
|
+
bgColor: string;
|
|
78
|
+
_enabled: {
|
|
79
|
+
_hover: {
|
|
80
|
+
bgColor: string;
|
|
81
|
+
};
|
|
82
|
+
_focusVisible: {
|
|
83
|
+
outlineColor: string;
|
|
84
|
+
bgColor: string;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
_disabled: {
|
|
88
|
+
bgColor: string;
|
|
89
|
+
color: string;
|
|
90
|
+
outline: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
size: {
|
|
95
|
+
medium: {
|
|
96
|
+
height: number;
|
|
97
|
+
px: "sd.system.dimension.spacing.extraLarge";
|
|
98
|
+
py: "sd.system.dimension.spacing.small";
|
|
99
|
+
textStyle: "sd.system.typography.label.large_compact";
|
|
100
|
+
expanded: {
|
|
101
|
+
textStyle: "sd.system.typography.label.large_expanded";
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
small: {
|
|
105
|
+
height: number;
|
|
106
|
+
px: "sd.system.dimension.spacing.small";
|
|
107
|
+
py: "sd.system.dimension.spacing.twoExtraSmall";
|
|
108
|
+
textStyle: "sd.system.typography.label.medium_compact";
|
|
109
|
+
expanded: {
|
|
110
|
+
textStyle: "sd.system.typography.label.medium_expanded";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
}>;
|
|
115
|
+
type ButtonLoadingProps = {
|
|
116
|
+
isLoading?: boolean;
|
|
117
|
+
};
|
|
118
|
+
export declare const Button: React.ForwardRefExoticComponent<(Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
119
|
+
styleType?: "filled" | "outlined" | "ghost" | "rectangle" | undefined;
|
|
120
|
+
size?: "medium" | "small" | undefined;
|
|
121
|
+
} & {
|
|
122
|
+
leftIcon?: React.ReactElement;
|
|
123
|
+
} & {
|
|
124
|
+
rightIcon?: never;
|
|
125
|
+
} & ButtonLoadingProps, "ref"> | Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
126
|
+
styleType?: "filled" | "outlined" | "ghost" | "rectangle" | undefined;
|
|
127
|
+
size?: "medium" | "small" | undefined;
|
|
128
|
+
} & {
|
|
129
|
+
leftIcon?: never;
|
|
130
|
+
} & {
|
|
131
|
+
rightIcon?: React.ReactElement;
|
|
132
|
+
} & ButtonLoadingProps, "ref">) & React.RefAttributes<HTMLButtonElement>>;
|
|
133
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { CheckboxRootProps } from '@ark-ui/react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/css';
|
|
3
|
+
export declare const checkboxIconCss: {
|
|
4
|
+
flexShrink: number;
|
|
5
|
+
cursor: string;
|
|
6
|
+
".group:has(:focus-visible) &": {
|
|
7
|
+
outlineStyle: string;
|
|
8
|
+
outlineOffset: string;
|
|
9
|
+
outlineWidth: string;
|
|
10
|
+
outlineColor: string;
|
|
11
|
+
borderRadius: string;
|
|
12
|
+
};
|
|
13
|
+
_disabled: {
|
|
14
|
+
_checked: {
|
|
15
|
+
"& svg": {
|
|
16
|
+
color: string;
|
|
17
|
+
};
|
|
18
|
+
"& .checkmark": {
|
|
19
|
+
color: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const checkboxCheckedIconCss: {
|
|
25
|
+
width: number;
|
|
26
|
+
height: number;
|
|
27
|
+
color: string;
|
|
28
|
+
"& .checkmark": {
|
|
29
|
+
color: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
export declare const checkboxUncheckedIconCss: {
|
|
33
|
+
width: number;
|
|
34
|
+
height: number;
|
|
35
|
+
color: string;
|
|
36
|
+
_disabled: {
|
|
37
|
+
color: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export declare const CheckBoxStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"root" | "itemControl" | "checkedIcon" | "uncheckedIcon" | "itemTextGroup" | "itemText" | "helperText", import('../../styled-system/types').SlotRecipeVariantRecord<"root" | "itemControl" | "checkedIcon" | "uncheckedIcon" | "itemTextGroup" | "itemText" | "helperText">>;
|
|
41
|
+
type CheckBoxItemProps = {
|
|
42
|
+
label: string;
|
|
43
|
+
helperText?: string;
|
|
44
|
+
};
|
|
45
|
+
export type CheckBoxProps = CheckboxRootProps & RecipeVariantProps<typeof CheckBoxStyle> & CheckBoxItemProps;
|
|
46
|
+
export declare const CheckBox: React.FC<CheckBoxProps>;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RadioGroupItemProps, CheckboxRootProps } from '@ark-ui/react';
|
|
2
|
+
export declare const ChoiceBoxStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"root" | "radioItem" | "radioCheckedIcon" | "radioUncheckedIcon" | "checkboxItem" | "checkboxCheckedIcon" | "checkboxUncheckedIcon", import('../../styled-system/types').SlotRecipeVariantRecord<"root" | "radioItem" | "radioCheckedIcon" | "radioUncheckedIcon" | "checkboxItem" | "checkboxCheckedIcon" | "checkboxUncheckedIcon">>;
|
|
3
|
+
type ChoiceBoxBaseProps = {
|
|
4
|
+
type: "radio" | "checkbox";
|
|
5
|
+
};
|
|
6
|
+
export type ChoiceBoxProps = ChoiceBoxBaseProps & RadioGroupItemProps & CheckboxRootProps;
|
|
7
|
+
export declare const ChoiceBox: React.FC<ChoiceBoxProps>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
type AreaValueProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: number;
|
|
5
|
+
unit: string;
|
|
6
|
+
};
|
|
7
|
+
type DashboardWidgetProps = {
|
|
8
|
+
values?: [AreaValueProps, AreaValueProps] | [AreaValueProps] | undefined;
|
|
9
|
+
linkTo?: string;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
} & ComponentProps<"div">;
|
|
12
|
+
export declare const DashboardWidget: React.FC<DashboardWidgetProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/css';
|
|
3
|
+
export declare const DividerStyle: import('../../styled-system/types').RecipeRuntimeFn<{
|
|
4
|
+
color: {
|
|
5
|
+
light: {
|
|
6
|
+
borderColor: "sd.reference.color.scale.gray.200";
|
|
7
|
+
};
|
|
8
|
+
normal: {
|
|
9
|
+
borderColor: "sd.reference.color.scale.gray.300";
|
|
10
|
+
};
|
|
11
|
+
dark: {
|
|
12
|
+
borderColor: "sd.system.color.component.outlineVariant";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
type: {
|
|
16
|
+
horizontal: {
|
|
17
|
+
width: "100%";
|
|
18
|
+
height: "sd.reference.dimension.scale.1";
|
|
19
|
+
borderBottomStyle: "solid";
|
|
20
|
+
borderWidth: "sd.system.dimension.border.medium";
|
|
21
|
+
};
|
|
22
|
+
vertical: {
|
|
23
|
+
borderLeftStyle: "solid";
|
|
24
|
+
width: "sd.reference.dimension.scale.1";
|
|
25
|
+
borderWidth: "sd.system.dimension.border.medium";
|
|
26
|
+
height: "100%";
|
|
27
|
+
minHeight: "10px";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
}>;
|
|
31
|
+
type DividerProps = ComponentProps<"hr"> & RecipeVariantProps<typeof DividerStyle>;
|
|
32
|
+
export declare const Divider: (props: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { DialogRootProps } from '@ark-ui/react';
|
|
2
|
+
import { RecipeVariantProps } from '../../styled-system/css';
|
|
3
|
+
declare const DrawerStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"content" | "backdrop" | "contentInner" | "closeTrigger", {
|
|
4
|
+
type: {
|
|
5
|
+
left: {
|
|
6
|
+
content: {
|
|
7
|
+
left: "0";
|
|
8
|
+
justifyContent: "flex-start";
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
full: {
|
|
12
|
+
content: {
|
|
13
|
+
left: "0";
|
|
14
|
+
width: "100%";
|
|
15
|
+
minWidth: "100%";
|
|
16
|
+
maxWidth: "100%";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
right: {
|
|
20
|
+
content: {
|
|
21
|
+
right: "0";
|
|
22
|
+
};
|
|
23
|
+
closeTrigger: {
|
|
24
|
+
justifyContent: "flex-end";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
}>;
|
|
29
|
+
type Props = {
|
|
30
|
+
isOpen: boolean;
|
|
31
|
+
children: React.ReactNode;
|
|
32
|
+
contentClassName?: string;
|
|
33
|
+
backdropClassName?: string;
|
|
34
|
+
onOpenChange: (e: {
|
|
35
|
+
open: boolean;
|
|
36
|
+
}) => void;
|
|
37
|
+
};
|
|
38
|
+
export type DrawerProps = Props & DialogRootProps & RecipeVariantProps<typeof DrawerStyle>;
|
|
39
|
+
export declare const Drawer: React.FC<DrawerProps>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { MenuRootProps } from '@ark-ui/react';
|
|
2
|
+
export declare const DropdownMenuStyle: import('../../styled-system/types').SlotRecipeRuntimeFn<"content" | "item" | "button" | "itemGroup" | "itemIcon" | "buttonIcon", import('../../styled-system/types').SlotRecipeVariantRecord<"content" | "item" | "button" | "itemGroup" | "itemIcon" | "buttonIcon">>;
|
|
3
|
+
export type MenuItemProps = {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactElement;
|
|
7
|
+
};
|
|
8
|
+
export type DropdownMenuProps = {
|
|
9
|
+
isIconMenu?: boolean;
|
|
10
|
+
title: string;
|
|
11
|
+
items: MenuItemProps[];
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
export declare const DropdownMenu: React.FC<DropdownMenuProps & MenuRootProps>;
|