@transferwise/components 0.0.0-experimental-1605d4e → 0.0.0-experimental-fb28e59

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,4 +1,4 @@
1
1
  import { CheckboxButtonProps } from '../checkboxButton/CheckboxButton';
2
- export type ItemCheckboxProps = Pick<CheckboxButtonProps, 'checked' | 'indeterminate' | 'onChange'>;
2
+ export type ItemCheckboxProps = Pick<CheckboxButtonProps, 'checked' | 'indeterminate' | 'onChange' | 'disabled'>;
3
3
  export declare const Checkbox: (props: ItemCheckboxProps) => import("react").JSX.Element;
4
4
  //# sourceMappingURL=ItemCheckbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ItemCheckbox.d.ts","sourceRoot":"","sources":["../../../src/item/ItemCheckbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,mBAAmB,EAAE,SAAS,GAAG,eAAe,GAAG,UAAU,CAAC,CAAC;AAEpG,eAAO,MAAM,QAAQ,UAAoB,iBAAiB,gCAQzD,CAAC"}
1
+ {"version":3,"file":"ItemCheckbox.d.ts","sourceRoot":"","sources":["../../../src/item/ItemCheckbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGvE,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAClC,mBAAmB,EACnB,SAAS,GAAG,eAAe,GAAG,UAAU,GAAG,UAAU,CACtD,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAoB,iBAAiB,gCAQzD,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@transferwise/components",
3
- "version": "0.0.0-experimental-1605d4e",
3
+ "version": "0.0.0-experimental-fb28e59",
4
4
  "description": "Neptune React components",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -95,13 +95,13 @@
95
95
  "rollup-preserve-directives": "^1.1.1",
96
96
  "storybook": "^8.2.2",
97
97
  "@transferwise/less-config": "3.1.1",
98
- "@transferwise/neptune-css": "0.0.0-experimental-1605d4e",
98
+ "@transferwise/neptune-css": "0.0.0-experimental-fb28e59",
99
99
  "@wise/components-theming": "1.6.2",
100
100
  "@wise/wds-configs": "0.0.0"
101
101
  },
102
102
  "peerDependencies": {
103
103
  "@transferwise/icons": "^3.21.0",
104
- "@transferwise/neptune-css": "0.0.0-experimental-1605d4e",
104
+ "@transferwise/neptune-css": "0.0.0-experimental-fb28e59",
105
105
  "@wise/art": "^2.16",
106
106
  "@wise/components-theming": "^1.0.0",
107
107
  "react": ">=18",
@@ -3,14 +3,17 @@ import CheckboxButton from '../checkboxButton';
3
3
  import { CheckboxButtonProps } from '../checkboxButton/CheckboxButton';
4
4
  import { ItemContext, ItemContextData } from './Item';
5
5
 
6
- export type ItemCheckboxProps = Pick<CheckboxButtonProps, 'checked' | 'indeterminate' | 'onChange'>;
6
+ export type ItemCheckboxProps = Pick<
7
+ CheckboxButtonProps,
8
+ 'checked' | 'indeterminate' | 'onChange' | 'disabled'
9
+ >;
7
10
 
8
11
  export const Checkbox = function (props: ItemCheckboxProps) {
9
- const { setControlType, props: baseItemProps } = useContext<ItemContextData>(ItemContext);
12
+ const { setControlType } = useContext<ItemContextData>(ItemContext);
10
13
 
11
14
  useEffect(() => {
12
15
  setControlType('checkbox');
13
16
  }, []);
14
17
 
15
- return <CheckboxButton disabled={baseItemProps.disabled} {...props} />;
18
+ return <CheckboxButton {...props} />;
16
19
  };
@@ -3,11 +3,11 @@ import { default as SwitchComp, SwitchProps } from '../switch';
3
3
  import { ItemContext, ItemContextData } from './Item';
4
4
 
5
5
  export const Switch = function (props: SwitchProps) {
6
- const { setControlType, props: baseItemProps } = useContext<ItemContextData>(ItemContext);
6
+ const { setControlType } = useContext<ItemContextData>(ItemContext);
7
7
 
8
8
  useEffect(() => {
9
9
  setControlType('checkbox');
10
10
  }, []);
11
11
 
12
- return <SwitchComp disabled={baseItemProps.disabled} {...props} />;
12
+ return <SwitchComp {...props} />;
13
13
  };