@spark-ui/components 16.1.0 → 16.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.
- package/dist/{Button-C3C0aixy.mjs → Button-DPncfbbM.mjs} +3 -3
- package/dist/{Button-C3C0aixy.mjs.map → Button-DPncfbbM.mjs.map} +1 -1
- package/dist/{Icon-Ck-dhfLd.mjs → Icon-C23-htlD.mjs} +2 -2
- package/dist/{Icon-Ck-dhfLd.mjs.map → Icon-C23-htlD.mjs.map} +1 -1
- package/dist/{IconButton-C62-axzv.mjs → IconButton-Bfd-6BAD.mjs} +2 -2
- package/dist/{IconButton-C62-axzv.mjs.map → IconButton-Bfd-6BAD.mjs.map} +1 -1
- package/dist/{Slot-D2Bbf8Gw.mjs → Slot-DLY1rJrG.mjs} +5 -5
- package/dist/{Slot-D2Bbf8Gw.mjs.map → Slot-DLY1rJrG.mjs.map} +1 -1
- package/dist/{Spinner-jF3-zoh_.mjs → Spinner-aLrtE2JN.mjs} +2 -2
- package/dist/{Spinner-jF3-zoh_.mjs.map → Spinner-aLrtE2JN.mjs.map} +1 -1
- package/dist/{TextLink-BuzFRWO6.mjs → TextLink-D7mOCjY_.mjs} +2 -2
- package/dist/{TextLink-BuzFRWO6.mjs.map → TextLink-D7mOCjY_.mjs.map} +1 -1
- package/dist/{VisuallyHidden-KH1biLx-.mjs → VisuallyHidden-DjlV0-CW.mjs} +7 -7
- package/dist/{VisuallyHidden-KH1biLx-.mjs.map → VisuallyHidden-DjlV0-CW.mjs.map} +1 -1
- package/dist/accordion/index.mjs +5 -5
- package/dist/alert-dialog/index.mjs +6 -6
- package/dist/avatar/index.mjs +4 -4
- package/dist/breadcrumb/index.mjs +3 -3
- package/dist/button/index.mjs +1 -1
- package/dist/card/index.mjs +1 -1
- package/dist/carousel/index.mjs +4 -4
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +31 -31
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chip/index.mjs +2 -2
- package/dist/collapsible/index.mjs +1 -1
- package/dist/combobox/index.mjs +4 -4
- package/dist/dialog/index.mjs +3 -3
- package/dist/drawer/index.mjs +3 -3
- package/dist/dropdown/index.mjs +2 -2
- package/dist/file-upload/index.mjs +4 -4
- package/dist/form-field/index.mjs +2 -2
- package/dist/icon/index.mjs +1 -1
- package/dist/icon-button/index.mjs +1 -1
- package/dist/input/index.mjs +10 -10
- package/dist/link-box/index.mjs +7 -7
- package/dist/pagination/index.mjs +3 -3
- package/dist/popover/index.mjs +2 -2
- package/dist/progress-tracker/index.mjs +1 -1
- package/dist/radio-group/index.js +1 -1
- package/dist/radio-group/index.js.map +1 -1
- package/dist/radio-group/index.mjs +7 -7
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/rating/index.mjs +1 -1
- package/dist/rating-display/index.mjs +2 -2
- package/dist/scrolling-list/index.mjs +6 -6
- package/dist/select/index.mjs +1 -1
- package/dist/skeleton/index.mjs +1 -1
- package/dist/slider/index.mjs +9 -9
- package/dist/slot/index.mjs +1 -1
- package/dist/snackbar/index.mjs +3 -3
- package/dist/spinner/index.mjs +1 -1
- package/dist/stepper/index.mjs +2 -2
- package/dist/switch/index.mjs +1 -1
- package/dist/tabs/index.mjs +3 -3
- package/dist/tag/index.mjs +3 -3
- package/dist/text-link/index.mjs +1 -1
- package/dist/toast/index.mjs +10 -10
- package/dist/{useRenderSlot-LwWj8QbC.mjs → useRenderSlot-Bta2kdp4.mjs} +2 -2
- package/dist/{useRenderSlot-LwWj8QbC.mjs.map → useRenderSlot-Bta2kdp4.mjs.map} +1 -1
- package/dist/visually-hidden/index.mjs +1 -1
- package/package.json +4 -4
package/dist/toast/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import { Toast as a } from "@base-ui/react/toast";
|
|
3
|
-
import {
|
|
3
|
+
import { S as C } from "../Slot-DLY1rJrG.mjs";
|
|
4
4
|
import { cva as T, cx as l } from "class-variance-authority";
|
|
5
|
-
import { B } from "../Button-
|
|
6
|
-
import { I as _ } from "../Icon-
|
|
7
|
-
import { I as D } from "../IconButton-
|
|
5
|
+
import { B } from "../Button-DPncfbbM.mjs";
|
|
6
|
+
import { I as _ } from "../Icon-C23-htlD.mjs";
|
|
7
|
+
import { I as D } from "../IconButton-Bfd-6BAD.mjs";
|
|
8
8
|
import { AlertFill as P } from "@spark-ui/icons/AlertFill";
|
|
9
9
|
import { Close as M } from "@spark-ui/icons/Close";
|
|
10
10
|
import { InfoFill as I } from "@spark-ui/icons/InfoFill";
|
|
@@ -232,7 +232,7 @@ const k = (e, { toastDesign: r, toastIntent: n }) => {
|
|
|
232
232
|
"--offset-y": "calc(var(--toast-offset-y) * -1 + (var(--toast-index) * var(--gap) * -1) + var(--toast-swipe-movement-y))"
|
|
233
233
|
}
|
|
234
234
|
});
|
|
235
|
-
function
|
|
235
|
+
function S(e) {
|
|
236
236
|
switch (e) {
|
|
237
237
|
case "info":
|
|
238
238
|
return /* @__PURE__ */ t(I, {});
|
|
@@ -253,7 +253,7 @@ function j(e) {
|
|
|
253
253
|
return /* @__PURE__ */ t(I, {});
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
|
-
function
|
|
256
|
+
function j({ toast: e }) {
|
|
257
257
|
const {
|
|
258
258
|
icon: r,
|
|
259
259
|
intent: n = "info",
|
|
@@ -263,7 +263,7 @@ function L({ toast: e }) {
|
|
|
263
263
|
isClosable: c,
|
|
264
264
|
closeLabel: d = "Close",
|
|
265
265
|
compact: i = !1
|
|
266
|
-
} = e.data ?? {}, f = "tinted", m = o?.close ? a.Close : a.Action, x = k(o, { toastDesign: f, toastIntent: n }), p = R(e, f, n), v = r ??
|
|
266
|
+
} = e.data ?? {}, f = "tinted", m = o?.close ? a.Close : a.Action, x = k(o, { toastDesign: f, toastIntent: n }), p = R(e, f, n), v = r ?? S(n), b = (s) => c ? /* @__PURE__ */ t(
|
|
267
267
|
a.Close,
|
|
268
268
|
{
|
|
269
269
|
className: s,
|
|
@@ -326,9 +326,9 @@ function N() {
|
|
|
326
326
|
closeAll: r
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function L() {
|
|
330
330
|
const { toasts: e } = N();
|
|
331
|
-
return e.map((r) => /* @__PURE__ */ t(
|
|
331
|
+
return e.map((r) => /* @__PURE__ */ t(j, { toast: r }, r.id));
|
|
332
332
|
}
|
|
333
333
|
function ee({ children: e, limit: r = 3, ...n }) {
|
|
334
334
|
return /* @__PURE__ */ u(a.Provider, { limit: r, ...n, children: [
|
|
@@ -338,7 +338,7 @@ function ee({ children: e, limit: r = 3, ...n }) {
|
|
|
338
338
|
className: l(
|
|
339
339
|
"z-toast right-lg bottom-lg text-on-surfa- fixed top-auto mx-auto flex w-fit flex-col items-end"
|
|
340
340
|
),
|
|
341
|
-
children: /* @__PURE__ */ t(
|
|
341
|
+
children: /* @__PURE__ */ t(L, {})
|
|
342
342
|
}
|
|
343
343
|
) }),
|
|
344
344
|
e
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { S as m } from "./Slot-DLY1rJrG.mjs";
|
|
3
3
|
function u(o, t) {
|
|
4
4
|
const r = o ? m : t;
|
|
5
5
|
return o ? ({ ...n }) => /* @__PURE__ */ e(r, { ...n }) : void 0;
|
|
@@ -7,4 +7,4 @@ function u(o, t) {
|
|
|
7
7
|
export {
|
|
8
8
|
u
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=useRenderSlot-
|
|
10
|
+
//# sourceMappingURL=useRenderSlot-Bta2kdp4.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRenderSlot-
|
|
1
|
+
{"version":3,"file":"useRenderSlot-Bta2kdp4.mjs","sources":["../src/drawer/useRenderSlot.tsx"],"sourcesContent":["import { Slot } from '../slot'\n\nexport function useRenderSlot(asChild: boolean, defaultTag: string) {\n const Component = asChild ? Slot : defaultTag\n\n return asChild ? ({ ...props }) => <Component {...props} /> : undefined\n}\n"],"names":["useRenderSlot","asChild","defaultTag","Component","Slot","props","jsx"],"mappings":";;AAEO,SAASA,EAAcC,GAAkBC,GAAoB;AAClE,QAAMC,IAAYF,IAAUG,IAAOF;AAEnC,SAAOD,IAAU,CAAC,EAAE,GAAGI,EAAA,MAAY,gBAAAC,EAACH,GAAA,EAAW,GAAGE,EAAA,CAAO,IAAK;AAChE;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-ui/components",
|
|
3
|
-
"version": "16.
|
|
3
|
+
"version": "16.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Spark (Leboncoin design system) components.",
|
|
6
6
|
"exports": {
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@react-aria/toast": "^3.0.0-beta.18",
|
|
55
55
|
"@react-stately/numberfield": "3.9.11",
|
|
56
56
|
"@react-stately/toast": "^3.0.0-beta.7",
|
|
57
|
-
"@spark-ui/hooks": "^16.
|
|
58
|
-
"@spark-ui/icons": "^16.
|
|
59
|
-
"@spark-ui/internal-utils": "^16.
|
|
57
|
+
"@spark-ui/hooks": "^16.2.0",
|
|
58
|
+
"@spark-ui/icons": "^16.2.0",
|
|
59
|
+
"@spark-ui/internal-utils": "^16.2.0",
|
|
60
60
|
"@zag-js/pagination": "1.30.0",
|
|
61
61
|
"@zag-js/react": "1.30.0",
|
|
62
62
|
"class-variance-authority": "0.7.1",
|