@design-system-rte/react 0.9.1 → 0.10.0
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/components/divider/Divider.d.ts +3 -0
- package/dist/components/icon/Icon.d.ts +1 -1
- package/dist/components/segmentedControl/Segment.d.ts +3 -0
- package/dist/components/segmentedControl/SegmentedControl.d.ts +11 -0
- package/dist/components/segmentedControl/SegmentedControlUtils.d.ts +4 -0
- package/dist/components/segmentedControl/hooks/useFocusFirstSegment.d.ts +2 -0
- package/dist/components/segmentedControl/hooks/useSelectedSegmentIndicatorStyle.d.ts +7 -0
- package/dist/components/switch/Switch.d.ts +7 -0
- package/dist/index.d.ts +4 -1
- package/dist/react-package.cjs +1 -1
- package/dist/react-package.js +1457 -1188
- package/dist/style.css +1 -1
- package/package.json +2 -2
|
@@ -6,7 +6,7 @@ export interface IconProps extends coreIconProps {
|
|
|
6
6
|
className?: string;
|
|
7
7
|
}
|
|
8
8
|
interface IconWrapperProps extends CoreIconWrapperProps, Omit<React.SVGProps<SVGSVGElement>, "name" | "width" | "height"> {
|
|
9
|
-
name:
|
|
9
|
+
name: string;
|
|
10
10
|
appearance?: "outlined" | "filled";
|
|
11
11
|
}
|
|
12
12
|
declare const Icon: ({ name, size, color, appearance, ...props }: IconWrapperProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SegmentProps as CoreSegmentProps, SegmentedControlProps as CoreSegmentedControlProps } from '../../../../core/components/segmented-control/segmented-control.interface';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
export interface SegmentProps extends CoreSegmentProps, Omit<React.HTMLAttributes<HTMLDivElement>, "id"> {
|
|
4
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement> | React.KeyboardEvent<HTMLDivElement>) => void;
|
|
5
|
+
parentRef?: MutableRefObject<HTMLDivElement | null>;
|
|
6
|
+
}
|
|
7
|
+
interface SegmentedControlProps extends CoreSegmentedControlProps, Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
|
|
8
|
+
onChange: (id: string) => void;
|
|
9
|
+
}
|
|
10
|
+
declare const SegmentedControl: import('react').ForwardRefExoticComponent<SegmentedControlProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export default SegmentedControl;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const focusNextNotSegmentElement: (currentFocusedElementIndex: number, allFocusableElement: HTMLElement[], criteria: string) => void;
|
|
2
|
+
export declare const focusPreviousNotSegmentElement: (currentFocusedElementIndex: number, allFocusableElement: HTMLElement[], criteria: string) => void;
|
|
3
|
+
export declare const focusNextSegmentElement: (currentActiveSegmentElementIndex: number, allSegmentElements: HTMLElement[]) => void;
|
|
4
|
+
export declare const focusPreviousSegmentElement: (currentActiveSegmentElementIndex: number, allSegmentElements: HTMLElement[]) => void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SegmentedControlProps as CoreSegmentedControlProps } from '../../../../../core/components/segmented-control/segmented-control.interface';
|
|
2
|
+
import { MutableRefObject } from 'react';
|
|
3
|
+
declare const useSelectedSegmentIndicatorStyle: (containerRef: MutableRefObject<HTMLDivElement | null>, options: CoreSegmentedControlProps["options"], selectedSegment?: string) => {
|
|
4
|
+
left: number;
|
|
5
|
+
width: number;
|
|
6
|
+
};
|
|
7
|
+
export default useSelectedSegmentIndicatorStyle;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SwitchProps as CoreSwitchProps } from '../../../../core/components/switch/switch.interface';
|
|
2
|
+
import { InputHTMLAttributes } from 'react';
|
|
3
|
+
interface SwitchProps extends CoreSwitchProps, InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
|
+
}
|
|
6
|
+
declare const Switch: ({ label, appearance, showLabel, showIcon, disabled, readOnly, checked, onChange, ...props }: SwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Switch;
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { default as Button } from './components/button/Button';
|
|
|
3
3
|
import { default as Checkbox } from './components/checkbox/Checkbox.tsx';
|
|
4
4
|
import { default as CheckboxGroup } from './components/checkboxGroup/CheckboxGroup.tsx';
|
|
5
5
|
import { default as Chip } from './components/chip/Chip.tsx';
|
|
6
|
+
import { default as Divider } from './components/divider/Divider.tsx';
|
|
6
7
|
import { default as Grid } from './components/grid/Grid.tsx';
|
|
7
8
|
import { default as Icon } from './components/icon/Icon.tsx';
|
|
8
9
|
import { default as IconButton } from './components/iconButton/IconButton.tsx';
|
|
@@ -10,8 +11,10 @@ import { default as IconButtonToggle } from './components/iconButtonToggle/IconB
|
|
|
10
11
|
import { default as Link } from './components/link/Link.tsx';
|
|
11
12
|
import { default as RadioButton } from './components/radioButton/RadioButton.tsx';
|
|
12
13
|
import { default as RadioButtonGroup } from './components/radioButtonGroup/RadioButtonGroup.tsx';
|
|
14
|
+
import { default as SegmentedControl } from './components/segmentedControl/SegmentedControl.tsx';
|
|
13
15
|
import { default as SplitButton } from './components/splitButton/SplitButton.tsx';
|
|
16
|
+
import { default as Switch } from './components/switch/Switch.tsx';
|
|
14
17
|
import { default as Textarea } from './components/textarea/Textarea.tsx';
|
|
15
18
|
import { default as TextInput } from './components/textInput/TextInput.tsx';
|
|
16
19
|
import { default as Tooltip } from './components/tooltip/Tooltip.tsx';
|
|
17
|
-
export { Button, Grid, Checkbox, CheckboxGroup, Link, RadioButton, RadioButtonGroup, Icon, IconButton, IconButtonToggle, SplitButton, Tooltip, TextInput, Chip, Badge, Textarea, };
|
|
20
|
+
export { Button, Grid, Checkbox, CheckboxGroup, Link, RadioButton, RadioButtonGroup, Icon, IconButton, IconButtonToggle, SplitButton, Tooltip, TextInput, Chip, Badge, Textarea, Divider, Switch, SegmentedControl, };
|