@aivenio/aquarium 1.0.0 → 1.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/_variables.scss +1 -1
- package/dist/_variables_timescale.scss +1 -1
- package/dist/atoms.cjs +821 -623
- package/dist/atoms.mjs +820 -623
- package/dist/src/common/Alert/Alert.d.ts +1 -1
- package/dist/src/common/Alert/Alert.js +3 -3
- package/dist/src/common/Banner/Banner.d.ts +5 -1
- package/dist/src/common/Banner/Banner.js +5 -3
- package/dist/src/common/DropdownMenu/DropdownMenu.d.ts +8 -3
- package/dist/src/common/DropdownMenu/DropdownMenu.js +12 -2
- package/dist/src/common/Modal/Modal.js +3 -3
- package/dist/src/common/Timeline/Timeline.d.ts +18 -0
- package/dist/src/common/Timeline/Timeline.js +43 -0
- package/dist/src/common/Typography/Typography.d.ts +2 -1
- package/dist/src/common/Typography/Typography.js +15 -3
- package/dist/src/components/Alert/Alert.js +2 -2
- package/dist/src/components/Banner/Banner.d.ts +3 -1
- package/dist/src/components/Banner/Banner.js +3 -3
- package/dist/src/components/Box/Box.d.ts +5 -1
- package/dist/src/components/Box/Box.js +6 -2
- package/dist/src/components/DataTable/DataTable.d.ts +15 -12
- package/dist/src/components/DataTable/DataTable.js +9 -5
- package/dist/src/components/Dialog/Dialog.js +35 -12
- package/dist/src/components/DropdownMenu/DropdownMenu.d.ts +7 -1
- package/dist/src/components/DropdownMenu/DropdownMenu.js +23 -13
- package/dist/src/components/DropdownMenu/utils.d.ts +4 -0
- package/dist/src/components/DropdownMenu/utils.js +20 -0
- package/dist/src/components/Modal/Modal.js +16 -8
- package/dist/src/components/Section/Section.d.ts +4 -0
- package/dist/src/components/Section/Section.js +14 -13
- package/dist/src/components/Skeleton/Skeleton.d.ts +7 -2
- package/dist/src/components/Skeleton/Skeleton.js +5 -4
- package/dist/src/components/Template/Template.d.ts +18 -0
- package/dist/src/components/Template/Template.js +18 -0
- package/dist/src/components/Timeline/Timeline.d.ts +27 -0
- package/dist/src/components/Timeline/Timeline.js +41 -0
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/index.js +3 -1
- package/dist/src/utils/Blueprint.d.ts +2 -0
- package/dist/src/utils/Blueprint.js +29 -0
- package/dist/styles.css +40 -21
- package/dist/styles_timescaledb.css +40 -21
- package/dist/system.cjs +2566 -1813
- package/dist/system.mjs +2553 -1802
- 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
@@ -1,9 +1,38 @@
|
|
1
1
|
var __create = Object.create;
|
2
2
|
var __defProp = Object.defineProperty;
|
3
|
+
var __defProps = Object.defineProperties;
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
4
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
8
|
var __getProtoOf = Object.getPrototypeOf;
|
6
9
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
12
|
+
var __spreadValues = (a, b) => {
|
13
|
+
for (var prop in b ||= {})
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
16
|
+
if (__getOwnPropSymbols)
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
18
|
+
if (__propIsEnum.call(b, prop))
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
20
|
+
}
|
21
|
+
return a;
|
22
|
+
};
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
24
|
+
var __objRest = (source, exclude) => {
|
25
|
+
var target = {};
|
26
|
+
for (var prop in source)
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
28
|
+
target[prop] = source[prop];
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
32
|
+
target[prop] = source[prop];
|
33
|
+
}
|
34
|
+
return target;
|
35
|
+
};
|
7
36
|
var __commonJS = (cb, mod) => function __require() {
|
8
37
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
9
38
|
};
|
@@ -1121,23 +1150,23 @@ import {
|
|
1121
1150
|
Icon as IconifyIconComponent,
|
1122
1151
|
InlineIcon as IconifyInlineIconComponent
|
1123
1152
|
} from "@iconify/react";
|
1124
|
-
var Icon = React.forwardRef((
|
1153
|
+
var Icon = React.forwardRef((_a, ref) => {
|
1154
|
+
var _b = _a, { color, className } = _b, rest = __objRest(_b, ["color", "className"]);
|
1125
1155
|
const classes = classNames(className, color && `text-${color}`);
|
1126
|
-
return /* @__PURE__ */ React.createElement(IconifyIconComponent, {
|
1127
|
-
ref: ref
|
1128
|
-
className: classes !== "" ? classes : void 0
|
1129
|
-
|
1130
|
-
});
|
1156
|
+
return /* @__PURE__ */ React.createElement(IconifyIconComponent, __spreadValues({
|
1157
|
+
ref: ref != null ? ref : void 0,
|
1158
|
+
className: classes !== "" ? classes : void 0
|
1159
|
+
}, rest));
|
1131
1160
|
});
|
1132
|
-
var InlineIcon = React.forwardRef((
|
1161
|
+
var InlineIcon = React.forwardRef((_a, ref) => {
|
1162
|
+
var _b = _a, { color, className } = _b, rest = __objRest(_b, ["color", "className"]);
|
1133
1163
|
const classes = classNames(color && `text-${color}`);
|
1134
1164
|
return /* @__PURE__ */ React.createElement("span", {
|
1135
1165
|
className: classNames(tw("children:inline-block inline-flex justify-center items-center"), className)
|
1136
|
-
}, /* @__PURE__ */ React.createElement(IconifyInlineIconComponent, {
|
1137
|
-
ref: ref
|
1138
|
-
className: classes !== "" ? classes : void 0
|
1139
|
-
|
1140
|
-
}));
|
1166
|
+
}, /* @__PURE__ */ React.createElement(IconifyInlineIconComponent, __spreadValues({
|
1167
|
+
ref: ref != null ? ref : void 0,
|
1168
|
+
className: classes !== "" ? classes : void 0
|
1169
|
+
}, rest)));
|
1141
1170
|
});
|
1142
1171
|
|
1143
1172
|
// src/components/Flexbox/Flexbox.tsx
|
@@ -1705,20 +1734,18 @@ function getPxMapping(breakpoints) {
|
|
1705
1734
|
if (!minWidthInPx.endsWith("px")) {
|
1706
1735
|
throw new Error(`Unexpected breakpoint value found: '${minWidthInPx}'. Expecting it to be in px unit.`);
|
1707
1736
|
}
|
1708
|
-
return {
|
1709
|
-
...acc,
|
1737
|
+
return __spreadProps(__spreadValues({}, acc), {
|
1710
1738
|
[key]: parseInt(minWidthInPx, 10)
|
1711
|
-
};
|
1739
|
+
});
|
1712
1740
|
}, {});
|
1713
1741
|
}
|
1714
1742
|
function getMatches(windowSize) {
|
1715
1743
|
const mapping = getPxMapping(allBreakpoints);
|
1716
1744
|
return Object.keys(allBreakpoints).reduce((acc, key) => {
|
1717
1745
|
const isMatch = !isUndefined(windowSize) && windowSize.width > 0 ? windowSize.width > mapping[key] : key === "default" ? true : false;
|
1718
|
-
return {
|
1719
|
-
...acc,
|
1746
|
+
return __spreadProps(__spreadValues({}, acc), {
|
1720
1747
|
[key]: isMatch
|
1721
|
-
};
|
1748
|
+
});
|
1722
1749
|
}, {});
|
1723
1750
|
}
|
1724
1751
|
function selectBreakpointValue(value, matches) {
|
@@ -1771,50 +1798,77 @@ function useStyle(styles) {
|
|
1771
1798
|
const isStylesObject = isPlainObject2(property) && "value" in property;
|
1772
1799
|
const value = isStylesObject ? property.value : property;
|
1773
1800
|
const resolvedValue = selectBreakpointValue(value, context2.breakpointMatches);
|
1774
|
-
const transformer = isUndefined3(property
|
1801
|
+
const transformer = isUndefined3(property == null ? void 0 : property.transformer) ? (val) => resolveTailwindThemeValue(key, val) : (val) => resolveTailwindThemeValue(key, property.transformer(val));
|
1775
1802
|
const cssPropertyValue = transformer(resolvedValue);
|
1776
1803
|
if (isUndefined3(cssPropertyValue)) {
|
1777
1804
|
return acc;
|
1778
1805
|
}
|
1779
|
-
return {
|
1780
|
-
...acc,
|
1806
|
+
return __spreadProps(__spreadValues({}, acc), {
|
1781
1807
|
[key]: cssPropertyValue
|
1782
|
-
};
|
1808
|
+
});
|
1783
1809
|
}, {});
|
1784
1810
|
}
|
1785
1811
|
|
1786
1812
|
// src/components/Tailwindify/Tailwindify.tsx
|
1787
1813
|
function Tailwindify(Component) {
|
1788
|
-
return ({
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1814
|
+
return (_a) => {
|
1815
|
+
var _b = _a, {
|
1816
|
+
className,
|
1817
|
+
style,
|
1818
|
+
children,
|
1819
|
+
padding,
|
1820
|
+
paddingX,
|
1821
|
+
paddingY,
|
1822
|
+
paddingTop,
|
1823
|
+
paddingRight,
|
1824
|
+
paddingBottom,
|
1825
|
+
paddingLeft,
|
1826
|
+
margin,
|
1827
|
+
marginX,
|
1828
|
+
marginY,
|
1829
|
+
marginTop,
|
1830
|
+
marginRight,
|
1831
|
+
marginBottom,
|
1832
|
+
marginLeft,
|
1833
|
+
space,
|
1834
|
+
spaceX,
|
1835
|
+
spaceY,
|
1836
|
+
backgroundColor,
|
1837
|
+
width,
|
1838
|
+
height,
|
1839
|
+
maxWidth,
|
1840
|
+
maxHeight,
|
1841
|
+
minWidth,
|
1842
|
+
minHeight
|
1843
|
+
} = _b, otherProps = __objRest(_b, [
|
1844
|
+
"className",
|
1845
|
+
"style",
|
1846
|
+
"children",
|
1847
|
+
"padding",
|
1848
|
+
"paddingX",
|
1849
|
+
"paddingY",
|
1850
|
+
"paddingTop",
|
1851
|
+
"paddingRight",
|
1852
|
+
"paddingBottom",
|
1853
|
+
"paddingLeft",
|
1854
|
+
"margin",
|
1855
|
+
"marginX",
|
1856
|
+
"marginY",
|
1857
|
+
"marginTop",
|
1858
|
+
"marginRight",
|
1859
|
+
"marginBottom",
|
1860
|
+
"marginLeft",
|
1861
|
+
"space",
|
1862
|
+
"spaceX",
|
1863
|
+
"spaceY",
|
1864
|
+
"backgroundColor",
|
1865
|
+
"width",
|
1866
|
+
"height",
|
1867
|
+
"maxWidth",
|
1868
|
+
"maxHeight",
|
1869
|
+
"minWidth",
|
1870
|
+
"minHeight"
|
1871
|
+
]);
|
1818
1872
|
const tailwindifyStyle = useStyle({
|
1819
1873
|
padding,
|
1820
1874
|
paddingTop: isUndefined4(paddingY) ? paddingTop : paddingY,
|
@@ -1834,14 +1888,10 @@ function Tailwindify(Component) {
|
|
1834
1888
|
minWidth,
|
1835
1889
|
minHeight
|
1836
1890
|
});
|
1837
|
-
const finalStyle = {
|
1838
|
-
|
1839
|
-
...style
|
1840
|
-
};
|
1841
|
-
const componentProps = {
|
1842
|
-
...otherProps,
|
1891
|
+
const finalStyle = __spreadValues(__spreadValues({}, tailwindifyStyle), style);
|
1892
|
+
const componentProps = __spreadProps(__spreadValues({}, otherProps), {
|
1843
1893
|
style: finalStyle
|
1844
|
-
};
|
1894
|
+
});
|
1845
1895
|
const childrenWithProps = React3.Children.map(children, (child, index) => {
|
1846
1896
|
if (!React3.isValidElement(child)) {
|
1847
1897
|
return child;
|
@@ -1863,14 +1913,13 @@ function Tailwindify(Component) {
|
|
1863
1913
|
return child;
|
1864
1914
|
}
|
1865
1915
|
const childStyle = get2(child, ["props", "style"], {});
|
1866
|
-
const newProps = {
|
1916
|
+
const newProps = __spreadProps(__spreadValues({}, childProps), { style: __spreadValues(__spreadValues({}, childStyle), additionalStyle) });
|
1867
1917
|
return React3.cloneElement(child, newProps);
|
1868
1918
|
});
|
1869
|
-
return /* @__PURE__ */ React3.createElement(Component, {
|
1919
|
+
return /* @__PURE__ */ React3.createElement(Component, __spreadValues({
|
1870
1920
|
className,
|
1871
|
-
children: childrenWithProps
|
1872
|
-
|
1873
|
-
});
|
1921
|
+
children: childrenWithProps
|
1922
|
+
}, componentProps));
|
1874
1923
|
};
|
1875
1924
|
}
|
1876
1925
|
|
@@ -1904,7 +1953,7 @@ var Flexbox = Tailwindify(
|
|
1904
1953
|
});
|
1905
1954
|
const HtmlElement = htmlTag;
|
1906
1955
|
return /* @__PURE__ */ React4.createElement(HtmlElement, {
|
1907
|
-
style: {
|
1956
|
+
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
1908
1957
|
className
|
1909
1958
|
}, children);
|
1910
1959
|
}
|
@@ -2034,11 +2083,12 @@ function useTooltipTriggerState(props = {}) {
|
|
2034
2083
|
}
|
2035
2084
|
|
2036
2085
|
// src/components/Tooltip/Tooltip.tsx
|
2037
|
-
var Tooltip = (
|
2086
|
+
var Tooltip = (_a) => {
|
2087
|
+
var _b = _a, { inline = true, delay = 200 } = _b, props = __objRest(_b, ["inline", "delay"]);
|
2038
2088
|
const { placement: _placement = "top", content, disabled: isDisabled, shouldFlip = true } = props;
|
2039
2089
|
const triggerRef = React5.useRef(null);
|
2040
2090
|
const overlayRef = React5.useRef(null);
|
2041
|
-
const state = useTooltipTriggerState({ isDisabled, delay,
|
2091
|
+
const state = useTooltipTriggerState(__spreadValues({ isDisabled, delay }, props));
|
2042
2092
|
const { triggerProps, tooltipProps } = useTooltipTrigger(props, state, triggerRef);
|
2043
2093
|
const { overlayProps, arrowProps, placement } = useOverlayPosition({
|
2044
2094
|
placement: _placement.replace("-", " "),
|
@@ -2049,56 +2099,60 @@ var Tooltip = ({ inline = true, delay = 200, ...props }) => {
|
|
2049
2099
|
offset: ARROW_OFFSET
|
2050
2100
|
});
|
2051
2101
|
const handleClick = (e) => {
|
2052
|
-
|
2053
|
-
|
2102
|
+
var _a2, _b2;
|
2103
|
+
(_a2 = props.onClick) == null ? void 0 : _a2.call(props, e);
|
2104
|
+
(_b2 = triggerProps.onClick) == null ? void 0 : _b2.call(triggerProps, e);
|
2054
2105
|
};
|
2055
2106
|
const handleMouseDown = (e) => {
|
2056
|
-
|
2057
|
-
|
2107
|
+
var _a2, _b2;
|
2108
|
+
(_a2 = props.onMouseDown) == null ? void 0 : _a2.call(props, e);
|
2109
|
+
(_b2 = triggerProps.onMouseDown) == null ? void 0 : _b2.call(triggerProps, e);
|
2058
2110
|
};
|
2059
2111
|
const handleMouseUp = (e) => {
|
2060
|
-
|
2061
|
-
|
2112
|
+
var _a2, _b2;
|
2113
|
+
(_a2 = props.onMouseUp) == null ? void 0 : _a2.call(props, e);
|
2114
|
+
(_b2 = triggerProps.onMouseUp) == null ? void 0 : _b2.call(triggerProps, e);
|
2062
2115
|
};
|
2063
2116
|
const handlePointerDown = (e) => {
|
2064
|
-
|
2065
|
-
|
2117
|
+
var _a2, _b2;
|
2118
|
+
(_a2 = props.onPointerDown) == null ? void 0 : _a2.call(props, e);
|
2119
|
+
(_b2 = triggerProps.onPointerDown) == null ? void 0 : _b2.call(triggerProps, e);
|
2066
2120
|
};
|
2067
2121
|
const handlePointerUp = (e) => {
|
2068
|
-
|
2069
|
-
|
2122
|
+
var _a2, _b2;
|
2123
|
+
(_a2 = props.onPointerUp) == null ? void 0 : _a2.call(props, e);
|
2124
|
+
(_b2 = triggerProps.onPointerUp) == null ? void 0 : _b2.call(triggerProps, e);
|
2070
2125
|
};
|
2071
|
-
return /* @__PURE__ */ React5.createElement("div", {
|
2072
|
-
className: tw(`${inline ? "inline-block" : "block"}`)
|
2073
|
-
|
2126
|
+
return /* @__PURE__ */ React5.createElement("div", __spreadProps(__spreadValues({
|
2127
|
+
className: tw(`${inline ? "inline-block" : "block"}`)
|
2128
|
+
}, triggerProps), {
|
2074
2129
|
onClick: handleClick,
|
2075
2130
|
onMouseDown: handleMouseDown,
|
2076
2131
|
onMouseUp: handleMouseUp,
|
2077
2132
|
onPointerDown: handlePointerDown,
|
2078
2133
|
onPointerUp: handlePointerUp,
|
2079
2134
|
ref: triggerRef
|
2080
|
-
}, props.children, state.isOpen && /* @__PURE__ */ React5.createElement(TooltipWrapper, {
|
2135
|
+
}), props.children, state.isOpen && /* @__PURE__ */ React5.createElement(TooltipWrapper, __spreadValues({
|
2081
2136
|
ref: overlayRef,
|
2082
2137
|
state,
|
2083
2138
|
placement,
|
2084
|
-
arrowProps
|
2085
|
-
|
2086
|
-
}, content));
|
2139
|
+
arrowProps
|
2140
|
+
}, mergeProps(tooltipProps, overlayProps)), content));
|
2087
2141
|
};
|
2088
2142
|
var TooltipWrapper = React5.forwardRef(
|
2089
|
-
(
|
2143
|
+
(_a, forwardedRef) => {
|
2144
|
+
var _b = _a, { state, placement, arrowProps } = _b, props = __objRest(_b, ["state", "placement", "arrowProps"]);
|
2145
|
+
var _a2;
|
2090
2146
|
const ref = React5.useRef(null);
|
2091
2147
|
React5.useImperativeHandle(forwardedRef, () => ref.current);
|
2092
2148
|
const { tooltipProps } = useTooltip(props, state);
|
2093
|
-
const arrowStyle = getArrowStyle(ref.current, placement, arrowProps.style
|
2094
|
-
return /* @__PURE__ */ React5.createElement(OverlayContainer, null, /* @__PURE__ */ React5.createElement("div", {
|
2149
|
+
const arrowStyle = getArrowStyle(ref.current, placement, (_a2 = arrowProps.style) != null ? _a2 : {});
|
2150
|
+
return /* @__PURE__ */ React5.createElement(OverlayContainer, null, /* @__PURE__ */ React5.createElement("div", __spreadValues({
|
2095
2151
|
ref,
|
2096
|
-
className: tw("p-3 rounded-sm typography-caption-default max-w-[320px] bg-grey-90 text-white")
|
2097
|
-
|
2098
|
-
}, props.children, /* @__PURE__ */ React5.createElement(Arrow, {
|
2099
|
-
...arrowProps,
|
2152
|
+
className: tw("p-3 rounded-sm typography-caption-default max-w-[320px] bg-grey-90 text-white")
|
2153
|
+
}, mergeProps(props, tooltipProps)), props.children, /* @__PURE__ */ React5.createElement(Arrow, __spreadProps(__spreadValues({}, arrowProps), {
|
2100
2154
|
style: arrowStyle
|
2101
|
-
})));
|
2155
|
+
}))));
|
2102
2156
|
}
|
2103
2157
|
);
|
2104
2158
|
var isNotNumberProperty = (p) => typeof p === "string";
|
@@ -2118,25 +2172,24 @@ var getArrowStyle = (element, position, { left, top }) => {
|
|
2118
2172
|
};
|
2119
2173
|
switch (position) {
|
2120
2174
|
case "top": {
|
2121
|
-
return { left: Math.min(limits.right, Math.max((left
|
2175
|
+
return { left: Math.min(limits.right, Math.max((left != null ? left : 0) - ARROW_SIZE, limits.left)), bottom: -ARROW_SIZE };
|
2122
2176
|
}
|
2123
2177
|
case "bottom": {
|
2124
|
-
return { left: Math.min(limits.right, Math.max((left
|
2178
|
+
return { left: Math.min(limits.right, Math.max((left != null ? left : 0) - ARROW_SIZE, limits.left)), top: -ARROW_SIZE };
|
2125
2179
|
}
|
2126
2180
|
case "left": {
|
2127
|
-
return { right: -ARROW_SIZE, top: Math.min(limits.bottom, Math.max((top
|
2181
|
+
return { right: -ARROW_SIZE, top: Math.min(limits.bottom, Math.max((top != null ? top : 0) - ARROW_SIZE, limits.top)) };
|
2128
2182
|
}
|
2129
2183
|
case "right": {
|
2130
|
-
return { left: -ARROW_SIZE, top: Math.min(limits.bottom, Math.max((top
|
2184
|
+
return { left: -ARROW_SIZE, top: Math.min(limits.bottom, Math.max((top != null ? top : 0) - ARROW_SIZE, limits.top)) };
|
2131
2185
|
}
|
2132
2186
|
}
|
2133
2187
|
return { left, top };
|
2134
2188
|
};
|
2135
2189
|
var Arrow = (props) => {
|
2136
|
-
return /* @__PURE__ */ React5.createElement("div", {
|
2137
|
-
className: tw("absolute w-3 h-3 bg-grey-90 rotate-45")
|
2138
|
-
|
2139
|
-
});
|
2190
|
+
return /* @__PURE__ */ React5.createElement("div", __spreadValues({
|
2191
|
+
className: tw("absolute w-3 h-3 bg-grey-90 rotate-45")
|
2192
|
+
}, props));
|
2140
2193
|
};
|
2141
2194
|
|
2142
2195
|
// src/components/Button/Button.tsx
|
@@ -2172,21 +2225,34 @@ var LoadingSpinner = ({
|
|
2172
2225
|
};
|
2173
2226
|
var asButton = (Component, isDropdownButton) => {
|
2174
2227
|
return React6.forwardRef(
|
2175
|
-
({
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
|
2188
|
-
|
2189
|
-
|
2228
|
+
(_a, ref) => {
|
2229
|
+
var _b = _a, {
|
2230
|
+
kind = "primary",
|
2231
|
+
icon,
|
2232
|
+
iconPlacement = "left",
|
2233
|
+
tooltip,
|
2234
|
+
tooltipPlacement,
|
2235
|
+
disabled,
|
2236
|
+
loading: loading2 = false,
|
2237
|
+
fullWidth = false,
|
2238
|
+
dense = false,
|
2239
|
+
UNSAFE_className,
|
2240
|
+
"aria-label": ariaLabel,
|
2241
|
+
children
|
2242
|
+
} = _b, props = __objRest(_b, [
|
2243
|
+
"kind",
|
2244
|
+
"icon",
|
2245
|
+
"iconPlacement",
|
2246
|
+
"tooltip",
|
2247
|
+
"tooltipPlacement",
|
2248
|
+
"disabled",
|
2249
|
+
"loading",
|
2250
|
+
"fullWidth",
|
2251
|
+
"dense",
|
2252
|
+
"UNSAFE_className",
|
2253
|
+
"aria-label",
|
2254
|
+
"children"
|
2255
|
+
]);
|
2190
2256
|
const hasChildren = React6.Children.count(children) > 0;
|
2191
2257
|
const isIconOnlyButton = !hasChildren && !!icon;
|
2192
2258
|
const isGhost = !isIconOnlyButton && (kind === "ghost" || kind === "secondary-ghost");
|
@@ -2232,9 +2298,9 @@ var asButton = (Component, isDropdownButton) => {
|
|
2232
2298
|
return children;
|
2233
2299
|
}
|
2234
2300
|
};
|
2235
|
-
const buttonComponent = /* @__PURE__ */ React6.createElement(Component, {
|
2236
|
-
ref
|
2237
|
-
|
2301
|
+
const buttonComponent = /* @__PURE__ */ React6.createElement(Component, __spreadProps(__spreadValues({
|
2302
|
+
ref
|
2303
|
+
}, props), {
|
2238
2304
|
className: classNames(
|
2239
2305
|
UNSAFE_className,
|
2240
2306
|
!isIconOnlyButton && COLOR_CLASSNAMES[kind],
|
@@ -2250,9 +2316,9 @@ var asButton = (Component, isDropdownButton) => {
|
|
2250
2316
|
"cursor-not-allowed": !!disabled || !!loading2
|
2251
2317
|
})
|
2252
2318
|
),
|
2253
|
-
"aria-label": isIconOnlyButton ? ariaLabel
|
2319
|
+
"aria-label": isIconOnlyButton ? ariaLabel != null ? ariaLabel : tooltip : ariaLabel,
|
2254
2320
|
disabled: disabled || loading2
|
2255
|
-
}, loading2 && !isGhost ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("div", {
|
2321
|
+
}), loading2 && !isGhost ? /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement("div", {
|
2256
2322
|
className: tw("absolute left-1/2 top-0 bottom-0 flex"),
|
2257
2323
|
style: { transform: "translate(-50%)" }
|
2258
2324
|
}, /* @__PURE__ */ React6.createElement(LoadingSpinner, {
|
@@ -2270,59 +2336,59 @@ var asButton = (Component, isDropdownButton) => {
|
|
2270
2336
|
};
|
2271
2337
|
var Button = asButton("button");
|
2272
2338
|
Button.displayName = "Button";
|
2273
|
-
var PrimaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2274
|
-
ref
|
2275
|
-
|
2339
|
+
var PrimaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2340
|
+
ref
|
2341
|
+
}, props), {
|
2276
2342
|
kind: "primary"
|
2277
|
-
}));
|
2343
|
+
})));
|
2278
2344
|
PrimaryButton.displayName = "PrimaryButton";
|
2279
|
-
var SecondaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2280
|
-
ref
|
2281
|
-
|
2345
|
+
var SecondaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2346
|
+
ref
|
2347
|
+
}, props), {
|
2282
2348
|
kind: "secondary"
|
2283
|
-
}));
|
2349
|
+
})));
|
2284
2350
|
SecondaryButton.displayName = "SecondaryButton";
|
2285
|
-
var GhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2286
|
-
ref
|
2287
|
-
|
2351
|
+
var GhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2352
|
+
ref
|
2353
|
+
}, props), {
|
2288
2354
|
kind: "ghost"
|
2289
|
-
}));
|
2355
|
+
})));
|
2290
2356
|
GhostButton.displayName = "GhostButton";
|
2291
|
-
var SecondaryGhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2292
|
-
ref
|
2293
|
-
|
2357
|
+
var SecondaryGhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2358
|
+
ref
|
2359
|
+
}, props), {
|
2294
2360
|
kind: "secondary-ghost"
|
2295
|
-
}));
|
2361
|
+
})));
|
2296
2362
|
SecondaryGhostButton.displayName = "SecondaryGhostButton";
|
2297
|
-
var IconButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2298
|
-
ref
|
2299
|
-
|
2363
|
+
var IconButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2364
|
+
ref
|
2365
|
+
}, props), {
|
2300
2366
|
kind: "ghost",
|
2301
2367
|
loading: false,
|
2302
2368
|
fullWidth: false
|
2303
|
-
}));
|
2369
|
+
})));
|
2304
2370
|
IconButton.displayName = "IconButton";
|
2305
2371
|
var ExternalLinkButton = asButton("a");
|
2306
|
-
var IconExternalLinkButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(ExternalLinkButton, {
|
2307
|
-
ref
|
2308
|
-
|
2372
|
+
var IconExternalLinkButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(ExternalLinkButton, __spreadProps(__spreadValues({
|
2373
|
+
ref
|
2374
|
+
}, props), {
|
2309
2375
|
kind: "ghost",
|
2310
2376
|
loading: false,
|
2311
2377
|
fullWidth: false
|
2312
|
-
}));
|
2378
|
+
})));
|
2313
2379
|
IconExternalLinkButton.displayName = "IconExternalLink";
|
2314
2380
|
var DropdownButton = asButton("button", true);
|
2315
|
-
var PrimaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, {
|
2316
|
-
ref
|
2317
|
-
|
2381
|
+
var PrimaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, __spreadProps(__spreadValues({
|
2382
|
+
ref
|
2383
|
+
}, props), {
|
2318
2384
|
kind: "primary"
|
2319
|
-
}));
|
2385
|
+
})));
|
2320
2386
|
PrimaryDropdownButton.displayName = "PrimaryDropdownButton";
|
2321
|
-
var SecondaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, {
|
2322
|
-
ref
|
2323
|
-
|
2387
|
+
var SecondaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, __spreadProps(__spreadValues({
|
2388
|
+
ref
|
2389
|
+
}, props), {
|
2324
2390
|
kind: "secondary"
|
2325
|
-
}));
|
2391
|
+
})));
|
2326
2392
|
SecondaryDropdownButton.displayName = "SecondaryDropdownButton";
|
2327
2393
|
|
2328
2394
|
// src/common/Typography/Typography.tsx
|
@@ -2330,24 +2396,32 @@ var import_resolveTheme = __toESM(require_resolveTheme());
|
|
2330
2396
|
import React7 from "react";
|
2331
2397
|
import isUndefined5 from "lodash/isUndefined";
|
2332
2398
|
var typographies = import_resolveTheme.theme.typography.sizes.reduce(
|
2333
|
-
(acc, { name, className }) => ({
|
2399
|
+
(acc, { name, className }) => __spreadProps(__spreadValues({}, acc), { [name]: className }),
|
2334
2400
|
{}
|
2335
2401
|
);
|
2336
|
-
var Typography = ({
|
2337
|
-
|
2338
|
-
|
2339
|
-
|
2340
|
-
|
2341
|
-
|
2342
|
-
|
2343
|
-
|
2402
|
+
var Typography = (_a) => {
|
2403
|
+
var _b = _a, {
|
2404
|
+
children,
|
2405
|
+
variant = "body-default",
|
2406
|
+
color,
|
2407
|
+
htmlTag = "div",
|
2408
|
+
className,
|
2409
|
+
fontWeight
|
2410
|
+
} = _b, rest = __objRest(_b, [
|
2411
|
+
"children",
|
2412
|
+
"variant",
|
2413
|
+
"color",
|
2414
|
+
"htmlTag",
|
2415
|
+
"className",
|
2416
|
+
"fontWeight"
|
2417
|
+
]);
|
2344
2418
|
const HtmlElement = htmlTag;
|
2345
2419
|
const resolvedColorName = isUndefined5(color) || color === "current" ? "grey-80" : color;
|
2346
2420
|
const style = useStyle({ fontWeight });
|
2347
|
-
return /* @__PURE__ */ React7.createElement(HtmlElement, {
|
2421
|
+
return /* @__PURE__ */ React7.createElement(HtmlElement, __spreadValues({
|
2348
2422
|
className: classNames(typographies[variant], `text-${resolvedColorName}`, className),
|
2349
2423
|
style
|
2350
|
-
}, children);
|
2424
|
+
}, rest), children);
|
2351
2425
|
};
|
2352
2426
|
|
2353
2427
|
// src/common/Alert/Alert.tsx
|
@@ -2374,116 +2448,137 @@ var alertTypes = {
|
|
2374
2448
|
color: "success-40"
|
2375
2449
|
}
|
2376
2450
|
};
|
2377
|
-
var Alert = ({
|
2378
|
-
|
2379
|
-
|
2380
|
-
|
2381
|
-
|
2382
|
-
|
2383
|
-
}
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
"
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
|
2398
|
-
|
2399
|
-
|
2400
|
-
|
2401
|
-
|
2402
|
-
|
2403
|
-
|
2404
|
-
|
2405
|
-
|
2406
|
-
|
2407
|
-
|
2408
|
-
|
2409
|
-
|
2410
|
-
|
2411
|
-
|
2412
|
-
|
2413
|
-
}, children);
|
2414
|
-
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
|
-
|
2420
|
-
|
2421
|
-
})
|
2422
|
-
|
2423
|
-
|
2424
|
-
},
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2429
|
-
})
|
2451
|
+
var Alert = (_a) => {
|
2452
|
+
var _b = _a, {
|
2453
|
+
children,
|
2454
|
+
className,
|
2455
|
+
type,
|
2456
|
+
dense
|
2457
|
+
} = _b, rest = __objRest(_b, [
|
2458
|
+
"children",
|
2459
|
+
"className",
|
2460
|
+
"type",
|
2461
|
+
"dense"
|
2462
|
+
]);
|
2463
|
+
return /* @__PURE__ */ React8.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2464
|
+
className: classNames(
|
2465
|
+
tw("rounded grid grid-cols-[auto_1fr_auto] items-center gap-x-3 gap-y-2", {
|
2466
|
+
"bg-error-5": type === "error",
|
2467
|
+
"bg-info-5": type === "information",
|
2468
|
+
"bg-success-5": type === "success",
|
2469
|
+
"bg-warning-5": type === "warning",
|
2470
|
+
"p-4": Boolean(dense),
|
2471
|
+
"p-5": !dense
|
2472
|
+
}),
|
2473
|
+
className
|
2474
|
+
)
|
2475
|
+
}), children);
|
2476
|
+
};
|
2477
|
+
Alert.Title = (_a) => {
|
2478
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2479
|
+
return /* @__PURE__ */ React8.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
2480
|
+
variant: "body-default",
|
2481
|
+
color: "grey-80",
|
2482
|
+
fontWeight: 500,
|
2483
|
+
className: classNames(tw("col-start-2"), className)
|
2484
|
+
}), children);
|
2485
|
+
};
|
2486
|
+
Alert.Description = (_a) => {
|
2487
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2488
|
+
return /* @__PURE__ */ React8.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
2489
|
+
variant: "body-small",
|
2490
|
+
color: "grey-60",
|
2491
|
+
className: classNames(tw("col-start-2"), className)
|
2492
|
+
}), children);
|
2493
|
+
};
|
2494
|
+
Alert.Actions = (_a) => {
|
2495
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2496
|
+
return /* @__PURE__ */ React8.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2497
|
+
className: classNames(tw("flex gap-4 col-start-2"), className)
|
2498
|
+
}), children);
|
2499
|
+
};
|
2500
|
+
Alert.Icon = (_a) => {
|
2501
|
+
var _b = _a, { type, dense } = _b, rest = __objRest(_b, ["type", "dense"]);
|
2502
|
+
return /* @__PURE__ */ React8.createElement("div", {
|
2503
|
+
className: tw("h-[20px] col-start-1 row-start-1", { "self-start": !dense })
|
2504
|
+
}, /* @__PURE__ */ React8.createElement(Icon, __spreadProps(__spreadValues({}, rest), {
|
2505
|
+
icon: alertTypes[type].icon,
|
2506
|
+
color: alertTypes[type].color,
|
2507
|
+
fontSize: 20
|
2508
|
+
})));
|
2509
|
+
};
|
2510
|
+
Alert.Dismiss = (_a) => {
|
2511
|
+
var _b = _a, { type } = _b, rest = __objRest(_b, ["type"]);
|
2512
|
+
return /* @__PURE__ */ React8.createElement("div", {
|
2513
|
+
className: tw("h-[20px] col-start-3 row-start-1")
|
2514
|
+
}, /* @__PURE__ */ React8.createElement(IconButton, __spreadProps(__spreadValues({}, rest), {
|
2515
|
+
UNSAFE_className: tw("-m-2"),
|
2516
|
+
tooltip: "Dismiss",
|
2517
|
+
icon: import_cross.default
|
2518
|
+
})));
|
2519
|
+
};
|
2430
2520
|
|
2431
2521
|
// src/common/Checkbox/Checkbox.tsx
|
2432
2522
|
import React9 from "react";
|
2433
2523
|
var import_tick = __toESM(require_tick());
|
2434
2524
|
var import_minus = __toESM(require_minus());
|
2435
2525
|
var Checkbox = React9.forwardRef(
|
2436
|
-
(
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
"
|
2441
|
-
|
2442
|
-
|
2443
|
-
|
2444
|
-
|
2445
|
-
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2452
|
-
|
2453
|
-
"
|
2454
|
-
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
|
2459
|
-
|
2460
|
-
|
2461
|
-
|
2462
|
-
|
2463
|
-
|
2464
|
-
|
2465
|
-
|
2466
|
-
|
2467
|
-
"
|
2468
|
-
|
2469
|
-
|
2470
|
-
|
2526
|
+
(_a, ref) => {
|
2527
|
+
var _b = _a, { id, children, name, checked, disabled = false, readOnly = false, indeterminate = false } = _b, props = __objRest(_b, ["id", "children", "name", "checked", "disabled", "readOnly", "indeterminate"]);
|
2528
|
+
return /* @__PURE__ */ React9.createElement("span", {
|
2529
|
+
className: classNames(
|
2530
|
+
tw("inline-flex justify-center items-center relative self-center", {
|
2531
|
+
"text-grey-30": disabled,
|
2532
|
+
"text-grey-100 cursor-pointer": !disabled
|
2533
|
+
})
|
2534
|
+
)
|
2535
|
+
}, /* @__PURE__ */ React9.createElement("input", __spreadProps(__spreadValues({
|
2536
|
+
id,
|
2537
|
+
ref,
|
2538
|
+
type: "checkbox",
|
2539
|
+
name
|
2540
|
+
}, props), {
|
2541
|
+
checked,
|
2542
|
+
className: classNames(
|
2543
|
+
tw("appearance-none rounded-sm border"),
|
2544
|
+
{
|
2545
|
+
"cursor-pointer": !disabled,
|
2546
|
+
"border-grey-20 hover:border-grey-50 focus:border-info-70": !disabled && !checked,
|
2547
|
+
"border-navyBlue-100 bg-navyBlue-100": !disabled && checked,
|
2548
|
+
"border-grey-5 cursor-not-allowed": disabled,
|
2549
|
+
"bg-grey-0": disabled && checked
|
2550
|
+
},
|
2551
|
+
props.className
|
2552
|
+
),
|
2553
|
+
style: __spreadValues({ width: 16, height: 16 }, props.style),
|
2554
|
+
readOnly,
|
2555
|
+
disabled
|
2556
|
+
})), (checked || indeterminate) && /* @__PURE__ */ React9.createElement(Icon, {
|
2557
|
+
className: tw("absolute top-2 left-2 w-3 h-3 pointer-events-none [&>path]:stroke-2", {
|
2558
|
+
"text-white [&>path]:stroke-white": !disabled,
|
2559
|
+
"text-grey-30 [&>path]:stroke-grey-30": disabled
|
2560
|
+
}),
|
2561
|
+
icon: indeterminate ? import_minus.default : import_tick.default
|
2562
|
+
}));
|
2563
|
+
}
|
2471
2564
|
);
|
2472
2565
|
|
2473
2566
|
// src/common/Chip/Chip.tsx
|
2474
2567
|
import React10 from "react";
|
2475
2568
|
var Container = React10.forwardRef(
|
2476
|
-
(
|
2477
|
-
|
2478
|
-
|
2479
|
-
|
2480
|
-
|
2481
|
-
"
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
2486
|
-
|
2569
|
+
(_a, ref) => {
|
2570
|
+
var _b = _a, { dense = false, className, children } = _b, rest = __objRest(_b, ["dense", "className", "children"]);
|
2571
|
+
return /* @__PURE__ */ React10.createElement("span", __spreadValues({
|
2572
|
+
ref,
|
2573
|
+
className: classNames(
|
2574
|
+
tw("inline-flex items-center rounded-sm transition whitespace-nowrap", {
|
2575
|
+
"typography-body-small py-2 px-3 gap-x-3": !dense,
|
2576
|
+
"typography-caption-default py-1 px-2 gap-x-2": dense
|
2577
|
+
}),
|
2578
|
+
className
|
2579
|
+
)
|
2580
|
+
}, rest), children);
|
2581
|
+
}
|
2487
2582
|
);
|
2488
2583
|
var Chip = {
|
2489
2584
|
Container
|
@@ -2513,111 +2608,146 @@ import React12 from "react";
|
|
2513
2608
|
|
2514
2609
|
// src/components/Typography/Typography.tsx
|
2515
2610
|
import React11 from "react";
|
2516
|
-
var Typography2 = (props) => /* @__PURE__ */ React11.createElement(Typography, {
|
2517
|
-
|
2518
|
-
});
|
2519
|
-
|
2520
|
-
|
2521
|
-
|
2522
|
-
|
2523
|
-
}
|
2524
|
-
Typography2.Subheading = (
|
2525
|
-
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
})
|
2534
|
-
|
2535
|
-
|
2536
|
-
|
2537
|
-
|
2538
|
-
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2542
|
-
|
2543
|
-
});
|
2611
|
+
var Typography2 = (props) => /* @__PURE__ */ React11.createElement(Typography, __spreadValues({}, props));
|
2612
|
+
Typography2.Heading = (_a) => {
|
2613
|
+
var _b = _a, { htmlTag = "h1" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2614
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2615
|
+
htmlTag,
|
2616
|
+
variant: "heading-xl"
|
2617
|
+
}));
|
2618
|
+
};
|
2619
|
+
Typography2.Subheading = (_a) => {
|
2620
|
+
var _b = _a, { htmlTag = "h2" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2621
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2622
|
+
htmlTag,
|
2623
|
+
variant: "heading-large"
|
2624
|
+
}));
|
2625
|
+
};
|
2626
|
+
Typography2.LargeText = (_a) => {
|
2627
|
+
var _b = _a, { htmlTag = "p" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2628
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2629
|
+
htmlTag,
|
2630
|
+
variant: "body-large"
|
2631
|
+
}));
|
2632
|
+
};
|
2633
|
+
Typography2.MediumText = (_a) => {
|
2634
|
+
var _b = _a, { htmlTag = "p" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2635
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2636
|
+
htmlTag,
|
2637
|
+
variant: "body-default-medium"
|
2638
|
+
}));
|
2639
|
+
};
|
2640
|
+
Typography2.Text = (_a) => {
|
2641
|
+
var _b = _a, { htmlTag = "p" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2642
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2643
|
+
htmlTag,
|
2644
|
+
variant: "body-default"
|
2645
|
+
}));
|
2646
|
+
};
|
2544
2647
|
Typography2.Paragraph = Typography2.Text;
|
2545
2648
|
Typography2.P = Typography2.Text;
|
2546
|
-
Typography2.SmallText = (
|
2547
|
-
|
2548
|
-
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
2554
|
-
|
2555
|
-
})
|
2556
|
-
|
2557
|
-
|
2558
|
-
|
2559
|
-
|
2560
|
-
|
2649
|
+
Typography2.SmallText = (_a) => {
|
2650
|
+
var _b = _a, { htmlTag = "p" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2651
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2652
|
+
htmlTag,
|
2653
|
+
variant: "body-small"
|
2654
|
+
}));
|
2655
|
+
};
|
2656
|
+
Typography2.SmallTextBold = (_a) => {
|
2657
|
+
var _b = _a, { htmlTag = "p" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2658
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2659
|
+
htmlTag,
|
2660
|
+
variant: "body-small-medium"
|
2661
|
+
}));
|
2662
|
+
};
|
2663
|
+
Typography2.Caption = (_a) => {
|
2664
|
+
var _b = _a, { htmlTag = "p" } = _b, props = __objRest(_b, ["htmlTag"]);
|
2665
|
+
return /* @__PURE__ */ React11.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
2666
|
+
htmlTag,
|
2667
|
+
variant: "caption-default"
|
2668
|
+
}));
|
2669
|
+
};
|
2561
2670
|
|
2562
2671
|
// src/common/DropdownMenu/DropdownMenu.tsx
|
2563
2672
|
var import_tick2 = __toESM(require_tick());
|
2564
2673
|
var DropdownMenu = React12.forwardRef(
|
2565
|
-
(
|
2566
|
-
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
2573
|
-
|
2674
|
+
(_a, ref) => {
|
2675
|
+
var _b = _a, { maxHeight = "450px", minWidth = "125px", maxWidth, className, children } = _b, props = __objRest(_b, ["maxHeight", "minWidth", "maxWidth", "className", "children"]);
|
2676
|
+
return /* @__PURE__ */ React12.createElement("div", __spreadValues({
|
2677
|
+
ref,
|
2678
|
+
style: { maxHeight, minWidth, maxWidth },
|
2679
|
+
className: classNames(
|
2680
|
+
className,
|
2681
|
+
"p-3 bg-white w-full overflow-y-auto overflow-x-hidden typography-body-small-medium text-grey-70"
|
2682
|
+
)
|
2683
|
+
}, props), children);
|
2684
|
+
}
|
2685
|
+
);
|
2686
|
+
var List = React12.forwardRef(
|
2687
|
+
(_a, ref) => {
|
2688
|
+
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
2689
|
+
return /* @__PURE__ */ React12.createElement("ul", __spreadValues({
|
2690
|
+
ref
|
2691
|
+
}, props), children);
|
2692
|
+
}
|
2574
2693
|
);
|
2694
|
+
DropdownMenu.List = List;
|
2575
2695
|
var Group = React12.forwardRef(
|
2576
|
-
(
|
2577
|
-
|
2578
|
-
|
2579
|
-
|
2580
|
-
|
2581
|
-
className
|
2582
|
-
|
2583
|
-
|
2584
|
-
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
2588
|
-
|
2696
|
+
(_a, ref) => {
|
2697
|
+
var _b = _a, { className, title, titleProps, children } = _b, props = __objRest(_b, ["className", "title", "titleProps", "children"]);
|
2698
|
+
return /* @__PURE__ */ React12.createElement("li", __spreadValues({
|
2699
|
+
ref
|
2700
|
+
}, props), title && /* @__PURE__ */ React12.createElement("div", __spreadValues({
|
2701
|
+
className: classNames(
|
2702
|
+
className,
|
2703
|
+
"p-3 text-grey-40 uppercase cursor-default typography-caption-default font-medium",
|
2704
|
+
{
|
2705
|
+
"text-grey-20": props.disabled
|
2706
|
+
}
|
2707
|
+
)
|
2708
|
+
}, titleProps), title), children);
|
2709
|
+
}
|
2589
2710
|
);
|
2590
2711
|
DropdownMenu.Group = Group;
|
2591
2712
|
var Item = React12.forwardRef(
|
2592
|
-
(
|
2593
|
-
|
2594
|
-
|
2595
|
-
|
2596
|
-
"
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
|
2602
|
-
icon
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
2607
|
-
|
2713
|
+
(_a, ref) => {
|
2714
|
+
var _b = _a, { kind, highlighted, selected, className, icon, children } = _b, props = __objRest(_b, ["kind", "highlighted", "selected", "className", "icon", "children"]);
|
2715
|
+
return /* @__PURE__ */ React12.createElement("li", __spreadValues({
|
2716
|
+
ref,
|
2717
|
+
className: classNames(className, "flex items-center gap-x-3 p-3 outline-none", {
|
2718
|
+
"cursor-pointer hover:bg-grey-0": !props.disabled,
|
2719
|
+
"bg-grey-0": highlighted,
|
2720
|
+
"text-primary-80": kind === "action",
|
2721
|
+
"text-grey-20 cursor-not-allowed": props.disabled
|
2722
|
+
})
|
2723
|
+
}, props), icon && /* @__PURE__ */ React12.createElement(InlineIcon, {
|
2724
|
+
icon
|
2725
|
+
}), /* @__PURE__ */ React12.createElement("span", {
|
2726
|
+
className: tw("grow")
|
2727
|
+
}, children), selected && /* @__PURE__ */ React12.createElement(InlineIcon, {
|
2728
|
+
icon: import_tick2.default
|
2729
|
+
}));
|
2730
|
+
}
|
2608
2731
|
);
|
2609
2732
|
DropdownMenu.Item = Item;
|
2610
2733
|
var Description = ({ disabled, children }) => /* @__PURE__ */ React12.createElement(Typography2.Caption, {
|
2611
2734
|
color: disabled ? "grey-20" : "grey-40"
|
2612
2735
|
}, children);
|
2613
2736
|
DropdownMenu.Description = Description;
|
2614
|
-
var Separator = (
|
2615
|
-
|
2616
|
-
|
2737
|
+
var Separator = (_a) => {
|
2738
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
2739
|
+
return /* @__PURE__ */ React12.createElement("li", __spreadProps(__spreadValues({}, props), {
|
2617
2740
|
className: classNames(className, tw("m-3 block bg-grey-5 h-[1px]"))
|
2618
|
-
});
|
2741
|
+
}));
|
2619
2742
|
};
|
2620
2743
|
DropdownMenu.Separator = Separator;
|
2744
|
+
var EmptyStateContainer = (_a) => {
|
2745
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
2746
|
+
return /* @__PURE__ */ React12.createElement("div", __spreadValues({
|
2747
|
+
className: classNames(tw("border border-dashed border-grey-10 p-3"), className)
|
2748
|
+
}, props), children);
|
2749
|
+
};
|
2750
|
+
DropdownMenu.EmptyStateContainer = EmptyStateContainer;
|
2621
2751
|
|
2622
2752
|
// src/common/InputGroup/InputGroup.tsx
|
2623
2753
|
import React14 from "react";
|
@@ -2677,7 +2807,7 @@ var Grid = Tailwindify(
|
|
2677
2807
|
});
|
2678
2808
|
const HtmlElement = htmlTag;
|
2679
2809
|
return /* @__PURE__ */ React13.createElement(HtmlElement, {
|
2680
|
-
style: {
|
2810
|
+
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
2681
2811
|
className
|
2682
2812
|
}, children);
|
2683
2813
|
}
|
@@ -2690,104 +2820,136 @@ var gridColumnStyles = {
|
|
2690
2820
|
"3": "grid-cols-3",
|
2691
2821
|
"auto": "auto-cols-fr"
|
2692
2822
|
};
|
2693
|
-
var InputGroup = (
|
2694
|
-
|
2695
|
-
|
2823
|
+
var InputGroup = (_a) => {
|
2824
|
+
var _b = _a, { cols = "1", children } = _b, rest = __objRest(_b, ["cols", "children"]);
|
2825
|
+
return /* @__PURE__ */ React14.createElement(Grid, __spreadProps(__spreadValues({}, rest), {
|
2696
2826
|
display: "inline-grid",
|
2697
2827
|
colGap: "l4",
|
2698
2828
|
rowGap: "3",
|
2699
2829
|
cols: cols !== "auto" ? cols : void 0,
|
2700
2830
|
className: gridColumnStyles[cols]
|
2701
|
-
}, children);
|
2831
|
+
}), children);
|
2702
2832
|
};
|
2703
2833
|
|
2704
2834
|
// src/common/Modal/Modal.tsx
|
2705
2835
|
import React15 from "react";
|
2706
|
-
var Modal = (
|
2707
|
-
|
2708
|
-
|
2709
|
-
tw("fixed inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
2710
|
-
className
|
2711
|
-
)
|
2712
|
-
}, children) : null;
|
2713
|
-
Modal.BackDrop = ({ className, ...rest }) => /* @__PURE__ */ React15.createElement("div", {
|
2714
|
-
...rest,
|
2715
|
-
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-navyBlue-100 opacity-70"), className)
|
2716
|
-
});
|
2717
|
-
Modal.Dialog = React15.forwardRef(
|
2718
|
-
({ children, className, size = "sm", ...rest }, ref) => /* @__PURE__ */ React15.createElement("div", {
|
2719
|
-
ref,
|
2720
|
-
...rest,
|
2836
|
+
var Modal = (_a) => {
|
2837
|
+
var _b = _a, { children, className, open } = _b, rest = __objRest(_b, ["children", "className", "open"]);
|
2838
|
+
return open ? /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2721
2839
|
className: classNames(
|
2722
|
-
tw("
|
2723
|
-
{
|
2724
|
-
"max-w-[600px]": size === "sm",
|
2725
|
-
"max-w-[940px]": size === "md",
|
2726
|
-
"min-h-full": size === "full"
|
2727
|
-
},
|
2840
|
+
tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
2728
2841
|
className
|
2729
2842
|
)
|
2730
|
-
}, children)
|
2843
|
+
}), children) : null;
|
2844
|
+
};
|
2845
|
+
Modal.BackDrop = (_a) => {
|
2846
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
2847
|
+
return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2848
|
+
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-navyBlue-100 opacity-70"), className)
|
2849
|
+
}));
|
2850
|
+
};
|
2851
|
+
Modal.Dialog = React15.forwardRef(
|
2852
|
+
(_a, ref) => {
|
2853
|
+
var _b = _a, { children, className, size = "sm" } = _b, rest = __objRest(_b, ["children", "className", "size"]);
|
2854
|
+
return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({
|
2855
|
+
ref,
|
2856
|
+
"aria-modal": "true"
|
2857
|
+
}, rest), {
|
2858
|
+
className: classNames(
|
2859
|
+
tw("bg-white rounded mx-7 w-full max-h-full flex flex-col"),
|
2860
|
+
{
|
2861
|
+
"max-w-[600px]": size === "sm",
|
2862
|
+
"max-w-[940px]": size === "md",
|
2863
|
+
"min-h-full": size === "full"
|
2864
|
+
},
|
2865
|
+
className
|
2866
|
+
)
|
2867
|
+
}), children);
|
2868
|
+
}
|
2731
2869
|
);
|
2732
|
-
Modal.Header = (
|
2733
|
-
|
2734
|
-
|
2735
|
-
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2740
|
-
|
2741
|
-
|
2742
|
-
|
2743
|
-
|
2744
|
-
|
2745
|
-
|
2746
|
-
|
2747
|
-
|
2748
|
-
|
2749
|
-
|
2750
|
-
|
2751
|
-
|
2752
|
-
|
2753
|
-
|
2754
|
-
|
2755
|
-
|
2756
|
-
},
|
2757
|
-
|
2758
|
-
|
2759
|
-
|
2760
|
-
|
2761
|
-
|
2762
|
-
|
2763
|
-
|
2764
|
-
},
|
2870
|
+
Modal.Header = (_a) => {
|
2871
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2872
|
+
return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2873
|
+
className: classNames(tw("px-7 py-6 gap-3 flex items-center"), className)
|
2874
|
+
}), children);
|
2875
|
+
};
|
2876
|
+
Modal.Title = (_a) => {
|
2877
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2878
|
+
return /* @__PURE__ */ React15.createElement(Typography, __spreadValues({
|
2879
|
+
htmlTag: "h2",
|
2880
|
+
variant: "heading-large",
|
2881
|
+
color: "grey-90",
|
2882
|
+
className: classNames(tw("leading-none"), className)
|
2883
|
+
}, rest), children);
|
2884
|
+
};
|
2885
|
+
Modal.Subtitle = (_a) => {
|
2886
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
2887
|
+
return /* @__PURE__ */ React15.createElement(Typography, __spreadValues({
|
2888
|
+
variant: "body-small",
|
2889
|
+
color: "grey-60"
|
2890
|
+
}, rest), children);
|
2891
|
+
};
|
2892
|
+
Modal.TitleContainer = (_a) => {
|
2893
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2894
|
+
return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2895
|
+
className: classNames(tw("flex flex-col grow gap-2"), className)
|
2896
|
+
}), children);
|
2897
|
+
};
|
2898
|
+
Modal.Body = (_a) => {
|
2899
|
+
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
2900
|
+
return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2901
|
+
className: classNames(tw("px-7 grow overflow-y-auto", { "pb-6": noFooter }), className),
|
2902
|
+
style: __spreadValues({ maxHeight }, style)
|
2903
|
+
}), children);
|
2904
|
+
};
|
2905
|
+
Modal.Footer = (_a) => {
|
2906
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2907
|
+
return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2908
|
+
className: classNames(tw("px-7 py-6"), className)
|
2909
|
+
}), children);
|
2910
|
+
};
|
2911
|
+
Modal.Actions = (_a) => {
|
2912
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2913
|
+
return /* @__PURE__ */ React15.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2914
|
+
className: classNames(tw("flex gap-4 justify-end"), className)
|
2915
|
+
}), children);
|
2916
|
+
};
|
2765
2917
|
|
2766
2918
|
// src/common/PopoverDialog/PopoverDialog.tsx
|
2767
2919
|
import React16 from "react";
|
2768
|
-
var Header = (
|
2769
|
-
|
2770
|
-
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
2775
|
-
|
2776
|
-
},
|
2777
|
-
|
2778
|
-
|
2779
|
-
|
2780
|
-
|
2781
|
-
|
2782
|
-
}, children);
|
2783
|
-
|
2784
|
-
|
2785
|
-
|
2786
|
-
|
2787
|
-
|
2788
|
-
|
2789
|
-
|
2790
|
-
}, children);
|
2920
|
+
var Header = (_a) => {
|
2921
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2922
|
+
return /* @__PURE__ */ React16.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2923
|
+
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
2924
|
+
}), children);
|
2925
|
+
};
|
2926
|
+
var Title = (_a) => {
|
2927
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2928
|
+
return /* @__PURE__ */ React16.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
2929
|
+
htmlTag: "h1",
|
2930
|
+
variant: "body-small-medium"
|
2931
|
+
}), children);
|
2932
|
+
};
|
2933
|
+
var Body = (_a) => {
|
2934
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2935
|
+
return /* @__PURE__ */ React16.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
2936
|
+
htmlTag: "div",
|
2937
|
+
variant: "caption-default",
|
2938
|
+
className: classNames(tw("px-5 overflow-y-auto"), className)
|
2939
|
+
}), children);
|
2940
|
+
};
|
2941
|
+
var Footer = (_a) => {
|
2942
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2943
|
+
return /* @__PURE__ */ React16.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2944
|
+
className: classNames(tw("p-5"), className)
|
2945
|
+
}), children);
|
2946
|
+
};
|
2947
|
+
var Actions = (_a) => {
|
2948
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
2949
|
+
return /* @__PURE__ */ React16.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
2950
|
+
className: classNames(tw("flex gap-4"), className)
|
2951
|
+
}), children);
|
2952
|
+
};
|
2791
2953
|
var PopoverDialog = {
|
2792
2954
|
Header,
|
2793
2955
|
Title,
|
@@ -2798,16 +2960,18 @@ var PopoverDialog = {
|
|
2798
2960
|
|
2799
2961
|
// src/common/Popover/Popover.tsx
|
2800
2962
|
import React17 from "react";
|
2801
|
-
var PopoverPanel = React17.forwardRef((
|
2802
|
-
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
2806
|
-
|
2963
|
+
var PopoverPanel = React17.forwardRef((_a, ref) => {
|
2964
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
2965
|
+
return /* @__PURE__ */ React17.createElement("div", __spreadValues({
|
2966
|
+
ref,
|
2967
|
+
className: classNames(
|
2968
|
+
className,
|
2969
|
+
tw(
|
2970
|
+
"rounded-sm shadow-16dp bg-white mt-1 focus-visible:outline-0 focus-visible:border-info-70 border border-grey-20"
|
2971
|
+
)
|
2807
2972
|
)
|
2808
|
-
),
|
2809
|
-
|
2810
|
-
}, children));
|
2973
|
+
}, props), children);
|
2974
|
+
});
|
2811
2975
|
var Popover = {
|
2812
2976
|
Panel: PopoverPanel
|
2813
2977
|
};
|
@@ -2815,39 +2979,42 @@ var Popover = {
|
|
2815
2979
|
// src/common/RadioButton/RadioButton.tsx
|
2816
2980
|
import React18 from "react";
|
2817
2981
|
var RadioButton = React18.forwardRef(
|
2818
|
-
(
|
2819
|
-
|
2820
|
-
|
2821
|
-
|
2822
|
-
"
|
2982
|
+
(_a, ref) => {
|
2983
|
+
var _b = _a, { id, children, name, checked = false, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "checked", "disabled", "readOnly"]);
|
2984
|
+
return /* @__PURE__ */ React18.createElement("span", {
|
2985
|
+
className: classNames(
|
2986
|
+
tw("inline-flex justify-center items-center relative self-center", {
|
2987
|
+
"text-grey-30": disabled,
|
2988
|
+
"text-grey-100": !disabled
|
2989
|
+
})
|
2990
|
+
)
|
2991
|
+
}, /* @__PURE__ */ React18.createElement("input", __spreadProps(__spreadValues({
|
2992
|
+
id,
|
2993
|
+
ref,
|
2994
|
+
type: "radio",
|
2995
|
+
name
|
2996
|
+
}, props), {
|
2997
|
+
checked,
|
2998
|
+
className: classNames(
|
2999
|
+
tw("appearance-none rounded-full border cursor-pointer"),
|
3000
|
+
{
|
3001
|
+
"border-grey-20 hover:border-grey-50 focus:border-info-70": !disabled && !checked,
|
3002
|
+
"border-navyBlue-100": !disabled && checked,
|
3003
|
+
"border-grey-5": disabled
|
3004
|
+
},
|
3005
|
+
props.className
|
3006
|
+
),
|
3007
|
+
style: __spreadValues({ width: 16, height: 16 }, props.style),
|
3008
|
+
readOnly,
|
3009
|
+
disabled
|
3010
|
+
})), /* @__PURE__ */ React18.createElement("span", {
|
3011
|
+
style: { backgroundColor: "currentcolor" },
|
3012
|
+
className: tw("absolute w-3 h-3 rounded-full bg-navyBlue-100 pointer-events-none", {
|
3013
|
+
"opacity-0": !checked,
|
3014
|
+
"opacity-40": disabled && checked
|
2823
3015
|
})
|
2824
|
-
)
|
2825
|
-
}
|
2826
|
-
id,
|
2827
|
-
ref,
|
2828
|
-
type: "radio",
|
2829
|
-
name,
|
2830
|
-
...props,
|
2831
|
-
checked,
|
2832
|
-
className: classNames(
|
2833
|
-
tw("appearance-none rounded-full border cursor-pointer"),
|
2834
|
-
{
|
2835
|
-
"border-grey-20 hover:border-grey-50 focus:border-info-70": !disabled && !checked,
|
2836
|
-
"border-navyBlue-100": !disabled && checked,
|
2837
|
-
"border-grey-5": disabled
|
2838
|
-
},
|
2839
|
-
props.className
|
2840
|
-
),
|
2841
|
-
style: { width: 16, height: 16, ...props.style },
|
2842
|
-
readOnly,
|
2843
|
-
disabled
|
2844
|
-
}), /* @__PURE__ */ React18.createElement("span", {
|
2845
|
-
style: { backgroundColor: "currentcolor" },
|
2846
|
-
className: tw("absolute w-3 h-3 rounded-full bg-navyBlue-100 pointer-events-none", {
|
2847
|
-
"opacity-0": !checked,
|
2848
|
-
"opacity-40": disabled && checked
|
2849
|
-
})
|
2850
|
-
}))
|
3016
|
+
}));
|
3017
|
+
}
|
2851
3018
|
);
|
2852
3019
|
|
2853
3020
|
// src/common/Select/Select.tsx
|
@@ -2857,138 +3024,163 @@ var import_chevronUp = __toESM(require_chevronUp());
|
|
2857
3024
|
var import_search = __toESM(require_search());
|
2858
3025
|
var import_tick3 = __toESM(require_tick());
|
2859
3026
|
function getOptionLabelBuiltin(option) {
|
3027
|
+
var _a;
|
2860
3028
|
if (option === null) {
|
2861
3029
|
return "";
|
2862
3030
|
}
|
2863
3031
|
if (typeof option === "string") {
|
2864
3032
|
return option;
|
2865
3033
|
}
|
2866
|
-
return option.label
|
3034
|
+
return (_a = option.label) != null ? _a : "";
|
2867
3035
|
}
|
2868
3036
|
function isOptionDisabledBuiltin(option) {
|
2869
3037
|
return !!option.disabled;
|
2870
3038
|
}
|
2871
3039
|
var getValues = (children) => {
|
2872
|
-
|
2873
|
-
|
3040
|
+
var _a;
|
3041
|
+
const values = React19.Children.map(children, (c) => {
|
3042
|
+
var _a2;
|
3043
|
+
return (_a2 = c == null ? void 0 : c.props) == null ? void 0 : _a2.value;
|
3044
|
+
});
|
3045
|
+
return (_a = values == null ? void 0 : values.filter((v) => v !== void 0 && v !== null)) != null ? _a : [];
|
2874
3046
|
};
|
2875
3047
|
var InputContainer = React19.forwardRef(
|
2876
|
-
(
|
3048
|
+
(_a, ref) => {
|
3049
|
+
var _b = _a, { variant = "default", className } = _b, props = __objRest(_b, ["variant", "className"]);
|
3050
|
+
return /* @__PURE__ */ React19.createElement("div", __spreadValues({
|
3051
|
+
ref,
|
3052
|
+
className: classNames(
|
3053
|
+
className,
|
3054
|
+
"relative rounded-sm typography-body-default-medium w-full flex flex-row items-center focus-visible:outline-0 focus-visible:border-info-70",
|
3055
|
+
{
|
3056
|
+
"border px-3 py-[6px]": variant !== "readOnly",
|
3057
|
+
"cursor-default": variant === "readOnly",
|
3058
|
+
"border-grey-20": variant !== "error" && variant !== "readOnly",
|
3059
|
+
"border-error-50": variant === "error",
|
3060
|
+
"hover:border-grey-50": variant !== "error" && variant !== "disabled" && variant !== "focused",
|
3061
|
+
"border-info-70": variant === "focused",
|
3062
|
+
"bg-white": variant !== "disabled",
|
3063
|
+
"cursor-not-allowed border-grey-20 bg-grey-5": variant === "disabled"
|
3064
|
+
}
|
3065
|
+
)
|
3066
|
+
}, props));
|
3067
|
+
}
|
3068
|
+
);
|
3069
|
+
var Input = React19.forwardRef((_a, ref) => {
|
3070
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
3071
|
+
return /* @__PURE__ */ React19.createElement("input", __spreadValues({
|
2877
3072
|
ref,
|
3073
|
+
type: "text",
|
2878
3074
|
className: classNames(
|
2879
3075
|
className,
|
2880
|
-
"
|
3076
|
+
"grow rounded border-0 focus:outline-none px-[1px] my-1 min-w-0 typography-body-small disabled:cursor-not-allowed disabled:bg-grey-5 placeholder:text-grey-40",
|
2881
3077
|
{
|
2882
|
-
"
|
2883
|
-
"
|
2884
|
-
"
|
2885
|
-
"border-error-50": variant === "error",
|
2886
|
-
"hover:border-grey-50": variant !== "error" && variant !== "disabled" && variant !== "focused",
|
2887
|
-
"border-info-70": variant === "focused",
|
2888
|
-
"bg-white": variant !== "disabled",
|
2889
|
-
"cursor-not-allowed border-grey-20 bg-grey-5": variant === "disabled"
|
3078
|
+
"text-grey-70": !props.disabled,
|
3079
|
+
"text-grey-30": props.disabled,
|
3080
|
+
"cursor-default": props.readOnly
|
2890
3081
|
}
|
2891
|
-
)
|
2892
|
-
|
2893
|
-
|
2894
|
-
);
|
2895
|
-
var Input = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement("input", {
|
2896
|
-
ref,
|
2897
|
-
type: "text",
|
2898
|
-
className: classNames(
|
2899
|
-
className,
|
2900
|
-
"grow rounded border-0 focus:outline-none px-[1px] my-1 min-w-0 typography-body-small disabled:cursor-not-allowed disabled:bg-grey-5 placeholder:text-grey-40",
|
2901
|
-
{
|
2902
|
-
"text-grey-70": !props.disabled,
|
2903
|
-
"text-grey-30": props.disabled,
|
2904
|
-
"cursor-default": props.readOnly
|
2905
|
-
}
|
2906
|
-
),
|
2907
|
-
...props
|
2908
|
-
}));
|
3082
|
+
)
|
3083
|
+
}, props));
|
3084
|
+
});
|
2909
3085
|
var Menu = React19.forwardRef(
|
2910
|
-
(
|
2911
|
-
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
2915
|
-
|
3086
|
+
(_a, ref) => {
|
3087
|
+
var _b = _a, { maxHeight = "450px", className, children } = _b, props = __objRest(_b, ["maxHeight", "className", "children"]);
|
3088
|
+
return /* @__PURE__ */ React19.createElement("ul", __spreadValues({
|
3089
|
+
ref,
|
3090
|
+
style: { maxHeight },
|
3091
|
+
className: classNames(className, tw("overflow-y-auto"))
|
3092
|
+
}, props), children);
|
3093
|
+
}
|
2916
3094
|
);
|
2917
3095
|
var NoResults = React19.forwardRef(
|
2918
|
-
(
|
2919
|
-
|
2920
|
-
|
2921
|
-
|
2922
|
-
|
3096
|
+
(_a, ref) => {
|
3097
|
+
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
3098
|
+
return /* @__PURE__ */ React19.createElement("li", __spreadProps(__spreadValues({
|
3099
|
+
ref
|
3100
|
+
}, rest), {
|
3101
|
+
className: classNames(tw("p-3 text-grey-40 italic"), className)
|
3102
|
+
}), children);
|
3103
|
+
}
|
2923
3104
|
);
|
2924
|
-
var
|
2925
|
-
|
2926
|
-
|
2927
|
-
|
2928
|
-
|
2929
|
-
|
2930
|
-
className: tw("border-b-[1px] border-grey-5 mx-3 my-4"),
|
2931
|
-
...props
|
3105
|
+
var EmptyStateContainer2 = React19.forwardRef((_a, ref) => {
|
3106
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
3107
|
+
return /* @__PURE__ */ React19.createElement("li", __spreadValues({
|
3108
|
+
ref,
|
3109
|
+
className: tw("border border-dashed border-grey-10 m-4 p-6")
|
3110
|
+
}, props), children);
|
2932
3111
|
});
|
2933
|
-
var
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
|
2939
|
-
"text-grey-20": props.disabled
|
2940
|
-
}
|
2941
|
-
),
|
2942
|
-
...props
|
2943
|
-
}, children));
|
2944
|
-
var Item2 = React19.forwardRef(
|
2945
|
-
({ highlighted, selected, className, children, ...props }, ref) => /* @__PURE__ */ React19.createElement("li", {
|
3112
|
+
var Divider = (props) => /* @__PURE__ */ React19.createElement("div", __spreadValues({
|
3113
|
+
className: tw("border-b-[1px] border-grey-5 mx-3 my-4")
|
3114
|
+
}, props));
|
3115
|
+
var Group2 = React19.forwardRef((_a, ref) => {
|
3116
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
3117
|
+
return /* @__PURE__ */ React19.createElement("li", __spreadValues({
|
2946
3118
|
ref,
|
2947
|
-
className: classNames(
|
2948
|
-
|
2949
|
-
"
|
2950
|
-
|
2951
|
-
|
2952
|
-
|
2953
|
-
|
2954
|
-
},
|
2955
|
-
|
2956
|
-
|
2957
|
-
|
2958
|
-
|
3119
|
+
className: classNames(
|
3120
|
+
className,
|
3121
|
+
"flex items-center gap-x-3 p-3 text-grey-40 uppercase cursor-default typography-caption-default mt-4 first:mt-0 font-medium",
|
3122
|
+
{
|
3123
|
+
"text-grey-20": props.disabled
|
3124
|
+
}
|
3125
|
+
)
|
3126
|
+
}, props), children);
|
3127
|
+
});
|
3128
|
+
var Item2 = React19.forwardRef(
|
3129
|
+
(_a, ref) => {
|
3130
|
+
var _b = _a, { highlighted, selected, className, children } = _b, props = __objRest(_b, ["highlighted", "selected", "className", "children"]);
|
3131
|
+
return /* @__PURE__ */ React19.createElement("li", __spreadValues({
|
3132
|
+
ref,
|
3133
|
+
className: classNames(className, "flex items-center gap-x-3 p-3", {
|
3134
|
+
"cursor-pointer": !props.disabled,
|
3135
|
+
"bg-grey-0": highlighted,
|
3136
|
+
"text-grey-20": props.disabled,
|
3137
|
+
"hover:bg-grey-0": !props.disabled
|
3138
|
+
})
|
3139
|
+
}, props), /* @__PURE__ */ React19.createElement("span", {
|
3140
|
+
className: tw("grow flex gap-x-3")
|
3141
|
+
}, children), selected && /* @__PURE__ */ React19.createElement(InlineIcon, {
|
3142
|
+
icon: import_tick3.default
|
3143
|
+
}));
|
3144
|
+
}
|
2959
3145
|
);
|
2960
3146
|
var ActionItem = React19.forwardRef(
|
2961
|
-
(
|
2962
|
-
|
2963
|
-
|
2964
|
-
|
2965
|
-
|
2966
|
-
|
2967
|
-
"
|
2968
|
-
|
2969
|
-
|
2970
|
-
|
2971
|
-
|
2972
|
-
|
2973
|
-
|
2974
|
-
icon
|
2975
|
-
|
3147
|
+
(_a, ref) => {
|
3148
|
+
var _b = _a, { className, dense, icon, onClick, children } = _b, props = __objRest(_b, ["className", "dense", "icon", "onClick", "children"]);
|
3149
|
+
return /* @__PURE__ */ React19.createElement("li", __spreadValues({
|
3150
|
+
ref,
|
3151
|
+
role: "button",
|
3152
|
+
onClick: () => !props.disabled && (onClick == null ? void 0 : onClick()),
|
3153
|
+
className: classNames(className, "flex items-center gap-x-3 text-primary-80", {
|
3154
|
+
"p-3": !dense,
|
3155
|
+
"px-3 py-2": dense,
|
3156
|
+
"cursor-pointer": !props.disabled,
|
3157
|
+
"text-grey-20": props.disabled,
|
3158
|
+
"hover:text-primary-70": !props.disabled
|
3159
|
+
})
|
3160
|
+
}, props), icon && /* @__PURE__ */ React19.createElement(InlineIcon, {
|
3161
|
+
icon
|
3162
|
+
}), children);
|
3163
|
+
}
|
2976
3164
|
);
|
2977
|
-
var Toggle = React19.forwardRef((
|
2978
|
-
|
2979
|
-
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
-
|
2986
|
-
})
|
3165
|
+
var Toggle = React19.forwardRef((_a, ref) => {
|
3166
|
+
var _b = _a, { hasFocus, isOpen } = _b, props = __objRest(_b, ["hasFocus", "isOpen"]);
|
3167
|
+
var _a2;
|
3168
|
+
return /* @__PURE__ */ React19.createElement("button", __spreadProps(__spreadValues({
|
3169
|
+
ref,
|
3170
|
+
type: "button",
|
3171
|
+
"aria-label": "Toggle"
|
3172
|
+
}, props), {
|
3173
|
+
className: tw("grow-0 leading-none", { "cursor-not-allowed": (_a2 = props.disabled) != null ? _a2 : false })
|
3174
|
+
}), /* @__PURE__ */ React19.createElement(InlineIcon, {
|
3175
|
+
color: props.disabled ? "grey-40" : "grey-70",
|
3176
|
+
icon: hasFocus ? import_search.default : isOpen ? import_chevronUp.default : import_chevronDown2.default
|
3177
|
+
}));
|
3178
|
+
});
|
2987
3179
|
var Select = {
|
2988
3180
|
InputContainer,
|
2989
3181
|
Input,
|
2990
3182
|
Menu,
|
2991
|
-
EmptyStateContainer,
|
3183
|
+
EmptyStateContainer: EmptyStateContainer2,
|
2992
3184
|
NoResults,
|
2993
3185
|
Divider,
|
2994
3186
|
Group: Group2,
|
@@ -3003,26 +3195,30 @@ var import_chevronUp2 = __toESM(require_chevronUp());
|
|
3003
3195
|
var import_chevronDown3 = __toESM(require_chevronDown());
|
3004
3196
|
var HeadContext = React20.createContext(null);
|
3005
3197
|
var tableClassNames = tw("w-full relative typography-body-default border-spacing-0");
|
3006
|
-
var Table = (
|
3007
|
-
|
3008
|
-
|
3198
|
+
var Table = (_a) => {
|
3199
|
+
var _b = _a, { children, ariaLabel, className } = _b, rest = __objRest(_b, ["children", "ariaLabel", "className"]);
|
3200
|
+
return /* @__PURE__ */ React20.createElement("table", __spreadProps(__spreadValues({}, rest), {
|
3009
3201
|
className: classNames(tableClassNames, className),
|
3010
3202
|
"aria-label": ariaLabel
|
3011
|
-
}, children);
|
3012
|
-
};
|
3013
|
-
var TableHead = (
|
3014
|
-
|
3015
|
-
}, /* @__PURE__ */ React20.createElement("tr", null, /* @__PURE__ */ React20.createElement(HeadContext.Provider, {
|
3016
|
-
|
3017
|
-
}, children)));
|
3018
|
-
|
3019
|
-
|
3020
|
-
}, children);
|
3203
|
+
}), children);
|
3204
|
+
};
|
3205
|
+
var TableHead = (_a) => {
|
3206
|
+
var _b = _a, { children, sticky } = _b, rest = __objRest(_b, ["children", "sticky"]);
|
3207
|
+
return /* @__PURE__ */ React20.createElement("thead", __spreadValues({}, rest), /* @__PURE__ */ React20.createElement("tr", null, /* @__PURE__ */ React20.createElement(HeadContext.Provider, {
|
3208
|
+
value: { children, sticky }
|
3209
|
+
}, children)));
|
3210
|
+
};
|
3211
|
+
var TableBody = (_a) => {
|
3212
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
3213
|
+
return /* @__PURE__ */ React20.createElement("tbody", __spreadValues({}, rest), children);
|
3214
|
+
};
|
3021
3215
|
var rowClassNames = tw("children:border-grey-10 children:last:border-b-0 hover:bg-grey-0");
|
3022
|
-
var TableRow = (
|
3023
|
-
|
3024
|
-
|
3025
|
-
|
3216
|
+
var TableRow = (_a) => {
|
3217
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
3218
|
+
return /* @__PURE__ */ React20.createElement("tr", __spreadProps(__spreadValues({}, rest), {
|
3219
|
+
className: classNames(rowClassNames, className)
|
3220
|
+
}), children);
|
3221
|
+
};
|
3026
3222
|
var cellClassNames = tw("px-4 border-b typography-body-small-medium leading-[18px]");
|
3027
3223
|
var bodyCellClassNames = tw("text-grey-70 py-3 h-[50px]");
|
3028
3224
|
var getAlignClassNames = (align) => tw({ "text-right": align === "right", "text-center": align === "center" });
|
@@ -3030,56 +3226,56 @@ var getHeadCellClassNames = (sticky = true) => {
|
|
3030
3226
|
const common = tw("py-[14px] text-left bg-white border-grey-40 text-grey-50 font-normal");
|
3031
3227
|
return sticky ? classNames(common, tw("sticky top-0")) : common;
|
3032
3228
|
};
|
3033
|
-
var TableCell = (
|
3229
|
+
var TableCell = (_a) => {
|
3230
|
+
var _b = _a, { children, className, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "align"]);
|
3034
3231
|
const headContext = React20.useContext(HeadContext);
|
3035
|
-
return headContext ? /* @__PURE__ */ React20.createElement("th", {
|
3036
|
-
...rest,
|
3232
|
+
return headContext ? /* @__PURE__ */ React20.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
3037
3233
|
className: classNames(
|
3038
3234
|
cellClassNames,
|
3039
3235
|
getHeadCellClassNames(headContext.sticky),
|
3040
3236
|
getAlignClassNames(align),
|
3041
3237
|
className
|
3042
3238
|
)
|
3043
|
-
}, children) : /* @__PURE__ */ React20.createElement("td", {
|
3044
|
-
...rest,
|
3239
|
+
}), children) : /* @__PURE__ */ React20.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
3045
3240
|
className: classNames(cellClassNames, bodyCellClassNames, getAlignClassNames(align), className)
|
3046
|
-
}, children);
|
3241
|
+
}), children);
|
3047
3242
|
};
|
3048
|
-
var TableSelectCell = (
|
3243
|
+
var TableSelectCell = (_a) => {
|
3244
|
+
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
3049
3245
|
return /* @__PURE__ */ React20.createElement(Table.Cell, {
|
3050
3246
|
className: tw("leading-[0px]")
|
3051
|
-
}, props.type === "radio" ? /* @__PURE__ */ React20.createElement(RadioButton, {
|
3052
|
-
"aria-label": ariaLabel
|
3053
|
-
|
3054
|
-
|
3055
|
-
|
3056
|
-
...props
|
3057
|
-
}));
|
3247
|
+
}, props.type === "radio" ? /* @__PURE__ */ React20.createElement(RadioButton, __spreadValues({
|
3248
|
+
"aria-label": ariaLabel
|
3249
|
+
}, props)) : /* @__PURE__ */ React20.createElement(Checkbox, __spreadValues({
|
3250
|
+
"aria-label": ariaLabel
|
3251
|
+
}, props)));
|
3058
3252
|
};
|
3059
3253
|
var sortCellButtonClassNames = tw("group inline-flex items-center text-grey-50");
|
3060
3254
|
var getSortCellIconClassNames = (active) => {
|
3061
3255
|
return tw("text-[9px]", active ? "text-grey-70" : "text-grey-30");
|
3062
3256
|
};
|
3063
|
-
var TableSortCell = (
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3070
|
-
|
3071
|
-
|
3072
|
-
"
|
3073
|
-
|
3074
|
-
"
|
3075
|
-
|
3076
|
-
}
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
3082
|
-
|
3257
|
+
var TableSortCell = (_a) => {
|
3258
|
+
var _b = _a, { children, direction = "none", onClick } = _b, rest = __objRest(_b, ["children", "direction", "onClick"]);
|
3259
|
+
return /* @__PURE__ */ React20.createElement(Table.Cell, __spreadProps(__spreadValues({}, rest), {
|
3260
|
+
"aria-sort": direction
|
3261
|
+
}), /* @__PURE__ */ React20.createElement("span", {
|
3262
|
+
className: sortCellButtonClassNames,
|
3263
|
+
role: "button",
|
3264
|
+
tabIndex: -1,
|
3265
|
+
onClick
|
3266
|
+
}, children, /* @__PURE__ */ React20.createElement("div", {
|
3267
|
+
"data-sort-icons": true,
|
3268
|
+
className: tw("flex flex-col ml-4", {
|
3269
|
+
"invisible group-hover:visible": direction === "none"
|
3270
|
+
})
|
3271
|
+
}, /* @__PURE__ */ React20.createElement(InlineIcon, {
|
3272
|
+
icon: import_chevronUp2.default,
|
3273
|
+
className: getSortCellIconClassNames(direction === "descending")
|
3274
|
+
}), /* @__PURE__ */ React20.createElement(InlineIcon, {
|
3275
|
+
icon: import_chevronDown3.default,
|
3276
|
+
className: getSortCellIconClassNames(direction === "ascending")
|
3277
|
+
}))));
|
3278
|
+
};
|
3083
3279
|
Table.Head = React20.memo(TableHead);
|
3084
3280
|
Table.Body = React20.memo(TableBody);
|
3085
3281
|
Table.Row = React20.memo(TableRow);
|
@@ -3093,6 +3289,7 @@ export {
|
|
3093
3289
|
DIALOG_ICONS_AND_COLORS,
|
3094
3290
|
DropdownMenu,
|
3095
3291
|
InputGroup,
|
3292
|
+
List,
|
3096
3293
|
Modal,
|
3097
3294
|
Popover,
|
3098
3295
|
PopoverDialog,
|