@versini/sassysaint 5.3.15 → 5.4.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.
@@ -1,9 +1,9 @@
1
1
  import { jsx as i, jsxs as E, Fragment as M } from "react/jsx-runtime";
2
2
  import y from "clsx";
3
3
  import * as c from "react";
4
- import { useRef as b, useReducer as _, useEffect as D, useId as R } from "react";
5
- import { useMergeRefs as x, FloatingPortal as S, FloatingOverlay as F, FloatingFocusManager as O, useFloating as $, useClick as k, useDismiss as P, useRole as L, useInteractions as V } from "@floating-ui/react";
6
- const I = "SET_ANNOUNCEMENT", w = "CLEAR_ANNOUNCEMENT", B = {
4
+ import { useRef as A, useReducer as _, useEffect as D, useId as w } from "react";
5
+ import { useMergeRefs as x, FloatingPortal as $, FloatingOverlay as S, FloatingFocusManager as F, useFloating as O, useClick as P, useDismiss as k, useRole as L, useInteractions as V } from "@floating-ui/react";
6
+ const I = "SET_ANNOUNCEMENT", R = "CLEAR_ANNOUNCEMENT", B = {
7
7
  alert: null,
8
8
  alertdialog: null,
9
9
  log: "polite",
@@ -18,7 +18,7 @@ const I = "SET_ANNOUNCEMENT", w = "CLEAR_ANNOUNCEMENT", B = {
18
18
  ...e,
19
19
  announcement: n.payload
20
20
  };
21
- case w:
21
+ case R:
22
22
  return {
23
23
  ...e,
24
24
  announcement: null
@@ -31,7 +31,7 @@ const I = "SET_ANNOUNCEMENT", w = "CLEAR_ANNOUNCEMENT", B = {
31
31
  dispatch: n
32
32
  }) => {
33
33
  n({
34
- type: w
34
+ type: R
35
35
  }), typeof e == "function" && e();
36
36
  }, C = ({
37
37
  children: e,
@@ -40,7 +40,7 @@ const I = "SET_ANNOUNCEMENT", w = "CLEAR_ANNOUNCEMENT", B = {
40
40
  onAnnouncementClear: o,
41
41
  dispatch: l
42
42
  }) => {
43
- (t == null ? void 0 : t.current) !== null && clearTimeout(t.current), e !== null && l({
43
+ clearTimeout(t.current), e !== null && l({
44
44
  type: I,
45
45
  payload: e
46
46
  }), n && (t.current = setTimeout(
@@ -84,7 +84,7 @@ function G({
84
84
  visible: s,
85
85
  ...f
86
86
  }) {
87
- const u = b(), d = b(), [m, p] = _(j, {
87
+ const u = A(null), d = A(null), [m, p] = _(j, {
88
88
  announcement: null
89
89
  });
90
90
  let h = t;
@@ -118,37 +118,37 @@ function G({
118
118
  }
119
119
  );
120
120
  }
121
- const T = c.createContext(null);
121
+ const N = c.createContext(null);
122
122
  function H({
123
123
  initialOpen: e = !1,
124
124
  open: n,
125
125
  onOpenChange: t
126
126
  } = {}) {
127
- const [o, l] = c.useState(e), [r, a] = c.useState(), [s, f] = c.useState(), u = n ?? o, d = t ?? l, m = $({
127
+ const [o, l] = c.useState(e), [r, a] = c.useState(), [s, f] = c.useState(), u = n ?? o, d = t ?? l, m = O({
128
128
  open: u,
129
129
  onOpenChange: d
130
- }), p = m.context, h = k(p, {
130
+ }), p = m.context, h = P(p, {
131
131
  enabled: n == null
132
- }), v = P(p, {
132
+ }), v = k(p, {
133
133
  outsidePress: !1,
134
134
  outsidePressEvent: "mousedown"
135
- }), N = L(p), A = V([h, v, N]);
135
+ }), T = L(p), b = V([h, v, T]);
136
136
  return c.useMemo(
137
137
  () => ({
138
138
  open: u,
139
139
  setOpen: d,
140
- ...A,
140
+ ...b,
141
141
  ...m,
142
142
  labelId: r,
143
143
  descriptionId: s,
144
144
  setLabelId: a,
145
145
  setDescriptionId: f
146
146
  }),
147
- [u, d, A, m, r, s]
147
+ [u, d, b, m, r, s]
148
148
  );
149
149
  }
150
150
  const g = () => {
151
- const e = c.useContext(T);
151
+ const e = c.useContext(N);
152
152
  if (e == null)
153
153
  throw new Error("Modal components must be wrapped in <Modal />");
154
154
  return e;
@@ -158,7 +158,7 @@ function J({
158
158
  ...n
159
159
  }) {
160
160
  const t = H(n);
161
- return /* @__PURE__ */ i(T.Provider, { value: t, children: e });
161
+ return /* @__PURE__ */ i(N.Provider, { value: t, children: e });
162
162
  }
163
163
  const K = c.forwardRef(function(e, n) {
164
164
  const { context: t, ...o } = g(), l = x([o.refs.setFloating, n]);
@@ -168,7 +168,7 @@ const K = c.forwardRef(function(e, n) {
168
168
  [`${r}`]: r,
169
169
  "bg-black sm:bg-black/[.8]": !r
170
170
  });
171
- return /* @__PURE__ */ i(S, { children: /* @__PURE__ */ i(F, { className: s, lockScroll: !0, children: /* @__PURE__ */ i(O, { context: t, children: /* @__PURE__ */ i(
171
+ return /* @__PURE__ */ i($, { children: /* @__PURE__ */ i(S, { className: s, lockScroll: !0, children: /* @__PURE__ */ i(F, { context: t, children: /* @__PURE__ */ i(
172
172
  "div",
173
173
  {
174
174
  ref: l,
@@ -179,10 +179,10 @@ const K = c.forwardRef(function(e, n) {
179
179
  }
180
180
  ) }) }) });
181
181
  }), Q = c.forwardRef(function({ children: e, ...n }, t) {
182
- const { setLabelId: o } = g(), l = R();
182
+ const { setLabelId: o } = g(), l = w();
183
183
  return c.useLayoutEffect(() => (o(l), () => o(void 0)), [l, o]), /* @__PURE__ */ i("h1", { ...n, ref: t, id: l, children: e });
184
184
  }), ee = c.forwardRef(function({ children: e, ...n }, t) {
185
- const { setDescriptionId: o } = g(), l = R();
185
+ const { setDescriptionId: o } = g(), l = w();
186
186
  return c.useLayoutEffect(() => (o(l), () => o(void 0)), [l, o]), /* @__PURE__ */ i("div", { ...n, ref: t, id: l, children: e });
187
187
  }), ne = c.forwardRef(function(e, n) {
188
188
  const { setOpen: t } = g(), { trigger: o, className: l, ...r } = e, a = c.useCallback(() => t(!1), [t]);
@@ -235,13 +235,13 @@ const K = c.forwardRef(function(e, n) {
235
235
  ] });
236
236
  };
237
237
  /*!
238
- @versini/ui-private v1.4.18
238
+ @versini/ui-private v1.5.1
239
239
  © 2024 gizmette.com
240
240
  */
241
241
  try {
242
242
  window.__VERSINI_UI_PRIVATE__ || (window.__VERSINI_UI_PRIVATE__ = {
243
- version: "1.4.18",
244
- buildTime: "11/19/2024 10:59 AM EST",
243
+ version: "1.5.1",
244
+ buildTime: "12/18/2024 01:22 PM EST",
245
245
  homepage: "https://github.com/aversini/ui-components",
246
246
  license: "MIT"
247
247
  });
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import { SassySaint as a } from "../../chunks/index.Cox6Ux55.js";
2
+ import { SassySaint as a } from "../../chunks/index.DNlKJfQz.js";
3
3
  export {
4
4
  a as SassySaint
5
5
  };
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { SassySaint as r } from "./chunks/index.Cox6Ux55.js";
1
+ import { SassySaint as r } from "./chunks/index.DNlKJfQz.js";
2
2
  /*!
3
- @sassysaint/client v5.6.4
3
+ @sassysaint/client v5.7.0
4
4
  © 2024 gizmette.com
5
5
  */
6
6
  try {
7
7
  window.__VERSINI_SASSY_GLOBAL__ || (window.__VERSINI_SASSY_GLOBAL__ = {
8
- version: "5.6.4",
9
- buildTime: "12/12/2024 06:18 PM EST",
8
+ version: "5.7.0",
9
+ buildTime: "12/18/2024 03:25 PM EST",
10
10
  license: "MIT"
11
11
  });
12
12
  } catch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versini/sassysaint",
3
- "version": "5.3.15",
3
+ "version": "5.4.0",
4
4
  "license": "MIT",
5
5
  "author": "Arno Versini",
6
6
  "publishConfig": {
@@ -30,16 +30,16 @@
30
30
  "react-dom": "18.3.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@sassysaint/client": "5.6.4",
34
- "@versini/ui-styles": "1.11.1"
33
+ "@sassysaint/client": "5.7.0",
34
+ "@versini/ui-styles": "1.12.0"
35
35
  },
36
36
  "dependencies": {
37
- "@versini/ui-hooks": "4.2.2",
37
+ "@versini/ui-hooks": "4.3.0",
38
38
  "clsx": "2.1.1",
39
- "tailwindcss": "3.4.15"
39
+ "tailwindcss": "3.4.17"
40
40
  },
41
41
  "sideEffects": [
42
42
  "**/*.css"
43
43
  ],
44
- "gitHead": "db33468774b1e3ba3913b032b2864ac95f32dd4a"
44
+ "gitHead": "fa5ecf030a1b86fc5b7d7b7b44d4304ef5759185"
45
45
  }