@kwantis-id3/frontend-library 1.0.0-rc.40 → 1.0.0-rc.41
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/esm/index.js +63 -21
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/Switch/Switch.d.ts +2 -0
- package/dist/esm/types/components/Switch/SwitchInterfaces.d.ts +17 -0
- package/dist/esm/types/components/Switch/SwitchStyled.d.ts +35 -0
- package/dist/esm/types/components/Switch/index.d.ts +2 -0
- package/dist/esm/types/components/index.d.ts +1 -0
- package/dist/index.d.ts +21 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type TSwitchProps = {
|
|
2
|
+
/** Whether the switch is checked (controlled) */
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
/** Default checked state (uncontrolled) */
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
/** Callback function when the switch state changes */
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
/** The color of switch when checked */
|
|
9
|
+
color?: string;
|
|
10
|
+
/** The label for the switch */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Size of switch */
|
|
13
|
+
size?: "small" | "medium" | "large";
|
|
14
|
+
/** HTML id */
|
|
15
|
+
htmlId?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export declare const SwitchContainer: import("@emotion/styled").StyledComponent<{
|
|
2
|
+
theme?: import("@emotion/react").Theme;
|
|
3
|
+
as?: React.ElementType;
|
|
4
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
+
export declare const SwitchSlider: import("@emotion/styled").StyledComponent<{
|
|
6
|
+
theme?: import("@emotion/react").Theme;
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
} & {
|
|
9
|
+
$size: "small" | "medium" | "large";
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
11
|
+
export declare const SwitchInput: import("@emotion/styled").StyledComponent<{
|
|
12
|
+
theme?: import("@emotion/react").Theme;
|
|
13
|
+
as?: React.ElementType;
|
|
14
|
+
}, import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
|
|
15
|
+
export declare const SwitchTrack: import("@emotion/styled").StyledComponent<{
|
|
16
|
+
theme?: import("@emotion/react").Theme;
|
|
17
|
+
as?: React.ElementType;
|
|
18
|
+
} & {
|
|
19
|
+
$checked: boolean;
|
|
20
|
+
$checkedColor: string;
|
|
21
|
+
$uncheckedColor: string;
|
|
22
|
+
$size: "small" | "medium" | "large";
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
24
|
+
export declare const SwitchThumb: import("@emotion/styled").StyledComponent<{
|
|
25
|
+
theme?: import("@emotion/react").Theme;
|
|
26
|
+
as?: React.ElementType;
|
|
27
|
+
} & {
|
|
28
|
+
$checked: boolean;
|
|
29
|
+
$thumbColor: string;
|
|
30
|
+
$size: "small" | "medium" | "large";
|
|
31
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
32
|
+
export declare const SwitchLabel: import("@emotion/styled").StyledComponent<{
|
|
33
|
+
theme?: import("@emotion/react").Theme;
|
|
34
|
+
as?: React.ElementType;
|
|
35
|
+
}, import("react").DetailedHTMLProps<import("react").LabelHTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, {}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -653,6 +653,26 @@ type TCheckboxProps = {
|
|
|
653
653
|
|
|
654
654
|
declare const Checkbox: ({ label, htmlId, checked, defaultChecked, onChange, indeterminate, disabled, className, sx, name, size, }: TCheckboxProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
655
655
|
|
|
656
|
+
type TSwitchProps = {
|
|
657
|
+
/** Whether the switch is checked (controlled) */
|
|
658
|
+
checked?: boolean;
|
|
659
|
+
/** Default checked state (uncontrolled) */
|
|
660
|
+
defaultChecked?: boolean;
|
|
661
|
+
/** Callback function when the switch state changes */
|
|
662
|
+
onChange?: (checked: boolean) => void;
|
|
663
|
+
/** The color of switch when checked */
|
|
664
|
+
color?: string;
|
|
665
|
+
/** The label for the switch */
|
|
666
|
+
label?: string;
|
|
667
|
+
/** Size of switch */
|
|
668
|
+
size?: "small" | "medium" | "large";
|
|
669
|
+
/** HTML id */
|
|
670
|
+
htmlId?: string;
|
|
671
|
+
className?: string;
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
declare const Switch: (props: TSwitchProps) => _emotion_react_jsx_runtime.JSX.Element;
|
|
675
|
+
|
|
656
676
|
/**
|
|
657
677
|
* emotion.js doesn't support transient options out of the box.
|
|
658
678
|
*
|
|
@@ -702,4 +722,4 @@ declare const getActiveColor: (color: string) => string;
|
|
|
702
722
|
|
|
703
723
|
declare function usePrefersColorScheme(): "light" | "dark";
|
|
704
724
|
|
|
705
|
-
export { Accordion, AccordionGroup, Button, Card, CardContent, CardFooter, CardHeader, CardIndicators, CardMediaSection, Checkbox, ControlledTreeView, DataGrid, Drawer, Dropdown, IBackgroundColors, ICommonColors, IIndicatorColors, IPalette, IStandardPaletteColor, ITagColors, IThemeContextProps, IThemeContextValue, Indicator, InputField, Modal, MultiSelect, MultiSelectProps, MultiViewGrid, MultiViewList, SingleSelect, SingleSelectProps, Slider, TAccordionProps, TButtonProps, TButtonVariants, TCardSectionProps, TCellValues, TCheckboxProps, TColorScale, TControlledTreeViewProps, TCustomRenderProps, TDataGridProps, TDataGridRow, TDrawerProps, TDropdownItem, TDropdownItemProps, TDropdownProps, TIndicatorInstanceProps, TIndicatorProps, TIndicatorVariants, TModalProps, TMultiViewGridProps, TMultiViewListProps, TRenderTriggerProps, TSliderProps, TTableCell, TTableProps, TTableRow, TTagProps, TTextFieldProps, TThemeMode, TTreeViewItem, TUncontrolledTreeViewProps, TViewState, Table, Tag, ThemeContextProvider, UncontrolledTreeView, commonColors, darkenColor, defaultDarkPalette, defaultLightPalette, getActiveColor, getContrastColor, getHoverColor, lightenColor, renderCell, transientOptions, useIsMobile, usePrefersColorScheme, useThemeContext };
|
|
725
|
+
export { Accordion, AccordionGroup, Button, Card, CardContent, CardFooter, CardHeader, CardIndicators, CardMediaSection, Checkbox, ControlledTreeView, DataGrid, Drawer, Dropdown, IBackgroundColors, ICommonColors, IIndicatorColors, IPalette, IStandardPaletteColor, ITagColors, IThemeContextProps, IThemeContextValue, Indicator, InputField, Modal, MultiSelect, MultiSelectProps, MultiViewGrid, MultiViewList, SingleSelect, SingleSelectProps, Slider, Switch, TAccordionProps, TButtonProps, TButtonVariants, TCardSectionProps, TCellValues, TCheckboxProps, TColorScale, TControlledTreeViewProps, TCustomRenderProps, TDataGridProps, TDataGridRow, TDrawerProps, TDropdownItem, TDropdownItemProps, TDropdownProps, TIndicatorInstanceProps, TIndicatorProps, TIndicatorVariants, TModalProps, TMultiViewGridProps, TMultiViewListProps, TRenderTriggerProps, TSliderProps, TSwitchProps, TTableCell, TTableProps, TTableRow, TTagProps, TTextFieldProps, TThemeMode, TTreeViewItem, TUncontrolledTreeViewProps, TViewState, Table, Tag, ThemeContextProvider, UncontrolledTreeView, commonColors, darkenColor, defaultDarkPalette, defaultLightPalette, getActiveColor, getContrastColor, getHoverColor, lightenColor, renderCell, transientOptions, useIsMobile, usePrefersColorScheme, useThemeContext };
|