@viglet/viglet-design-system 2026.2.32 → 2026.2.34
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/index.cjs.js +51 -51
- package/dist/index.es.js +5764 -5594
- package/dist/src/components/app-switcher.d.ts +49 -0
- package/dist/src/components/app-switcher.d.ts.map +1 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.d.ts.map +1 -1
- package/dist/src/components/language-switcher.d.ts +18 -0
- package/dist/src/components/language-switcher.d.ts.map +1 -0
- package/dist/viglet-design-system.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface AppSwitcherItem {
|
|
3
|
+
/** Stable id (used as React key). */
|
|
4
|
+
id: string;
|
|
5
|
+
/**
|
|
6
|
+
* Display name. Either a literal string or an i18n key — strings starting
|
|
7
|
+
* with a letter are treated as i18n keys (passed to `t()`); use the raw
|
|
8
|
+
* `label` prop for literal text.
|
|
9
|
+
*/
|
|
10
|
+
name: string;
|
|
11
|
+
/** Image URL for the icon (e.g. product logo). Mutually exclusive with `icon`. */
|
|
12
|
+
image?: string;
|
|
13
|
+
/** Inline icon node (e.g. `<Home className="h-4 w-4" />`). */
|
|
14
|
+
icon?: ReactNode;
|
|
15
|
+
/** Tailwind classes applied to the icon background tile. */
|
|
16
|
+
iconBg?: string;
|
|
17
|
+
/** Destination URL or in-app path. */
|
|
18
|
+
href: string;
|
|
19
|
+
/** Marks this item as the current app (highlighted + checkmark). */
|
|
20
|
+
active?: boolean;
|
|
21
|
+
/** Open in a new tab and show external-link indicator. */
|
|
22
|
+
external?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface AppSwitcherProps {
|
|
25
|
+
/** Whether the panel is open. */
|
|
26
|
+
open: boolean;
|
|
27
|
+
/** Toggle handler (called from trigger button, overlay, and on item click). */
|
|
28
|
+
onToggle: () => void;
|
|
29
|
+
/** Apps to display in the panel. */
|
|
30
|
+
apps: AppSwitcherItem[];
|
|
31
|
+
/** Title for the trigger button (a11y / tooltip). */
|
|
32
|
+
triggerTitle?: string;
|
|
33
|
+
/** Aria label for the close overlay. */
|
|
34
|
+
closeLabel?: string;
|
|
35
|
+
/**
|
|
36
|
+
* If true, the trigger is rendered next to the panel.
|
|
37
|
+
* Set to false if you provide your own trigger and only want the panel.
|
|
38
|
+
*/
|
|
39
|
+
showTrigger?: boolean;
|
|
40
|
+
/** Header height in px (so the panel sits below the app header). Default 56. */
|
|
41
|
+
headerHeight?: number;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Application switcher — a side panel listing related apps in a multi-product
|
|
45
|
+
* suite (e.g. Cloud, Turing, Shio, Dumont). Designed to live in the top-right
|
|
46
|
+
* corner of a sticky header.
|
|
47
|
+
*/
|
|
48
|
+
export declare function AppSwitcher({ open, onToggle, apps, triggerTitle, closeLabel, showTrigger, headerHeight, }: Readonly<AppSwitcherProps>): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
//# sourceMappingURL=app-switcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-switcher.d.ts","sourceRoot":"","sources":["../../../src/components/app-switcher.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,WAAW,eAAe;IAC9B,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,kFAAkF;IAClF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,oCAAoC;IACpC,IAAI,EAAE,eAAe,EAAE,CAAC;IACxB,qDAAqD;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,gFAAgF;IAChF,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,YAAqB,EACrB,UAAiC,EACjC,WAAkB,EAClB,YAAiB,GAClB,EAAE,QAAQ,CAAC,gBAAgB,CAAC,2CA+C5B"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './ui';
|
|
2
2
|
export { AppFooter } from './app-footer';
|
|
3
|
+
export { AppSwitcher, type AppSwitcherItem, type AppSwitcherProps, } from './app-switcher';
|
|
3
4
|
export { BadgeColorful } from './badge-colorful';
|
|
4
5
|
export { BadgeLocale, getLocaleCountryCode } from './badge-locale';
|
|
5
6
|
export { BackendStatusBanner, BackendStatusProvider, reportBackendOffline, reportBackendOnline, useBackendStatus, } from './backend-status';
|
|
@@ -9,6 +10,7 @@ export { DialogDelete, type VigBlockedByItem } from './dialog.delete';
|
|
|
9
10
|
export { GridList, type ItemActionProps as VigGridItemActionProps } from './grid.list';
|
|
10
11
|
export { InternalSidebar } from './internal.sidebar';
|
|
11
12
|
export { LanguageSelect } from './language-select';
|
|
13
|
+
export { LanguageSwitcher, type LanguageOption, type LanguageSwitcherProps, } from './language-switcher';
|
|
12
14
|
export { LoadProvider } from './loading-provider';
|
|
13
15
|
export { ModeToggle, ModeToggleSidebar } from './mode-toggle';
|
|
14
16
|
export { NavMain } from './nav-main';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,cAAc,MAAM,CAAC;AAGrB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,eAAe,IAAI,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,M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AAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface LanguageOption {
|
|
2
|
+
/** ISO code, e.g. "en", "pt", "pt-BR" */
|
|
3
|
+
code: string;
|
|
4
|
+
/** Display label, e.g. "English", "Português" */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Optional emoji flag */
|
|
7
|
+
flag?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface LanguageSwitcherProps {
|
|
10
|
+
/** Override the language list. Defaults to en + pt. */
|
|
11
|
+
languages?: LanguageOption[];
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Dropdown to switch the active i18next language.
|
|
15
|
+
* Persists via the standard i18next-browser-languagedetector localStorage cache.
|
|
16
|
+
*/
|
|
17
|
+
export declare function LanguageSwitcher({ languages, }: Readonly<LanguageSwitcherProps>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
//# sourceMappingURL=language-switcher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-switcher.d.ts","sourceRoot":"","sources":["../../../src/components/language-switcher.tsx"],"names":[],"mappings":"AAWA,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,0BAA0B;IAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAOD,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;CAC9B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,SAA6B,GAC9B,EAAE,QAAQ,CAAC,qBAAqB,CAAC,2CAyBjC"}
|