@mriqbox/ui-kit 4.6.4 → 4.7.1
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/bin/cli.js +1 -1
- package/dist/components/molecules/MriBlipPicker.constants.d.ts +11 -0
- package/dist/components/molecules/MriBlipPicker.d.ts +29 -0
- package/dist/components/molecules/MriBlipPicker.stories.d.ts +19 -0
- package/dist/components/molecules/MriMarkerPicker.constants.d.ts +17 -0
- package/dist/components/molecules/MriMarkerPicker.d.ts +21 -0
- package/dist/components/molecules/MriMarkerPicker.stories.d.ts +11 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.es.js +4742 -4108
- package/dist/index.umd.js +57 -52
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface BlipColor {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
hex: string;
|
|
5
|
+
}
|
|
6
|
+
export interface BlipManifestEntry {
|
|
7
|
+
id: number;
|
|
8
|
+
/** Nome sem extensão e sem o prefixo numérico. Ex: "radar_higher" */
|
|
9
|
+
name: string;
|
|
10
|
+
}
|
|
11
|
+
export declare const DEFAULT_BLIP_COLORS: BlipColor[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BlipColor, BlipManifestEntry } from './MriBlipPicker.constants';
|
|
2
|
+
|
|
3
|
+
export interface MriBlipPickerProps {
|
|
4
|
+
sprite: number;
|
|
5
|
+
color: number;
|
|
6
|
+
scale?: number;
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
onChange: (val: {
|
|
9
|
+
sprite: number;
|
|
10
|
+
color: number;
|
|
11
|
+
scale: number;
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
}) => void;
|
|
14
|
+
/** URL base dos assets. Default: `https://assets.mriqbox.com.br/blips/` */
|
|
15
|
+
assetsBaseUrl?: string;
|
|
16
|
+
/** Lista de sprites disponíveis. Se omitido, busca `{assetsBaseUrl}manifest.json`. */
|
|
17
|
+
manifest?: BlipManifestEntry[];
|
|
18
|
+
/** Paleta de cores. Default: as 86 oficiais. */
|
|
19
|
+
colors?: BlipColor[];
|
|
20
|
+
/** Limites do slider de scale. Default: [0.5, 1.5] */
|
|
21
|
+
scaleRange?: [number, number];
|
|
22
|
+
/** Mostrar slider de scale. Default: true */
|
|
23
|
+
showScale?: boolean;
|
|
24
|
+
/** Mostrar checkbox de Enable. Default: false (usado quando o blip pode ser desabilitado) */
|
|
25
|
+
showEnable?: boolean;
|
|
26
|
+
/** Classe wrapper externa */
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare function MriBlipPicker({ sprite, color, scale, enabled, onChange, assetsBaseUrl, manifest: providedManifest, colors, scaleRange, showScale, showEnable, className, }: MriBlipPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriBlipPicker } from './MriBlipPicker';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriBlipPicker>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
/**
|
|
8
|
+
* Default usa um manifest mockado para o Storybook não depender da CDN.
|
|
9
|
+
* No uso real, omita `manifest` e o componente busca de `{assetsBaseUrl}manifest.json`.
|
|
10
|
+
*/
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const WithEnableToggle: Story;
|
|
13
|
+
export declare const WithoutScale: Story;
|
|
14
|
+
/**
|
|
15
|
+
* Sem prop `manifest` — o componente faz fetch de `{assetsBaseUrl}manifest.json`.
|
|
16
|
+
* No Storybook (sem CDN), exibirá mensagem de erro e permitirá editar ID manualmente.
|
|
17
|
+
*/
|
|
18
|
+
export declare const FetchFromCDN: Story;
|
|
19
|
+
export declare const CustomPalette: Story;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface MarkerType {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface MarkerColor {
|
|
7
|
+
r: number;
|
|
8
|
+
g: number;
|
|
9
|
+
b: number;
|
|
10
|
+
a: number;
|
|
11
|
+
}
|
|
12
|
+
export interface MarkerScale {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
z: number;
|
|
16
|
+
}
|
|
17
|
+
export declare const DEFAULT_MARKER_TYPES: MarkerType[];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { MarkerColor, MarkerScale, MarkerType } from './MriMarkerPicker.constants';
|
|
2
|
+
|
|
3
|
+
export interface MriMarkerPickerProps {
|
|
4
|
+
type: number;
|
|
5
|
+
color: MarkerColor;
|
|
6
|
+
scale: MarkerScale;
|
|
7
|
+
onChange: (val: {
|
|
8
|
+
type: number;
|
|
9
|
+
color: MarkerColor;
|
|
10
|
+
scale: MarkerScale;
|
|
11
|
+
}) => void;
|
|
12
|
+
/** Lista customizada de marker types. Default: 44 oficiais. */
|
|
13
|
+
markerTypes?: MarkerType[];
|
|
14
|
+
/** URL opcional para previews dos markers. Se fornecido, mostra `{url}{idPadded2}.webp` */
|
|
15
|
+
previewsBaseUrl?: string;
|
|
16
|
+
/** Modo de scale. 'uniform' usa 1 input que aplica em x/y/z. 'xyz' permite editar separado. Default 'uniform'. */
|
|
17
|
+
scaleMode?: "uniform" | "xyz";
|
|
18
|
+
/** Classe wrapper externa */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function MriMarkerPicker({ type, color, scale, onChange, markerTypes, previewsBaseUrl, scaleMode, className, }: MriMarkerPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriMarkerPicker } from './MriMarkerPicker';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriMarkerPicker>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<typeof meta>;
|
|
7
|
+
export declare const Default: Story;
|
|
8
|
+
export declare const VerticalCylinderGreen: Story;
|
|
9
|
+
export declare const XYZScaleMode: Story;
|
|
10
|
+
export declare const DollarSign: Story;
|
|
11
|
+
export declare const NumberMarker: Story;
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,10 @@ export * from './components/molecules/MriSearchInput';
|
|
|
37
37
|
export * from './components/molecules/MriSectionHeader';
|
|
38
38
|
export * from './components/molecules/MriDatePicker';
|
|
39
39
|
export * from './components/molecules/MriColorPicker';
|
|
40
|
+
export * from './components/molecules/MriBlipPicker';
|
|
41
|
+
export * from './components/molecules/MriBlipPicker.constants';
|
|
42
|
+
export * from './components/molecules/MriMarkerPicker';
|
|
43
|
+
export * from './components/molecules/MriMarkerPicker.constants';
|
|
40
44
|
export * from './components/molecules/MriPlayerVitals';
|
|
41
45
|
export * from './components/molecules/MriVitalAdjustModal';
|
|
42
46
|
export * from './components/organisms/MriCalendar';
|