@serendie/ui 3.5.1 → 3.6.0-dev.202607070300

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.
Files changed (63) hide show
  1. package/dist/client.js +128 -124
  2. package/dist/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  3. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +84 -0
  4. package/dist/components/Breadcrumbs/Breadcrumbs.js +268 -0
  5. package/dist/components/Breadcrumbs/index.d.ts +2 -0
  6. package/dist/components/Breadcrumbs/index.js +6 -0
  7. package/dist/components/DataTable/DataTable.sampleData.d.ts +12 -0
  8. package/dist/components/DataTable/DataTable.sampleData.test.d.ts +1 -0
  9. package/dist/components/DataTable/DataTableComponent.d.ts +1 -1
  10. package/dist/components/DataTable/DataTableComponent.js +30 -26
  11. package/dist/components/DataTable/table/BodyCheckbox.d.ts +1 -1
  12. package/dist/components/DataTable/table/HeaderCell.js +18 -16
  13. package/dist/components/DataTable/table/HeaderRow.js +21 -20
  14. package/dist/components/DataTable/table/Row.js +22 -14
  15. package/dist/components/Divider/Divider.d.ts +1 -1
  16. package/dist/components/List/List.d.ts +1 -1
  17. package/dist/components/List/ListItem.d.ts +42 -12
  18. package/dist/components/List/ListItem.js +122 -75
  19. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +1 -0
  20. package/dist/components/ProgressIndicator/AnimatedArc.js +31 -34
  21. package/dist/components/ProgressIndicator/AnimatedArc.test.d.ts +1 -0
  22. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
  23. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +2 -1
  24. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +49 -36
  25. package/dist/components/ProgressIndicator/animatedArcProps.d.ts +11 -0
  26. package/dist/components/ProgressIndicator/animatedArcProps.js +19 -0
  27. package/dist/components/Tabs/TabItem.d.ts +1 -1
  28. package/dist/components/Tabs/Tabs.d.ts +1 -1
  29. package/dist/i18n/dictionary.d.ts +4 -0
  30. package/dist/i18n/dictionary.js +8 -4
  31. package/dist/i18n/provider.d.ts +1 -1
  32. package/dist/index.d.ts +1 -0
  33. package/dist/index.js +128 -124
  34. package/dist/node_modules/@zag-js/accordion/dist/accordion.connect.js +49 -50
  35. package/dist/node_modules/@zag-js/combobox/dist/combobox.connect.js +70 -68
  36. package/dist/node_modules/@zag-js/combobox/dist/combobox.machine.js +1 -1
  37. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.connect.js +322 -308
  38. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.machine.js +93 -79
  39. package/dist/node_modules/@zag-js/date-picker/dist/date-picker.utils.js +35 -43
  40. package/dist/node_modules/@zag-js/date-utils/dist/locale.js +12 -0
  41. package/dist/node_modules/@zag-js/dialog/dist/dialog.dom.js +36 -35
  42. package/dist/node_modules/@zag-js/dialog/dist/dialog.machine.js +27 -37
  43. package/dist/node_modules/@zag-js/dismissable/dist/dismissable-layer.js +56 -41
  44. package/dist/node_modules/@zag-js/dismissable/dist/layer-stack.js +51 -31
  45. package/dist/node_modules/@zag-js/dismissable/dist/pointer-event-outside.js +46 -25
  46. package/dist/node_modules/@zag-js/dom-query/dist/controller.js +5 -5
  47. package/dist/node_modules/@zag-js/dom-query/dist/overflow.js +13 -21
  48. package/dist/node_modules/@zag-js/dom-query/dist/scroll.js +11 -0
  49. package/dist/node_modules/@zag-js/live-region/dist/index.js +29 -19
  50. package/dist/node_modules/@zag-js/menu/dist/menu.connect.js +138 -135
  51. package/dist/node_modules/@zag-js/menu/dist/menu.dom.js +24 -24
  52. package/dist/node_modules/@zag-js/menu/dist/menu.machine.js +1 -1
  53. package/dist/node_modules/@zag-js/popper/dist/get-placement.js +82 -71
  54. package/dist/node_modules/@zag-js/react/dist/machine.js +105 -96
  55. package/dist/node_modules/@zag-js/remove-scroll/dist/index.js +34 -26
  56. package/dist/node_modules/@zag-js/select/dist/select.connect.js +104 -101
  57. package/dist/node_modules/@zag-js/select/dist/select.machine.js +1 -1
  58. package/dist/node_modules/@zag-js/tabs/dist/tabs.machine.js +63 -60
  59. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.connect.js +27 -25
  60. package/dist/node_modules/@zag-js/tooltip/dist/tooltip.dom.js +15 -14
  61. package/dist/styles.css +1 -1
  62. package/dist/theme/initColorScheme.d.ts +1 -1
  63. package/package.json +8 -8
@@ -2,5 +2,5 @@ import { TableOptions } from '@tanstack/react-table';
2
2
  export interface DataTableComponentProps<TData = Record<string, unknown>> extends Omit<TableOptions<TData>, "getCoreRowModel" | "getSortedRowModel"> {
3
3
  className?: string;
4
4
  }
5
- export declare function DataTableComponent<TData = Record<string, unknown>>({ className, enableRowSelection, onRowSelectionChange, onSortingChange, state, ...tableOptions }: DataTableComponentProps<TData>): import("react/jsx-runtime").JSX.Element;
5
+ export declare function DataTableComponent<TData = Record<string, unknown>>({ className, enableRowSelection, onRowSelectionChange, onSortingChange, state, ...tableOptions }: DataTableComponentProps<TData>): import("react").JSX.Element;
6
6
  export default DataTableComponent;
@@ -1,53 +1,57 @@
1
- import { jsxs as M, jsx as l } from "react/jsx-runtime";
2
- import { useReactTable as T } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
3
- import { useState as w } from "react";
1
+ import { jsxs as p, jsx as l } from "react/jsx-runtime";
2
+ import { useReactTable as M } from "../../node_modules/@tanstack/react-table/build/lib/index.js";
3
+ import { useState as f } from "react";
4
4
  import { DataTable as r } from "./index.js";
5
- import { getSortedRowModel as S, getCoreRowModel as u } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
6
- function y({
5
+ import { getSortedRowModel as T, getCoreRowModel as S } from "../../node_modules/@tanstack/table-core/build/lib/index.js";
6
+ function g({
7
7
  className: s,
8
- enableRowSelection: m = !0,
9
- onRowSelectionChange: i,
10
- onSortingChange: t,
8
+ enableRowSelection: t = !0,
9
+ onRowSelectionChange: d,
10
+ onSortingChange: i,
11
11
  state: e,
12
- ...R
12
+ ...c
13
13
  }) {
14
- const [b, f] = w({}), [p, n] = w([]), d = T({
15
- getCoreRowModel: u(),
16
- getSortedRowModel: S(),
17
- enableRowSelection: m,
18
- ...R,
14
+ const [R, n] = f({}), [u, b] = f([]), m = M({
15
+ getCoreRowModel: S(),
16
+ getSortedRowModel: T(),
17
+ enableRowSelection: t,
18
+ ...c,
19
+ defaultColumn: {
20
+ size: void 0,
21
+ ...c.defaultColumn
22
+ },
19
23
  state: {
20
- rowSelection: (e == null ? void 0 : e.rowSelection) ?? b,
21
- sorting: (e == null ? void 0 : e.sorting) ?? p,
24
+ rowSelection: (e == null ? void 0 : e.rowSelection) ?? R,
25
+ sorting: (e == null ? void 0 : e.sorting) ?? u,
22
26
  ...e
23
27
  },
24
28
  onRowSelectionChange: (o) => {
25
- f(o), i == null || i(o);
29
+ n(o), d == null || d(o);
26
30
  },
27
31
  onSortingChange: (o) => {
28
- n(o), t == null || t(o);
32
+ b(o), i == null || i(o);
29
33
  }
30
- }), c = m !== !1;
31
- return /* @__PURE__ */ M(r.Root, { className: s, children: [
32
- /* @__PURE__ */ l(r.Thead, { children: d.getHeaderGroups().map((o) => /* @__PURE__ */ l(
34
+ }), w = t !== !1;
35
+ return /* @__PURE__ */ p(r.Root, { className: s, children: [
36
+ /* @__PURE__ */ l(r.Thead, { children: m.getHeaderGroups().map((o) => /* @__PURE__ */ l(
33
37
  r.HeaderRow,
34
38
  {
35
39
  headerGroup: o,
36
- enableRowSelection: c,
37
- table: d
40
+ enableRowSelection: w,
41
+ table: m
38
42
  },
39
43
  o.id
40
44
  )) }),
41
- /* @__PURE__ */ l(r.Tbody, { children: d.getRowModel().rows.map((o) => /* @__PURE__ */ l(
45
+ /* @__PURE__ */ l(r.Tbody, { children: m.getRowModel().rows.map((o) => /* @__PURE__ */ l(
42
46
  r.Row,
43
47
  {
44
48
  row: o,
45
- enableRowSelection: c
49
+ enableRowSelection: w
46
50
  },
47
51
  o.id
48
52
  )) })
49
53
  ] });
50
54
  }
51
55
  export {
52
- y as DataTableComponent
56
+ g as DataTableComponent
53
57
  };
@@ -1,4 +1,4 @@
1
1
  import { ChoiceBoxProps } from '../../ChoiceBox';
2
2
  export declare const BodyCheckbox: ({ checked, onChange, value, state, ...props }: {
3
3
  state?: "enabled" | "hovered" | "selected";
4
- } & Omit<ChoiceBoxProps, "type">) => import("react/jsx-runtime").JSX.Element;
4
+ } & Omit<ChoiceBoxProps, "type">) => import("react").JSX.Element;
@@ -1,10 +1,10 @@
1
- import { jsx as l, jsxs as p } from "react/jsx-runtime";
2
- import f from "react";
1
+ import { jsx as l, jsxs as f } from "react/jsx-runtime";
2
+ import y from "react";
3
3
  import { SerendieSymbol as a } from "@serendie/symbols";
4
- import { css as y } from "../../../styled-system/css/css.js";
5
- import { cx as u } from "../../../styled-system/css/cx.js";
6
- import { cva as g } from "../../../styled-system/css/cva.js";
7
- const h = g({
4
+ import { css as u } from "../../../styled-system/css/css.js";
5
+ import { cx as g } from "../../../styled-system/css/cx.js";
6
+ import { cva as h } from "../../../styled-system/css/cva.js";
7
+ const x = h({
8
8
  base: {
9
9
  borderBottomWidth: "1px",
10
10
  borderBottomStyle: "solid",
@@ -22,7 +22,7 @@ const h = g({
22
22
  whiteSpace: "nowrap"
23
23
  },
24
24
  defaultVariants: {}
25
- }), A = f.forwardRef(
25
+ }), B = y.forwardRef(
26
26
  ({
27
27
  children: s,
28
28
  size: r = "medium",
@@ -31,11 +31,12 @@ const h = g({
31
31
  sortDirection: n,
32
32
  onSort: o,
33
33
  className: i,
34
- ...m
35
- }, c) => /* @__PURE__ */ l(
34
+ style: m,
35
+ ...c
36
+ }, p) => /* @__PURE__ */ l(
36
37
  "th",
37
38
  {
38
- ref: c,
39
+ ref: p,
39
40
  role: "columnheader",
40
41
  "aria-sort": n === "asc" ? "ascending" : n === "desc" ? "descending" : e ? "none" : void 0,
41
42
  tabIndex: e ? 0 : void 0,
@@ -43,16 +44,17 @@ const h = g({
43
44
  onKeyDown: (t) => {
44
45
  e && (t.key === "Enter" || t.key === " ") && (t.preventDefault(), o == null || o());
45
46
  },
46
- className: u(h({ size: r, state: d }), i),
47
+ className: g(x({ size: r, state: d }), i),
47
48
  style: {
48
49
  cursor: e ? "pointer" : "default",
49
- userSelect: "none"
50
+ userSelect: "none",
51
+ ...m
50
52
  },
51
- ...m,
52
- children: /* @__PURE__ */ p(
53
+ ...c,
54
+ children: /* @__PURE__ */ f(
53
55
  "span",
54
56
  {
55
- className: y({
57
+ className: u({
56
58
  display: "inline-flex",
57
59
  alignItems: "center",
58
60
  verticalAlign: "middle"
@@ -85,5 +87,5 @@ const h = g({
85
87
  )
86
88
  );
87
89
  export {
88
- A as HeaderCell
90
+ B as HeaderCell
89
91
  };
@@ -1,42 +1,43 @@
1
- import { jsx as n, jsxs as g } from "react/jsx-runtime";
2
- import f from "react";
3
- import { flexRender as u } from "../../../node_modules/@tanstack/react-table/build/lib/index.js";
1
+ import { jsx as r, jsxs as g } from "react/jsx-runtime";
2
+ import u from "react";
3
+ import { flexRender as f } from "../../../node_modules/@tanstack/react-table/build/lib/index.js";
4
4
  import { DataTable as t } from "../index.js";
5
- import { css as R } from "../../../styled-system/css/css.js";
6
- const w = ({
7
- headerGroup: r,
8
- enableRowSelection: d,
5
+ import { css as w } from "../../../styled-system/css/css.js";
6
+ const R = ({
7
+ headerGroup: l,
8
+ enableRowSelection: m,
9
9
  table: o,
10
- children: l,
10
+ children: n,
11
11
  className: c
12
- }, s) => l ? /* @__PURE__ */ n(t.Tr, { ref: s, className: c, children: l }) : !r || !o ? null : /* @__PURE__ */ g(t.Tr, { ref: s, className: c, children: [
13
- d && /* @__PURE__ */ n(
12
+ }, s) => n ? /* @__PURE__ */ r(t.Tr, { ref: s, className: c, children: n }) : !l || !o ? null : /* @__PURE__ */ g(t.Tr, { ref: s, className: c, children: [
13
+ m && /* @__PURE__ */ r(
14
14
  t.HeaderCheckbox,
15
15
  {
16
16
  checked: o.getIsSomeRowsSelected() ? "indeterminate" : !!o.getIsAllRowsSelected(),
17
17
  onChange: o.getToggleAllRowsSelectedHandler(),
18
18
  value: "select-all",
19
- className: R({
19
+ className: w({
20
20
  verticalAlign: "middle"
21
21
  })
22
22
  }
23
23
  ),
24
- r.headers.map((e) => {
25
- const i = e.column.getCanSort(), a = e.column.getIsSorted();
26
- return /* @__PURE__ */ n(
24
+ l.headers.map((e) => {
25
+ const d = e.column.getCanSort(), a = e.column.getIsSorted();
26
+ return /* @__PURE__ */ r(
27
27
  t.HeaderCell,
28
28
  {
29
- sortable: i,
29
+ sortable: d,
30
30
  sortDirection: a,
31
31
  onSort: () => e.column.toggleSorting(),
32
- children: u(e.column.columnDef.header, e.getContext())
32
+ style: e.column.columnDef.size != null ? { width: e.getSize() } : void 0,
33
+ children: f(e.column.columnDef.header, e.getContext())
33
34
  },
34
35
  e.id
35
36
  );
36
37
  })
37
- ] }, r.id), m = f.forwardRef(w);
38
- m.displayName = "HeaderRow";
39
- const T = m;
38
+ ] }, l.id), i = u.forwardRef(R);
39
+ i.displayName = "HeaderRow";
40
+ const D = i;
40
41
  export {
41
- T as HeaderRow
42
+ D as HeaderRow
42
43
  };
@@ -1,10 +1,10 @@
1
- import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import u from "react";
1
+ import { jsx as n, jsxs as p } from "react/jsx-runtime";
2
+ import f from "react";
3
3
  import { flexRender as y } from "../../../node_modules/@tanstack/react-table/build/lib/index.js";
4
4
  import { DataTable as o } from "../index.js";
5
- import { cx as l } from "../../../styled-system/css/cx.js";
5
+ import { cx as m } from "../../../styled-system/css/cx.js";
6
6
  import { cva as g } from "../../../styled-system/css/cva.js";
7
- const m = g({
7
+ const l = g({
8
8
  base: {
9
9
  _hover: {
10
10
  _after: {
@@ -58,18 +58,18 @@ const m = g({
58
58
  o.Tr,
59
59
  {
60
60
  ref: i,
61
- className: l(
62
- m({ state: d ? "selected" : void 0 }),
61
+ className: m(
62
+ l({ state: d ? "selected" : void 0 }),
63
63
  s
64
64
  ),
65
65
  children: r
66
66
  }
67
- ) : e ? /* @__PURE__ */ f(
67
+ ) : e ? /* @__PURE__ */ p(
68
68
  o.Tr,
69
69
  {
70
70
  ref: i,
71
- className: l(
72
- m({
71
+ className: m(
72
+ l({
73
73
  state: e.getIsSelected() ? "selected" : void 0
74
74
  }),
75
75
  s
@@ -84,17 +84,25 @@ const m = g({
84
84
  }
85
85
  ),
86
86
  e.getVisibleCells().map((t) => {
87
- const p = x(t);
88
- return /* @__PURE__ */ n(o.BodyCell, { type: p, children: y(t.column.columnDef.cell, t.getContext()) }, t.id);
87
+ const u = x(t);
88
+ return /* @__PURE__ */ n(
89
+ o.BodyCell,
90
+ {
91
+ type: u,
92
+ style: t.column.columnDef.size != null ? { width: t.column.getSize() } : void 0,
93
+ children: y(t.column.columnDef.cell, t.getContext())
94
+ },
95
+ t.id
96
+ );
89
97
  })
90
98
  ]
91
99
  }
92
- ) : null, a = u.forwardRef(v);
100
+ ) : null, a = f.forwardRef(v);
93
101
  a.displayName = "Row";
94
- const w = a;
102
+ const R = a;
95
103
  function x(e) {
96
104
  return e.column.columnDef.meta && "getType" in e.column.columnDef.meta && typeof e.column.columnDef.meta.getType == "function" ? e.column.columnDef.meta.getType(e.row.original) : "default";
97
105
  }
98
106
  export {
99
- w as Row
107
+ R as Row
100
108
  };
@@ -29,5 +29,5 @@ export declare const DividerStyle: import('../../../styled-system/types').Recipe
29
29
  };
30
30
  }>;
31
31
  type DividerProps = ComponentProps<"hr"> & RecipeVariantProps<typeof DividerStyle>;
32
- export declare const Divider: (props: DividerProps) => import("react/jsx-runtime").JSX.Element;
32
+ export declare const Divider: (props: DividerProps) => import("react").JSX.Element;
33
33
  export {};
@@ -1,2 +1,2 @@
1
1
  import { ComponentProps } from 'react';
2
- export declare const List: ({ children, ...props }: ComponentProps<"ul">) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const List: ({ children, ...props }: ComponentProps<"ul">) => import("react").JSX.Element;
@@ -1,8 +1,19 @@
1
- import { ComponentProps } from 'react';
2
- export declare const ListItemStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"title" | "description" | "root" | "badge" | "leftIcon" | "rightIcon" | "wrapper" | "textGroup", {
3
- isLargeLeftIcon: {
1
+ import { default as React, ComponentProps } from 'react';
2
+ export declare const ListItemStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"title" | "description" | "root" | "badge" | "wrapper" | "textGroup" | "subDescription" | "trailingElement" | "headingElement", {
3
+ isLargeHeadingElement: {
4
4
  true: {
5
- leftIcon: {
5
+ headingElement: {
6
+ "& svg": {
7
+ width: "40px";
8
+ height: "40px";
9
+ };
10
+ };
11
+ };
12
+ false: {};
13
+ };
14
+ isLargeTrailingElement: {
15
+ true: {
16
+ trailingElement: {
6
17
  "& svg": {
7
18
  width: "40px";
8
19
  height: "40px";
@@ -22,25 +33,44 @@ export declare const ListItemStyle: import('../../../styled-system/types').SlotR
22
33
  type ListItemBaseProps = {
23
34
  title: string;
24
35
  description?: string;
25
- rightIcon?: React.ReactElement;
26
- leftIcon?: React.ReactElement;
27
- isLargeLeftIcon?: boolean;
36
+ subDescription?: string;
37
+ trailingElement?: React.ReactElement;
38
+ headingElement?: React.ReactElement;
39
+ isLargeHeadingElement?: boolean;
40
+ isLargeTrailingElement?: boolean;
28
41
  badge?: number;
29
42
  children?: React.ReactNode;
30
43
  disabled?: boolean;
31
44
  selected?: boolean;
32
45
  focusVisible?: boolean;
33
46
  size?: "small";
47
+ /** @deprecated `leftIcon` は廃止予定です。`headingElement` を使ってください */
48
+ leftIcon?: React.ReactElement;
49
+ /** @deprecated `rightIcon` は廃止予定です。`trailingElement` を使ってください */
50
+ rightIcon?: React.ReactElement;
51
+ /** @deprecated `isLargeLeftIcon` は廃止予定です。`isLargeHeadingElement` を使ってください */
52
+ isLargeLeftIcon?: boolean;
53
+ /** @deprecated `isLargeRightIcon` は廃止予定です。`isLargeTrailingElement` を使ってください */
54
+ isLargeRightIcon?: boolean;
34
55
  };
35
- type ExclusiveRightItemProps = ({
56
+ type ExclusiveTrailingItemProps = ({
36
57
  badge?: number;
37
58
  } & {
59
+ trailingElement?: never;
60
+ isLargeTrailingElement?: never;
61
+ /** @deprecated `rightIcon` は廃止予定です。`trailingElement` を使ってください */
38
62
  rightIcon?: never;
39
- }) | ({
63
+ /** @deprecated `isLargeRightIcon` は廃止予定です。`isLargeTrailingElement` を使ってください */
64
+ isLargeRightIcon?: never;
65
+ }) | {
40
66
  badge?: never;
41
- } & {
67
+ trailingElement?: React.ReactElement;
68
+ isLargeTrailingElement?: boolean;
69
+ /** @deprecated `rightIcon` は廃止予定です。`trailingElement` を使ってください */
42
70
  rightIcon?: React.ReactElement;
43
- });
44
- type ListItemProps = ComponentProps<"li"> & ListItemBaseProps & ExclusiveRightItemProps;
71
+ /** @deprecated `isLargeRightIcon` は廃止予定です。`isLargeTrailingElement` を使ってください */
72
+ isLargeRightIcon?: boolean;
73
+ };
74
+ type ListItemProps = ComponentProps<"li"> & ListItemBaseProps & ExclusiveTrailingItemProps;
45
75
  export declare const ListItem: React.FC<ListItemProps>;
46
76
  export {};
@@ -1,17 +1,19 @@
1
- import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
- import { NotificationBadge as b } from "../NotificationBadge/NotificationBadge.js";
3
- import { cx as o } from "../../styled-system/css/cx.js";
4
- import { css as c } from "../../styled-system/css/css.js";
5
- import { sva as v } from "../../styled-system/css/sva.js";
6
- const p = v({
1
+ import { jsx as t, jsxs as f } from "react/jsx-runtime";
2
+ import { useRef as D, useEffect as G } from "react";
3
+ import { NotificationBadge as O } from "../NotificationBadge/NotificationBadge.js";
4
+ import { cx as i } from "../../styled-system/css/cx.js";
5
+ import { css as g } from "../../styled-system/css/css.js";
6
+ import { sva as P } from "../../styled-system/css/sva.js";
7
+ const E = P({
7
8
  slots: [
8
9
  "root",
9
10
  "wrapper",
10
11
  "textGroup",
11
12
  "title",
12
13
  "description",
13
- "rightIcon",
14
- "leftIcon",
14
+ "subDescription",
15
+ "trailingElement",
16
+ "headingElement",
15
17
  "badge"
16
18
  ],
17
19
  base: {
@@ -64,8 +66,6 @@ const p = v({
64
66
  }
65
67
  },
66
68
  description: {
67
- display: "flex",
68
- flexDirection: "column",
69
69
  textStyle: "sd.system.typography.body.extraSmall_compact",
70
70
  color: "sd.system.color.component.onSurfaceVariant",
71
71
  _expanded: {
@@ -75,7 +75,17 @@ const p = v({
75
75
  opacity: 0.3
76
76
  }
77
77
  },
78
- leftIcon: {
78
+ subDescription: {
79
+ textStyle: "sd.system.typography.body.extraSmall_compact",
80
+ color: "sd.system.color.component.onSurfaceVariant",
81
+ _expanded: {
82
+ textStyle: "sd.system.typography.body.extraSmall_expanded"
83
+ },
84
+ _disabled: {
85
+ opacity: 0.3
86
+ }
87
+ },
88
+ headingElement: {
79
89
  flexShrink: 0,
80
90
  "& svg": {
81
91
  display: "block",
@@ -88,7 +98,7 @@ const p = v({
88
98
  opacity: 0.3
89
99
  }
90
100
  },
91
- rightIcon: {
101
+ trailingElement: {
92
102
  flexShrink: 0,
93
103
  "& svg": {
94
104
  width: "24px",
@@ -99,17 +109,24 @@ const p = v({
99
109
  }
100
110
  },
101
111
  badge: {
102
- position: "absolute",
103
- right: "sd.system.dimension.spacing.medium",
104
- top: "sd.system.dimension.spacing.extraSmall",
105
- height: 24,
106
- minW: 24
112
+ flexShrink: 0
107
113
  }
108
114
  },
109
115
  variants: {
110
- isLargeLeftIcon: {
116
+ isLargeHeadingElement: {
117
+ true: {
118
+ headingElement: {
119
+ "& svg": {
120
+ width: "40px",
121
+ height: "40px"
122
+ }
123
+ }
124
+ },
125
+ false: {}
126
+ },
127
+ isLargeTrailingElement: {
111
128
  true: {
112
- leftIcon: {
129
+ trailingElement: {
113
130
  "& svg": {
114
131
  width: "40px",
115
132
  height: "40px"
@@ -126,65 +143,95 @@ const p = v({
126
143
  }
127
144
  }
128
145
  }
129
- }), L = ({
130
- leftIcon: a,
146
+ }), Y = ({
147
+ headingElement: v,
148
+ trailingElement: b,
149
+ title: w,
150
+ description: s,
151
+ subDescription: a,
152
+ badge: n,
153
+ children: S,
154
+ disabled: _,
155
+ selected: L,
156
+ focusVisible: N,
157
+ className: H,
158
+ leftIcon: l,
131
159
  rightIcon: r,
132
- title: m,
133
- description: i,
134
- badge: l,
135
- children: d,
136
- disabled: x,
137
- selected: y,
138
- focusVisible: g,
139
- className: h,
140
- ...n
160
+ isLargeLeftIcon: o,
161
+ isLargeRightIcon: d,
162
+ ...m
141
163
  }) => {
142
- const [u, f] = p.splitVariantProps(n), e = p(u);
143
- return /* @__PURE__ */ s("li", { className: o(e.root, h), ...f, children: [
144
- /* @__PURE__ */ s(
145
- "div",
146
- {
147
- tabIndex: 1,
148
- className: o(
149
- e.wrapper,
150
- i && c({ alignItems: "flex-start" })
164
+ const y = D(!1);
165
+ G(() => {
166
+ y.current || process.env.NODE_ENV !== "production" && (l || r || o || d) && (y.current = !0, l && console.warn(
167
+ "[ListItem] `leftIcon` は廃止予定です。`headingElement` を使ってください。"
168
+ ), r && console.warn(
169
+ "[ListItem] `rightIcon` は廃止予定です。`trailingElement` を使ってください。"
170
+ ), o && console.warn(
171
+ "[ListItem] `isLargeLeftIcon` は廃止予定です。`isLargeHeadingElement` を使ってください。"
172
+ ), d && console.warn(
173
+ "[ListItem] `isLargeRightIcon` は廃止予定です。`isLargeTrailingElement` を使ってください。"
174
+ ));
175
+ }, []);
176
+ const x = v ?? l, h = b ?? r, c = m.isLargeHeadingElement ?? o, u = m.isLargeTrailingElement ?? d, [T, k] = E.splitVariantProps(m), e = E({
177
+ ...T,
178
+ isLargeHeadingElement: c,
179
+ isLargeTrailingElement: u
180
+ }), p = (!!s || !!a) && !(!!c && !!s && !a), I = i(
181
+ e.wrapper,
182
+ p && g({ alignItems: "flex-start" })
183
+ ), V = i(
184
+ e.headingElement,
185
+ p && g({ marginTop: "sd.system.dimension.spacing.twoExtraSmall" })
186
+ ), C = i(
187
+ e.trailingElement,
188
+ p && g({ marginTop: "sd.system.dimension.spacing.twoExtraSmall" })
189
+ );
190
+ return /* @__PURE__ */ t("li", { className: i(e.root, H), ...k, children: /* @__PURE__ */ f(
191
+ "div",
192
+ {
193
+ tabIndex: 1,
194
+ className: I,
195
+ "data-disabled": _ ? !0 : void 0,
196
+ "data-selected": L ? !0 : void 0,
197
+ "data-focus-visible": N ? !0 : void 0,
198
+ children: [
199
+ x && /* @__PURE__ */ t(
200
+ "div",
201
+ {
202
+ className: V,
203
+ style: c ? { padding: "0", width: "40px", height: "40px" } : { padding: "0", width: "24px", height: "24px" },
204
+ children: x
205
+ }
151
206
  ),
152
- "data-disabled": x ? !0 : void 0,
153
- "data-selected": y ? !0 : void 0,
154
- "data-focus-visible": g ? !0 : void 0,
155
- children: [
156
- a && /* @__PURE__ */ t(
157
- "div",
158
- {
159
- className: e.leftIcon,
160
- style: n.isLargeLeftIcon ? { padding: "0", width: "40px", height: "40px" } : { padding: "0", width: "24px", height: "24px" },
161
- children: a
162
- }
163
- ),
164
- /* @__PURE__ */ s(
165
- "div",
166
- {
167
- className: o(
168
- e.textGroup,
169
- (!!i || !!d) && c({ alignItems: "flex-start" })
170
- ),
171
- children: [
172
- /* @__PURE__ */ t("span", { className: e.title, children: m }),
173
- /* @__PURE__ */ s("div", { className: e.description, children: [
174
- i,
175
- d
176
- ] })
177
- ]
178
- }
179
- ),
180
- r && /* @__PURE__ */ t("div", { className: e.rightIcon, children: r })
181
- ]
182
- }
183
- ),
184
- l && /* @__PURE__ */ t("div", { className: e.badge, children: /* @__PURE__ */ t(b, { count: l, variant: "secondary" }) })
185
- ] });
207
+ /* @__PURE__ */ f("div", { className: e.textGroup, children: [
208
+ /* @__PURE__ */ t("span", { className: e.title, children: w }),
209
+ s && /* @__PURE__ */ t("span", { className: e.description, children: s }),
210
+ a && /* @__PURE__ */ t("span", { className: e.subDescription, children: a }),
211
+ S
212
+ ] }),
213
+ h && /* @__PURE__ */ t(
214
+ "div",
215
+ {
216
+ className: C,
217
+ style: u ? { width: "40px", height: "40px" } : { width: "24px", height: "24px" },
218
+ children: h
219
+ }
220
+ ),
221
+ n != null && n > 0 && /* @__PURE__ */ t("div", { className: e.badge, children: /* @__PURE__ */ t(
222
+ O,
223
+ {
224
+ count: n,
225
+ variant: "secondary",
226
+ size: "small",
227
+ position: "relative"
228
+ }
229
+ ) })
230
+ ]
231
+ }
232
+ ) });
186
233
  };
187
234
  export {
188
- L as ListItem,
189
- p as ListItemStyle
235
+ Y as ListItem,
236
+ E as ListItemStyle
190
237
  };
@@ -3,4 +3,5 @@ export declare const AnimatedArc: React.FC<{
3
3
  className?: string;
4
4
  radius: number;
5
5
  width: number;
6
+ progress?: number;
6
7
  }>;