@linzjs/lui 18.2.0 → 18.3.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/CHANGELOG.md CHANGED
@@ -1,3 +1,5 @@
1
+ # [18.3.0](https://github.com/linz/lui/compare/v18.2.0...v18.3.0) (2023-07-27)
2
+
1
3
  # [18.2.0](https://github.com/linz/lui/compare/v18.1.0...v18.2.0) (2023-07-26)
2
4
 
3
5
 
@@ -0,0 +1,23 @@
1
+ import './LuiMultiSwitch.scss';
2
+ import { ReactElement } from 'react';
3
+ export interface ToggleSwitchOption<ValueType> {
4
+ text: ReactElement | string;
5
+ value: ValueType;
6
+ shortcutKey?: string;
7
+ className?: string;
8
+ }
9
+ export declare const LuiMultiSwitchYesNo: ToggleSwitchOption<boolean>[];
10
+ export interface LuiMultiSwitchProps<ValueType> {
11
+ 'data-testid'?: string;
12
+ className?: string;
13
+ defaultValue?: ValueType | null;
14
+ value?: ValueType | null;
15
+ disabled?: boolean;
16
+ autoFocus?: boolean;
17
+ options: ToggleSwitchOption<ValueType>[];
18
+ onChange: (value: ValueType) => Promise<boolean> | any;
19
+ }
20
+ /**
21
+ * Uncontrolled grouped button style component where component has single focus and associated keyboard events.
22
+ */
23
+ export declare const LuiMultiSwitch: <ValueType>({ className, defaultValue, value, onChange, disabled, autoFocus, options, ...props }: LuiMultiSwitchProps<ValueType>) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ export declare const Controlled: () => JSX.Element;
3
+ export declare const Uncontrolled: () => JSX.Element;
4
+ export declare const CustomValues: () => JSX.Element;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "18.2.0",
2
+ "version": "18.3.0",
3
3
  "license": "MIT",
4
4
  "repository": {
5
5
  "type": "git",