@serendie/ui 2.3.0 → 2.4.0-dev.202601080931

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 CHANGED
@@ -79,7 +79,7 @@ export default function ClientComponent() {
79
79
 
80
80
  ### テーマ切り替え
81
81
 
82
- Serendie Design Systemには5つのカラーテーマがあり、デザイントークンもそれに対応します。htmlタグなどに、`data-panda-theme`属性 (`konjo`, `asagi`, `sumire`, `tsutusji`, `kurikawa`)を付与することでカラーテーマを切り替えることができます。
82
+ Serendie Design Systemには5つのカラーテーマがあり、デザイントークンもそれに対応します。htmlタグなどに、`data-panda-theme`属性 (`konjo`, `asagi`, `sumire`, `tsutsuji`, `kurikawa`)を付与することでカラーテーマを切り替えることができます。
83
83
  各テーマについては[こちら](https://serendie.design/foundations/theming/)を参照してください。
84
84
 
85
85
  ```html
@@ -214,7 +214,7 @@ export const dictionary = {
214
214
  ```env
215
215
  FIGMA_ACCESS_TOKEN="YOUR_TOKEN"
216
216
  FIGMA_FILE_KEY="YOUR_FILE_KEY"
217
- # FIGMA_TRANSLATION_COLLECTION="locales" # オプション(デフォルト: locales
217
+ # FIGMA_TRANSLATION_COLLECTION="_i18n" # オプション(デフォルト: _i18n
218
218
  ```
219
219
 
220
220
  #### 翻訳管理コマンド
@@ -1,4 +1,5 @@
1
- import { default as React } from 'react';
1
+ import { default as React, ComponentProps } from 'react';
2
+ import { RecipeVariantProps } from '../../../styled-system/types';
2
3
  export declare const ButtonStyle: import('../../../styled-system/types').RecipeRuntimeFn<{
3
4
  styleType: {
4
5
  filled: {
@@ -112,9 +113,19 @@ export declare const ButtonStyle: import('../../../styled-system/types').RecipeR
112
113
  };
113
114
  };
114
115
  }>;
116
+ type ExclusiveIconProps = ({
117
+ leftIcon?: React.ReactElement;
118
+ } & {
119
+ rightIcon?: never;
120
+ }) | ({
121
+ leftIcon?: never;
122
+ } & {
123
+ rightIcon?: React.ReactElement;
124
+ });
115
125
  type ButtonLoadingProps = {
116
126
  isLoading?: boolean;
117
127
  };
128
+ export type ButtonProps = ComponentProps<"button"> & RecipeVariantProps<typeof ButtonStyle> & ExclusiveIconProps & ButtonLoadingProps;
118
129
  export declare const Button: React.ForwardRefExoticComponent<(Omit<React.ClassAttributes<HTMLButtonElement> & React.ButtonHTMLAttributes<HTMLButtonElement> & {
119
130
  styleType?: "filled" | "outlined" | "ghost" | "rectangle" | undefined;
120
131
  size?: "small" | "medium" | undefined;
@@ -11,4 +11,11 @@ export declare const DatePicker: import('react').ForwardRefExoticComponent<ArkDa
11
11
  startPlaceholder?: string;
12
12
  endPlaceholder?: string;
13
13
  isCalendarOnly?: boolean;
14
+ /**
15
+ * Portalを使用するかどうか
16
+ * - `true` (デフォルト): body直下にポータルする。ModalDialog/Drawer内にある場合は自動的にそのコンテンツ内にポータルされる
17
+ * - `false`: ポータルを使用せず、その場にレンダリングする
18
+ * @default true
19
+ */
20
+ portalled?: boolean;
14
21
  } & import('react').RefAttributes<HTMLDivElement>>;
@@ -1,206 +1,216 @@
1
- import { jsx as e, jsxs as a, Fragment as v } from "react/jsx-runtime";
2
- import { SerendieSymbolCalendar as O, SerendieSymbolArrowRight as j, SerendieSymbolChevronDown as H, SerendieSymbolChevronLeft as V, SerendieSymbolChevronRight as A } from "@serendie/symbols";
3
- import { forwardRef as L, useState as q } from "react";
4
- import { datePickerStyles as x } from "./styles.js";
5
- import { textFieldRecipe as D } from "../../recipes/textFieldRecipe.js";
6
- import { Portal as B } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
7
- import { DatePickerRoot as b } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js";
8
- import { DatePickerLabel as J } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js";
9
- import { DatePickerControl as Y } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js";
10
- import { cx as h } from "../../styled-system/css/cx.js";
11
- import { DatePickerTrigger as _ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js";
12
- import { css as t } from "../../styled-system/css/css.js";
13
- import { DatePickerInput as f } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js";
14
- import { DatePickerPositioner as z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js";
15
- import { DatePickerContent as E } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js";
16
- import { DatePickerView as G } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js";
17
- import { DatePickerContext as K } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js";
18
- import { DatePickerViewControl as Q } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js";
19
- import { DatePickerYearSelect as U } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js";
20
- import { DatePickerPrevTrigger as X } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js";
21
- import { DatePickerMonthSelect as Z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js";
22
- import { DatePickerNextTrigger as $ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js";
23
- import { DatePickerTable as M } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js";
24
- import { DatePickerTableHead as ee } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js";
25
- import { DatePickerTableRow as y } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js";
26
- import { DatePickerTableHeader as re } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js";
27
- import { DatePickerTableBody as ie } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js";
28
- import { DatePickerTableCell as ae } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js";
29
- import { DatePickerTableCellTrigger as te } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js";
30
- const je = L(
1
+ import { jsx as e, jsxs as a, Fragment as T } from "react/jsx-runtime";
2
+ import { SerendieSymbolCalendar as B, SerendieSymbolArrowRight as J, SerendieSymbolChevronDown as Y, SerendieSymbolChevronLeft as _, SerendieSymbolChevronRight as z } from "@serendie/symbols";
3
+ import { forwardRef as E, useState as G } from "react";
4
+ import { datePickerStyles as S } from "./styles.js";
5
+ import { textFieldRecipe as C } from "../../recipes/textFieldRecipe.js";
6
+ import { useAutoPortalContainer as K } from "../../hooks/useAutoPortalContainer.js";
7
+ import { useTranslations as Q } from "../../i18n/index.js";
8
+ import { Portal as U } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
9
+ import { DatePickerRoot as y } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js";
10
+ import { DatePickerLabel as X } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js";
11
+ import { DatePickerControl as Z } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js";
12
+ import { cx as f } from "../../styled-system/css/cx.js";
13
+ import { DatePickerTrigger as $ } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js";
14
+ import { css as i } from "../../styled-system/css/css.js";
15
+ import { DatePickerInput as P } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js";
16
+ import { DatePickerPositioner as M } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js";
17
+ import { DatePickerContent as ee } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js";
18
+ import { DatePickerView as re } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js";
19
+ import { DatePickerContext as te } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js";
20
+ import { DatePickerViewControl as ae } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js";
21
+ import { DatePickerYearSelect as ie } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js";
22
+ import { DatePickerPrevTrigger as oe } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js";
23
+ import { DatePickerMonthSelect as le } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js";
24
+ import { DatePickerNextTrigger as ne } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js";
25
+ import { DatePickerTable as se } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js";
26
+ import { DatePickerTableHead as ce } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js";
27
+ import { DatePickerTableRow as v } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js";
28
+ import { DatePickerTableHeader as me } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js";
29
+ import { DatePickerTableBody as de } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js";
30
+ import { DatePickerTableCell as pe } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js";
31
+ import { DatePickerTableCellTrigger as he } from "../../node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js";
32
+ const Ee = E(
31
33
  ({
32
- placeholder: r = "日付を選択",
34
+ placeholder: r,
33
35
  label: o,
34
36
  required: l,
35
- requiredLabel: s,
36
- invalid: n,
37
- invalidMessage: c,
38
- selectionMode: p = "single",
39
- startPlaceholder: S = "開始日",
40
- endPlaceholder: T = "終了日",
41
- locale: P = "ja-JP",
42
- isCalendarOnly: w = !1,
43
- ...m
44
- }, N) => {
45
- const R = x(), [F, I] = D.splitVariantProps({
46
- ...m
47
- }), i = D(F), [g, d] = q(!1), W = p === "range";
48
- return w ? /* @__PURE__ */ e(
49
- b,
37
+ requiredLabel: n,
38
+ invalid: s,
39
+ invalidMessage: m,
40
+ selectionMode: h = "single",
41
+ startPlaceholder: w,
42
+ endPlaceholder: R,
43
+ locale: u = "ja-JP",
44
+ isCalendarOnly: F = !1,
45
+ portalled: g = !0,
46
+ ...c
47
+ }, k) => {
48
+ const d = Q(), I = r ?? d("datePicker.selectDate"), W = w ?? d("datePicker.startDate"), O = R ?? d("datePicker.endDate"), j = S(), [A, H] = C.splitVariantProps({
49
+ ...c
50
+ }), t = C(A), [N, p] = G(!1), V = h === "range", { triggerRef: q, portalContainerRef: L } = K(g);
51
+ return F ? /* @__PURE__ */ e(
52
+ y,
50
53
  {
51
- locale: P,
52
- ...I,
53
- ref: N,
54
- selectionMode: p,
54
+ locale: u,
55
+ ...H,
56
+ ref: k,
57
+ selectionMode: h,
55
58
  open: !0,
56
- className: i.root,
57
- children: /* @__PURE__ */ e(C, {})
59
+ className: t.root,
60
+ children: /* @__PURE__ */ e(x, {})
58
61
  }
59
62
  ) : /* @__PURE__ */ a(
60
- b,
63
+ y,
61
64
  {
62
- locale: P,
63
- ...m,
64
- ref: N,
65
- selectionMode: p,
66
- className: i.root,
67
- open: g,
68
- onOpenChange: (u) => {
69
- var k;
70
- d(u.open), (k = m.onOpenChange) == null || k.call(m, u);
65
+ locale: u,
66
+ ...c,
67
+ ref: k,
68
+ selectionMode: h,
69
+ className: t.root,
70
+ open: N,
71
+ onOpenChange: (D) => {
72
+ var b;
73
+ p(D.open), (b = c.onOpenChange) == null || b.call(c, D);
71
74
  },
72
75
  children: [
73
- /* @__PURE__ */ a(v, { children: [
74
- o && /* @__PURE__ */ a(J, { className: i.label, children: [
76
+ /* @__PURE__ */ a(T, { children: [
77
+ o && /* @__PURE__ */ a(X, { className: t.label, children: [
75
78
  o,
76
- l && /* @__PURE__ */ e("span", { className: i.labelRequired, children: s ?? "必須" })
79
+ l && /* @__PURE__ */ e("span", { className: t.labelRequired, children: n ?? d("common.required") })
77
80
  ] }),
78
81
  /* @__PURE__ */ a(
79
- Y,
82
+ Z,
80
83
  {
81
- className: h(
82
- i.inputWrapper,
83
- t({
84
+ className: f(
85
+ t.inputWrapper,
86
+ i({
84
87
  _expanded: {
85
88
  outlineWidth: "sd.system.dimension.border.thick",
86
89
  outlineColor: "sd.system.color.impression.primary"
87
90
  }
88
91
  })
89
92
  ),
90
- "data-expanded": g ? !0 : void 0,
91
- "data-Invalid": n,
93
+ "data-expanded": N ? !0 : void 0,
94
+ "data-Invalid": s,
92
95
  children: [
93
- /* @__PURE__ */ e("div", { className: i.leftContent, children: /* @__PURE__ */ e(_, { className: t({ display: "flex" }), children: /* @__PURE__ */ e(O, {}) }) }),
94
- W ? /* @__PURE__ */ a(
96
+ /* @__PURE__ */ e("div", { className: t.leftContent, children: /* @__PURE__ */ e(
97
+ $,
98
+ {
99
+ className: i({ display: "flex" }),
100
+ ref: q,
101
+ children: /* @__PURE__ */ e(B, {})
102
+ }
103
+ ) }),
104
+ V ? /* @__PURE__ */ a(
95
105
  "div",
96
106
  {
97
- className: t({
107
+ className: i({
98
108
  display: "grid",
99
109
  gridTemplateColumns: "1fr auto 1fr",
100
110
  alignItems: "center"
101
111
  }),
102
112
  children: [
103
113
  /* @__PURE__ */ e(
104
- f,
114
+ P,
105
115
  {
106
116
  index: 0,
107
- placeholder: S,
108
- className: h(
109
- i.input,
110
- t({
117
+ placeholder: W,
118
+ className: f(
119
+ t.input,
120
+ i({
111
121
  minWidth: "100%",
112
122
  borderRadius: "sd.system.dimension.radius.medium"
113
123
  })
114
124
  ),
115
- onFocus: () => d(!0)
125
+ onFocus: () => p(!0)
116
126
  }
117
127
  ),
118
- /* @__PURE__ */ e(j, {}),
128
+ /* @__PURE__ */ e(J, {}),
119
129
  /* @__PURE__ */ e(
120
- f,
130
+ P,
121
131
  {
122
132
  index: 1,
123
- placeholder: T,
124
- className: h(
125
- i.input,
126
- t({
133
+ placeholder: O,
134
+ className: f(
135
+ t.input,
136
+ i({
127
137
  minWidth: "100%",
128
138
  borderRadius: "sd.system.dimension.radius.medium"
129
139
  })
130
140
  ),
131
- onFocus: () => d(!0)
141
+ onFocus: () => p(!0)
132
142
  }
133
143
  )
134
144
  ]
135
145
  }
136
146
  ) : /* @__PURE__ */ e(
137
- f,
147
+ P,
138
148
  {
139
- placeholder: r,
140
- className: i.input,
141
- onFocus: () => d(!0)
149
+ placeholder: I,
150
+ className: t.input,
151
+ onFocus: () => p(!0)
142
152
  }
143
153
  ),
144
154
  /* @__PURE__ */ e("div", {})
145
155
  ]
146
156
  }
147
157
  ),
148
- n && c && /* @__PURE__ */ e("div", { className: i.messageField, children: /* @__PURE__ */ e("p", { className: i.invalidMessage, children: c }) })
158
+ s && m && /* @__PURE__ */ e("div", { className: t.messageField, children: /* @__PURE__ */ e("p", { className: t.invalidMessage, children: m }) })
149
159
  ] }),
150
- /* @__PURE__ */ e(B, { children: /* @__PURE__ */ e(z, { className: R.positioner, children: /* @__PURE__ */ e(C, {}) }) })
160
+ /* @__PURE__ */ e(U, { disabled: !g, container: L, children: /* @__PURE__ */ e(M, { className: j.positioner, children: /* @__PURE__ */ e(x, {}) }) })
151
161
  ]
152
162
  }
153
163
  );
154
164
  }
155
- ), C = () => {
156
- const r = x();
157
- return /* @__PURE__ */ e(E, { className: r.content, children: /* @__PURE__ */ e(G, { view: "day", className: r.view, children: /* @__PURE__ */ e(K, { children: (o) => /* @__PURE__ */ a(v, { children: [
158
- /* @__PURE__ */ a(Q, { className: r.viewControl, children: [
165
+ ), x = () => {
166
+ const r = S();
167
+ return /* @__PURE__ */ e(ee, { className: r.content, children: /* @__PURE__ */ e(re, { view: "day", className: r.view, children: /* @__PURE__ */ e(te, { children: (o) => /* @__PURE__ */ a(T, { children: [
168
+ /* @__PURE__ */ a(ae, { className: r.viewControl, children: [
159
169
  /* @__PURE__ */ a("div", { className: r.selectWrapper, children: [
160
- /* @__PURE__ */ e(U, { className: r.select }),
161
- /* @__PURE__ */ e(H, { className: r.selectIcon })
170
+ /* @__PURE__ */ e(ie, { className: r.select }),
171
+ /* @__PURE__ */ e(Y, { className: r.selectIcon })
162
172
  ] }),
163
- /* @__PURE__ */ a("div", { className: t({ display: "flex", alignItems: "center" }), children: [
164
- /* @__PURE__ */ e(X, { className: r.prevTrigger, children: /* @__PURE__ */ e(V, {}) }),
173
+ /* @__PURE__ */ a("div", { className: i({ display: "flex", alignItems: "center" }), children: [
174
+ /* @__PURE__ */ e(oe, { className: r.prevTrigger, children: /* @__PURE__ */ e(_, {}) }),
165
175
  /* @__PURE__ */ e(
166
- Z,
176
+ le,
167
177
  {
168
- className: t({
178
+ className: i({
169
179
  appearance: "none",
170
180
  textAlign: "center"
171
181
  })
172
182
  }
173
183
  ),
174
- /* @__PURE__ */ e($, { className: r.nextTrigger, children: /* @__PURE__ */ e(A, {}) })
184
+ /* @__PURE__ */ e(ne, { className: r.nextTrigger, children: /* @__PURE__ */ e(z, {}) })
175
185
  ] })
176
186
  ] }),
177
- /* @__PURE__ */ a(M, { className: r.table, children: [
178
- /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e(y, { children: o.weekDays.map((l, s) => /* @__PURE__ */ e(
179
- re,
187
+ /* @__PURE__ */ a(se, { className: r.table, children: [
188
+ /* @__PURE__ */ e(ce, { children: /* @__PURE__ */ e(v, { children: o.weekDays.map((l, n) => /* @__PURE__ */ e(
189
+ me,
180
190
  {
181
191
  className: r.tableHeader,
182
192
  children: l.narrow
183
193
  },
184
- s
194
+ n
185
195
  )) }) }),
186
- /* @__PURE__ */ e(ie, { children: o.weeks.map((l, s) => /* @__PURE__ */ e(y, { children: l.map((n, c) => /* @__PURE__ */ e(
187
- ae,
196
+ /* @__PURE__ */ e(de, { children: o.weeks.map((l, n) => /* @__PURE__ */ e(v, { children: l.map((s, m) => /* @__PURE__ */ e(
197
+ pe,
188
198
  {
189
- value: n,
199
+ value: s,
190
200
  className: r.tableCell,
191
201
  children: /* @__PURE__ */ e(
192
- te,
202
+ he,
193
203
  {
194
204
  className: r.tableCellTrigger,
195
- children: n.day
205
+ children: s.day
196
206
  }
197
207
  )
198
208
  },
199
- c
200
- )) }, s)) })
209
+ m
210
+ )) }, n)) })
201
211
  ] })
202
212
  ] }) }) }) });
203
213
  };
204
214
  export {
205
- je as DatePicker
215
+ Ee as DatePicker
206
216
  };
@@ -11,5 +11,12 @@ export type DropdownMenuProps = {
11
11
  items: MenuItemProps[];
12
12
  disabled?: boolean;
13
13
  icon?: React.ReactElement;
14
+ /**
15
+ * Portalを使用するかどうか
16
+ * - `true` (デフォルト): body直下にポータルする。ModalDialog/Drawer内にある場合は自動的にそのコンテンツ内にポータルされる
17
+ * - `false`: ポータルを使用せず、その場にレンダリングする
18
+ * @default true
19
+ */
20
+ portalled?: boolean;
14
21
  };
15
22
  export declare const DropdownMenu: React.FC<DropdownMenuProps & MenuRootProps>;
@@ -1,16 +1,17 @@
1
- import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
- import { SerendieSymbolMenu as l, SerendieSymbolChevronDown as c } from "@serendie/symbols";
3
- import { Button as p } from "../Button/Button.js";
4
- import { IconButton as y } from "../IconButton/IconButton.js";
5
- import { Portal as u } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
6
- import { sva as g } from "../../styled-system/css/sva.js";
7
- import { MenuRoot as h } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-root.js";
8
- import { MenuTrigger as f } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js";
9
- import { MenuPositioner as x } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js";
10
- import { MenuContent as b } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-content.js";
11
- import { MenuItemGroup as S } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js";
12
- import { MenuItem as v } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-item.js";
13
- const I = g({
1
+ import { jsxs as m, jsx as e } from "react/jsx-runtime";
2
+ import { SerendieSymbolMenu as u, SerendieSymbolChevronDown as y } from "@serendie/symbols";
3
+ import { Button as g } from "../Button/Button.js";
4
+ import { IconButton as h } from "../IconButton/IconButton.js";
5
+ import { useAutoPortalContainer as f } from "../../hooks/useAutoPortalContainer.js";
6
+ import { Portal as x } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
7
+ import { sva as b } from "../../styled-system/css/sva.js";
8
+ import { MenuRoot as S } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-root.js";
9
+ import { MenuTrigger as I } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js";
10
+ import { MenuPositioner as v } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-positioner.js";
11
+ import { MenuContent as _ } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-content.js";
12
+ import { MenuItemGroup as C } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js";
13
+ import { MenuItem as M } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-item.js";
14
+ const w = b({
14
15
  slots: ["content", "itemGroup", "item", "itemIcon", "button", "buttonIcon"],
15
16
  base: {
16
17
  content: {
@@ -18,7 +19,8 @@ const I = g({
18
19
  borderRadius: "sd.system.dimension.radius.medium",
19
20
  bg: "sd.system.color.component.surface",
20
21
  boxShadow: "sd.system.elevation.shadow.level1",
21
- outline: "none"
22
+ outline: "none",
23
+ zIndex: "sd.system.elevation.zIndex.dropdown"
22
24
  },
23
25
  itemGroup: {
24
26
  width: 240
@@ -81,17 +83,18 @@ const I = g({
81
83
  transition: "transform 0.2s"
82
84
  }
83
85
  }
84
- }), A = ({
85
- styleType: m = "default",
86
- title: s,
87
- items: d,
88
- disabled: n,
89
- icon: r,
90
- ...a
86
+ }), O = ({
87
+ styleType: d = "default",
88
+ title: n,
89
+ items: a,
90
+ disabled: s,
91
+ icon: l,
92
+ portalled: i = !0,
93
+ ...c
91
94
  }) => {
92
- const o = I();
93
- return /* @__PURE__ */ i(
94
- h,
95
+ const o = w(), { triggerRef: r, portalContainerRef: p } = f(i);
96
+ return /* @__PURE__ */ m(
97
+ S,
95
98
  {
96
99
  positioning: {
97
100
  offset: {
@@ -99,30 +102,32 @@ const I = g({
99
102
  crossAxis: 0
100
103
  }
101
104
  },
102
- ...a,
105
+ ...c,
103
106
  children: [
104
- /* @__PURE__ */ e(f, { asChild: !0, children: m === "iconButton" ? /* @__PURE__ */ e(
105
- y,
107
+ /* @__PURE__ */ e(I, { asChild: !0, children: d === "iconButton" ? /* @__PURE__ */ e(
108
+ h,
106
109
  {
107
- icon: r || /* @__PURE__ */ e(l, { className: o.buttonIcon }),
110
+ ref: r,
111
+ icon: l || /* @__PURE__ */ e(u, { className: o.buttonIcon }),
108
112
  shape: "rectangle",
109
- disabled: n,
113
+ disabled: s,
110
114
  styleType: "outlined",
111
- title: s
115
+ title: n
112
116
  }
113
117
  ) : /* @__PURE__ */ e(
114
- p,
118
+ g,
115
119
  {
120
+ ref: r,
116
121
  styleType: "rectangle",
117
122
  size: "medium",
118
- disabled: n,
119
- rightIcon: /* @__PURE__ */ e(c, { className: o.buttonIcon }),
123
+ disabled: s,
124
+ rightIcon: /* @__PURE__ */ e(y, { className: o.buttonIcon }),
120
125
  className: o.button,
121
- children: s
126
+ children: n
122
127
  }
123
128
  ) }),
124
- /* @__PURE__ */ e(u, { children: /* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(b, { className: o.content, children: /* @__PURE__ */ e(S, { className: o.itemGroup, children: d.map((t) => /* @__PURE__ */ i(
125
- v,
129
+ /* @__PURE__ */ e(x, { disabled: !i, container: p, children: /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(_, { className: o.content, children: /* @__PURE__ */ e(C, { className: o.itemGroup, children: a.map((t) => /* @__PURE__ */ m(
130
+ M,
126
131
  {
127
132
  value: t.value,
128
133
  className: o.item,
@@ -138,6 +143,6 @@ const I = g({
138
143
  );
139
144
  };
140
145
  export {
141
- A as DropdownMenu,
142
- I as DropdownMenuStyle
146
+ O as DropdownMenu,
147
+ w as DropdownMenuStyle
143
148
  };
@@ -1,5 +1,6 @@
1
1
  import { DialogRootProps } from '@ark-ui/react';
2
2
  import { RecipeVariantProps } from '../../../styled-system/css';
3
+ import { ButtonProps } from '../Button';
3
4
  declare const ModalDialogStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"title" | "description" | "content" | "backdrop" | "contentInner" | "closeTrigger" | "buttonWrapper", import('../../../styled-system/types').SlotRecipeVariantRecord<"title" | "description" | "content" | "backdrop" | "contentInner" | "closeTrigger" | "buttonWrapper">>;
4
5
  type Props = {
5
6
  isOpen: boolean;
@@ -9,6 +10,7 @@ type Props = {
9
10
  cancelButtonLabel?: string;
10
11
  submitButtonLabel: string;
11
12
  onButtonClick: () => void;
13
+ submitButtonProps?: ButtonProps;
12
14
  };
13
15
  export type ModalDialogProps = Props & DialogRootProps & RecipeVariantProps<typeof ModalDialogStyle>;
14
16
  export declare const ModalDialog: React.FC<ModalDialogProps>;