react-science 19.2.0 → 19.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/lib/components/accordion/accordion.js +1 -1
- package/lib/components/color-picker/react-color/ColorPicker.d.ts.map +1 -1
- package/lib/components/color-picker/react-color/ColorPicker.js +7 -5
- package/lib/components/color-picker/react-color/ColorPicker.js.map +1 -1
- package/lib/components/doi/doi.js +2 -2
- package/lib/components/doi/doi.js.map +1 -1
- package/lib/components/doi/doi_logo.d.ts +6 -0
- package/lib/components/doi/doi_logo.d.ts.map +1 -0
- package/lib/components/doi/doi_logo.js +16 -0
- package/lib/components/doi/doi_logo.js.map +1 -0
- package/lib/components/form/components/input/checkbox.d.ts +3 -1
- package/lib/components/form/components/input/checkbox.d.ts.map +1 -1
- package/lib/components/form/components/input/checkbox.js +10 -3
- package/lib/components/form/components/input/checkbox.js.map +1 -1
- package/lib/components/form/components/input/input.d.ts +3 -5
- package/lib/components/form/components/input/input.d.ts.map +1 -1
- package/lib/components/form/components/input/input.js +4 -3
- package/lib/components/form/components/input/input.js.map +1 -1
- package/lib/components/form/components/input/numeric_input.d.ts +5 -4
- package/lib/components/form/components/input/numeric_input.d.ts.map +1 -1
- package/lib/components/form/components/input/numeric_input.js +4 -5
- package/lib/components/form/components/input/numeric_input.js.map +1 -1
- package/lib/components/form/components/input/select.d.ts +2 -3
- package/lib/components/form/components/input/select.d.ts.map +1 -1
- package/lib/components/form/components/input/select.js +4 -8
- package/lib/components/form/components/input/select.js.map +1 -1
- package/lib/components/form/components/input/switch.d.ts +4 -0
- package/lib/components/form/components/input/switch.d.ts.map +1 -1
- package/lib/components/form/components/input/switch.js +11 -3
- package/lib/components/form/components/input/switch.js.map +1 -1
- package/lib/components/form/components/input_groups/form.d.ts +11 -0
- package/lib/components/form/components/input_groups/form.d.ts.map +1 -0
- package/lib/components/form/components/input_groups/form.js +17 -0
- package/lib/components/form/components/input_groups/form.js.map +1 -0
- package/lib/components/form/components/input_groups/form_group.d.ts +25 -0
- package/lib/components/form/components/input_groups/form_group.d.ts.map +1 -0
- package/lib/components/form/components/input_groups/form_group.js +45 -0
- package/lib/components/form/components/input_groups/form_group.js.map +1 -0
- package/lib/components/form/components/input_groups/select.d.ts +3 -6
- package/lib/components/form/components/input_groups/select.d.ts.map +1 -1
- package/lib/components/form/components/input_groups/select.js +3 -6
- package/lib/components/form/components/input_groups/select.js.map +1 -1
- package/lib/components/form/components/layout/Section.d.ts +9 -0
- package/lib/components/form/components/layout/Section.d.ts.map +1 -0
- package/lib/components/form/components/layout/Section.js +38 -0
- package/lib/components/form/components/layout/Section.js.map +1 -0
- package/lib/components/form/context/use_ts_form.d.ts +4 -0
- package/lib/components/form/context/use_ts_form.d.ts.map +1 -1
- package/lib/components/form/context/use_ts_form.js +2 -0
- package/lib/components/form/context/use_ts_form.js.map +1 -1
- package/lib/components/index.d.ts +1 -0
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/components/index.js.map +1 -1
- package/lib/components/info-panel/InfoPanel.d.ts.map +1 -1
- package/lib/components/info-panel/InfoPanel.js +3 -3
- package/lib/components/info-panel/InfoPanel.js.map +1 -1
- package/lib/components/input/radio-button-group/RadioButton.js +4 -4
- package/lib/components/input/radio-button-group/RadioButtonGroup.js +2 -2
- package/lib/components/root-layout/css-reset/customPreflight.js +1 -1
- package/lib/components/split_pane/use_split_pane_size.d.ts.map +1 -1
- package/lib/components/split_pane/use_split_pane_size.js +47 -46
- package/lib/components/split_pane/use_split_pane_size.js.map +1 -1
- package/lib/components/svg/index.d.ts +5 -0
- package/lib/components/svg/index.d.ts.map +1 -0
- package/lib/components/svg/index.js +5 -0
- package/lib/components/svg/index.js.map +1 -0
- package/lib/components/svg/styled/svg_styled_line.d.ts +6 -0
- package/lib/components/svg/styled/svg_styled_line.d.ts.map +1 -0
- package/lib/components/svg/styled/svg_styled_line.js +7 -0
- package/lib/components/svg/styled/svg_styled_line.js.map +1 -0
- package/lib/components/svg/styled/svg_styled_path.d.ts +6 -0
- package/lib/components/svg/styled/svg_styled_path.d.ts.map +1 -0
- package/lib/components/svg/styled/svg_styled_path.js +7 -0
- package/lib/components/svg/styled/svg_styled_path.js.map +1 -0
- package/lib/components/svg/styled/svg_styled_text.d.ts +6 -0
- package/lib/components/svg/styled/svg_styled_text.d.ts.map +1 -0
- package/lib/components/svg/styled/svg_styled_text.js +6 -0
- package/lib/components/svg/styled/svg_styled_text.js.map +1 -0
- package/lib/components/svg/styled/svg_styled_types.d.ts +56 -0
- package/lib/components/svg/styled/svg_styled_types.d.ts.map +1 -0
- package/lib/components/svg/styled/svg_styled_types.js +2 -0
- package/lib/components/svg/styled/svg_styled_types.js.map +1 -0
- package/lib/components/svg/styled/svg_styled_utils.d.ts +3 -0
- package/lib/components/svg/styled/svg_styled_utils.d.ts.map +1 -0
- package/lib/components/svg/styled/svg_styled_utils.js +10 -0
- package/lib/components/svg/styled/svg_styled_utils.js.map +1 -0
- package/lib/components/table/reorder_rows/use_drop_monitor.d.ts.map +1 -1
- package/lib/components/table/reorder_rows/use_drop_monitor.js +33 -32
- package/lib/components/table/reorder_rows/use_drop_monitor.js.map +1 -1
- package/lib/components/toolbar/PanelPreferencesToolbar.js +1 -1
- package/lib/components/toolbar/Toolbar.d.ts.map +1 -1
- package/lib/components/toolbar/Toolbar.js +5 -4
- package/lib/components/toolbar/Toolbar.js.map +1 -1
- package/lib/components/toolbar/TooltipHelpContent.js +3 -3
- package/package.json +36 -35
- package/src/components/accordion/accordion.tsx +1 -1
- package/src/components/color-picker/react-color/ColorPicker.tsx +8 -6
- package/src/components/doi/doi.tsx +2 -2
- package/src/components/doi/{Logo.tsx → doi_logo.tsx} +9 -5
- package/src/components/form/components/input/checkbox.tsx +23 -6
- package/src/components/form/components/input/input.tsx +35 -15
- package/src/components/form/components/input/numeric_input.tsx +30 -15
- package/src/components/form/components/input/select.tsx +24 -17
- package/src/components/form/components/input/switch.tsx +27 -5
- package/src/components/form/components/input_groups/form.tsx +32 -0
- package/src/components/form/components/input_groups/form_group.tsx +126 -0
- package/src/components/form/components/input_groups/select.tsx +25 -46
- package/src/components/form/components/layout/Section.tsx +57 -0
- package/src/components/form/context/use_ts_form.ts +2 -0
- package/src/components/index.ts +1 -0
- package/src/components/info-panel/InfoPanel.tsx +4 -3
- package/src/components/input/radio-button-group/RadioButton.tsx +4 -4
- package/src/components/input/radio-button-group/RadioButtonGroup.tsx +2 -2
- package/src/components/root-layout/css-reset/customPreflight.ts +1 -1
- package/src/components/split_pane/use_split_pane_size.tsx +54 -53
- package/src/components/svg/index.ts +4 -0
- package/src/components/svg/styled/svg_styled_line.tsx +27 -0
- package/src/components/svg/styled/svg_styled_path.tsx +29 -0
- package/src/components/svg/styled/svg_styled_text.tsx +12 -0
- package/src/components/svg/styled/svg_styled_types.ts +67 -0
- package/src/components/svg/styled/svg_styled_utils.ts +15 -0
- package/src/components/table/reorder_rows/use_drop_monitor.ts +41 -38
- package/src/components/toolbar/PanelPreferencesToolbar.tsx +1 -1
- package/src/components/toolbar/Toolbar.tsx +7 -4
- package/src/components/toolbar/TooltipHelpContent.tsx +3 -3
- package/lib/components/doi/Logo.d.ts +0 -6
- package/lib/components/doi/Logo.d.ts.map +0 -1
- package/lib/components/doi/Logo.js +0 -16
- package/lib/components/doi/Logo.js.map +0 -1
- package/lib/components/form/components/hooks/use_input_id.d.ts +0 -8
- package/lib/components/form/components/hooks/use_input_id.d.ts.map +0 -1
- package/lib/components/form/components/hooks/use_input_id.js +0 -15
- package/lib/components/form/components/hooks/use_input_id.js.map +0 -1
- package/lib/components/form/components/input_groups/input.d.ts +0 -20
- package/lib/components/form/components/input_groups/input.d.ts.map +0 -1
- package/lib/components/form/components/input_groups/input.js +0 -9
- package/lib/components/form/components/input_groups/input.js.map +0 -1
- package/src/components/form/components/hooks/use_input_id.ts +0 -19
- package/src/components/form/components/input_groups/input.tsx +0 -63
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg_styled_types.js","sourceRoot":"","sources":["../../../../src/components/svg/styled/svg_styled_types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg_styled_utils.d.ts","sourceRoot":"","sources":["../../../../src/components/svg/styled/svg_styled_utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAExE,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,0BAA0B,EACnC,KAAK,EAAE,MAAM,GACZ,MAAM,CAOR"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { match } from 'ts-pattern';
|
|
2
|
+
export function computeStrokeDasharray(pattern, width) {
|
|
3
|
+
return match(pattern)
|
|
4
|
+
.with('solid', () => '')
|
|
5
|
+
.with('dashed', () => `${4 * width} ${4 * width}`)
|
|
6
|
+
.with('dotted', () => `${width} ${width}`)
|
|
7
|
+
.with('dashed-dot', () => `${4 * width} ${width} ${width} ${width}`)
|
|
8
|
+
.exhaustive();
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=svg_styled_utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"svg_styled_utils.js","sourceRoot":"","sources":["../../../../src/components/svg/styled/svg_styled_utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAInC,MAAM,UAAU,sBAAsB,CACpC,OAAmC,EACnC,KAAa;IAEb,OAAO,KAAK,CAAC,OAAO,CAAC;SAClB,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC;SACvB,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC;SACjD,IAAI,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,GAAG,KAAK,IAAI,KAAK,EAAE,CAAC;SACzC,IAAI,CAAC,YAAY,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;SACnE,UAAU,EAAE,CAAC;AAClB,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,
|
|
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"}
|
|
@@ -14,41 +14,42 @@ export function useDropMonitor(scrollElementRef, enabled) {
|
|
|
14
14
|
const { reorderItem, items } = useItemOrder();
|
|
15
15
|
const [, setFlashedRow] = useFlashedRowContext();
|
|
16
16
|
useEffect(() => {
|
|
17
|
+
if (!enabled) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
17
20
|
const scrollContainer = scrollElementRef.current;
|
|
18
21
|
assert(scrollContainer, 'Missing scroll container ref');
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return isItemData(source.data);
|
|
22
|
-
}
|
|
23
|
-
return combine(monitorForElements({
|
|
24
|
-
canMonitor: canRespond,
|
|
25
|
-
onDrop({ location, source }) {
|
|
26
|
-
const target = location.current.dropTargets[0];
|
|
27
|
-
if (!target) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const sourceData = source.data;
|
|
31
|
-
const targetData = target.data;
|
|
32
|
-
if (!isItemData(sourceData) || !isItemData(targetData)) {
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
const indexOfTarget = items.findIndex((item) => item.id === targetData.id);
|
|
36
|
-
if (indexOfTarget === -1) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const closestEdgeOfTarget = extractClosestEdge(targetData);
|
|
40
|
-
reorderItem({
|
|
41
|
-
startIndex: sourceData.index,
|
|
42
|
-
indexOfTarget,
|
|
43
|
-
closestEdgeOfTarget,
|
|
44
|
-
});
|
|
45
|
-
setFlashedRow(sourceData.id);
|
|
46
|
-
},
|
|
47
|
-
}), autoScrollForElements({
|
|
48
|
-
canScroll: canRespond,
|
|
49
|
-
element: scrollContainer,
|
|
50
|
-
}));
|
|
22
|
+
function canRespond({ source }) {
|
|
23
|
+
return isItemData(source.data);
|
|
51
24
|
}
|
|
25
|
+
return combine(monitorForElements({
|
|
26
|
+
canMonitor: canRespond,
|
|
27
|
+
onDrop({ location, source }) {
|
|
28
|
+
const target = location.current.dropTargets[0];
|
|
29
|
+
if (!target) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const sourceData = source.data;
|
|
33
|
+
const targetData = target.data;
|
|
34
|
+
if (!isItemData(sourceData) || !isItemData(targetData)) {
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
const indexOfTarget = items.findIndex((item) => item.id === targetData.id);
|
|
38
|
+
if (indexOfTarget === -1) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const closestEdgeOfTarget = extractClosestEdge(targetData);
|
|
42
|
+
reorderItem({
|
|
43
|
+
startIndex: sourceData.index,
|
|
44
|
+
indexOfTarget,
|
|
45
|
+
closestEdgeOfTarget,
|
|
46
|
+
});
|
|
47
|
+
setFlashedRow(sourceData.id);
|
|
48
|
+
},
|
|
49
|
+
}), autoScrollForElements({
|
|
50
|
+
canScroll: canRespond,
|
|
51
|
+
element: scrollContainer,
|
|
52
|
+
}));
|
|
52
53
|
}, [items, reorderItem, scrollElementRef, setFlashedRow, enabled]);
|
|
53
54
|
}
|
|
54
55
|
//# sourceMappingURL=use_drop_monitor.js.map
|
|
@@ -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;AAElC,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,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,EAAE,GAAG,YAAY,EAAE,CAAC;IAC9C,MAAM,CAAC,EAAE,aAAa,CAAC,GAAG,oBAAoB,EAAE,CAAC;IACjD,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,eAAe,GAAG,gBAAgB,CAAC,OAAO,CAAC;QACjD,MAAM,CAAC,eAAe,EAAE,8BAA8B,CAAC,CAAC;QAExD,
|
|
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;AAElC,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAs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C,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IAClC,YAAY,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;CACvC;AAMD,MAAM,WAAW,uBACf,SAAQ,IAAI,CAAC,YAAY,EAAE,aAAa,CAAC;IACzC,SAAS,EAAE,gBAAgB,CAAC;CAC7B;AAqBD,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,2CAkE1C;yBAlEe,OAAO;;6BA6Jd,uBAAuB;;AAzFhC,iBAAS,WAAW,CAAC,KAAK,EAAE,gBAAgB,2CAE3C"}
|
|
@@ -53,11 +53,12 @@ export function Toolbar(props) {
|
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
const element = ref.current;
|
|
56
|
-
if (element) {
|
|
57
|
-
|
|
58
|
-
observer.observe(element);
|
|
59
|
-
return () => observer.unobserve(element);
|
|
56
|
+
if (!element) {
|
|
57
|
+
return;
|
|
60
58
|
}
|
|
59
|
+
const observer = new ResizeObserver(update);
|
|
60
|
+
observer.observe(element);
|
|
61
|
+
return () => observer.unobserve(element);
|
|
61
62
|
}, [vertical]);
|
|
62
63
|
return (_jsx(ToolbarProvider, { value: contextValue, children: _jsx(ButtonGroup, { ref: ref, vertical: vertical, variant: "minimal", style: {
|
|
63
64
|
flexWrap: 'wrap',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toolbar.js","sourceRoot":"","sources":["../../../src/components/toolbar/Toolbar.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,MAAM,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,CAAC,IAAI,GAAG,WAAW,CAAC;AAE3B,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,CAAC,CAAA;KACjC,OAAO,CAAC,IAAI;aACJ,MAAM,CAAC,UAAU;;CAE7B,CAAC;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,kBAAkB,CAC/C,KAA8B;IAE9B,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,GAAG,KAAK,CAAC;IACtC,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,sBAAsB,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAE3E,OAAO,CACL,KAAC,cAAc,IACb,OAAO,QACP,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,EACpD,eAAe,EAAE,sBAAsB,EACvC,WAAW,EAAE,sBAAsB,KAAK,OAAO,EAC/C,eAAe,EAAE,CAAC,EAClB,YAAY,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,WAAW,EAAE,EAAE,EAAE,CAAC,CACvD,kBAAU,WAAW,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,YAChD,KAAC,mBAAmB,IAAC,SAAS,WAAK,SAAS,GAAI,GAC3C,CACR,KACG,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,eAAe,CAAC,KAGxB;IACC,OAAO,CACL,KAAC,cAAc,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,CAAC,KAAK,YACxC,KAAK,CAAC,QAAQ,GACS,CAC3B,CAAC;AACJ,CAAC"}
|
|
@@ -36,7 +36,7 @@ const SubTitleItem = styled.div `
|
|
|
36
36
|
padding-left: 15px;
|
|
37
37
|
box-sizing: border-box;
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
::before {
|
|
40
40
|
position: absolute;
|
|
41
41
|
top: ${shortcutBoxSize / 2}rem;
|
|
42
42
|
left: 0;
|
|
@@ -47,7 +47,7 @@ const SubTitleItem = styled.div `
|
|
|
47
47
|
border-bottom: 1px solid;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
::after {
|
|
51
51
|
position: absolute;
|
|
52
52
|
top: 0;
|
|
53
53
|
bottom: 0;
|
|
@@ -58,7 +58,7 @@ const SubTitleItem = styled.div `
|
|
|
58
58
|
border-left: 1px solid;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
:last-child::after {
|
|
62
62
|
height: ${shortcutBoxSize / 2}rem;
|
|
63
63
|
}
|
|
64
64
|
`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-science",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.3.0",
|
|
4
4
|
"description": "React components to build scientific applications UI",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -56,58 +56,59 @@
|
|
|
56
56
|
"react-dom": ">=18.0.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@atlaskit/pragmatic-drag-and-drop": "^1.7.
|
|
60
|
-
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.
|
|
59
|
+
"@atlaskit/pragmatic-drag-and-drop": "^1.7.7",
|
|
60
|
+
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.2",
|
|
61
61
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
62
62
|
"@emotion/styled": "^11.14.1",
|
|
63
63
|
"@radix-ui/react-use-controllable-state": "^1.2.2",
|
|
64
|
-
"@tanstack/react-form": "^1.
|
|
64
|
+
"@tanstack/react-form": "^1.23.6",
|
|
65
65
|
"@tanstack/react-table": "^8.21.3",
|
|
66
66
|
"@tanstack/react-virtual": "^3.13.12",
|
|
67
67
|
"d3-scale-chromatic": "^3.1.0",
|
|
68
|
-
"react-d3-utils": "^3.1.
|
|
68
|
+
"react-d3-utils": "^3.1.2",
|
|
69
69
|
"react-dropzone": "^14.3.8",
|
|
70
70
|
"react-full-screen": "^1.1.1",
|
|
71
71
|
"react-icons": "^5.5.0",
|
|
72
|
-
"react-inspector": "^
|
|
72
|
+
"react-inspector": "^9.0.0",
|
|
73
73
|
"tinycolor2": "^1.6.0",
|
|
74
|
-
"ts-pattern": "^5.
|
|
75
|
-
"zod": "^4.
|
|
74
|
+
"ts-pattern": "^5.8.0",
|
|
75
|
+
"zod": "^4.1.12"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@blueprintjs/core": "6.0.0",
|
|
79
79
|
"@blueprintjs/icons": "6.0.0",
|
|
80
80
|
"@blueprintjs/select": "6.0.0",
|
|
81
|
-
"@floating-ui/react": "^0.27.
|
|
82
|
-
"@playwright/experimental-ct-react": "^1.
|
|
83
|
-
"@playwright/test": "^1.
|
|
84
|
-
"@storybook/addon-docs": "^9.
|
|
85
|
-
"@storybook/react-vite": "^9.
|
|
86
|
-
"@tanstack/react-query": "^5.
|
|
81
|
+
"@floating-ui/react": "^0.27.16",
|
|
82
|
+
"@playwright/experimental-ct-react": "^1.56.0",
|
|
83
|
+
"@playwright/test": "^1.56.0",
|
|
84
|
+
"@storybook/addon-docs": "^9.1.10",
|
|
85
|
+
"@storybook/react-vite": "^9.1.10",
|
|
86
|
+
"@tanstack/react-query": "^5.90.2",
|
|
87
87
|
"@types/babel__core": "^7.20.5",
|
|
88
88
|
"@types/d3-scale-chromatic": "^3.1.0",
|
|
89
|
-
"@types/node": "^24.0
|
|
89
|
+
"@types/node": "^24.7.0",
|
|
90
90
|
"@types/react": "^18.3.12",
|
|
91
91
|
"@types/react-dom": "^18.3.1",
|
|
92
92
|
"@types/tinycolor2": "^1.4.6",
|
|
93
|
-
"@vitejs/plugin-react": "^
|
|
93
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
94
94
|
"@vitest/coverage-v8": "^3.2.4",
|
|
95
|
+
"@zakodium/tsconfig": "^1.0.2",
|
|
95
96
|
"biologic-converter": "^0.6.0",
|
|
96
97
|
"cheminfo-font": "^1.13.1",
|
|
97
98
|
"cheminfo-types": "^1.8.1",
|
|
98
|
-
"cross-env": "^
|
|
99
|
-
"eslint": "^9.
|
|
100
|
-
"eslint-config-zakodium": "^
|
|
101
|
-
"eslint-plugin-storybook": "^9.
|
|
102
|
-
"fifo-logger": "^2.0.
|
|
99
|
+
"cross-env": "^10.1.0",
|
|
100
|
+
"eslint": "^9.37.0",
|
|
101
|
+
"eslint-config-zakodium": "^17.0.0",
|
|
102
|
+
"eslint-plugin-storybook": "^9.1.10",
|
|
103
|
+
"fifo-logger": "^2.0.1",
|
|
103
104
|
"filelist-utils": "^1.11.3",
|
|
104
|
-
"immer": "^10.1.
|
|
105
|
-
"jcampconverter": "^11.0
|
|
106
|
-
"ml-gsd": "^13.0
|
|
105
|
+
"immer": "^10.1.3",
|
|
106
|
+
"jcampconverter": "^11.1.0",
|
|
107
|
+
"ml-gsd": "^13.1.0",
|
|
107
108
|
"ml-peak-shape-generator": "^4.2.0",
|
|
108
|
-
"ml-signal-processing": "^2.
|
|
109
|
-
"ml-spectra-processing": "^14.
|
|
110
|
-
"ms-spectrum": "^3.9.
|
|
109
|
+
"ml-signal-processing": "^2.1.0",
|
|
110
|
+
"ml-spectra-processing": "^14.18.0",
|
|
111
|
+
"ms-spectrum": "^3.9.2",
|
|
111
112
|
"netcdfjs": "^3.0.0",
|
|
112
113
|
"postcss-styled-syntax": "^0.7.1",
|
|
113
114
|
"prettier": "^3.6.2",
|
|
@@ -115,20 +116,20 @@
|
|
|
115
116
|
"react-dom": "^18.3.1",
|
|
116
117
|
"react-error-boundary": "^6.0.0",
|
|
117
118
|
"react-kbs": "^2.1.1",
|
|
118
|
-
"react-ocl": "^8.
|
|
119
|
-
"react-plot": "^3.1.
|
|
119
|
+
"react-ocl": "^8.2.0",
|
|
120
|
+
"react-plot": "^3.1.1",
|
|
120
121
|
"rimraf": "^6.0.1",
|
|
121
122
|
"spc-parser": "^1.0.0",
|
|
122
|
-
"storybook": "^9.
|
|
123
|
-
"stylelint": "^16.
|
|
124
|
-
"stylelint-config-standard": "^
|
|
125
|
-
"typescript": "^5.
|
|
126
|
-
"vite": "^7.
|
|
123
|
+
"storybook": "^9.1.10",
|
|
124
|
+
"stylelint": "^16.25.0",
|
|
125
|
+
"stylelint-config-standard": "^39.0.1",
|
|
126
|
+
"typescript": "^5.9.3",
|
|
127
|
+
"vite": "^7.1.9",
|
|
127
128
|
"vitest": "^3.2.4",
|
|
128
129
|
"wdf-parser": "^0.3.0"
|
|
129
130
|
},
|
|
130
131
|
"volta": {
|
|
131
|
-
"node": "24.
|
|
132
|
+
"node": "24.9.0"
|
|
132
133
|
},
|
|
133
134
|
"overrides": {
|
|
134
135
|
"storybook": "$storybook"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CSSProperties } from 'react';
|
|
2
|
-
import { useCallback,
|
|
2
|
+
import { useCallback, useRef, useState } from 'react';
|
|
3
3
|
|
|
4
4
|
import { debounce } from '../../utils/index.js';
|
|
5
5
|
import { defaultColorPalette } from '../palette.js';
|
|
@@ -152,17 +152,19 @@ export function ColorPicker(props: ColorPickerProps) {
|
|
|
152
152
|
style = {},
|
|
153
153
|
} = props;
|
|
154
154
|
|
|
155
|
-
const [state, setState] = useState(colorHelper.toState(color, 0));
|
|
156
|
-
|
|
157
155
|
const debounceRef = useRef(
|
|
158
156
|
debounce((fn: any, data: ChangeCallbackProps, event: Event) => {
|
|
159
157
|
fn(data, event);
|
|
160
158
|
}, 100),
|
|
161
159
|
);
|
|
162
160
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
161
|
+
const [state, setState] = useState(() => colorHelper.toState(color, 0));
|
|
162
|
+
|
|
163
|
+
const [previousColor, setPreviousColor] = useState(color);
|
|
164
|
+
if (color !== previousColor) {
|
|
165
|
+
setPreviousColor(color);
|
|
166
|
+
setState(colorHelper.toState(color, 0));
|
|
167
|
+
}
|
|
166
168
|
|
|
167
169
|
const handleChange = useCallback(
|
|
168
170
|
(data: any, event: any) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { match } from 'ts-pattern';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { DoiLogo } from './doi_logo.js';
|
|
4
4
|
import { normalizeDOI } from './utils.js';
|
|
5
5
|
|
|
6
6
|
type DOISize = 'small' | 'medium' | 'large';
|
|
@@ -21,7 +21,7 @@ export function DOI(props: DOIProps) {
|
|
|
21
21
|
target="_blank"
|
|
22
22
|
rel="noreferrer"
|
|
23
23
|
>
|
|
24
|
-
<
|
|
24
|
+
<DoiLogo size={getDOISize(size)} />
|
|
25
25
|
</a>
|
|
26
26
|
);
|
|
27
27
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from '@emotion/styled';
|
|
2
2
|
|
|
3
|
-
const
|
|
3
|
+
const DoiLogoSvg = styled.svg<{ size: string }>`
|
|
4
4
|
display: inline-flex;
|
|
5
5
|
${(props) => {
|
|
6
6
|
return `
|
|
@@ -10,15 +10,19 @@ const Svg = styled.svg<{ size: string }>`
|
|
|
10
10
|
}}
|
|
11
11
|
`;
|
|
12
12
|
|
|
13
|
-
interface
|
|
13
|
+
interface DoiLogoProps {
|
|
14
14
|
size: string;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export function
|
|
17
|
+
export function DoiLogo(props: DoiLogoProps) {
|
|
18
18
|
const { size } = props;
|
|
19
19
|
|
|
20
20
|
return (
|
|
21
|
-
<
|
|
21
|
+
<DoiLogoSvg
|
|
22
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
23
|
+
viewBox="0 0 130 130"
|
|
24
|
+
size={size}
|
|
25
|
+
>
|
|
22
26
|
<circle fill="#fcb425" cx="65" cy="65" r="64" />
|
|
23
27
|
<path
|
|
24
28
|
fill="##231f20"
|
|
@@ -28,6 +32,6 @@ export function Logo(props: LogoProps) {
|
|
|
28
32
|
fill="#fff"
|
|
29
33
|
d="m 105.42764,25.617918 c -1.97184,0 -3.64919,0.69142 -5.03204,2.074271 -1.357247,1.357245 -2.035864,3.021779 -2.035864,4.993633 0,1.971835 0.678617,3.649193 2.035864,5.032034 1.38285,1.382861 3.0602,2.074281 5.03204,2.074281 1.99744,0 3.67479,-0.678627 5.03203,-2.035861 1.38285,-1.382861 2.07428,-3.073012 2.07428,-5.070454 0,-1.971854 -0.69143,-3.636388 -2.07428,-4.993633 -1.38285,-1.382851 -3.0602,-2.074271 -5.03203,-2.074271 z M 74.219383,45.507921 c -7.323992,0 -12.970625,2.283009 -16.939921,6.848949 -3.277876,3.782438 -4.916803,8.118252 -4.916803,13.008406 0,5.430481 1.626124,10.009834 4.878383,13.738236 3.943689,4.538918 9.475093,6.808622 16.59421,6.808622 7.093512,0 12.612122,-2.269704 16.555801,-6.808622 3.252259,-3.728402 4.878393,-8.1993 4.878393,-13.413648 0,-5.160323 -1.638938,-9.604602 -4.916803,-13.332994 -4.020509,-4.56594 -9.398263,-6.848949 -16.13326,-6.848949 z m 24.908603,1.386686 0,37.634676 12.599304,0 0,-37.634676 -12.599304,0 z M 73.835252,56.975981 c 2.304752,0 4.263793,0.852337 5.877124,2.554426 1.638928,1.675076 2.458402,3.727881 2.458402,6.159457 0,2.458578 -0.806671,4.538022 -2.419992,6.240111 -1.613331,1.675086 -3.585175,2.514099 -5.915534,2.514099 -2.612051,0 -4.737546,-1.027366 -6.376474,-3.080682 -1.331637,-1.648053 -1.997451,-3.539154 -1.997451,-5.673528 0,-2.107362 0.665814,-3.985138 1.997451,-5.633201 1.638928,-2.053316 3.764423,-3.080682 6.376474,-3.080682 z"
|
|
30
34
|
/>
|
|
31
|
-
</
|
|
35
|
+
</DoiLogoSvg>
|
|
32
36
|
);
|
|
33
37
|
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import type { CheckboxProps as BPCheckboxProps } from '@blueprintjs/core';
|
|
2
|
-
import { Checkbox as BPCheckbox
|
|
2
|
+
import { Checkbox as BPCheckbox } from '@blueprintjs/core';
|
|
3
|
+
import styled from '@emotion/styled';
|
|
3
4
|
import type { ChangeEvent } from 'react';
|
|
4
5
|
|
|
5
6
|
import { useFieldContext } from '../../context/use_ts_form.js';
|
|
6
7
|
import { getIntent } from '../../utils/use_intent.js';
|
|
8
|
+
import { FormGroup } from '../input_groups/form_group.js';
|
|
7
9
|
|
|
8
|
-
type CheckboxProps = Omit<BPCheckboxProps, 'defaultChecked' | 'name'
|
|
10
|
+
type CheckboxProps = Omit<BPCheckboxProps, 'defaultChecked' | 'name'> & {
|
|
11
|
+
helpText?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
// Keep the margin top for space between inputs. But remove the margin bottom for helperText
|
|
15
|
+
const StyledCheckbox = styled(BPCheckbox)<CheckboxProps>`
|
|
16
|
+
margin-bottom: 0 !important;
|
|
17
|
+
width: fit-content;
|
|
18
|
+
`;
|
|
9
19
|
|
|
10
20
|
export function Checkbox(props: CheckboxProps) {
|
|
11
|
-
const {
|
|
21
|
+
const { helpText, label } = props;
|
|
12
22
|
const field = useFieldContext<boolean>();
|
|
13
23
|
const error = field
|
|
14
24
|
.getMeta()
|
|
@@ -23,13 +33,20 @@ export function Checkbox(props: CheckboxProps) {
|
|
|
23
33
|
}
|
|
24
34
|
|
|
25
35
|
return (
|
|
26
|
-
<FormGroup
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
<FormGroup
|
|
37
|
+
name={field.name}
|
|
38
|
+
intent={intent}
|
|
39
|
+
error={error}
|
|
40
|
+
fullWidth
|
|
41
|
+
helpText={helpText}
|
|
42
|
+
>
|
|
43
|
+
<StyledCheckbox
|
|
44
|
+
label={label}
|
|
29
45
|
name={field.name}
|
|
30
46
|
value={String(field.state.value)}
|
|
31
47
|
onChange={onChange}
|
|
32
48
|
onBlur={field.handleBlur}
|
|
49
|
+
defaultChecked={field.state.value}
|
|
33
50
|
/>
|
|
34
51
|
</FormGroup>
|
|
35
52
|
);
|
|
@@ -1,17 +1,25 @@
|
|
|
1
|
+
import { InputGroup } from '@blueprintjs/core';
|
|
1
2
|
import type { ChangeEvent } from 'react';
|
|
2
3
|
|
|
3
4
|
import { useFieldContext } from '../../context/use_ts_form.js';
|
|
4
|
-
import {
|
|
5
|
+
import type { FormGroupInputProps } from '../input_groups/form_group.js';
|
|
6
|
+
import { FormGroup } from '../input_groups/form_group.js';
|
|
5
7
|
|
|
6
|
-
interface InputProps {
|
|
7
|
-
|
|
8
|
-
inline?: boolean;
|
|
9
|
-
required?: boolean;
|
|
10
|
-
placeholder?: string;
|
|
8
|
+
interface InputProps extends FormGroupInputProps {
|
|
9
|
+
type?: string;
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
export function Input(props: InputProps) {
|
|
14
|
-
const {
|
|
13
|
+
const {
|
|
14
|
+
label,
|
|
15
|
+
required,
|
|
16
|
+
placeholder,
|
|
17
|
+
type = 'text',
|
|
18
|
+
helpText,
|
|
19
|
+
layout,
|
|
20
|
+
fullWidth,
|
|
21
|
+
} = props;
|
|
22
|
+
|
|
15
23
|
const field = useFieldContext<string>();
|
|
16
24
|
const error = field
|
|
17
25
|
.getMeta()
|
|
@@ -23,15 +31,27 @@ export function Input(props: InputProps) {
|
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
return (
|
|
26
|
-
<
|
|
34
|
+
<FormGroup
|
|
35
|
+
name={field.name}
|
|
36
|
+
label={label}
|
|
37
|
+
intent={error ? 'danger' : 'none'}
|
|
27
38
|
required={required}
|
|
28
39
|
error={error}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
helpText={helpText}
|
|
41
|
+
layout={layout}
|
|
42
|
+
fullWidth={fullWidth}
|
|
43
|
+
>
|
|
44
|
+
<InputGroup
|
|
45
|
+
id={field.name}
|
|
46
|
+
name={field.name}
|
|
47
|
+
required={required}
|
|
48
|
+
type={type}
|
|
49
|
+
onChange={onChange}
|
|
50
|
+
onBlur={field.handleBlur}
|
|
51
|
+
intent={error ? 'danger' : 'none'}
|
|
52
|
+
value={field.state.value}
|
|
53
|
+
placeholder={placeholder}
|
|
54
|
+
/>
|
|
55
|
+
</FormGroup>
|
|
36
56
|
);
|
|
37
57
|
}
|
|
@@ -1,20 +1,30 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { FormGroup, NumericInput as BPNumericInput } from '@blueprintjs/core';
|
|
1
|
+
import { NumericInput as BPNumericInput } from '@blueprintjs/core';
|
|
3
2
|
|
|
4
3
|
import { useFieldContext } from '../../context/use_ts_form.js';
|
|
5
|
-
import { useFieldId } from '../../utils/use_field_id.js';
|
|
6
4
|
import { getIntent } from '../../utils/use_intent.js';
|
|
5
|
+
import type { FormGroupInputProps } from '../input_groups/form_group.js';
|
|
6
|
+
import { FormGroup } from '../input_groups/form_group.js';
|
|
7
7
|
|
|
8
|
-
interface NumericInputProps
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
interface NumericInputProps extends FormGroupInputProps {
|
|
9
|
+
step?: number;
|
|
10
|
+
min?: number;
|
|
11
|
+
max?: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export function NumericInput(props: NumericInputProps) {
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
label,
|
|
17
|
+
required,
|
|
18
|
+
helpText,
|
|
19
|
+
placeholder,
|
|
20
|
+
step,
|
|
21
|
+
min,
|
|
22
|
+
max,
|
|
23
|
+
layout,
|
|
24
|
+
fullWidth,
|
|
25
|
+
} = props;
|
|
26
|
+
|
|
16
27
|
const field = useFieldContext<string>();
|
|
17
|
-
const id = useFieldId(field.name);
|
|
18
28
|
const error = field
|
|
19
29
|
.getMeta()
|
|
20
30
|
.errors.map((e) => e.message)
|
|
@@ -28,21 +38,26 @@ export function NumericInput(props: NumericInputProps) {
|
|
|
28
38
|
|
|
29
39
|
return (
|
|
30
40
|
<FormGroup
|
|
31
|
-
|
|
41
|
+
name={field.name}
|
|
32
42
|
label={label}
|
|
33
|
-
labelFor={id}
|
|
34
43
|
intent={intent}
|
|
35
|
-
|
|
44
|
+
required={required}
|
|
45
|
+
helpText={helpText}
|
|
46
|
+
layout={layout}
|
|
47
|
+
error={error}
|
|
48
|
+
fullWidth={fullWidth}
|
|
36
49
|
>
|
|
37
50
|
<BPNumericInput
|
|
38
|
-
{
|
|
51
|
+
id={field.name}
|
|
39
52
|
name={field.name}
|
|
53
|
+
stepSize={step}
|
|
54
|
+
min={min}
|
|
55
|
+
max={max}
|
|
40
56
|
value={field.state.value ?? ''}
|
|
41
57
|
onValueChange={onChange}
|
|
42
58
|
intent={intent}
|
|
59
|
+
placeholder={placeholder}
|
|
43
60
|
required={required}
|
|
44
|
-
id={id}
|
|
45
|
-
onBlur={field.handleBlur}
|
|
46
61
|
/>
|
|
47
62
|
</FormGroup>
|
|
48
63
|
);
|