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,27 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { SVGStyledLineUserConfig } from './svg_styled_types.js';
|
|
4
|
+
import { computeStrokeDasharray } from './svg_styled_utils.js';
|
|
5
|
+
|
|
6
|
+
export interface SVGStyledLineProps
|
|
7
|
+
extends Omit<SVGProps<SVGLineElement>, keyof SVGStyledLineUserConfig>,
|
|
8
|
+
SVGStyledLineUserConfig {}
|
|
9
|
+
|
|
10
|
+
export function SVGStyledLine(props: SVGStyledLineProps) {
|
|
11
|
+
const {
|
|
12
|
+
stroke = '#000000',
|
|
13
|
+
strokeOpacity = 1,
|
|
14
|
+
strokeWidth = 1,
|
|
15
|
+
strokeDasharray = 'solid',
|
|
16
|
+
...otherProps
|
|
17
|
+
} = props;
|
|
18
|
+
return (
|
|
19
|
+
<line
|
|
20
|
+
{...otherProps}
|
|
21
|
+
stroke={stroke}
|
|
22
|
+
strokeOpacity={strokeOpacity}
|
|
23
|
+
strokeWidth={strokeWidth}
|
|
24
|
+
strokeDasharray={computeStrokeDasharray(strokeDasharray, strokeWidth)}
|
|
25
|
+
/>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { SVGStyledLineUserConfig } from './svg_styled_types.js';
|
|
4
|
+
import { computeStrokeDasharray } from './svg_styled_utils.js';
|
|
5
|
+
|
|
6
|
+
export interface SVGStyledPathProps
|
|
7
|
+
extends Omit<SVGProps<SVGPathElement>, keyof SVGStyledLineUserConfig>,
|
|
8
|
+
SVGStyledLineUserConfig {}
|
|
9
|
+
|
|
10
|
+
export function SVGStyledPath(props: SVGStyledPathProps) {
|
|
11
|
+
const {
|
|
12
|
+
fillOpacity = 0,
|
|
13
|
+
stroke = '#000000',
|
|
14
|
+
strokeOpacity = 1,
|
|
15
|
+
strokeWidth = 1,
|
|
16
|
+
strokeDasharray = 'solid',
|
|
17
|
+
...otherProps
|
|
18
|
+
} = props;
|
|
19
|
+
return (
|
|
20
|
+
<path
|
|
21
|
+
{...otherProps}
|
|
22
|
+
fillOpacity={fillOpacity}
|
|
23
|
+
stroke={stroke}
|
|
24
|
+
strokeOpacity={strokeOpacity}
|
|
25
|
+
strokeWidth={strokeWidth}
|
|
26
|
+
strokeDasharray={computeStrokeDasharray(strokeDasharray, strokeWidth)}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
import type { SVGStyledTextUserConfig } from './svg_styled_types.js';
|
|
4
|
+
|
|
5
|
+
export interface SVGStyledTextProps
|
|
6
|
+
extends Omit<SVGProps<SVGTextElement>, keyof SVGStyledTextUserConfig>,
|
|
7
|
+
SVGStyledTextUserConfig {}
|
|
8
|
+
|
|
9
|
+
export function SVGStyledText(props: SVGStyledTextProps) {
|
|
10
|
+
const { fontWeight = 'normal', fontStyle = 'normal', ...otherProps } = props;
|
|
11
|
+
return <text {...otherProps} fontWeight={fontWeight} fontStyle={fontStyle} />;
|
|
12
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export type SVGStyledLineStrokePattern =
|
|
2
|
+
| 'solid'
|
|
3
|
+
| 'dashed'
|
|
4
|
+
| 'dotted'
|
|
5
|
+
| 'dashed-dot';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* SVG line styles that can be controlled by the user.
|
|
9
|
+
*/
|
|
10
|
+
export interface SVGStyledLineUserConfig {
|
|
11
|
+
/**
|
|
12
|
+
* Line color.
|
|
13
|
+
* @default '#000000'
|
|
14
|
+
*/
|
|
15
|
+
stroke?: string;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Line opacity.
|
|
19
|
+
* Range: [0, 1]
|
|
20
|
+
* @default 1
|
|
21
|
+
*/
|
|
22
|
+
strokeOpacity?: number;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Line width.
|
|
26
|
+
* Range: [0, ∞)
|
|
27
|
+
* @default 1
|
|
28
|
+
*/
|
|
29
|
+
strokeWidth?: number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Line stroke pattern.
|
|
33
|
+
* The `stroke-dasharray` attribute is computed from it and `strokeWidth`
|
|
34
|
+
* @default 'solid'
|
|
35
|
+
*/
|
|
36
|
+
strokeDasharray?: SVGStyledLineStrokePattern;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* SVG text styles that can be controlled by the user.
|
|
41
|
+
*/
|
|
42
|
+
export interface SVGStyledTextUserConfig {
|
|
43
|
+
/**
|
|
44
|
+
* Font color.
|
|
45
|
+
* @default inherit
|
|
46
|
+
*/
|
|
47
|
+
fill?: string;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Font size.
|
|
51
|
+
* Range: [0, ∞)
|
|
52
|
+
* @default inherit
|
|
53
|
+
*/
|
|
54
|
+
fontSize?: number;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Font weight.
|
|
58
|
+
* @default 'normal'
|
|
59
|
+
*/
|
|
60
|
+
fontWeight?: 'normal' | 'bold';
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Font style.
|
|
64
|
+
* @default 'normal'
|
|
65
|
+
*/
|
|
66
|
+
fontStyle?: 'normal' | 'italic';
|
|
67
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { match } from 'ts-pattern';
|
|
2
|
+
|
|
3
|
+
import type { SVGStyledLineStrokePattern } from './svg_styled_types.js';
|
|
4
|
+
|
|
5
|
+
export function computeStrokeDasharray(
|
|
6
|
+
pattern: SVGStyledLineStrokePattern,
|
|
7
|
+
width: number,
|
|
8
|
+
): string {
|
|
9
|
+
return match(pattern)
|
|
10
|
+
.with('solid', () => '')
|
|
11
|
+
.with('dashed', () => `${4 * width} ${4 * width}`)
|
|
12
|
+
.with('dotted', () => `${width} ${width}`)
|
|
13
|
+
.with('dashed-dot', () => `${4 * width} ${width} ${width} ${width}`)
|
|
14
|
+
.exhaustive();
|
|
15
|
+
}
|
|
@@ -27,50 +27,53 @@ export function useDropMonitor(
|
|
|
27
27
|
const { reorderItem, items } = useItemOrder();
|
|
28
28
|
const [, setFlashedRow] = useFlashedRowContext();
|
|
29
29
|
useEffect(() => {
|
|
30
|
+
if (!enabled) {
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
|
|
30
34
|
const scrollContainer = scrollElementRef.current;
|
|
31
35
|
assert(scrollContainer, 'Missing scroll container ref');
|
|
32
36
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
return combine(
|
|
38
|
-
monitorForElements({
|
|
39
|
-
canMonitor: canRespond,
|
|
40
|
-
onDrop({ location, source }) {
|
|
41
|
-
const target = location.current.dropTargets[0];
|
|
42
|
-
if (!target) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
37
|
+
function canRespond({ source }: { source: ElementDragPayload }) {
|
|
38
|
+
return isItemData(source.data);
|
|
39
|
+
}
|
|
45
40
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
41
|
+
return combine(
|
|
42
|
+
monitorForElements({
|
|
43
|
+
canMonitor: canRespond,
|
|
44
|
+
onDrop({ location, source }) {
|
|
45
|
+
const target = location.current.dropTargets[0];
|
|
46
|
+
if (!target) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
51
49
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
50
|
+
const sourceData = source.data;
|
|
51
|
+
const targetData = target.data;
|
|
52
|
+
if (!isItemData(sourceData) || !isItemData(targetData)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
58
55
|
|
|
59
|
-
|
|
56
|
+
const indexOfTarget = items.findIndex(
|
|
57
|
+
(item) => item.id === targetData.id,
|
|
58
|
+
);
|
|
59
|
+
if (indexOfTarget === -1) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
60
62
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
63
|
+
const closestEdgeOfTarget = extractClosestEdge(targetData);
|
|
64
|
+
|
|
65
|
+
reorderItem({
|
|
66
|
+
startIndex: sourceData.index,
|
|
67
|
+
indexOfTarget,
|
|
68
|
+
closestEdgeOfTarget,
|
|
69
|
+
});
|
|
70
|
+
setFlashedRow(sourceData.id);
|
|
71
|
+
},
|
|
72
|
+
}),
|
|
73
|
+
autoScrollForElements({
|
|
74
|
+
canScroll: canRespond,
|
|
75
|
+
element: scrollContainer,
|
|
76
|
+
}),
|
|
77
|
+
);
|
|
75
78
|
}, [items, reorderItem, scrollElementRef, setFlashedRow, enabled]);
|
|
76
79
|
}
|
|
@@ -98,6 +98,7 @@ export function Toolbar(props: ToolbarProps) {
|
|
|
98
98
|
if (!vertical) {
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
+
|
|
101
102
|
function update() {
|
|
102
103
|
const lastElement = ref.current?.lastElementChild;
|
|
103
104
|
if (!lastElement) {
|
|
@@ -113,11 +114,13 @@ export function Toolbar(props: ToolbarProps) {
|
|
|
113
114
|
}
|
|
114
115
|
|
|
115
116
|
const element = ref.current;
|
|
116
|
-
if (element) {
|
|
117
|
-
|
|
118
|
-
observer.observe(element);
|
|
119
|
-
return () => observer.unobserve(element);
|
|
117
|
+
if (!element) {
|
|
118
|
+
return;
|
|
120
119
|
}
|
|
120
|
+
|
|
121
|
+
const observer = new ResizeObserver(update);
|
|
122
|
+
observer.observe(element);
|
|
123
|
+
return () => observer.unobserve(element);
|
|
121
124
|
}, [vertical]);
|
|
122
125
|
|
|
123
126
|
return (
|
|
@@ -45,7 +45,7 @@ const SubTitleItem = styled.div`
|
|
|
45
45
|
padding-left: 15px;
|
|
46
46
|
box-sizing: border-box;
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
::before {
|
|
49
49
|
position: absolute;
|
|
50
50
|
top: ${shortcutBoxSize / 2}rem;
|
|
51
51
|
left: 0;
|
|
@@ -56,7 +56,7 @@ const SubTitleItem = styled.div`
|
|
|
56
56
|
border-bottom: 1px solid;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
::after {
|
|
60
60
|
position: absolute;
|
|
61
61
|
top: 0;
|
|
62
62
|
bottom: 0;
|
|
@@ -67,7 +67,7 @@ const SubTitleItem = styled.div`
|
|
|
67
67
|
border-left: 1px solid;
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
:last-child::after {
|
|
71
71
|
height: ${shortcutBoxSize / 2}rem;
|
|
72
72
|
}
|
|
73
73
|
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/doi/Logo.tsx"],"names":[],"mappings":"AAYA,UAAU,SAAS;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,2CAgBpC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import styled from '@emotion/styled';
|
|
3
|
-
const Svg = styled.svg `
|
|
4
|
-
display: inline-flex;
|
|
5
|
-
${(props) => {
|
|
6
|
-
return `
|
|
7
|
-
height: ${props.size};
|
|
8
|
-
width: ${props.size};
|
|
9
|
-
`;
|
|
10
|
-
}}
|
|
11
|
-
`;
|
|
12
|
-
export function Logo(props) {
|
|
13
|
-
const { size } = props;
|
|
14
|
-
return (_jsxs(Svg, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 130 130", size: size, children: [_jsx("circle", { fill: "#fcb425", cx: "65", cy: "65", r: "64" }), _jsx("path", { fill: "##231f20", d: "m 49.819127,84.559148 -11.854304,0 0,-4.825665 c -1.203594,1.510894 -4.035515,3.051053 -5.264716,3.742483 -2.151101,1.203585 -5.072066,1.987225 -7.812161,1.987225 -4.430246,0 -8.373925,-1.399539 -11.831057,-4.446924 -4.1229464,-3.636389 -6.0602455,-9.19576 -6.0602455,-15.188113 0,-6.094791 2.1126913,-10.960381 6.3380645,-14.59676 3.354695,-2.893745 7.457089,-5.209795 11.810505,-5.209795 2.535231,0 5.661807,0.227363 7.889738,1.302913 1.280414,0.614601 3.572628,2.060721 4.929872,3.469179 l 0,-25.420177 11.854304,0 z m -12.1199,-18.692584 c 0,-2.253538 -0.618258,-4.951555 -2.205973,-6.513663 -1.587724,-1.587724 -4.474153,-2.996182 -6.727691,-2.996182 -2.509615,0 -4.834476,1.825511 -6.447807,3.720535 -1.306031,1.536501 -1.959041,3.905269 -1.959041,5.877114 0,1.971835 0.740815,4.165004 2.046836,5.701505 1.587714,1.895025 3.297985,3.193739 5.833216,3.193739 2.279145,0 4.989965,-0.956662 6.552083,-2.51877 1.587714,-1.562108 2.908377,-4.185134 2.908377,-6.464278 z" }), _jsx("path", { fill: "#fff", 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" })] }));
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=Logo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/components/doi/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,GAAG,GAAG,MAAM,CAAC,GAAG,CAAkB;;IAEpC,CAAC,KAAK,EAAE,EAAE;IACV,OAAO;gBACK,KAAK,CAAC,IAAI;eACX,KAAK,CAAC,IAAI;KACpB,CAAC;AACJ,CAAC;CACF,CAAC;AAMF,MAAM,UAAU,IAAI,CAAC,KAAgB;IACnC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IAEvB,OAAO,CACL,MAAC,GAAG,IAAC,KAAK,EAAC,4BAA4B,EAAC,OAAO,EAAC,aAAa,EAAC,IAAI,EAAE,IAAI,aACtE,iBAAQ,IAAI,EAAC,SAAS,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,GAAG,EAChD,eACE,IAAI,EAAC,UAAU,EACf,CAAC,EAAC,48BAA48B,GAC98B,EACF,eACE,IAAI,EAAC,MAAM,EACX,CAAC,EAAC,w4CAAw4C,GAC14C,IACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use_input_id.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/hooks/use_input_id.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,UAAU,CACxB,EAAE,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAC7B,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,UAQhC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useId } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Generate an automatic id if needed, joined with name if truthy
|
|
4
|
-
*
|
|
5
|
-
* @param id
|
|
6
|
-
* @param name
|
|
7
|
-
*/
|
|
8
|
-
export function useInputId(id, name) {
|
|
9
|
-
const reactId = useId();
|
|
10
|
-
// If id is defined, keep id as finalId for predictable behavior.
|
|
11
|
-
// If name is defined, join name with reactId to simplify debug in devtools.
|
|
12
|
-
// Else use reactId.
|
|
13
|
-
return id ?? (name ? `${name}_${reactId}` : reactId);
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=use_input_id.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use_input_id.js","sourceRoot":"","sources":["../../../../../src/components/form/components/hooks/use_input_id.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CACxB,EAA6B,EAC7B,IAA+B;IAE/B,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IAExB,iEAAiE;IACjE,4EAA4E;IAC5E,oBAAoB;IACpB,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,IAAI,IAAI,OAAO,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AACvD,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ChangeEvent } from 'react';
|
|
2
|
-
interface InputProps {
|
|
3
|
-
error?: string;
|
|
4
|
-
required?: boolean;
|
|
5
|
-
id?: string;
|
|
6
|
-
name: string;
|
|
7
|
-
type?: string;
|
|
8
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
-
onBlur: () => void;
|
|
10
|
-
value: string;
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
formGroupProps: {
|
|
13
|
-
label?: string;
|
|
14
|
-
className?: string;
|
|
15
|
-
inline?: boolean;
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
export declare function Input(props: InputProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/input.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAIzC,UAAU,UAAU;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACzD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,CAAC;KAClB,CAAC;CACH;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,2CAwCtC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormGroup, InputGroup } from '@blueprintjs/core';
|
|
3
|
-
import { useInputId } from '../hooks/use_input_id.js';
|
|
4
|
-
export function Input(props) {
|
|
5
|
-
const { id, required = false, error, formGroupProps: { className, inline = false, label }, name, onBlur, onChange, type = 'text', value, placeholder, } = props;
|
|
6
|
-
const finalId = useInputId(id, name);
|
|
7
|
-
return (_jsx(FormGroup, { helperText: error ?? undefined, label: label, labelFor: finalId, intent: "danger", style: { margin: 0, position: 'relative' }, className: className, inline: inline, labelInfo: required && _jsx("span", { style: { color: 'red' }, children: "*" }), children: _jsx(InputGroup, { id: finalId, name: name, required: required, type: type, onChange: onChange, onBlur: onBlur, intent: error ? 'danger' : 'none', value: value, placeholder: placeholder }) }));
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=input.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.js","sourceRoot":"","sources":["../../../../../src/components/form/components/input_groups/input.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAmBtD,MAAM,UAAU,KAAK,CAAC,KAAiB;IACrC,MAAM,EACJ,EAAE,EACF,QAAQ,GAAG,KAAK,EAChB,KAAK,EACL,cAAc,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,KAAK,EAAE,KAAK,EAAE,EACpD,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,IAAI,GAAG,MAAM,EACb,KAAK,EACL,WAAW,GACZ,GAAG,KAAK,CAAC;IAEV,MAAM,OAAO,GAAG,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;IAErC,OAAO,CACL,KAAC,SAAS,IACR,UAAU,EAAE,KAAK,IAAI,SAAS,EAC9B,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,OAAO,EACjB,MAAM,EAAC,QAAQ,EACf,KAAK,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,QAAQ,EAAE,UAAU,EAAE,EAC1C,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,IAAI,eAAM,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,kBAAU,YAE9D,KAAC,UAAU,IACT,EAAE,EAAE,OAAO,EACX,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,EACjC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,GACxB,GACQ,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useId } from 'react';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Generate an automatic id if needed, joined with name if truthy
|
|
5
|
-
*
|
|
6
|
-
* @param id
|
|
7
|
-
* @param name
|
|
8
|
-
*/
|
|
9
|
-
export function useInputId(
|
|
10
|
-
id: string | null | undefined,
|
|
11
|
-
name: string | null | undefined,
|
|
12
|
-
) {
|
|
13
|
-
const reactId = useId();
|
|
14
|
-
|
|
15
|
-
// If id is defined, keep id as finalId for predictable behavior.
|
|
16
|
-
// If name is defined, join name with reactId to simplify debug in devtools.
|
|
17
|
-
// Else use reactId.
|
|
18
|
-
return id ?? (name ? `${name}_${reactId}` : reactId);
|
|
19
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { FormGroup, InputGroup } from '@blueprintjs/core';
|
|
2
|
-
import type { ChangeEvent } from 'react';
|
|
3
|
-
|
|
4
|
-
import { useInputId } from '../hooks/use_input_id.js';
|
|
5
|
-
|
|
6
|
-
interface InputProps {
|
|
7
|
-
error?: string;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
id?: string;
|
|
10
|
-
name: string;
|
|
11
|
-
type?: string;
|
|
12
|
-
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
13
|
-
onBlur: () => void;
|
|
14
|
-
value: string;
|
|
15
|
-
placeholder?: string;
|
|
16
|
-
formGroupProps: {
|
|
17
|
-
label?: string;
|
|
18
|
-
className?: string;
|
|
19
|
-
inline?: boolean;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function Input(props: InputProps) {
|
|
24
|
-
const {
|
|
25
|
-
id,
|
|
26
|
-
required = false,
|
|
27
|
-
error,
|
|
28
|
-
formGroupProps: { className, inline = false, label },
|
|
29
|
-
name,
|
|
30
|
-
onBlur,
|
|
31
|
-
onChange,
|
|
32
|
-
type = 'text',
|
|
33
|
-
value,
|
|
34
|
-
placeholder,
|
|
35
|
-
} = props;
|
|
36
|
-
|
|
37
|
-
const finalId = useInputId(id, name);
|
|
38
|
-
|
|
39
|
-
return (
|
|
40
|
-
<FormGroup
|
|
41
|
-
helperText={error ?? undefined}
|
|
42
|
-
label={label}
|
|
43
|
-
labelFor={finalId}
|
|
44
|
-
intent="danger"
|
|
45
|
-
style={{ margin: 0, position: 'relative' }}
|
|
46
|
-
className={className}
|
|
47
|
-
inline={inline}
|
|
48
|
-
labelInfo={required && <span style={{ color: 'red' }}>*</span>}
|
|
49
|
-
>
|
|
50
|
-
<InputGroup
|
|
51
|
-
id={finalId}
|
|
52
|
-
name={name}
|
|
53
|
-
required={required}
|
|
54
|
-
type={type}
|
|
55
|
-
onChange={onChange}
|
|
56
|
-
onBlur={onBlur}
|
|
57
|
-
intent={error ? 'danger' : 'none'}
|
|
58
|
-
value={value}
|
|
59
|
-
placeholder={placeholder}
|
|
60
|
-
/>
|
|
61
|
-
</FormGroup>
|
|
62
|
-
);
|
|
63
|
-
}
|