plataforma-fundacao-componentes 2.26.9 → 2.26.11

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.
@@ -1,22 +1,13 @@
1
- import React from 'react';
1
+ import React, { ButtonHTMLAttributes, MouseEvent } from 'react';
2
2
  import { TooltipPosition } from '../../libraries/Tooltips';
3
3
  import './Switch.scss';
4
- interface SwitchProps {
4
+ interface SwitchProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'onChange' | 'value'> {
5
5
  'tooltip-position'?: TooltipPosition;
6
6
  'tooltip-text'?: string;
7
- className?: string;
8
- style?: object;
9
- disabled?: boolean;
10
7
  value?: boolean;
11
- onChange?: (event: any) => void;
12
- scale?: number;
8
+ onChange?: (value: boolean, event: MouseEvent) => void;
9
+ theme?: 'ios' | 'android';
10
+ error?: boolean;
13
11
  }
14
- declare function Switch(props: SwitchProps): React.JSX.Element;
15
- declare namespace Switch {
16
- var defaultProps: {
17
- disabled: boolean;
18
- value: boolean;
19
- scale: number;
20
- };
21
- }
22
- export default Switch;
12
+ export default function Switch({ theme, value, onChange, className, error, ...props }: SwitchProps): React.JSX.Element;
13
+ export {};
@@ -1,9 +1,6 @@
1
- import React from 'react';
2
- declare const _default: {
3
- title: string;
4
- };
5
- export default _default;
6
- export declare const Primary: () => React.JSX.Element;
7
- export declare const Scaled: () => React.JSX.Element;
8
- export declare const DisabledOn: () => React.JSX.Element;
9
- export declare const DisabledOff: () => React.JSX.Element;
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import Switch from './Switch';
3
+ declare const meta: Meta<typeof Switch>;
4
+ export default meta;
5
+ declare type Story = StoryObj<typeof Switch>;
6
+ export declare const Primary: Story;
@@ -0,0 +1,20 @@
1
+ import React, { HTMLAttributes } from 'react';
2
+ import './verticalSlider.scss';
3
+ export interface VerticalSliderProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'value' | 'onChange'> {
4
+ /**
5
+ * Ordem: 1º elemento é o mais de baixo, geralmente o nulo...
6
+ *
7
+ * Consequentemente o último elemento é o mais de cima.
8
+ *
9
+ * Deve-se colocar valor === null para ter o efeito de "desligar"
10
+ */
11
+ options: {
12
+ value: string | null;
13
+ label: string;
14
+ }[];
15
+ onChange: (value: string | null, index: number) => void;
16
+ value?: string | null;
17
+ disabled?: boolean;
18
+ }
19
+ declare const VerticalSlider: React.ForwardRefExoticComponent<VerticalSliderProps & React.RefAttributes<HTMLDivElement>>;
20
+ export default VerticalSlider;
@@ -0,0 +1,9 @@
1
+ import { Meta } from '@storybook/react';
2
+ import React, { ComponentProps } from 'react';
3
+ import VerticalSlider from './verticalSlider';
4
+ declare const meta: Meta<typeof VerticalSlider>;
5
+ export default meta;
6
+ export declare const FirstExample: {
7
+ (args: ComponentProps<typeof VerticalSlider>): React.JSX.Element;
8
+ args: import("./verticalSlider").VerticalSliderProps & React.RefAttributes<HTMLDivElement>;
9
+ };
@@ -7,7 +7,7 @@ declare type pdfOptions = {
7
7
  imageHeight?: number;
8
8
  imageX?: number;
9
9
  imageY?: number;
10
- quality?: 1;
10
+ quality?: number;
11
11
  orientation?: 'p' | 'portrait' | 'l' | 'landscape';
12
12
  scale?: number;
13
13
  };