@aivenio/aquarium 1.7.0 → 1.8.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 +1 -1
- package/dist/_variables_timescale.scss +1 -1
- package/dist/atoms.cjs +109 -94
- package/dist/atoms.mjs +108 -94
- package/dist/src/common/Link/Link.d.ts +3 -0
- package/dist/src/common/Link/Link.js +19 -0
- package/dist/src/common/Popover/Popover.js +2 -2
- package/dist/src/common/index.d.ts +1 -0
- package/dist/src/common/index.js +2 -1
- package/dist/src/components/Avatar/Avatar.js +2 -1
- package/dist/src/components/Badge/Badge.js +2 -1
- package/dist/src/components/Button/Button.js +3 -2
- package/dist/src/components/Checkbox/Checkbox.js +3 -1
- package/dist/src/components/CheckboxGroup/CheckboxGroup.js +2 -1
- package/dist/src/components/Chip/Chip.js +2 -1
- package/dist/src/components/Combobox/Combobox.d.ts +1 -1
- package/dist/src/components/Combobox/Combobox.js +6 -4
- package/dist/src/components/DropdownMenu/DropdownMenu.js +5 -1
- package/dist/src/components/Link/Link.d.ts +5 -0
- package/dist/src/components/Link/Link.js +4 -0
- package/dist/src/components/NativeSelect/NativeSelect.js +3 -1
- package/dist/src/components/ProgressBar/ProgressBar.js +4 -2
- package/dist/src/components/RadioButton/RadioButton.js +3 -1
- package/dist/src/components/RadioButtonGroup/RadioButtonGroup.js +2 -1
- package/dist/src/components/Select/Select.js +2 -1
- package/dist/src/components/Stepper/Stepper.js +2 -1
- package/dist/src/components/Switch/Switch.js +3 -1
- package/dist/src/components/SwitchGroup/SwitchGroup.js +2 -1
- package/dist/src/components/Textarea/Textarea.js +3 -1
- package/dist/src/components/Timeline/Timeline.js +2 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/components/index.js +2 -1
- package/dist/src/utils/constants.d.ts +2 -0
- package/dist/src/utils/constants.js +4 -2
- package/dist/src/utils/form/HelperText/HelperText.js +2 -1
- package/dist/styles.css +19 -16
- package/dist/styles_timescaledb.css +19 -16
- package/dist/system.cjs +370 -322
- package/dist/system.mjs +337 -290
- package/dist/tailwind.config.js +1 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
package/dist/atoms.mjs
CHANGED
@@ -2451,6 +2451,12 @@ var Arrow = (props) => {
|
|
2451
2451
|
}, props));
|
2452
2452
|
};
|
2453
2453
|
|
2454
|
+
// src/utils/constants.ts
|
2455
|
+
var ghostButtonStyle = tw(
|
2456
|
+
"text-primary-80 active:text-primary-70 focus-visible:text-grey-90 hover:text-primary-70 disabled:text-primary-40"
|
2457
|
+
);
|
2458
|
+
var linkStyle = classNames(ghostButtonStyle, tw("visited:text-primary-80"));
|
2459
|
+
|
2454
2460
|
// src/components/Button/Button.tsx
|
2455
2461
|
var import_chevronDown = __toESM(require_chevronDown());
|
2456
2462
|
var import_loading = __toESM(require_loading());
|
@@ -2463,9 +2469,7 @@ var COLOR_CLASSNAMES = {
|
|
2463
2469
|
"focus-visible:ring-2 focus-visible:ring-grey-50 focus-visible:text-grey-80",
|
2464
2470
|
"hover:ring-grey-50 hover:text-grey-80 disabled:text-grey-30 disabled:bg-grey-0 disabled:ring-grey-20"
|
2465
2471
|
),
|
2466
|
-
"ghost":
|
2467
|
-
"text-primary-80 active:text-primary-70 focus-visible:text-grey-90 hover:text-primary-70 disabled:text-primary-40"
|
2468
|
-
),
|
2472
|
+
"ghost": ghostButtonStyle,
|
2469
2473
|
"secondary-ghost": tw(
|
2470
2474
|
"text-grey-60 active:text-grey-50 focus-visible:text-grey-80 hover:text-grey-80 disabled:text-grey-30"
|
2471
2475
|
)
|
@@ -3378,11 +3382,20 @@ var InputGroup = (_a) => {
|
|
3378
3382
|
}), children);
|
3379
3383
|
};
|
3380
3384
|
|
3381
|
-
// src/common/
|
3385
|
+
// src/common/Link/Link.tsx
|
3382
3386
|
import React19 from "react";
|
3387
|
+
var Link = (_a) => {
|
3388
|
+
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
3389
|
+
return /* @__PURE__ */ React19.createElement("a", __spreadValues({
|
3390
|
+
className: classNames(className, linkStyle)
|
3391
|
+
}, props), children);
|
3392
|
+
};
|
3393
|
+
|
3394
|
+
// src/common/Modal/Modal.tsx
|
3395
|
+
import React20 from "react";
|
3383
3396
|
var Modal = (_a) => {
|
3384
3397
|
var _b = _a, { children, className, open } = _b, rest = __objRest(_b, ["children", "className", "open"]);
|
3385
|
-
return open ? /* @__PURE__ */
|
3398
|
+
return open ? /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3386
3399
|
className: classNames(
|
3387
3400
|
tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
3388
3401
|
className
|
@@ -3391,14 +3404,14 @@ var Modal = (_a) => {
|
|
3391
3404
|
};
|
3392
3405
|
Modal.BackDrop = (_a) => {
|
3393
3406
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
3394
|
-
return /* @__PURE__ */
|
3407
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3395
3408
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-navyBlue-100 opacity-70"), className)
|
3396
3409
|
}));
|
3397
3410
|
};
|
3398
|
-
Modal.Dialog =
|
3411
|
+
Modal.Dialog = React20.forwardRef(
|
3399
3412
|
(_a, ref) => {
|
3400
3413
|
var _b = _a, { children, className, size = "sm" } = _b, rest = __objRest(_b, ["children", "className", "size"]);
|
3401
|
-
return /* @__PURE__ */
|
3414
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({
|
3402
3415
|
ref,
|
3403
3416
|
"aria-modal": "true"
|
3404
3417
|
}, rest), {
|
@@ -3416,31 +3429,31 @@ Modal.Dialog = React19.forwardRef(
|
|
3416
3429
|
);
|
3417
3430
|
Modal.Header = (_a) => {
|
3418
3431
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3419
|
-
return /* @__PURE__ */
|
3432
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3420
3433
|
className: classNames(tw("px-7 py-6 gap-3 flex items-center"), className)
|
3421
3434
|
}), children);
|
3422
3435
|
};
|
3423
3436
|
Modal.HeaderImage = (_a) => {
|
3424
3437
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
3425
3438
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
3426
|
-
return backgroundImage ? /* @__PURE__ */
|
3439
|
+
return backgroundImage ? /* @__PURE__ */ React20.createElement("img", __spreadProps(__spreadValues({
|
3427
3440
|
"aria-hidden": true,
|
3428
3441
|
src: backgroundImage != null ? backgroundImage : void 0
|
3429
3442
|
}, rest), {
|
3430
3443
|
className: classNames(common, tw("object-cover"), className)
|
3431
|
-
})) : /* @__PURE__ */
|
3444
|
+
})) : /* @__PURE__ */ React20.createElement("div", {
|
3432
3445
|
className: classNames(common, tw("bg-grey-5"), className)
|
3433
3446
|
});
|
3434
3447
|
};
|
3435
3448
|
Modal.CloseButtonContainer = (_a) => {
|
3436
3449
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
3437
|
-
return /* @__PURE__ */
|
3450
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3438
3451
|
className: classNames(tw("absolute top-[20px] right-[28px]"), className)
|
3439
3452
|
}));
|
3440
3453
|
};
|
3441
3454
|
Modal.Title = (_a) => {
|
3442
3455
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3443
|
-
return /* @__PURE__ */
|
3456
|
+
return /* @__PURE__ */ React20.createElement(Typography, __spreadValues({
|
3444
3457
|
htmlTag: "h2",
|
3445
3458
|
variant: "subheading",
|
3446
3459
|
color: "grey-90",
|
@@ -3449,47 +3462,47 @@ Modal.Title = (_a) => {
|
|
3449
3462
|
};
|
3450
3463
|
Modal.Subtitle = (_a) => {
|
3451
3464
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
3452
|
-
return /* @__PURE__ */
|
3465
|
+
return /* @__PURE__ */ React20.createElement(Typography, __spreadValues({
|
3453
3466
|
variant: "small",
|
3454
3467
|
color: "grey-60"
|
3455
3468
|
}, rest), children);
|
3456
3469
|
};
|
3457
3470
|
Modal.TitleContainer = (_a) => {
|
3458
3471
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3459
|
-
return /* @__PURE__ */
|
3472
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3460
3473
|
className: classNames(tw("flex flex-col grow gap-2"), className)
|
3461
3474
|
}), children);
|
3462
3475
|
};
|
3463
3476
|
Modal.Body = (_a) => {
|
3464
3477
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
3465
|
-
return /* @__PURE__ */
|
3478
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3466
3479
|
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
3467
3480
|
style: __spreadValues({ maxHeight }, style)
|
3468
3481
|
}), children);
|
3469
3482
|
};
|
3470
3483
|
Modal.Footer = (_a) => {
|
3471
3484
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3472
|
-
return /* @__PURE__ */
|
3485
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3473
3486
|
className: classNames(tw("px-7 py-6"), className)
|
3474
3487
|
}), children);
|
3475
3488
|
};
|
3476
3489
|
Modal.Actions = (_a) => {
|
3477
3490
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3478
|
-
return /* @__PURE__ */
|
3491
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3479
3492
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
3480
3493
|
}), children);
|
3481
3494
|
};
|
3482
3495
|
|
3483
3496
|
// src/common/Popover/Popover.tsx
|
3484
|
-
import
|
3485
|
-
var PopoverPanel =
|
3497
|
+
import React21 from "react";
|
3498
|
+
var PopoverPanel = React21.forwardRef((_a, ref) => {
|
3486
3499
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
3487
|
-
return /* @__PURE__ */
|
3500
|
+
return /* @__PURE__ */ React21.createElement("div", __spreadValues({
|
3488
3501
|
ref,
|
3489
3502
|
className: classNames(
|
3490
3503
|
className,
|
3491
3504
|
tw(
|
3492
|
-
"rounded-sm shadow-16dp bg-white mt-1 focus-visible:outline-0 focus-visible:border-info-70 border border-grey-20
|
3505
|
+
"rounded-sm shadow-16dp bg-white mt-1 focus-visible:outline-0 focus-visible:border-info-70 border border-grey-20"
|
3493
3506
|
)
|
3494
3507
|
)
|
3495
3508
|
}, props), children);
|
@@ -3499,23 +3512,23 @@ var Popover = {
|
|
3499
3512
|
};
|
3500
3513
|
|
3501
3514
|
// src/common/PopoverDialog/PopoverDialog.tsx
|
3502
|
-
import
|
3515
|
+
import React22 from "react";
|
3503
3516
|
var Header = (_a) => {
|
3504
3517
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3505
|
-
return /* @__PURE__ */
|
3518
|
+
return /* @__PURE__ */ React22.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3506
3519
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
3507
3520
|
}), children);
|
3508
3521
|
};
|
3509
3522
|
var Title = (_a) => {
|
3510
3523
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3511
|
-
return /* @__PURE__ */
|
3524
|
+
return /* @__PURE__ */ React22.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
3512
3525
|
htmlTag: "h1",
|
3513
3526
|
variant: "small-strong"
|
3514
3527
|
}), children);
|
3515
3528
|
};
|
3516
3529
|
var Body = (_a) => {
|
3517
3530
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3518
|
-
return /* @__PURE__ */
|
3531
|
+
return /* @__PURE__ */ React22.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
3519
3532
|
htmlTag: "div",
|
3520
3533
|
variant: "caption",
|
3521
3534
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -3523,13 +3536,13 @@ var Body = (_a) => {
|
|
3523
3536
|
};
|
3524
3537
|
var Footer = (_a) => {
|
3525
3538
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3526
|
-
return /* @__PURE__ */
|
3539
|
+
return /* @__PURE__ */ React22.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3527
3540
|
className: classNames(tw("p-5"), className)
|
3528
3541
|
}), children);
|
3529
3542
|
};
|
3530
3543
|
var Actions2 = (_a) => {
|
3531
3544
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3532
|
-
return /* @__PURE__ */
|
3545
|
+
return /* @__PURE__ */ React22.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3533
3546
|
className: classNames(tw("flex gap-4"), className)
|
3534
3547
|
}), children);
|
3535
3548
|
};
|
@@ -3542,11 +3555,11 @@ var PopoverDialog = {
|
|
3542
3555
|
};
|
3543
3556
|
|
3544
3557
|
// src/common/RadioButton/RadioButton.tsx
|
3545
|
-
import
|
3546
|
-
var RadioButton =
|
3558
|
+
import React23 from "react";
|
3559
|
+
var RadioButton = React23.forwardRef(
|
3547
3560
|
(_a, ref) => {
|
3548
3561
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
3549
|
-
return /* @__PURE__ */
|
3562
|
+
return /* @__PURE__ */ React23.createElement("input", __spreadProps(__spreadValues({
|
3550
3563
|
id,
|
3551
3564
|
ref,
|
3552
3565
|
type: "radio",
|
@@ -3570,7 +3583,7 @@ var RadioButton = React22.forwardRef(
|
|
3570
3583
|
);
|
3571
3584
|
|
3572
3585
|
// src/common/Select/Select.tsx
|
3573
|
-
import
|
3586
|
+
import React24 from "react";
|
3574
3587
|
var import_chevronDown2 = __toESM(require_chevronDown());
|
3575
3588
|
var import_chevronUp = __toESM(require_chevronUp());
|
3576
3589
|
var import_search = __toESM(require_search());
|
@@ -3590,16 +3603,16 @@ function isOptionDisabledBuiltin(option) {
|
|
3590
3603
|
}
|
3591
3604
|
var getValues = (children) => {
|
3592
3605
|
var _a;
|
3593
|
-
const values =
|
3606
|
+
const values = React24.Children.map(children, (c) => {
|
3594
3607
|
var _a2;
|
3595
3608
|
return (_a2 = c == null ? void 0 : c.props) == null ? void 0 : _a2.value;
|
3596
3609
|
});
|
3597
3610
|
return (_a = values == null ? void 0 : values.filter((v) => v !== void 0 && v !== null)) != null ? _a : [];
|
3598
3611
|
};
|
3599
|
-
var InputContainer =
|
3612
|
+
var InputContainer = React24.forwardRef(
|
3600
3613
|
(_a, ref) => {
|
3601
3614
|
var _b = _a, { variant = "default", className } = _b, props = __objRest(_b, ["variant", "className"]);
|
3602
|
-
return /* @__PURE__ */
|
3615
|
+
return /* @__PURE__ */ React24.createElement("div", __spreadValues({
|
3603
3616
|
ref,
|
3604
3617
|
className: classNames(
|
3605
3618
|
className,
|
@@ -3618,9 +3631,9 @@ var InputContainer = React23.forwardRef(
|
|
3618
3631
|
}, props));
|
3619
3632
|
}
|
3620
3633
|
);
|
3621
|
-
var Input =
|
3634
|
+
var Input = React24.forwardRef((_a, ref) => {
|
3622
3635
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
3623
|
-
return /* @__PURE__ */
|
3636
|
+
return /* @__PURE__ */ React24.createElement("input", __spreadValues({
|
3624
3637
|
ref,
|
3625
3638
|
type: "text",
|
3626
3639
|
className: classNames(
|
@@ -3634,39 +3647,39 @@ var Input = React23.forwardRef((_a, ref) => {
|
|
3634
3647
|
)
|
3635
3648
|
}, props));
|
3636
3649
|
});
|
3637
|
-
var Menu =
|
3650
|
+
var Menu = React24.forwardRef(
|
3638
3651
|
(_a, ref) => {
|
3639
3652
|
var _b = _a, { maxHeight = "450px", className, children } = _b, props = __objRest(_b, ["maxHeight", "className", "children"]);
|
3640
|
-
return /* @__PURE__ */
|
3653
|
+
return /* @__PURE__ */ React24.createElement("ul", __spreadValues({
|
3641
3654
|
ref,
|
3642
3655
|
style: { maxHeight },
|
3643
3656
|
className
|
3644
3657
|
}, props), children);
|
3645
3658
|
}
|
3646
3659
|
);
|
3647
|
-
var NoResults =
|
3660
|
+
var NoResults = React24.forwardRef(
|
3648
3661
|
(_a, ref) => {
|
3649
3662
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
3650
|
-
return /* @__PURE__ */
|
3663
|
+
return /* @__PURE__ */ React24.createElement("li", __spreadProps(__spreadValues({
|
3651
3664
|
ref
|
3652
3665
|
}, rest), {
|
3653
3666
|
className: classNames(tw("p-3 text-grey-40 italic"), className)
|
3654
3667
|
}), children);
|
3655
3668
|
}
|
3656
3669
|
);
|
3657
|
-
var EmptyStateContainer2 =
|
3670
|
+
var EmptyStateContainer2 = React24.forwardRef((_a, ref) => {
|
3658
3671
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
3659
|
-
return /* @__PURE__ */
|
3672
|
+
return /* @__PURE__ */ React24.createElement("li", __spreadValues({
|
3660
3673
|
ref,
|
3661
3674
|
className: tw("border border-dashed border-grey-10 m-4 p-6")
|
3662
3675
|
}, props), children);
|
3663
3676
|
});
|
3664
|
-
var Divider = (props) => /* @__PURE__ */
|
3677
|
+
var Divider = (props) => /* @__PURE__ */ React24.createElement("div", __spreadValues({
|
3665
3678
|
className: tw("border-b-[1px] border-grey-5 mx-3 my-4")
|
3666
3679
|
}, props));
|
3667
|
-
var Group2 =
|
3680
|
+
var Group2 = React24.forwardRef((_a, ref) => {
|
3668
3681
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
3669
|
-
return /* @__PURE__ */
|
3682
|
+
return /* @__PURE__ */ React24.createElement("li", __spreadValues({
|
3670
3683
|
ref,
|
3671
3684
|
className: classNames(
|
3672
3685
|
className,
|
@@ -3677,10 +3690,10 @@ var Group2 = React23.forwardRef((_a, ref) => {
|
|
3677
3690
|
)
|
3678
3691
|
}, props), children);
|
3679
3692
|
});
|
3680
|
-
var Item2 =
|
3693
|
+
var Item2 = React24.forwardRef(
|
3681
3694
|
(_a, ref) => {
|
3682
3695
|
var _b = _a, { highlighted, selected, className, children } = _b, props = __objRest(_b, ["highlighted", "selected", "className", "children"]);
|
3683
|
-
return /* @__PURE__ */
|
3696
|
+
return /* @__PURE__ */ React24.createElement("li", __spreadValues({
|
3684
3697
|
ref,
|
3685
3698
|
className: classNames(className, "flex items-center gap-x-3 p-3 typography-small", {
|
3686
3699
|
"cursor-pointer": !props.disabled,
|
@@ -3688,17 +3701,17 @@ var Item2 = React23.forwardRef(
|
|
3688
3701
|
"text-grey-20": props.disabled,
|
3689
3702
|
"hover:bg-grey-0": !props.disabled
|
3690
3703
|
})
|
3691
|
-
}, props), /* @__PURE__ */
|
3704
|
+
}, props), /* @__PURE__ */ React24.createElement("span", {
|
3692
3705
|
className: tw("grow flex gap-x-3")
|
3693
|
-
}, children), selected && /* @__PURE__ */
|
3706
|
+
}, children), selected && /* @__PURE__ */ React24.createElement(InlineIcon, {
|
3694
3707
|
icon: import_tick3.default
|
3695
3708
|
}));
|
3696
3709
|
}
|
3697
3710
|
);
|
3698
|
-
var ActionItem =
|
3711
|
+
var ActionItem = React24.forwardRef(
|
3699
3712
|
(_a, ref) => {
|
3700
3713
|
var _b = _a, { className, dense, icon, onClick, children } = _b, props = __objRest(_b, ["className", "dense", "icon", "onClick", "children"]);
|
3701
|
-
return /* @__PURE__ */
|
3714
|
+
return /* @__PURE__ */ React24.createElement("li", __spreadValues({
|
3702
3715
|
ref,
|
3703
3716
|
role: "button",
|
3704
3717
|
onClick: () => !props.disabled && (onClick == null ? void 0 : onClick()),
|
@@ -3709,21 +3722,21 @@ var ActionItem = React23.forwardRef(
|
|
3709
3722
|
"text-grey-20": props.disabled,
|
3710
3723
|
"hover:text-primary-70": !props.disabled
|
3711
3724
|
})
|
3712
|
-
}, props), icon && /* @__PURE__ */
|
3725
|
+
}, props), icon && /* @__PURE__ */ React24.createElement(InlineIcon, {
|
3713
3726
|
icon
|
3714
3727
|
}), children);
|
3715
3728
|
}
|
3716
3729
|
);
|
3717
|
-
var Toggle =
|
3730
|
+
var Toggle = React24.forwardRef((_a, ref) => {
|
3718
3731
|
var _b = _a, { hasFocus, isOpen } = _b, props = __objRest(_b, ["hasFocus", "isOpen"]);
|
3719
3732
|
var _a2;
|
3720
|
-
return /* @__PURE__ */
|
3733
|
+
return /* @__PURE__ */ React24.createElement("button", __spreadProps(__spreadValues({
|
3721
3734
|
ref,
|
3722
3735
|
type: "button",
|
3723
3736
|
"aria-label": "Toggle"
|
3724
3737
|
}, props), {
|
3725
3738
|
className: tw("grow-0 leading-none", { "cursor-not-allowed": (_a2 = props.disabled) != null ? _a2 : false })
|
3726
|
-
}), /* @__PURE__ */
|
3739
|
+
}), /* @__PURE__ */ React24.createElement(InlineIcon, {
|
3727
3740
|
color: props.disabled ? "grey-40" : "grey-70",
|
3728
3741
|
icon: hasFocus ? import_search.default : isOpen ? import_chevronUp.default : import_chevronDown2.default
|
3729
3742
|
}));
|
@@ -3742,11 +3755,11 @@ var Select = {
|
|
3742
3755
|
};
|
3743
3756
|
|
3744
3757
|
// src/common/Stepper/Stepper.tsx
|
3745
|
-
import
|
3758
|
+
import React25 from "react";
|
3746
3759
|
var import_tick4 = __toESM(require_tick());
|
3747
3760
|
var Stepper = (_a) => {
|
3748
3761
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
3749
|
-
return /* @__PURE__ */
|
3762
|
+
return /* @__PURE__ */ React25.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3750
3763
|
className: classNames(className)
|
3751
3764
|
}));
|
3752
3765
|
};
|
@@ -3760,7 +3773,7 @@ var ConnectorContainer = (_a) => {
|
|
3760
3773
|
"completed",
|
3761
3774
|
"dense"
|
3762
3775
|
]);
|
3763
|
-
return /* @__PURE__ */
|
3776
|
+
return /* @__PURE__ */ React25.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3764
3777
|
className: classNames(
|
3765
3778
|
tw("absolute w-full -left-1/2", {
|
3766
3779
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -3772,7 +3785,7 @@ var ConnectorContainer = (_a) => {
|
|
3772
3785
|
};
|
3773
3786
|
var Connector = (_a) => {
|
3774
3787
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
3775
|
-
return /* @__PURE__ */
|
3788
|
+
return /* @__PURE__ */ React25.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3776
3789
|
className: classNames(
|
3777
3790
|
tw("w-full", {
|
3778
3791
|
"bg-grey-20": !completed,
|
@@ -3786,7 +3799,7 @@ var Connector = (_a) => {
|
|
3786
3799
|
};
|
3787
3800
|
var Step = (_a) => {
|
3788
3801
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
3789
|
-
return /* @__PURE__ */
|
3802
|
+
return /* @__PURE__ */ React25.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3790
3803
|
className: classNames(
|
3791
3804
|
tw("flex flex-col items-center text-grey-90 relative text-center", {
|
3792
3805
|
"text-grey-20": state === "inactive"
|
@@ -3807,13 +3820,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
3807
3820
|
});
|
3808
3821
|
var Indicator = (_a) => {
|
3809
3822
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
3810
|
-
return /* @__PURE__ */
|
3823
|
+
return /* @__PURE__ */ React25.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3811
3824
|
className: classNames(
|
3812
3825
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
3813
3826
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
3814
3827
|
className
|
3815
3828
|
)
|
3816
|
-
}), state === "completed" ? /* @__PURE__ */
|
3829
|
+
}), state === "completed" ? /* @__PURE__ */ React25.createElement(InlineIcon, {
|
3817
3830
|
icon: import_tick4.default
|
3818
3831
|
}) : dense ? null : children);
|
3819
3832
|
};
|
@@ -3823,13 +3836,13 @@ ConnectorContainer.Connector = Connector;
|
|
3823
3836
|
Stepper.ConnectorContainer = ConnectorContainer;
|
3824
3837
|
|
3825
3838
|
// src/common/Switch/Switch.tsx
|
3826
|
-
import
|
3827
|
-
var Switch =
|
3839
|
+
import React26 from "react";
|
3840
|
+
var Switch = React26.forwardRef(
|
3828
3841
|
(_a, ref) => {
|
3829
3842
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
3830
|
-
return /* @__PURE__ */
|
3843
|
+
return /* @__PURE__ */ React26.createElement("span", {
|
3831
3844
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
3832
|
-
}, /* @__PURE__ */
|
3845
|
+
}, /* @__PURE__ */ React26.createElement("input", __spreadProps(__spreadValues({
|
3833
3846
|
id,
|
3834
3847
|
ref,
|
3835
3848
|
type: "checkbox",
|
@@ -3848,7 +3861,7 @@ var Switch = React25.forwardRef(
|
|
3848
3861
|
),
|
3849
3862
|
readOnly,
|
3850
3863
|
disabled
|
3851
|
-
})), /* @__PURE__ */
|
3864
|
+
})), /* @__PURE__ */ React26.createElement("span", {
|
3852
3865
|
className: tw(
|
3853
3866
|
"pointer-events-none rounded-full absolute inline-block transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
3854
3867
|
"bg-white peer-disabled/switch:bg-grey-0 left-2 peer-checked/switch:left-1",
|
@@ -3861,32 +3874,32 @@ var Switch = React25.forwardRef(
|
|
3861
3874
|
);
|
3862
3875
|
|
3863
3876
|
// src/common/Table/Table.tsx
|
3864
|
-
import
|
3877
|
+
import React27 from "react";
|
3865
3878
|
var import_chevronDown3 = __toESM(require_chevronDown());
|
3866
3879
|
var import_chevronUp2 = __toESM(require_chevronUp());
|
3867
|
-
var HeadContext =
|
3880
|
+
var HeadContext = React27.createContext(null);
|
3868
3881
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
3869
3882
|
var Table = (_a) => {
|
3870
3883
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
3871
|
-
return /* @__PURE__ */
|
3884
|
+
return /* @__PURE__ */ React27.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
3872
3885
|
className: classNames(tableClassNames, className),
|
3873
3886
|
"aria-label": ariaLabel
|
3874
3887
|
}), children);
|
3875
3888
|
};
|
3876
3889
|
var TableHead = (_a) => {
|
3877
3890
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
3878
|
-
return /* @__PURE__ */
|
3891
|
+
return /* @__PURE__ */ React27.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ React27.createElement("tr", null, /* @__PURE__ */ React27.createElement(HeadContext.Provider, {
|
3879
3892
|
value: { children, sticky }
|
3880
3893
|
}, children)));
|
3881
3894
|
};
|
3882
3895
|
var TableBody = (_a) => {
|
3883
3896
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
3884
|
-
return /* @__PURE__ */
|
3897
|
+
return /* @__PURE__ */ React27.createElement("tbody", __spreadValues({}, rest), children);
|
3885
3898
|
};
|
3886
3899
|
var rowClassNames = tw("children:border-grey-10 children:last:border-b-0 hover:bg-grey-0");
|
3887
3900
|
var TableRow = (_a) => {
|
3888
3901
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3889
|
-
return /* @__PURE__ */
|
3902
|
+
return /* @__PURE__ */ React27.createElement("tr", __spreadProps(__spreadValues({}, rest), {
|
3890
3903
|
className: classNames(rowClassNames, className)
|
3891
3904
|
}), children);
|
3892
3905
|
};
|
@@ -3902,25 +3915,25 @@ var getHeadCellClassNames = (sticky = true) => {
|
|
3902
3915
|
};
|
3903
3916
|
var TableCell = (_a) => {
|
3904
3917
|
var _b = _a, { children, className, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "align"]);
|
3905
|
-
const headContext =
|
3906
|
-
return headContext ? /* @__PURE__ */
|
3918
|
+
const headContext = React27.useContext(HeadContext);
|
3919
|
+
return headContext ? /* @__PURE__ */ React27.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
3907
3920
|
className: classNames(
|
3908
3921
|
cellClassNames,
|
3909
3922
|
getHeadCellClassNames(headContext.sticky),
|
3910
3923
|
getAlignClassNames(align),
|
3911
3924
|
className
|
3912
3925
|
)
|
3913
|
-
}), children) : /* @__PURE__ */
|
3926
|
+
}), children) : /* @__PURE__ */ React27.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
3914
3927
|
className: classNames(cellClassNames, getBodyCellClassNames(), getAlignClassNames(align), className)
|
3915
3928
|
}), children);
|
3916
3929
|
};
|
3917
3930
|
var TableSelectCell = (_a) => {
|
3918
3931
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
3919
|
-
return /* @__PURE__ */
|
3932
|
+
return /* @__PURE__ */ React27.createElement(Table.Cell, {
|
3920
3933
|
className: tw("leading-[0px]")
|
3921
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
3934
|
+
}, props.type === "radio" ? /* @__PURE__ */ React27.createElement(RadioButton, __spreadValues({
|
3922
3935
|
"aria-label": ariaLabel
|
3923
|
-
}, props)) : /* @__PURE__ */
|
3936
|
+
}, props)) : /* @__PURE__ */ React27.createElement(Checkbox, __spreadValues({
|
3924
3937
|
"aria-label": ariaLabel
|
3925
3938
|
}, props)));
|
3926
3939
|
};
|
@@ -3930,39 +3943,39 @@ var getSortCellIconClassNames = (active) => {
|
|
3930
3943
|
};
|
3931
3944
|
var TableSortCell = (_a) => {
|
3932
3945
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
3933
|
-
return /* @__PURE__ */
|
3946
|
+
return /* @__PURE__ */ React27.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
3934
3947
|
"aria-sort": direction
|
3935
|
-
}), /* @__PURE__ */
|
3948
|
+
}), /* @__PURE__ */ React27.createElement("span", {
|
3936
3949
|
className: getSortCellButtonClassNames(rest.align),
|
3937
3950
|
role: "button",
|
3938
3951
|
tabIndex: -1,
|
3939
3952
|
onClick
|
3940
|
-
}, children, /* @__PURE__ */
|
3953
|
+
}, children, /* @__PURE__ */ React27.createElement("div", {
|
3941
3954
|
"data-sort-icons": true,
|
3942
3955
|
className: tw("flex flex-col", {
|
3943
3956
|
"invisible group-hover:visible": direction === "none"
|
3944
3957
|
})
|
3945
|
-
}, /* @__PURE__ */
|
3958
|
+
}, /* @__PURE__ */ React27.createElement(InlineIcon, {
|
3946
3959
|
icon: import_chevronUp2.default,
|
3947
3960
|
className: getSortCellIconClassNames(direction === "descending")
|
3948
|
-
}), /* @__PURE__ */
|
3961
|
+
}), /* @__PURE__ */ React27.createElement(InlineIcon, {
|
3949
3962
|
icon: import_chevronDown3.default,
|
3950
3963
|
className: getSortCellIconClassNames(direction === "ascending")
|
3951
3964
|
}))));
|
3952
3965
|
};
|
3953
|
-
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
3966
|
+
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ React27.createElement("div", {
|
3954
3967
|
className: tw("flex gap-4 items-center")
|
3955
|
-
}, image && /* @__PURE__ */
|
3968
|
+
}, image && /* @__PURE__ */ React27.createElement("img", {
|
3956
3969
|
src: image,
|
3957
3970
|
alt: imageAlt,
|
3958
3971
|
style: { width: imageSize, height: imageSize }
|
3959
|
-
}), /* @__PURE__ */
|
3960
|
-
Table.Head =
|
3961
|
-
Table.Body =
|
3962
|
-
Table.Row =
|
3963
|
-
Table.Cell =
|
3964
|
-
Table.SortCell =
|
3965
|
-
Table.SelectCell =
|
3972
|
+
}), /* @__PURE__ */ React27.createElement("div", null, title, caption && /* @__PURE__ */ React27.createElement(Typography2.Caption, null, caption)));
|
3973
|
+
Table.Head = React27.memo(TableHead);
|
3974
|
+
Table.Body = React27.memo(TableBody);
|
3975
|
+
Table.Row = React27.memo(TableRow);
|
3976
|
+
Table.Cell = React27.memo(TableCell);
|
3977
|
+
Table.SortCell = React27.memo(TableSortCell);
|
3978
|
+
Table.SelectCell = React27.memo(TableSelectCell);
|
3966
3979
|
export {
|
3967
3980
|
Alert,
|
3968
3981
|
Card,
|
@@ -3972,6 +3985,7 @@ export {
|
|
3972
3985
|
DropdownMenu,
|
3973
3986
|
InputGroup,
|
3974
3987
|
Item3 as Item,
|
3988
|
+
Link,
|
3975
3989
|
Modal,
|
3976
3990
|
Popover,
|
3977
3991
|
PopoverDialog,
|
@@ -0,0 +1,19 @@
|
|
1
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
2
|
+
var t = {};
|
3
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
4
|
+
t[p] = s[p];
|
5
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
6
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
7
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
8
|
+
t[p[i]] = s[p[i]];
|
9
|
+
}
|
10
|
+
return t;
|
11
|
+
};
|
12
|
+
import React from 'react';
|
13
|
+
import { linkStyle } from '../../../src/utils/constants';
|
14
|
+
import { classNames } from '../../../src/utils/tailwind';
|
15
|
+
export const Link = (_a) => {
|
16
|
+
var { children, className } = _a, props = __rest(_a, ["children", "className"]);
|
17
|
+
return (React.createElement("a", Object.assign({ className: classNames(className, linkStyle) }, props), children));
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTGluay5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21tb24vTGluay9MaW5rLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQztBQUUxQixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDaEQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBSWhELE1BQU0sQ0FBQyxNQUFNLElBQUksR0FBd0IsQ0FBQyxFQUFpQyxFQUFFLEVBQUU7UUFBckMsRUFBRSxRQUFRLEVBQUUsU0FBUyxPQUFZLEVBQVAsS0FBSyxjQUEvQix5QkFBaUMsQ0FBRjtJQUFPLE9BQUEsQ0FDOUUseUNBQUcsU0FBUyxFQUFFLFVBQVUsQ0FBQyxTQUFTLEVBQUUsU0FBUyxDQUFDLElBQU0sS0FBSyxHQUN0RCxRQUFRLENBQ1AsQ0FDTCxDQUFBO0NBQUEsQ0FBQyJ9
|
@@ -13,9 +13,9 @@ import React from 'react';
|
|
13
13
|
import { classNames, tw } from '../../../src/utils/tailwind';
|
14
14
|
const PopoverPanel = React.forwardRef((_a, ref) => {
|
15
15
|
var { className, children } = _a, props = __rest(_a, ["className", "children"]);
|
16
|
-
return (React.createElement("div", Object.assign({ ref: ref, className: classNames(className, tw('rounded-sm shadow-16dp bg-white mt-1 focus-visible:outline-0 focus-visible:border-info-70 border border-grey-20
|
16
|
+
return (React.createElement("div", Object.assign({ ref: ref, className: classNames(className, tw('rounded-sm shadow-16dp bg-white mt-1 focus-visible:outline-0 focus-visible:border-info-70 border border-grey-20')) }, props), children));
|
17
17
|
});
|
18
18
|
export const Popover = {
|
19
19
|
Panel: PopoverPanel,
|
20
20
|
};
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUG9wb3Zlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9jb21tb24vUG9wb3Zlci9Qb3BvdmVyLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7OztBQUFBLE9BQU8sS0FBSyxNQUFNLE9BQU8sQ0FBQztBQUUxQixPQUFPLEVBQUUsVUFBVSxFQUFFLEVBQUUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBTXBELE1BQU0sWUFBWSxHQUFHLEtBQUssQ0FBQyxVQUFVLENBQW9DLENBQUMsRUFBaUMsRUFBRSxHQUFHLEVBQUUsRUFBRTtRQUExQyxFQUFFLFNBQVMsRUFBRSxRQUFRLE9BQVksRUFBUCxLQUFLLGNBQS9CLHlCQUFpQyxDQUFGO0lBQVksT0FBQSxDQUNuSCwyQ0FDRSxHQUFHLEVBQUUsR0FBRyxFQUNSLFNBQVMsRUFBRSxVQUFVLENBQ25CLFNBQVMsRUFDVCxFQUFFLENBQ0EsaUhBQWlILENBQ2xILENBQ0YsSUFDRyxLQUFLLEdBRVIsUUFBUSxDQUNMLENBQ1AsQ0FBQTtDQUFBLENBQUMsQ0FBQztBQU1ILE1BQU0sQ0FBQyxNQUFNLE9BQU8sR0FBWTtJQUM5QixLQUFLLEVBQUUsWUFBWTtDQUNwQixDQUFDIn0=
|
@@ -5,6 +5,7 @@ export * from './Chip/Chip';
|
|
5
5
|
export * from './Dialog/Dialog';
|
6
6
|
export * from './DropdownMenu/DropdownMenu';
|
7
7
|
export * from './InputGroup/InputGroup';
|
8
|
+
export * from './Link/Link';
|
8
9
|
export * from './Modal/Modal';
|
9
10
|
export * from './Popover/Popover';
|
10
11
|
export * from './PopoverDialog/PopoverDialog';
|
package/dist/src/common/index.js
CHANGED
@@ -5,6 +5,7 @@ export * from './Chip/Chip';
|
|
5
5
|
export * from './Dialog/Dialog';
|
6
6
|
export * from './DropdownMenu/DropdownMenu';
|
7
7
|
export * from './InputGroup/InputGroup';
|
8
|
+
export * from './Link/Link';
|
8
9
|
export * from './Modal/Modal';
|
9
10
|
export * from './Popover/Popover';
|
10
11
|
export * from './PopoverDialog/PopoverDialog';
|
@@ -13,4 +14,4 @@ export * from './Select/Select';
|
|
13
14
|
export * from './Stepper/Stepper';
|
14
15
|
export * from './Switch/Switch';
|
15
16
|
export * from './Table/Table';
|
16
|
-
//# sourceMappingURL=data:application/json;base64,
|
17
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tbW9uL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMscUJBQXFCLENBQUM7QUFDcEMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLDZCQUE2QixDQUFDO0FBQzVDLGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLCtCQUErQixDQUFDO0FBQzlDLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyxpQkFBaUIsQ0FBQztBQUNoQyxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxlQUFlLENBQUMifQ==
|