react-science 19.3.0 → 19.4.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.
Files changed (64) hide show
  1. package/lib/components/color-picker/react-color/ColorPicker.d.ts +1 -2
  2. package/lib/components/color-picker/react-color/ColorPicker.d.ts.map +1 -1
  3. package/lib/components/form/components/input/checkbox.d.ts.map +1 -1
  4. package/lib/components/form/components/input/checkbox.js +2 -2
  5. package/lib/components/form/components/input/checkbox.js.map +1 -1
  6. package/lib/components/form/components/input/color_picker.d.ts +5 -0
  7. package/lib/components/form/components/input/color_picker.d.ts.map +1 -0
  8. package/lib/components/form/components/input/color_picker.js +17 -0
  9. package/lib/components/form/components/input/color_picker.js.map +1 -0
  10. package/lib/components/form/components/input/input.d.ts +2 -1
  11. package/lib/components/form/components/input/input.d.ts.map +1 -1
  12. package/lib/components/form/components/input/input.js +2 -2
  13. package/lib/components/form/components/input/input.js.map +1 -1
  14. package/lib/components/form/components/input/numeric_input.d.ts +2 -1
  15. package/lib/components/form/components/input/numeric_input.d.ts.map +1 -1
  16. package/lib/components/form/components/input/numeric_input.js +2 -2
  17. package/lib/components/form/components/input/numeric_input.js.map +1 -1
  18. package/lib/components/form/components/input/switch.d.ts +1 -1
  19. package/lib/components/form/components/input/switch.d.ts.map +1 -1
  20. package/lib/components/form/components/input_groups/form.d.ts +1 -4
  21. package/lib/components/form/components/input_groups/form.d.ts.map +1 -1
  22. package/lib/components/form/components/input_groups/form.js +2 -8
  23. package/lib/components/form/components/input_groups/form.js.map +1 -1
  24. package/lib/components/form/components/input_groups/form_context.d.ts +8 -0
  25. package/lib/components/form/components/input_groups/form_context.d.ts.map +1 -0
  26. package/lib/components/form/components/input_groups/form_context.js +8 -0
  27. package/lib/components/form/components/input_groups/form_context.js.map +1 -0
  28. package/lib/components/form/components/input_groups/form_group.d.ts +1 -1
  29. package/lib/components/form/components/input_groups/form_group.d.ts.map +1 -1
  30. package/lib/components/form/components/input_groups/form_group.js +18 -9
  31. package/lib/components/form/components/input_groups/form_group.js.map +1 -1
  32. package/lib/components/form/components/layout/Section.js +1 -1
  33. package/lib/components/form/context/use_ts_form.d.ts +4 -0
  34. package/lib/components/form/context/use_ts_form.d.ts.map +1 -1
  35. package/lib/components/form/context/use_ts_form.js +2 -0
  36. package/lib/components/form/context/use_ts_form.js.map +1 -1
  37. package/lib/components/table/reorder_rows/draggable_row_tr.js +1 -1
  38. package/lib/components/table/reorder_rows/draggable_row_tr.js.map +1 -1
  39. package/lib/components/table/reorder_rows/item_order_provider.d.ts.map +1 -1
  40. package/lib/components/table/reorder_rows/item_order_provider.js +1 -1
  41. package/lib/components/table/reorder_rows/item_order_provider.js.map +1 -1
  42. package/lib/components/table/reorder_rows/use_drop_monitor.d.ts.map +1 -1
  43. package/lib/components/table/reorder_rows/use_drop_monitor.js +1 -1
  44. package/lib/components/table/reorder_rows/use_drop_monitor.js.map +1 -1
  45. package/package.json +2 -1
  46. package/src/components/color-picker/react-color/ColorPicker.tsx +1 -1
  47. package/src/components/form/components/input/checkbox.tsx +2 -1
  48. package/src/components/form/components/input/color_picker.tsx +38 -0
  49. package/src/components/form/components/input/input.tsx +5 -13
  50. package/src/components/form/components/input/numeric_input.tsx +4 -1
  51. package/src/components/form/components/input/switch.tsx +1 -1
  52. package/src/components/form/components/input_groups/form.tsx +3 -11
  53. package/src/components/form/components/input_groups/form_context.ts +11 -0
  54. package/src/components/form/components/input_groups/form_group.tsx +26 -12
  55. package/src/components/form/components/layout/Section.tsx +1 -1
  56. package/src/components/form/context/use_ts_form.ts +2 -0
  57. package/src/components/table/reorder_rows/draggable_row_tr.tsx +4 -4
  58. package/src/components/table/reorder_rows/item_order_provider.tsx +1 -2
  59. package/src/components/table/reorder_rows/use_drop_monitor.ts +4 -4
  60. package/lib/components/pdnd.cjs +0 -29
  61. package/lib/components/pdnd.cjs.map +0 -1
  62. package/lib/components/pdnd.d.cts +0 -10
  63. package/lib/components/pdnd.d.cts.map +0 -1
  64. package/src/components/pdnd.cts +0 -20
@@ -17,7 +17,7 @@ export interface HSV {
17
17
  v: number;
18
18
  a: number;
19
19
  }
20
- interface ChangeCallbackProps {
20
+ export interface ChangeCallbackProps {
21
21
  hex: string;
22
22
  hsl: HSL;
23
23
  hsv: HSV;
@@ -39,5 +39,4 @@ export interface ColorPickerProps {
39
39
  style?: CSSProperties;
40
40
  }
41
41
  export declare function ColorPicker(props: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
42
- export {};
43
42
  //# sourceMappingURL=ColorPicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../src/components/color-picker/react-color/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAW3C,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AACD,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AACD,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,GAAG,CAAC;IACT,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EACF;QACE,GAAG,EAAE,MAAM,CAAC;KACb,GACD,GAAG,GACH,GAAG,GACH,GAAG,CAAC;IACR,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC/D,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACvE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACpE,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAsFD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAiGlD"}
1
+ {"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../../../src/components/color-picker/react-color/ColorPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAW3C,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AACD,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AACD,MAAM,WAAW,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,GAAG,CAAC;IACT,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,GAAG,CAAC;IACT,MAAM,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;CACvC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,KAAK,CAAC,EACF;QACE,GAAG,EAAE,MAAM,CAAC;KACb,GACD,GAAG,GACH,GAAG,GACH,GAAG,CAAC;IACR,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC/D,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACvE,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,EAAE,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IACpE,KAAK,CAAC,EAAE,aAAa,CAAC;CACvB;AAsFD,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAiGlD"}
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAS1E,KAAK,aAAa,GAAG,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,MAAM,CAAC,GAAG;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAQF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAiC5C"}
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAS1E,KAAK,aAAa,GAAG,IAAI,CAAC,eAAe,EAAE,gBAAgB,GAAG,MAAM,CAAC,GAAG;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAQF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CAkC5C"}
@@ -10,7 +10,7 @@ const StyledCheckbox = styled(BPCheckbox) `
10
10
  width: fit-content;
11
11
  `;
12
12
  export function Checkbox(props) {
13
- const { helpText, label } = props;
13
+ const { helpText, label, ...otherProps } = props;
14
14
  const field = useFieldContext();
15
15
  const error = field
16
16
  .getMeta()
@@ -21,6 +21,6 @@ export function Checkbox(props) {
21
21
  const checked = event.target.checked;
22
22
  return field.handleChange(checked);
23
23
  }
24
- return (_jsx(FormGroup, { name: field.name, intent: intent, error: error, fullWidth: true, helpText: helpText, children: _jsx(StyledCheckbox, { label: label, name: field.name, value: String(field.state.value), onChange: onChange, onBlur: field.handleBlur, defaultChecked: field.state.value }) }));
24
+ return (_jsx(FormGroup, { name: field.name, intent: intent, error: error, fullWidth: true, helpText: helpText, children: _jsx(StyledCheckbox, { ...otherProps, label: label, name: field.name, value: String(field.state.value), onChange: onChange, onBlur: field.handleBlur, defaultChecked: field.state.value }) }));
25
25
  }
26
26
  //# sourceMappingURL=checkbox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input/checkbox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,IAAI,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAGrC,OAAO,EAAE,eAAe,EAAE,MAAM,8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ClB,MAAM,EAAE,KAAK,CAAC,UAAU,EACxB,cAAc,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,GACjC,GACQ,CACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import type { FormGroupInputProps } from '../input_groups/form_group.js';
2
+ type ColorPickerProps = Omit<FormGroupInputProps, 'placeholder'>;
3
+ export declare function ColorPicker(props: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
4
+ export {};
5
+ //# sourceMappingURL=color_picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color_picker.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/color_picker.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,KAAK,gBAAgB,GAAG,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;AAEjE,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CA6BlD"}
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ColorPickerDropdown } from '../../../color-picker/index.js';
3
+ import { useFieldContext } from '../../context/use_ts_form.js';
4
+ import { FormGroup } from '../input_groups/form_group.js';
5
+ export function ColorPicker(props) {
6
+ const { label, helpText, layout, fullWidth, required } = props;
7
+ const field = useFieldContext();
8
+ const error = field
9
+ .getMeta()
10
+ .errors.map((e) => e.message)
11
+ .at(0);
12
+ function onChange(color) {
13
+ field.setValue(color.hex);
14
+ }
15
+ return (_jsx(FormGroup, { name: field.name, label: label, helpText: helpText, error: error, layout: layout, fullWidth: fullWidth, required: required, intent: error ? 'danger' : 'none', children: _jsx(ColorPickerDropdown, { color: { hex: field.state.value }, onChange: onChange }) }));
16
+ }
17
+ //# sourceMappingURL=color_picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color_picker.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input/color_picker.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAI1D,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC/D,MAAM,KAAK,GAAG,eAAe,EAAU,CAAC;IACxC,MAAM,KAAK,GAAG,KAAK;SAChB,OAAO,EAAE;SACT,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SAC5B,EAAE,CAAC,CAAC,CAAC,CAAC;IAET,SAAS,QAAQ,CAAC,KAAmC;QACnD,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,YAEjC,KAAC,mBAAmB,IAClB,KAAK,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,EACjC,QAAQ,EAAE,QAAQ,GAClB,GACQ,CACb,CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
+ import type { InputGroupProps } from '@blueprintjs/core';
1
2
  import type { FormGroupInputProps } from '../input_groups/form_group.js';
2
- interface InputProps extends FormGroupInputProps {
3
+ interface InputProps extends FormGroupInputProps, InputGroupProps {
3
4
  type?: string;
4
5
  }
5
6
  export declare function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,UAAU,UAAW,SAAQ,mBAAmB;IAC9C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,2CA6CtC"}
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAKzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,UAAU,UAAW,SAAQ,mBAAmB,EAAE,eAAe;IAC/D,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,2CAoCtC"}
@@ -3,7 +3,7 @@ import { InputGroup } from '@blueprintjs/core';
3
3
  import { useFieldContext } from '../../context/use_ts_form.js';
4
4
  import { FormGroup } from '../input_groups/form_group.js';
5
5
  export function Input(props) {
6
- const { label, required, placeholder, type = 'text', helpText, layout, fullWidth, } = props;
6
+ const { label, required, helpText, layout, fullWidth, ...otherProps } = props;
7
7
  const field = useFieldContext();
8
8
  const error = field
9
9
  .getMeta()
@@ -12,6 +12,6 @@ export function Input(props) {
12
12
  function onChange(event) {
13
13
  return field.handleChange(event.target.value);
14
14
  }
15
- return (_jsx(FormGroup, { name: field.name, label: label, intent: error ? 'danger' : 'none', required: required, error: error, helpText: helpText, layout: layout, fullWidth: fullWidth, children: _jsx(InputGroup, { id: field.name, name: field.name, required: required, type: type, onChange: onChange, onBlur: field.handleBlur, intent: error ? 'danger' : 'none', value: field.state.value, placeholder: placeholder }) }));
15
+ return (_jsx(FormGroup, { name: field.name, label: label, intent: error ? 'danger' : 'none', required: required, error: error, helpText: helpText, layout: layout, fullWidth: fullWidth, children: _jsx(InputGroup, { ...otherProps, id: field.name, name: field.name, onChange: onChange, onBlur: field.handleBlur, intent: error ? 'danger' : 'none', value: field.state.value, required: required }) }));
16
16
  }
17
17
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG/C,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAM1D,MAAM,UAAU,KAAK,CAAC,KAAiB;IACrC,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,WAAW,EACX,IAAI,GAAG,MAAM,EACb,QAAQ,EACR,MAAM,EACN,SAAS,GACV,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,eAAe,EAAU,CAAC;IACxC,MAAM,KAAK,GAAG,KAAK;SAChB,OAAO,EAAE;SACT,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SAC5B,EAAE,CAAC,CAAC,CAAC,CAAC;IAET,SAAS,QAAQ,CAAC,KAAoC;QACpD,OAAO,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EACjC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EA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C,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EACjC,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,YAEpB,KAAC,UAAU,OACL,UAAU,EACd,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,KAAK,CAAC,UAAU,EACxB,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EACjC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,EACxB,QAAQ,EAAE,QAAQ,GAClB,GACQ,CACb,CAAC;AACJ,CAAC"}
@@ -1,5 +1,6 @@
1
+ import type { NumericInputProps as BPNumericInputProps } from '@blueprintjs/core';
1
2
  import type { FormGroupInputProps } from '../input_groups/form_group.js';
2
- interface NumericInputProps extends FormGroupInputProps {
3
+ interface NumericInputProps extends FormGroupInputProps, BPNumericInputProps {
3
4
  step?: number;
4
5
  min?: number;
5
6
  max?: number;
@@ -1 +1 @@
1
- {"version":3,"file":"numeric_input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/numeric_input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,UAAU,iBAAkB,SAAQ,mBAAmB;IACrD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAkDpD"}
1
+ {"version":3,"file":"numeric_input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/numeric_input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,IAAI,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAKlF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAGzE,UAAU,iBAAkB,SAAQ,mBAAmB,EAAE,mBAAmB;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAoDpD"}
@@ -4,7 +4,7 @@ import { useFieldContext } from '../../context/use_ts_form.js';
4
4
  import { getIntent } from '../../utils/use_intent.js';
5
5
  import { FormGroup } from '../input_groups/form_group.js';
6
6
  export function NumericInput(props) {
7
- const { label, required, helpText, placeholder, step, min, max, layout, fullWidth, } = props;
7
+ const { label, required, helpText, placeholder, step, min, max, layout, fullWidth, ...otherProps } = props;
8
8
  const field = useFieldContext();
9
9
  const error = field
10
10
  .getMeta()
@@ -14,6 +14,6 @@ export function NumericInput(props) {
14
14
  function onChange(_, valueAsString) {
15
15
  return field.handleChange(valueAsString);
16
16
  }
17
- return (_jsx(FormGroup, { name: field.name, label: label, intent: intent, required: required, helpText: helpText, layout: layout, error: error, fullWidth: fullWidth, children: _jsx(BPNumericInput, { id: field.name, name: field.name, stepSize: step, min: min, max: max, value: field.state.value ?? '', onValueChange: onChange, intent: intent, placeholder: placeholder, required: required }) }));
17
+ return (_jsx(FormGroup, { name: field.name, label: label, intent: intent, required: required, helpText: helpText, layout: layout, error: error, fullWidth: fullWidth, children: _jsx(BPNumericInput, { ...otherProps, id: field.name, name: field.name, stepSize: step, min: min, max: max, value: field.state.value ?? '', onValueChange: onChange, intent: intent, placeholder: placeholder, required: required }) }));
18
18
  }
19
19
  //# sourceMappingURL=numeric_input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"numeric_input.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input/numeric_input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,I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AAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,GAClB,GACQ,CACb,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"numeric_input.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input/numeric_input.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAQ1D,MAAM,UAAU,YAAY,CAAC,KAAwB;IACnD,MAAM,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,IAAI,EACJ,GAAG,EACH,GAAG,EACH,MAAM,EACN,SAAS,EACT,GAAG,UAAU,EACd,GAAG,KAAK,CAAC;IAEV,MAAM,KAAK,GAAG,eAAe,EAAU,CAAC;IACxC,MAAM,KAAK,GAAG,KAAK;SAChB,OAAO,EAAE;SACT,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC;SAC5B,EAAE,CAAC,CAAC,CAAC,CAAC;IAET,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAEhC,SAAS,QAAQ,CAAC,CAAS,EAAE,aAAqB;QAChD,OAAO,KAAK,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,CACL,KAAC,SAAS,IACR,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,YAEpB,KAAC,cAAc,OACT,UAAU,EACd,EAAE,EAAE,KAAK,CAAC,IAAI,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,QAAQ,EAAE,IAAI,EACd,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,EAC9B,aAAa,EAAE,QAAQ,EACvB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,GAClB,GACQ,CACb,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Layout } from '../input_groups/form.js';
1
+ import type { Layout } from '../input_groups/form_context.js';
2
2
  interface SwitchProps {
3
3
  label?: string;
4
4
  helpText?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/switch.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAGtD,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AASD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CAgCxC"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input/switch.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAG9D,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AASD,wBAAgB,MAAM,CAAC,KAAK,EAAE,WAAW,2CAgCxC"}
@@ -1,11 +1,8 @@
1
1
  import type { FormHTMLAttributes, ReactNode } from 'react';
2
- export type Layout = 'inline' | 'stacked';
2
+ import type { Layout } from './form_context.js';
3
3
  export interface FormProps extends FormHTMLAttributes<HTMLFormElement> {
4
4
  children: ReactNode;
5
5
  layout?: Layout;
6
6
  }
7
- export declare function useFormContext(): {
8
- layout: Layout;
9
- };
10
7
  export declare function Form(props: FormProps): import("react/jsx-runtime").JSX.Element;
11
8
  //# sourceMappingURL=form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE1C,MAAM,WAAW,SAAU,SAAQ,kBAAkB,CAAC,eAAe,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAOD,wBAAgB,cAAc;YALc,MAAM;EAOjD;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAYpC"}
1
+ {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,WAAW,SAAU,SAAQ,kBAAkB,CAAC,eAAe,CAAC;IACpE,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAYpC"}
@@ -1,12 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { createContext, useContext, useMemo } from 'react';
3
- const formContext = createContext({
4
- layout: 'stacked',
5
- });
6
- // eslint-disable-next-line react-refresh/only-export-components
7
- export function useFormContext() {
8
- return useContext(formContext);
9
- }
2
+ import { useMemo } from 'react';
3
+ import { formContext } from './form_context.js';
10
4
  export function Form(props) {
11
5
  const { children, layout = 'stacked', ...otherProps } = props;
12
6
  const contextValue = useMemo(() => {
@@ -1 +1 @@
1
- {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAS3D,MAAM,WAAW,GAAG,aAAa,CAAqB;IACpD,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC;AAEH,gEAAgE;AAChE,MAAM,UAAU,cAAc;IAC5B,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAE9D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,CACL,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACvC,kBAAU,UAAU,YAAG,QAAQ,GAAQ,GAClB,CACxB,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"form.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAE9D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,EAAE;QAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,OAAO,CACL,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY,YACvC,kBAAU,UAAU,YAAG,QAAQ,GAAQ,GAClB,CACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ export type Layout = 'inline' | 'stacked';
2
+ export declare const formContext: import("react").Context<{
3
+ layout: Layout;
4
+ }>;
5
+ export declare function useFormContext(): {
6
+ layout: Layout;
7
+ };
8
+ //# sourceMappingURL=form_context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form_context.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form_context.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE1C,eAAO,MAAM,WAAW;YAA2B,MAAM;EAEvD,CAAC;AAEH,wBAAgB,cAAc;YAJqB,MAAM;EAMxD"}
@@ -0,0 +1,8 @@
1
+ import { createContext, useContext } from 'react';
2
+ export const formContext = createContext({
3
+ layout: 'stacked',
4
+ });
5
+ export function useFormContext() {
6
+ return useContext(formContext);
7
+ }
8
+ //# sourceMappingURL=form_context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form_context.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form_context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIlD,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAqB;IAC3D,MAAM,EAAE,SAAS;CAClB,CAAC,CAAC;AAEH,MAAM,UAAU,cAAc;IAC5B,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { Intent } from '@blueprintjs/core';
2
2
  import type { ReactNode } from 'react';
3
- import type { Layout } from './form.js';
3
+ import type { Layout } from './form_context.js';
4
4
  export interface FormGroupInputProps {
5
5
  label?: string;
6
6
  required?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"form_group.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form_group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAsDxC,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CA6C9C"}
1
+ {"version":3,"file":"form_group.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form_group.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AA+DhD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,UAAU,cAAc;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,2CAkD9C"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Classes } from '@blueprintjs/core';
2
+ import { Classes, Colors } from '@blueprintjs/core';
3
3
  import styled from '@emotion/styled';
4
- import { useFormContext } from './form.js';
4
+ import { useFormContext } from './form_context.js';
5
5
  const INPUT_HEIGHT = 30;
6
6
  const FormContainer = styled.div `
7
7
  min-height: ${INPUT_HEIGHT}px;
@@ -23,23 +23,32 @@ const ContainerElement = styled.div `
23
23
  : '1 / -1'};
24
24
  height: ${(props) => props.height === 'auto' ? props.height : `${props.height}px`};
25
25
  width: fit-content;
26
+ min-width: 180px;
26
27
  `;
28
+ // Keep 26 px for inline layout to align with input height
27
29
  const Label = styled.label `
28
- padding-top: calc(${INPUT_HEIGHT}px - 26px);
30
+ padding-top: calc(
31
+ ${INPUT_HEIGHT}px - ${(props) => (props.layout === 'inline' ? 26 : 20)}px
32
+ );
29
33
  grid-column: ${(props) => (props.layout === 'inline' ? 'label' : '1 / -1')};
30
34
  height: 30px;
31
-
32
- @media (width < 48rem) {
33
- padding: 0;
34
- }
35
35
  `;
36
36
  const ErrorAndHelpText = styled.div `
37
37
  display: flex;
38
38
  flex-direction: column;
39
39
  `;
40
+ const InfoText = styled.span `
41
+ margin-bottom: 5px;
42
+ `;
43
+ // Enforce that the help text will be only gray
44
+ const HelpText = styled(InfoText) `
45
+ color: ${Colors.GRAY1} !important;
46
+ `;
40
47
  export function FormGroup(props) {
41
- const { label, intent, name, required, children, helpText, error, layout, fullWidth = false, } = props;
48
+ const { label, intent = 'none', name, required, children, helpText, error, layout, fullWidth = false, } = props;
42
49
  const { layout: formLayout } = useFormContext();
43
- return (_jsxs(FormContainer, { layout: layout || formLayout, className: `${Classes.FORM_GROUP} ${Classes.intentClass(intent)}`, children: [label && (_jsxs(Label, { layout: layout || formLayout, className: Classes.LABEL, htmlFor: name, children: [label, ' ', required && (_jsx(RequiredSpan, { className: Classes.TEXT_MUTED, children: "*" }))] })), _jsxs(ContainerElement, { fullWidth: fullWidth, layout: layout || formLayout, children: [children, _jsxs(ErrorAndHelpText, { children: [helpText && (_jsx("span", { className: Classes.FORM_HELPER_TEXT, children: helpText })), error && _jsx("span", { className: Classes.FORM_HELPER_TEXT, children: error })] })] })] }));
50
+ // If intent is undefined or none intentClass will return undefined
51
+ const intentClass = Classes.intentClass(intent) ?? '';
52
+ return (_jsxs(FormContainer, { layout: layout || formLayout, className: `${Classes.FORM_GROUP} ${intentClass}`, children: [label && (_jsxs(Label, { layout: layout || formLayout, className: Classes.LABEL, htmlFor: name, children: [label, ' ', required && (_jsx(RequiredSpan, { className: Classes.TEXT_MUTED, children: "*" }))] })), _jsxs(ContainerElement, { fullWidth: fullWidth, layout: layout || formLayout, children: [children, _jsxs(ErrorAndHelpText, { children: [helpText && (_jsx(HelpText, { className: Classes.FORM_HELPER_TEXT, children: helpText })), error && (_jsx(InfoText, { className: Classes.FORM_HELPER_TEXT, children: error }))] })] })] }));
44
53
  }
45
54
  //# sourceMappingURL=form_group.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"form_group.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form_group.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAE9B;gBACc,YAAY;;;;2BAID,CAAC,KAAK,EAAE,EAAE,CACjC,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,KAAK;wBACzC,CAAC,KAAK,EAAE,EAAE,CAC9B,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM;CACnD,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAA;;CAE/B,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAIjC;;iBAEe,CAAC,KAAK,EAAE,EAAE,CACvB,KAAK,CAAC,SAAS;IACb,CAAC,CAAC,QAAQ;IACV,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ;QACzB,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,QAAQ;YACN,CAAC,KAAK,EAAE,EAAE,CAClB,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI;;CAE/D,CAAC;AAEF,MAAM,KAAK,GAAG,MAAM,C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"}
1
+ {"version":3,"file":"form_group.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/form_group.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAIrC,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAEnD,MAAM,YAAY,GAAG,EAAE,CAAC;AAExB,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAE9B;gBACc,YAAY;;;;2BAID,CAAC,KAAK,EAAE,EAAE,CACjC,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,KAAK;wBACzC,CAAC,KAAK,EAAE,EAAE,CAC9B,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM;CACnD,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAA;;CAE/B,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAIjC;;iBAEe,CAAC,KAAK,EAAE,EAAE,CACvB,KAAK,CAAC,SAAS;IACb,CAAC,CAAC,QAAQ;IACV,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ;QACzB,CAAC,CAAC,OAAO;QACT,CAAC,CAAC,QAAQ;YACN,CAAC,KAAK,EAAE,EAAE,CAClB,KAAK,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI;;;CAG/D,CAAC;AAEF,0DAA0D;AAC1D,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAoB;;MAExC,YAAY,QAAQ,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CA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aACjE,QAAQ,EAET,MAAC,gBAAgB,eACd,QAAQ,IAAI,CACX,KAAC,QAAQ,IAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,YAAG,QAAQ,GAAY,CACrE,EAEA,KAAK,IAAI,CACR,KAAC,QAAQ,IAAC,SAAS,EAAE,OAAO,CAAC,gBAAgB,YAAG,KAAK,GAAY,CAClE,IACgB,IACF,IACL,CACjB,CAAC;AACJ,CAAC"}
@@ -29,7 +29,7 @@ const ContainerContent = styled.div `
29
29
  flex-direction: column;
30
30
  gap: 2px;
31
31
  border-radius: 0.75rem;
32
- padding: 7px 10px 2px;
32
+ padding: 7px 10px 10px;
33
33
  `;
34
34
  export function Section(props) {
35
35
  const { title, description, children } = props;
@@ -1,4 +1,5 @@
1
1
  import { Checkbox } from '../components/input/checkbox.js';
2
+ import { ColorPicker } from '../components/input/color_picker.tsx';
2
3
  import { Input } from '../components/input/input.js';
3
4
  import { NumericInput } from '../components/input/numeric_input.js';
4
5
  import { ResetButton } from '../components/input/reset_button.js';
@@ -13,6 +14,7 @@ declare const withForm: <TFormData, TOnMount extends import("@tanstack/react-for
13
14
  readonly Checkbox: typeof Checkbox;
14
15
  readonly Select: typeof Select;
15
16
  readonly Switch: typeof Switch;
17
+ readonly ColorPicker: typeof ColorPicker;
16
18
  }, {
17
19
  readonly SubmitButton: typeof SubmitButton;
18
20
  readonly ResetButton: typeof ResetButton;
@@ -24,6 +26,7 @@ declare const withForm: <TFormData, TOnMount extends import("@tanstack/react-for
24
26
  readonly Checkbox: typeof Checkbox;
25
27
  readonly Select: typeof Select;
26
28
  readonly Switch: typeof Switch;
29
+ readonly ColorPicker: typeof ColorPicker;
27
30
  }, {
28
31
  readonly SubmitButton: typeof SubmitButton;
29
32
  readonly ResetButton: typeof ResetButton;
@@ -36,6 +39,7 @@ export declare const useForm: <TFormData, TOnMount extends import("@tanstack/rea
36
39
  readonly Checkbox: typeof Checkbox;
37
40
  readonly Select: typeof Select;
38
41
  readonly Switch: typeof Switch;
42
+ readonly ColorPicker: typeof ColorPicker;
39
43
  }, {
40
44
  readonly SubmitButton: typeof SubmitButton;
41
45
  readonly ResetButton: typeof ResetButton;
@@ -1 +1 @@
1
- {"version":3,"file":"use_ts_form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/context/use_ts_form.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE1D,QAAA,MAAQ,cAAc,2IAAE,eAAe,8KACb,CAAC;AAE3B,QAAA,MAAoB,QAAQ;;;;;;;;;;;;;;;;;;;;;;kCAe1B,CAAC;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;EAAa,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"use_ts_form.d.ts","sourceRoot":"","sources":["../../../../src/components/form/context/use_ts_form.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AAE1D,QAAA,MAAQ,cAAc,2IAAE,eAAe,8KACb,CAAC;AAE3B,QAAA,MAAoB,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;kCAgB1B,CAAC;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;EAAa,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { createFormHook, createFormHookContexts } from '@tanstack/react-form';
2
2
  import { Checkbox } from '../components/input/checkbox.js';
3
+ import { ColorPicker } from "../components/input/color_picker.js";
3
4
  import { Input } from '../components/input/input.js';
4
5
  import { NumericInput } from '../components/input/numeric_input.js';
5
6
  import { ResetButton } from '../components/input/reset_button.js';
@@ -22,6 +23,7 @@ const { useAppForm, withForm } = createFormHook({
22
23
  Checkbox,
23
24
  Select,
24
25
  Switch,
26
+ ColorPicker,
25
27
  },
26
28
  });
27
29
  export const useForm = useAppForm;
@@ -1 +1 @@
1
- {"version":3,"file":"use_ts_form.js","sourceRoot":"","sources":["../../../../src/components/form/context/use_ts_form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAA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AE3B,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAC9C,YAAY;IACZ,WAAW;IACX,cAAc,EAAE;QACd,YAAY;QACZ,WAAW;QACX,OAAO;KACR;IACD,eAAe,EAAE;QACf,KAAK;QACL,YAAY;QACZ,QAAQ;QACR,MAAM;QACN,MAAM;QACN,WAAW;KACZ;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { attachClosestEdge, combine, draggable, dropTargetForElements, extractClosestEdge, pointerOutsideOfPreview, setCustomNativeDragPreview, } from '@zakodium/pdnd-esm';
2
3
  import { useEffect, useMemo, useRef, useState } from 'react';
3
4
  import { createPortal } from 'react-dom';
4
- import { attachClosestEdge, combine, draggable, dropTargetForElements, extractClosestEdge, pointerOutsideOfPreview, setCustomNativeDragPreview, } from '../../pdnd.cjs';
5
5
  import { assert } from '../../utils/index.js';
6
6
  import { useFlashRowEffect } from '../flash_row/use_flash_row_effect.js';
7
7
  import { PreviewTable } from '../preview_table.js';
@@ -1 +1 @@
1
- {"version":3,"file":"draggable_row_tr.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/draggable_row_tr.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EACL,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;A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E;oBACnB,IACE,OAAO,CAAC,IAAI,KAAK,SAAS;wBAC1B,OAAO,CAAC,WAAW,KAAK,WAAW,EACnC,CAAC;wBACD,OAAO,OAAO,CAAC;oBACjB,CAAC;oBACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC;gBAC1C,CAAC,CAAC,CAAC;YACL,CAAC;YACD,WAAW;gBACT,QAAQ,CAAC,SAAS,CAAC,CAAC;YACtB,CAAC;YACD,MAAM;gBACJ,QAAQ,CAAC,SAAS,CAAC,CAAC;YACtB,CAAC;SACF,CAAC,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,GAAG,EAAE,UAAU,EAAE,SAAS,CAAC,CAAC,CAAC;IAEjC,iBAAiB,CAAC,GAAG,CAAC,EAAE,EAAE,WAAW,CAAC,CAAC;IAEvC,MAAM,KAAK,GAAG,OAAO,CAAsB,GAAG,EAAE;QAC9C,OAAO;YACL,aAAa;YACb,KAAK;SACN,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,OAAO,CACL,8BACE,KAAC,mBAAmB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACxC,gBAAQ,OAAO,EAAE,GAAG,EAAE,WAAW,GAAI,GACR,EAC9B,KAAK,CAAC,IAAI,KAAK,SAAS;gBACvB,YAAY,CAAC,gBAAgB,CAAC,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,IACrD,CACJ,CAAC;AACJ,CAAC;AAED,MAAM,SAAS,GAAuB,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACvD,MAAM,aAAa,GAAuB,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"draggable_row_tr.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/draggable_row_tr.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,iBAAiB,EACjB,OAAO,EACP,SAAS,EACT,qBAAqB,EACrB,kBAAkB,EAClB,uB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AAM,aAAa,GAAuB,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"item_order_provider.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/item_order_provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,UAAU,sBAAsB,CAAC,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAC3C,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA4CjC"}
1
+ {"version":3,"file":"item_order_provider.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/item_order_provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAMvC,UAAU,sBAAsB,CAAC,CAAC;IAChC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACrB,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,CAAC,GAAG,OAAO,EAC3C,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,2CA4CjC"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { getReorderDestinationIndex, reorder } from '@zakodium/pdnd-esm';
2
3
  import { useCallback, useMemo, useState } from 'react';
3
- import { getReorderDestinationIndex, reorder } from '../../pdnd.cjs';
4
4
  import { itemOrderContext } from './item_order_context.js';
5
5
  export function ItemOrderProvider(props) {
6
6
  // Isolated instances of this component from one another
@@ -1 +1 @@
1
- {"version":3,"file":"item_order_provider.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/item_order_provider.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,MAAM,UAAU,iBAAiB,CAC/B,KAAgC;IAEhC,wDAAwD;IACxD,MAAM,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAClD,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,EAAE,EAAE;QACrD,MAAM,WAAW,GAAG,0BAA0B,CAAC;YAC7C,UAAU;YACV,mBAAmB;YACnB,aAAa;YACb,IAAI,EAAE,UAAU;SACjB,CAAC,CAAC;QAEH,IAAI,WAAW,KAAK,UAAU,EAAE,CAAC;YAC/B,4CAA4C;YAC5C,OAAO;QACT,CAAC;QAED,cAAc,CACZ,OAAO,CAAC;YACN,IAAI,EAAE,KAAK;YACX,UAAU;YACV,WAAW;SACZ,CAAC,CACH,CAAC;IACJ,CAAC,EACD,CAAC,KAAK,EAAE,cAAc,CAAC,CACxB,CAAC;IAEF,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,KAAK,EAAE,KAA4B;QACnC,UAAU;KACX,CAAC,EACF,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CACjC,CAAC;IAEF,OAAO,CACL,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACpC,QAAQ,GACiB,CAC7B,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"item_order_provider.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/item_order_provider.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,0BAA0B,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,MAAM,UAAU,iBAAiB,CAC/B,KAAgC;IAEhC,wDAAwD;IACxD,MAAM,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC;IACjE,MAAM,EAAE,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAClD,MAAM,WAAW,GAAG,WAAW,CAC7B,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,EAAE,EAAE,EAAE;QACrD,MAAM,WAAW,GAAG,0BAA0B,CAAC;YAC7C,UAAU;YACV,mBAAmB;YACnB,aAAa;YACb,IAAI,EAAE,UAAU;SACjB,CAAC,CAAC;QAEH,IAAI,WAAW,KAAK,UAAU,EAAE,CAAC;YAC/B,4CAA4C;YAC5C,OAAO;QACT,CAAC;QAED,cAAc,CACZ,OAAO,CAAC;YACN,IAAI,EAAE,KAAK;YACX,UAAU;YACV,WAAW;SACZ,CAAC,CACH,CAAC;IACJ,CAAC,EACD,CAAC,KAAK,EAAE,cAAc,CAAC,CACxB,CAAC;IAEF,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC;QACL,WAAW;QACX,KAAK,EAAE,KAA4B;QACnC,UAAU;KACX,CAAC,EACF,CAAC,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CACjC,CAAC;IAEF,OAAO,CACL,KAAC,gBAAgB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACpC,QAAQ,GACiB,CAC7B,CAAC;AACJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"use_drop_monitor.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/use_drop_monitor.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAevC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,SAAS,CAAC,OAAO,CAAC,EACpC,OAAO,EAAE,OAAO,QAsDjB"}
1
+ {"version":3,"file":"use_drop_monitor.d.ts","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/use_drop_monitor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC;;;;;GAKG;AACH,wBAAgB,cAAc,CAC5B,gBAAgB,EAAE,SAAS,CAAC,OAAO,CAAC,EACpC,OAAO,EAAE,OAAO,QAsDjB"}
@@ -1,5 +1,5 @@
1
+ import { autoScrollForElements, combine, extractClosestEdge, monitorForElements, } from '@zakodium/pdnd-esm';
1
2
  import { useEffect } from 'react';
2
- import { autoScrollForElements, combine, extractClosestEdge, monitorForElements, } from '../../pdnd.cjs';
3
3
  import { assert } from '../../utils/index.js';
4
4
  import { useFlashedRowContext } from '../flash_row/flashed_row_context.js';
5
5
  import { isItemData } from './item_data.js';
@@ -1 +1 @@
1
- {"version":3,"file":"use_drop_monitor.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/use_drop_monitor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC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,EAAE,CAAC;oBACvD,OAAO;gBACT,CAAC;gBAED,MAAM,aAAa,GAAG,KAAK,CAAC,SAAS,CACnC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,KAAK,UAAU,CAAC,EAAE,CACpC,CAAC;gBACF,IAAI,aAAa,KAAK,CAAC,CAAC,EAAE,CAAC;oBACzB,OAAO;gBACT,CAAC;gBAED,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,UAAU,CAAC,CAAC;gBAE3D,WAAW,CAAC;oBACV,UAAU,EAAE,UAAU,CAAC,KAAK;oBAC5B,aAAa;oBACb,mBAAmB;iBACpB,CAAC,CAAC;gBACH,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAC/B,CAAC;SACF,CAAC,EACF,qBAAqB,CAAC;YACpB,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,eAAe;SACzB,CAAC,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC"}
1
+ {"version":3,"file":"use_drop_monitor.js","sourceRoot":"","sources":["../../../../src/components/table/reorder_rows/use_drop_monitor.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAC5B,gBAAoC,EACpC,OAAgB;IAEhB,MAAM,EAAE,WAAW,EAAE,KAAK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;gBACH,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAC/B,CAAC;SACF,CAAC,EACF,qBAAqB,CAAC;YACpB,SAAS,EAAE,UAAU;YACrB,OAAO,EAAE,eAAe;SACzB,CAAC,CACH,CAAC;IACJ,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC,CAAC;AACrE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-science",
3
- "version": "19.3.0",
3
+ "version": "19.4.0",
4
4
  "description": "React components to build scientific applications UI",
5
5
  "type": "module",
6
6
  "exports": {
@@ -64,6 +64,7 @@
64
64
  "@tanstack/react-form": "^1.23.6",
65
65
  "@tanstack/react-table": "^8.21.3",
66
66
  "@tanstack/react-virtual": "^3.13.12",
67
+ "@zakodium/pdnd-esm": "^1.0.2",
67
68
  "d3-scale-chromatic": "^3.1.0",
68
69
  "react-d3-utils": "^3.1.2",
69
70
  "react-dropzone": "^14.3.8",
@@ -28,7 +28,7 @@ export interface HSV {
28
28
  a: number;
29
29
  }
30
30
 
31
- interface ChangeCallbackProps {
31
+ export interface ChangeCallbackProps {
32
32
  hex: string;
33
33
  hsl: HSL;
34
34
  hsv: HSV;
@@ -18,7 +18,7 @@ const StyledCheckbox = styled(BPCheckbox)<CheckboxProps>`
18
18
  `;
19
19
 
20
20
  export function Checkbox(props: CheckboxProps) {
21
- const { helpText, label } = props;
21
+ const { helpText, label, ...otherProps } = props;
22
22
  const field = useFieldContext<boolean>();
23
23
  const error = field
24
24
  .getMeta()
@@ -41,6 +41,7 @@ export function Checkbox(props: CheckboxProps) {
41
41
  helpText={helpText}
42
42
  >
43
43
  <StyledCheckbox
44
+ {...otherProps}
44
45
  label={label}
45
46
  name={field.name}
46
47
  value={String(field.state.value)}
@@ -0,0 +1,38 @@
1
+ import { ColorPickerDropdown } from '../../../color-picker/index.js';
2
+ import type { ChangeCallbackProps as ChangeCallbackComponentProps } from '../../../color-picker/react-color/ColorPicker.js';
3
+ import { useFieldContext } from '../../context/use_ts_form.js';
4
+ import type { FormGroupInputProps } from '../input_groups/form_group.js';
5
+ import { FormGroup } from '../input_groups/form_group.js';
6
+
7
+ type ColorPickerProps = Omit<FormGroupInputProps, 'placeholder'>;
8
+
9
+ export function ColorPicker(props: ColorPickerProps) {
10
+ const { label, helpText, layout, fullWidth, required } = props;
11
+ const field = useFieldContext<string>();
12
+ const error = field
13
+ .getMeta()
14
+ .errors.map((e) => e.message)
15
+ .at(0);
16
+
17
+ function onChange(color: ChangeCallbackComponentProps) {
18
+ field.setValue(color.hex);
19
+ }
20
+
21
+ return (
22
+ <FormGroup
23
+ name={field.name}
24
+ label={label}
25
+ helpText={helpText}
26
+ error={error}
27
+ layout={layout}
28
+ fullWidth={fullWidth}
29
+ required={required}
30
+ intent={error ? 'danger' : 'none'}
31
+ >
32
+ <ColorPickerDropdown
33
+ color={{ hex: field.state.value }}
34
+ onChange={onChange}
35
+ />
36
+ </FormGroup>
37
+ );
38
+ }
@@ -1,3 +1,4 @@
1
+ import type { InputGroupProps } from '@blueprintjs/core';
1
2
  import { InputGroup } from '@blueprintjs/core';
2
3
  import type { ChangeEvent } from 'react';
3
4
 
@@ -5,20 +6,12 @@ import { useFieldContext } from '../../context/use_ts_form.js';
5
6
  import type { FormGroupInputProps } from '../input_groups/form_group.js';
6
7
  import { FormGroup } from '../input_groups/form_group.js';
7
8
 
8
- interface InputProps extends FormGroupInputProps {
9
+ interface InputProps extends FormGroupInputProps, InputGroupProps {
9
10
  type?: string;
10
11
  }
11
12
 
12
13
  export function Input(props: InputProps) {
13
- const {
14
- label,
15
- required,
16
- placeholder,
17
- type = 'text',
18
- helpText,
19
- layout,
20
- fullWidth,
21
- } = props;
14
+ const { label, required, helpText, layout, fullWidth, ...otherProps } = props;
22
15
 
23
16
  const field = useFieldContext<string>();
24
17
  const error = field
@@ -42,15 +35,14 @@ export function Input(props: InputProps) {
42
35
  fullWidth={fullWidth}
43
36
  >
44
37
  <InputGroup
38
+ {...otherProps}
45
39
  id={field.name}
46
40
  name={field.name}
47
- required={required}
48
- type={type}
49
41
  onChange={onChange}
50
42
  onBlur={field.handleBlur}
51
43
  intent={error ? 'danger' : 'none'}
52
44
  value={field.state.value}
53
- placeholder={placeholder}
45
+ required={required}
54
46
  />
55
47
  </FormGroup>
56
48
  );
@@ -1,3 +1,4 @@
1
+ import type { NumericInputProps as BPNumericInputProps } from '@blueprintjs/core';
1
2
  import { NumericInput as BPNumericInput } from '@blueprintjs/core';
2
3
 
3
4
  import { useFieldContext } from '../../context/use_ts_form.js';
@@ -5,7 +6,7 @@ import { getIntent } from '../../utils/use_intent.js';
5
6
  import type { FormGroupInputProps } from '../input_groups/form_group.js';
6
7
  import { FormGroup } from '../input_groups/form_group.js';
7
8
 
8
- interface NumericInputProps extends FormGroupInputProps {
9
+ interface NumericInputProps extends FormGroupInputProps, BPNumericInputProps {
9
10
  step?: number;
10
11
  min?: number;
11
12
  max?: number;
@@ -22,6 +23,7 @@ export function NumericInput(props: NumericInputProps) {
22
23
  max,
23
24
  layout,
24
25
  fullWidth,
26
+ ...otherProps
25
27
  } = props;
26
28
 
27
29
  const field = useFieldContext<string>();
@@ -48,6 +50,7 @@ export function NumericInput(props: NumericInputProps) {
48
50
  fullWidth={fullWidth}
49
51
  >
50
52
  <BPNumericInput
53
+ {...otherProps}
51
54
  id={field.name}
52
55
  name={field.name}
53
56
  stepSize={step}
@@ -3,7 +3,7 @@ import styled from '@emotion/styled';
3
3
  import type { ChangeEvent } from 'react';
4
4
 
5
5
  import { useFieldContext } from '../../context/use_ts_form.js';
6
- import type { Layout } from '../input_groups/form.js';
6
+ import type { Layout } from '../input_groups/form_context.js';
7
7
  import { FormGroup } from '../input_groups/form_group.js';
8
8
 
9
9
  interface SwitchProps {
@@ -1,22 +1,14 @@
1
1
  import type { FormHTMLAttributes, ReactNode } from 'react';
2
- import { createContext, useContext, useMemo } from 'react';
2
+ import { useMemo } from 'react';
3
3
 
4
- export type Layout = 'inline' | 'stacked';
4
+ import type { Layout } from './form_context.js';
5
+ import { formContext } from './form_context.js';
5
6
 
6
7
  export interface FormProps extends FormHTMLAttributes<HTMLFormElement> {
7
8
  children: ReactNode;
8
9
  layout?: Layout;
9
10
  }
10
11
 
11
- const formContext = createContext<{ layout: Layout }>({
12
- layout: 'stacked',
13
- });
14
-
15
- // eslint-disable-next-line react-refresh/only-export-components
16
- export function useFormContext() {
17
- return useContext(formContext);
18
- }
19
-
20
12
  export function Form(props: FormProps) {
21
13
  const { children, layout = 'stacked', ...otherProps } = props;
22
14
 
@@ -0,0 +1,11 @@
1
+ import { createContext, useContext } from 'react';
2
+
3
+ export type Layout = 'inline' | 'stacked';
4
+
5
+ export const formContext = createContext<{ layout: Layout }>({
6
+ layout: 'stacked',
7
+ });
8
+
9
+ export function useFormContext() {
10
+ return useContext(formContext);
11
+ }
@@ -1,10 +1,10 @@
1
1
  import type { Intent } from '@blueprintjs/core';
2
- import { Classes } from '@blueprintjs/core';
2
+ import { Classes, Colors } from '@blueprintjs/core';
3
3
  import styled from '@emotion/styled';
4
4
  import type { ReactNode } from 'react';
5
5
 
6
- import type { Layout } from './form.js';
7
- import { useFormContext } from './form.js';
6
+ import type { Layout } from './form_context.js';
7
+ import { useFormContext } from './form_context.js';
8
8
 
9
9
  const INPUT_HEIGHT = 30;
10
10
 
@@ -40,16 +40,16 @@ const ContainerElement = styled.div<{
40
40
  height: ${(props) =>
41
41
  props.height === 'auto' ? props.height : `${props.height}px`};
42
42
  width: fit-content;
43
+ min-width: 180px;
43
44
  `;
44
45
 
46
+ // Keep 26 px for inline layout to align with input height
45
47
  const Label = styled.label<{ layout: Layout }>`
46
- padding-top: calc(${INPUT_HEIGHT}px - 26px);
48
+ padding-top: calc(
49
+ ${INPUT_HEIGHT}px - ${(props) => (props.layout === 'inline' ? 26 : 20)}px
50
+ );
47
51
  grid-column: ${(props) => (props.layout === 'inline' ? 'label' : '1 / -1')};
48
52
  height: 30px;
49
-
50
- @media (width < 48rem) {
51
- padding: 0;
52
- }
53
53
  `;
54
54
 
55
55
  const ErrorAndHelpText = styled.div`
@@ -57,6 +57,15 @@ const ErrorAndHelpText = styled.div`
57
57
  flex-direction: column;
58
58
  `;
59
59
 
60
+ const InfoText = styled.span`
61
+ margin-bottom: 5px;
62
+ `;
63
+
64
+ // Enforce that the help text will be only gray
65
+ const HelpText = styled(InfoText)`
66
+ color: ${Colors.GRAY1} !important;
67
+ `;
68
+
60
69
  export interface FormGroupInputProps {
61
70
  label?: string;
62
71
  required?: boolean;
@@ -81,7 +90,7 @@ interface FormGroupProps {
81
90
  export function FormGroup(props: FormGroupProps) {
82
91
  const {
83
92
  label,
84
- intent,
93
+ intent = 'none',
85
94
  name,
86
95
  required,
87
96
  children,
@@ -93,10 +102,13 @@ export function FormGroup(props: FormGroupProps) {
93
102
 
94
103
  const { layout: formLayout } = useFormContext();
95
104
 
105
+ // If intent is undefined or none intentClass will return undefined
106
+ const intentClass = Classes.intentClass(intent) ?? '';
107
+
96
108
  return (
97
109
  <FormContainer
98
110
  layout={layout || formLayout}
99
- className={`${Classes.FORM_GROUP} ${Classes.intentClass(intent)}`}
111
+ className={`${Classes.FORM_GROUP} ${intentClass}`}
100
112
  >
101
113
  {label && (
102
114
  <Label
@@ -115,10 +127,12 @@ export function FormGroup(props: FormGroupProps) {
115
127
 
116
128
  <ErrorAndHelpText>
117
129
  {helpText && (
118
- <span className={Classes.FORM_HELPER_TEXT}>{helpText}</span>
130
+ <HelpText className={Classes.FORM_HELPER_TEXT}>{helpText}</HelpText>
119
131
  )}
120
132
 
121
- {error && <span className={Classes.FORM_HELPER_TEXT}>{error}</span>}
133
+ {error && (
134
+ <InfoText className={Classes.FORM_HELPER_TEXT}>{error}</InfoText>
135
+ )}
122
136
  </ErrorAndHelpText>
123
137
  </ContainerElement>
124
138
  </FormContainer>
@@ -32,7 +32,7 @@ const ContainerContent = styled.div`
32
32
  flex-direction: column;
33
33
  gap: 2px;
34
34
  border-radius: 0.75rem;
35
- padding: 7px 10px 2px;
35
+ padding: 7px 10px 10px;
36
36
  `;
37
37
 
38
38
  interface SectionProps {
@@ -1,6 +1,7 @@
1
1
  import { createFormHook, createFormHookContexts } from '@tanstack/react-form';
2
2
 
3
3
  import { Checkbox } from '../components/input/checkbox.js';
4
+ import { ColorPicker } from '../components/input/color_picker.tsx';
4
5
  import { Input } from '../components/input/input.js';
5
6
  import { NumericInput } from '../components/input/numeric_input.js';
6
7
  import { ResetButton } from '../components/input/reset_button.js';
@@ -26,6 +27,7 @@ const { useAppForm, withForm } = createFormHook({
26
27
  Checkbox,
27
28
  Select,
28
29
  Switch,
30
+ ColorPicker,
29
31
  },
30
32
  });
31
33
 
@@ -1,8 +1,5 @@
1
1
  import type { ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
2
2
  import type { Row, RowData } from '@tanstack/react-table';
3
- import { useEffect, useMemo, useRef, useState } from 'react';
4
- import { createPortal } from 'react-dom';
5
-
6
3
  import {
7
4
  attachClosestEdge,
8
5
  combine,
@@ -11,7 +8,10 @@ import {
11
8
  extractClosestEdge,
12
9
  pointerOutsideOfPreview,
13
10
  setCustomNativeDragPreview,
14
- } from '../../pdnd.cjs';
11
+ } from '@zakodium/pdnd-esm';
12
+ import { useEffect, useMemo, useRef, useState } from 'react';
13
+ import { createPortal } from 'react-dom';
14
+
15
15
  import { assert } from '../../utils/index.js';
16
16
  import { useFlashRowEffect } from '../flash_row/use_flash_row_effect.js';
17
17
  import { PreviewTable } from '../preview_table.js';
@@ -1,9 +1,8 @@
1
1
  import type { Row } from '@tanstack/react-table';
2
+ import { getReorderDestinationIndex, reorder } from '@zakodium/pdnd-esm';
2
3
  import type { ReactNode } from 'react';
3
4
  import { useCallback, useMemo, useState } from 'react';
4
5
 
5
- import { getReorderDestinationIndex, reorder } from '../../pdnd.cjs';
6
-
7
6
  import type { ReorderItemCallback } from './item_order_context.js';
8
7
  import { itemOrderContext } from './item_order_context.js';
9
8
 
@@ -1,13 +1,13 @@
1
1
  import type { ElementDragPayload } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
2
- import type { RefObject } from 'react';
3
- import { useEffect } from 'react';
4
-
5
2
  import {
6
3
  autoScrollForElements,
7
4
  combine,
8
5
  extractClosestEdge,
9
6
  monitorForElements,
10
- } from '../../pdnd.cjs';
7
+ } from '@zakodium/pdnd-esm';
8
+ import type { RefObject } from 'react';
9
+ import { useEffect } from 'react';
10
+
11
11
  import { assert } from '../../utils/index.js';
12
12
  import { useFlashedRowContext } from '../flash_row/flashed_row_context.js';
13
13
 
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getReorderDestinationIndex = exports.extractClosestEdge = exports.attachClosestEdge = exports.autoScrollForElements = exports.monitorForElements = exports.dropTargetForElements = exports.draggable = exports.reorder = exports.combine = exports.setCustomNativeDragPreview = exports.pointerOutsideOfPreview = void 0;
4
- // https://github.com/atlassian/pragmatic-drag-and-drop/issues/27
5
- // Given how `@atlaskit/pragmatic-drag-and-drop` publishes ESM in a non-native way,
6
- // we have to trick TS into using the CJS build so that our build is compatible
7
- // with native ESM.
8
- // We cannot use `verbatimModuleSyntax` ts config option with this pattern.
9
- var pointer_outside_of_preview_1 = require("@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview");
10
- Object.defineProperty(exports, "pointerOutsideOfPreview", { enumerable: true, get: function () { return pointer_outside_of_preview_1.pointerOutsideOfPreview; } });
11
- var set_custom_native_drag_preview_1 = require("@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview");
12
- Object.defineProperty(exports, "setCustomNativeDragPreview", { enumerable: true, get: function () { return set_custom_native_drag_preview_1.setCustomNativeDragPreview; } });
13
- var combine_1 = require("@atlaskit/pragmatic-drag-and-drop/combine");
14
- Object.defineProperty(exports, "combine", { enumerable: true, get: function () { return combine_1.combine; } });
15
- var reorder_1 = require("@atlaskit/pragmatic-drag-and-drop/reorder");
16
- Object.defineProperty(exports, "reorder", { enumerable: true, get: function () { return reorder_1.reorder; } });
17
- var adapter_1 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
18
- Object.defineProperty(exports, "draggable", { enumerable: true, get: function () { return adapter_1.draggable; } });
19
- Object.defineProperty(exports, "dropTargetForElements", { enumerable: true, get: function () { return adapter_1.dropTargetForElements; } });
20
- var adapter_2 = require("@atlaskit/pragmatic-drag-and-drop/element/adapter");
21
- Object.defineProperty(exports, "monitorForElements", { enumerable: true, get: function () { return adapter_2.monitorForElements; } });
22
- var element_1 = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
23
- Object.defineProperty(exports, "autoScrollForElements", { enumerable: true, get: function () { return element_1.autoScrollForElements; } });
24
- var closest_edge_1 = require("@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge");
25
- Object.defineProperty(exports, "attachClosestEdge", { enumerable: true, get: function () { return closest_edge_1.attachClosestEdge; } });
26
- Object.defineProperty(exports, "extractClosestEdge", { enumerable: true, get: function () { return closest_edge_1.extractClosestEdge; } });
27
- var get_reorder_destination_index_1 = require("@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index");
28
- Object.defineProperty(exports, "getReorderDestinationIndex", { enumerable: true, get: function () { return get_reorder_destination_index_1.getReorderDestinationIndex; } });
29
- //# sourceMappingURL=pdnd.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pdnd.cjs","sourceRoot":"","sources":["../../src/components/pdnd.cts"],"names":[],"mappings":";;;AAAA,iEAAiE;AACjE,mFAAmF;AACnF,+EAA+E;AAC/E,mBAAmB;AACnB,2EAA2E;AAC3E,mHAA+G;AAAtG,qIAAA,uBAAuB,OAAA;AAChC,2HAAsH;AAA7G,4IAAA,0BAA0B,OAAA;AACnC,qEAAoE;AAA3D,kGAAA,OAAO,OAAA;AAChB,qEAAoE;AAA3D,kGAAA,OAAO,OAAA;AAChB,6EAG2D;AAFzD,oGAAA,SAAS,OAAA;AACT,gHAAA,qBAAqB,OAAA;AAEvB,6EAAuF;AAA9E,6GAAA,kBAAkB,OAAA;AAC3B,iFAA8F;AAArF,gHAAA,qBAAqB,OAAA;AAC9B,sFAG+D;AAF7D,iHAAA,iBAAiB,OAAA;AACjB,kHAAA,kBAAkB,OAAA;AAEpB,6HAAyH;AAAhH,2IAAA,0BAA0B,OAAA"}
@@ -1,10 +0,0 @@
1
- export { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
2
- export { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
3
- export { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
4
- export { reorder } from '@atlaskit/pragmatic-drag-and-drop/reorder';
5
- export { draggable, dropTargetForElements, } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
6
- export { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
7
- export { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
8
- export { attachClosestEdge, extractClosestEdge, } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
9
- export { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';
10
- //# sourceMappingURL=pdnd.d.cts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pdnd.d.cts","sourceRoot":"","sources":["../../src/components/pdnd.cts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,sEAAsE,CAAC;AAC/G,OAAO,EAAE,0BAA0B,EAAE,MAAM,0EAA0E,CAAC;AACtH,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,2CAA2C,CAAC;AACpE,OAAO,EACL,SAAS,EACT,qBAAqB,GACtB,MAAM,mDAAmD,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAC;AACvF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,0BAA0B,EAAE,MAAM,6EAA6E,CAAC"}
@@ -1,20 +0,0 @@
1
- // https://github.com/atlassian/pragmatic-drag-and-drop/issues/27
2
- // Given how `@atlaskit/pragmatic-drag-and-drop` publishes ESM in a non-native way,
3
- // we have to trick TS into using the CJS build so that our build is compatible
4
- // with native ESM.
5
- // We cannot use `verbatimModuleSyntax` ts config option with this pattern.
6
- export { pointerOutsideOfPreview } from '@atlaskit/pragmatic-drag-and-drop/element/pointer-outside-of-preview';
7
- export { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/element/set-custom-native-drag-preview';
8
- export { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
9
- export { reorder } from '@atlaskit/pragmatic-drag-and-drop/reorder';
10
- export {
11
- draggable,
12
- dropTargetForElements,
13
- } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
14
- export { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element/adapter';
15
- export { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
16
- export {
17
- attachClosestEdge,
18
- extractClosestEdge,
19
- } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge';
20
- export { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index';