design-zystem 1.0.392 → 1.0.394
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/ui/index.js +57 -45
- package/dist/ui/index.mjs +57 -45
- package/package.json +1 -1
package/dist/ui/index.js
CHANGED
|
@@ -2235,6 +2235,7 @@ var Modal = ({
|
|
|
2235
2235
|
RadixDialog.Overlay,
|
|
2236
2236
|
{
|
|
2237
2237
|
ref: overlayRef,
|
|
2238
|
+
"data-drawer-keep-open": true,
|
|
2238
2239
|
onClick: (event) => event.stopPropagation(),
|
|
2239
2240
|
className: cn(
|
|
2240
2241
|
"fixed inset-0 z-40",
|
|
@@ -4145,6 +4146,7 @@ var CollapsibleContent = (_a) => {
|
|
|
4145
4146
|
// src/ui/components/ui/Drawer.tsx
|
|
4146
4147
|
var import_react27 = require("react");
|
|
4147
4148
|
var import_vaul = require("vaul");
|
|
4149
|
+
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
4148
4150
|
|
|
4149
4151
|
// src/ui/lib/drawer/nestedDrawerAttributes.ts
|
|
4150
4152
|
var NESTED_DRAWER_ATTRIBUTES = {
|
|
@@ -4254,56 +4256,66 @@ var Drawer = ({
|
|
|
4254
4256
|
});
|
|
4255
4257
|
return () => cancelAnimationFrame(frame);
|
|
4256
4258
|
}, [modal, open]);
|
|
4259
|
+
const closeOnDismiss = (next) => !next && closeDrawer();
|
|
4260
|
+
const drawerPortal = /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)(import_vaul.Drawer.Portal, { children: [
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4262
|
+
import_vaul.Drawer.Overlay,
|
|
4263
|
+
{
|
|
4264
|
+
ref: overlayRef,
|
|
4265
|
+
onClick: (event) => event.stopPropagation(),
|
|
4266
|
+
className: cn(
|
|
4267
|
+
"fixed inset-0 z-40 bg-black/35 data-[stacked]:bg-transparent",
|
|
4268
|
+
overlayClassName
|
|
4269
|
+
)
|
|
4270
|
+
}
|
|
4271
|
+
),
|
|
4272
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4273
|
+
import_vaul.Drawer.Content,
|
|
4274
|
+
__spreadProps(__spreadValues({
|
|
4275
|
+
ref: (node) => {
|
|
4276
|
+
contentRef.current = node;
|
|
4277
|
+
setPanel(node);
|
|
4278
|
+
}
|
|
4279
|
+
}, { [NESTED_DRAWER_ATTRIBUTES.panel]: "" }), {
|
|
4280
|
+
onPointerDownOutside: (event) => {
|
|
4281
|
+
const target = event.target;
|
|
4282
|
+
if (target && belongsToLayerAbove(target)) event.preventDefault();
|
|
4283
|
+
},
|
|
4284
|
+
onClick: (event) => event.stopPropagation(),
|
|
4285
|
+
className: cn(
|
|
4286
|
+
"fixed z-50 flex flex-col gap-4 bg-white p-6 outline-none",
|
|
4287
|
+
// vaul prolonge le panneau d'un ::after opaque de 200% (effet
|
|
4288
|
+
// élastique d'un panneau collé au bord) : sur un panneau qui flotte,
|
|
4289
|
+
// il déborde dans la marge et forme une barre blanche jusqu'au bord
|
|
4290
|
+
// de l'écran. `!` car son sélecteur est plus spécifique que la classe.
|
|
4291
|
+
"after:!hidden",
|
|
4292
|
+
"shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-2px_rgba(0,0,0,0.05)]",
|
|
4293
|
+
"transition-[transform,filter] duration-500",
|
|
4294
|
+
"data-[receded]:-translate-x-9 data-[receded]:scale-[0.965] data-[receded]:brightness-[.82]",
|
|
4295
|
+
CONTENT_POSITION[direction],
|
|
4296
|
+
className
|
|
4297
|
+
),
|
|
4298
|
+
style: isVertical ? { width: size, maxWidth: "calc(90vw - 16px)" } : { height: size, maxHeight: "calc(90vh - 16px)" },
|
|
4299
|
+
children
|
|
4300
|
+
})
|
|
4301
|
+
)
|
|
4302
|
+
] });
|
|
4257
4303
|
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4258
4304
|
import_vaul.Drawer.Root,
|
|
4259
4305
|
{
|
|
4260
4306
|
direction,
|
|
4261
4307
|
modal,
|
|
4262
4308
|
open,
|
|
4263
|
-
onOpenChange:
|
|
4264
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime48.
|
|
4265
|
-
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
)
|
|
4274
|
-
}
|
|
4275
|
-
),
|
|
4276
|
-
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4277
|
-
import_vaul.Drawer.Content,
|
|
4278
|
-
__spreadProps(__spreadValues({
|
|
4279
|
-
ref: (node) => {
|
|
4280
|
-
contentRef.current = node;
|
|
4281
|
-
setPanel(node);
|
|
4282
|
-
}
|
|
4283
|
-
}, { [NESTED_DRAWER_ATTRIBUTES.panel]: "" }), {
|
|
4284
|
-
onPointerDownOutside: (event) => {
|
|
4285
|
-
const target = event.target;
|
|
4286
|
-
if (target && belongsToLayerAbove(target)) event.preventDefault();
|
|
4287
|
-
},
|
|
4288
|
-
onClick: (event) => event.stopPropagation(),
|
|
4289
|
-
className: cn(
|
|
4290
|
-
"fixed z-50 flex flex-col gap-4 bg-white p-6 outline-none",
|
|
4291
|
-
// vaul prolonge le panneau d'un ::after opaque de 200% (effet
|
|
4292
|
-
// élastique d'un panneau collé au bord) : sur un panneau qui flotte,
|
|
4293
|
-
// il déborde dans la marge et forme une barre blanche jusqu'au bord
|
|
4294
|
-
// de l'écran. `!` car son sélecteur est plus spécifique que la classe.
|
|
4295
|
-
"after:!hidden",
|
|
4296
|
-
"shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-2px_rgba(0,0,0,0.05)]",
|
|
4297
|
-
"transition-[transform,filter] duration-500",
|
|
4298
|
-
"data-[receded]:-translate-x-9 data-[receded]:scale-[0.965] data-[receded]:brightness-[.82]",
|
|
4299
|
-
CONTENT_POSITION[direction],
|
|
4300
|
-
className
|
|
4301
|
-
),
|
|
4302
|
-
style: isVertical ? { width: size, maxWidth: "calc(90vw - 16px)" } : { height: size, maxHeight: "calc(90vh - 16px)" },
|
|
4303
|
-
children
|
|
4304
|
-
})
|
|
4305
|
-
)
|
|
4306
|
-
] })
|
|
4309
|
+
onOpenChange: closeOnDismiss,
|
|
4310
|
+
children: modal ? drawerPortal : /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
4311
|
+
DialogPrimitive.Root,
|
|
4312
|
+
{
|
|
4313
|
+
modal: false,
|
|
4314
|
+
open,
|
|
4315
|
+
onOpenChange: closeOnDismiss,
|
|
4316
|
+
children: drawerPortal
|
|
4317
|
+
}
|
|
4318
|
+
)
|
|
4307
4319
|
}
|
|
4308
4320
|
);
|
|
4309
4321
|
};
|
|
@@ -5990,7 +6002,7 @@ var TagBubble = (_a) => {
|
|
|
5990
6002
|
onClick,
|
|
5991
6003
|
style: __spreadValues({ borderColor: filledHexColor }, rest.style),
|
|
5992
6004
|
className: cn(
|
|
5993
|
-
"inline-flex items-center gap-2 border px-2.5 py-1.5 outline-none",
|
|
6005
|
+
"inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
|
|
5994
6006
|
pill ? "rounded-full" : "rounded-[6px]",
|
|
5995
6007
|
filled ? cn(
|
|
5996
6008
|
isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
|
package/dist/ui/index.mjs
CHANGED
|
@@ -2047,6 +2047,7 @@ var Modal = ({
|
|
|
2047
2047
|
RadixDialog.Overlay,
|
|
2048
2048
|
{
|
|
2049
2049
|
ref: overlayRef,
|
|
2050
|
+
"data-drawer-keep-open": true,
|
|
2050
2051
|
onClick: (event) => event.stopPropagation(),
|
|
2051
2052
|
className: cn(
|
|
2052
2053
|
"fixed inset-0 z-40",
|
|
@@ -3968,6 +3969,7 @@ var CollapsibleContent = (_a) => {
|
|
|
3968
3969
|
// src/ui/components/ui/Drawer.tsx
|
|
3969
3970
|
import { useEffect as useEffect6, useRef as useRef7, useState as useState7 } from "react";
|
|
3970
3971
|
import { Drawer as VaulDrawer } from "vaul";
|
|
3972
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3971
3973
|
|
|
3972
3974
|
// src/ui/lib/drawer/nestedDrawerAttributes.ts
|
|
3973
3975
|
var NESTED_DRAWER_ATTRIBUTES = {
|
|
@@ -4077,56 +4079,66 @@ var Drawer = ({
|
|
|
4077
4079
|
});
|
|
4078
4080
|
return () => cancelAnimationFrame(frame);
|
|
4079
4081
|
}, [modal, open]);
|
|
4082
|
+
const closeOnDismiss = (next) => !next && closeDrawer();
|
|
4083
|
+
const drawerPortal = /* @__PURE__ */ jsxs24(VaulDrawer.Portal, { children: [
|
|
4084
|
+
/* @__PURE__ */ jsx48(
|
|
4085
|
+
VaulDrawer.Overlay,
|
|
4086
|
+
{
|
|
4087
|
+
ref: overlayRef,
|
|
4088
|
+
onClick: (event) => event.stopPropagation(),
|
|
4089
|
+
className: cn(
|
|
4090
|
+
"fixed inset-0 z-40 bg-black/35 data-[stacked]:bg-transparent",
|
|
4091
|
+
overlayClassName
|
|
4092
|
+
)
|
|
4093
|
+
}
|
|
4094
|
+
),
|
|
4095
|
+
/* @__PURE__ */ jsx48(
|
|
4096
|
+
VaulDrawer.Content,
|
|
4097
|
+
__spreadProps(__spreadValues({
|
|
4098
|
+
ref: (node) => {
|
|
4099
|
+
contentRef.current = node;
|
|
4100
|
+
setPanel(node);
|
|
4101
|
+
}
|
|
4102
|
+
}, { [NESTED_DRAWER_ATTRIBUTES.panel]: "" }), {
|
|
4103
|
+
onPointerDownOutside: (event) => {
|
|
4104
|
+
const target = event.target;
|
|
4105
|
+
if (target && belongsToLayerAbove(target)) event.preventDefault();
|
|
4106
|
+
},
|
|
4107
|
+
onClick: (event) => event.stopPropagation(),
|
|
4108
|
+
className: cn(
|
|
4109
|
+
"fixed z-50 flex flex-col gap-4 bg-white p-6 outline-none",
|
|
4110
|
+
// vaul prolonge le panneau d'un ::after opaque de 200% (effet
|
|
4111
|
+
// élastique d'un panneau collé au bord) : sur un panneau qui flotte,
|
|
4112
|
+
// il déborde dans la marge et forme une barre blanche jusqu'au bord
|
|
4113
|
+
// de l'écran. `!` car son sélecteur est plus spécifique que la classe.
|
|
4114
|
+
"after:!hidden",
|
|
4115
|
+
"shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-2px_rgba(0,0,0,0.05)]",
|
|
4116
|
+
"transition-[transform,filter] duration-500",
|
|
4117
|
+
"data-[receded]:-translate-x-9 data-[receded]:scale-[0.965] data-[receded]:brightness-[.82]",
|
|
4118
|
+
CONTENT_POSITION[direction],
|
|
4119
|
+
className
|
|
4120
|
+
),
|
|
4121
|
+
style: isVertical ? { width: size, maxWidth: "calc(90vw - 16px)" } : { height: size, maxHeight: "calc(90vh - 16px)" },
|
|
4122
|
+
children
|
|
4123
|
+
})
|
|
4124
|
+
)
|
|
4125
|
+
] });
|
|
4080
4126
|
return /* @__PURE__ */ jsx48(
|
|
4081
4127
|
VaulDrawer.Root,
|
|
4082
4128
|
{
|
|
4083
4129
|
direction,
|
|
4084
4130
|
modal,
|
|
4085
4131
|
open,
|
|
4086
|
-
onOpenChange:
|
|
4087
|
-
children: /* @__PURE__ */
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
|
|
4091
|
-
|
|
4092
|
-
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
)
|
|
4097
|
-
}
|
|
4098
|
-
),
|
|
4099
|
-
/* @__PURE__ */ jsx48(
|
|
4100
|
-
VaulDrawer.Content,
|
|
4101
|
-
__spreadProps(__spreadValues({
|
|
4102
|
-
ref: (node) => {
|
|
4103
|
-
contentRef.current = node;
|
|
4104
|
-
setPanel(node);
|
|
4105
|
-
}
|
|
4106
|
-
}, { [NESTED_DRAWER_ATTRIBUTES.panel]: "" }), {
|
|
4107
|
-
onPointerDownOutside: (event) => {
|
|
4108
|
-
const target = event.target;
|
|
4109
|
-
if (target && belongsToLayerAbove(target)) event.preventDefault();
|
|
4110
|
-
},
|
|
4111
|
-
onClick: (event) => event.stopPropagation(),
|
|
4112
|
-
className: cn(
|
|
4113
|
-
"fixed z-50 flex flex-col gap-4 bg-white p-6 outline-none",
|
|
4114
|
-
// vaul prolonge le panneau d'un ::after opaque de 200% (effet
|
|
4115
|
-
// élastique d'un panneau collé au bord) : sur un panneau qui flotte,
|
|
4116
|
-
// il déborde dans la marge et forme une barre blanche jusqu'au bord
|
|
4117
|
-
// de l'écran. `!` car son sélecteur est plus spécifique que la classe.
|
|
4118
|
-
"after:!hidden",
|
|
4119
|
-
"shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-2px_rgba(0,0,0,0.05)]",
|
|
4120
|
-
"transition-[transform,filter] duration-500",
|
|
4121
|
-
"data-[receded]:-translate-x-9 data-[receded]:scale-[0.965] data-[receded]:brightness-[.82]",
|
|
4122
|
-
CONTENT_POSITION[direction],
|
|
4123
|
-
className
|
|
4124
|
-
),
|
|
4125
|
-
style: isVertical ? { width: size, maxWidth: "calc(90vw - 16px)" } : { height: size, maxHeight: "calc(90vh - 16px)" },
|
|
4126
|
-
children
|
|
4127
|
-
})
|
|
4128
|
-
)
|
|
4129
|
-
] })
|
|
4132
|
+
onOpenChange: closeOnDismiss,
|
|
4133
|
+
children: modal ? drawerPortal : /* @__PURE__ */ jsx48(
|
|
4134
|
+
DialogPrimitive.Root,
|
|
4135
|
+
{
|
|
4136
|
+
modal: false,
|
|
4137
|
+
open,
|
|
4138
|
+
onOpenChange: closeOnDismiss,
|
|
4139
|
+
children: drawerPortal
|
|
4140
|
+
}
|
|
4141
|
+
)
|
|
4130
4142
|
}
|
|
4131
4143
|
);
|
|
4132
4144
|
};
|
|
@@ -5819,7 +5831,7 @@ var TagBubble = (_a) => {
|
|
|
5819
5831
|
onClick,
|
|
5820
5832
|
style: __spreadValues({ borderColor: filledHexColor }, rest.style),
|
|
5821
5833
|
className: cn(
|
|
5822
|
-
"inline-flex items-center gap-2 border px-2.5 py-1.5 outline-none",
|
|
5834
|
+
"inline-flex items-center justify-center gap-2 border px-2.5 py-1.5 outline-none",
|
|
5823
5835
|
pill ? "rounded-full" : "rounded-[6px]",
|
|
5824
5836
|
filled ? cn(
|
|
5825
5837
|
isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
|