@hitachivantara/uikit-react-core 5.98.0 → 5.99.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/README.md +1 -1
- package/dist/cjs/AppSwitcher/Action/Action.cjs +4 -1
- package/dist/cjs/BaseRadio/BaseRadio.cjs +2 -2
- package/dist/cjs/BaseSwitch/BaseSwitch.cjs +2 -2
- package/dist/cjs/Card/Header/Header.styles.cjs +3 -1
- package/dist/cjs/CheckBox/CheckBox.cjs +2 -2
- package/dist/cjs/ColorPicker/Fields/Fields.cjs +0 -1
- package/dist/cjs/ColorPicker/Fields/Fields.styles.cjs +1 -3
- package/dist/cjs/ColorPicker/Picker/Picker.cjs +0 -1
- package/dist/cjs/ColorPicker/Picker/Picker.styles.cjs +1 -3
- package/dist/cjs/ColorPicker/PresetColors/PresetColors.cjs +0 -1
- package/dist/cjs/ColorPicker/PresetColors/PresetColors.styles.cjs +1 -3
- package/dist/cjs/ColorPicker/SavedColors/SavedColors.cjs +0 -1
- package/dist/cjs/ColorPicker/SavedColors/SavedColors.styles.cjs +1 -3
- package/dist/cjs/Dialog/Content/Content.cjs +26 -0
- package/dist/cjs/Dialog/Content/Content.styles.cjs +5 -2
- package/dist/cjs/Dialog/Dialog.styles.cjs +3 -1
- package/dist/cjs/Dialog/Title/Title.cjs +2 -2
- package/dist/cjs/DropdownButton/DropdownButton.cjs +2 -2
- package/dist/cjs/QueryBuilder/ConfirmationDialog.cjs +32 -0
- package/dist/cjs/QueryBuilder/QueryBuilder.cjs +4 -4
- package/dist/cjs/QueryBuilder/Rule/{Attribute/Attribute.cjs → Attribute.cjs} +3 -4
- package/dist/cjs/QueryBuilder/Rule/{Operator/Operator.cjs → Operator.cjs} +3 -4
- package/dist/cjs/QueryBuilder/Rule/Rule.cjs +3 -4
- package/dist/cjs/QueryBuilder/Rule/Rule.styles.cjs +46 -50
- package/dist/cjs/QueryBuilder/{RuleGroup/RuleGroup.cjs → RuleGroup.cjs} +9 -9
- package/dist/cjs/QueryBuilder/{Rule/Value/BooleanValue → Value}/BooleanValue.cjs +3 -5
- package/dist/cjs/QueryBuilder/{Rule/Value/DateTimeValue → Value}/DateTimeValue.cjs +67 -40
- package/dist/cjs/QueryBuilder/{Rule/Value/EmptyValue → Value}/EmptyValue.cjs +1 -1
- package/dist/cjs/QueryBuilder/{Rule/Value/NumericValue → Value}/NumericValue.cjs +33 -8
- package/dist/cjs/QueryBuilder/{Rule/Value/TextValue → Value}/TextValue.cjs +9 -5
- package/dist/cjs/QueryBuilder/{Rule/Value → Value}/Value.cjs +7 -9
- package/dist/cjs/Radio/Radio.cjs +3 -3
- package/dist/cjs/Section/Section.cjs +43 -18
- package/dist/cjs/Section/Section.styles.cjs +14 -2
- package/dist/cjs/Select/Select.cjs +2 -2
- package/dist/cjs/Switch/Switch.cjs +1 -1
- package/dist/cjs/Table/TableSection/TableSection.styles.cjs +1 -7
- package/dist/cjs/TagsInput/TagsInput.cjs +2 -2
- package/dist/cjs/TextArea/TextArea.cjs +2 -2
- package/dist/cjs/VerticalNavigation/TreeView/TreeViewItem.cjs +2 -2
- package/dist/cjs/providers/Provider.cjs +1 -4
- package/dist/cjs/themes/ds3.cjs +16 -0
- package/dist/cjs/themes/ds5.cjs +20 -0
- package/dist/cjs/themes/pentahoPlus.cjs +50 -16
- package/dist/esm/AppSwitcher/Action/Action.js +4 -1
- package/dist/esm/BaseRadio/BaseRadio.js +2 -2
- package/dist/esm/BaseSwitch/BaseSwitch.js +2 -2
- package/dist/esm/Card/Header/Header.styles.js +3 -1
- package/dist/esm/CheckBox/CheckBox.js +2 -2
- package/dist/esm/ColorPicker/Fields/Fields.js +1 -3
- package/dist/esm/ColorPicker/Fields/Fields.styles.js +1 -3
- package/dist/esm/ColorPicker/Picker/Picker.js +1 -3
- package/dist/esm/ColorPicker/Picker/Picker.styles.js +1 -3
- package/dist/esm/ColorPicker/PresetColors/PresetColors.js +1 -3
- package/dist/esm/ColorPicker/PresetColors/PresetColors.styles.js +1 -3
- package/dist/esm/ColorPicker/SavedColors/SavedColors.js +1 -3
- package/dist/esm/ColorPicker/SavedColors/SavedColors.styles.js +1 -3
- package/dist/esm/Dialog/Content/Content.js +27 -1
- package/dist/esm/Dialog/Content/Content.styles.js +5 -2
- package/dist/esm/Dialog/Dialog.styles.js +3 -1
- package/dist/esm/Dialog/Title/Title.js +3 -3
- package/dist/esm/DropdownButton/DropdownButton.js +2 -2
- package/dist/esm/QueryBuilder/ConfirmationDialog.js +32 -0
- package/dist/esm/QueryBuilder/QueryBuilder.js +4 -4
- package/dist/esm/QueryBuilder/Rule/{Attribute/Attribute.js → Attribute.js} +4 -5
- package/dist/esm/QueryBuilder/Rule/{Operator/Operator.js → Operator.js} +4 -5
- package/dist/esm/QueryBuilder/Rule/Rule.js +4 -6
- package/dist/esm/QueryBuilder/Rule/Rule.styles.js +47 -51
- package/dist/esm/QueryBuilder/{RuleGroup/RuleGroup.js → RuleGroup.js} +9 -9
- package/dist/esm/QueryBuilder/{Rule/Value/BooleanValue → Value}/BooleanValue.js +3 -5
- package/dist/esm/QueryBuilder/{Rule/Value/DateTimeValue → Value}/DateTimeValue.js +63 -35
- package/dist/esm/QueryBuilder/{Rule/Value/EmptyValue → Value}/EmptyValue.js +1 -1
- package/dist/esm/QueryBuilder/{Rule/Value/NumericValue → Value}/NumericValue.js +33 -8
- package/dist/esm/QueryBuilder/{Rule/Value/TextValue → Value}/TextValue.js +9 -5
- package/dist/esm/QueryBuilder/{Rule/Value → Value}/Value.js +7 -9
- package/dist/esm/Radio/Radio.js +3 -3
- package/dist/esm/Section/Section.js +44 -19
- package/dist/esm/Section/Section.styles.js +14 -2
- package/dist/esm/Select/Select.js +2 -2
- package/dist/esm/Switch/Switch.js +1 -1
- package/dist/esm/Table/TableSection/TableSection.styles.js +1 -7
- package/dist/esm/TagsInput/TagsInput.js +2 -2
- package/dist/esm/TextArea/TextArea.js +2 -2
- package/dist/esm/VerticalNavigation/TreeView/TreeViewItem.js +2 -2
- package/dist/esm/providers/Provider.js +2 -5
- package/dist/esm/themes/ds3.js +16 -0
- package/dist/esm/themes/ds5.js +20 -0
- package/dist/esm/themes/pentahoPlus.js +50 -16
- package/dist/types/index.d.ts +51 -47
- package/package.json +6 -6
- package/dist/cjs/QueryBuilder/ConfirmationDialog/ConfirmationDialog.cjs +0 -53
- package/dist/cjs/QueryBuilder/ConfirmationDialog/ConfirmationDialog.styles.cjs +0 -11
- package/dist/cjs/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.styles.cjs +0 -37
- package/dist/cjs/QueryBuilder/Rule/Value/DateTimeValue/utils.cjs +0 -36
- package/dist/cjs/QueryBuilder/Rule/Value/NumericValue/Numeric.styles.cjs +0 -34
- package/dist/cjs/QueryBuilder/Rule/Value/TextValue/TextValue.styles.cjs +0 -13
- package/dist/esm/QueryBuilder/ConfirmationDialog/ConfirmationDialog.js +0 -53
- package/dist/esm/QueryBuilder/ConfirmationDialog/ConfirmationDialog.styles.js +0 -11
- package/dist/esm/QueryBuilder/Rule/Value/DateTimeValue/DateTimeValue.styles.js +0 -37
- package/dist/esm/QueryBuilder/Rule/Value/DateTimeValue/utils.js +0 -34
- package/dist/esm/QueryBuilder/Rule/Value/NumericValue/Numeric.styles.js +0 -34
- package/dist/esm/QueryBuilder/Rule/Value/TextValue/TextValue.styles.js +0 -13
|
@@ -59,7 +59,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
59
59
|
),
|
|
60
60
|
message: {
|
|
61
61
|
"&&": {
|
|
62
|
-
color: uikitStyles.theme.colors.
|
|
62
|
+
color: uikitStyles.theme.colors.text
|
|
63
63
|
}
|
|
64
64
|
},
|
|
65
65
|
messageIcon: {
|
|
@@ -69,7 +69,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
69
69
|
color: "var(--title)"
|
|
70
70
|
},
|
|
71
71
|
actionClose: {
|
|
72
|
-
color: uikitStyles.theme.colors.
|
|
72
|
+
color: uikitStyles.theme.colors.text
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
},
|
|
@@ -93,7 +93,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
93
93
|
},
|
|
94
94
|
checked: {
|
|
95
95
|
"--bg-color": uikitStyles.theme.colors.primary,
|
|
96
|
-
color: uikitStyles.theme.colors.
|
|
96
|
+
color: uikitStyles.theme.colors.bgContainer
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
},
|
|
@@ -150,6 +150,14 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
|
+
HvSection: {
|
|
154
|
+
classes: {
|
|
155
|
+
content: {
|
|
156
|
+
backgroundColor: uikitStyles.theme.colors.bgPage
|
|
157
|
+
// = bgContainerSecondary
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
},
|
|
153
161
|
HvSelect: {
|
|
154
162
|
classes: {
|
|
155
163
|
root: {
|
|
@@ -293,7 +301,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
293
301
|
button: {
|
|
294
302
|
borderRadius: 2,
|
|
295
303
|
"&:focus": {
|
|
296
|
-
borderColor: uikitStyles.theme.colors.
|
|
304
|
+
borderColor: uikitStyles.theme.colors.text
|
|
297
305
|
}
|
|
298
306
|
},
|
|
299
307
|
inputRoot: {
|
|
@@ -437,6 +445,25 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
437
445
|
}
|
|
438
446
|
}
|
|
439
447
|
},
|
|
448
|
+
HvDialog: {
|
|
449
|
+
classes: {
|
|
450
|
+
paper: {
|
|
451
|
+
borderRadius: uikitStyles.theme.radii.large
|
|
452
|
+
},
|
|
453
|
+
statusBar: {
|
|
454
|
+
border: "none",
|
|
455
|
+
borderTopLeftRadius: uikitStyles.theme.radii.large,
|
|
456
|
+
borderTopRightRadius: uikitStyles.theme.radii.large
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
HvDialogActions: {
|
|
461
|
+
classes: {
|
|
462
|
+
root: {
|
|
463
|
+
borderTop: "none"
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
},
|
|
440
467
|
HvDropdownButton: {
|
|
441
468
|
classes: {
|
|
442
469
|
disabled: {
|
|
@@ -460,7 +487,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
460
487
|
HvHeader: {
|
|
461
488
|
classes: {
|
|
462
489
|
root: {
|
|
463
|
-
borderBottom: `1px solid ${uikitStyles.theme.colors.
|
|
490
|
+
borderBottom: `1px solid ${uikitStyles.theme.colors.borderSubtle}`,
|
|
464
491
|
boxShadow: "none"
|
|
465
492
|
}
|
|
466
493
|
}
|
|
@@ -468,7 +495,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
468
495
|
HvHeaderBrand: {
|
|
469
496
|
classes: {
|
|
470
497
|
separator: {
|
|
471
|
-
backgroundColor: uikitStyles.theme.colors.
|
|
498
|
+
backgroundColor: uikitStyles.theme.colors.border,
|
|
472
499
|
margin: uikitStyles.theme.spacing(0, "md"),
|
|
473
500
|
height: 32
|
|
474
501
|
}
|
|
@@ -478,16 +505,16 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
478
505
|
classes: {
|
|
479
506
|
active: {
|
|
480
507
|
boxShadow: "none",
|
|
481
|
-
borderBottom: `1px solid ${uikitStyles.theme.colors.
|
|
508
|
+
borderBottom: `1px solid ${uikitStyles.theme.colors.borderSubtle}`
|
|
482
509
|
},
|
|
483
510
|
list: {
|
|
484
511
|
"& li:hover > .HvHeader-MenuBar-hidden": {
|
|
485
512
|
boxShadow: "none",
|
|
486
|
-
borderBottom: `1px solid ${uikitStyles.theme.colors.
|
|
513
|
+
borderBottom: `1px solid ${uikitStyles.theme.colors.borderSubtle}`
|
|
487
514
|
},
|
|
488
515
|
"& li:focus-within > .HvHeader-MenuBar-hidden": {
|
|
489
516
|
boxShadow: "none",
|
|
490
|
-
borderBottom: `1px solid ${uikitStyles.theme.colors.
|
|
517
|
+
borderBottom: `1px solid ${uikitStyles.theme.colors.borderSubtle}`
|
|
491
518
|
}
|
|
492
519
|
}
|
|
493
520
|
}
|
|
@@ -496,7 +523,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
496
523
|
classes: {
|
|
497
524
|
root: {
|
|
498
525
|
width: 280,
|
|
499
|
-
color: uikitStyles.theme.colors.
|
|
526
|
+
color: uikitStyles.theme.colors.textLight,
|
|
500
527
|
backgroundColor: uikitStyles.slate[900],
|
|
501
528
|
borderRight: `1px solid ${uikitStyles.slate[500]}`,
|
|
502
529
|
"& > :not(nav:first-of-type)": {
|
|
@@ -612,12 +639,14 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
612
639
|
},
|
|
613
640
|
selectable: {
|
|
614
641
|
":hover": {
|
|
615
|
-
outlineColor: uikitStyles.theme.colors.
|
|
616
|
-
backgroundColor: uikitStyles.theme.colors.
|
|
642
|
+
outlineColor: uikitStyles.theme.colors.primarySubtle,
|
|
643
|
+
backgroundColor: uikitStyles.theme.colors.bgHover
|
|
617
644
|
}
|
|
618
645
|
},
|
|
619
646
|
selected: {
|
|
620
|
-
|
|
647
|
+
"&,&:hover,&:focus": {
|
|
648
|
+
outlineColor: uikitStyles.theme.colors.primary
|
|
649
|
+
}
|
|
621
650
|
},
|
|
622
651
|
semanticBar: {
|
|
623
652
|
"--bar-height": "2px",
|
|
@@ -629,8 +658,13 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
629
658
|
classes: {
|
|
630
659
|
root: {
|
|
631
660
|
flexDirection: "row-reverse",
|
|
632
|
-
padding: uikitStyles.theme.spacing("xs", "sm")
|
|
633
|
-
|
|
661
|
+
padding: uikitStyles.theme.spacing("xs", "sm")
|
|
662
|
+
},
|
|
663
|
+
subheader: {
|
|
664
|
+
color: uikitStyles.theme.colors.textSubtle
|
|
665
|
+
},
|
|
666
|
+
action: {
|
|
667
|
+
alignSelf: "center"
|
|
634
668
|
}
|
|
635
669
|
}
|
|
636
670
|
},
|
|
@@ -645,7 +679,7 @@ const pentahoPlus = uikitStyles.mergeTheme(uikitStyles.pentahoPlus, {
|
|
|
645
679
|
}
|
|
646
680
|
},
|
|
647
681
|
HvFooter: {
|
|
648
|
-
name: "Pentaho
|
|
682
|
+
name: "Pentaho"
|
|
649
683
|
},
|
|
650
684
|
HvTabs: {
|
|
651
685
|
classes: {
|
|
@@ -70,7 +70,10 @@ const HvAppSwitcherAction = ({
|
|
|
70
70
|
disabled,
|
|
71
71
|
className: cx(
|
|
72
72
|
classes.root,
|
|
73
|
-
{
|
|
73
|
+
{
|
|
74
|
+
[classes.selected]: isSelected,
|
|
75
|
+
[classes.disabled]: disabled
|
|
76
|
+
},
|
|
74
77
|
className
|
|
75
78
|
),
|
|
76
79
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -56,10 +56,10 @@ const HvBaseRadio = forwardRef(
|
|
|
56
56
|
className: cx(
|
|
57
57
|
classes.root,
|
|
58
58
|
{
|
|
59
|
-
[classes.disabled]: disabled,
|
|
60
59
|
[classes.focusVisible]: focusVisible,
|
|
61
60
|
[classes.checked]: checked,
|
|
62
|
-
[classes.semantic]: semantic
|
|
61
|
+
[classes.semantic]: semantic,
|
|
62
|
+
[classes.disabled]: disabled
|
|
63
63
|
},
|
|
64
64
|
className
|
|
65
65
|
),
|
|
@@ -57,9 +57,9 @@ const HvBaseSwitch = forwardRef(
|
|
|
57
57
|
className: cx(
|
|
58
58
|
classes.root,
|
|
59
59
|
{
|
|
60
|
-
[classes.
|
|
60
|
+
[classes.focusVisible]: focusVisible,
|
|
61
61
|
[classes.readOnly]: readOnly,
|
|
62
|
-
[classes.
|
|
62
|
+
[classes.disabled]: disabled
|
|
63
63
|
},
|
|
64
64
|
className
|
|
65
65
|
),
|
|
@@ -4,7 +4,9 @@ const { staticClasses, useClasses } = createClasses("HvCardHeader", {
|
|
|
4
4
|
root: {
|
|
5
5
|
position: "relative",
|
|
6
6
|
padding: theme.spacing("12px", "xs", "sm", "sm"),
|
|
7
|
-
gap: theme.space.xs
|
|
7
|
+
gap: theme.space.xs,
|
|
8
|
+
alignItems: "center",
|
|
9
|
+
display: "flex"
|
|
8
10
|
},
|
|
9
11
|
titleShort: {
|
|
10
12
|
...theme.typography.label,
|
|
@@ -145,8 +145,8 @@ const HvCheckBox = forwardRef(
|
|
|
145
145
|
"div",
|
|
146
146
|
{
|
|
147
147
|
className: cx(classes.container, {
|
|
148
|
-
[classes.
|
|
149
|
-
[classes.
|
|
148
|
+
[classes.invalidContainer]: isStateInvalid,
|
|
149
|
+
[classes.disabled]: disabled
|
|
150
150
|
}),
|
|
151
151
|
children: [
|
|
152
152
|
checkbox,
|
|
@@ -3,7 +3,6 @@ import { useState, useRef, useEffect } from "react";
|
|
|
3
3
|
import * as color from "react-color/lib/helpers/color";
|
|
4
4
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
5
5
|
import { useClasses } from "./Fields.styles.js";
|
|
6
|
-
import { staticClasses } from "./Fields.styles.js";
|
|
7
6
|
import { HvInput } from "../../Input/Input.js";
|
|
8
7
|
const Fields = (props) => {
|
|
9
8
|
const {
|
|
@@ -131,6 +130,5 @@ const Fields = (props) => {
|
|
|
131
130
|
] });
|
|
132
131
|
};
|
|
133
132
|
export {
|
|
134
|
-
Fields
|
|
135
|
-
staticClasses as colorPickerFieldsClasses
|
|
133
|
+
Fields
|
|
136
134
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
const
|
|
4
|
-
const { staticClasses, useClasses } = createClasses(name, {
|
|
3
|
+
const { useClasses } = createClasses("HvColorPickerFields", {
|
|
5
4
|
fields: {
|
|
6
5
|
width: "100%",
|
|
7
6
|
display: "flex",
|
|
@@ -33,6 +32,5 @@ const { staticClasses, useClasses } = createClasses(name, {
|
|
|
33
32
|
}
|
|
34
33
|
});
|
|
35
34
|
export {
|
|
36
|
-
staticClasses,
|
|
37
35
|
useClasses
|
|
38
36
|
};
|
|
@@ -4,7 +4,6 @@ import { CustomPicker } from "react-color";
|
|
|
4
4
|
import { Saturation, Hue } from "react-color/lib/components/common";
|
|
5
5
|
import { useDefaultProps, useTheme } from "@hitachivantara/uikit-react-utils";
|
|
6
6
|
import { useClasses } from "./Picker.styles.js";
|
|
7
|
-
import { staticClasses } from "./Picker.styles.js";
|
|
8
7
|
import { Fields } from "../Fields/Fields.js";
|
|
9
8
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
10
9
|
const Component = (props) => {
|
|
@@ -70,6 +69,5 @@ const Component = (props) => {
|
|
|
70
69
|
};
|
|
71
70
|
const Picker = CustomPicker(Component);
|
|
72
71
|
export {
|
|
73
|
-
Picker
|
|
74
|
-
staticClasses as colorPickerPickerClasses
|
|
72
|
+
Picker
|
|
75
73
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
const
|
|
4
|
-
const { staticClasses, useClasses } = createClasses(name, {
|
|
3
|
+
const { useClasses } = createClasses("HvColorPickerPicker", {
|
|
5
4
|
pickers: {
|
|
6
5
|
display: "flex",
|
|
7
6
|
flexDirection: "column"
|
|
@@ -62,6 +61,5 @@ const { staticClasses, useClasses } = createClasses(name, {
|
|
|
62
61
|
fields: {}
|
|
63
62
|
});
|
|
64
63
|
export {
|
|
65
|
-
staticClasses,
|
|
66
64
|
useClasses
|
|
67
65
|
};
|
|
@@ -3,7 +3,6 @@ import { Swatch } from "react-color/lib/components/common";
|
|
|
3
3
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
4
4
|
import { getColor } from "@hitachivantara/uikit-styles";
|
|
5
5
|
import { useClasses } from "./PresetColors.styles.js";
|
|
6
|
-
import { staticClasses } from "./PresetColors.styles.js";
|
|
7
6
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
8
7
|
const PresetColors = (props) => {
|
|
9
8
|
const {
|
|
@@ -43,6 +42,5 @@ const PresetColors = (props) => {
|
|
|
43
42
|
] });
|
|
44
43
|
};
|
|
45
44
|
export {
|
|
46
|
-
PresetColors
|
|
47
|
-
staticClasses as colorPickerPresetColorsClasses
|
|
45
|
+
PresetColors
|
|
48
46
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
const
|
|
4
|
-
const { staticClasses, useClasses } = createClasses(name, {
|
|
3
|
+
const { useClasses } = createClasses("HvColorPickerPresetColors", {
|
|
5
4
|
root: { width: "232px" },
|
|
6
5
|
colors: {
|
|
7
6
|
display: "flex",
|
|
@@ -25,6 +24,5 @@ const { staticClasses, useClasses } = createClasses(name, {
|
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
26
|
export {
|
|
28
|
-
staticClasses,
|
|
29
27
|
useClasses
|
|
30
28
|
};
|
|
@@ -3,7 +3,6 @@ import { Swatch } from "react-color/lib/components/common";
|
|
|
3
3
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
4
4
|
import { HvIcon } from "../../icons.js";
|
|
5
5
|
import { useClasses } from "./SavedColors.styles.js";
|
|
6
|
-
import { staticClasses } from "./SavedColors.styles.js";
|
|
7
6
|
import { HvIconButton } from "../../IconButton/IconButton.js";
|
|
8
7
|
const SavedColors = (props) => {
|
|
9
8
|
const {
|
|
@@ -65,6 +64,5 @@ const SavedColors = (props) => {
|
|
|
65
64
|
] });
|
|
66
65
|
};
|
|
67
66
|
export {
|
|
68
|
-
SavedColors
|
|
69
|
-
staticClasses as colorPickerSavedColorsClasses
|
|
67
|
+
SavedColors
|
|
70
68
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
|
-
const
|
|
4
|
-
const { staticClasses, useClasses } = createClasses(name, {
|
|
3
|
+
const { useClasses } = createClasses("HvColorPickerSavedColors", {
|
|
5
4
|
addButton: {
|
|
6
5
|
margin: theme.space.xxs,
|
|
7
6
|
width: "32px",
|
|
@@ -43,6 +42,5 @@ const { staticClasses, useClasses } = createClasses(name, {
|
|
|
43
42
|
}
|
|
44
43
|
});
|
|
45
44
|
export {
|
|
46
|
-
staticClasses,
|
|
47
45
|
useClasses
|
|
48
46
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState, useRef, useEffect } from "react";
|
|
2
3
|
import MuiDialogContent from "@mui/material/DialogContent";
|
|
3
|
-
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
4
|
+
import { useDefaultProps, mergeStyles } from "@hitachivantara/uikit-react-utils";
|
|
4
5
|
import { useClasses } from "./Content.styles.js";
|
|
5
6
|
import { staticClasses } from "./Content.styles.js";
|
|
6
7
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
@@ -10,18 +11,43 @@ const HvDialogContent = (props) => {
|
|
|
10
11
|
className,
|
|
11
12
|
children,
|
|
12
13
|
indentContent = false,
|
|
14
|
+
style,
|
|
13
15
|
...others
|
|
14
16
|
} = useDefaultProps("HvDialogContent", props);
|
|
15
17
|
const { classes, cx } = useClasses(classesProp);
|
|
18
|
+
const [hasBorder, setHasBorder] = useState(false);
|
|
19
|
+
const elRef = useRef(null);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (typeof ResizeObserver !== "undefined") {
|
|
22
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
23
|
+
const el = elRef.current;
|
|
24
|
+
if (el) {
|
|
25
|
+
const hasOverflow = el.scrollHeight > el.clientHeight;
|
|
26
|
+
setHasBorder(hasOverflow);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
if (elRef.current) {
|
|
30
|
+
resizeObserver.observe(elRef.current);
|
|
31
|
+
}
|
|
32
|
+
return () => {
|
|
33
|
+
resizeObserver.disconnect();
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return void 0;
|
|
37
|
+
}, []);
|
|
16
38
|
return /* @__PURE__ */ jsx(
|
|
17
39
|
HvTypography,
|
|
18
40
|
{
|
|
41
|
+
ref: elRef,
|
|
19
42
|
component: MuiDialogContent,
|
|
20
43
|
className: cx(
|
|
21
44
|
classes.root,
|
|
22
45
|
{ [classes.textContent]: !!indentContent },
|
|
23
46
|
className
|
|
24
47
|
),
|
|
48
|
+
style: mergeStyles(style, {
|
|
49
|
+
"--borderW": hasBorder ? "1px" : "0px"
|
|
50
|
+
}),
|
|
25
51
|
...others,
|
|
26
52
|
children
|
|
27
53
|
}
|
|
@@ -2,10 +2,13 @@ import { createClasses } from "@hitachivantara/uikit-react-utils";
|
|
|
2
2
|
import { theme } from "@hitachivantara/uikit-styles";
|
|
3
3
|
const { staticClasses, useClasses } = createClasses("HvDialog-Content", {
|
|
4
4
|
root: {
|
|
5
|
-
padding: theme.spacing(0, "sm", "sm")
|
|
5
|
+
padding: theme.spacing(0, "sm", "sm"),
|
|
6
|
+
borderColor: theme.colors.borderSubtle,
|
|
7
|
+
borderTopWidth: "var(--borderW)",
|
|
8
|
+
borderBottomWidth: "var(--borderW)"
|
|
6
9
|
},
|
|
7
10
|
textContent: {
|
|
8
|
-
|
|
11
|
+
paddingLeft: `calc(42px + ${theme.space.sm})`,
|
|
9
12
|
paddingRight: "62px",
|
|
10
13
|
overflowY: "auto"
|
|
11
14
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import MuiDialogTitle from "@mui/material/DialogTitle";
|
|
3
3
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
4
|
-
import { iconVariant } from "../../utils/iconVariant.js";
|
|
5
4
|
import { useDialogContext } from "../context.js";
|
|
6
5
|
import { useClasses } from "./Title.styles.js";
|
|
7
6
|
import { staticClasses } from "./Title.styles.js";
|
|
8
7
|
import { HvTypography } from "../../Typography/Typography.js";
|
|
8
|
+
import { HvStatusIcon } from "../../StatusIcon/StatusIcon.js";
|
|
9
9
|
const HvDialogTitle = (props) => {
|
|
10
10
|
const {
|
|
11
11
|
classes: classesProp,
|
|
@@ -18,7 +18,7 @@ const HvDialogTitle = (props) => {
|
|
|
18
18
|
} = useDefaultProps("HvDialogTitle", props);
|
|
19
19
|
const { classes, cx } = useClasses(classesProp);
|
|
20
20
|
const { fullScreen } = useDialogContext();
|
|
21
|
-
const icon = customIcon || showIcon &&
|
|
21
|
+
const icon = customIcon || showIcon && /* @__PURE__ */ jsx(HvStatusIcon, { variant });
|
|
22
22
|
return /* @__PURE__ */ jsxs(
|
|
23
23
|
HvTypography,
|
|
24
24
|
{
|
|
@@ -32,8 +32,8 @@ const HvDropdownButton = forwardRef(function HvDropdownButton2(props, ref) {
|
|
|
32
32
|
classes.root,
|
|
33
33
|
{
|
|
34
34
|
[classes.open]: open,
|
|
35
|
-
[classes.
|
|
36
|
-
[classes.
|
|
35
|
+
[classes.readOnly]: readOnly,
|
|
36
|
+
[classes.disabled]: disabled
|
|
37
37
|
},
|
|
38
38
|
className
|
|
39
39
|
),
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { HvDialog } from "../Dialog/Dialog.js";
|
|
3
|
+
import { HvDialogTitle } from "../Dialog/Title/Title.js";
|
|
4
|
+
import { HvDialogContent } from "../Dialog/Content/Content.js";
|
|
5
|
+
import { HvDialogActions } from "../Dialog/Actions/Actions.js";
|
|
6
|
+
import { HvButton } from "../Button/Button.js";
|
|
7
|
+
const ConfirmationDialog = ({
|
|
8
|
+
title,
|
|
9
|
+
message,
|
|
10
|
+
onConfirm,
|
|
11
|
+
onCancel,
|
|
12
|
+
confirmButtonLabel,
|
|
13
|
+
cancelButtonLabel,
|
|
14
|
+
...others
|
|
15
|
+
}) => {
|
|
16
|
+
const handleClose = (_, reason) => {
|
|
17
|
+
if (reason !== "backdropClick") {
|
|
18
|
+
onCancel?.();
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
return /* @__PURE__ */ jsxs(HvDialog, { onClose: handleClose, ...others, children: [
|
|
22
|
+
/* @__PURE__ */ jsx(HvDialogTitle, { variant: "warning", showIcon: false, children: title }),
|
|
23
|
+
/* @__PURE__ */ jsx(HvDialogContent, { indentContent: true, children: message }),
|
|
24
|
+
/* @__PURE__ */ jsxs(HvDialogActions, { children: [
|
|
25
|
+
/* @__PURE__ */ jsx(HvButton, { variant: "primaryGhost", onClick: onConfirm, children: confirmButtonLabel }),
|
|
26
|
+
/* @__PURE__ */ jsx(HvButton, { autoFocus: true, variant: "primaryGhost", onClick: onCancel, children: cancelButtonLabel })
|
|
27
|
+
] })
|
|
28
|
+
] });
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
ConfirmationDialog
|
|
32
|
+
};
|
|
@@ -4,13 +4,13 @@ import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
|
4
4
|
import { useControlled } from "../hooks/useControlled.js";
|
|
5
5
|
import { useLabels } from "../hooks/useLabels.js";
|
|
6
6
|
import { isEqual } from "../utils/helpers.js";
|
|
7
|
+
import { ConfirmationDialog } from "./ConfirmationDialog.js";
|
|
7
8
|
import { defaultOperators, defaultCombinators, HvQueryBuilderProvider, defaultLabels } from "./Context.js";
|
|
8
9
|
import { useClasses } from "./QueryBuilder.styles.js";
|
|
9
10
|
import { staticClasses } from "./QueryBuilder.styles.js";
|
|
11
|
+
import { RuleGroup } from "./RuleGroup.js";
|
|
10
12
|
import { emptyGroup, setNodeIds, clearNodeIds } from "./utils/index.js";
|
|
11
13
|
import reducer from "./utils/reducer.js";
|
|
12
|
-
import { RuleGroup } from "./RuleGroup/RuleGroup.js";
|
|
13
|
-
import { ConfirmationDialog } from "./ConfirmationDialog/ConfirmationDialog.js";
|
|
14
14
|
const HvQueryBuilder = (props) => {
|
|
15
15
|
const {
|
|
16
16
|
attributes,
|
|
@@ -131,14 +131,14 @@ const HvQueryBuilder = (props) => {
|
|
|
131
131
|
/* @__PURE__ */ jsx(
|
|
132
132
|
ConfirmationDialog,
|
|
133
133
|
{
|
|
134
|
-
|
|
134
|
+
open: pendingAction != null,
|
|
135
135
|
onConfirm: handleConfirm,
|
|
136
136
|
onCancel: handleCancel,
|
|
137
137
|
title: pendingAction?.dialog.dialogTitle,
|
|
138
138
|
message: pendingAction?.dialog.dialogMessage,
|
|
139
139
|
confirmButtonLabel: pendingAction?.dialog.dialogConfirm,
|
|
140
140
|
cancelButtonLabel: pendingAction?.dialog.dialogCancel,
|
|
141
|
-
|
|
141
|
+
buttonTitle: pendingAction?.dialog.dialogCloseTooltip
|
|
142
142
|
}
|
|
143
143
|
)
|
|
144
144
|
] });
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo
|
|
3
|
-
import { useQueryBuilderContext } from "
|
|
4
|
-
import { isBigList } from "
|
|
5
|
-
import { HvDropdown } from "
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useQueryBuilderContext } from "../Context.js";
|
|
4
|
+
import { isBigList } from "../utils/index.js";
|
|
5
|
+
import { HvDropdown } from "../../Dropdown/Dropdown.js";
|
|
6
6
|
const Attribute = ({
|
|
7
7
|
id,
|
|
8
8
|
attribute,
|
|
@@ -60,7 +60,6 @@ const Attribute = ({
|
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
62
|
};
|
|
63
|
-
memo(Attribute);
|
|
64
63
|
export {
|
|
65
64
|
Attribute
|
|
66
65
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useMemo
|
|
3
|
-
import { useQueryBuilderContext } from "
|
|
4
|
-
import { isBigList } from "
|
|
5
|
-
import { HvDropdown } from "
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { useQueryBuilderContext } from "../Context.js";
|
|
4
|
+
import { isBigList } from "../utils/index.js";
|
|
5
|
+
import { HvDropdown } from "../../Dropdown/Dropdown.js";
|
|
6
6
|
const Operator = ({
|
|
7
7
|
id,
|
|
8
8
|
combinator,
|
|
@@ -55,7 +55,6 @@ const Operator = ({
|
|
|
55
55
|
}
|
|
56
56
|
);
|
|
57
57
|
};
|
|
58
|
-
memo(Operator);
|
|
59
58
|
export {
|
|
60
59
|
Operator
|
|
61
60
|
};
|
|
@@ -5,12 +5,11 @@ import useMediaQuery from "@mui/material/useMediaQuery";
|
|
|
5
5
|
import { useDefaultProps } from "@hitachivantara/uikit-react-utils";
|
|
6
6
|
import { HvIcon } from "../../icons.js";
|
|
7
7
|
import { useQueryBuilderContext } from "../Context.js";
|
|
8
|
+
import { Value } from "../Value/Value.js";
|
|
9
|
+
import { Attribute } from "./Attribute.js";
|
|
10
|
+
import { Operator } from "./Operator.js";
|
|
8
11
|
import { useClasses } from "./Rule.styles.js";
|
|
9
|
-
import { staticClasses } from "./Rule.styles.js";
|
|
10
12
|
import { HvGrid } from "../../Grid/Grid.js";
|
|
11
|
-
import { Attribute } from "./Attribute/Attribute.js";
|
|
12
|
-
import { Operator } from "./Operator/Operator.js";
|
|
13
|
-
import { Value } from "./Value/Value.js";
|
|
14
13
|
import { HvIconButton } from "../../IconButton/IconButton.js";
|
|
15
14
|
const Rule = (props) => {
|
|
16
15
|
const {
|
|
@@ -100,6 +99,5 @@ const Rule = (props) => {
|
|
|
100
99
|
);
|
|
101
100
|
};
|
|
102
101
|
export {
|
|
103
|
-
Rule
|
|
104
|
-
staticClasses as queryBuilderRuleClasses
|
|
102
|
+
Rule
|
|
105
103
|
};
|