design-zystem 1.0.391 → 1.0.392
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.d.mts +6 -4
- package/dist/ui/index.d.ts +6 -4
- package/dist/ui/index.js +38 -20
- package/dist/ui/index.mjs +38 -20
- package/package.json +1 -1
package/dist/ui/index.d.mts
CHANGED
|
@@ -10,6 +10,7 @@ import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
|
10
10
|
import * as RadixCollapsible from '@radix-ui/react-collapsible';
|
|
11
11
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
12
12
|
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
13
|
+
import * as RadixToggle from '@radix-ui/react-toggle';
|
|
13
14
|
import { DocumentProps } from 'react-pdf';
|
|
14
15
|
import * as RadixScrollArea from '@radix-ui/react-scroll-area';
|
|
15
16
|
|
|
@@ -1243,12 +1244,13 @@ interface PaginationProps {
|
|
|
1243
1244
|
/** Structure calquée sur `Pagination`/`PaginationContent`/`PaginationItem` de shadcn (nav > ul > li). */
|
|
1244
1245
|
declare const Pagination: ({ currentPage, totalItems, itemsPerPage, onPageChange, showSummary, summaryLabel, }: PaginationProps) => react.JSX.Element;
|
|
1245
1246
|
|
|
1246
|
-
|
|
1247
|
+
type TagBubbleColor = ColorToken | HexColor;
|
|
1248
|
+
interface TagBubbleProps extends Omit<ComponentPropsWithoutRef<typeof RadixToggle.Root>, 'pressed' | 'defaultPressed' | 'onPressedChange' | 'onClick' | 'children' | 'className' | 'type'> {
|
|
1247
1249
|
label: string;
|
|
1248
1250
|
hideDot?: boolean;
|
|
1249
1251
|
active?: boolean;
|
|
1250
|
-
activeColor?:
|
|
1251
|
-
inactiveColor?:
|
|
1252
|
+
activeColor?: TagBubbleColor;
|
|
1253
|
+
inactiveColor?: TagBubbleColor;
|
|
1252
1254
|
/** Actif : bordure épaisse + texte `activeColor`, fond en variante claire (ex. `blue_950` → `bg-blue-50`). */
|
|
1253
1255
|
activeFill?: boolean;
|
|
1254
1256
|
/** Forme pilule (`rounded-full`) à la place du rectangle arrondi par défaut. */
|
|
@@ -1259,7 +1261,7 @@ interface TagBubbleProps {
|
|
|
1259
1261
|
className?: string;
|
|
1260
1262
|
}
|
|
1261
1263
|
/** Construit sur `@radix-ui/react-toggle` (comme le `Toggle` de shadcn) — chip filtre à deux états, pressable au clavier. */
|
|
1262
|
-
declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, }: TagBubbleProps) => react.JSX.Element;
|
|
1264
|
+
declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, ...rest }: TagBubbleProps) => react.JSX.Element;
|
|
1263
1265
|
|
|
1264
1266
|
interface HistoryChange {
|
|
1265
1267
|
label: string;
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import * as RadixAvatar from '@radix-ui/react-avatar';
|
|
|
10
10
|
import * as RadixCollapsible from '@radix-ui/react-collapsible';
|
|
11
11
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
12
12
|
import * as RadixTooltip from '@radix-ui/react-tooltip';
|
|
13
|
+
import * as RadixToggle from '@radix-ui/react-toggle';
|
|
13
14
|
import { DocumentProps } from 'react-pdf';
|
|
14
15
|
import * as RadixScrollArea from '@radix-ui/react-scroll-area';
|
|
15
16
|
|
|
@@ -1243,12 +1244,13 @@ interface PaginationProps {
|
|
|
1243
1244
|
/** Structure calquée sur `Pagination`/`PaginationContent`/`PaginationItem` de shadcn (nav > ul > li). */
|
|
1244
1245
|
declare const Pagination: ({ currentPage, totalItems, itemsPerPage, onPageChange, showSummary, summaryLabel, }: PaginationProps) => react.JSX.Element;
|
|
1245
1246
|
|
|
1246
|
-
|
|
1247
|
+
type TagBubbleColor = ColorToken | HexColor;
|
|
1248
|
+
interface TagBubbleProps extends Omit<ComponentPropsWithoutRef<typeof RadixToggle.Root>, 'pressed' | 'defaultPressed' | 'onPressedChange' | 'onClick' | 'children' | 'className' | 'type'> {
|
|
1247
1249
|
label: string;
|
|
1248
1250
|
hideDot?: boolean;
|
|
1249
1251
|
active?: boolean;
|
|
1250
|
-
activeColor?:
|
|
1251
|
-
inactiveColor?:
|
|
1252
|
+
activeColor?: TagBubbleColor;
|
|
1253
|
+
inactiveColor?: TagBubbleColor;
|
|
1252
1254
|
/** Actif : bordure épaisse + texte `activeColor`, fond en variante claire (ex. `blue_950` → `bg-blue-50`). */
|
|
1253
1255
|
activeFill?: boolean;
|
|
1254
1256
|
/** Forme pilule (`rounded-full`) à la place du rectangle arrondi par défaut. */
|
|
@@ -1259,7 +1261,7 @@ interface TagBubbleProps {
|
|
|
1259
1261
|
className?: string;
|
|
1260
1262
|
}
|
|
1261
1263
|
/** Construit sur `@radix-ui/react-toggle` (comme le `Toggle` de shadcn) — chip filtre à deux états, pressable au clavier. */
|
|
1262
|
-
declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, }: TagBubbleProps) => react.JSX.Element;
|
|
1264
|
+
declare const TagBubble: ({ label, hideDot, active, activeColor, inactiveColor, activeFill, pill, count, countColor, onClick, className, ...rest }: TagBubbleProps) => react.JSX.Element;
|
|
1263
1265
|
|
|
1264
1266
|
interface HistoryChange {
|
|
1265
1267
|
label: string;
|
package/dist/ui/index.js
CHANGED
|
@@ -5951,33 +5951,49 @@ var BORDER_CLASS = {
|
|
|
5951
5951
|
"orange-600": "border-orange-600",
|
|
5952
5952
|
"purple-700": "border-purple-700"
|
|
5953
5953
|
};
|
|
5954
|
-
var
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5954
|
+
var isHexColor = (color) => color.startsWith("#");
|
|
5955
|
+
var TagBubble = (_a) => {
|
|
5956
|
+
var _b = _a, {
|
|
5957
|
+
label,
|
|
5958
|
+
hideDot = false,
|
|
5959
|
+
active = false,
|
|
5960
|
+
activeColor = "blue-700",
|
|
5961
|
+
inactiveColor = "grey-600",
|
|
5962
|
+
activeFill = false,
|
|
5963
|
+
pill = false,
|
|
5964
|
+
count,
|
|
5965
|
+
countColor = "green-700",
|
|
5966
|
+
onClick,
|
|
5967
|
+
className
|
|
5968
|
+
} = _b, rest = __objRest(_b, [
|
|
5969
|
+
"label",
|
|
5970
|
+
"hideDot",
|
|
5971
|
+
"active",
|
|
5972
|
+
"activeColor",
|
|
5973
|
+
"inactiveColor",
|
|
5974
|
+
"activeFill",
|
|
5975
|
+
"pill",
|
|
5976
|
+
"count",
|
|
5977
|
+
"countColor",
|
|
5978
|
+
"onClick",
|
|
5979
|
+
"className"
|
|
5980
|
+
]);
|
|
5967
5981
|
const showCount = count !== void 0 && count !== null;
|
|
5968
5982
|
const filled = activeFill && active;
|
|
5983
|
+
const dotColor = active ? activeColor : inactiveColor;
|
|
5984
|
+
const filledHexColor = filled && isHexColor(activeColor) ? activeColor : void 0;
|
|
5969
5985
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(
|
|
5970
5986
|
RadixToggle.Root,
|
|
5971
|
-
{
|
|
5987
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
5972
5988
|
type: "button",
|
|
5973
5989
|
pressed: active,
|
|
5974
5990
|
onClick,
|
|
5991
|
+
style: __spreadValues({ borderColor: filledHexColor }, rest.style),
|
|
5975
5992
|
className: cn(
|
|
5976
5993
|
"inline-flex items-center gap-2 border px-2.5 py-1.5 outline-none",
|
|
5977
5994
|
pill ? "rounded-full" : "rounded-[6px]",
|
|
5978
5995
|
filled ? cn(
|
|
5979
|
-
LIGHT_BG_CLASS[activeColor],
|
|
5980
|
-
BORDER_CLASS[activeColor],
|
|
5996
|
+
isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
|
|
5981
5997
|
"border-2"
|
|
5982
5998
|
) : "border-grey-200 bg-white",
|
|
5983
5999
|
"focus-visible:ring-2 focus-visible:ring-blue-200",
|
|
@@ -5989,8 +6005,9 @@ var TagBubble = ({
|
|
|
5989
6005
|
{
|
|
5990
6006
|
className: cn(
|
|
5991
6007
|
"h-2 w-2 shrink-0 rounded-full",
|
|
5992
|
-
DOT_CLASS[
|
|
5993
|
-
)
|
|
6008
|
+
!isHexColor(dotColor) && DOT_CLASS[dotColor]
|
|
6009
|
+
),
|
|
6010
|
+
style: isHexColor(dotColor) ? { backgroundColor: dotColor } : void 0
|
|
5994
6011
|
}
|
|
5995
6012
|
),
|
|
5996
6013
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
@@ -5998,14 +6015,15 @@ var TagBubble = ({
|
|
|
5998
6015
|
{
|
|
5999
6016
|
className: cn(
|
|
6000
6017
|
"whitespace-nowrap text-xs font-semibold",
|
|
6001
|
-
filled ? TEXT_CLASS2[activeColor] : "text-neutral-800"
|
|
6018
|
+
filled ? !isHexColor(activeColor) && TEXT_CLASS2[activeColor] : "text-neutral-800"
|
|
6002
6019
|
),
|
|
6020
|
+
style: { color: filledHexColor },
|
|
6003
6021
|
children: label
|
|
6004
6022
|
}
|
|
6005
6023
|
),
|
|
6006
6024
|
showCount && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(Badge, { theme: countColor, size: "s", children: count })
|
|
6007
6025
|
]
|
|
6008
|
-
}
|
|
6026
|
+
})
|
|
6009
6027
|
);
|
|
6010
6028
|
};
|
|
6011
6029
|
|
package/dist/ui/index.mjs
CHANGED
|
@@ -5780,33 +5780,49 @@ var BORDER_CLASS = {
|
|
|
5780
5780
|
"orange-600": "border-orange-600",
|
|
5781
5781
|
"purple-700": "border-purple-700"
|
|
5782
5782
|
};
|
|
5783
|
-
var
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5783
|
+
var isHexColor = (color) => color.startsWith("#");
|
|
5784
|
+
var TagBubble = (_a) => {
|
|
5785
|
+
var _b = _a, {
|
|
5786
|
+
label,
|
|
5787
|
+
hideDot = false,
|
|
5788
|
+
active = false,
|
|
5789
|
+
activeColor = "blue-700",
|
|
5790
|
+
inactiveColor = "grey-600",
|
|
5791
|
+
activeFill = false,
|
|
5792
|
+
pill = false,
|
|
5793
|
+
count,
|
|
5794
|
+
countColor = "green-700",
|
|
5795
|
+
onClick,
|
|
5796
|
+
className
|
|
5797
|
+
} = _b, rest = __objRest(_b, [
|
|
5798
|
+
"label",
|
|
5799
|
+
"hideDot",
|
|
5800
|
+
"active",
|
|
5801
|
+
"activeColor",
|
|
5802
|
+
"inactiveColor",
|
|
5803
|
+
"activeFill",
|
|
5804
|
+
"pill",
|
|
5805
|
+
"count",
|
|
5806
|
+
"countColor",
|
|
5807
|
+
"onClick",
|
|
5808
|
+
"className"
|
|
5809
|
+
]);
|
|
5796
5810
|
const showCount = count !== void 0 && count !== null;
|
|
5797
5811
|
const filled = activeFill && active;
|
|
5812
|
+
const dotColor = active ? activeColor : inactiveColor;
|
|
5813
|
+
const filledHexColor = filled && isHexColor(activeColor) ? activeColor : void 0;
|
|
5798
5814
|
return /* @__PURE__ */ jsxs37(
|
|
5799
5815
|
RadixToggle.Root,
|
|
5800
|
-
{
|
|
5816
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
5801
5817
|
type: "button",
|
|
5802
5818
|
pressed: active,
|
|
5803
5819
|
onClick,
|
|
5820
|
+
style: __spreadValues({ borderColor: filledHexColor }, rest.style),
|
|
5804
5821
|
className: cn(
|
|
5805
5822
|
"inline-flex items-center gap-2 border px-2.5 py-1.5 outline-none",
|
|
5806
5823
|
pill ? "rounded-full" : "rounded-[6px]",
|
|
5807
5824
|
filled ? cn(
|
|
5808
|
-
LIGHT_BG_CLASS[activeColor],
|
|
5809
|
-
BORDER_CLASS[activeColor],
|
|
5825
|
+
isHexColor(activeColor) ? "bg-white" : [LIGHT_BG_CLASS[activeColor], BORDER_CLASS[activeColor]],
|
|
5810
5826
|
"border-2"
|
|
5811
5827
|
) : "border-grey-200 bg-white",
|
|
5812
5828
|
"focus-visible:ring-2 focus-visible:ring-blue-200",
|
|
@@ -5818,8 +5834,9 @@ var TagBubble = ({
|
|
|
5818
5834
|
{
|
|
5819
5835
|
className: cn(
|
|
5820
5836
|
"h-2 w-2 shrink-0 rounded-full",
|
|
5821
|
-
DOT_CLASS[
|
|
5822
|
-
)
|
|
5837
|
+
!isHexColor(dotColor) && DOT_CLASS[dotColor]
|
|
5838
|
+
),
|
|
5839
|
+
style: isHexColor(dotColor) ? { backgroundColor: dotColor } : void 0
|
|
5823
5840
|
}
|
|
5824
5841
|
),
|
|
5825
5842
|
/* @__PURE__ */ jsx73(
|
|
@@ -5827,14 +5844,15 @@ var TagBubble = ({
|
|
|
5827
5844
|
{
|
|
5828
5845
|
className: cn(
|
|
5829
5846
|
"whitespace-nowrap text-xs font-semibold",
|
|
5830
|
-
filled ? TEXT_CLASS2[activeColor] : "text-neutral-800"
|
|
5847
|
+
filled ? !isHexColor(activeColor) && TEXT_CLASS2[activeColor] : "text-neutral-800"
|
|
5831
5848
|
),
|
|
5849
|
+
style: { color: filledHexColor },
|
|
5832
5850
|
children: label
|
|
5833
5851
|
}
|
|
5834
5852
|
),
|
|
5835
5853
|
showCount && /* @__PURE__ */ jsx73(Badge, { theme: countColor, size: "s", children: count })
|
|
5836
5854
|
]
|
|
5837
|
-
}
|
|
5855
|
+
})
|
|
5838
5856
|
);
|
|
5839
5857
|
};
|
|
5840
5858
|
|