@serendie/ui 2.1.3 → 2.2.0

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 (122) hide show
  1. package/dist/client.js +79 -74
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Avatar/Avatar.d.ts +1 -1
  4. package/dist/components/Banner/Banner.d.ts +1 -1
  5. package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
  6. package/dist/components/Button/Button.d.ts +2 -2
  7. package/dist/components/Button/Button.js +22 -21
  8. package/dist/components/DatePicker/DatePicker.d.ts +13 -0
  9. package/dist/components/DatePicker/DatePicker.js +203 -0
  10. package/dist/components/DatePicker/index.d.ts +2 -0
  11. package/dist/components/DatePicker/index.js +6 -0
  12. package/dist/components/DatePicker/parseDate.d.ts +1 -0
  13. package/dist/components/DatePicker/styles.d.ts +1 -0
  14. package/dist/components/DatePicker/styles.js +224 -0
  15. package/dist/components/IconButton/IconButton.d.ts +3 -3
  16. package/dist/components/List/ListItem.d.ts +1 -1
  17. package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
  18. package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
  19. package/dist/components/Pagination/Pagination.d.ts +1 -1
  20. package/dist/components/ProgressIndicator/AnimatedArc.d.ts +6 -0
  21. package/dist/components/ProgressIndicator/AnimatedArc.js +46 -0
  22. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +11 -29
  23. package/dist/components/ProgressIndicator/ProgressIndicator.js +201 -43
  24. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.d.ts +10 -0
  25. package/dist/components/ProgressIndicator/ProgressIndicatorIndeterminate.js +215 -0
  26. package/dist/components/ProgressIndicator/index.d.ts +4 -1
  27. package/dist/components/ProgressIndicator/index.js +3 -2
  28. package/dist/components/ProgressIndicator/util.d.ts +1 -0
  29. package/dist/components/ProgressIndicator/util.js +13 -0
  30. package/dist/components/Search/Search.d.ts +1 -1
  31. package/dist/components/Select/Select.d.ts +1 -1
  32. package/dist/components/Switch/Switch.d.ts +1 -1
  33. package/dist/components/Tabs/Tabs.d.ts +1 -1
  34. package/dist/components/TextField/TextField.js +59 -156
  35. package/dist/components/Toast/Toast.d.ts +1 -1
  36. package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
  37. package/dist/index.d.ts +1 -0
  38. package/dist/index.js +80 -75
  39. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-content.js +15 -0
  40. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-context.js +5 -0
  41. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-control.js +13 -0
  42. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-input.js +14 -0
  43. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-label.js +13 -0
  44. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-month-select.js +13 -0
  45. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-next-trigger.js +14 -0
  46. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-positioner.js +14 -0
  47. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-prev-trigger.js +14 -0
  48. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-root.js +55 -0
  49. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-body.js +14 -0
  50. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell-trigger.js +19 -0
  51. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-cell.js +26 -0
  52. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-head.js +14 -0
  53. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-header.js +14 -0
  54. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table-row.js +14 -0
  55. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-table.js +16 -0
  56. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-trigger.js +13 -0
  57. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view-control.js +14 -0
  58. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-view.js +23 -0
  59. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker-year-select.js +13 -0
  60. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/date-picker.anatomy.js +5 -0
  61. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-context.js +10 -0
  62. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-cell-props-context.js +10 -0
  63. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-table-props-context.js +10 -0
  64. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker-view-props-context.js +12 -0
  65. package/dist/node_modules/@ark-ui/react/dist/components/date-picker/use-date-picker.js +18 -0
  66. package/dist/node_modules/@ark-ui/react/dist/components/factory.js +11 -12
  67. package/dist/node_modules/@ark-ui/react/dist/components/menu/menu-root.js +5 -4
  68. package/dist/node_modules/@ark-ui/react/dist/utils/use-event.js +0 -1
  69. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +36 -36
  70. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +238 -235
  71. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +88 -83
  72. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +68 -67
  73. package/dist/node_modules/@internationalized/date/dist/CalendarDate.js +178 -0
  74. package/dist/node_modules/@internationalized/date/dist/DateFormatter.js +99 -0
  75. package/dist/node_modules/@internationalized/date/dist/GregorianCalendar.js +98 -0
  76. package/dist/node_modules/@internationalized/date/dist/conversion.js +135 -0
  77. package/dist/node_modules/@internationalized/date/dist/manipulation.js +205 -0
  78. package/dist/node_modules/@internationalized/date/dist/queries.js +202 -0
  79. package/dist/node_modules/@internationalized/date/dist/string.js +41 -0
  80. package/dist/node_modules/@internationalized/date/dist/utils.js +6 -0
  81. package/dist/node_modules/@internationalized/date/dist/weekStartData.js +100 -0
  82. package/dist/node_modules/@swc/helpers/esm/_check_private_redeclaration.js +7 -0
  83. package/dist/node_modules/@swc/helpers/esm/_class_private_field_init.js +7 -0
  84. package/dist/node_modules/@zag-js/anatomy/dist/index.js +15 -14
  85. package/dist/node_modules/@zag-js/aria-hidden/dist/index.js +23 -23
  86. package/dist/node_modules/@zag-js/collection/dist/index.js +102 -71
  87. package/dist/node_modules/@zag-js/combobox/dist/index.js +482 -426
  88. package/dist/node_modules/@zag-js/date-picker/dist/index.js +1826 -0
  89. package/dist/node_modules/@zag-js/date-utils/dist/index.js +366 -0
  90. package/dist/node_modules/@zag-js/dialog/dist/index.js +66 -64
  91. package/dist/node_modules/@zag-js/dismissable/dist/index.js +94 -69
  92. package/dist/node_modules/@zag-js/dom-query/dist/index.js +359 -300
  93. package/dist/node_modules/@zag-js/live-region/dist/index.js +39 -0
  94. package/dist/node_modules/@zag-js/menu/dist/index.js +357 -340
  95. package/dist/node_modules/@zag-js/popper/dist/index.js +123 -120
  96. package/dist/node_modules/@zag-js/presence/dist/index.js +17 -17
  97. package/dist/node_modules/@zag-js/radio-group/dist/index.js +118 -117
  98. package/dist/node_modules/@zag-js/react/dist/index.js +124 -121
  99. package/dist/node_modules/@zag-js/select/dist/index.js +211 -197
  100. package/dist/node_modules/@zag-js/toast/dist/index.js +73 -71
  101. package/dist/node_modules/@zag-js/tooltip/dist/index.js +31 -30
  102. package/dist/node_modules/@zag-js/utils/dist/index.js +150 -104
  103. package/dist/preset.d.ts +11 -1
  104. package/dist/recipes/index.d.ts +3 -2
  105. package/dist/recipes/index.js +5 -2
  106. package/dist/recipes/textFieldRecipe.d.ts +6 -0
  107. package/dist/recipes/textFieldRecipe.js +107 -0
  108. package/dist/styled-system/css/cva.js +43 -38
  109. package/dist/styled-system/recipes/create-recipe.js +37 -0
  110. package/dist/styled-system/recipes/text-field-recipe.js +61 -0
  111. package/dist/styles.css +1 -1
  112. package/dist/tokens/keyframes/index.d.ts +8 -0
  113. package/dist/tokens/keyframes/index.js +6 -2
  114. package/package.json +3 -3
  115. package/styled-system/recipes/create-recipe.js +82 -0
  116. package/styled-system/recipes/index.d.ts +2 -0
  117. package/styled-system/recipes/index.js +1 -0
  118. package/styled-system/recipes/text-field-recipe.d.ts +28 -0
  119. package/styled-system/recipes/text-field-recipe.js +72 -0
  120. package/styled-system/types/prop-type.d.ts +1 -1
  121. package/dist/node_modules/@zag-js/store/dist/index.js +0 -131
  122. package/dist/node_modules/proxy-compare/dist/index.js +0 -7
@@ -1,127 +1,173 @@
1
- function w(r) {
2
- return r == null ? [] : Array.isArray(r) ? r : [r];
1
+ function L(t) {
2
+ return t == null ? [] : Array.isArray(t) ? t : [t];
3
3
  }
4
- var k = (r) => r[0], S = (r) => r[r.length - 1], a = (r, t) => r.indexOf(t) !== -1, y = (r, ...t) => r.concat(t), p = (r, ...t) => r.filter((n) => !t.includes(n)), q = (r, t) => a(r, t) ? p(r, t) : y(r, t);
5
- function f(r, t, n = {}) {
6
- const { step: o = 1, loop: e = !0 } = n, i = t + o, s = r.length, u = s - 1;
7
- return t === -1 ? o > 0 ? 0 : u : i < 0 ? e ? u : 0 : i >= s ? e ? 0 : t > s ? s : t : i;
4
+ var z = (t) => t[0], d = (t) => t[t.length - 1], O = (t, r) => t.indexOf(r) !== -1, j = (t, ...r) => t.concat(r), E = (t, ...r) => t.filter((n) => !r.includes(n)), B = (t, r) => O(t, r) ? E(t, r) : j(t, r);
5
+ function y(t, r, n = {}) {
6
+ const { step: e = 1, loop: o = !0 } = n, i = r + e, c = t.length, a = c - 1;
7
+ return r === -1 ? e > 0 ? 0 : a : i < 0 ? o ? a : 0 : i >= c ? o ? 0 : r > c ? c : r : i;
8
8
  }
9
- function F(r, t, n = {}) {
10
- return r[f(r, t, n)];
9
+ function D(t, r, n = {}) {
10
+ return t[y(t, r, n)];
11
11
  }
12
- function g(r, t, n = {}) {
13
- const { step: o = 1, loop: e = !0 } = n;
14
- return f(r, t, { step: -o, loop: e });
12
+ function A(t, r, n = {}) {
13
+ const { step: e = 1, loop: o = !0 } = n;
14
+ return y(t, r, { step: -e, loop: o });
15
15
  }
16
- function N(r, t, n = {}) {
17
- return r[g(r, t, n)];
16
+ function G(t, r, n = {}) {
17
+ return t[A(t, r, n)];
18
18
  }
19
- var c = (r) => (r == null ? void 0 : r.constructor.name) === "Array", h = (r, t) => {
20
- if (r.length !== t.length) return !1;
21
- for (let n = 0; n < r.length; n++)
22
- if (!l(r[n], t[n])) return !1;
19
+ function M(t, r) {
20
+ return t.reduce((n, e, o) => {
21
+ var i;
22
+ return o % r === 0 ? n.push([e]) : (i = d(n)) == null || i.push(e), n;
23
+ }, []);
24
+ }
25
+ var p = (t) => (t == null ? void 0 : t.constructor.name) === "Array", k = (t, r) => {
26
+ if (t.length !== r.length) return !1;
27
+ for (let n = 0; n < t.length; n++)
28
+ if (!h(t[n], r[n])) return !1;
23
29
  return !0;
24
- }, l = (r, t) => {
25
- if (Object.is(r, t)) return !0;
26
- if (r == null && t != null || r != null && t == null) return !1;
27
- if (typeof (r == null ? void 0 : r.isEqual) == "function" && typeof (t == null ? void 0 : t.isEqual) == "function")
28
- return r.isEqual(t);
29
- if (typeof r == "function" && typeof t == "function")
30
- return r.toString() === t.toString();
31
- if (c(r) && c(t))
32
- return h(Array.from(r), Array.from(t));
33
- if (typeof r != "object" || typeof t != "object") return !1;
34
- const n = Object.keys(t ?? /* @__PURE__ */ Object.create(null)), o = n.length;
35
- for (let e = 0; e < o; e++)
36
- if (!Reflect.has(r, n[e])) return !1;
37
- for (let e = 0; e < o; e++) {
38
- const i = n[e];
39
- if (!l(r[i], t[i])) return !1;
30
+ }, h = (t, r) => {
31
+ if (Object.is(t, r)) return !0;
32
+ if (t == null && r != null || t != null && r == null) return !1;
33
+ if (typeof (t == null ? void 0 : t.isEqual) == "function" && typeof (r == null ? void 0 : r.isEqual) == "function")
34
+ return t.isEqual(r);
35
+ if (typeof t == "function" && typeof r == "function")
36
+ return t.toString() === r.toString();
37
+ if (p(t) && p(r))
38
+ return k(Array.from(t), Array.from(r));
39
+ if (typeof t != "object" || typeof r != "object") return !1;
40
+ const n = Object.keys(r ?? /* @__PURE__ */ Object.create(null)), e = n.length;
41
+ for (let o = 0; o < e; o++)
42
+ if (!Reflect.has(t, n[o])) return !1;
43
+ for (let o = 0; o < e; o++) {
44
+ const i = n[o];
45
+ if (!h(t[i], r[i])) return !1;
40
46
  }
41
47
  return !0;
42
- }, m = (r) => Array.isArray(r), $ = (r) => r === !0 || r === !1, O = (r) => r != null && typeof r == "object", x = (r) => O(r) && !m(r), K = (r) => typeof r == "string", d = (r) => typeof r == "function", P = (r) => r == null, R = (r, t) => Object.prototype.hasOwnProperty.call(r, t), v = Function.prototype.toString;
43
- v.call(Object);
44
- var I = (r, ...t) => (typeof r == "function" ? r(...t) : r) ?? void 0, T = (r) => r, J = (r) => r(), L = () => {
45
- }, z = (...r) => (...t) => {
46
- r.forEach(function(n) {
47
- n == null || n(...t);
48
+ }, S = (t) => Array.isArray(t), W = (t) => t === !0 || t === !1, g = (t) => t != null && typeof t == "object", H = (t) => g(t) && !S(t), Q = (t) => typeof t == "string", N = (t) => typeof t == "function", U = (t) => t == null, w = (t, r) => Object.prototype.hasOwnProperty.call(t, r), q = (t) => Object.prototype.toString.call(t), m = Function.prototype.toString, F = m.call(Object), $ = (t) => {
49
+ if (!g(t) || q(t) != "[object Object]" || C(t)) return !1;
50
+ const r = Object.getPrototypeOf(t);
51
+ if (r === null) return !0;
52
+ const n = w(r, "constructor") && r.constructor;
53
+ return typeof n == "function" && n instanceof n && m.call(n) == F;
54
+ }, R = (t) => typeof t == "object" && t !== null && "$$typeof" in t && "props" in t, b = (t) => typeof t == "object" && t !== null && "__v_isVNode" in t, C = (t) => R(t) || b(t), X = (t, ...r) => (typeof t == "function" ? t(...r) : t) ?? void 0, Y = (t) => t, Z = (t) => t(), x = () => {
55
+ }, tt = (...t) => (...r) => {
56
+ t.forEach(function(n) {
57
+ n == null || n(...r);
48
58
  });
49
- }, B = /* @__PURE__ */ (() => {
50
- let r = 0;
51
- return () => (r++, r.toString(36));
59
+ }, rt = /* @__PURE__ */ (() => {
60
+ let t = 0;
61
+ return () => (t++, t.toString(36));
52
62
  })();
53
- function A(r, t, ...n) {
54
- var e;
55
- if (r in t) {
56
- const i = t[r];
57
- return d(i) ? i(...n) : i;
63
+ function P(t, r, ...n) {
64
+ var o;
65
+ if (t in r) {
66
+ const i = r[t];
67
+ return N(i) ? i(...n) : i;
58
68
  }
59
- const o = new Error(`No matching key: ${JSON.stringify(r)} in ${JSON.stringify(Object.keys(t))}`);
60
- throw (e = Error.captureStackTrace) == null || e.call(Error, o, A), o;
69
+ const e = new Error(`No matching key: ${JSON.stringify(t)} in ${JSON.stringify(Object.keys(r))}`);
70
+ throw (o = Error.captureStackTrace) == null || o.call(Error, e, P), e;
61
71
  }
62
- function j(r) {
63
- if (!E(r) || r === void 0) return r;
64
- const t = Reflect.ownKeys(r).filter((o) => typeof o == "string"), n = {};
65
- for (const o of t) {
66
- const e = r[o];
67
- e !== void 0 && (n[o] = j(e));
72
+ var { min: V, max: K } = Math, T = (t) => Number.isNaN(t), v = (t) => T(t) ? 0 : t, nt = (t, r, n) => {
73
+ const e = v(t), o = r == null || e >= r, i = n == null || e <= n;
74
+ return o && i;
75
+ }, et = (t, r, n) => V(K(v(t), r), n);
76
+ function _(t) {
77
+ if (!$(t) || t === void 0) return t;
78
+ const r = Reflect.ownKeys(t).filter((e) => typeof e == "string"), n = {};
79
+ for (const e of r) {
80
+ const o = t[e];
81
+ o !== void 0 && (n[e] = _(o));
68
82
  }
69
83
  return n;
70
84
  }
71
- var E = (r) => r && typeof r == "object" && r.constructor === Object;
72
- function D(r, t) {
85
+ function ot(t, r = Object.is) {
86
+ let n = { ...t };
87
+ const e = /* @__PURE__ */ new Set(), o = (s) => (e.add(s), () => e.delete(s)), i = () => {
88
+ e.forEach((s) => s());
89
+ };
90
+ return {
91
+ subscribe: o,
92
+ get: (s) => n[s],
93
+ set: (s, u) => {
94
+ r(n[s], u) || (n[s] = u, i());
95
+ },
96
+ update: (s) => {
97
+ let u = !1;
98
+ for (const l in s) {
99
+ const f = s[l];
100
+ f !== void 0 && !r(n[l], f) && (n[l] = f, u = !0);
101
+ }
102
+ u && i();
103
+ },
104
+ snapshot: () => ({ ...n })
105
+ };
106
+ }
107
+ function it(t, r) {
73
108
  const n = performance.now();
74
- let o;
75
- function e(i) {
76
- o = requestAnimationFrame(e), i - n >= t && r();
109
+ let e;
110
+ function o(i) {
111
+ if (i - n >= r) {
112
+ t();
113
+ return;
114
+ }
115
+ e = requestAnimationFrame(o);
77
116
  }
78
- return o = requestAnimationFrame(e), () => cancelAnimationFrame(o);
117
+ return e = requestAnimationFrame(o), () => cancelAnimationFrame(e);
79
118
  }
80
- function V(...r) {
81
- const t = r.length === 1 ? r[0] : r[1];
82
- (r.length === 2 ? r[0] : !0) && process.env.NODE_ENV !== "production" && console.warn(t);
119
+ function st(...t) {
120
+ const r = t.length === 1 ? t[0] : t[1];
121
+ (t.length === 2 ? t[0] : !0) && process.env.NODE_ENV !== "production" && console.warn(r);
83
122
  }
84
- function _(r, t) {
85
- if (r == null) throw new Error(t());
123
+ function ct(t, r) {
124
+ if (t == null) throw new Error(r());
86
125
  }
87
- function C(r, t, n) {
88
- let o = [];
89
- for (const e of t)
90
- r[e] == null && o.push(e);
91
- if (o.length > 0)
92
- throw new Error(`[zag-js${` > ${n}`}] missing required props: ${o.join(", ")}`);
126
+ function ut(t, r, n) {
127
+ let e = [];
128
+ for (const o of r)
129
+ t[o] == null && e.push(o);
130
+ if (e.length > 0)
131
+ throw new Error(`[zag-js${` > ${n}`}] missing required props: ${e.join(", ")}`);
93
132
  }
94
133
  export {
95
- y as add,
96
- q as addOrRemove,
97
- z as callAll,
98
- T as cast,
99
- j as compact,
100
- _ as ensure,
101
- C as ensureProps,
102
- k as first,
103
- a as has,
104
- R as hasProp,
105
- J as identity,
106
- m as isArray,
107
- $ as isBoolean,
108
- l as isEqual,
109
- d as isFunction,
110
- P as isNull,
111
- x as isObject,
112
- O as isObjectLike,
113
- K as isString,
114
- S as last,
115
- A as match,
116
- F as next,
117
- f as nextIndex,
118
- L as noop,
119
- N as prev,
120
- g as prevIndex,
121
- p as remove,
122
- I as runIfFn,
123
- D as setRafTimeout,
124
- w as toArray,
125
- B as uuid,
126
- V as warn
134
+ j as add,
135
+ B as addOrRemove,
136
+ tt as callAll,
137
+ Y as cast,
138
+ M as chunk,
139
+ et as clampValue,
140
+ _ as compact,
141
+ ot as createStore,
142
+ ct as ensure,
143
+ ut as ensureProps,
144
+ z as first,
145
+ O as has,
146
+ w as hasProp,
147
+ Z as identity,
148
+ S as isArray,
149
+ W as isBoolean,
150
+ h as isEqual,
151
+ N as isFunction,
152
+ T as isNaN,
153
+ U as isNull,
154
+ H as isObject,
155
+ g as isObjectLike,
156
+ $ as isPlainObject,
157
+ Q as isString,
158
+ nt as isValueWithinRange,
159
+ d as last,
160
+ P as match,
161
+ v as nan,
162
+ D as next,
163
+ y as nextIndex,
164
+ x as noop,
165
+ G as prev,
166
+ A as prevIndex,
167
+ E as remove,
168
+ X as runIfFn,
169
+ it as setRafTimeout,
170
+ L as toArray,
171
+ rt as uuid,
172
+ st as warn
127
173
  };
package/dist/preset.d.ts CHANGED
@@ -1177,7 +1177,9 @@ export declare const SerendiePreset: {
1177
1177
  breakpoints: {
1178
1178
  expanded: string;
1179
1179
  };
1180
- recipes: import('@pandacss/types').RecipeVariantRecord;
1180
+ recipes: {
1181
+ textFieldRecipe: import('../styled-system/types').SlotRecipeConfig;
1182
+ };
1181
1183
  tokens: {
1182
1184
  sizes: {
1183
1185
  sd: {
@@ -2661,6 +2663,14 @@ export declare const SerendiePreset: {
2661
2663
  transform: string;
2662
2664
  };
2663
2665
  };
2666
+ progressIndicatorSlide: {
2667
+ from: {
2668
+ transform: string;
2669
+ };
2670
+ to: {
2671
+ transform: string;
2672
+ };
2673
+ };
2664
2674
  };
2665
2675
  };
2666
2676
  };
@@ -1,2 +1,3 @@
1
- import { RecipeVariantRecord } from '@pandacss/dev';
2
- export declare const SerendieRecipes: RecipeVariantRecord;
1
+ export declare const SerendieRecipes: {
2
+ textFieldRecipe: import('../../styled-system/types').SlotRecipeConfig;
3
+ };
@@ -1,4 +1,7 @@
1
- const e = {};
1
+ import { textFieldRecipe as e } from "./textFieldRecipe.js";
2
+ const t = {
3
+ textFieldRecipe: e
4
+ };
2
5
  export {
3
- e as SerendieRecipes
6
+ t as SerendieRecipes
4
7
  };
@@ -0,0 +1,6 @@
1
+ import { SlotRecipeConfig } from '../../styled-system/types';
2
+ /**
3
+ * 共通フォームスタイルレシピ
4
+ * TextField、DatePicker、Select、TextAreaなどのフォームコンポーネントで共通のスタイルを定義
5
+ */
6
+ export declare const textFieldRecipe: SlotRecipeConfig;
@@ -0,0 +1,107 @@
1
+ const e = {
2
+ className: "input",
3
+ slots: [
4
+ "root",
5
+ "label",
6
+ "labelRequired",
7
+ "inputWrapper",
8
+ "input",
9
+ "icon",
10
+ "leftContent",
11
+ "rightContent",
12
+ "messageField",
13
+ "description",
14
+ "invalidMessage"
15
+ ],
16
+ base: {
17
+ root: {
18
+ display: "inline-grid",
19
+ // 後から指定したCSSからwidthが上書きできないため、@layer componentsを指定
20
+ "@layer components": {
21
+ width: "min(100%, 300px)"
22
+ },
23
+ gridTemplateColumns: "auto",
24
+ rowGap: "sd.system.dimension.spacing.extraSmall",
25
+ textStyle: {
26
+ base: "sd.system.typography.body.medium_compact",
27
+ expanded: "sd.system.typography.body.medium_expanded"
28
+ }
29
+ },
30
+ label: {
31
+ textStyle: {
32
+ base: "sd.system.typography.label.medium_compact",
33
+ expanded: "sd.system.typography.label.medium_expanded"
34
+ },
35
+ color: "sd.system.color.component.onSurface",
36
+ fontWeight: "medium"
37
+ },
38
+ labelRequired: {
39
+ pl: "sd.system.dimension.spacing.extraSmall",
40
+ color: "sd.system.color.impression.negative"
41
+ },
42
+ inputWrapper: {
43
+ height: 48,
44
+ display: "grid",
45
+ gridTemplateColumns: "auto 1fr auto auto",
46
+ alignItems: "center",
47
+ outlineStyle: "solid",
48
+ outlineWidth: "sd.system.dimension.border.medium",
49
+ outlineColor: "sd.system.color.component.outline",
50
+ borderRadius: "sd.system.dimension.radius.medium",
51
+ backgroundColor: "sd.system.color.component.surface",
52
+ '&:has([data-focus="true"])': {
53
+ outlineWidth: "sd.system.dimension.border.thick",
54
+ outlineColor: "sd.system.color.impression.primary"
55
+ },
56
+ _focusWithin: {
57
+ outlineWidth: "sd.system.dimension.border.thick",
58
+ outlineColor: "sd.system.color.impression.primary"
59
+ },
60
+ _disabled: {
61
+ backgroundColor: "sd.system.color.interaction.disabled",
62
+ cursor: "not-allowed"
63
+ },
64
+ _invalid: {
65
+ outlineColor: "sd.system.color.impression.negative"
66
+ }
67
+ },
68
+ leftContent: {
69
+ paddingLeft: "sd.system.dimension.spacing.medium"
70
+ },
71
+ rightContent: {
72
+ paddingRight: "sd.system.dimension.spacing.medium"
73
+ },
74
+ input: {
75
+ outline: "none",
76
+ paddingTop: "sd.system.dimension.spacing.extraSmall",
77
+ paddingRight: "sd.system.dimension.spacing.twoExtraSmall",
78
+ paddingBottom: "sd.system.dimension.spacing.extraSmall",
79
+ paddingLeft: "sd.system.dimension.spacing.medium"
80
+ },
81
+ icon: {
82
+ display: "grid",
83
+ placeItems: "center",
84
+ w: "48px",
85
+ h: "48px",
86
+ expanded: {
87
+ w: "44px",
88
+ h: "44px"
89
+ }
90
+ },
91
+ messageField: {
92
+ textStyle: {
93
+ base: "sd.system.typography.body.extraSmall_compact",
94
+ expanded: "sd.system.typography.body.extraSmall_expanded"
95
+ }
96
+ },
97
+ description: {
98
+ color: "sd.system.color.component.onSurfaceVariant"
99
+ },
100
+ invalidMessage: {
101
+ color: "sd.system.color.impression.negative"
102
+ }
103
+ }
104
+ };
105
+ export {
106
+ e as textFieldRecipe
107
+ };
@@ -1,60 +1,65 @@
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) => ({
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) => ({
4
4
  base: {},
5
5
  variants: {},
6
6
  defaultVariants: {},
7
7
  compoundVariants: [],
8
- ...n
8
+ ...s
9
9
  });
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);
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);
20
20
  }
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),
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),
25
25
  variants: Object.fromEntries(
26
- i.map((c) => [c, u(s[c], r.variants[c])])
26
+ c.map((u) => [u, f(t[u], r.variants[u])])
27
27
  ),
28
28
  defaultVariants: E(e, r.defaultVariants),
29
29
  compoundVariants: [...m, ...r.compoundVariants]
30
30
  });
31
31
  }
32
- function p(t) {
33
- return K(a(t));
32
+ function p(n) {
33
+ return P(o(n));
34
34
  }
35
- const b = Object.keys(s);
36
- function O(t) {
37
- return P(t, b);
35
+ const b = Object.keys(t);
36
+ function j(n) {
37
+ return h(n, b);
38
38
  }
39
- const g = Object.fromEntries(Object.entries(s).map(([t, r]) => [t, Object.keys(r)]));
39
+ const O = Object.fromEntries(Object.entries(t).map(([n, r]) => [n, Object.keys(r)]));
40
40
  return Object.assign(y(p), {
41
41
  __cva__: !0,
42
- variantMap: g,
42
+ variantMap: O,
43
43
  variantKeys: b,
44
- raw: a,
45
- config: n,
46
- merge: v,
47
- splitVariantProps: O,
48
- getVariantProps: o
44
+ raw: o,
45
+ config: s,
46
+ merge: d,
47
+ splitVariantProps: j,
48
+ getVariantProps: i
49
49
  });
50
50
  }
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;
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.`);
56
60
  }
57
61
  export {
58
- M as cva,
59
- A as getCompoundVariantCss
62
+ $ as assertCompoundVariant,
63
+ K as cva,
64
+ M as getCompoundVariantCss
60
65
  };
@@ -0,0 +1,37 @@
1
+ import { finalizeConditions as _, sortConditions as f } from "../css/conditions.js";
2
+ import { css as u } from "../css/css.js";
3
+ import { getCompoundVariantCss as p, assertCompoundVariant as C } from "../css/cva.js";
4
+ import { cx as d } from "../css/cx.js";
5
+ import { compact as g, createCss as l, withoutSpace as y } from "../helpers.js";
6
+ const z = (e, a, s) => {
7
+ const i = (t) => ({
8
+ [e]: "__ignore__",
9
+ ...a,
10
+ ...g(t)
11
+ });
12
+ return {
13
+ recipeFn: (t, m = !0) => {
14
+ const c = l({
15
+ conditions: {
16
+ shift: f,
17
+ finalize: _,
18
+ breakpoints: { keys: ["base", "expanded"] }
19
+ },
20
+ utility: {
21
+ toHash: (r, o) => o(r.join(":")),
22
+ transform: (r, o) => (C(e, s, t, r), o === "__ignore__" ? { className: e } : (o = y(o), { className: `${e}--${r}_${o}` }))
23
+ }
24
+ }), n = i(t);
25
+ if (m) {
26
+ const r = p(s, n);
27
+ return d(c(n), u(r));
28
+ }
29
+ return c(n);
30
+ },
31
+ getVariantProps: i,
32
+ __getCompoundVariantCss__: (t) => p(s, i(t))
33
+ };
34
+ };
35
+ export {
36
+ z as createRecipe
37
+ };
@@ -0,0 +1,61 @@
1
+ import { memo as a, compact as r, splitProps as o, getSlotCompoundVariant as s } from "../helpers.js";
2
+ import { createRecipe as _ } from "./create-recipe.js";
3
+ const n = {}, c = [], l = [
4
+ [
5
+ "root",
6
+ "input__root"
7
+ ],
8
+ [
9
+ "label",
10
+ "input__label"
11
+ ],
12
+ [
13
+ "labelRequired",
14
+ "input__labelRequired"
15
+ ],
16
+ [
17
+ "inputWrapper",
18
+ "input__inputWrapper"
19
+ ],
20
+ [
21
+ "input",
22
+ "input__input"
23
+ ],
24
+ [
25
+ "icon",
26
+ "input__icon"
27
+ ],
28
+ [
29
+ "leftContent",
30
+ "input__leftContent"
31
+ ],
32
+ [
33
+ "rightContent",
34
+ "input__rightContent"
35
+ ],
36
+ [
37
+ "messageField",
38
+ "input__messageField"
39
+ ],
40
+ [
41
+ "description",
42
+ "input__description"
43
+ ],
44
+ [
45
+ "invalidMessage",
46
+ "input__invalidMessage"
47
+ ]
48
+ ], u = /* @__PURE__ */ l.map(([e, t]) => [e, _(t, n, s(c, e))]), d = a((e = {}) => Object.fromEntries(u.map(([t, p]) => [t, p.recipeFn(e)]))), i = [], m = (e) => ({ ...n, ...r(e) }), g = /* @__PURE__ */ Object.assign(d, {
49
+ __recipe__: !1,
50
+ __name__: "textFieldRecipe",
51
+ raw: (e) => e,
52
+ variantKeys: i,
53
+ variantMap: {},
54
+ splitVariantProps(e) {
55
+ return o(e, i);
56
+ },
57
+ getVariantProps: m
58
+ });
59
+ export {
60
+ g as textFieldRecipe
61
+ };