@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
@@ -0,0 +1,72 @@
1
+ import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
2
+ import { createRecipe } from './create-recipe.js';
3
+
4
+ const textFieldRecipeDefaultVariants = {}
5
+ const textFieldRecipeCompoundVariants = []
6
+
7
+ const textFieldRecipeSlotNames = [
8
+ [
9
+ "root",
10
+ "input__root"
11
+ ],
12
+ [
13
+ "label",
14
+ "input__label"
15
+ ],
16
+ [
17
+ "labelRequired",
18
+ "input__labelRequired"
19
+ ],
20
+ [
21
+ "inputWrapper",
22
+ "input__inputWrapper"
23
+ ],
24
+ [
25
+ "input",
26
+ "input__input"
27
+ ],
28
+ [
29
+ "icon",
30
+ "input__icon"
31
+ ],
32
+ [
33
+ "leftContent",
34
+ "input__leftContent"
35
+ ],
36
+ [
37
+ "rightContent",
38
+ "input__rightContent"
39
+ ],
40
+ [
41
+ "messageField",
42
+ "input__messageField"
43
+ ],
44
+ [
45
+ "description",
46
+ "input__description"
47
+ ],
48
+ [
49
+ "invalidMessage",
50
+ "input__invalidMessage"
51
+ ]
52
+ ]
53
+ const textFieldRecipeSlotFns = /* @__PURE__ */ textFieldRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, textFieldRecipeDefaultVariants, getSlotCompoundVariant(textFieldRecipeCompoundVariants, slotName))])
54
+
55
+ const textFieldRecipeFn = memo((props = {}) => {
56
+ return Object.fromEntries(textFieldRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
57
+ })
58
+
59
+ const textFieldRecipeVariantKeys = []
60
+ const getVariantProps = (variants) => ({ ...textFieldRecipeDefaultVariants, ...compact(variants) })
61
+
62
+ export const textFieldRecipe = /* @__PURE__ */ Object.assign(textFieldRecipeFn, {
63
+ __recipe__: false,
64
+ __name__: 'textFieldRecipe',
65
+ raw: (props) => props,
66
+ variantKeys: textFieldRecipeVariantKeys,
67
+ variantMap: {},
68
+ splitVariantProps(props) {
69
+ return splitProps(props, textFieldRecipeVariantKeys)
70
+ },
71
+ getVariantProps
72
+ })
@@ -136,7 +136,7 @@ export interface UtilityValues {
136
136
  borderSpacingX: Tokens["spacing"];
137
137
  borderSpacingY: Tokens["spacing"];
138
138
  transition: "all" | "common" | "background" | "colors" | "opacity" | "shadow" | "transform";
139
- animationName: "spin";
139
+ animationName: "spin" | "progressIndicatorSlide";
140
140
  rotate: "auto" | "auto-3d" | CssProperties["rotate"];
141
141
  rotateX: CssProperties["rotate"];
142
142
  rotateY: CssProperties["rotate"];
@@ -1,131 +0,0 @@
1
- import { markToTrack as z, getUntracked as K } from "../../../proxy-compare/dist/index.js";
2
- function U() {
3
- if (typeof globalThis < "u") return globalThis;
4
- if (typeof self < "u") return self;
5
- if (typeof window < "u") return window;
6
- if (typeof global < "u") return global;
7
- }
8
- function D(e, l) {
9
- const i = U();
10
- return i ? (i[e] || (i[e] = l()), i[e]) : l();
11
- }
12
- var O = D("__zag__refSet", () => /* @__PURE__ */ new WeakSet()), $ = (e) => typeof e == "object" && e !== null && "$$typeof" in e && "props" in e, q = (e) => typeof e == "object" && e !== null && "__v_isVNode" in e, B = (e) => typeof e == "object" && e !== null && "nodeType" in e && typeof e.nodeName == "string", k = (e) => $(e) || q(e) || B(e), j = (e) => e !== null && typeof e == "object", V = (e) => j(e) && !O.has(e) && (Array.isArray(e) || !(Symbol.iterator in e)) && !k(e) && !(e instanceof WeakMap) && !(e instanceof WeakSet) && !(e instanceof Error) && !(e instanceof Number) && !(e instanceof Date) && !(e instanceof String) && !(e instanceof RegExp) && !(e instanceof ArrayBuffer) && !(e instanceof Promise), S = () => process.env.NODE_ENV !== "production", g = D("__zag__proxyStateMap", () => /* @__PURE__ */ new WeakMap()), G = (e = Object.is, l = (s, p) => new Proxy(s, p), i = /* @__PURE__ */ new WeakMap(), b = (s, p) => {
13
- const c = i.get(s);
14
- if ((c == null ? void 0 : c[0]) === p)
15
- return c[1];
16
- const o = Array.isArray(s) ? [] : Object.create(Object.getPrototypeOf(s));
17
- return z(o, !0), i.set(s, [p, o]), Reflect.ownKeys(s).forEach((w) => {
18
- const d = Reflect.get(s, w);
19
- O.has(d) ? (z(d, !1), o[w] = d) : g.has(d) ? o[w] = X(d) : o[w] = d;
20
- }), Object.freeze(o);
21
- }, a = /* @__PURE__ */ new WeakMap(), y = [1, 1], _ = (s) => {
22
- if (!j(s))
23
- throw new Error("object required");
24
- const p = a.get(s);
25
- if (p)
26
- return p;
27
- let c = y[0];
28
- const o = /* @__PURE__ */ new Set(), w = (n, t = ++y[0]) => {
29
- c !== t && (c = t, o.forEach((r) => r(n, t)));
30
- };
31
- let d = y[1];
32
- const W = (n = ++y[1]) => (d !== n && !o.size && (d = n, u.forEach(([t]) => {
33
- const r = t[1](n);
34
- r > c && (c = r);
35
- })), c), v = (n) => (t, r) => {
36
- const f = [...t];
37
- f[1] = [n, ...f[1]], w(f, r);
38
- }, u = /* @__PURE__ */ new Map(), N = (n, t) => {
39
- if (S() && u.has(n))
40
- throw new Error("prop listener already exists");
41
- if (o.size) {
42
- const r = t[3](v(n));
43
- u.set(n, [t, r]);
44
- } else
45
- u.set(n, [t]);
46
- }, L = (n) => {
47
- var r;
48
- const t = u.get(n);
49
- t && (u.delete(n), (r = t[1]) == null || r.call(t));
50
- }, T = (n) => (o.add(n), o.size === 1 && u.forEach(([r, f], m) => {
51
- if (S() && f)
52
- throw new Error("remove already exists");
53
- const h = r[3](v(m));
54
- u.set(m, [r, h]);
55
- }), () => {
56
- o.delete(n), o.size === 0 && u.forEach(([r, f], m) => {
57
- f && (f(), u.set(m, [r]));
58
- });
59
- }), R = Array.isArray(s) ? [] : Object.create(Object.getPrototypeOf(s)), E = l(R, {
60
- deleteProperty(n, t) {
61
- const r = Reflect.get(n, t);
62
- L(t);
63
- const f = Reflect.deleteProperty(n, t);
64
- return f && w(["delete", [t], r]), f;
65
- },
66
- set(n, t, r, f) {
67
- var A;
68
- const m = Reflect.has(n, t), h = Reflect.get(n, t, f);
69
- if (m && (e(h, r) || a.has(r) && e(h, a.get(r))))
70
- return !0;
71
- L(t), j(r) && (r = K(r) || r);
72
- let P = r;
73
- if (!((A = Object.getOwnPropertyDescriptor(n, t)) != null && A.set)) {
74
- !g.has(r) && V(r) && (P = Q(r));
75
- const M = !O.has(P) && g.get(P);
76
- M && N(t, M);
77
- }
78
- return Reflect.set(n, t, P, f), w(["set", [t], r, h]), !0;
79
- }
80
- });
81
- a.set(s, E);
82
- const F = [R, W, b, T];
83
- return g.set(E, F), Reflect.ownKeys(s).forEach((n) => {
84
- const t = Object.getOwnPropertyDescriptor(s, n);
85
- t.get || t.set ? Object.defineProperty(R, n, t) : E[n] = s[n];
86
- }), E;
87
- }) => [
88
- // public functions
89
- _,
90
- // shared state
91
- g,
92
- O,
93
- // internal things
94
- e,
95
- l,
96
- V,
97
- i,
98
- b,
99
- a,
100
- y
101
- ], [J] = G();
102
- function Q(e = {}) {
103
- return J(e);
104
- }
105
- function I(e, l, i) {
106
- const b = g.get(e);
107
- S() && !b && console.warn("Please use proxy object");
108
- let a;
109
- const y = [], _ = b[3];
110
- let s = !1;
111
- const c = _((o) => {
112
- y.push(o), a || (a = Promise.resolve().then(() => {
113
- a = void 0, s && l(y.splice(0));
114
- }));
115
- });
116
- return s = !0, () => {
117
- s = !1, c();
118
- };
119
- }
120
- function X(e) {
121
- const l = g.get(e);
122
- S() && !l && console.warn("Please use proxy object");
123
- const [i, b, a] = l;
124
- return a(i, b());
125
- }
126
- export {
127
- D as globalRef,
128
- Q as proxy,
129
- X as snapshot,
130
- I as subscribe
131
- };
@@ -1,7 +0,0 @@
1
- const c = Symbol(), r = Object.getPrototypeOf, e = /* @__PURE__ */ new WeakMap(), n = (t) => t && (e.has(t) ? e.get(t) : r(t) === Object.prototype || r(t) === Array.prototype), s = (t) => n(t) && t[c] || null, a = (t, o = !0) => {
2
- e.set(t, o);
3
- };
4
- export {
5
- s as getUntracked,
6
- a as markToTrack
7
- };