@serendie/ui 2.2.3 → 2.2.4-dev.202510160446

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 (40) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +1 -1
  2. package/dist/components/Avatar/Avatar.d.ts +1 -1
  3. package/dist/components/Banner/Banner.d.ts +1 -1
  4. package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
  5. package/dist/components/Button/Button.d.ts +2 -2
  6. package/dist/components/DatePicker/DatePicker.d.ts +5 -5
  7. package/dist/components/DatePicker/DatePicker.js +79 -77
  8. package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
  9. package/dist/components/IconButton/IconButton.d.ts +3 -3
  10. package/dist/components/List/ListItem.d.ts +1 -1
  11. package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
  12. package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
  13. package/dist/components/Pagination/Pagination.d.ts +1 -1
  14. package/dist/components/Search/Search.d.ts +1 -1
  15. package/dist/components/Select/Select.d.ts +1 -1
  16. package/dist/components/Select/Select.js +12 -8
  17. package/dist/components/Switch/Switch.d.ts +1 -1
  18. package/dist/components/Tabs/Tabs.d.ts +1 -1
  19. package/dist/components/TextArea/TextArea.d.ts +1 -0
  20. package/dist/components/TextArea/TextArea.js +15 -8
  21. package/dist/components/TextField/TextField.d.ts +2 -0
  22. package/dist/components/TextField/TextField.js +4 -2
  23. package/dist/components/Toast/Toast.d.ts +1 -1
  24. package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
  25. package/dist/preset.d.ts +0 -3
  26. package/dist/preset.js +7 -9
  27. package/dist/recipes/textFieldRecipe.d.ts +9 -2
  28. package/dist/recipes/textFieldRecipe.js +13 -3
  29. package/dist/styled-system/css/cva.js +38 -43
  30. package/dist/styles.css +1 -1
  31. package/package.json +1 -1
  32. package/dist/recipes/index.d.ts +0 -3
  33. package/dist/recipes/index.js +0 -7
  34. package/dist/styled-system/recipes/create-recipe.js +0 -37
  35. package/dist/styled-system/recipes/text-field-recipe.js +0 -61
  36. package/styled-system/recipes/create-recipe.js +0 -82
  37. package/styled-system/recipes/index.d.ts +0 -2
  38. package/styled-system/recipes/index.js +0 -1
  39. package/styled-system/recipes/text-field-recipe.d.ts +0 -28
  40. package/styled-system/recipes/text-field-recipe.js +0 -72
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { RecipeVariantProps } from '../../../styled-system/css';
3
3
  import { NotificationBadgeProps } from '../NotificationBadge';
4
- declare const topAppBarStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"container" | "left" | "root" | "title" | "buttonContainer", {
4
+ declare const topAppBarStyle: import('../../../styled-system/types').SlotRecipeRuntimeFn<"title" | "container" | "left" | "root" | "buttonContainer", {
5
5
  type: {
6
6
  navbar: {};
7
7
  titleBar: {};
package/dist/preset.d.ts CHANGED
@@ -1177,9 +1177,6 @@ export declare const SerendiePreset: {
1177
1177
  breakpoints: {
1178
1178
  expanded: string;
1179
1179
  };
1180
- recipes: {
1181
- textFieldRecipe: import('../styled-system/types').SlotRecipeConfig;
1182
- };
1183
1180
  tokens: {
1184
1181
  sizes: {
1185
1182
  sd: {
package/dist/preset.js CHANGED
@@ -1,20 +1,18 @@
1
- import { SerendieRecipes as e } from "./recipes/index.js";
2
- import { SerendieTypography as r, SerendieTokens as n } from "./tokens/index.js";
1
+ import { SerendieTypography as e, SerendieTokens as n } from "./tokens/index.js";
3
2
  import { getToken as t } from "./tokens/getToken.js";
4
3
  import { SerendieKeyframes as o } from "./tokens/keyframes/index.js";
5
- const { sd: s } = t(), { themes: f, ...i } = n, k = {
4
+ const { sd: r } = t(), { themes: p, ...s } = n, a = {
6
5
  name: "serendie",
7
6
  theme: {
8
7
  extend: {
9
8
  breakpoints: {
10
- expanded: s.system.dimension.breakpoint.expanded
9
+ expanded: r.system.dimension.breakpoint.expanded
11
10
  },
12
- recipes: e,
13
11
  tokens: {
14
- ...i
12
+ ...s
15
13
  },
16
14
  textStyles: {
17
- ...r
15
+ ...e
18
16
  },
19
17
  keyframes: {
20
18
  ...o
@@ -23,6 +21,6 @@ const { sd: s } = t(), { themes: f, ...i } = n, k = {
23
21
  }
24
22
  };
25
23
  export {
26
- k as SerendiePreset,
27
- f as themes
24
+ a as SerendiePreset,
25
+ p as themes
28
26
  };
@@ -1,6 +1,13 @@
1
- import { SlotRecipeConfig } from '../../styled-system/types';
2
1
  /**
3
2
  * 共通フォームスタイルレシピ
4
3
  * TextField、DatePicker、Select、TextAreaなどのフォームコンポーネントで共通のスタイルを定義
5
4
  */
6
- export declare const textFieldRecipe: SlotRecipeConfig;
5
+ export declare const textFieldRecipe: import('../../styled-system/types').SlotRecipeRuntimeFn<"icon" | "description" | "input" | "label" | "root" | "labelRequired" | "inputWrapper" | "leftContent" | "rightContent" | "messageField" | "invalidMessage", {
6
+ fullWidth: {
7
+ true: {
8
+ root: {
9
+ width: "100%";
10
+ };
11
+ };
12
+ };
13
+ }>;
@@ -1,4 +1,5 @@
1
- const e = {
1
+ import { sva as e } from "../styled-system/css/sva.js";
2
+ const o = e({
2
3
  className: "input",
3
4
  slots: [
4
5
  "root",
@@ -100,8 +101,17 @@ const e = {
100
101
  invalidMessage: {
101
102
  color: "sd.system.color.impression.negative"
102
103
  }
104
+ },
105
+ variants: {
106
+ fullWidth: {
107
+ true: {
108
+ root: {
109
+ width: "100%"
110
+ }
111
+ }
112
+ }
103
113
  }
104
- };
114
+ });
105
115
  export {
106
- e as textFieldRecipe
116
+ o as textFieldRecipe
107
117
  };
@@ -1,65 +1,60 @@
1
- import { memo as y, compact as C, splitProps as h, uniq as w, mergeProps as E } from "../helpers.js";
2
- import { mergeCss as f, css as P } from "./css.js";
3
- const g = (s) => ({
1
+ import { memo as y, compact as C, splitProps as P, uniq as h, mergeProps as E } from "../helpers.js";
2
+ import { mergeCss as u, css as K } from "./css.js";
3
+ const j = (n) => ({
4
4
  base: {},
5
5
  variants: {},
6
6
  defaultVariants: {},
7
7
  compoundVariants: [],
8
- ...s
8
+ ...n
9
9
  });
10
- function K(s) {
11
- const { base: a, variants: t, defaultVariants: e, compoundVariants: m } = g(s), i = (n) => ({ ...e, ...C(n) });
12
- function o(n = {}) {
13
- var l;
14
- const r = i(n);
15
- let c = { ...a };
16
- for (const [V, v] of Object.entries(r))
17
- (l = t[V]) != null && l[v] && (c = f(c, t[V][v]));
18
- const u = M(m, r);
19
- return f(c, u);
10
+ function M(n) {
11
+ const { base: f, variants: s, defaultVariants: e, compoundVariants: m } = j(n), o = (t) => ({ ...e, ...C(t) });
12
+ function a(t = {}) {
13
+ var d;
14
+ const r = o(t);
15
+ let i = { ...f };
16
+ for (const [l, V] of Object.entries(r))
17
+ (d = s[l]) != null && d[V] && (i = u(i, s[l][V]));
18
+ const c = A(m, r);
19
+ return u(i, c);
20
20
  }
21
- function d(n) {
22
- const r = g(n.config), c = w(n.variantKeys, Object.keys(t));
23
- return K({
24
- base: f(a, r.base),
21
+ function v(t) {
22
+ const r = j(t.config), i = h(t.variantKeys, Object.keys(s));
23
+ return M({
24
+ base: u(f, r.base),
25
25
  variants: Object.fromEntries(
26
- c.map((u) => [u, f(t[u], r.variants[u])])
26
+ i.map((c) => [c, u(s[c], r.variants[c])])
27
27
  ),
28
28
  defaultVariants: E(e, r.defaultVariants),
29
29
  compoundVariants: [...m, ...r.compoundVariants]
30
30
  });
31
31
  }
32
- function p(n) {
33
- return P(o(n));
32
+ function p(t) {
33
+ return K(a(t));
34
34
  }
35
- const b = Object.keys(t);
36
- function j(n) {
37
- return h(n, b);
35
+ const b = Object.keys(s);
36
+ function O(t) {
37
+ return P(t, b);
38
38
  }
39
- const O = Object.fromEntries(Object.entries(t).map(([n, r]) => [n, Object.keys(r)]));
39
+ const g = Object.fromEntries(Object.entries(s).map(([t, r]) => [t, Object.keys(r)]));
40
40
  return Object.assign(y(p), {
41
41
  __cva__: !0,
42
- variantMap: O,
42
+ variantMap: g,
43
43
  variantKeys: b,
44
- raw: o,
45
- config: s,
46
- merge: d,
47
- splitVariantProps: j,
48
- getVariantProps: i
44
+ raw: a,
45
+ config: n,
46
+ merge: v,
47
+ splitVariantProps: O,
48
+ getVariantProps: o
49
49
  });
50
50
  }
51
- function M(s, a) {
52
- let t = {};
53
- return s.forEach((e) => {
54
- Object.entries(e).every(([i, o]) => i === "css" ? !0 : (Array.isArray(o) ? o : [o]).some((p) => a[i] === p)) && (t = f(t, e.css));
55
- }), t;
56
- }
57
- function $(s, a, t, e) {
58
- if (a.length > 0 && typeof (t == null ? void 0 : t[e]) == "object")
59
- throw new Error(`[recipe:${s}:${e}] Conditions are not supported when using compound variants.`);
51
+ function A(n, f) {
52
+ let s = {};
53
+ return n.forEach((e) => {
54
+ Object.entries(e).every(([o, a]) => o === "css" ? !0 : (Array.isArray(a) ? a : [a]).some((p) => f[o] === p)) && (s = u(s, e.css));
55
+ }), s;
60
56
  }
61
57
  export {
62
- $ as assertCompoundVariant,
63
- K as cva,
64
- M as getCompoundVariantCss
58
+ M as cva,
59
+ A as getCompoundVariantCss
65
60
  };