design-zystem 1.0.387 → 1.0.389
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 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +7 -3
- package/dist/ui/index.mjs +12 -4
- package/package.json +1 -1
package/dist/ui/index.d.mts
CHANGED
|
@@ -585,10 +585,16 @@ declare const TagSelect: ({ label, options, value, onChange, placeholder, disabl
|
|
|
585
585
|
interface TagSearchOption {
|
|
586
586
|
value: string;
|
|
587
587
|
label: string;
|
|
588
|
+
/** Rendered before the label in the suggestions list — e.g. a country
|
|
589
|
+
* flag for a spoken-language tag. */
|
|
590
|
+
leading?: ReactNode;
|
|
588
591
|
}
|
|
589
592
|
interface TagLevelItem {
|
|
590
593
|
value: string;
|
|
591
594
|
label: string;
|
|
595
|
+
/** Rendered before the label on the chip — e.g. a country flag for a
|
|
596
|
+
* spoken-language tag. */
|
|
597
|
+
leading?: ReactNode;
|
|
592
598
|
/** Absent: this tag has no level concept — no level badge on its chip, no
|
|
593
599
|
* "Niveau" section in its menu. */
|
|
594
600
|
level?: number;
|
package/dist/ui/index.d.ts
CHANGED
|
@@ -585,10 +585,16 @@ declare const TagSelect: ({ label, options, value, onChange, placeholder, disabl
|
|
|
585
585
|
interface TagSearchOption {
|
|
586
586
|
value: string;
|
|
587
587
|
label: string;
|
|
588
|
+
/** Rendered before the label in the suggestions list — e.g. a country
|
|
589
|
+
* flag for a spoken-language tag. */
|
|
590
|
+
leading?: ReactNode;
|
|
588
591
|
}
|
|
589
592
|
interface TagLevelItem {
|
|
590
593
|
value: string;
|
|
591
594
|
label: string;
|
|
595
|
+
/** Rendered before the label on the chip — e.g. a country flag for a
|
|
596
|
+
* spoken-language tag. */
|
|
597
|
+
leading?: ReactNode;
|
|
592
598
|
/** Absent: this tag has no level concept — no level badge on its chip, no
|
|
593
599
|
* "Niveau" section in its menu. */
|
|
594
600
|
level?: number;
|
package/dist/ui/index.js
CHANGED
|
@@ -2891,6 +2891,7 @@ var TagChip = ({
|
|
|
2891
2891
|
borderColor: current.border
|
|
2892
2892
|
},
|
|
2893
2893
|
children: [
|
|
2894
|
+
tag.leading,
|
|
2894
2895
|
tag.label,
|
|
2895
2896
|
hasLevel && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "text-[11px] font-bold", style: { opacity: 0.85 }, children: [
|
|
2896
2897
|
"N",
|
|
@@ -3099,12 +3100,12 @@ var TagLevelPicker = ({
|
|
|
3099
3100
|
width: "var(--radix-popover-trigger-width)",
|
|
3100
3101
|
border: `1px solid ${BOX_BORDER_COLOR}`
|
|
3101
3102
|
},
|
|
3102
|
-
children: suggestions.length > 0 ? suggestions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.
|
|
3103
|
+
children: suggestions.length > 0 ? suggestions.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3103
3104
|
"button",
|
|
3104
3105
|
{
|
|
3105
3106
|
type: "button",
|
|
3106
3107
|
onClick: () => select(option),
|
|
3107
|
-
className: "flex min-h-[38px] w-full shrink-0 items-center rounded-[6px] px-2.5 text-left font-sans text-sm outline-none",
|
|
3108
|
+
className: "flex min-h-[38px] w-full shrink-0 items-center gap-2 rounded-[6px] px-2.5 text-left font-sans text-sm outline-none",
|
|
3108
3109
|
style: { color: TEXT_COLOR },
|
|
3109
3110
|
onMouseEnter: (event) => {
|
|
3110
3111
|
event.currentTarget.style.background = MENU_HOVER_BG;
|
|
@@ -3112,7 +3113,10 @@ var TagLevelPicker = ({
|
|
|
3112
3113
|
onMouseLeave: (event) => {
|
|
3113
3114
|
event.currentTarget.style.background = "transparent";
|
|
3114
3115
|
},
|
|
3115
|
-
children:
|
|
3116
|
+
children: [
|
|
3117
|
+
option.leading,
|
|
3118
|
+
option.label
|
|
3119
|
+
]
|
|
3116
3120
|
},
|
|
3117
3121
|
option.value
|
|
3118
3122
|
)) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
package/dist/ui/index.mjs
CHANGED
|
@@ -2587,7 +2587,11 @@ var TagSelect = ({
|
|
|
2587
2587
|
};
|
|
2588
2588
|
|
|
2589
2589
|
// src/ui/components/ui/TagLevelPicker.tsx
|
|
2590
|
-
import {
|
|
2590
|
+
import {
|
|
2591
|
+
useMemo,
|
|
2592
|
+
useRef as useRef6,
|
|
2593
|
+
useState as useState6
|
|
2594
|
+
} from "react";
|
|
2591
2595
|
import * as RadixPopover3 from "@radix-ui/react-popover";
|
|
2592
2596
|
import { Fragment as Fragment2, jsx as jsx30, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2593
2597
|
var TEXT_COLOR = "#15303B";
|
|
@@ -2704,6 +2708,7 @@ var TagChip = ({
|
|
|
2704
2708
|
borderColor: current.border
|
|
2705
2709
|
},
|
|
2706
2710
|
children: [
|
|
2711
|
+
tag.leading,
|
|
2707
2712
|
tag.label,
|
|
2708
2713
|
hasLevel && /* @__PURE__ */ jsxs16("span", { className: "text-[11px] font-bold", style: { opacity: 0.85 }, children: [
|
|
2709
2714
|
"N",
|
|
@@ -2912,12 +2917,12 @@ var TagLevelPicker = ({
|
|
|
2912
2917
|
width: "var(--radix-popover-trigger-width)",
|
|
2913
2918
|
border: `1px solid ${BOX_BORDER_COLOR}`
|
|
2914
2919
|
},
|
|
2915
|
-
children: suggestions.length > 0 ? suggestions.map((option) => /* @__PURE__ */
|
|
2920
|
+
children: suggestions.length > 0 ? suggestions.map((option) => /* @__PURE__ */ jsxs16(
|
|
2916
2921
|
"button",
|
|
2917
2922
|
{
|
|
2918
2923
|
type: "button",
|
|
2919
2924
|
onClick: () => select(option),
|
|
2920
|
-
className: "flex min-h-[38px] w-full shrink-0 items-center rounded-[6px] px-2.5 text-left font-sans text-sm outline-none",
|
|
2925
|
+
className: "flex min-h-[38px] w-full shrink-0 items-center gap-2 rounded-[6px] px-2.5 text-left font-sans text-sm outline-none",
|
|
2921
2926
|
style: { color: TEXT_COLOR },
|
|
2922
2927
|
onMouseEnter: (event) => {
|
|
2923
2928
|
event.currentTarget.style.background = MENU_HOVER_BG;
|
|
@@ -2925,7 +2930,10 @@ var TagLevelPicker = ({
|
|
|
2925
2930
|
onMouseLeave: (event) => {
|
|
2926
2931
|
event.currentTarget.style.background = "transparent";
|
|
2927
2932
|
},
|
|
2928
|
-
children:
|
|
2933
|
+
children: [
|
|
2934
|
+
option.leading,
|
|
2935
|
+
option.label
|
|
2936
|
+
]
|
|
2929
2937
|
},
|
|
2930
2938
|
option.value
|
|
2931
2939
|
)) : /* @__PURE__ */ jsx30(
|