@arbidocs/react 0.4.30 → 0.4.32
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/{chunk-VC2I4NST.cjs → chunk-3AK4QJ62.cjs} +22 -11
- package/dist/chunk-3AK4QJ62.cjs.map +1 -0
- package/dist/{chunk-SDUISFTV.js → chunk-OXUFBF5W.js} +23 -12
- package/dist/chunk-OXUFBF5W.js.map +1 -0
- package/dist/{index-DaTuuykQ.d.cts → index-C99tcxue.d.cts} +6 -3
- package/dist/{index-DaTuuykQ.d.ts → index-C99tcxue.d.ts} +6 -3
- package/dist/index.cjs +284 -284
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +6 -6
- package/dist/ui/index.cjs +148 -148
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +2 -2
- package/package.json +3 -3
- package/dist/chunk-SDUISFTV.js.map +0 -1
- package/dist/chunk-VC2I4NST.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var chunkEOOHRPFM_cjs = require('./chunk-EOOHRPFM.cjs');
|
|
4
3
|
var chunkOBNTJEEO_cjs = require('./chunk-OBNTJEEO.cjs');
|
|
4
|
+
var chunkEOOHRPFM_cjs = require('./chunk-EOOHRPFM.cjs');
|
|
5
5
|
var chunkS6A6FSG7_cjs = require('./chunk-S6A6FSG7.cjs');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var reactDom = require('react-dom');
|
|
@@ -128,14 +128,19 @@ function showsOwnText(el) {
|
|
|
128
128
|
}
|
|
129
129
|
return /\p{L}{2,}/u.test(visible);
|
|
130
130
|
}
|
|
131
|
-
function TooltipTrigger({
|
|
131
|
+
function TooltipTrigger({
|
|
132
|
+
asChild,
|
|
133
|
+
showWithText = false,
|
|
134
|
+
children,
|
|
135
|
+
...props
|
|
136
|
+
}) {
|
|
132
137
|
const ctx = React__namespace.useContext(TooltipContext);
|
|
133
138
|
if (!ctx) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
134
139
|
const triggerHandlers = {
|
|
135
140
|
onPointerEnter: (e) => {
|
|
136
141
|
props.onPointerEnter?.(e);
|
|
137
142
|
if (e.pointerType === "touch") return;
|
|
138
|
-
if (showsOwnText(e.currentTarget)) return;
|
|
143
|
+
if (!showWithText && showsOwnText(e.currentTarget)) return;
|
|
139
144
|
ctx.show();
|
|
140
145
|
},
|
|
141
146
|
onPointerLeave: (e) => {
|
|
@@ -150,7 +155,7 @@ function TooltipTrigger({ asChild, children, ...props }) {
|
|
|
150
155
|
},
|
|
151
156
|
onFocus: (e) => {
|
|
152
157
|
props.onFocus?.(e);
|
|
153
|
-
if (isKeyboardFocus(e.target) && !showsOwnText(e.currentTarget)) ctx.show();
|
|
158
|
+
if (isKeyboardFocus(e.target) && (showWithText || !showsOwnText(e.currentTarget))) ctx.show();
|
|
154
159
|
},
|
|
155
160
|
onBlur: (e) => {
|
|
156
161
|
props.onBlur?.(e);
|
|
@@ -260,6 +265,7 @@ function IconToggle({
|
|
|
260
265
|
isActive,
|
|
261
266
|
onToggle,
|
|
262
267
|
colors,
|
|
268
|
+
inactiveColors,
|
|
263
269
|
fillWhenActive = false,
|
|
264
270
|
disabled = false,
|
|
265
271
|
disabledTooltip,
|
|
@@ -293,7 +299,7 @@ function IconToggle({
|
|
|
293
299
|
pointer-coarse:after:absolute pointer-coarse:after:left-1/2 pointer-coarse:after:top-1/2 pointer-coarse:after:size-11 pointer-coarse:after:-translate-x-1/2 pointer-coarse:after:-translate-y-1/2 pointer-coarse:after:content-['']
|
|
294
300
|
transition-colors cursor-pointer
|
|
295
301
|
disabled:opacity-50 disabled:cursor-not-allowed
|
|
296
|
-
${isActive ? bgColorClass : isMixed ? "bg-
|
|
302
|
+
${isActive ? bgColorClass : isMixed ? "bg-muted-foreground" : inactiveColors?.bg ?? "bg-muted"}
|
|
297
303
|
`,
|
|
298
304
|
children: [
|
|
299
305
|
isActive && !disabled && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 w-4 h-4 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Minus, { className: "w-2.5 h-2.5 text-white/70 hidden group-hover/toggle:block" }) }),
|
|
@@ -310,7 +316,7 @@ function IconToggle({
|
|
|
310
316
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
311
317
|
Icon2,
|
|
312
318
|
{
|
|
313
|
-
className: `w-2.5 h-2.5 ${isActive ? textColorClass : "text-muted-foreground"} ${isActive && fillWhenActive ? "fill-current" : ""}`
|
|
319
|
+
className: `w-2.5 h-2.5 ${isActive ? textColorClass : inactiveColors?.text ?? "text-muted-foreground"} ${isActive && fillWhenActive ? "fill-current" : ""}`
|
|
314
320
|
}
|
|
315
321
|
)
|
|
316
322
|
}
|
|
@@ -327,8 +333,8 @@ function IconToggle({
|
|
|
327
333
|
] });
|
|
328
334
|
}
|
|
329
335
|
var COLORS = {
|
|
330
|
-
text: "text-
|
|
331
|
-
bg: "bg-
|
|
336
|
+
text: "text-secondary",
|
|
337
|
+
bg: "bg-secondary"
|
|
332
338
|
};
|
|
333
339
|
function isItemShared(item) {
|
|
334
340
|
return item.shared === true || item.is_shared === true;
|
|
@@ -373,6 +379,7 @@ function VisibilityToggle({
|
|
|
373
379
|
isActive: isAllShared,
|
|
374
380
|
onToggle: handleToggle,
|
|
375
381
|
colors: COLORS,
|
|
382
|
+
inactiveColors: { text: "text-primary", bg: "bg-primary/10" },
|
|
376
383
|
disabled: disabled || itemsArray.length === 0,
|
|
377
384
|
disabledTooltip,
|
|
378
385
|
showLabel,
|
|
@@ -3316,10 +3323,14 @@ var VISIBILITY_ICONS = {
|
|
|
3316
3323
|
};
|
|
3317
3324
|
var VisibilityIcon = ({
|
|
3318
3325
|
isShared,
|
|
3326
|
+
className,
|
|
3319
3327
|
...props
|
|
3320
3328
|
}) => {
|
|
3321
3329
|
const IconComponent = isShared ? VISIBILITY_ICONS.SHARED : VISIBILITY_ICONS.PRIVATE;
|
|
3322
|
-
return React__namespace.default.createElement(IconComponent,
|
|
3330
|
+
return React__namespace.default.createElement(IconComponent, {
|
|
3331
|
+
...props,
|
|
3332
|
+
className: [isShared ? "text-secondary" : "text-primary", className].filter(Boolean).join(" ")
|
|
3333
|
+
});
|
|
3323
3334
|
};
|
|
3324
3335
|
|
|
3325
3336
|
// src/entities/colors.ts
|
|
@@ -3897,5 +3908,5 @@ exports.getTagTypeLabel = getTagTypeLabel;
|
|
|
3897
3908
|
exports.getWorkspaceColor = getWorkspaceColor;
|
|
3898
3909
|
exports.toggleVariants = toggleVariants;
|
|
3899
3910
|
exports.useAudioRecorder = useAudioRecorder;
|
|
3900
|
-
//# sourceMappingURL=chunk-
|
|
3901
|
-
//# sourceMappingURL=chunk-
|
|
3911
|
+
//# sourceMappingURL=chunk-3AK4QJ62.cjs.map
|
|
3912
|
+
//# sourceMappingURL=chunk-3AK4QJ62.cjs.map
|