@serendie/ui 1.0.1 → 2.0.0-dev.202507180004
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/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Chart/SerendieChartProps.d.ts +40 -0
- package/dist/components/Chart/SerendieChartProps.js +127 -0
- package/dist/components/Chart/SerendieChartTheme.d.ts +2 -0
- package/dist/components/Chart/SerendieChartTheme.js +150 -0
- package/dist/components/Chart/chartData.d.ts +29 -0
- package/dist/components/Chart/index.d.ts +3 -0
- package/dist/components/Chart/index.js +15 -0
- package/dist/components/CheckBox/CheckBox.js +36 -35
- package/dist/components/ChoiceBox/ChoiceBox.d.ts +1 -3
- package/dist/components/ChoiceBox/ChoiceBox.js +54 -67
- package/dist/components/DataTable/DataTableComponent.d.ts +23 -0
- package/dist/components/DataTable/DataTableComponent.js +52 -0
- package/dist/components/DataTable/createColumnHelper.d.ts +2 -0
- package/dist/components/DataTable/createColumnHelper.js +5 -0
- package/dist/components/DataTable/index.d.ts +19 -0
- package/dist/components/DataTable/index.js +28 -0
- package/dist/components/DataTable/table/BodyCell.d.ts +55 -0
- package/dist/components/DataTable/table/BodyCell.js +127 -0
- package/dist/components/DataTable/table/BodyCheckbox.d.ts +4 -0
- package/dist/components/DataTable/table/BodyCheckbox.js +22 -0
- package/dist/components/DataTable/table/HeaderCell.d.ts +8 -0
- package/dist/components/DataTable/table/HeaderCell.js +79 -0
- package/dist/components/DataTable/table/HeaderCheckbox.d.ts +2 -0
- package/dist/components/DataTable/table/HeaderCheckbox.js +26 -0
- package/dist/components/DataTable/table/HeaderRow.d.ts +11 -0
- package/dist/components/DataTable/table/HeaderRow.js +40 -0
- package/dist/components/DataTable/table/Root.d.ts +5 -0
- package/dist/components/DataTable/table/Root.js +34 -0
- package/dist/components/DataTable/table/Row.d.ts +5 -0
- package/dist/components/DataTable/table/Row.js +90 -0
- package/dist/components/DataTable/table/Tbody.d.ts +1 -0
- package/dist/components/DataTable/table/Tbody.js +7 -0
- package/dist/components/DataTable/table/Thead.d.ts +1 -0
- package/dist/components/DataTable/table/Thead.js +7 -0
- package/dist/components/DataTable/table/Tr.d.ts +1 -0
- package/dist/components/DataTable/table/Tr.js +27 -0
- package/dist/components/DataTable/table/index.d.ts +10 -0
- package/dist/components/DataTable/table/index.js +22 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +3 -3
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +4 -2
- package/dist/components/Search/Search.js +34 -33
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.js +47 -41
- package/dist/components/Tabs/TabItem.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +109 -92
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-content.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-indicator.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item-trigger.js +10 -12
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/accordion-item.js +16 -16
- package/dist/node_modules/@ark-ui/react/dist/components/accordion/use-accordion.js +13 -20
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/avatar-root.js +1 -5
- package/dist/node_modules/@ark-ui/react/dist/components/avatar/use-avatar.js +14 -18
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/checkbox/use-checkbox.js +22 -28
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/collapsible-content.js +7 -9
- package/dist/node_modules/@ark-ui/react/dist/components/collapsible/use-collapsible.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/collection/list-collection.js +5 -0
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-item-group.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-positioner.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-root.js +17 -18
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/combobox-trigger.js +10 -9
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox-item-context.js +5 -7
- package/dist/node_modules/@ark-ui/react/dist/components/combobox/use-combobox.js +21 -45
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-backdrop.js +10 -9
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-close-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-content.js +6 -5
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/dialog-description.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/dialog/use-dialog.js +13 -22
- package/dist/node_modules/@ark-ui/react/dist/components/factory.js +26 -24
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js +1 -3
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-item.js +15 -13
- package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +13 -14
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu-option-item-props-context.js +10 -0
- package/dist/node_modules/@ark-ui/react/dist/components/menu/use-menu.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-ellipsis.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-next-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-prev-trigger.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/pagination-root.js +5 -4
- package/dist/node_modules/@ark-ui/react/dist/components/pagination/use-pagination.js +13 -19
- package/dist/node_modules/@ark-ui/react/dist/components/portal/portal.js +25 -16
- package/dist/node_modules/@ark-ui/react/dist/components/presence/split-presence-props.js +3 -2
- package/dist/node_modules/@ark-ui/react/dist/components/presence/use-presence.js +18 -18
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-control.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item-text.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/radio-group-item.js +1 -5
- package/dist/node_modules/@ark-ui/react/dist/components/radio-group/use-radio-group.js +14 -22
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-content.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/select/select-root.js +11 -12
- package/dist/node_modules/@ark-ui/react/dist/components/select/use-select.js +20 -47
- package/dist/node_modules/@ark-ui/react/dist/components/switch/switch-hidden-input.js +4 -6
- package/dist/node_modules/@ark-ui/react/dist/components/switch/use-switch.js +20 -26
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/tabs-root.js +9 -8
- package/dist/node_modules/@ark-ui/react/dist/components/tabs/use-tabs.js +14 -21
- package/dist/node_modules/@ark-ui/react/dist/components/toast/create-toaster.js +3 -7
- package/dist/node_modules/@ark-ui/react/dist/components/toast/toaster.js +28 -15
- package/dist/node_modules/@ark-ui/react/dist/utils/compose-refs.js +13 -7
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +92 -90
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +230 -216
- package/dist/node_modules/@tanstack/react-table/build/lib/index.js +100 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1741 -0
- package/dist/node_modules/@zag-js/accordion/dist/index.js +210 -227
- package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +49 -12
- package/dist/node_modules/@zag-js/avatar/dist/index.js +119 -134
- package/dist/node_modules/@zag-js/checkbox/dist/index.js +196 -197
- package/dist/node_modules/@zag-js/collapsible/dist/index.js +250 -198
- package/dist/node_modules/@zag-js/collection/dist/index.js +172 -179
- package/dist/node_modules/@zag-js/combobox/dist/index.js +1176 -1082
- package/dist/node_modules/@zag-js/core/dist/index.js +77 -496
- package/dist/node_modules/@zag-js/dialog/dist/index.js +243 -270
- package/dist/node_modules/@zag-js/dismissable/dist/index.js +62 -60
- package/dist/node_modules/@zag-js/dom-query/dist/index.js +462 -255
- package/dist/node_modules/@zag-js/focus-trap/dist/index.js +307 -0
- package/dist/node_modules/@zag-js/focus-visible/dist/index.js +48 -47
- package/dist/node_modules/@zag-js/interact-outside/dist/index.js +112 -80
- package/dist/node_modules/@zag-js/menu/dist/index.js +998 -884
- package/dist/node_modules/@zag-js/pagination/dist/index.js +207 -213
- package/dist/node_modules/@zag-js/popper/dist/index.js +130 -129
- package/dist/node_modules/@zag-js/presence/dist/index.js +139 -122
- package/dist/node_modules/@zag-js/radio-group/dist/index.js +297 -302
- package/dist/node_modules/@zag-js/react/dist/index.js +255 -103
- package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +18 -31
- package/dist/node_modules/@zag-js/select/dist/index.js +889 -885
- package/dist/node_modules/@zag-js/switch/dist/index.js +199 -191
- package/dist/node_modules/@zag-js/tabs/dist/index.js +383 -386
- package/dist/node_modules/@zag-js/toast/dist/index.js +646 -633
- package/dist/node_modules/@zag-js/types/dist/index.js +6 -6
- package/dist/node_modules/@zag-js/utils/dist/index.js +112 -99
- package/dist/styled-system/tokens/index.js +4758 -0
- package/dist/styles.css +1 -1
- package/dist/tokens/getToken.js +4 -4
- package/dist/utils/colors.d.ts +1 -0
- package/dist/utils/colors.js +12 -0
- package/package.json +10 -4
- package/dist/node_modules/@ark-ui/react/dist/utils/use-is-server.js +0 -10
- package/dist/node_modules/@zag-js/dom-event/dist/index.js +0 -130
- package/dist/node_modules/@zag-js/element-rect/dist/index.js +0 -32
- package/dist/node_modules/@zag-js/form-utils/dist/index.js +0 -51
- package/dist/node_modules/@zag-js/store/dist/index.js +0 -170
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -52
- package/dist/node_modules/focus-trap/dist/focus-trap.esm.js +0 -431
- package/dist/node_modules/klona/full/index.js +0 -21
- package/dist/node_modules/proxy-compare/dist/index.js +0 -109
- package/dist/node_modules/tabbable/dist/index.esm.js +0 -202
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AccordionItemProps } from '@ark-ui/react';
|
|
2
2
|
import { RecipeVariantProps } from '../../../styled-system/types';
|
|
3
|
-
declare const AccordionStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"
|
|
3
|
+
declare const AccordionStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"title" | "description" | "item" | "icon" | "itemIndicator", {
|
|
4
4
|
isLeftIcon: {
|
|
5
5
|
true: {
|
|
6
6
|
item: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
3
|
-
declare const BannerStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"container" | "title" | "
|
|
3
|
+
declare const BannerStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"container" | "title" | "description" | "icon", {
|
|
4
4
|
type: {
|
|
5
5
|
information: {
|
|
6
6
|
container: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentProps } from 'react';
|
|
2
2
|
import { RecipeVariantProps } from '../../../styled-system/css';
|
|
3
|
-
export declare const BottomNavigationItemStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"
|
|
3
|
+
export declare const BottomNavigationItemStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"label" | "root" | "icon" | "iconGroup" | "badge", {
|
|
4
4
|
isActive: {
|
|
5
5
|
true: {
|
|
6
6
|
label: {
|
|
@@ -117,14 +117,14 @@ type ButtonLoadingProps = {
|
|
|
117
117
|
};
|
|
118
118
|
export declare const Button: React.ForwardRefExoticComponent<(Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
119
119
|
styleType?: "filled" | "outlined" | "ghost" | "rectangle" | undefined;
|
|
120
|
-
size?: "
|
|
120
|
+
size?: "medium" | "small" | undefined;
|
|
121
121
|
} & {
|
|
122
122
|
leftIcon?: React.ReactElement;
|
|
123
123
|
} & {
|
|
124
124
|
rightIcon?: never;
|
|
125
125
|
} & ButtonLoadingProps, "ref"> | Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
126
126
|
styleType?: "filled" | "outlined" | "ghost" | "rectangle" | undefined;
|
|
127
|
-
size?: "
|
|
127
|
+
size?: "medium" | "small" | undefined;
|
|
128
128
|
} & {
|
|
129
129
|
leftIcon?: never;
|
|
130
130
|
} & {
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { BarSvgProps, BarDatum } from '@nivo/bar';
|
|
2
|
+
import { LineSeries, LineSvgProps } from '@nivo/line';
|
|
3
|
+
import { PieSvgProps } from '@nivo/pie';
|
|
4
|
+
export type ChartColorCategory = "primary" | "positive" | "negative" | "notice" | "multi";
|
|
5
|
+
export declare const getChartColors: (category: ChartColorCategory, count?: number) => string[];
|
|
6
|
+
export declare const getChartColor: (category: ChartColorCategory, index?: number) => string;
|
|
7
|
+
export declare const defaultChartMargin: {
|
|
8
|
+
top: number;
|
|
9
|
+
right: number;
|
|
10
|
+
bottom: number;
|
|
11
|
+
left: number;
|
|
12
|
+
};
|
|
13
|
+
export declare const compactChartMargin: {
|
|
14
|
+
top: number;
|
|
15
|
+
right: number;
|
|
16
|
+
bottom: number;
|
|
17
|
+
left: number;
|
|
18
|
+
};
|
|
19
|
+
export declare const legendChartMargin: {
|
|
20
|
+
top: number;
|
|
21
|
+
right: number;
|
|
22
|
+
bottom: number;
|
|
23
|
+
left: number;
|
|
24
|
+
};
|
|
25
|
+
export declare const spaciousChartMargin: {
|
|
26
|
+
top: number;
|
|
27
|
+
right: number;
|
|
28
|
+
bottom: number;
|
|
29
|
+
left: number;
|
|
30
|
+
};
|
|
31
|
+
type ChartPropsResult = {
|
|
32
|
+
bar: Partial<BarSvgProps<BarDatum>>;
|
|
33
|
+
line: Partial<LineSvgProps<LineSeries>>;
|
|
34
|
+
pie: Partial<PieSvgProps<Record<string, unknown>>>;
|
|
35
|
+
};
|
|
36
|
+
export declare const useChartProps: <T extends keyof ChartPropsResult>(chartType: T, colorCategory?: ChartColorCategory) => ChartPropsResult[T];
|
|
37
|
+
export declare const useBarChartProps: (c?: ChartColorCategory) => Partial<BarSvgProps<BarDatum>>;
|
|
38
|
+
export declare const useLineChartProps: (c?: ChartColorCategory) => Partial<LineSvgProps<LineSeries>>;
|
|
39
|
+
export declare const usePieChartProps: (c?: ChartColorCategory) => Partial<PieSvgProps<Record<string, unknown>>>;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { token as r } from "../../styled-system/tokens/index.js";
|
|
2
|
+
import n from "../../node_modules/@serendie/design-token/dist/tokens.js";
|
|
3
|
+
import { SerendieChartTheme as p } from "./SerendieChartTheme.js";
|
|
4
|
+
import { getContrastTextColor as i } from "../../utils/colors.js";
|
|
5
|
+
const c = (s, t) => {
|
|
6
|
+
const a = {
|
|
7
|
+
primary: [
|
|
8
|
+
r("colors.sd.system.color.chart.mark.primary.01"),
|
|
9
|
+
r("colors.sd.system.color.chart.mark.primary.02"),
|
|
10
|
+
r("colors.sd.system.color.chart.mark.primary.03"),
|
|
11
|
+
r("colors.sd.system.color.chart.mark.primary.04"),
|
|
12
|
+
r("colors.sd.system.color.chart.mark.primary.05"),
|
|
13
|
+
r("colors.sd.system.color.chart.mark.primary.06")
|
|
14
|
+
],
|
|
15
|
+
positive: [
|
|
16
|
+
r("colors.sd.system.color.chart.mark.positive.01"),
|
|
17
|
+
r("colors.sd.system.color.chart.mark.positive.02"),
|
|
18
|
+
r("colors.sd.system.color.chart.mark.positive.03"),
|
|
19
|
+
r("colors.sd.system.color.chart.mark.positive.04"),
|
|
20
|
+
r("colors.sd.system.color.chart.mark.positive.05"),
|
|
21
|
+
r("colors.sd.system.color.chart.mark.positive.06")
|
|
22
|
+
],
|
|
23
|
+
negative: [
|
|
24
|
+
r("colors.sd.system.color.chart.mark.negative.01"),
|
|
25
|
+
r("colors.sd.system.color.chart.mark.negative.02"),
|
|
26
|
+
r("colors.sd.system.color.chart.mark.negative.03"),
|
|
27
|
+
r("colors.sd.system.color.chart.mark.negative.04"),
|
|
28
|
+
r("colors.sd.system.color.chart.mark.negative.05"),
|
|
29
|
+
r("colors.sd.system.color.chart.mark.negative.06")
|
|
30
|
+
],
|
|
31
|
+
notice: [
|
|
32
|
+
r("colors.sd.system.color.chart.mark.notice.01"),
|
|
33
|
+
r("colors.sd.system.color.chart.mark.notice.02"),
|
|
34
|
+
r("colors.sd.system.color.chart.mark.notice.03"),
|
|
35
|
+
r("colors.sd.system.color.chart.mark.notice.04"),
|
|
36
|
+
r("colors.sd.system.color.chart.mark.notice.05"),
|
|
37
|
+
r("colors.sd.system.color.chart.mark.notice.06")
|
|
38
|
+
],
|
|
39
|
+
multi: [
|
|
40
|
+
r("colors.sd.system.color.chart.mark.multi.01"),
|
|
41
|
+
r("colors.sd.system.color.chart.mark.multi.02"),
|
|
42
|
+
r("colors.sd.system.color.chart.mark.multi.03"),
|
|
43
|
+
r("colors.sd.system.color.chart.mark.multi.04"),
|
|
44
|
+
r("colors.sd.system.color.chart.mark.multi.05"),
|
|
45
|
+
r("colors.sd.system.color.chart.mark.multi.06"),
|
|
46
|
+
r("colors.sd.system.color.chart.mark.multi.07"),
|
|
47
|
+
r("colors.sd.system.color.chart.mark.multi.08"),
|
|
48
|
+
r("colors.sd.system.color.chart.mark.multi.09"),
|
|
49
|
+
r("colors.sd.system.color.chart.mark.multi.10")
|
|
50
|
+
]
|
|
51
|
+
}[s];
|
|
52
|
+
return t ? a.slice(0, t) : a;
|
|
53
|
+
}, C = (s, t = 0) => c(s)[t] || c(s)[0], o = n.sd.system.dimension.spacing, h = {
|
|
54
|
+
top: parseInt(o.large, 10),
|
|
55
|
+
right: parseInt(o.large, 10),
|
|
56
|
+
bottom: parseInt(o.fourExtraLarge, 10),
|
|
57
|
+
left: parseInt(o.fiveExtraLarge, 10)
|
|
58
|
+
}, L = {
|
|
59
|
+
top: parseInt(o.small, 10),
|
|
60
|
+
right: parseInt(o.small, 10),
|
|
61
|
+
bottom: parseInt(o.twoExtraLarge, 10),
|
|
62
|
+
left: parseInt(o.threeExtraLarge, 10)
|
|
63
|
+
}, b = {
|
|
64
|
+
top: parseInt(o.large, 10),
|
|
65
|
+
right: parseInt(o.sixExtraLarge, 10),
|
|
66
|
+
bottom: parseInt(o.fourExtraLarge, 10),
|
|
67
|
+
left: parseInt(o.fiveExtraLarge, 10)
|
|
68
|
+
}, f = {
|
|
69
|
+
top: parseInt(o.extraLarge, 10),
|
|
70
|
+
right: parseInt(o.extraLarge, 10),
|
|
71
|
+
bottom: parseInt(o.fiveExtraLarge, 10),
|
|
72
|
+
left: parseInt(o.sixExtraLarge, 10)
|
|
73
|
+
}, l = (s, t = "primary") => {
|
|
74
|
+
const m = c(t), a = {
|
|
75
|
+
theme: p,
|
|
76
|
+
colors: m,
|
|
77
|
+
margin: h
|
|
78
|
+
};
|
|
79
|
+
return {
|
|
80
|
+
bar: {
|
|
81
|
+
...a,
|
|
82
|
+
padding: 0.3,
|
|
83
|
+
innerPadding: 1,
|
|
84
|
+
borderRadius: 0,
|
|
85
|
+
enableLabel: !0,
|
|
86
|
+
labelTextColor: (e) => i(e.color)
|
|
87
|
+
},
|
|
88
|
+
line: {
|
|
89
|
+
...a,
|
|
90
|
+
enablePoints: !0,
|
|
91
|
+
pointSize: 6,
|
|
92
|
+
pointBorderWidth: 2,
|
|
93
|
+
pointBorderColor: { from: "serieColor" },
|
|
94
|
+
enableGridX: !0,
|
|
95
|
+
enableGridY: !0
|
|
96
|
+
},
|
|
97
|
+
pie: {
|
|
98
|
+
...a,
|
|
99
|
+
innerRadius: 0.5,
|
|
100
|
+
padAngle: 0.7,
|
|
101
|
+
cornerRadius: 0,
|
|
102
|
+
activeOuterRadiusOffset: 8,
|
|
103
|
+
enableArcLabels: !0,
|
|
104
|
+
enableArcLinkLabels: !0,
|
|
105
|
+
arcLabelsTextColor: (e) => i(e.color),
|
|
106
|
+
arcLinkLabelsColor: r(
|
|
107
|
+
"colors.sd.system.color.chart.component.onChartSurface"
|
|
108
|
+
),
|
|
109
|
+
arcLinkLabelsThickness: 2,
|
|
110
|
+
arcLinkLabelsTextColor: r(
|
|
111
|
+
"colors.sd.system.color.chart.component.onChartSurface"
|
|
112
|
+
)
|
|
113
|
+
}
|
|
114
|
+
}[s];
|
|
115
|
+
}, v = (s = "primary") => l("bar", s), x = (s = "primary") => l("line", s), I = (s = "primary") => l("pie", s);
|
|
116
|
+
export {
|
|
117
|
+
L as compactChartMargin,
|
|
118
|
+
h as defaultChartMargin,
|
|
119
|
+
C as getChartColor,
|
|
120
|
+
c as getChartColors,
|
|
121
|
+
b as legendChartMargin,
|
|
122
|
+
f as spaciousChartMargin,
|
|
123
|
+
v as useBarChartProps,
|
|
124
|
+
l as useChartProps,
|
|
125
|
+
x as useLineChartProps,
|
|
126
|
+
I as usePieChartProps
|
|
127
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { token as t } from "../../styled-system/tokens/index.js";
|
|
2
|
+
import r from "../../node_modules/@serendie/design-token/dist/tokens.js";
|
|
3
|
+
const o = r.sd.reference.typography, e = r.sd.system.dimension.spacing, n = {
|
|
4
|
+
background: t("colors.sd.system.color.chart.component.chartSurface"),
|
|
5
|
+
// 軸関連のスタイル
|
|
6
|
+
axis: {
|
|
7
|
+
domain: {
|
|
8
|
+
line: {
|
|
9
|
+
stroke: t("colors.sd.system.color.chart.component.scalemark"),
|
|
10
|
+
strokeWidth: 1
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
ticks: {
|
|
14
|
+
line: {
|
|
15
|
+
stroke: "transparent",
|
|
16
|
+
// 目盛り線を非表示
|
|
17
|
+
strokeWidth: 0
|
|
18
|
+
},
|
|
19
|
+
text: {
|
|
20
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
21
|
+
fontSize: parseInt(o.scale.expanded.extraSmall, 10),
|
|
22
|
+
// 13px
|
|
23
|
+
fontFamily: o.fontFamily.primary
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
legend: {
|
|
27
|
+
text: {
|
|
28
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
29
|
+
fontSize: parseInt(o.scale.expanded.small, 10),
|
|
30
|
+
// 14px
|
|
31
|
+
fontWeight: o.fontWeight.regular,
|
|
32
|
+
// 400
|
|
33
|
+
fontFamily: o.fontFamily.primary
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
// グリッド線のスタイル
|
|
38
|
+
grid: {
|
|
39
|
+
line: {
|
|
40
|
+
stroke: t("colors.sd.system.color.chart.component.scalemark"),
|
|
41
|
+
strokeWidth: 1
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
// 凡例のスタイル
|
|
45
|
+
legends: {
|
|
46
|
+
text: {
|
|
47
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
48
|
+
fontSize: parseInt(o.scale.expanded.extraSmall, 10),
|
|
49
|
+
// 13px
|
|
50
|
+
fontFamily: o.fontFamily.primary
|
|
51
|
+
},
|
|
52
|
+
ticks: {
|
|
53
|
+
line: {
|
|
54
|
+
strokeWidth: 1
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
title: {
|
|
58
|
+
text: {
|
|
59
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
60
|
+
fontSize: parseInt(o.scale.expanded.small, 10),
|
|
61
|
+
// 14px
|
|
62
|
+
fontWeight: o.fontWeight.regular,
|
|
63
|
+
// 500
|
|
64
|
+
fontFamily: o.fontFamily.primary
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
// ラベルのスタイル(バー内のテキスト)
|
|
69
|
+
labels: {
|
|
70
|
+
text: {
|
|
71
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
72
|
+
fontSize: parseInt(o.scale.expanded.extraSmall, 10),
|
|
73
|
+
// 13px
|
|
74
|
+
fontWeight: o.fontWeight.regular,
|
|
75
|
+
// 500
|
|
76
|
+
fontFamily: o.fontFamily.primary
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
// ツールチップのスタイル
|
|
80
|
+
tooltip: {
|
|
81
|
+
container: {
|
|
82
|
+
background: t("colors.sd.system.color.chart.component.chartSurface"),
|
|
83
|
+
color: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
84
|
+
fontSize: parseInt(o.scale.expanded.extraSmall, 10),
|
|
85
|
+
// 13px
|
|
86
|
+
fontFamily: o.fontFamily.primary,
|
|
87
|
+
borderRadius: 6,
|
|
88
|
+
boxShadow: "0 3px 14px rgba(0, 0, 0, 0.2)",
|
|
89
|
+
border: `1px solid ${t("colors.sd.system.color.chart.component.scalemark")}`,
|
|
90
|
+
padding: `${parseInt(e.small, 10)}px ${parseInt(e.medium, 10)}px`
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
// 注釈のスタイル
|
|
94
|
+
annotations: {
|
|
95
|
+
text: {
|
|
96
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
97
|
+
fontSize: parseInt(o.scale.expanded.extraSmall, 10),
|
|
98
|
+
// 13px
|
|
99
|
+
fontFamily: o.fontFamily.primary
|
|
100
|
+
},
|
|
101
|
+
link: {
|
|
102
|
+
stroke: t("colors.sd.system.color.chart.component.scalemark"),
|
|
103
|
+
strokeWidth: 1,
|
|
104
|
+
strokeOpacity: 0.3
|
|
105
|
+
},
|
|
106
|
+
outline: {
|
|
107
|
+
stroke: t("colors.sd.system.color.chart.component.scalemark"),
|
|
108
|
+
strokeWidth: 2,
|
|
109
|
+
strokeOpacity: 0.3,
|
|
110
|
+
fill: "transparent"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
// ドットのスタイル(折れ線グラフなど)
|
|
114
|
+
dots: {
|
|
115
|
+
text: {
|
|
116
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
117
|
+
fontSize: parseInt(o.scale.expanded.extraSmall, 10),
|
|
118
|
+
// 13px
|
|
119
|
+
fontFamily: o.fontFamily.primary
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
// マーカーのスタイル(しきい値線など)
|
|
123
|
+
markers: {
|
|
124
|
+
lineColor: t("colors.sd.system.color.chart.component.threshold"),
|
|
125
|
+
lineStrokeWidth: 1,
|
|
126
|
+
text: {
|
|
127
|
+
fontFamily: o.fontFamily.primary,
|
|
128
|
+
fontSize: parseInt(o.scale.expanded.extraSmall, 10),
|
|
129
|
+
// 13px
|
|
130
|
+
fill: t("colors.sd.system.color.chart.component.onChartSurface"),
|
|
131
|
+
outlineWidth: 2,
|
|
132
|
+
outlineColor: t(
|
|
133
|
+
"colors.sd.system.color.chart.component.chartSurface"
|
|
134
|
+
),
|
|
135
|
+
outlineOpacity: 1
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
// クロスヘアのスタイル
|
|
139
|
+
crosshair: {
|
|
140
|
+
line: {
|
|
141
|
+
stroke: t("colors.sd.system.color.chart.component.scalemark"),
|
|
142
|
+
strokeWidth: 1,
|
|
143
|
+
strokeOpacity: 0.5,
|
|
144
|
+
strokeDasharray: "3 3"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
export {
|
|
149
|
+
n as SerendieChartTheme
|
|
150
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const barData: {
|
|
2
|
+
month: string;
|
|
3
|
+
value: number;
|
|
4
|
+
}[];
|
|
5
|
+
export declare const multiSeriesData: {
|
|
6
|
+
month: string;
|
|
7
|
+
sales: number;
|
|
8
|
+
profit: number;
|
|
9
|
+
cost: number;
|
|
10
|
+
}[];
|
|
11
|
+
export declare const lineData: {
|
|
12
|
+
id: string;
|
|
13
|
+
data: {
|
|
14
|
+
x: string;
|
|
15
|
+
y: number;
|
|
16
|
+
}[];
|
|
17
|
+
}[];
|
|
18
|
+
export declare const pieData: {
|
|
19
|
+
id: string;
|
|
20
|
+
value: number;
|
|
21
|
+
}[];
|
|
22
|
+
export declare const stackedData: {
|
|
23
|
+
category: string;
|
|
24
|
+
segment1: number;
|
|
25
|
+
segment2: number;
|
|
26
|
+
segment3: number;
|
|
27
|
+
segment4: number;
|
|
28
|
+
segment5: number;
|
|
29
|
+
}[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { SerendieChartTheme } from './SerendieChartTheme';
|
|
2
|
+
export type { ChartColorCategory } from './SerendieChartProps';
|
|
3
|
+
export { useChartProps, useBarChartProps, useLineChartProps, usePieChartProps, getChartColors, getChartColor, defaultChartMargin, compactChartMargin, legendChartMargin, spaciousChartMargin, } from './SerendieChartProps';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SerendieChartTheme as e } from "./SerendieChartTheme.js";
|
|
2
|
+
import { compactChartMargin as o, defaultChartMargin as C, getChartColor as h, getChartColors as s, legendChartMargin as i, spaciousChartMargin as p, useBarChartProps as g, useChartProps as n, useLineChartProps as u, usePieChartProps as P } from "./SerendieChartProps.js";
|
|
3
|
+
export {
|
|
4
|
+
e as SerendieChartTheme,
|
|
5
|
+
o as compactChartMargin,
|
|
6
|
+
C as defaultChartMargin,
|
|
7
|
+
h as getChartColor,
|
|
8
|
+
s as getChartColors,
|
|
9
|
+
i as legendChartMargin,
|
|
10
|
+
p as spaciousChartMargin,
|
|
11
|
+
g as useBarChartProps,
|
|
12
|
+
n as useChartProps,
|
|
13
|
+
u as useLineChartProps,
|
|
14
|
+
P as usePieChartProps
|
|
15
|
+
};
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { css as x } from "../../styled-system/css/css.js";
|
|
3
|
-
import { cx as
|
|
3
|
+
import { cx as c } from "../../styled-system/css/cx.js";
|
|
4
4
|
import "../../styled-system/helpers.js";
|
|
5
5
|
import { sva as u } from "../../styled-system/css/sva.js";
|
|
6
6
|
import k from "../../assets/checkboxChecked.svg.js";
|
|
7
7
|
import b from "../../assets/checkboxUnchecked.svg.js";
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
|
|
8
|
+
import g from "../../assets/checkboxIndeterminate.svg.js";
|
|
9
|
+
import { CheckboxRoot as f } from "../../node_modules/@ark-ui/react/dist/components/checkbox/checkbox-root.js";
|
|
10
|
+
import { CheckboxContext as C } from "../../node_modules/@ark-ui/react/dist/components/checkbox/checkbox-context.js";
|
|
11
|
+
import { CheckboxControl as S } from "../../node_modules/@ark-ui/react/dist/components/checkbox/checkbox-control.js";
|
|
12
|
+
import { CheckboxLabel as i } from "../../node_modules/@ark-ui/react/dist/components/checkbox/checkbox-label.js";
|
|
13
|
+
import { CheckboxHiddenInput as I } from "../../node_modules/@ark-ui/react/dist/components/checkbox/checkbox-hidden-input.js";
|
|
14
|
+
const _ = {
|
|
14
15
|
flexShrink: 0,
|
|
15
16
|
cursor: "pointer",
|
|
16
17
|
".group:has(:focus-visible) &": {
|
|
@@ -30,21 +31,21 @@ const I = {
|
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
}
|
|
33
|
-
},
|
|
34
|
+
}, v = {
|
|
34
35
|
width: 24,
|
|
35
36
|
height: 24,
|
|
36
37
|
color: "sd.system.color.impression.primary",
|
|
37
38
|
"& .checkmark": {
|
|
38
39
|
color: "sd.system.color.impression.onPrimaryContainer"
|
|
39
40
|
}
|
|
40
|
-
},
|
|
41
|
+
}, N = {
|
|
41
42
|
width: 24,
|
|
42
43
|
height: 24,
|
|
43
44
|
color: "sd.system.color.component.outline",
|
|
44
45
|
_disabled: {
|
|
45
46
|
color: "color-mix(in srgb, {colors.sd.system.color.component.outline}, {colors.sd.system.color.interaction.hoveredOnPrimary});"
|
|
46
47
|
}
|
|
47
|
-
},
|
|
48
|
+
}, n = u({
|
|
48
49
|
slots: [
|
|
49
50
|
"root",
|
|
50
51
|
"itemControl",
|
|
@@ -63,9 +64,9 @@ const I = {
|
|
|
63
64
|
paddingX: "sd.system.dimension.spacing.medium",
|
|
64
65
|
cursor: "pointer"
|
|
65
66
|
},
|
|
66
|
-
itemControl:
|
|
67
|
-
checkedIcon:
|
|
68
|
-
uncheckedIcon:
|
|
67
|
+
itemControl: _,
|
|
68
|
+
checkedIcon: v,
|
|
69
|
+
uncheckedIcon: N,
|
|
69
70
|
itemTextGroup: {
|
|
70
71
|
display: "flex",
|
|
71
72
|
flexFlow: "column"
|
|
@@ -92,38 +93,38 @@ const I = {
|
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
}),
|
|
96
|
-
value:
|
|
97
|
-
label:
|
|
96
|
+
}), L = ({
|
|
97
|
+
value: m,
|
|
98
|
+
label: l,
|
|
98
99
|
helperText: s,
|
|
99
|
-
className:
|
|
100
|
-
...
|
|
100
|
+
className: d,
|
|
101
|
+
...a
|
|
101
102
|
}) => {
|
|
102
|
-
const [
|
|
103
|
+
const [p, y] = n.splitVariantProps(a), o = n(p), h = c(
|
|
103
104
|
o.root,
|
|
104
105
|
s && x({ alignItems: "flex-start" })
|
|
105
106
|
);
|
|
106
|
-
return /* @__PURE__ */
|
|
107
|
-
|
|
107
|
+
return /* @__PURE__ */ t(
|
|
108
|
+
f,
|
|
108
109
|
{
|
|
109
|
-
value:
|
|
110
|
-
className:
|
|
111
|
-
...
|
|
110
|
+
value: m,
|
|
111
|
+
className: c("group", h, d),
|
|
112
|
+
...y,
|
|
112
113
|
children: [
|
|
113
|
-
/* @__PURE__ */ e(
|
|
114
|
-
/* @__PURE__ */
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
s && /* @__PURE__ */ e(
|
|
114
|
+
/* @__PURE__ */ e(C, { children: (r) => /* @__PURE__ */ e(S, { className: o.itemControl, children: r.checked === !0 ? /* @__PURE__ */ e(k, { className: o.checkedIcon }) : r.indeterminate === !0 ? /* @__PURE__ */ e(g, { className: o.checkedIcon }) : /* @__PURE__ */ e(b, { className: o.uncheckedIcon }) }) }),
|
|
115
|
+
/* @__PURE__ */ t("div", { className: o.itemTextGroup, children: [
|
|
116
|
+
/* @__PURE__ */ e(i, { className: o.itemText, children: l }),
|
|
117
|
+
s && /* @__PURE__ */ e(i, { className: o.helperText, children: s })
|
|
117
118
|
] }),
|
|
118
|
-
/* @__PURE__ */ e(
|
|
119
|
+
/* @__PURE__ */ e(I, {})
|
|
119
120
|
]
|
|
120
121
|
}
|
|
121
122
|
);
|
|
122
123
|
};
|
|
123
124
|
export {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
125
|
+
L as CheckBox,
|
|
126
|
+
n as CheckBoxStyle,
|
|
127
|
+
v as checkboxCheckedIconCss,
|
|
128
|
+
_ as checkboxIconCss,
|
|
129
|
+
N as checkboxUncheckedIconCss
|
|
129
130
|
};
|
|
@@ -3,8 +3,6 @@ export declare const ChoiceBoxStyle: import('../../../styled-system/types').Slot
|
|
|
3
3
|
type ChoiceBoxBaseProps = {
|
|
4
4
|
type: "radio" | "checkbox";
|
|
5
5
|
};
|
|
6
|
-
export type ChoiceBoxProps = ChoiceBoxBaseProps & RadioGroupItemProps & CheckboxRootProps
|
|
7
|
-
indeterminate?: boolean;
|
|
8
|
-
};
|
|
6
|
+
export type ChoiceBoxProps = ChoiceBoxBaseProps & RadioGroupItemProps & CheckboxRootProps;
|
|
9
7
|
export declare const ChoiceBox: React.FC<ChoiceBoxProps>;
|
|
10
8
|
export {};
|