@serendie/ui 2.5.0 → 2.5.1-dev.202602170627

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 (52) hide show
  1. package/README.md +63 -8
  2. package/dist/client.js +135 -119
  3. package/dist/components/Avatar/Avatar.js +3 -3
  4. package/dist/components/Badge/Badge.d.ts +6 -6
  5. package/dist/components/Badge/Badge.js +21 -21
  6. package/dist/components/Banner/Banner.d.ts +1 -4
  7. package/dist/components/Banner/Banner.js +8 -11
  8. package/dist/components/Button/Button.d.ts +0 -2
  9. package/dist/components/Button/Button.js +10 -11
  10. package/dist/components/CheckBox/CheckBox.js +4 -4
  11. package/dist/components/DatePicker/styles.js +1 -1
  12. package/dist/components/Divider/Divider.d.ts +2 -2
  13. package/dist/components/Divider/Divider.js +11 -11
  14. package/dist/components/Drawer/Drawer.js +3 -3
  15. package/dist/components/DropdownMenu/DropdownMenu.js +5 -5
  16. package/dist/components/IconButton/IconButton.d.ts +0 -1
  17. package/dist/components/IconButton/IconButton.js +0 -1
  18. package/dist/components/ModalDialog/ModalDialog.js +1 -1
  19. package/dist/components/ProgressIndicator/ProgressIndicator.js +9 -9
  20. package/dist/components/Search/Search.js +5 -5
  21. package/dist/components/Select/Select.js +14 -14
  22. package/dist/components/Switch/Switch.js +5 -5
  23. package/dist/components/TextField/TextField.js +52 -48
  24. package/dist/components/Toast/Toast.d.ts +3 -5
  25. package/dist/components/Toast/Toast.js +8 -10
  26. package/dist/i18n/index.d.ts +1 -1
  27. package/dist/i18n/provider.d.ts +29 -4
  28. package/dist/i18n/provider.js +31 -11
  29. package/dist/index.d.ts +2 -0
  30. package/dist/index.js +135 -119
  31. package/dist/node_modules/@serendie/design-token/dist/panda-tokens.js +310 -0
  32. package/dist/node_modules/@serendie/design-token/dist/tokens.js +126 -0
  33. package/dist/preset.d.ts +0 -930
  34. package/dist/styled-system/css/conditions.js +1 -1
  35. package/dist/styled-system/jsx/is-valid-prop.js +1 -1
  36. package/dist/styles.css +1 -1
  37. package/dist/theme/ThemeContext.d.ts +55 -0
  38. package/dist/theme/ThemeContext.js +15 -0
  39. package/dist/theme/index.d.ts +3 -0
  40. package/dist/theme/index.js +11 -0
  41. package/dist/theme/initColorScheme.d.ts +74 -0
  42. package/dist/theme/initColorScheme.js +32 -0
  43. package/dist/theme/useSystemColorScheme.d.ts +15 -0
  44. package/dist/theme/useSystemColorScheme.js +19 -0
  45. package/dist/tokens/getToken.d.ts +0 -378
  46. package/dist/tokens/index.d.ts +0 -930
  47. package/package.json +2 -2
  48. package/styled-system/css/conditions.js +1 -1
  49. package/styled-system/jsx/is-valid-prop.js +1 -1
  50. package/styled-system/themes/index.d.ts +6 -1
  51. package/styled-system/themes/theme-konjo-dark.json +5 -0
  52. package/styled-system/types/conditions.d.ts +2 -0
@@ -40,9 +40,9 @@ const v = {
40
40
  }, N = {
41
41
  width: 24,
42
42
  height: 24,
43
- color: "sd.system.color.component.outline",
43
+ color: "sd.system.color.component.outlineDim",
44
44
  _disabled: {
45
- color: "color-mix(in srgb, {colors.sd.system.color.component.outline}, {colors.sd.system.color.interaction.hoveredOnPrimary});"
45
+ color: "color-mix(in srgb, {colors.sd.system.color.component.outlineDim}, {colors.sd.system.color.interaction.hoveredOnPrimary});"
46
46
  }
47
47
  }, n = b({
48
48
  slots: [
@@ -93,7 +93,7 @@ const v = {
93
93
  }
94
94
  }
95
95
  }
96
- }), H = ({
96
+ }), F = ({
97
97
  value: m,
98
98
  label: l,
99
99
  helperText: s,
@@ -122,7 +122,7 @@ const v = {
122
122
  );
123
123
  };
124
124
  export {
125
- H as CheckBox,
125
+ F as CheckBox,
126
126
  n as CheckBoxStyle,
127
127
  _ as checkboxCheckedIconCss,
128
128
  v as checkboxIconCss,
@@ -21,7 +21,7 @@ const o = e({
21
21
  zIndex: "sd.system.elevation.zIndex.dropdown"
22
22
  },
23
23
  content: {
24
- background: "sd.system.color.component.surface",
24
+ background: "sd.system.color.component.surfaceContainerBright",
25
25
  borderRadius: "sd.system.dimension.radius.medium",
26
26
  boxShadow: "sd.system.elevation.shadow.level1",
27
27
  flexDirection: "column",
@@ -3,10 +3,10 @@ import { RecipeVariantProps } from '../../../styled-system/css';
3
3
  export declare const DividerStyle: import('../../../styled-system/types').RecipeRuntimeFn<{
4
4
  color: {
5
5
  light: {
6
- borderColor: "sd.reference.color.scale.gray.200";
6
+ borderColor: "sd.system.color.component.outlineBright";
7
7
  };
8
8
  normal: {
9
- borderColor: "sd.reference.color.scale.gray.300";
9
+ borderColor: "sd.system.color.component.outline";
10
10
  };
11
11
  dark: {
12
12
  borderColor: "sd.system.color.component.outlineDim";
@@ -1,17 +1,17 @@
1
- import { jsx as d } from "react/jsx-runtime";
2
- import { cva as n } from "../../styled-system/css/cva.js";
3
- import { cx as l } from "../../styled-system/css/cx.js";
4
- const r = n({
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cva as d } from "../../styled-system/css/cva.js";
3
+ import { cx as m } from "../../styled-system/css/cx.js";
4
+ const o = d({
5
5
  base: {
6
6
  border: "none"
7
7
  },
8
8
  variants: {
9
9
  color: {
10
10
  light: {
11
- borderColor: "sd.reference.color.scale.gray.200"
11
+ borderColor: "sd.system.color.component.outlineBright"
12
12
  },
13
13
  normal: {
14
- borderColor: "sd.reference.color.scale.gray.300"
14
+ borderColor: "sd.system.color.component.outline"
15
15
  },
16
16
  dark: {
17
17
  borderColor: "sd.system.color.component.outlineDim"
@@ -37,11 +37,11 @@ const r = n({
37
37
  color: "normal",
38
38
  type: "horizontal"
39
39
  }
40
- }), h = (e) => {
41
- const [o, s] = r.splitVariantProps(e), { className: t, ...i } = s;
42
- return /* @__PURE__ */ d("hr", { className: l(r(o), t), ...i });
40
+ }), p = (e) => {
41
+ const [r, t] = o.splitVariantProps(e), { className: s, ...i } = t;
42
+ return /* @__PURE__ */ n("hr", { className: m(o(r), s), ...i });
43
43
  };
44
44
  export {
45
- h as Divider,
46
- r as DividerStyle
45
+ p as Divider,
46
+ o as DividerStyle
47
47
  };
@@ -25,7 +25,7 @@ const n = h({
25
25
  maxWidth: "375px",
26
26
  height: "100vh",
27
27
  gap: "sd.system.dimension.spacing.twoExtraLarge",
28
- backgroundColor: "sd.system.color.component.surface",
28
+ backgroundColor: "sd.system.color.component.surfaceContainerBright",
29
29
  boxShadow: "sd.system.elevation.shadow.level5",
30
30
  zIndex: "sd.system.elevation.zIndex.modal"
31
31
  },
@@ -68,7 +68,7 @@ const n = h({
68
68
  defaultVariants: {
69
69
  type: "right"
70
70
  }
71
- }), W = ({
71
+ }), N = ({
72
72
  isOpen: r,
73
73
  children: i,
74
74
  contentClassName: a,
@@ -92,5 +92,5 @@ const n = h({
92
92
  ] }) });
93
93
  };
94
94
  export {
95
- W as Drawer
95
+ N as Drawer
96
96
  };
@@ -8,16 +8,16 @@ import { sva as b } from "../../styled-system/css/sva.js";
8
8
  import { MenuRoot as S } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-root.js";
9
9
  import { MenuTrigger as I } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-trigger.js";
10
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";
11
+ import { MenuContent as C } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-content.js";
12
+ import { MenuItemGroup as _ } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-item-group.js";
13
13
  import { MenuItem as M } from "../../node_modules/@ark-ui/react/dist/components/menu/menu-item.js";
14
14
  const w = b({
15
15
  slots: ["content", "itemGroup", "item", "itemIcon", "button", "buttonIcon"],
16
16
  base: {
17
17
  content: {
18
- bgColor: "sd.system.color.component.surface",
18
+ bgColor: "sd.system.color.component.surfaceContainerBright",
19
19
  borderRadius: "sd.system.dimension.radius.medium",
20
- bg: "sd.system.color.component.surface",
20
+ bg: "sd.system.color.component.surfaceContainerBright",
21
21
  boxShadow: "sd.system.elevation.shadow.level1",
22
22
  outline: "none",
23
23
  zIndex: "sd.system.elevation.zIndex.dropdown"
@@ -126,7 +126,7 @@ const w = b({
126
126
  children: n
127
127
  }
128
128
  ) }),
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(
129
+ /* @__PURE__ */ e(x, { disabled: !i, container: p, children: /* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(C, { className: o.content, children: /* @__PURE__ */ e(_, { className: o.itemGroup, children: a.map((t) => /* @__PURE__ */ m(
130
130
  M,
131
131
  {
132
132
  value: t.value,
@@ -27,7 +27,6 @@ export declare const IconButtonStyle: import('../../../styled-system/types').Rec
27
27
  };
28
28
  outlined: {
29
29
  outlineColor: "sd.system.color.component.outline";
30
- bgColor: "sd.system.color.component.surface";
31
30
  _enabled: {
32
31
  _hover: {
33
32
  bgColor: "sd.system.color.interaction.hoveredVariant";
@@ -52,7 +52,6 @@ const e = a({
52
52
  },
53
53
  outlined: {
54
54
  outlineColor: "sd.system.color.component.outline",
55
- bgColor: "sd.system.color.component.surface",
56
55
  _enabled: {
57
56
  _hover: {
58
57
  bgColor: "sd.system.color.interaction.hoveredVariant"
@@ -44,7 +44,7 @@ const N = f({
44
44
  paddingRight: "sd.system.dimension.spacing.extraLarge",
45
45
  paddingBottom: "sd.system.dimension.spacing.large",
46
46
  paddingLeft: "sd.system.dimension.spacing.extraLarge",
47
- backgroundColor: "sd.system.color.component.surface",
47
+ backgroundColor: "sd.system.color.component.surfaceContainerBright",
48
48
  boxShadow: "sd.system.elevation.shadow.level5",
49
49
  borderRadius: "sd.system.dimension.radius.medium",
50
50
  zIndex: "sd.system.elevation.zIndex.modal"
@@ -2,8 +2,8 @@ import { jsx as a, jsxs as f } from "react/jsx-runtime";
2
2
  import { useMemo as v } from "react";
3
3
  import { describeArc as b } from "./util.js";
4
4
  import { cx as h } from "../../styled-system/css/cx.js";
5
- import { cva as c } from "../../styled-system/css/cva.js";
6
- const u = c({
5
+ import { cva as n } from "../../styled-system/css/cva.js";
6
+ const u = n({
7
7
  base: {
8
8
  position: "relative",
9
9
  display: "flex",
@@ -74,10 +74,10 @@ const u = c({
74
74
  type: "linear",
75
75
  size: "medium"
76
76
  }
77
- }), p = c({
77
+ }), p = n({
78
78
  base: {
79
79
  position: "absolute",
80
- backgroundColor: "sd.reference.color.scale.gray.100",
80
+ backgroundColor: "sd.system.color.component.surfaceContainerDim",
81
81
  overflow: "hidden"
82
82
  },
83
83
  variants: {
@@ -101,7 +101,7 @@ const u = c({
101
101
  }
102
102
  },
103
103
  compoundVariants: []
104
- }), g = c({
104
+ }), g = n({
105
105
  base: {
106
106
  position: "absolute",
107
107
  backgroundColor: "sd.system.color.impression.primary"
@@ -138,7 +138,7 @@ const u = c({
138
138
  max: o = 1,
139
139
  type: i = "linear",
140
140
  size: s = "medium",
141
- className: n,
141
+ className: c,
142
142
  style: d,
143
143
  ...m
144
144
  }) => {
@@ -157,7 +157,7 @@ const u = c({
157
157
  return /* @__PURE__ */ a(
158
158
  "div",
159
159
  {
160
- className: h(u({ type: i, size: s }), n),
160
+ className: h(u({ type: i, size: s }), c),
161
161
  role: "progressbar",
162
162
  "aria-valuenow": t,
163
163
  "aria-valuemin": 0,
@@ -177,7 +177,7 @@ const u = c({
177
177
  cy: r + e,
178
178
  r,
179
179
  className: p({ type: i, size: s }),
180
- stroke: "var(--colors-sd-reference-color-scale-gray-100)",
180
+ stroke: "var(--colors-sd-system-color-component-surface-container-dim)",
181
181
  strokeWidth: e
182
182
  }
183
183
  ),
@@ -198,7 +198,7 @@ const u = c({
198
198
  return /* @__PURE__ */ a(
199
199
  "div",
200
200
  {
201
- className: h(u({ type: i, size: s }), n),
201
+ className: h(u({ type: i, size: s }), c),
202
202
  role: "progressbar",
203
203
  "aria-valuenow": t,
204
204
  "aria-valuemin": 0,
@@ -64,7 +64,7 @@ const h = M({
64
64
  }
65
65
  },
66
66
  combobox: {
67
- bgColor: "sd.system.color.component.surface",
67
+ bgColor: "sd.system.color.component.surfaceContainerBright",
68
68
  borderRadius: "sd.system.dimension.radius.medium",
69
69
  boxShadow: "sd.system.elevation.shadow.level1",
70
70
  zIndex: "sd.system.elevation.zIndex.dropdown",
@@ -157,10 +157,10 @@ const h = M({
157
157
  () => !!(e.inputValue || e.defaultInputValue)
158
158
  ), m = l.useRef(null), R = l.useMemo(() => a ? r.filter(
159
159
  (o) => o.toLowerCase().includes(a.toLowerCase())
160
- ) : r, [r, a]), f = j({ items: R }), _ = (o) => {
160
+ ) : r, [r, a]), f = j({ items: R }), B = (o) => {
161
161
  var n;
162
162
  d || g(o.inputValue), c(o.inputValue.length > 0), (n = e.onInputValueChange) == null || n.call(e, o);
163
- }, B = (o) => {
163
+ }, _ = (o) => {
164
164
  var n;
165
165
  o.value.length > 0 && (i == null || i(o.value[0])), (n = e.onValueChange) == null || n.call(e, o);
166
166
  }, N = (o) => {
@@ -180,8 +180,8 @@ const h = M({
180
180
  collection: f,
181
181
  openOnClick: !0,
182
182
  allowCustomValue: x,
183
- onInputValueChange: _,
184
- onValueChange: B,
183
+ onInputValueChange: B,
184
+ onValueChange: _,
185
185
  onHighlightChange: N,
186
186
  lazyMount: !0,
187
187
  unmountOnExit: !0,
@@ -6,8 +6,8 @@ import { useAutoPortalContainer as R } from "../../hooks/useAutoPortalContainer.
6
6
  import { useTranslations as z } from "../../i18n/index.js";
7
7
  import { createListCollection as P } from "../../node_modules/@ark-ui/react/dist/components/collection/list-collection.js";
8
8
  import { Portal as V } from "../../node_modules/@ark-ui/react/dist/components/portal/portal.js";
9
- import { sva as L } from "../../styled-system/css/sva.js";
10
- import { SelectRoot as B } from "../../node_modules/@ark-ui/react/dist/components/select/select-root.js";
9
+ import { sva as B } from "../../styled-system/css/sva.js";
10
+ import { SelectRoot as L } from "../../node_modules/@ark-ui/react/dist/components/select/select-root.js";
11
11
  import { cx as I } from "../../styled-system/css/cx.js";
12
12
  import { SelectLabel as A } from "../../node_modules/@ark-ui/react/dist/components/select/select-label.js";
13
13
  import { css as r } from "../../styled-system/css/css.js";
@@ -17,7 +17,7 @@ import { SelectValueText as W } from "../../node_modules/@ark-ui/react/dist/comp
17
17
  import { SelectPositioner as E } from "../../node_modules/@ark-ui/react/dist/components/select/select-positioner.js";
18
18
  import { SelectContent as k } from "../../node_modules/@ark-ui/react/dist/components/select/select-content.js";
19
19
  import { SelectItem as q } from "../../node_modules/@ark-ui/react/dist/components/select/select-item.js";
20
- const c = L({
20
+ const c = B({
21
21
  slots: ["root", "valueText", "trigger", "content", "item", "iconBox"],
22
22
  base: {
23
23
  root: {
@@ -82,7 +82,7 @@ const c = L({
82
82
  }
83
83
  },
84
84
  content: {
85
- bgColor: "sd.system.color.component.surface",
85
+ bgColor: "sd.system.color.component.surfaceContainerBright",
86
86
  borderRadius: "sd.system.dimension.radius.medium",
87
87
  boxShadow: "sd.system.elevation.shadow.level1",
88
88
  zIndex: "sd.system.elevation.zIndex.dropdown",
@@ -164,19 +164,19 @@ const c = L({
164
164
  required: y,
165
165
  requiredLabel: g,
166
166
  invalid: d,
167
- invalidMessage: m,
167
+ invalidMessage: n,
168
168
  className: u,
169
- items: x = [],
170
- portalled: n = !0,
171
- ...h
169
+ items: h = [],
170
+ portalled: m = !0,
171
+ ...x
172
172
  }) => {
173
- const b = z(), [t, f] = c.splitVariantProps(h), o = c(t), { collection: D, ...S } = f, { triggerRef: v, portalContainerRef: w } = R(n), l = P({
174
- items: x,
173
+ const b = z(), [t, f] = c.splitVariantProps(x), o = c(t), { collection: D, ...S } = f, { triggerRef: v, portalContainerRef: w } = R(m), l = P({
174
+ items: h,
175
175
  itemToString: (s) => s.label,
176
176
  itemToValue: (s) => s.value
177
177
  });
178
178
  return /* @__PURE__ */ i(
179
- B,
179
+ L,
180
180
  {
181
181
  ...S,
182
182
  collection: l,
@@ -225,7 +225,7 @@ const c = L({
225
225
  ),
226
226
  /* @__PURE__ */ e(C, { className: o.iconBox })
227
227
  ] }) }),
228
- d && m && /* @__PURE__ */ e(
228
+ d && n && /* @__PURE__ */ e(
229
229
  "div",
230
230
  {
231
231
  className: r({
@@ -235,10 +235,10 @@ const c = L({
235
235
  },
236
236
  color: "sd.system.color.impression.negative"
237
237
  }),
238
- children: m
238
+ children: n
239
239
  }
240
240
  ),
241
- /* @__PURE__ */ e(V, { disabled: !n, container: w, children: /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(k, { className: o.content, children: /* @__PURE__ */ e(T, { children: l.items.map((s, _) => /* @__PURE__ */ e(q, { item: s, children: /* @__PURE__ */ e(
241
+ /* @__PURE__ */ e(V, { disabled: !m, container: w, children: /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(k, { className: o.content, children: /* @__PURE__ */ e(T, { children: l.items.map((s, _) => /* @__PURE__ */ e(q, { item: s, children: /* @__PURE__ */ e(
242
242
  N,
243
243
  {
244
244
  title: s.label,
@@ -35,8 +35,8 @@ const n = u({
35
35
  transitionProperty: "background, borderColor",
36
36
  transitionTimingFunction: "cubic-bezier(.2, 0, 0, 1)",
37
37
  _checked: {
38
- backgroundColor: "sd.system.color.impression.primary",
39
- borderColor: "sd.system.color.impression.primary",
38
+ backgroundColor: "sd.system.color.impression.primaryContainer",
39
+ borderColor: "sd.system.color.impression.primaryContainer",
40
40
  _disabled: {
41
41
  backgroundColor: "color-mix(in srgb, {colors.sd.system.color.impression.primary}, {colors.sd.system.color.interaction.hoveredOnPrimary});",
42
42
  borderColor: "transparent"
@@ -97,7 +97,7 @@ const n = u({
97
97
  }
98
98
  }
99
99
  }), F = y(
100
- ({ label: d, helperText: s, className: a, ...l }, m) => {
100
+ ({ label: a, helperText: s, className: d, ...l }, m) => {
101
101
  const [c, p] = n.splitVariantProps(l), o = n(c);
102
102
  return /* @__PURE__ */ e(
103
103
  b,
@@ -107,12 +107,12 @@ const n = u({
107
107
  "group",
108
108
  o.root,
109
109
  s && x({ alignItems: "flex-start" }),
110
- a
110
+ d
111
111
  ),
112
112
  ...p,
113
113
  children: [
114
114
  /* @__PURE__ */ e("div", { className: o.textGroup, children: [
115
- /* @__PURE__ */ r(i, { className: o.label, children: d }),
115
+ /* @__PURE__ */ r(i, { className: o.label, children: a }),
116
116
  s && /* @__PURE__ */ r(i, { className: o.helperText, children: s })
117
117
  ] }),
118
118
  /* @__PURE__ */ r(h, { className: t("control", o.control), children: /* @__PURE__ */ r(g, { className: o.thumb }) }),
@@ -1,82 +1,86 @@
1
- import { jsxs as a, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
2
  import { SerendieSymbolAlertCircle as A, SerendieSymbolClose as W } from "@serendie/symbols";
3
3
  import z from "../../node_modules/merge-refs/dist/esm/index.js";
4
4
  import m, { forwardRef as B } from "react";
5
- import { textFieldRecipe as F } from "../../recipes/textFieldRecipe.js";
6
- import { useTranslations as D } from "../../i18n/index.js";
7
- import { cx as E } from "../../styled-system/css/cx.js";
8
- import { css as V } from "../../styled-system/css/css.js";
9
- const U = B(
5
+ import { textFieldRecipe as b } from "../../recipes/textFieldRecipe.js";
6
+ import { useTranslations as E } from "../../i18n/index.js";
7
+ import { cx as G } from "../../styled-system/css/cx.js";
8
+ import { css as w } from "../../styled-system/css/css.js";
9
+ const X = B(
10
10
  ({
11
- placeholder: b,
11
+ placeholder: F,
12
12
  label: d,
13
- description: i,
13
+ description: o,
14
14
  required: u,
15
- requiredLabel: S,
16
- invalidMessage: c,
17
- invalid: r,
18
- type: w = "text",
19
- disabled: n,
20
- onChange: h,
21
- value: f,
22
- className: y,
23
- leftContent: N,
24
- rightContent: p,
15
+ requiredLabel: V,
16
+ invalidMessage: i,
17
+ invalid: s,
18
+ type: y = "text",
19
+ disabled: c,
20
+ onChange: f,
21
+ value: h,
22
+ className: C,
23
+ leftContent: p,
24
+ rightContent: N,
25
25
  ...l
26
- }, C) => {
27
- const v = D(), o = m.useRef(null), P = z(o, C), [_, j] = F.splitVariantProps({
26
+ }, P) => {
27
+ const v = E(), a = m.useRef(null), S = z(a, P), [D, _] = b.splitVariantProps({
28
28
  ...l
29
- }), t = F(_), I = i || r && c, [T, k] = m.useState(l.defaultValue || f), g = l.id || m.useId(), q = () => {
29
+ }), t = b(D), j = o || s && i, [I, T] = m.useState(l.defaultValue || h), g = l.id || m.useId(), k = () => {
30
30
  var x;
31
- const s = {
31
+ const r = {
32
32
  target: { value: "" }
33
33
  };
34
- R(s), (x = l.onReset) == null || x.call(l, s), o.current && (o.current.value = "");
35
- }, R = (s) => {
36
- k(s.target.value), h && h(s);
34
+ R(r), (x = l.onReset) == null || x.call(l, r), a.current && (a.current.value = "", a.current.focus());
35
+ }, q = (r) => {
36
+ r.button === 0 && r.preventDefault();
37
+ }, R = (r) => {
38
+ T(r.target.value), f && f(r);
37
39
  };
38
- return /* @__PURE__ */ a("div", { className: E(t.root, y), children: [
39
- d ? /* @__PURE__ */ a("label", { className: t.label, htmlFor: g, children: [
40
+ return /* @__PURE__ */ n("div", { className: G(t.root, C), children: [
41
+ d ? /* @__PURE__ */ n("label", { className: t.label, htmlFor: g, children: [
40
42
  d,
41
- u && /* @__PURE__ */ e("span", { className: t.labelRequired, children: S ?? v("common.required") })
43
+ u && /* @__PURE__ */ e("span", { className: t.labelRequired, children: V ?? v("common.required") })
42
44
  ] }) : null,
43
- /* @__PURE__ */ a(
45
+ /* @__PURE__ */ n(
44
46
  "div",
45
47
  {
46
48
  className: t.inputWrapper,
47
- "data-invalid": r ? !0 : void 0,
48
- "data-disabled": n ? !0 : void 0,
49
+ "data-invalid": s ? !0 : void 0,
50
+ "data-disabled": c ? !0 : void 0,
49
51
  children: [
50
- N ? /* @__PURE__ */ e("div", { className: t.leftContent, children: N }) : /* @__PURE__ */ e("div", {}),
52
+ p ? /* @__PURE__ */ e("div", { className: t.leftContent, children: p }) : /* @__PURE__ */ e("div", {}),
51
53
  /* @__PURE__ */ e(
52
54
  "input",
53
55
  {
54
- ref: P,
56
+ ref: S,
55
57
  id: g,
56
- placeholder: b,
58
+ placeholder: F,
57
59
  required: u,
58
- disabled: n,
59
- value: f,
60
- type: w,
60
+ disabled: c,
61
+ value: h,
62
+ type: y,
61
63
  className: t.input,
62
64
  onChange: R,
63
- ...j
65
+ ..._
64
66
  }
65
67
  ),
66
- p ? /* @__PURE__ */ e("div", { className: t.rightContent, children: p }) : /* @__PURE__ */ e("div", { className: t.icon, children: !n && /* disabledの場合はアイコンを表示しない */
67
- (r ? /* @__PURE__ */ e(
68
+ N ? /* @__PURE__ */ e("div", { className: t.rightContent, children: N }) : /* @__PURE__ */ e("div", { className: t.icon, children: !c && /* disabledの場合はアイコンを表示しない */
69
+ (s ? /* @__PURE__ */ e(
68
70
  "span",
69
71
  {
70
- className: V({
72
+ className: w({
71
73
  color: "sd.system.color.impression.negative"
72
74
  }),
73
75
  children: /* @__PURE__ */ e(A, { width: 20, height: 20 })
74
76
  }
75
- ) : T ? /* @__PURE__ */ e(
77
+ ) : I ? /* @__PURE__ */ e(
76
78
  "button",
77
79
  {
78
- className: V({ cursor: "pointer" }),
79
- onClick: q,
80
+ type: "button",
81
+ className: w({ cursor: "pointer" }),
82
+ onPointerDown: q,
83
+ onClick: k,
80
84
  "aria-label": v("textField.clearValue"),
81
85
  children: /* @__PURE__ */ e(W, { width: 20, height: 20 })
82
86
  }
@@ -84,13 +88,13 @@ const U = B(
84
88
  ]
85
89
  }
86
90
  ),
87
- I && /* @__PURE__ */ a("div", { className: t.messageField, children: [
88
- i && /* @__PURE__ */ e("p", { className: t.description, children: i }),
89
- r && c && /* @__PURE__ */ e("p", { className: t.invalidMessage, children: c })
91
+ j && /* @__PURE__ */ n("div", { className: t.messageField, children: [
92
+ o && /* @__PURE__ */ e("p", { className: t.description, children: o }),
93
+ s && i && /* @__PURE__ */ e("p", { className: t.invalidMessage, children: i })
90
94
  ] })
91
95
  ] });
92
96
  }
93
97
  );
94
98
  export {
95
- U as TextField
99
+ X as TextField
96
100
  };
@@ -3,20 +3,18 @@ export declare const ToastStyle: import('../../../styled-system/types').SlotReci
3
3
  variant: {
4
4
  default: {
5
5
  root: {
6
- background: "sd.system.color.component.inverseSurface";
6
+ background: "sd.system.color.impression.positiveContainer";
7
7
  };
8
8
  text: {
9
- color: "sd.system.color.component.inverseOnSurface";
9
+ color: "sd.system.color.impression.onPositiveContainer";
10
10
  };
11
11
  icon: {
12
- color: "sd.system.color.impression.positive";
12
+ color: "sd.system.color.impression.onPositiveContainer";
13
13
  };
14
14
  };
15
15
  error: {
16
16
  root: {
17
17
  background: "sd.system.color.impression.negativeContainer";
18
- borderColor: "sd.system.color.impression.negative";
19
- borderWidth: number;
20
18
  };
21
19
  text: {
22
20
  color: "sd.system.color.impression.negative";
@@ -35,20 +35,18 @@ const x = d({
35
35
  variant: {
36
36
  default: {
37
37
  root: {
38
- background: "sd.system.color.component.inverseSurface"
38
+ background: "sd.system.color.impression.positiveContainer"
39
39
  },
40
40
  text: {
41
- color: "sd.system.color.component.inverseOnSurface"
41
+ color: "sd.system.color.impression.onPositiveContainer"
42
42
  },
43
43
  icon: {
44
- color: "sd.system.color.impression.positive"
44
+ color: "sd.system.color.impression.onPositiveContainer"
45
45
  }
46
46
  },
47
47
  error: {
48
48
  root: {
49
- background: "sd.system.color.impression.negativeContainer",
50
- borderColor: "sd.system.color.impression.negative",
51
- borderWidth: 1
49
+ background: "sd.system.color.impression.negativeContainer"
52
50
  },
53
51
  text: {
54
52
  color: "sd.system.color.impression.negative"
@@ -62,9 +60,9 @@ const x = d({
62
60
  defaultVariants: {
63
61
  variant: "default"
64
62
  }
65
- }), T = m({
63
+ }), C = m({
66
64
  placement: "bottom"
67
- }), C = ({ toaster: r }) => /* @__PURE__ */ o(c, { toaster: r, children: (t) => {
65
+ }), T = ({ toaster: r }) => /* @__PURE__ */ o(c, { toaster: r, children: (t) => {
68
66
  const s = t.type === "error" ? "error" : "default", e = x({ variant: s }), i = s === "error" ? /* @__PURE__ */ o(n, { className: e.icon }) : /* @__PURE__ */ o(l, { className: e.icon });
69
67
  return /* @__PURE__ */ o(p, { className: e.root, children: /* @__PURE__ */ a("div", { className: e.textGroup, children: [
70
68
  i,
@@ -72,7 +70,7 @@ const x = d({
72
70
  ] }) }, t.id);
73
71
  } });
74
72
  export {
75
- C as Toast,
73
+ T as Toast,
76
74
  x as ToastStyle,
77
- T as toaster
75
+ C as toaster
78
76
  };
@@ -1,6 +1,6 @@
1
1
  import { dictionary } from './dictionary';
2
2
  import { Language } from './provider';
3
- export { SerendieProvider, LanguageProvider, type Language } from './provider';
3
+ export { SerendieProvider, LanguageProvider, type Language, type SerendieProviderProps, } from './provider';
4
4
  export type TranslationKey = keyof typeof dictionary.ja;
5
5
  /**
6
6
  * 翻訳関数を生成するヘルパー