@aivenio/aquarium 1.68.0 → 1.70.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/dist/_variables.scss +2 -1
- package/dist/atoms.cjs +5 -3
- package/dist/atoms.mjs +5 -3
- package/dist/src/atoms/Select/Select.js +3 -2
- package/dist/src/molecules/Box/Box.d.ts +3 -0
- package/dist/src/molecules/Box/Box.js +4 -1
- package/dist/src/molecules/Button/Button.js +2 -2
- package/dist/src/molecules/Combobox/Combobox.js +12 -3
- package/dist/src/molecules/DataList/DataList.js +3 -3
- package/dist/src/molecules/DropdownMenu/DropdownMenu.d.ts +3 -3
- package/dist/src/molecules/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/src/molecules/Tooltip/useTooltipTriggerState.js +2 -1
- package/dist/styles.css +7 -0
- package/dist/system.cjs +31 -10
- package/dist/system.mjs +31 -10
- package/dist/tailwind.config.js +1 -0
- package/dist/tailwind.theme.json +2 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +5 -4
package/dist/system.cjs
CHANGED
@@ -5078,7 +5078,7 @@ var InputContainer = import_react3.default.forwardRef(
|
|
5078
5078
|
ref,
|
5079
5079
|
className: classNames(
|
5080
5080
|
className,
|
5081
|
-
"relative rounded-sm typography-default-strong w-full flex flex-row items-center focus-visible:outline-0 focus-visible:border-info-default",
|
5081
|
+
"relative rounded-sm typography-default-strong w-full flex flex-row items-center focus-visible:outline-0 focus-visible:border-info-default group",
|
5082
5082
|
{
|
5083
5083
|
"border px-3 py-[6px]": variant !== "readOnly",
|
5084
5084
|
"cursor-default": variant === "readOnly",
|
@@ -5622,7 +5622,8 @@ var tailwind_theme_default = {
|
|
5622
5622
|
"status-info": "var(--aquarium-background-color-status-info)",
|
5623
5623
|
"status-warning": "var(--aquarium-background-color-status-warning)",
|
5624
5624
|
"status-danger": "var(--aquarium-background-color-status-danger)",
|
5625
|
-
"status-success": "var(--aquarium-background-color-status-success)"
|
5625
|
+
"status-success": "var(--aquarium-background-color-status-success)",
|
5626
|
+
"icon-button-hover": "rgba(25,25,29,.05)"
|
5626
5627
|
},
|
5627
5628
|
textColor: {
|
5628
5629
|
"error-100": "var(--aquarium-colors-error-100, #aa0000)",
|
@@ -7043,6 +7044,7 @@ function useTooltipTriggerState(props = {}) {
|
|
7043
7044
|
}
|
7044
7045
|
};
|
7045
7046
|
(0, import_react17.useEffect)(() => {
|
7047
|
+
isUnmounted.current = false;
|
7046
7048
|
return () => {
|
7047
7049
|
isUnmounted.current = true;
|
7048
7050
|
if (closeTimeout.current) {
|
@@ -7331,7 +7333,7 @@ var asButton = (Component, isDropdownButton) => {
|
|
7331
7333
|
tw(
|
7332
7334
|
"inline-block border-0 rounded-sm transition whitespace-nowrap focus:outline-none relative text-center",
|
7333
7335
|
{
|
7334
|
-
"text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-
|
7336
|
+
"text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-icon-button-hover focus-visible:text-intense focus-visible:bg-muted disabled:text-inactive disabled:bg-transparent": isIconOnlyButton,
|
7335
7337
|
"typography-default-strong": !dense && !isIconOnlyButton && kind !== "text",
|
7336
7338
|
"typography-small-strong": dense && !isIconOnlyButton && kind !== "text",
|
7337
7339
|
"py-3 px-4": !dense && isButton,
|
@@ -9764,6 +9766,7 @@ var Wrapper = import_react55.default.forwardRef(
|
|
9764
9766
|
);
|
9765
9767
|
|
9766
9768
|
// src/molecules/Combobox/Combobox.tsx
|
9769
|
+
var import_smallCross2 = __toESM(require_smallCross());
|
9767
9770
|
var ComboboxBase = (_a) => {
|
9768
9771
|
var _b = _a, {
|
9769
9772
|
id,
|
@@ -9836,7 +9839,8 @@ var ComboboxBase = (_a) => {
|
|
9836
9839
|
highlightedIndex,
|
9837
9840
|
inputValue,
|
9838
9841
|
getItemProps,
|
9839
|
-
selectedItem
|
9842
|
+
selectedItem,
|
9843
|
+
selectItem
|
9840
9844
|
} = (0, import_downshift.useCombobox)({
|
9841
9845
|
id,
|
9842
9846
|
selectedItem: value,
|
@@ -9909,10 +9913,25 @@ var ComboboxBase = (_a) => {
|
|
9909
9913
|
(_a3 = inputProps.onKeyDown) == null ? void 0 : _a3.call(inputProps, e);
|
9910
9914
|
},
|
9911
9915
|
onKeyUp: (e) => e.stopPropagation()
|
9912
|
-
})), !readOnly && /* @__PURE__ */ import_react56.default.createElement(
|
9916
|
+
})), !readOnly && /* @__PURE__ */ import_react56.default.createElement(Box.Flex, {
|
9917
|
+
alignItems: "center",
|
9918
|
+
gap: "2"
|
9919
|
+
}, !!inputProps.value && !disabled && /* @__PURE__ */ import_react56.default.createElement("div", {
|
9920
|
+
className: tw("group-hover:opacity-100", {
|
9921
|
+
"opacity-0": !hasFocus,
|
9922
|
+
"opacity-100": hasFocus
|
9923
|
+
})
|
9924
|
+
}, /* @__PURE__ */ import_react56.default.createElement(Button.Icon, {
|
9925
|
+
icon: import_smallCross2.default,
|
9926
|
+
onClick: () => selectItem(null),
|
9927
|
+
onFocus: () => setFocus(true),
|
9928
|
+
onBlur: () => setFocus(false),
|
9929
|
+
"aria-label": "Clear selection",
|
9930
|
+
dense: true
|
9931
|
+
})), /* @__PURE__ */ import_react56.default.createElement(Select.Toggle, __spreadValues({
|
9913
9932
|
hasFocus,
|
9914
9933
|
isOpen
|
9915
|
-
}, getToggleButtonProps({ disabled })))), isOpen && /* @__PURE__ */ import_react56.default.createElement(PopoverOverlay, {
|
9934
|
+
}, getToggleButtonProps({ disabled }))))), isOpen && /* @__PURE__ */ import_react56.default.createElement(PopoverOverlay, {
|
9916
9935
|
ref: popoverRef,
|
9917
9936
|
triggerRef: targetRef,
|
9918
9937
|
state,
|
@@ -12071,7 +12090,7 @@ var DataList2 = (_a) => {
|
|
12071
12090
|
getRowCheckboxLabel = getDefaultRowCheckboxLabel,
|
12072
12091
|
getGroupCheckboxLabel = getDefaultGroupCheckboxLabel,
|
12073
12092
|
selectedRows,
|
12074
|
-
defaultSelectedRows,
|
12093
|
+
defaultSelectedRows = [],
|
12075
12094
|
onSelectionChange,
|
12076
12095
|
toolbar
|
12077
12096
|
} = _b, rest = __objRest(_b, [
|
@@ -12150,7 +12169,9 @@ var DataList2 = (_a) => {
|
|
12150
12169
|
const allRows = flattenRows(rows);
|
12151
12170
|
const totalSelected = (_b2 = selected == null ? void 0 : selected.length) != null ? _b2 : 0;
|
12152
12171
|
const allEnabledRowIds = (0, import_compact.default)(
|
12153
|
-
allRows.map(
|
12172
|
+
allRows.map(
|
12173
|
+
(row, index) => (disabled == null ? void 0 : disabled(row, index, sortedRows)) || (selectionDisabled == null ? void 0 : selectionDisabled(row, index, sortedRows)) ? void 0 : row.id
|
12174
|
+
)
|
12154
12175
|
);
|
12155
12176
|
const allRowsSelected = totalSelected >= allEnabledRowIds.length;
|
12156
12177
|
return /* @__PURE__ */ import_react80.default.createElement(DataListContext.Provider, {
|
@@ -13790,7 +13811,7 @@ var import_omit12 = __toESM(require("lodash/omit"));
|
|
13790
13811
|
|
13791
13812
|
// src/molecules/MultiInput/InputChip.tsx
|
13792
13813
|
var import_react101 = __toESM(require("react"));
|
13793
|
-
var
|
13814
|
+
var import_smallCross3 = __toESM(require_smallCross());
|
13794
13815
|
var InputChip = import_react101.default.forwardRef(
|
13795
13816
|
(_a, ref) => {
|
13796
13817
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
@@ -13822,7 +13843,7 @@ var InputChip = import_react101.default.forwardRef(
|
|
13822
13843
|
role: "button",
|
13823
13844
|
"aria-label": `Remove ${String(children)}`
|
13824
13845
|
}), !disabled && /* @__PURE__ */ import_react101.default.createElement(Icon, {
|
13825
|
-
icon:
|
13846
|
+
icon: import_smallCross3.default,
|
13826
13847
|
className: tw({
|
13827
13848
|
"text-danger-default": invalid,
|
13828
13849
|
"text-default": !invalid
|
package/dist/system.mjs
CHANGED
@@ -4930,7 +4930,7 @@ var InputContainer = React2.forwardRef(
|
|
4930
4930
|
ref,
|
4931
4931
|
className: classNames(
|
4932
4932
|
className,
|
4933
|
-
"relative rounded-sm typography-default-strong w-full flex flex-row items-center focus-visible:outline-0 focus-visible:border-info-default",
|
4933
|
+
"relative rounded-sm typography-default-strong w-full flex flex-row items-center focus-visible:outline-0 focus-visible:border-info-default group",
|
4934
4934
|
{
|
4935
4935
|
"border px-3 py-[6px]": variant !== "readOnly",
|
4936
4936
|
"cursor-default": variant === "readOnly",
|
@@ -5474,7 +5474,8 @@ var tailwind_theme_default = {
|
|
5474
5474
|
"status-info": "var(--aquarium-background-color-status-info)",
|
5475
5475
|
"status-warning": "var(--aquarium-background-color-status-warning)",
|
5476
5476
|
"status-danger": "var(--aquarium-background-color-status-danger)",
|
5477
|
-
"status-success": "var(--aquarium-background-color-status-success)"
|
5477
|
+
"status-success": "var(--aquarium-background-color-status-success)",
|
5478
|
+
"icon-button-hover": "rgba(25,25,29,.05)"
|
5478
5479
|
},
|
5479
5480
|
textColor: {
|
5480
5481
|
"error-100": "var(--aquarium-colors-error-100, #aa0000)",
|
@@ -6895,6 +6896,7 @@ function useTooltipTriggerState(props = {}) {
|
|
6895
6896
|
}
|
6896
6897
|
};
|
6897
6898
|
useEffect3(() => {
|
6899
|
+
isUnmounted.current = false;
|
6898
6900
|
return () => {
|
6899
6901
|
isUnmounted.current = true;
|
6900
6902
|
if (closeTimeout.current) {
|
@@ -7183,7 +7185,7 @@ var asButton = (Component, isDropdownButton) => {
|
|
7183
7185
|
tw(
|
7184
7186
|
"inline-block border-0 rounded-sm transition whitespace-nowrap focus:outline-none relative text-center",
|
7185
7187
|
{
|
7186
|
-
"text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-
|
7188
|
+
"text-default p-2 active:text-default active:bg-transparent hover:text-intense hover:bg-icon-button-hover focus-visible:text-intense focus-visible:bg-muted disabled:text-inactive disabled:bg-transparent": isIconOnlyButton,
|
7187
7189
|
"typography-default-strong": !dense && !isIconOnlyButton && kind !== "text",
|
7188
7190
|
"typography-small-strong": dense && !isIconOnlyButton && kind !== "text",
|
7189
7191
|
"py-3 px-4": !dense && isButton,
|
@@ -9616,6 +9618,7 @@ var Wrapper = React50.forwardRef(
|
|
9616
9618
|
);
|
9617
9619
|
|
9618
9620
|
// src/molecules/Combobox/Combobox.tsx
|
9621
|
+
var import_smallCross2 = __toESM(require_smallCross());
|
9619
9622
|
var ComboboxBase = (_a) => {
|
9620
9623
|
var _b = _a, {
|
9621
9624
|
id,
|
@@ -9688,7 +9691,8 @@ var ComboboxBase = (_a) => {
|
|
9688
9691
|
highlightedIndex,
|
9689
9692
|
inputValue,
|
9690
9693
|
getItemProps,
|
9691
|
-
selectedItem
|
9694
|
+
selectedItem,
|
9695
|
+
selectItem
|
9692
9696
|
} = useCombobox({
|
9693
9697
|
id,
|
9694
9698
|
selectedItem: value,
|
@@ -9761,10 +9765,25 @@ var ComboboxBase = (_a) => {
|
|
9761
9765
|
(_a3 = inputProps.onKeyDown) == null ? void 0 : _a3.call(inputProps, e);
|
9762
9766
|
},
|
9763
9767
|
onKeyUp: (e) => e.stopPropagation()
|
9764
|
-
})), !readOnly && /* @__PURE__ */ React51.createElement(
|
9768
|
+
})), !readOnly && /* @__PURE__ */ React51.createElement(Box.Flex, {
|
9769
|
+
alignItems: "center",
|
9770
|
+
gap: "2"
|
9771
|
+
}, !!inputProps.value && !disabled && /* @__PURE__ */ React51.createElement("div", {
|
9772
|
+
className: tw("group-hover:opacity-100", {
|
9773
|
+
"opacity-0": !hasFocus,
|
9774
|
+
"opacity-100": hasFocus
|
9775
|
+
})
|
9776
|
+
}, /* @__PURE__ */ React51.createElement(Button.Icon, {
|
9777
|
+
icon: import_smallCross2.default,
|
9778
|
+
onClick: () => selectItem(null),
|
9779
|
+
onFocus: () => setFocus(true),
|
9780
|
+
onBlur: () => setFocus(false),
|
9781
|
+
"aria-label": "Clear selection",
|
9782
|
+
dense: true
|
9783
|
+
})), /* @__PURE__ */ React51.createElement(Select.Toggle, __spreadValues({
|
9765
9784
|
hasFocus,
|
9766
9785
|
isOpen
|
9767
|
-
}, getToggleButtonProps({ disabled })))), isOpen && /* @__PURE__ */ React51.createElement(PopoverOverlay, {
|
9786
|
+
}, getToggleButtonProps({ disabled }))))), isOpen && /* @__PURE__ */ React51.createElement(PopoverOverlay, {
|
9768
9787
|
ref: popoverRef,
|
9769
9788
|
triggerRef: targetRef,
|
9770
9789
|
state,
|
@@ -11923,7 +11942,7 @@ var DataList2 = (_a) => {
|
|
11923
11942
|
getRowCheckboxLabel = getDefaultRowCheckboxLabel,
|
11924
11943
|
getGroupCheckboxLabel = getDefaultGroupCheckboxLabel,
|
11925
11944
|
selectedRows,
|
11926
|
-
defaultSelectedRows,
|
11945
|
+
defaultSelectedRows = [],
|
11927
11946
|
onSelectionChange,
|
11928
11947
|
toolbar
|
11929
11948
|
} = _b, rest = __objRest(_b, [
|
@@ -12002,7 +12021,9 @@ var DataList2 = (_a) => {
|
|
12002
12021
|
const allRows = flattenRows(rows);
|
12003
12022
|
const totalSelected = (_b2 = selected == null ? void 0 : selected.length) != null ? _b2 : 0;
|
12004
12023
|
const allEnabledRowIds = compact(
|
12005
|
-
allRows.map(
|
12024
|
+
allRows.map(
|
12025
|
+
(row, index) => (disabled == null ? void 0 : disabled(row, index, sortedRows)) || (selectionDisabled == null ? void 0 : selectionDisabled(row, index, sortedRows)) ? void 0 : row.id
|
12026
|
+
)
|
12006
12027
|
);
|
12007
12028
|
const allRowsSelected = totalSelected >= allEnabledRowIds.length;
|
12008
12029
|
return /* @__PURE__ */ React72.createElement(DataListContext.Provider, {
|
@@ -13642,7 +13663,7 @@ import omit12 from "lodash/omit";
|
|
13642
13663
|
|
13643
13664
|
// src/molecules/MultiInput/InputChip.tsx
|
13644
13665
|
import React92 from "react";
|
13645
|
-
var
|
13666
|
+
var import_smallCross3 = __toESM(require_smallCross());
|
13646
13667
|
var InputChip = React92.forwardRef(
|
13647
13668
|
(_a, ref) => {
|
13648
13669
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
@@ -13674,7 +13695,7 @@ var InputChip = React92.forwardRef(
|
|
13674
13695
|
role: "button",
|
13675
13696
|
"aria-label": `Remove ${String(children)}`
|
13676
13697
|
}), !disabled && /* @__PURE__ */ React92.createElement(Icon, {
|
13677
|
-
icon:
|
13698
|
+
icon: import_smallCross3.default,
|
13678
13699
|
className: tw({
|
13679
13700
|
"text-danger-default": invalid,
|
13680
13701
|
"text-default": !invalid
|
package/dist/tailwind.config.js
CHANGED
@@ -70,6 +70,7 @@ const originalTheme = {
|
|
70
70
|
'status-warning': 'var(--aquarium-colors-warning-5)',
|
71
71
|
'status-danger': 'var(--aquarium-colors-error-5)',
|
72
72
|
'status-success': 'var(--aquarium-colors-success-5)',
|
73
|
+
'icon-button-hover': 'rgba(25,25,29,.05)', // rgb value is from grey-100
|
73
74
|
},
|
74
75
|
textColor: {
|
75
76
|
'inactive': 'var(--aquarium-colors-grey-40)',
|
package/dist/tailwind.theme.json
CHANGED
@@ -385,7 +385,8 @@
|
|
385
385
|
"status-info": "var(--aquarium-background-color-status-info)",
|
386
386
|
"status-warning": "var(--aquarium-background-color-status-warning)",
|
387
387
|
"status-danger": "var(--aquarium-background-color-status-danger)",
|
388
|
-
"status-success": "var(--aquarium-background-color-status-success)"
|
388
|
+
"status-success": "var(--aquarium-background-color-status-success)",
|
389
|
+
"icon-button-hover": "rgba(25,25,29,.05)"
|
389
390
|
},
|
390
391
|
"textColor": {
|
391
392
|
"error-100": "var(--aquarium-colors-error-100, #aa0000)",
|