react-science 19.10.3 → 19.10.4

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.
@@ -3,9 +3,9 @@ import { useStore } from '@tanstack/react-form';
3
3
  import { Button } from '../../../button/index.js';
4
4
  import { useFormContext } from '../../context/use_ts_form.js';
5
5
  export function SubmitButton(props) {
6
- const { intent, ...otherProps } = props;
6
+ const { intent, disabled, ...otherProps } = props;
7
7
  const form = useFormContext();
8
8
  const isSubmitting = useStore(form.store, (state) => state.isSubmitting);
9
- return (_jsx(Button, { ...otherProps, intent: intent ?? 'primary', type: "submit", disabled: isSubmitting }));
9
+ return (_jsx(Button, { ...otherProps, intent: intent ?? 'primary', type: "submit", disabled: disabled || isSubmitting }));
10
10
  }
11
11
  //# sourceMappingURL=submit_button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"submit_button.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input/submit_button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAExC,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;IAC9B,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAEzE,OAAO,CACL,KAAC,MAAM,OACD,UAAU,EACd,MAAM,EAAE,MAAM,IAAI,SAAS,EAC3B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,YAAY,GACtB,CACH,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"submit_button.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input/submit_button.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAI9D,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAElD,MAAM,IAAI,GAAG,cAAc,EAAE,CAAC;IAC9B,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAEzE,OAAO,CACL,KAAC,MAAM,OACD,UAAU,EACd,MAAM,EAAE,MAAM,IAAI,SAAS,EAC3B,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,IAAI,YAAY,GAClC,CACH,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-science",
3
- "version": "19.10.3",
3
+ "version": "19.10.4",
4
4
  "description": "React components to build scientific applications UI",
5
5
  "type": "module",
6
6
  "exports": {
@@ -7,7 +7,7 @@ import { useFormContext } from '../../context/use_ts_form.js';
7
7
  type SubmitButtonProps = ButtonProps;
8
8
 
9
9
  export function SubmitButton(props: SubmitButtonProps) {
10
- const { intent, ...otherProps } = props;
10
+ const { intent, disabled, ...otherProps } = props;
11
11
 
12
12
  const form = useFormContext();
13
13
  const isSubmitting = useStore(form.store, (state) => state.isSubmitting);
@@ -17,7 +17,7 @@ export function SubmitButton(props: SubmitButtonProps) {
17
17
  {...otherProps}
18
18
  intent={intent ?? 'primary'}
19
19
  type="submit"
20
- disabled={isSubmitting}
20
+ disabled={disabled || isSubmitting}
21
21
  />
22
22
  );
23
23
  }