@aivenio/aquarium 3.0.0 → 3.1.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/atoms.cjs +22 -6
- package/dist/atoms.mjs +22 -6
- package/dist/src/atoms/Select/Select.js +6 -7
- package/dist/src/atoms/utils/index.d.ts +2 -2
- package/dist/src/atoms/utils/index.js +2 -2
- package/dist/src/icons/databaseArrow.d.ts +9 -0
- package/dist/src/icons/databaseArrow.js +11 -0
- package/dist/src/icons/index.d.ts +1 -0
- package/dist/src/icons/index.js +2 -1
- package/dist/src/molecules/DatePicker/Button.js +2 -2
- package/dist/src/molecules/DatePicker/DatePicker.js +5 -3
- package/dist/src/molecules/DatePicker/DateRangePicker.js +4 -3
- package/dist/src/molecules/NativeSelect/NativeSelect.js +3 -3
- package/dist/src/molecules/Select/Select.js +7 -17
- package/dist/src/utils/constants.js +2 -2
- package/dist/src/utils/form/FormControl/FormControl.d.ts +3 -2
- package/dist/src/utils/form/FormControl/FormControl.js +3 -3
- package/dist/src/utils/form/Label/Label.js +7 -4
- package/dist/styles.css +6 -3
- package/dist/system.cjs +69 -42
- package/dist/system.mjs +69 -42
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +30 -25
package/dist/system.mjs
CHANGED
@@ -1388,6 +1388,22 @@ var require_database02 = __commonJS({
|
|
1388
1388
|
}
|
1389
1389
|
});
|
1390
1390
|
|
1391
|
+
// src/icons/databaseArrow.js
|
1392
|
+
var require_databaseArrow = __commonJS({
|
1393
|
+
"src/icons/databaseArrow.js"(exports) {
|
1394
|
+
"use strict";
|
1395
|
+
var data = {
|
1396
|
+
"body": '<path fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M14 3.333c0 1.105-2.686 2-6 2s-6-.895-6-2m12 0c0-1.104-2.686-2-6-2s-6 .896-6 2m12 0v3.212M2 3.333v9.334c0 1.106 2.667 2 6 2m6-8.187c0 1.107-2.667 2-6 2s-6-.893-6-2m6 5.147c-3.333 0-6-.894-6-2m12.91 2.737-2.183-2.182m0 0-2.181 2.182m2.181-2.182v4.364"/>',
|
1397
|
+
"left": 0,
|
1398
|
+
"top": 0,
|
1399
|
+
"width": 16,
|
1400
|
+
"height": 16
|
1401
|
+
};
|
1402
|
+
exports.__esModule = true;
|
1403
|
+
exports.default = data;
|
1404
|
+
}
|
1405
|
+
});
|
1406
|
+
|
1391
1407
|
// src/icons/database.js
|
1392
1408
|
var require_database = __commonJS({
|
1393
1409
|
"src/icons/database.js"(exports) {
|
@@ -4471,7 +4487,7 @@ var InputContainer = React2.forwardRef(
|
|
4471
4487
|
"border-danger-default": variant === "error",
|
4472
4488
|
"hover:border-intense": variant !== "error" && variant !== "disabled" && variant !== "focused",
|
4473
4489
|
"border-info-default": variant === "focused",
|
4474
|
-
"bg-
|
4490
|
+
"bg-transparent": variant !== "disabled",
|
4475
4491
|
"cursor-not-allowed border-default bg-default": variant === "disabled"
|
4476
4492
|
}
|
4477
4493
|
),
|
@@ -4487,12 +4503,11 @@ var Input = React2.forwardRef(({ className, required, ...props }, ref) => /* @__
|
|
4487
4503
|
"aria-required": required,
|
4488
4504
|
className: classNames(
|
4489
4505
|
className,
|
4490
|
-
"grow rounded border-0 focus:outline-none px-[1px] my-1 min-w-0 typography-small disabled:cursor-not-allowed disabled:bg-default placeholder:text-inactive",
|
4506
|
+
"grow rounded border-0 focus:outline-none px-[1px] my-1 min-w-0 typography-small bg-transparent disabled:cursor-not-allowed disabled:bg-default placeholder:text-inactive",
|
4491
4507
|
{
|
4492
4508
|
"text-default": !props.disabled,
|
4493
4509
|
"text-inactive": props.disabled,
|
4494
|
-
"
|
4495
|
-
"cursor-default bg-transparent": props.readOnly
|
4510
|
+
"cursor-default": props.readOnly
|
4496
4511
|
}
|
4497
4512
|
),
|
4498
4513
|
...props
|
@@ -4504,7 +4519,7 @@ var Menu = React2.forwardRef(
|
|
4504
4519
|
{
|
4505
4520
|
ref,
|
4506
4521
|
style: { maxHeight },
|
4507
|
-
className: classNames(className, tw("text-default bg-
|
4522
|
+
className: classNames(className, tw("text-default bg-popover-content overflow-y-auto")),
|
4508
4523
|
...props
|
4509
4524
|
},
|
4510
4525
|
children
|
@@ -4533,7 +4548,7 @@ var Item = React2.forwardRef(
|
|
4533
4548
|
"li",
|
4534
4549
|
{
|
4535
4550
|
ref,
|
4536
|
-
className: classNames(className, "flex items-center gap-x-3 p-3 typography-small", {
|
4551
|
+
className: classNames("Aquarium-Select.Item", className, "flex items-center gap-x-3 p-3 typography-small", {
|
4537
4552
|
"cursor-pointer hover:bg-muted": !props["aria-disabled"],
|
4538
4553
|
"cursor-not-allowed opacity-40 grayscale": props["aria-disabled"],
|
4539
4554
|
"bg-muted": highlighted
|
@@ -4685,6 +4700,7 @@ var import_currencyDollar = __toESM(require_currencyDollar());
|
|
4685
4700
|
var import_dashboard = __toESM(require_dashboard());
|
4686
4701
|
var import_dataLineage = __toESM(require_dataLineage());
|
4687
4702
|
var import_database02 = __toESM(require_database02());
|
4703
|
+
var import_databaseArrow = __toESM(require_databaseArrow());
|
4688
4704
|
var import_database = __toESM(require_database());
|
4689
4705
|
var import_dataflow01 = __toESM(require_dataflow01());
|
4690
4706
|
var import_dataflow02 = __toESM(require_dataflow02());
|
@@ -7084,7 +7100,7 @@ var Arrow = (props) => {
|
|
7084
7100
|
var getCommonInputStyles = ({ readOnly, valid }) => tw(
|
7085
7101
|
"block w-full rounded-sm disabled:cursor-not-allowed disabled:border-default disabled:bg-default typography-small text-default disabled:text-inactive placeholder:text-inactive focus:outline-none",
|
7086
7102
|
{
|
7087
|
-
"px-3 py-3 bg-
|
7103
|
+
"px-3 py-3 bg-transparent": !readOnly,
|
7088
7104
|
"border-none resize-none cursor-default bg-transparent": readOnly,
|
7089
7105
|
"border border-danger-default": !valid && !readOnly,
|
7090
7106
|
"border border-default hover:border-intense focus:border-info-default": valid && !readOnly
|
@@ -9318,8 +9334,22 @@ import React49 from "react";
|
|
9318
9334
|
|
9319
9335
|
// src/utils/form/FormControl/FormControl.tsx
|
9320
9336
|
import React46 from "react";
|
9321
|
-
var FormControl = ({
|
9322
|
-
|
9337
|
+
var FormControl = ({
|
9338
|
+
className,
|
9339
|
+
inline,
|
9340
|
+
children,
|
9341
|
+
"data-testid": dataTestId
|
9342
|
+
}) => {
|
9343
|
+
return /* @__PURE__ */ React46.createElement(
|
9344
|
+
Box.Flex,
|
9345
|
+
{
|
9346
|
+
"data-testid": dataTestId,
|
9347
|
+
flexDirection: "column",
|
9348
|
+
display: inline ? "inline-flex" : "flex",
|
9349
|
+
className
|
9350
|
+
},
|
9351
|
+
children
|
9352
|
+
);
|
9323
9353
|
};
|
9324
9354
|
|
9325
9355
|
// src/utils/form/HelperText/HelperText.tsx
|
@@ -9421,11 +9451,13 @@ var LabelControl = ({
|
|
9421
9451
|
valid,
|
9422
9452
|
disabled,
|
9423
9453
|
className,
|
9454
|
+
htmlFor,
|
9455
|
+
"data-testid": dataTestId,
|
9424
9456
|
...rest
|
9425
9457
|
}) => {
|
9426
9458
|
const legacyError = error2 !== void 0 && valid === false;
|
9427
9459
|
const variant = !valid || legacyError ? "error" : disabled ? "disabled" : "default";
|
9428
|
-
return /* @__PURE__ */ React49.createElement(FormControl, { className }, !fieldset && /* @__PURE__ */ React49.createElement(Label2, { ...rest, variant }, children), fieldset && /* @__PURE__ */ React49.createElement("fieldset", { id: rest.id }, /* @__PURE__ */ React49.createElement("legend", { className: tw("w-full mb-2") }, /* @__PURE__ */ React49.createElement(LabelText, { ...rest, variant })), children), /* @__PURE__ */ React49.createElement(
|
9460
|
+
return /* @__PURE__ */ React49.createElement(FormControl, { "data-testid": dataTestId, className }, !fieldset && !!htmlFor && /* @__PURE__ */ React49.createElement(React49.Fragment, null, /* @__PURE__ */ React49.createElement(Label2, { ...rest, htmlFor, variant }), children), !fieldset && !htmlFor && /* @__PURE__ */ React49.createElement(Label2, { ...rest, variant }, children), fieldset && /* @__PURE__ */ React49.createElement("fieldset", { id: rest.id }, /* @__PURE__ */ React49.createElement("legend", { className: tw("w-full mb-2") }, /* @__PURE__ */ React49.createElement(LabelText, { ...rest, variant })), children), /* @__PURE__ */ React49.createElement(
|
9429
9461
|
HelperText,
|
9430
9462
|
{
|
9431
9463
|
messageId,
|
@@ -10145,7 +10177,6 @@ var _SelectBase = (props) => {
|
|
10145
10177
|
emptyState,
|
10146
10178
|
actions,
|
10147
10179
|
children,
|
10148
|
-
labelWrapper,
|
10149
10180
|
...rest
|
10150
10181
|
} = withDefaults;
|
10151
10182
|
const [hasFocus, setFocus] = useState8(false);
|
@@ -10230,7 +10261,7 @@ var _SelectBase = (props) => {
|
|
10230
10261
|
!readOnly && /* @__PURE__ */ React58.createElement(Select.Toggle, { disabled, isOpen, tabIndex: -1 })
|
10231
10262
|
);
|
10232
10263
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
10233
|
-
return /* @__PURE__ */ React58.createElement("div", { className: classNames("Aquarium-SelectBase", tw("relative")) },
|
10264
|
+
return /* @__PURE__ */ React58.createElement("div", { className: classNames("Aquarium-SelectBase", tw("relative")) }, input, isOpen && /* @__PURE__ */ React58.createElement(
|
10234
10265
|
PopoverOverlay,
|
10235
10266
|
{
|
10236
10267
|
state,
|
@@ -10254,7 +10285,7 @@ var _SelectBase = (props) => {
|
|
10254
10285
|
))))
|
10255
10286
|
));
|
10256
10287
|
};
|
10257
|
-
var SelectBase = (props) => /* @__PURE__ */ React58.createElement(_SelectBase, { ...props
|
10288
|
+
var SelectBase = (props) => /* @__PURE__ */ React58.createElement(_SelectBase, { ...props });
|
10258
10289
|
var SelectBaseSkeleton = () => /* @__PURE__ */ React58.createElement(Skeleton, { height: 38 });
|
10259
10290
|
SelectBase.Skeleton = SelectBaseSkeleton;
|
10260
10291
|
var Select2 = ({
|
@@ -10267,31 +10298,27 @@ var Select2 = ({
|
|
10267
10298
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
10268
10299
|
const labelProps = getLabelControlProps(props);
|
10269
10300
|
const baseProps = omit6(props, without(Object.keys(labelProps), "required"));
|
10270
|
-
|
10271
|
-
|
10272
|
-
const label = /* @__PURE__ */ React58.createElement(Label2, { id: `${id}-label`, htmlFor: `${id}-input`, variant, messageId: errorMessageId, ...labelProps });
|
10273
|
-
return /* @__PURE__ */ React58.createElement(FormControl, { className: "Aquarium-Select" }, /* @__PURE__ */ React58.createElement(
|
10274
|
-
_SelectBase,
|
10275
|
-
{
|
10276
|
-
...baseProps,
|
10277
|
-
...errorProps,
|
10278
|
-
id: `${id}-input`,
|
10279
|
-
options,
|
10280
|
-
disabled: props.disabled,
|
10281
|
-
valid: props.valid,
|
10282
|
-
labelWrapper: label
|
10283
|
-
}
|
10284
|
-
), /* @__PURE__ */ React58.createElement(
|
10285
|
-
HelperText,
|
10301
|
+
return /* @__PURE__ */ React58.createElement(
|
10302
|
+
LabelControl,
|
10286
10303
|
{
|
10304
|
+
id: `${id}-label`,
|
10305
|
+
htmlFor: `${id}-input`,
|
10287
10306
|
messageId: errorMessageId,
|
10288
|
-
|
10289
|
-
|
10290
|
-
|
10291
|
-
|
10292
|
-
|
10293
|
-
|
10294
|
-
|
10307
|
+
...labelProps,
|
10308
|
+
className: "Aquarium-Select"
|
10309
|
+
},
|
10310
|
+
/* @__PURE__ */ React58.createElement(
|
10311
|
+
_SelectBase,
|
10312
|
+
{
|
10313
|
+
...baseProps,
|
10314
|
+
...errorProps,
|
10315
|
+
id: `${id}-input`,
|
10316
|
+
options,
|
10317
|
+
disabled: props.disabled,
|
10318
|
+
valid: props.valid
|
10319
|
+
}
|
10320
|
+
)
|
10321
|
+
);
|
10295
10322
|
};
|
10296
10323
|
var SelectSkeleton = () => /* @__PURE__ */ React58.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React58.createElement(SelectBase.Skeleton, null));
|
10297
10324
|
Select2.Skeleton = SelectSkeleton;
|
@@ -12264,7 +12291,7 @@ var fieldBorder = tv2({
|
|
12264
12291
|
}
|
12265
12292
|
});
|
12266
12293
|
var fieldGroup = tv2({
|
12267
|
-
base: "group flex items-center bg-
|
12294
|
+
base: "group flex items-center bg-transparent border rounded-sm typography-small text-default px-3 py-3 overflow-hidden",
|
12268
12295
|
variants: fieldBorder.variants
|
12269
12296
|
});
|
12270
12297
|
|
@@ -12343,7 +12370,7 @@ var ButtonBase = ({
|
|
12343
12370
|
...props,
|
12344
12371
|
className: classNames(
|
12345
12372
|
className,
|
12346
|
-
tw("group-hover:opacity-100
|
12373
|
+
tw("group-hover:opacity-100 p-0", {
|
12347
12374
|
"opacity-0 group-focus-within:opacity-100": !hideWhenParentIsNotHoveredOrFocused
|
12348
12375
|
})
|
12349
12376
|
)
|
@@ -12502,7 +12529,7 @@ var createDatePickerBase = (variant) => ({
|
|
12502
12529
|
isInvalid: valid === false,
|
12503
12530
|
granularity: granularity ?? (variant === "datetime" && !hasSomeValue ? "minute" : void 0)
|
12504
12531
|
},
|
12505
|
-
/* @__PURE__ */ React83.createElement(FieldGroup, { className: tw("min-w-[210px] w-auto") }, /* @__PURE__ */ React83.createElement(DateInput, { className: tw("flex-1") }), clearSelectionEnabled && !disabled && /* @__PURE__ */ React83.createElement(DatePickerClearButton, null), /* @__PURE__ */ React83.createElement(CalendarButton, null)),
|
12532
|
+
/* @__PURE__ */ React83.createElement(FieldGroup, { className: tw("min-w-[210px] w-auto") }, /* @__PURE__ */ React83.createElement(DateInput, { className: tw("flex-1") }), /* @__PURE__ */ React83.createElement(Box.Flex, { alignItems: "center", gap: "2" }, clearSelectionEnabled && !disabled && /* @__PURE__ */ React83.createElement(DatePickerClearButton, null), /* @__PURE__ */ React83.createElement(CalendarButton, null))),
|
12506
12533
|
/* @__PURE__ */ React83.createElement(Popover2, { offset: 0 }, /* @__PURE__ */ React83.createElement(Dialog, null, /* @__PURE__ */ React83.createElement(Spacing, { gap: "3" }, /* @__PURE__ */ React83.createElement(Calendar, null), variant === "datetime" && /* @__PURE__ */ React83.createElement(PickerTimeField, { granularity }), errorMessage && /* @__PURE__ */ React83.createElement(Text, { slot: "errorMessage", className: tw("typography-caption text-danger-default max-w-[300px]") }, errorMessage))))
|
12507
12534
|
);
|
12508
12535
|
};
|
@@ -12642,7 +12669,7 @@ var createDateRangePickerBase = (variant) => ({
|
|
12642
12669
|
granularity: granularity ?? (variant === "datetime" && !hasSomeValue ? "minute" : void 0),
|
12643
12670
|
className: tw("group flex flex-col gap-1")
|
12644
12671
|
},
|
12645
|
-
/* @__PURE__ */ React85.createElement(FieldGroup, { className: tw("min-w-[200px] w-auto gap-2") }, /* @__PURE__ */ React85.createElement(DateInput, { slot: "start", className: tw("px-2 py-1") }), /* @__PURE__ */ React85.createElement("span", { "aria-hidden": true, className: tw("text-muted") }, "-"), /* @__PURE__ */ React85.createElement(DateInput, { slot: "end", className: tw("flex-1 px-2 py-1") }), clearSelectionEnabled && !disabled && /* @__PURE__ */ React85.createElement(DateRangePickerClearButton, null), /* @__PURE__ */ React85.createElement(CalendarButton, null)),
|
12672
|
+
/* @__PURE__ */ React85.createElement(FieldGroup, { className: tw("min-w-[200px] w-auto gap-2") }, /* @__PURE__ */ React85.createElement(DateInput, { slot: "start", className: tw("px-2 py-1") }), /* @__PURE__ */ React85.createElement("span", { "aria-hidden": true, className: tw("text-muted") }, "-"), /* @__PURE__ */ React85.createElement(DateInput, { slot: "end", className: tw("flex-1 px-2 py-1") }), /* @__PURE__ */ React85.createElement(Box.Flex, { alignItems: "center", gap: "2" }, clearSelectionEnabled && !disabled && /* @__PURE__ */ React85.createElement(DateRangePickerClearButton, null), /* @__PURE__ */ React85.createElement(CalendarButton, null))),
|
12646
12673
|
/* @__PURE__ */ React85.createElement(Popover2, { offset: 0 }, /* @__PURE__ */ React85.createElement(Dialog, null, /* @__PURE__ */ React85.createElement(Spacing, { gap: "3" }, /* @__PURE__ */ React85.createElement(RangeCalendar, null), variant === "datetime" && /* @__PURE__ */ React85.createElement(Box.Flex, { gap: "6" }, /* @__PURE__ */ React85.createElement("div", { className: tw("flex-1") }, /* @__PURE__ */ React85.createElement(PickerTimeField2, { granularity, part: "start" })), /* @__PURE__ */ React85.createElement("div", { className: tw("flex-1") }, /* @__PURE__ */ React85.createElement(PickerTimeField2, { granularity, part: "end" }))), errorMessage && /* @__PURE__ */ React85.createElement(Text2, { slot: "errorMessage", className: tw("typography-caption text-danger-default max-w-[300px]") }, errorMessage))))
|
12647
12674
|
);
|
12648
12675
|
};
|
@@ -14328,8 +14355,8 @@ var NativeSelectBase = React106.forwardRef(
|
|
14328
14355
|
tw(
|
14329
14356
|
"block w-full rounded-sm appearance-none disabled:cursor-not-allowed typography-small text-default placeholder:text-inactive focus:outline-none",
|
14330
14357
|
{
|
14331
|
-
"px-3 py-3 bg-
|
14332
|
-
"px-0 py-3 border-none": readOnly,
|
14358
|
+
"px-3 py-3 bg-transparent disabled:border-default disabled:bg-default disabled:text-inactive": !readOnly,
|
14359
|
+
"px-0 py-3 border-none bg-transparent": readOnly,
|
14333
14360
|
"border border-danger-default": !valid && !readOnly,
|
14334
14361
|
"border border-default hover:border-intense focus:border-info-default": valid && !readOnly
|
14335
14362
|
}
|