@douglasneuroinformatics/libui 2.0.0-beta.1 → 2.0.0-beta.3
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.
|
@@ -865,14 +865,19 @@ declare const Label: react__default.ForwardRefExoticComponent<Omit<LabelPrimitiv
|
|
|
865
865
|
|
|
866
866
|
type LanguageToggleProps = {
|
|
867
867
|
align?: 'center' | 'end' | 'start';
|
|
868
|
+
options: {
|
|
869
|
+
[key: string]: string;
|
|
870
|
+
};
|
|
868
871
|
};
|
|
869
|
-
declare const LanguageToggle: ({ align }?: LanguageToggleProps) => react_jsx_runtime.JSX.Element;
|
|
872
|
+
declare const LanguageToggle: ({ align, options }?: LanguageToggleProps) => react_jsx_runtime.JSX.Element;
|
|
870
873
|
|
|
874
|
+
/** @deprecated */
|
|
871
875
|
type Step = {
|
|
872
876
|
element: react__default.ReactElement;
|
|
873
877
|
icon: react__default.ReactElement;
|
|
874
878
|
label: string;
|
|
875
879
|
};
|
|
880
|
+
/** @deprecated */
|
|
876
881
|
type LegacyStepperProps = {
|
|
877
882
|
className?: string;
|
|
878
883
|
steps: Step[];
|
package/dist/components/index.js
CHANGED
|
@@ -2609,14 +2609,11 @@ var HoverCard = Object.assign(Root14, {
|
|
|
2609
2609
|
import { LanguagesIcon } from "lucide-react";
|
|
2610
2610
|
import { useTranslation as useTranslation6 } from "react-i18next";
|
|
2611
2611
|
import { jsx as jsx118, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2612
|
-
var LanguageToggle = ({ align } = { align: "start" }) => {
|
|
2612
|
+
var LanguageToggle = ({ align, options } = { align: "start", options: {} }) => {
|
|
2613
2613
|
const { i18n } = useTranslation6();
|
|
2614
2614
|
return /* @__PURE__ */ jsxs39(DropdownMenu, { children: [
|
|
2615
2615
|
/* @__PURE__ */ jsx118(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsx118(Button, { size: "icon", variant: "outline", children: /* @__PURE__ */ jsx118(LanguagesIcon, {}) }) }),
|
|
2616
|
-
/* @__PURE__ */
|
|
2617
|
-
/* @__PURE__ */ jsx118(DropdownMenu.Item, { onClick: () => i18n.changeLanguage("en"), children: "English" }),
|
|
2618
|
-
/* @__PURE__ */ jsx118(DropdownMenu.Item, { onClick: () => i18n.changeLanguage("fr"), children: "Fran\xE7ais" })
|
|
2619
|
-
] })
|
|
2616
|
+
/* @__PURE__ */ jsx118(DropdownMenu.Content, { align, children: Object.keys(options).map((option) => /* @__PURE__ */ jsx118(DropdownMenu.Item, { onClick: () => i18n.changeLanguage(option), children: options[option] }, option)) })
|
|
2620
2617
|
] });
|
|
2621
2618
|
};
|
|
2622
2619
|
|