@aivenio/aquarium 1.3.0 → 1.4.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/_variables_timescale.scss +2 -1
- package/dist/atoms.cjs +129 -53
- package/dist/atoms.mjs +128 -53
- package/dist/src/common/RadioButton/RadioButton.js +5 -12
- package/dist/src/common/Stepper/Stepper.d.ts +33 -0
- package/dist/src/common/Stepper/Stepper.js +60 -0
- package/dist/src/common/Table/Table.js +2 -2
- package/dist/src/common/index.d.ts +1 -0
- package/dist/src/common/index.js +2 -1
- package/dist/src/components/Container/Container.d.ts +16 -0
- package/dist/src/components/Container/Container.js +18 -0
- package/dist/src/components/Stepper/Stepper.d.ts +24 -0
- package/dist/src/components/Stepper/Stepper.js +24 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.js +3 -1
- package/dist/styles.css +93 -38
- package/dist/styles_timescaledb.css +93 -38
- package/dist/system.cjs +640 -512
- package/dist/system.mjs +596 -470
- package/dist/tailwind.config.js +4 -1
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +1 -1
package/dist/_variables.scss
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
// Do not edit directly
|
3
|
-
// Generated on
|
3
|
+
// Generated on Mon, 30 Jan 2023 13:50:22 GMT
|
4
4
|
|
5
5
|
$border-radius-none: 0px !default;
|
6
6
|
$border-radius-sm: 0.125rem !default;
|
@@ -105,6 +105,7 @@ $box-shadow-16dp: 0px 16px 32px rgba(90, 91, 106, 0.12), 0px 8px 16px rgba(58, 5
|
|
105
105
|
$box-shadow-8dp: 0px 8px 16px rgba(90, 91, 106, 0.16), 0px 4px 8px rgba(58, 58, 68, 0.16) !default;
|
106
106
|
$box-shadow-4dp: 0px 4px 8px rgba(90, 91, 106, 0.20), 0px 2px 4px rgba(58, 58, 68, 0.20) !default;
|
107
107
|
$box-shadow-2dp: 0px 2px 4px rgba(90, 91, 106, 0.24), 0px 1px 2px rgba(58, 58, 68, 0.24) !default;
|
108
|
+
$box-shadow-white-inset: inset 0 0 0 3px rgba(255,255,255,1) !default;
|
108
109
|
$screens-default: 0px !default;
|
109
110
|
$screens-xs: 320px !default;
|
110
111
|
$screens-sm: 672px !default;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
|
2
2
|
// Do not edit directly
|
3
|
-
// Generated on
|
3
|
+
// Generated on Mon, 30 Jan 2023 13:50:23 GMT
|
4
4
|
|
5
5
|
$border-radius-none: 0px;
|
6
6
|
$border-radius-sm: 0.125rem;
|
@@ -105,6 +105,7 @@ $box-shadow-16dp: 0px 16px 32px rgba(90, 91, 106, 0.12), 0px 8px 16px rgba(58, 5
|
|
105
105
|
$box-shadow-8dp: 0px 8px 16px rgba(90, 91, 106, 0.16), 0px 4px 8px rgba(58, 58, 68, 0.16);
|
106
106
|
$box-shadow-4dp: 0px 4px 8px rgba(90, 91, 106, 0.20), 0px 2px 4px rgba(58, 58, 68, 0.20);
|
107
107
|
$box-shadow-2dp: 0px 2px 4px rgba(90, 91, 106, 0.24), 0px 1px 2px rgba(58, 58, 68, 0.24);
|
108
|
+
$box-shadow-white-inset: inset 0 0 0 3px rgba(255,255,255,1);
|
108
109
|
$screens-default: 0px;
|
109
110
|
$screens-xs: 320px;
|
110
111
|
$screens-sm: 672px;
|
package/dist/atoms.cjs
CHANGED
@@ -1392,6 +1392,7 @@ __export(common_exports, {
|
|
1392
1392
|
PopoverDialog: () => PopoverDialog,
|
1393
1393
|
RadioButton: () => RadioButton,
|
1394
1394
|
Select: () => Select,
|
1395
|
+
Stepper: () => Stepper,
|
1395
1396
|
Switch: () => Switch,
|
1396
1397
|
Table: () => Table,
|
1397
1398
|
cellClassNames: () => cellClassNames,
|
@@ -3334,33 +3335,26 @@ var import_react22 = __toESM(require("react"));
|
|
3334
3335
|
var RadioButton = import_react22.default.forwardRef(
|
3335
3336
|
(_a, ref) => {
|
3336
3337
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
3337
|
-
return /* @__PURE__ */ import_react22.default.createElement("
|
3338
|
-
className: classNames(tw("inline-flex justify-center items-center relative self-center"))
|
3339
|
-
}, /* @__PURE__ */ import_react22.default.createElement("input", __spreadProps(__spreadValues({
|
3338
|
+
return /* @__PURE__ */ import_react22.default.createElement("input", __spreadProps(__spreadValues({
|
3340
3339
|
id,
|
3341
3340
|
ref,
|
3342
3341
|
type: "radio",
|
3343
3342
|
name
|
3344
3343
|
}, props), {
|
3345
|
-
className:
|
3344
|
+
className: classNames(
|
3345
|
+
tw(
|
3346
|
+
"inline-flex justify-center items-center self-center appearance-none ",
|
3347
|
+
"w-5 h-5 p-[3px] rounded-full cursor-pointer border border-grey-20",
|
3348
|
+
"focus:border-info-70 checked:bg-navyBlue-100 checked:shadow-whiteInset",
|
3349
|
+
{
|
3350
|
+
"hover:border-grey-50 checked:border-navyBlue-100": !disabled,
|
3351
|
+
"cursor-not-allowed border-grey-5 bg-grey-0 checked:bg-opacity-40": disabled
|
3352
|
+
}
|
3353
|
+
)
|
3354
|
+
),
|
3346
3355
|
readOnly,
|
3347
3356
|
disabled
|
3348
|
-
}))
|
3349
|
-
className: tw(
|
3350
|
-
"rounded-full w-5 h-5 p-[3px] border cursor-pointer",
|
3351
|
-
"border-grey-20 peer-focus/radio:border-info-70",
|
3352
|
-
"peer-checked/radio:[&>*]:block",
|
3353
|
-
{
|
3354
|
-
"peer-checked/radio:border-navyBlue-100 peer-hover/radio:border-grey-50": !disabled,
|
3355
|
-
"border-grey-5 peer-checked/radio:[&>*]:opacity-40": disabled
|
3356
|
-
}
|
3357
|
-
)
|
3358
|
-
}, /* @__PURE__ */ import_react22.default.createElement("span", {
|
3359
|
-
style: { backgroundColor: "currentcolor" },
|
3360
|
-
className: tw("w-3 h-3 rounded-full hidden bg-navyBlue-100 pointer-events-none", {
|
3361
|
-
"peer-checked/radio:opacity-40": disabled
|
3362
|
-
})
|
3363
|
-
})));
|
3357
|
+
}));
|
3364
3358
|
}
|
3365
3359
|
);
|
3366
3360
|
|
@@ -3536,14 +3530,95 @@ var Select = {
|
|
3536
3530
|
Toggle
|
3537
3531
|
};
|
3538
3532
|
|
3539
|
-
// src/common/
|
3533
|
+
// src/common/Stepper/Stepper.tsx
|
3540
3534
|
var import_react24 = __toESM(require("react"));
|
3541
|
-
var
|
3535
|
+
var import_tick4 = __toESM(require_tick());
|
3536
|
+
var Stepper = (_a) => {
|
3537
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
3538
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3539
|
+
className: classNames(className)
|
3540
|
+
}));
|
3541
|
+
};
|
3542
|
+
var ConnectorContainer = (_a) => {
|
3543
|
+
var _b = _a, {
|
3544
|
+
className,
|
3545
|
+
completed,
|
3546
|
+
dense
|
3547
|
+
} = _b, rest = __objRest(_b, [
|
3548
|
+
"className",
|
3549
|
+
"completed",
|
3550
|
+
"dense"
|
3551
|
+
]);
|
3552
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3553
|
+
className: classNames(
|
3554
|
+
tw("absolute w-full -left-1/2", {
|
3555
|
+
"top-[3px] px-[14px]": Boolean(dense),
|
3556
|
+
"top-[14px] px-[20px]": !dense
|
3557
|
+
}),
|
3558
|
+
className
|
3559
|
+
)
|
3560
|
+
}));
|
3561
|
+
};
|
3562
|
+
var Connector = (_a) => {
|
3563
|
+
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
3564
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3565
|
+
className: classNames(
|
3566
|
+
tw("w-full", {
|
3567
|
+
"bg-grey-20": !completed,
|
3568
|
+
"bg-success-70": Boolean(completed),
|
3569
|
+
"h-[2px]": !dense,
|
3570
|
+
"h-[3px]": Boolean(dense)
|
3571
|
+
}),
|
3572
|
+
className
|
3573
|
+
)
|
3574
|
+
}));
|
3575
|
+
};
|
3576
|
+
var Step = (_a) => {
|
3577
|
+
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
3578
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3579
|
+
className: classNames(
|
3580
|
+
tw("flex flex-col items-center text-grey-90 relative text-center", {
|
3581
|
+
"text-grey-20": state === "inactive"
|
3582
|
+
}),
|
3583
|
+
className
|
3584
|
+
)
|
3585
|
+
}));
|
3586
|
+
};
|
3587
|
+
var getClassNames = (state) => tw("h-[32px] w-[32px] border-2", {
|
3588
|
+
"border-grey-90 bg-white": state === "active",
|
3589
|
+
"border-grey-20 bg-white": state === "inactive",
|
3590
|
+
"text-white bg-success-70 border-success-70": state === "completed"
|
3591
|
+
});
|
3592
|
+
var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
3593
|
+
"bg-grey-90": state === "active",
|
3594
|
+
"bg-grey-20": state === "inactive",
|
3595
|
+
"text-success-70": state === "completed"
|
3596
|
+
});
|
3597
|
+
var Indicator = (_a) => {
|
3598
|
+
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
3599
|
+
return /* @__PURE__ */ import_react24.default.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3600
|
+
className: classNames(
|
3601
|
+
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
3602
|
+
dense ? getDenseClassNames(state) : getClassNames(state),
|
3603
|
+
className
|
3604
|
+
)
|
3605
|
+
}), state === "completed" ? /* @__PURE__ */ import_react24.default.createElement(InlineIcon, {
|
3606
|
+
icon: import_tick4.default
|
3607
|
+
}) : dense ? null : children);
|
3608
|
+
};
|
3609
|
+
Step.Indicator = Indicator;
|
3610
|
+
Stepper.Step = Step;
|
3611
|
+
ConnectorContainer.Connector = Connector;
|
3612
|
+
Stepper.ConnectorContainer = ConnectorContainer;
|
3613
|
+
|
3614
|
+
// src/common/Switch/Switch.tsx
|
3615
|
+
var import_react25 = __toESM(require("react"));
|
3616
|
+
var Switch = import_react25.default.forwardRef(
|
3542
3617
|
(_a, ref) => {
|
3543
3618
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
3544
|
-
return /* @__PURE__ */
|
3619
|
+
return /* @__PURE__ */ import_react25.default.createElement("span", {
|
3545
3620
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
3546
|
-
}, /* @__PURE__ */
|
3621
|
+
}, /* @__PURE__ */ import_react25.default.createElement("input", __spreadProps(__spreadValues({
|
3547
3622
|
id,
|
3548
3623
|
ref,
|
3549
3624
|
type: "checkbox",
|
@@ -3552,7 +3627,7 @@ var Switch = import_react24.default.forwardRef(
|
|
3552
3627
|
className: tw("opacity-0 peer/switch w-0 h-0"),
|
3553
3628
|
readOnly,
|
3554
3629
|
disabled
|
3555
|
-
})), /* @__PURE__ */
|
3630
|
+
})), /* @__PURE__ */ import_react25.default.createElement("span", {
|
3556
3631
|
className: tw(
|
3557
3632
|
"rounded-full inline-block w-[34px] h-[20px] transition duration-300",
|
3558
3633
|
"peer-focus/switch:border border-info-70 bg-grey-20",
|
@@ -3561,7 +3636,7 @@ var Switch = import_react24.default.forwardRef(
|
|
3561
3636
|
"bg-grey-5 peer-checked/switch:opacity-40": disabled
|
3562
3637
|
}
|
3563
3638
|
)
|
3564
|
-
}), /* @__PURE__ */
|
3639
|
+
}), /* @__PURE__ */ import_react25.default.createElement("span", {
|
3565
3640
|
className: tw(
|
3566
3641
|
"rounded-full absolute inline-block transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
3567
3642
|
"bg-white peer-disabled/switch:bg-grey-0 left-2 peer-checked/switch:left-1",
|
@@ -3574,32 +3649,32 @@ var Switch = import_react24.default.forwardRef(
|
|
3574
3649
|
);
|
3575
3650
|
|
3576
3651
|
// src/common/Table/Table.tsx
|
3577
|
-
var
|
3652
|
+
var import_react26 = __toESM(require("react"));
|
3578
3653
|
var import_chevronDown3 = __toESM(require_chevronDown());
|
3579
3654
|
var import_chevronUp2 = __toESM(require_chevronUp());
|
3580
|
-
var HeadContext =
|
3655
|
+
var HeadContext = import_react26.default.createContext(null);
|
3581
3656
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
3582
3657
|
var Table = (_a) => {
|
3583
3658
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
3584
|
-
return /* @__PURE__ */
|
3659
|
+
return /* @__PURE__ */ import_react26.default.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
3585
3660
|
className: classNames(tableClassNames, className),
|
3586
3661
|
"aria-label": ariaLabel
|
3587
3662
|
}), children);
|
3588
3663
|
};
|
3589
3664
|
var TableHead = (_a) => {
|
3590
3665
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
3591
|
-
return /* @__PURE__ */
|
3666
|
+
return /* @__PURE__ */ import_react26.default.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ import_react26.default.createElement("tr", null, /* @__PURE__ */ import_react26.default.createElement(HeadContext.Provider, {
|
3592
3667
|
value: { children, sticky }
|
3593
3668
|
}, children)));
|
3594
3669
|
};
|
3595
3670
|
var TableBody = (_a) => {
|
3596
3671
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
3597
|
-
return /* @__PURE__ */
|
3672
|
+
return /* @__PURE__ */ import_react26.default.createElement("tbody", __spreadValues({}, rest), children);
|
3598
3673
|
};
|
3599
3674
|
var rowClassNames = tw("children:border-grey-10 children:last:border-b-0 hover:bg-grey-0");
|
3600
3675
|
var TableRow = (_a) => {
|
3601
3676
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3602
|
-
return /* @__PURE__ */
|
3677
|
+
return /* @__PURE__ */ import_react26.default.createElement("tr", __spreadProps(__spreadValues({}, rest), {
|
3603
3678
|
className: classNames(rowClassNames, className)
|
3604
3679
|
}), children);
|
3605
3680
|
};
|
@@ -3611,29 +3686,29 @@ var getBodyCellClassNames = (table = true) => tw("text-grey-70 py-3", {
|
|
3611
3686
|
var getAlignClassNames = (align) => tw({ "text-right": align === "right", "text-center": align === "center" });
|
3612
3687
|
var getHeadCellClassNames = (sticky = true) => {
|
3613
3688
|
const common = tw("py-[14px] text-left bg-white border-grey-40 text-grey-50 font-normal");
|
3614
|
-
return sticky ? classNames(common, tw("sticky top-0")) : common;
|
3689
|
+
return sticky ? classNames(common, tw("sticky top-0 z-10")) : common;
|
3615
3690
|
};
|
3616
3691
|
var TableCell = (_a) => {
|
3617
3692
|
var _b = _a, { children, className, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "align"]);
|
3618
|
-
const headContext =
|
3619
|
-
return headContext ? /* @__PURE__ */
|
3693
|
+
const headContext = import_react26.default.useContext(HeadContext);
|
3694
|
+
return headContext ? /* @__PURE__ */ import_react26.default.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
3620
3695
|
className: classNames(
|
3621
3696
|
cellClassNames,
|
3622
3697
|
getHeadCellClassNames(headContext.sticky),
|
3623
3698
|
getAlignClassNames(align),
|
3624
3699
|
className
|
3625
3700
|
)
|
3626
|
-
}), children) : /* @__PURE__ */
|
3701
|
+
}), children) : /* @__PURE__ */ import_react26.default.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
3627
3702
|
className: classNames(cellClassNames, getBodyCellClassNames(), getAlignClassNames(align), className)
|
3628
3703
|
}), children);
|
3629
3704
|
};
|
3630
3705
|
var TableSelectCell = (_a) => {
|
3631
3706
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
3632
|
-
return /* @__PURE__ */
|
3707
|
+
return /* @__PURE__ */ import_react26.default.createElement(Table.Cell, {
|
3633
3708
|
className: tw("leading-[0px]")
|
3634
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
3709
|
+
}, props.type === "radio" ? /* @__PURE__ */ import_react26.default.createElement(RadioButton, __spreadValues({
|
3635
3710
|
"aria-label": ariaLabel
|
3636
|
-
}, props)) : /* @__PURE__ */
|
3711
|
+
}, props)) : /* @__PURE__ */ import_react26.default.createElement(Checkbox, __spreadValues({
|
3637
3712
|
"aria-label": ariaLabel
|
3638
3713
|
}, props)));
|
3639
3714
|
};
|
@@ -3643,39 +3718,39 @@ var getSortCellIconClassNames = (active) => {
|
|
3643
3718
|
};
|
3644
3719
|
var TableSortCell = (_a) => {
|
3645
3720
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
3646
|
-
return /* @__PURE__ */
|
3721
|
+
return /* @__PURE__ */ import_react26.default.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
3647
3722
|
"aria-sort": direction
|
3648
|
-
}), /* @__PURE__ */
|
3723
|
+
}), /* @__PURE__ */ import_react26.default.createElement("span", {
|
3649
3724
|
className: getSortCellButtonClassNames(rest.align),
|
3650
3725
|
role: "button",
|
3651
3726
|
tabIndex: -1,
|
3652
3727
|
onClick
|
3653
|
-
}, children, /* @__PURE__ */
|
3728
|
+
}, children, /* @__PURE__ */ import_react26.default.createElement("div", {
|
3654
3729
|
"data-sort-icons": true,
|
3655
3730
|
className: tw("flex flex-col", {
|
3656
3731
|
"invisible group-hover:visible": direction === "none"
|
3657
3732
|
})
|
3658
|
-
}, /* @__PURE__ */
|
3733
|
+
}, /* @__PURE__ */ import_react26.default.createElement(InlineIcon, {
|
3659
3734
|
icon: import_chevronUp2.default,
|
3660
3735
|
className: getSortCellIconClassNames(direction === "descending")
|
3661
|
-
}), /* @__PURE__ */
|
3736
|
+
}), /* @__PURE__ */ import_react26.default.createElement(InlineIcon, {
|
3662
3737
|
icon: import_chevronDown3.default,
|
3663
3738
|
className: getSortCellIconClassNames(direction === "ascending")
|
3664
3739
|
}))));
|
3665
3740
|
};
|
3666
|
-
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
3741
|
+
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ import_react26.default.createElement("div", {
|
3667
3742
|
className: tw("flex gap-4 items-center")
|
3668
|
-
}, image && /* @__PURE__ */
|
3743
|
+
}, image && /* @__PURE__ */ import_react26.default.createElement("img", {
|
3669
3744
|
src: image,
|
3670
3745
|
alt: imageAlt,
|
3671
3746
|
style: { width: imageSize, height: imageSize }
|
3672
|
-
}), /* @__PURE__ */
|
3673
|
-
Table.Head =
|
3674
|
-
Table.Body =
|
3675
|
-
Table.Row =
|
3676
|
-
Table.Cell =
|
3677
|
-
Table.SortCell =
|
3678
|
-
Table.SelectCell =
|
3747
|
+
}), /* @__PURE__ */ import_react26.default.createElement("div", null, title, caption && /* @__PURE__ */ import_react26.default.createElement(Typography2.Caption, null, caption)));
|
3748
|
+
Table.Head = import_react26.default.memo(TableHead);
|
3749
|
+
Table.Body = import_react26.default.memo(TableBody);
|
3750
|
+
Table.Row = import_react26.default.memo(TableRow);
|
3751
|
+
Table.Cell = import_react26.default.memo(TableCell);
|
3752
|
+
Table.SortCell = import_react26.default.memo(TableSortCell);
|
3753
|
+
Table.SelectCell = import_react26.default.memo(TableSelectCell);
|
3679
3754
|
// Annotate the CommonJS export names for ESM import in node:
|
3680
3755
|
0 && (module.exports = {
|
3681
3756
|
Alert,
|
@@ -3690,6 +3765,7 @@ Table.SelectCell = import_react25.default.memo(TableSelectCell);
|
|
3690
3765
|
PopoverDialog,
|
3691
3766
|
RadioButton,
|
3692
3767
|
Select,
|
3768
|
+
Stepper,
|
3693
3769
|
Switch,
|
3694
3770
|
Table,
|
3695
3771
|
cellClassNames,
|
package/dist/atoms.mjs
CHANGED
@@ -3301,33 +3301,26 @@ import React18 from "react";
|
|
3301
3301
|
var RadioButton = React18.forwardRef(
|
3302
3302
|
(_a, ref) => {
|
3303
3303
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
3304
|
-
return /* @__PURE__ */ React18.createElement("
|
3305
|
-
className: classNames(tw("inline-flex justify-center items-center relative self-center"))
|
3306
|
-
}, /* @__PURE__ */ React18.createElement("input", __spreadProps(__spreadValues({
|
3304
|
+
return /* @__PURE__ */ React18.createElement("input", __spreadProps(__spreadValues({
|
3307
3305
|
id,
|
3308
3306
|
ref,
|
3309
3307
|
type: "radio",
|
3310
3308
|
name
|
3311
3309
|
}, props), {
|
3312
|
-
className:
|
3310
|
+
className: classNames(
|
3311
|
+
tw(
|
3312
|
+
"inline-flex justify-center items-center self-center appearance-none ",
|
3313
|
+
"w-5 h-5 p-[3px] rounded-full cursor-pointer border border-grey-20",
|
3314
|
+
"focus:border-info-70 checked:bg-navyBlue-100 checked:shadow-whiteInset",
|
3315
|
+
{
|
3316
|
+
"hover:border-grey-50 checked:border-navyBlue-100": !disabled,
|
3317
|
+
"cursor-not-allowed border-grey-5 bg-grey-0 checked:bg-opacity-40": disabled
|
3318
|
+
}
|
3319
|
+
)
|
3320
|
+
),
|
3313
3321
|
readOnly,
|
3314
3322
|
disabled
|
3315
|
-
}))
|
3316
|
-
className: tw(
|
3317
|
-
"rounded-full w-5 h-5 p-[3px] border cursor-pointer",
|
3318
|
-
"border-grey-20 peer-focus/radio:border-info-70",
|
3319
|
-
"peer-checked/radio:[&>*]:block",
|
3320
|
-
{
|
3321
|
-
"peer-checked/radio:border-navyBlue-100 peer-hover/radio:border-grey-50": !disabled,
|
3322
|
-
"border-grey-5 peer-checked/radio:[&>*]:opacity-40": disabled
|
3323
|
-
}
|
3324
|
-
)
|
3325
|
-
}, /* @__PURE__ */ React18.createElement("span", {
|
3326
|
-
style: { backgroundColor: "currentcolor" },
|
3327
|
-
className: tw("w-3 h-3 rounded-full hidden bg-navyBlue-100 pointer-events-none", {
|
3328
|
-
"peer-checked/radio:opacity-40": disabled
|
3329
|
-
})
|
3330
|
-
})));
|
3323
|
+
}));
|
3331
3324
|
}
|
3332
3325
|
);
|
3333
3326
|
|
@@ -3503,14 +3496,95 @@ var Select = {
|
|
3503
3496
|
Toggle
|
3504
3497
|
};
|
3505
3498
|
|
3506
|
-
// src/common/
|
3499
|
+
// src/common/Stepper/Stepper.tsx
|
3507
3500
|
import React20 from "react";
|
3508
|
-
var
|
3501
|
+
var import_tick4 = __toESM(require_tick());
|
3502
|
+
var Stepper = (_a) => {
|
3503
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
3504
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3505
|
+
className: classNames(className)
|
3506
|
+
}));
|
3507
|
+
};
|
3508
|
+
var ConnectorContainer = (_a) => {
|
3509
|
+
var _b = _a, {
|
3510
|
+
className,
|
3511
|
+
completed,
|
3512
|
+
dense
|
3513
|
+
} = _b, rest = __objRest(_b, [
|
3514
|
+
"className",
|
3515
|
+
"completed",
|
3516
|
+
"dense"
|
3517
|
+
]);
|
3518
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3519
|
+
className: classNames(
|
3520
|
+
tw("absolute w-full -left-1/2", {
|
3521
|
+
"top-[3px] px-[14px]": Boolean(dense),
|
3522
|
+
"top-[14px] px-[20px]": !dense
|
3523
|
+
}),
|
3524
|
+
className
|
3525
|
+
)
|
3526
|
+
}));
|
3527
|
+
};
|
3528
|
+
var Connector = (_a) => {
|
3529
|
+
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
3530
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3531
|
+
className: classNames(
|
3532
|
+
tw("w-full", {
|
3533
|
+
"bg-grey-20": !completed,
|
3534
|
+
"bg-success-70": Boolean(completed),
|
3535
|
+
"h-[2px]": !dense,
|
3536
|
+
"h-[3px]": Boolean(dense)
|
3537
|
+
}),
|
3538
|
+
className
|
3539
|
+
)
|
3540
|
+
}));
|
3541
|
+
};
|
3542
|
+
var Step = (_a) => {
|
3543
|
+
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
3544
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3545
|
+
className: classNames(
|
3546
|
+
tw("flex flex-col items-center text-grey-90 relative text-center", {
|
3547
|
+
"text-grey-20": state === "inactive"
|
3548
|
+
}),
|
3549
|
+
className
|
3550
|
+
)
|
3551
|
+
}));
|
3552
|
+
};
|
3553
|
+
var getClassNames = (state) => tw("h-[32px] w-[32px] border-2", {
|
3554
|
+
"border-grey-90 bg-white": state === "active",
|
3555
|
+
"border-grey-20 bg-white": state === "inactive",
|
3556
|
+
"text-white bg-success-70 border-success-70": state === "completed"
|
3557
|
+
});
|
3558
|
+
var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
3559
|
+
"bg-grey-90": state === "active",
|
3560
|
+
"bg-grey-20": state === "inactive",
|
3561
|
+
"text-success-70": state === "completed"
|
3562
|
+
});
|
3563
|
+
var Indicator = (_a) => {
|
3564
|
+
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
3565
|
+
return /* @__PURE__ */ React20.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
3566
|
+
className: classNames(
|
3567
|
+
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
3568
|
+
dense ? getDenseClassNames(state) : getClassNames(state),
|
3569
|
+
className
|
3570
|
+
)
|
3571
|
+
}), state === "completed" ? /* @__PURE__ */ React20.createElement(InlineIcon, {
|
3572
|
+
icon: import_tick4.default
|
3573
|
+
}) : dense ? null : children);
|
3574
|
+
};
|
3575
|
+
Step.Indicator = Indicator;
|
3576
|
+
Stepper.Step = Step;
|
3577
|
+
ConnectorContainer.Connector = Connector;
|
3578
|
+
Stepper.ConnectorContainer = ConnectorContainer;
|
3579
|
+
|
3580
|
+
// src/common/Switch/Switch.tsx
|
3581
|
+
import React21 from "react";
|
3582
|
+
var Switch = React21.forwardRef(
|
3509
3583
|
(_a, ref) => {
|
3510
3584
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
3511
|
-
return /* @__PURE__ */
|
3585
|
+
return /* @__PURE__ */ React21.createElement("span", {
|
3512
3586
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
3513
|
-
}, /* @__PURE__ */
|
3587
|
+
}, /* @__PURE__ */ React21.createElement("input", __spreadProps(__spreadValues({
|
3514
3588
|
id,
|
3515
3589
|
ref,
|
3516
3590
|
type: "checkbox",
|
@@ -3519,7 +3593,7 @@ var Switch = React20.forwardRef(
|
|
3519
3593
|
className: tw("opacity-0 peer/switch w-0 h-0"),
|
3520
3594
|
readOnly,
|
3521
3595
|
disabled
|
3522
|
-
})), /* @__PURE__ */
|
3596
|
+
})), /* @__PURE__ */ React21.createElement("span", {
|
3523
3597
|
className: tw(
|
3524
3598
|
"rounded-full inline-block w-[34px] h-[20px] transition duration-300",
|
3525
3599
|
"peer-focus/switch:border border-info-70 bg-grey-20",
|
@@ -3528,7 +3602,7 @@ var Switch = React20.forwardRef(
|
|
3528
3602
|
"bg-grey-5 peer-checked/switch:opacity-40": disabled
|
3529
3603
|
}
|
3530
3604
|
)
|
3531
|
-
}), /* @__PURE__ */
|
3605
|
+
}), /* @__PURE__ */ React21.createElement("span", {
|
3532
3606
|
className: tw(
|
3533
3607
|
"rounded-full absolute inline-block transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
3534
3608
|
"bg-white peer-disabled/switch:bg-grey-0 left-2 peer-checked/switch:left-1",
|
@@ -3541,32 +3615,32 @@ var Switch = React20.forwardRef(
|
|
3541
3615
|
);
|
3542
3616
|
|
3543
3617
|
// src/common/Table/Table.tsx
|
3544
|
-
import
|
3618
|
+
import React22 from "react";
|
3545
3619
|
var import_chevronDown3 = __toESM(require_chevronDown());
|
3546
3620
|
var import_chevronUp2 = __toESM(require_chevronUp());
|
3547
|
-
var HeadContext =
|
3621
|
+
var HeadContext = React22.createContext(null);
|
3548
3622
|
var tableClassNames = tw("w-full relative typography-default border-spacing-0");
|
3549
3623
|
var Table = (_a) => {
|
3550
3624
|
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
3551
|
-
return /* @__PURE__ */
|
3625
|
+
return /* @__PURE__ */ React22.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
3552
3626
|
className: classNames(tableClassNames, className),
|
3553
3627
|
"aria-label": ariaLabel
|
3554
3628
|
}), children);
|
3555
3629
|
};
|
3556
3630
|
var TableHead = (_a) => {
|
3557
3631
|
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
3558
|
-
return /* @__PURE__ */
|
3632
|
+
return /* @__PURE__ */ React22.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ React22.createElement("tr", null, /* @__PURE__ */ React22.createElement(HeadContext.Provider, {
|
3559
3633
|
value: { children, sticky }
|
3560
3634
|
}, children)));
|
3561
3635
|
};
|
3562
3636
|
var TableBody = (_a) => {
|
3563
3637
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
3564
|
-
return /* @__PURE__ */
|
3638
|
+
return /* @__PURE__ */ React22.createElement("tbody", __spreadValues({}, rest), children);
|
3565
3639
|
};
|
3566
3640
|
var rowClassNames = tw("children:border-grey-10 children:last:border-b-0 hover:bg-grey-0");
|
3567
3641
|
var TableRow = (_a) => {
|
3568
3642
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3569
|
-
return /* @__PURE__ */
|
3643
|
+
return /* @__PURE__ */ React22.createElement("tr", __spreadProps(__spreadValues({}, rest), {
|
3570
3644
|
className: classNames(rowClassNames, className)
|
3571
3645
|
}), children);
|
3572
3646
|
};
|
@@ -3578,29 +3652,29 @@ var getBodyCellClassNames = (table = true) => tw("text-grey-70 py-3", {
|
|
3578
3652
|
var getAlignClassNames = (align) => tw({ "text-right": align === "right", "text-center": align === "center" });
|
3579
3653
|
var getHeadCellClassNames = (sticky = true) => {
|
3580
3654
|
const common = tw("py-[14px] text-left bg-white border-grey-40 text-grey-50 font-normal");
|
3581
|
-
return sticky ? classNames(common, tw("sticky top-0")) : common;
|
3655
|
+
return sticky ? classNames(common, tw("sticky top-0 z-10")) : common;
|
3582
3656
|
};
|
3583
3657
|
var TableCell = (_a) => {
|
3584
3658
|
var _b = _a, { children, className, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "align"]);
|
3585
|
-
const headContext =
|
3586
|
-
return headContext ? /* @__PURE__ */
|
3659
|
+
const headContext = React22.useContext(HeadContext);
|
3660
|
+
return headContext ? /* @__PURE__ */ React22.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
3587
3661
|
className: classNames(
|
3588
3662
|
cellClassNames,
|
3589
3663
|
getHeadCellClassNames(headContext.sticky),
|
3590
3664
|
getAlignClassNames(align),
|
3591
3665
|
className
|
3592
3666
|
)
|
3593
|
-
}), children) : /* @__PURE__ */
|
3667
|
+
}), children) : /* @__PURE__ */ React22.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
3594
3668
|
className: classNames(cellClassNames, getBodyCellClassNames(), getAlignClassNames(align), className)
|
3595
3669
|
}), children);
|
3596
3670
|
};
|
3597
3671
|
var TableSelectCell = (_a) => {
|
3598
3672
|
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
3599
|
-
return /* @__PURE__ */
|
3673
|
+
return /* @__PURE__ */ React22.createElement(Table.Cell, {
|
3600
3674
|
className: tw("leading-[0px]")
|
3601
|
-
}, props.type === "radio" ? /* @__PURE__ */
|
3675
|
+
}, props.type === "radio" ? /* @__PURE__ */ React22.createElement(RadioButton, __spreadValues({
|
3602
3676
|
"aria-label": ariaLabel
|
3603
|
-
}, props)) : /* @__PURE__ */
|
3677
|
+
}, props)) : /* @__PURE__ */ React22.createElement(Checkbox, __spreadValues({
|
3604
3678
|
"aria-label": ariaLabel
|
3605
3679
|
}, props)));
|
3606
3680
|
};
|
@@ -3610,39 +3684,39 @@ var getSortCellIconClassNames = (active) => {
|
|
3610
3684
|
};
|
3611
3685
|
var TableSortCell = (_a) => {
|
3612
3686
|
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
3613
|
-
return /* @__PURE__ */
|
3687
|
+
return /* @__PURE__ */ React22.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
3614
3688
|
"aria-sort": direction
|
3615
|
-
}), /* @__PURE__ */
|
3689
|
+
}), /* @__PURE__ */ React22.createElement("span", {
|
3616
3690
|
className: getSortCellButtonClassNames(rest.align),
|
3617
3691
|
role: "button",
|
3618
3692
|
tabIndex: -1,
|
3619
3693
|
onClick
|
3620
|
-
}, children, /* @__PURE__ */
|
3694
|
+
}, children, /* @__PURE__ */ React22.createElement("div", {
|
3621
3695
|
"data-sort-icons": true,
|
3622
3696
|
className: tw("flex flex-col", {
|
3623
3697
|
"invisible group-hover:visible": direction === "none"
|
3624
3698
|
})
|
3625
|
-
}, /* @__PURE__ */
|
3699
|
+
}, /* @__PURE__ */ React22.createElement(InlineIcon, {
|
3626
3700
|
icon: import_chevronUp2.default,
|
3627
3701
|
className: getSortCellIconClassNames(direction === "descending")
|
3628
|
-
}), /* @__PURE__ */
|
3702
|
+
}), /* @__PURE__ */ React22.createElement(InlineIcon, {
|
3629
3703
|
icon: import_chevronDown3.default,
|
3630
3704
|
className: getSortCellIconClassNames(direction === "ascending")
|
3631
3705
|
}))));
|
3632
3706
|
};
|
3633
|
-
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */
|
3707
|
+
var Item3 = ({ image, imageAlt, imageSize = 35, title, caption }) => /* @__PURE__ */ React22.createElement("div", {
|
3634
3708
|
className: tw("flex gap-4 items-center")
|
3635
|
-
}, image && /* @__PURE__ */
|
3709
|
+
}, image && /* @__PURE__ */ React22.createElement("img", {
|
3636
3710
|
src: image,
|
3637
3711
|
alt: imageAlt,
|
3638
3712
|
style: { width: imageSize, height: imageSize }
|
3639
|
-
}), /* @__PURE__ */
|
3640
|
-
Table.Head =
|
3641
|
-
Table.Body =
|
3642
|
-
Table.Row =
|
3643
|
-
Table.Cell =
|
3644
|
-
Table.SortCell =
|
3645
|
-
Table.SelectCell =
|
3713
|
+
}), /* @__PURE__ */ React22.createElement("div", null, title, caption && /* @__PURE__ */ React22.createElement(Typography2.Caption, null, caption)));
|
3714
|
+
Table.Head = React22.memo(TableHead);
|
3715
|
+
Table.Body = React22.memo(TableBody);
|
3716
|
+
Table.Row = React22.memo(TableRow);
|
3717
|
+
Table.Cell = React22.memo(TableCell);
|
3718
|
+
Table.SortCell = React22.memo(TableSortCell);
|
3719
|
+
Table.SelectCell = React22.memo(TableSelectCell);
|
3646
3720
|
export {
|
3647
3721
|
Alert,
|
3648
3722
|
Checkbox,
|
@@ -3656,6 +3730,7 @@ export {
|
|
3656
3730
|
PopoverDialog,
|
3657
3731
|
RadioButton,
|
3658
3732
|
Select,
|
3733
|
+
Stepper,
|
3659
3734
|
Switch,
|
3660
3735
|
Table,
|
3661
3736
|
cellClassNames,
|