@aivenio/aquarium 0.0.1 → 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 +2 -1
- package/dist/_variables_timescale.scss +2 -1
- package/dist/atoms.cjs +822 -623
- package/dist/atoms.mjs +821 -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/Section/Section.d.ts +14 -0
- package/dist/src/common/Section/Section.js +46 -0
- 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 +3 -2
- 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 +6 -2
- 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 +11 -4
- 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/List/List.d.ts +1 -1
- package/dist/src/components/Modal/Modal.js +16 -8
- package/dist/src/components/MultiInput/MultiInput.d.ts +2 -1
- package/dist/src/components/MultiInput/MultiInput.js +3 -3
- package/dist/src/components/Pagination/usePagination.d.ts +42 -0
- package/dist/src/components/Pagination/usePagination.js +34 -0
- package/dist/src/components/Section/Section.d.ts +17 -0
- package/dist/src/components/Section/Section.js +32 -0
- 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 +4 -1
- package/dist/src/components/index.js +5 -2
- package/dist/src/utils/Blueprint.d.ts +2 -0
- package/dist/src/utils/Blueprint.js +29 -0
- package/dist/styles.css +52 -32
- package/dist/styles_timescaledb.css +52 -32
- package/dist/system.cjs +2837 -2134
- package/dist/system.mjs +2820 -2120
- package/dist/tailwind.config.js +1 -1
- package/dist/tailwind.theme.json +1 -0
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +2 -2
- package/dist/src/components/Positioner/Positioner.d.ts +0 -21
- package/dist/src/components/Positioner/Positioner.js +0 -97
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
|
@@ -1522,6 +1551,7 @@ var tailwind_theme_default = {
|
|
1522
1551
|
"grey-20": "#d2d2d6",
|
1523
1552
|
transparent: "transparent",
|
1524
1553
|
white: "white",
|
1554
|
+
black: "black",
|
1525
1555
|
current: "currentColor",
|
1526
1556
|
"navyBlue-100": "#30375E"
|
1527
1557
|
},
|
@@ -1704,20 +1734,18 @@ function getPxMapping(breakpoints) {
|
|
1704
1734
|
if (!minWidthInPx.endsWith("px")) {
|
1705
1735
|
throw new Error(`Unexpected breakpoint value found: '${minWidthInPx}'. Expecting it to be in px unit.`);
|
1706
1736
|
}
|
1707
|
-
return {
|
1708
|
-
...acc,
|
1737
|
+
return __spreadProps(__spreadValues({}, acc), {
|
1709
1738
|
[key]: parseInt(minWidthInPx, 10)
|
1710
|
-
};
|
1739
|
+
});
|
1711
1740
|
}, {});
|
1712
1741
|
}
|
1713
1742
|
function getMatches(windowSize) {
|
1714
1743
|
const mapping = getPxMapping(allBreakpoints);
|
1715
1744
|
return Object.keys(allBreakpoints).reduce((acc, key) => {
|
1716
1745
|
const isMatch = !isUndefined(windowSize) && windowSize.width > 0 ? windowSize.width > mapping[key] : key === "default" ? true : false;
|
1717
|
-
return {
|
1718
|
-
...acc,
|
1746
|
+
return __spreadProps(__spreadValues({}, acc), {
|
1719
1747
|
[key]: isMatch
|
1720
|
-
};
|
1748
|
+
});
|
1721
1749
|
}, {});
|
1722
1750
|
}
|
1723
1751
|
function selectBreakpointValue(value, matches) {
|
@@ -1770,50 +1798,77 @@ function useStyle(styles) {
|
|
1770
1798
|
const isStylesObject = isPlainObject2(property) && "value" in property;
|
1771
1799
|
const value = isStylesObject ? property.value : property;
|
1772
1800
|
const resolvedValue = selectBreakpointValue(value, context2.breakpointMatches);
|
1773
|
-
const transformer = isUndefined3(property
|
1801
|
+
const transformer = isUndefined3(property == null ? void 0 : property.transformer) ? (val) => resolveTailwindThemeValue(key, val) : (val) => resolveTailwindThemeValue(key, property.transformer(val));
|
1774
1802
|
const cssPropertyValue = transformer(resolvedValue);
|
1775
1803
|
if (isUndefined3(cssPropertyValue)) {
|
1776
1804
|
return acc;
|
1777
1805
|
}
|
1778
|
-
return {
|
1779
|
-
...acc,
|
1806
|
+
return __spreadProps(__spreadValues({}, acc), {
|
1780
1807
|
[key]: cssPropertyValue
|
1781
|
-
};
|
1808
|
+
});
|
1782
1809
|
}, {});
|
1783
1810
|
}
|
1784
1811
|
|
1785
1812
|
// src/components/Tailwindify/Tailwindify.tsx
|
1786
1813
|
function Tailwindify(Component) {
|
1787
|
-
return ({
|
1788
|
-
|
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
|
-
|
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
|
+
]);
|
1817
1872
|
const tailwindifyStyle = useStyle({
|
1818
1873
|
padding,
|
1819
1874
|
paddingTop: isUndefined4(paddingY) ? paddingTop : paddingY,
|
@@ -1833,14 +1888,10 @@ function Tailwindify(Component) {
|
|
1833
1888
|
minWidth,
|
1834
1889
|
minHeight
|
1835
1890
|
});
|
1836
|
-
const finalStyle = {
|
1837
|
-
|
1838
|
-
...style
|
1839
|
-
};
|
1840
|
-
const componentProps = {
|
1841
|
-
...otherProps,
|
1891
|
+
const finalStyle = __spreadValues(__spreadValues({}, tailwindifyStyle), style);
|
1892
|
+
const componentProps = __spreadProps(__spreadValues({}, otherProps), {
|
1842
1893
|
style: finalStyle
|
1843
|
-
};
|
1894
|
+
});
|
1844
1895
|
const childrenWithProps = React3.Children.map(children, (child, index) => {
|
1845
1896
|
if (!React3.isValidElement(child)) {
|
1846
1897
|
return child;
|
@@ -1862,14 +1913,13 @@ function Tailwindify(Component) {
|
|
1862
1913
|
return child;
|
1863
1914
|
}
|
1864
1915
|
const childStyle = get2(child, ["props", "style"], {});
|
1865
|
-
const newProps = {
|
1916
|
+
const newProps = __spreadProps(__spreadValues({}, childProps), { style: __spreadValues(__spreadValues({}, childStyle), additionalStyle) });
|
1866
1917
|
return React3.cloneElement(child, newProps);
|
1867
1918
|
});
|
1868
|
-
return /* @__PURE__ */ React3.createElement(Component, {
|
1919
|
+
return /* @__PURE__ */ React3.createElement(Component, __spreadValues({
|
1869
1920
|
className,
|
1870
|
-
children: childrenWithProps
|
1871
|
-
|
1872
|
-
});
|
1921
|
+
children: childrenWithProps
|
1922
|
+
}, componentProps));
|
1873
1923
|
};
|
1874
1924
|
}
|
1875
1925
|
|
@@ -1903,7 +1953,7 @@ var Flexbox = Tailwindify(
|
|
1903
1953
|
});
|
1904
1954
|
const HtmlElement = htmlTag;
|
1905
1955
|
return /* @__PURE__ */ React4.createElement(HtmlElement, {
|
1906
|
-
style: {
|
1956
|
+
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
1907
1957
|
className
|
1908
1958
|
}, children);
|
1909
1959
|
}
|
@@ -2033,11 +2083,12 @@ function useTooltipTriggerState(props = {}) {
|
|
2033
2083
|
}
|
2034
2084
|
|
2035
2085
|
// src/components/Tooltip/Tooltip.tsx
|
2036
|
-
var Tooltip = (
|
2086
|
+
var Tooltip = (_a) => {
|
2087
|
+
var _b = _a, { inline = true, delay = 200 } = _b, props = __objRest(_b, ["inline", "delay"]);
|
2037
2088
|
const { placement: _placement = "top", content, disabled: isDisabled, shouldFlip = true } = props;
|
2038
2089
|
const triggerRef = React5.useRef(null);
|
2039
2090
|
const overlayRef = React5.useRef(null);
|
2040
|
-
const state = useTooltipTriggerState({ isDisabled, delay,
|
2091
|
+
const state = useTooltipTriggerState(__spreadValues({ isDisabled, delay }, props));
|
2041
2092
|
const { triggerProps, tooltipProps } = useTooltipTrigger(props, state, triggerRef);
|
2042
2093
|
const { overlayProps, arrowProps, placement } = useOverlayPosition({
|
2043
2094
|
placement: _placement.replace("-", " "),
|
@@ -2048,56 +2099,60 @@ var Tooltip = ({ inline = true, delay = 200, ...props }) => {
|
|
2048
2099
|
offset: ARROW_OFFSET
|
2049
2100
|
});
|
2050
2101
|
const handleClick = (e) => {
|
2051
|
-
|
2052
|
-
|
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);
|
2053
2105
|
};
|
2054
2106
|
const handleMouseDown = (e) => {
|
2055
|
-
|
2056
|
-
|
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);
|
2057
2110
|
};
|
2058
2111
|
const handleMouseUp = (e) => {
|
2059
|
-
|
2060
|
-
|
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);
|
2061
2115
|
};
|
2062
2116
|
const handlePointerDown = (e) => {
|
2063
|
-
|
2064
|
-
|
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);
|
2065
2120
|
};
|
2066
2121
|
const handlePointerUp = (e) => {
|
2067
|
-
|
2068
|
-
|
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);
|
2069
2125
|
};
|
2070
|
-
return /* @__PURE__ */ React5.createElement("div", {
|
2071
|
-
className: tw(`${inline ? "inline-block" : "block"}`)
|
2072
|
-
|
2126
|
+
return /* @__PURE__ */ React5.createElement("div", __spreadProps(__spreadValues({
|
2127
|
+
className: tw(`${inline ? "inline-block" : "block"}`)
|
2128
|
+
}, triggerProps), {
|
2073
2129
|
onClick: handleClick,
|
2074
2130
|
onMouseDown: handleMouseDown,
|
2075
2131
|
onMouseUp: handleMouseUp,
|
2076
2132
|
onPointerDown: handlePointerDown,
|
2077
2133
|
onPointerUp: handlePointerUp,
|
2078
2134
|
ref: triggerRef
|
2079
|
-
}, props.children, state.isOpen && /* @__PURE__ */ React5.createElement(TooltipWrapper, {
|
2135
|
+
}), props.children, state.isOpen && /* @__PURE__ */ React5.createElement(TooltipWrapper, __spreadValues({
|
2080
2136
|
ref: overlayRef,
|
2081
2137
|
state,
|
2082
2138
|
placement,
|
2083
|
-
arrowProps
|
2084
|
-
|
2085
|
-
}, content));
|
2139
|
+
arrowProps
|
2140
|
+
}, mergeProps(tooltipProps, overlayProps)), content));
|
2086
2141
|
};
|
2087
2142
|
var TooltipWrapper = React5.forwardRef(
|
2088
|
-
(
|
2143
|
+
(_a, forwardedRef) => {
|
2144
|
+
var _b = _a, { state, placement, arrowProps } = _b, props = __objRest(_b, ["state", "placement", "arrowProps"]);
|
2145
|
+
var _a2;
|
2089
2146
|
const ref = React5.useRef(null);
|
2090
2147
|
React5.useImperativeHandle(forwardedRef, () => ref.current);
|
2091
2148
|
const { tooltipProps } = useTooltip(props, state);
|
2092
|
-
const arrowStyle = getArrowStyle(ref.current, placement, arrowProps.style
|
2093
|
-
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({
|
2094
2151
|
ref,
|
2095
|
-
className: tw("p-3 rounded-sm typography-caption-default max-w-[320px] bg-grey-90 text-white")
|
2096
|
-
|
2097
|
-
}, props.children, /* @__PURE__ */ React5.createElement(Arrow, {
|
2098
|
-
...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), {
|
2099
2154
|
style: arrowStyle
|
2100
|
-
})));
|
2155
|
+
}))));
|
2101
2156
|
}
|
2102
2157
|
);
|
2103
2158
|
var isNotNumberProperty = (p) => typeof p === "string";
|
@@ -2117,25 +2172,24 @@ var getArrowStyle = (element, position, { left, top }) => {
|
|
2117
2172
|
};
|
2118
2173
|
switch (position) {
|
2119
2174
|
case "top": {
|
2120
|
-
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 };
|
2121
2176
|
}
|
2122
2177
|
case "bottom": {
|
2123
|
-
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 };
|
2124
2179
|
}
|
2125
2180
|
case "left": {
|
2126
|
-
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)) };
|
2127
2182
|
}
|
2128
2183
|
case "right": {
|
2129
|
-
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)) };
|
2130
2185
|
}
|
2131
2186
|
}
|
2132
2187
|
return { left, top };
|
2133
2188
|
};
|
2134
2189
|
var Arrow = (props) => {
|
2135
|
-
return /* @__PURE__ */ React5.createElement("div", {
|
2136
|
-
className: tw("absolute w-3 h-3 bg-grey-90 rotate-45")
|
2137
|
-
|
2138
|
-
});
|
2190
|
+
return /* @__PURE__ */ React5.createElement("div", __spreadValues({
|
2191
|
+
className: tw("absolute w-3 h-3 bg-grey-90 rotate-45")
|
2192
|
+
}, props));
|
2139
2193
|
};
|
2140
2194
|
|
2141
2195
|
// src/components/Button/Button.tsx
|
@@ -2171,21 +2225,34 @@ var LoadingSpinner = ({
|
|
2171
2225
|
};
|
2172
2226
|
var asButton = (Component, isDropdownButton) => {
|
2173
2227
|
return React6.forwardRef(
|
2174
|
-
({
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
2181
|
-
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
|
2188
|
-
|
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
|
+
]);
|
2189
2256
|
const hasChildren = React6.Children.count(children) > 0;
|
2190
2257
|
const isIconOnlyButton = !hasChildren && !!icon;
|
2191
2258
|
const isGhost = !isIconOnlyButton && (kind === "ghost" || kind === "secondary-ghost");
|
@@ -2231,9 +2298,9 @@ var asButton = (Component, isDropdownButton) => {
|
|
2231
2298
|
return children;
|
2232
2299
|
}
|
2233
2300
|
};
|
2234
|
-
const buttonComponent = /* @__PURE__ */ React6.createElement(Component, {
|
2235
|
-
ref
|
2236
|
-
|
2301
|
+
const buttonComponent = /* @__PURE__ */ React6.createElement(Component, __spreadProps(__spreadValues({
|
2302
|
+
ref
|
2303
|
+
}, props), {
|
2237
2304
|
className: classNames(
|
2238
2305
|
UNSAFE_className,
|
2239
2306
|
!isIconOnlyButton && COLOR_CLASSNAMES[kind],
|
@@ -2249,9 +2316,9 @@ var asButton = (Component, isDropdownButton) => {
|
|
2249
2316
|
"cursor-not-allowed": !!disabled || !!loading2
|
2250
2317
|
})
|
2251
2318
|
),
|
2252
|
-
"aria-label": isIconOnlyButton ? ariaLabel
|
2319
|
+
"aria-label": isIconOnlyButton ? ariaLabel != null ? ariaLabel : tooltip : ariaLabel,
|
2253
2320
|
disabled: disabled || loading2
|
2254
|
-
}, 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", {
|
2255
2322
|
className: tw("absolute left-1/2 top-0 bottom-0 flex"),
|
2256
2323
|
style: { transform: "translate(-50%)" }
|
2257
2324
|
}, /* @__PURE__ */ React6.createElement(LoadingSpinner, {
|
@@ -2269,59 +2336,59 @@ var asButton = (Component, isDropdownButton) => {
|
|
2269
2336
|
};
|
2270
2337
|
var Button = asButton("button");
|
2271
2338
|
Button.displayName = "Button";
|
2272
|
-
var PrimaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2273
|
-
ref
|
2274
|
-
|
2339
|
+
var PrimaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2340
|
+
ref
|
2341
|
+
}, props), {
|
2275
2342
|
kind: "primary"
|
2276
|
-
}));
|
2343
|
+
})));
|
2277
2344
|
PrimaryButton.displayName = "PrimaryButton";
|
2278
|
-
var SecondaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2279
|
-
ref
|
2280
|
-
|
2345
|
+
var SecondaryButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2346
|
+
ref
|
2347
|
+
}, props), {
|
2281
2348
|
kind: "secondary"
|
2282
|
-
}));
|
2349
|
+
})));
|
2283
2350
|
SecondaryButton.displayName = "SecondaryButton";
|
2284
|
-
var GhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2285
|
-
ref
|
2286
|
-
|
2351
|
+
var GhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2352
|
+
ref
|
2353
|
+
}, props), {
|
2287
2354
|
kind: "ghost"
|
2288
|
-
}));
|
2355
|
+
})));
|
2289
2356
|
GhostButton.displayName = "GhostButton";
|
2290
|
-
var SecondaryGhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2291
|
-
ref
|
2292
|
-
|
2357
|
+
var SecondaryGhostButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2358
|
+
ref
|
2359
|
+
}, props), {
|
2293
2360
|
kind: "secondary-ghost"
|
2294
|
-
}));
|
2361
|
+
})));
|
2295
2362
|
SecondaryGhostButton.displayName = "SecondaryGhostButton";
|
2296
|
-
var IconButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, {
|
2297
|
-
ref
|
2298
|
-
|
2363
|
+
var IconButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(Button, __spreadProps(__spreadValues({
|
2364
|
+
ref
|
2365
|
+
}, props), {
|
2299
2366
|
kind: "ghost",
|
2300
2367
|
loading: false,
|
2301
2368
|
fullWidth: false
|
2302
|
-
}));
|
2369
|
+
})));
|
2303
2370
|
IconButton.displayName = "IconButton";
|
2304
2371
|
var ExternalLinkButton = asButton("a");
|
2305
|
-
var IconExternalLinkButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(ExternalLinkButton, {
|
2306
|
-
ref
|
2307
|
-
|
2372
|
+
var IconExternalLinkButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(ExternalLinkButton, __spreadProps(__spreadValues({
|
2373
|
+
ref
|
2374
|
+
}, props), {
|
2308
2375
|
kind: "ghost",
|
2309
2376
|
loading: false,
|
2310
2377
|
fullWidth: false
|
2311
|
-
}));
|
2378
|
+
})));
|
2312
2379
|
IconExternalLinkButton.displayName = "IconExternalLink";
|
2313
2380
|
var DropdownButton = asButton("button", true);
|
2314
|
-
var PrimaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, {
|
2315
|
-
ref
|
2316
|
-
|
2381
|
+
var PrimaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, __spreadProps(__spreadValues({
|
2382
|
+
ref
|
2383
|
+
}, props), {
|
2317
2384
|
kind: "primary"
|
2318
|
-
}));
|
2385
|
+
})));
|
2319
2386
|
PrimaryDropdownButton.displayName = "PrimaryDropdownButton";
|
2320
|
-
var SecondaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, {
|
2321
|
-
ref
|
2322
|
-
|
2387
|
+
var SecondaryDropdownButton = React6.forwardRef((props, ref) => /* @__PURE__ */ React6.createElement(DropdownButton, __spreadProps(__spreadValues({
|
2388
|
+
ref
|
2389
|
+
}, props), {
|
2323
2390
|
kind: "secondary"
|
2324
|
-
}));
|
2391
|
+
})));
|
2325
2392
|
SecondaryDropdownButton.displayName = "SecondaryDropdownButton";
|
2326
2393
|
|
2327
2394
|
// src/common/Typography/Typography.tsx
|
@@ -2329,24 +2396,32 @@ var import_resolveTheme = __toESM(require_resolveTheme());
|
|
2329
2396
|
import React7 from "react";
|
2330
2397
|
import isUndefined5 from "lodash/isUndefined";
|
2331
2398
|
var typographies = import_resolveTheme.theme.typography.sizes.reduce(
|
2332
|
-
(acc, { name, className }) => ({
|
2399
|
+
(acc, { name, className }) => __spreadProps(__spreadValues({}, acc), { [name]: className }),
|
2333
2400
|
{}
|
2334
2401
|
);
|
2335
|
-
var Typography = ({
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
|
2340
|
-
|
2341
|
-
|
2342
|
-
|
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
|
+
]);
|
2343
2418
|
const HtmlElement = htmlTag;
|
2344
2419
|
const resolvedColorName = isUndefined5(color) || color === "current" ? "grey-80" : color;
|
2345
2420
|
const style = useStyle({ fontWeight });
|
2346
|
-
return /* @__PURE__ */ React7.createElement(HtmlElement, {
|
2421
|
+
return /* @__PURE__ */ React7.createElement(HtmlElement, __spreadValues({
|
2347
2422
|
className: classNames(typographies[variant], `text-${resolvedColorName}`, className),
|
2348
2423
|
style
|
2349
|
-
}, children);
|
2424
|
+
}, rest), children);
|
2350
2425
|
};
|
2351
2426
|
|
2352
2427
|
// src/common/Alert/Alert.tsx
|
@@ -2373,116 +2448,137 @@ var alertTypes = {
|
|
2373
2448
|
color: "success-40"
|
2374
2449
|
}
|
2375
2450
|
};
|
2376
|
-
var Alert = ({
|
2377
|
-
|
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
|
-
}, children);
|
2413
|
-
|
2414
|
-
|
2415
|
-
|
2416
|
-
|
2417
|
-
|
2418
|
-
|
2419
|
-
|
2420
|
-
})
|
2421
|
-
|
2422
|
-
|
2423
|
-
},
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
})
|
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
|
+
};
|
2429
2520
|
|
2430
2521
|
// src/common/Checkbox/Checkbox.tsx
|
2431
2522
|
import React9 from "react";
|
2432
2523
|
var import_tick = __toESM(require_tick());
|
2433
2524
|
var import_minus = __toESM(require_minus());
|
2434
2525
|
var Checkbox = React9.forwardRef(
|
2435
|
-
(
|
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
|
-
|
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
|
+
}
|
2470
2564
|
);
|
2471
2565
|
|
2472
2566
|
// src/common/Chip/Chip.tsx
|
2473
2567
|
import React10 from "react";
|
2474
2568
|
var Container = React10.forwardRef(
|
2475
|
-
(
|
2476
|
-
|
2477
|
-
|
2478
|
-
|
2479
|
-
|
2480
|
-
"
|
2481
|
-
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
2485
|
-
|
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
|
+
}
|
2486
2582
|
);
|
2487
2583
|
var Chip = {
|
2488
2584
|
Container
|
@@ -2512,111 +2608,146 @@ import React12 from "react";
|
|
2512
2608
|
|
2513
2609
|
// src/components/Typography/Typography.tsx
|
2514
2610
|
import React11 from "react";
|
2515
|
-
var Typography2 = (props) => /* @__PURE__ */ React11.createElement(Typography, {
|
2516
|
-
|
2517
|
-
});
|
2518
|
-
|
2519
|
-
|
2520
|
-
|
2521
|
-
|
2522
|
-
}
|
2523
|
-
Typography2.Subheading = (
|
2524
|
-
|
2525
|
-
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
})
|
2533
|
-
|
2534
|
-
|
2535
|
-
|
2536
|
-
|
2537
|
-
|
2538
|
-
|
2539
|
-
|
2540
|
-
|
2541
|
-
|
2542
|
-
});
|
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
|
+
};
|
2543
2647
|
Typography2.Paragraph = Typography2.Text;
|
2544
2648
|
Typography2.P = Typography2.Text;
|
2545
|
-
Typography2.SmallText = (
|
2546
|
-
|
2547
|
-
|
2548
|
-
|
2549
|
-
|
2550
|
-
|
2551
|
-
|
2552
|
-
|
2553
|
-
|
2554
|
-
})
|
2555
|
-
|
2556
|
-
|
2557
|
-
|
2558
|
-
|
2559
|
-
|
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
|
+
};
|
2560
2670
|
|
2561
2671
|
// src/common/DropdownMenu/DropdownMenu.tsx
|
2562
2672
|
var import_tick2 = __toESM(require_tick());
|
2563
2673
|
var DropdownMenu = React12.forwardRef(
|
2564
|
-
(
|
2565
|
-
|
2566
|
-
|
2567
|
-
|
2568
|
-
|
2569
|
-
|
2570
|
-
|
2571
|
-
|
2572
|
-
|
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
|
+
}
|
2573
2693
|
);
|
2694
|
+
DropdownMenu.List = List;
|
2574
2695
|
var Group = React12.forwardRef(
|
2575
|
-
(
|
2576
|
-
|
2577
|
-
|
2578
|
-
|
2579
|
-
|
2580
|
-
className
|
2581
|
-
|
2582
|
-
|
2583
|
-
|
2584
|
-
|
2585
|
-
|
2586
|
-
|
2587
|
-
|
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
|
+
}
|
2588
2710
|
);
|
2589
2711
|
DropdownMenu.Group = Group;
|
2590
2712
|
var Item = React12.forwardRef(
|
2591
|
-
(
|
2592
|
-
|
2593
|
-
|
2594
|
-
|
2595
|
-
"
|
2596
|
-
|
2597
|
-
|
2598
|
-
|
2599
|
-
|
2600
|
-
|
2601
|
-
icon
|
2602
|
-
|
2603
|
-
|
2604
|
-
|
2605
|
-
|
2606
|
-
|
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
|
+
}
|
2607
2731
|
);
|
2608
2732
|
DropdownMenu.Item = Item;
|
2609
2733
|
var Description = ({ disabled, children }) => /* @__PURE__ */ React12.createElement(Typography2.Caption, {
|
2610
2734
|
color: disabled ? "grey-20" : "grey-40"
|
2611
2735
|
}, children);
|
2612
2736
|
DropdownMenu.Description = Description;
|
2613
|
-
var Separator = (
|
2614
|
-
|
2615
|
-
|
2737
|
+
var Separator = (_a) => {
|
2738
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
2739
|
+
return /* @__PURE__ */ React12.createElement("li", __spreadProps(__spreadValues({}, props), {
|
2616
2740
|
className: classNames(className, tw("m-3 block bg-grey-5 h-[1px]"))
|
2617
|
-
});
|
2741
|
+
}));
|
2618
2742
|
};
|
2619
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;
|
2620
2751
|
|
2621
2752
|
// src/common/InputGroup/InputGroup.tsx
|
2622
2753
|
import React14 from "react";
|
@@ -2676,7 +2807,7 @@ var Grid = Tailwindify(
|
|
2676
2807
|
});
|
2677
2808
|
const HtmlElement = htmlTag;
|
2678
2809
|
return /* @__PURE__ */ React13.createElement(HtmlElement, {
|
2679
|
-
style: {
|
2810
|
+
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
2680
2811
|
className
|
2681
2812
|
}, children);
|
2682
2813
|
}
|
@@ -2689,104 +2820,136 @@ var gridColumnStyles = {
|
|
2689
2820
|
"3": "grid-cols-3",
|
2690
2821
|
"auto": "auto-cols-fr"
|
2691
2822
|
};
|
2692
|
-
var InputGroup = (
|
2693
|
-
|
2694
|
-
|
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), {
|
2695
2826
|
display: "inline-grid",
|
2696
2827
|
colGap: "l4",
|
2697
2828
|
rowGap: "3",
|
2698
2829
|
cols: cols !== "auto" ? cols : void 0,
|
2699
2830
|
className: gridColumnStyles[cols]
|
2700
|
-
}, children);
|
2831
|
+
}), children);
|
2701
2832
|
};
|
2702
2833
|
|
2703
2834
|
// src/common/Modal/Modal.tsx
|
2704
2835
|
import React15 from "react";
|
2705
|
-
var Modal = (
|
2706
|
-
|
2707
|
-
|
2708
|
-
tw("fixed inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
2709
|
-
className
|
2710
|
-
)
|
2711
|
-
}, children) : null;
|
2712
|
-
Modal.BackDrop = ({ className, ...rest }) => /* @__PURE__ */ React15.createElement("div", {
|
2713
|
-
...rest,
|
2714
|
-
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-navyBlue-100 opacity-70"), className)
|
2715
|
-
});
|
2716
|
-
Modal.Dialog = React15.forwardRef(
|
2717
|
-
({ children, className, size = "sm", ...rest }, ref) => /* @__PURE__ */ React15.createElement("div", {
|
2718
|
-
ref,
|
2719
|
-
...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), {
|
2720
2839
|
className: classNames(
|
2721
|
-
tw("
|
2722
|
-
{
|
2723
|
-
"max-w-[600px]": size === "sm",
|
2724
|
-
"max-w-[940px]": size === "md",
|
2725
|
-
"min-h-full": size === "full"
|
2726
|
-
},
|
2840
|
+
tw("inset-0 overflow-y-auto z-modal flex justify-center items-center fixed py-7"),
|
2727
2841
|
className
|
2728
2842
|
)
|
2729
|
-
}, 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
|
+
}
|
2730
2869
|
);
|
2731
|
-
Modal.Header = (
|
2732
|
-
|
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
|
-
},
|
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
|
+
};
|
2764
2917
|
|
2765
2918
|
// src/common/PopoverDialog/PopoverDialog.tsx
|
2766
2919
|
import React16 from "react";
|
2767
|
-
var Header = (
|
2768
|
-
|
2769
|
-
|
2770
|
-
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
2775
|
-
},
|
2776
|
-
|
2777
|
-
|
2778
|
-
|
2779
|
-
|
2780
|
-
|
2781
|
-
}, children);
|
2782
|
-
|
2783
|
-
|
2784
|
-
|
2785
|
-
|
2786
|
-
|
2787
|
-
|
2788
|
-
|
2789
|
-
}, 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
|
+
};
|
2790
2953
|
var PopoverDialog = {
|
2791
2954
|
Header,
|
2792
2955
|
Title,
|
@@ -2797,16 +2960,18 @@ var PopoverDialog = {
|
|
2797
2960
|
|
2798
2961
|
// src/common/Popover/Popover.tsx
|
2799
2962
|
import React17 from "react";
|
2800
|
-
var PopoverPanel = React17.forwardRef((
|
2801
|
-
|
2802
|
-
|
2803
|
-
|
2804
|
-
|
2805
|
-
|
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
|
+
)
|
2806
2972
|
)
|
2807
|
-
),
|
2808
|
-
|
2809
|
-
}, children));
|
2973
|
+
}, props), children);
|
2974
|
+
});
|
2810
2975
|
var Popover = {
|
2811
2976
|
Panel: PopoverPanel
|
2812
2977
|
};
|
@@ -2814,39 +2979,42 @@ var Popover = {
|
|
2814
2979
|
// src/common/RadioButton/RadioButton.tsx
|
2815
2980
|
import React18 from "react";
|
2816
2981
|
var RadioButton = React18.forwardRef(
|
2817
|
-
(
|
2818
|
-
|
2819
|
-
|
2820
|
-
|
2821
|
-
"
|
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
|
2822
3015
|
})
|
2823
|
-
)
|
2824
|
-
}
|
2825
|
-
id,
|
2826
|
-
ref,
|
2827
|
-
type: "radio",
|
2828
|
-
name,
|
2829
|
-
...props,
|
2830
|
-
checked,
|
2831
|
-
className: classNames(
|
2832
|
-
tw("appearance-none rounded-full border cursor-pointer"),
|
2833
|
-
{
|
2834
|
-
"border-grey-20 hover:border-grey-50 focus:border-info-70": !disabled && !checked,
|
2835
|
-
"border-navyBlue-100": !disabled && checked,
|
2836
|
-
"border-grey-5": disabled
|
2837
|
-
},
|
2838
|
-
props.className
|
2839
|
-
),
|
2840
|
-
style: { width: 16, height: 16, ...props.style },
|
2841
|
-
readOnly,
|
2842
|
-
disabled
|
2843
|
-
}), /* @__PURE__ */ React18.createElement("span", {
|
2844
|
-
style: { backgroundColor: "currentcolor" },
|
2845
|
-
className: tw("absolute w-3 h-3 rounded-full bg-navyBlue-100 pointer-events-none", {
|
2846
|
-
"opacity-0": !checked,
|
2847
|
-
"opacity-40": disabled && checked
|
2848
|
-
})
|
2849
|
-
}))
|
3016
|
+
}));
|
3017
|
+
}
|
2850
3018
|
);
|
2851
3019
|
|
2852
3020
|
// src/common/Select/Select.tsx
|
@@ -2856,138 +3024,163 @@ var import_chevronUp = __toESM(require_chevronUp());
|
|
2856
3024
|
var import_search = __toESM(require_search());
|
2857
3025
|
var import_tick3 = __toESM(require_tick());
|
2858
3026
|
function getOptionLabelBuiltin(option) {
|
3027
|
+
var _a;
|
2859
3028
|
if (option === null) {
|
2860
3029
|
return "";
|
2861
3030
|
}
|
2862
3031
|
if (typeof option === "string") {
|
2863
3032
|
return option;
|
2864
3033
|
}
|
2865
|
-
return option.label
|
3034
|
+
return (_a = option.label) != null ? _a : "";
|
2866
3035
|
}
|
2867
3036
|
function isOptionDisabledBuiltin(option) {
|
2868
3037
|
return !!option.disabled;
|
2869
3038
|
}
|
2870
3039
|
var getValues = (children) => {
|
2871
|
-
|
2872
|
-
|
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 : [];
|
2873
3046
|
};
|
2874
3047
|
var InputContainer = React19.forwardRef(
|
2875
|
-
(
|
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({
|
2876
3072
|
ref,
|
3073
|
+
type: "text",
|
2877
3074
|
className: classNames(
|
2878
3075
|
className,
|
2879
|
-
"
|
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",
|
2880
3077
|
{
|
2881
|
-
"
|
2882
|
-
"
|
2883
|
-
"
|
2884
|
-
"border-error-50": variant === "error",
|
2885
|
-
"hover:border-grey-50": variant !== "error" && variant !== "disabled" && variant !== "focused",
|
2886
|
-
"border-info-70": variant === "focused",
|
2887
|
-
"bg-white": variant !== "disabled",
|
2888
|
-
"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
|
2889
3081
|
}
|
2890
|
-
)
|
2891
|
-
|
2892
|
-
|
2893
|
-
);
|
2894
|
-
var Input = React19.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ React19.createElement("input", {
|
2895
|
-
ref,
|
2896
|
-
type: "text",
|
2897
|
-
className: classNames(
|
2898
|
-
className,
|
2899
|
-
"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",
|
2900
|
-
{
|
2901
|
-
"text-grey-70": !props.disabled,
|
2902
|
-
"text-grey-30": props.disabled,
|
2903
|
-
"cursor-default": props.readOnly
|
2904
|
-
}
|
2905
|
-
),
|
2906
|
-
...props
|
2907
|
-
}));
|
3082
|
+
)
|
3083
|
+
}, props));
|
3084
|
+
});
|
2908
3085
|
var Menu = React19.forwardRef(
|
2909
|
-
(
|
2910
|
-
|
2911
|
-
|
2912
|
-
|
2913
|
-
|
2914
|
-
|
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
|
+
}
|
2915
3094
|
);
|
2916
3095
|
var NoResults = React19.forwardRef(
|
2917
|
-
(
|
2918
|
-
|
2919
|
-
|
2920
|
-
|
2921
|
-
|
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
|
+
}
|
2922
3104
|
);
|
2923
|
-
var
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
2927
|
-
|
2928
|
-
|
2929
|
-
className: tw("border-b-[1px] border-grey-5 mx-3 my-4"),
|
2930
|
-
...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);
|
2931
3111
|
});
|
2932
|
-
var
|
2933
|
-
|
2934
|
-
|
2935
|
-
|
2936
|
-
|
2937
|
-
|
2938
|
-
"text-grey-20": props.disabled
|
2939
|
-
}
|
2940
|
-
),
|
2941
|
-
...props
|
2942
|
-
}, children));
|
2943
|
-
var Item2 = React19.forwardRef(
|
2944
|
-
({ 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({
|
2945
3118
|
ref,
|
2946
|
-
className: classNames(
|
2947
|
-
|
2948
|
-
"
|
2949
|
-
|
2950
|
-
|
2951
|
-
|
2952
|
-
|
2953
|
-
},
|
2954
|
-
|
2955
|
-
|
2956
|
-
|
2957
|
-
|
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
|
+
}
|
2958
3145
|
);
|
2959
3146
|
var ActionItem = React19.forwardRef(
|
2960
|
-
(
|
2961
|
-
|
2962
|
-
|
2963
|
-
|
2964
|
-
|
2965
|
-
|
2966
|
-
"
|
2967
|
-
|
2968
|
-
|
2969
|
-
|
2970
|
-
|
2971
|
-
|
2972
|
-
|
2973
|
-
icon
|
2974
|
-
|
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
|
+
}
|
2975
3164
|
);
|
2976
|
-
var Toggle = React19.forwardRef((
|
2977
|
-
|
2978
|
-
|
2979
|
-
|
2980
|
-
|
2981
|
-
|
2982
|
-
|
2983
|
-
|
2984
|
-
|
2985
|
-
})
|
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
|
+
});
|
2986
3179
|
var Select = {
|
2987
3180
|
InputContainer,
|
2988
3181
|
Input,
|
2989
3182
|
Menu,
|
2990
|
-
EmptyStateContainer,
|
3183
|
+
EmptyStateContainer: EmptyStateContainer2,
|
2991
3184
|
NoResults,
|
2992
3185
|
Divider,
|
2993
3186
|
Group: Group2,
|
@@ -3002,26 +3195,30 @@ var import_chevronUp2 = __toESM(require_chevronUp());
|
|
3002
3195
|
var import_chevronDown3 = __toESM(require_chevronDown());
|
3003
3196
|
var HeadContext = React20.createContext(null);
|
3004
3197
|
var tableClassNames = tw("w-full relative typography-body-default border-spacing-0");
|
3005
|
-
var Table = (
|
3006
|
-
|
3007
|
-
|
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), {
|
3008
3201
|
className: classNames(tableClassNames, className),
|
3009
3202
|
"aria-label": ariaLabel
|
3010
|
-
}, children);
|
3011
|
-
};
|
3012
|
-
var TableHead = (
|
3013
|
-
|
3014
|
-
}, /* @__PURE__ */ React20.createElement("tr", null, /* @__PURE__ */ React20.createElement(HeadContext.Provider, {
|
3015
|
-
|
3016
|
-
}, children)));
|
3017
|
-
|
3018
|
-
|
3019
|
-
}, 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
|
+
};
|
3020
3215
|
var rowClassNames = tw("children:border-grey-10 children:last:border-b-0 hover:bg-grey-0");
|
3021
|
-
var TableRow = (
|
3022
|
-
|
3023
|
-
|
3024
|
-
|
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
|
+
};
|
3025
3222
|
var cellClassNames = tw("px-4 border-b typography-body-small-medium leading-[18px]");
|
3026
3223
|
var bodyCellClassNames = tw("text-grey-70 py-3 h-[50px]");
|
3027
3224
|
var getAlignClassNames = (align) => tw({ "text-right": align === "right", "text-center": align === "center" });
|
@@ -3029,56 +3226,56 @@ var getHeadCellClassNames = (sticky = true) => {
|
|
3029
3226
|
const common = tw("py-[14px] text-left bg-white border-grey-40 text-grey-50 font-normal");
|
3030
3227
|
return sticky ? classNames(common, tw("sticky top-0")) : common;
|
3031
3228
|
};
|
3032
|
-
var TableCell = (
|
3229
|
+
var TableCell = (_a) => {
|
3230
|
+
var _b = _a, { children, className, align = "left" } = _b, rest = __objRest(_b, ["children", "className", "align"]);
|
3033
3231
|
const headContext = React20.useContext(HeadContext);
|
3034
|
-
return headContext ? /* @__PURE__ */ React20.createElement("th", {
|
3035
|
-
...rest,
|
3232
|
+
return headContext ? /* @__PURE__ */ React20.createElement("th", __spreadProps(__spreadValues({}, rest), {
|
3036
3233
|
className: classNames(
|
3037
3234
|
cellClassNames,
|
3038
3235
|
getHeadCellClassNames(headContext.sticky),
|
3039
3236
|
getAlignClassNames(align),
|
3040
3237
|
className
|
3041
3238
|
)
|
3042
|
-
}, children) : /* @__PURE__ */ React20.createElement("td", {
|
3043
|
-
...rest,
|
3239
|
+
}), children) : /* @__PURE__ */ React20.createElement("td", __spreadProps(__spreadValues({}, rest), {
|
3044
3240
|
className: classNames(cellClassNames, bodyCellClassNames, getAlignClassNames(align), className)
|
3045
|
-
}, children);
|
3241
|
+
}), children);
|
3046
3242
|
};
|
3047
|
-
var TableSelectCell = (
|
3243
|
+
var TableSelectCell = (_a) => {
|
3244
|
+
var _b = _a, { ariaLabel } = _b, props = __objRest(_b, ["ariaLabel"]);
|
3048
3245
|
return /* @__PURE__ */ React20.createElement(Table.Cell, {
|
3049
3246
|
className: tw("leading-[0px]")
|
3050
|
-
}, props.type === "radio" ? /* @__PURE__ */ React20.createElement(RadioButton, {
|
3051
|
-
"aria-label": ariaLabel
|
3052
|
-
|
3053
|
-
|
3054
|
-
|
3055
|
-
...props
|
3056
|
-
}));
|
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)));
|
3057
3252
|
};
|
3058
3253
|
var sortCellButtonClassNames = tw("group inline-flex items-center text-grey-50");
|
3059
3254
|
var getSortCellIconClassNames = (active) => {
|
3060
3255
|
return tw("text-[9px]", active ? "text-grey-70" : "text-grey-30");
|
3061
3256
|
};
|
3062
|
-
var TableSortCell = (
|
3063
|
-
|
3064
|
-
|
3065
|
-
|
3066
|
-
|
3067
|
-
|
3068
|
-
|
3069
|
-
|
3070
|
-
|
3071
|
-
"
|
3072
|
-
|
3073
|
-
"
|
3074
|
-
|
3075
|
-
}
|
3076
|
-
|
3077
|
-
|
3078
|
-
|
3079
|
-
|
3080
|
-
|
3081
|
-
|
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
|
+
};
|
3082
3279
|
Table.Head = React20.memo(TableHead);
|
3083
3280
|
Table.Body = React20.memo(TableBody);
|
3084
3281
|
Table.Row = React20.memo(TableRow);
|
@@ -3092,6 +3289,7 @@ export {
|
|
3092
3289
|
DIALOG_ICONS_AND_COLORS,
|
3093
3290
|
DropdownMenu,
|
3094
3291
|
InputGroup,
|
3292
|
+
List,
|
3095
3293
|
Modal,
|
3096
3294
|
Popover,
|
3097
3295
|
PopoverDialog,
|