@mriqbox/ui-kit 4.5.0 → 4.6.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/MriDrawer.d.ts +15 -1
- package/dist/components/molecules/MriDrawer.stories.d.ts +3 -0
- package/dist/components/molecules/MriSegmentedTabs.d.ts +56 -0
- package/dist/components/molecules/MriSegmentedTabs.stories.d.ts +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +1966 -1899
- package/dist/index.umd.js +21 -21
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -5,7 +5,21 @@ declare const MriDrawerTrigger: React.ForwardRefExoticComponent<DialogPrimitive.
|
|
|
5
5
|
declare const MriDrawerPortal: React.FC<DialogPrimitive.DialogPortalProps>;
|
|
6
6
|
declare const MriDrawerClose: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
7
|
declare const MriDrawerOverlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
|
|
8
|
+
export type MriDrawerSide = "top" | "bottom" | "left" | "right";
|
|
9
|
+
interface MriDrawerContentProps extends React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> {
|
|
10
|
+
/**
|
|
11
|
+
* Lado da tela de onde o drawer desliza. Default: `bottom` (mobile-style
|
|
12
|
+
* action sheet). Use `right` pra painel lateral de detalhes/formulario,
|
|
13
|
+
* `left` pra menu hamburger, `top` pra notificacoes.
|
|
14
|
+
*/
|
|
15
|
+
side?: MriDrawerSide;
|
|
16
|
+
/**
|
|
17
|
+
* Esconde o handle (barra horizontal) no topo do drawer bottom. Sem efeito
|
|
18
|
+
* em outros lados. Default: false.
|
|
19
|
+
*/
|
|
20
|
+
hideHandle?: boolean;
|
|
21
|
+
}
|
|
22
|
+
declare const MriDrawerContent: React.ForwardRefExoticComponent<MriDrawerContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
23
|
declare const MriDrawerHeader: {
|
|
10
24
|
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
11
25
|
displayName: string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { LucideIcon } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface MriSegmentedTabsItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string | React.ReactNode;
|
|
6
|
+
icon?: LucideIcon | React.ElementType;
|
|
7
|
+
/** Classe extra so neste item. */
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export type MriSegmentedTabsType = 'single' | 'multiple';
|
|
11
|
+
export type MriSegmentedTabsVariant = 'default' | 'premium';
|
|
12
|
+
type SingleProps = {
|
|
13
|
+
type?: 'single';
|
|
14
|
+
value: string;
|
|
15
|
+
onChange: (id: string) => void;
|
|
16
|
+
};
|
|
17
|
+
type MultipleProps = {
|
|
18
|
+
type: 'multiple';
|
|
19
|
+
value: string[];
|
|
20
|
+
onChange: (ids: string[]) => void;
|
|
21
|
+
};
|
|
22
|
+
type CommonProps = {
|
|
23
|
+
items: MriSegmentedTabsItem[];
|
|
24
|
+
/** `default` = rounded-lg; `premium` = rounded-xl com cantos mais arredondados. */
|
|
25
|
+
variant?: MriSegmentedTabsVariant;
|
|
26
|
+
className?: string;
|
|
27
|
+
itemClassName?: string;
|
|
28
|
+
};
|
|
29
|
+
export type MriSegmentedTabsProps = CommonProps & (SingleProps | MultipleProps);
|
|
30
|
+
/**
|
|
31
|
+
* Segmented control — grupo de botoes lado-a-lado dentro de uma caixinha
|
|
32
|
+
* compartilhada. Diferente de `MriTabs` (que e underline pra navegacao de
|
|
33
|
+
* pagina), este e mais compacto e bom pra:
|
|
34
|
+
* - Filtros chip-style (`type="multiple"`)
|
|
35
|
+
* - Toggles de view (lista/grid, all/online/offline)
|
|
36
|
+
* - Sub-categorias densas
|
|
37
|
+
*
|
|
38
|
+
* ```tsx
|
|
39
|
+
* // Single (default) — picker de view
|
|
40
|
+
* <MriSegmentedTabs
|
|
41
|
+
* items={[{ id: 'all', label: 'All' }, { id: 'online', label: 'Online' }]}
|
|
42
|
+
* value={view}
|
|
43
|
+
* onChange={setView}
|
|
44
|
+
* />
|
|
45
|
+
*
|
|
46
|
+
* // Multiple — filtros chip
|
|
47
|
+
* <MriSegmentedTabs
|
|
48
|
+
* type="multiple"
|
|
49
|
+
* items={categories}
|
|
50
|
+
* value={selectedIds}
|
|
51
|
+
* onChange={setSelectedIds}
|
|
52
|
+
* />
|
|
53
|
+
* ```
|
|
54
|
+
*/
|
|
55
|
+
export declare function MriSegmentedTabs(props: MriSegmentedTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { MriSegmentedTabs } from './MriSegmentedTabs';
|
|
3
|
+
|
|
4
|
+
declare const meta: Meta<typeof MriSegmentedTabs>;
|
|
5
|
+
export default meta;
|
|
6
|
+
export declare const SingleSelect: StoryObj<typeof MriSegmentedTabs>;
|
|
7
|
+
export declare const SingleWithIcons: StoryObj<typeof MriSegmentedTabs>;
|
|
8
|
+
export declare const MultipleSelect: StoryObj<typeof MriSegmentedTabs>;
|
|
9
|
+
export declare const PremiumVariant_: StoryObj<typeof MriSegmentedTabs>;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from './components/atoms/MriScrollArea';
|
|
|
8
8
|
export * from './components/atoms/MriStatusBadge';
|
|
9
9
|
export * from './components/atoms/mri-badge-variants';
|
|
10
10
|
export * from './components/atoms/mri-button-variants';
|
|
11
|
+
export * from './components/atoms/MriSkeleton';
|
|
11
12
|
export * from './components/atoms/MriSpinner';
|
|
12
13
|
export * from './components/atoms/MriSwitch';
|
|
13
14
|
export * from './components/atoms/MriTextarea';
|
|
@@ -20,6 +21,7 @@ export * from './components/molecules/MriExpandableSearch';
|
|
|
20
21
|
export * from './components/molecules/MriDialog';
|
|
21
22
|
export * from './components/molecules/MriModal';
|
|
22
23
|
export * from './components/molecules/MriPopover';
|
|
24
|
+
export * from './components/molecules/MriSegmentedTabs';
|
|
23
25
|
export * from './components/molecules/MriSelect';
|
|
24
26
|
export * from './components/molecules/MriThemeToggle';
|
|
25
27
|
export * from './components/molecules/MriTabs';
|