@raystack/apsara 0.13.0 → 0.14.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/calendar/calendar.d.ts.map +1 -1
- package/dist/calendar/date-picker.d.ts +13 -0
- package/dist/calendar/date-picker.d.ts.map +1 -0
- package/dist/calendar/index.d.ts +2 -0
- package/dist/calendar/index.d.ts.map +1 -1
- package/dist/calendar/range-picker.d.ts +15 -0
- package/dist/calendar/range-picker.d.ts.map +1 -0
- package/dist/errorstate/errorstate.d.ts +2 -1
- package/dist/errorstate/errorstate.d.ts.map +1 -1
- package/dist/index.cjs +312 -43
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +36 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +311 -44
- package/dist/index.js.map +1 -1
- package/dist/popover/popover.d.ts.map +1 -1
- package/dist/sidebar/sidebar.d.ts +2 -0
- package/dist/sidebar/sidebar.d.ts.map +1 -1
- package/dist/table/FilteredChip.d.ts.map +1 -1
- package/dist/table/datatable.d.ts +4 -3
- package/dist/table/datatable.d.ts.map +1 -1
- package/dist/table/datatables.types.d.ts +11 -5
- package/dist/table/datatables.types.d.ts.map +1 -1
- package/dist/table/filterFns.d.ts +2 -1
- package/dist/table/filterFns.d.ts.map +1 -1
- package/dist/textfield/textfield.d.ts +15 -2
- package/dist/textfield/textfield.d.ts.map +1 -1
- package/package.json +3 -1
package/dist/index.css
CHANGED
|
@@ -1832,7 +1832,11 @@ html[data-theme="dark"] {
|
|
|
1832
1832
|
}
|
|
1833
1833
|
|
|
1834
1834
|
.calendar-module_cell__TTpcD:has([aria-selected="true"]) {
|
|
1835
|
-
background-color: var(--background-
|
|
1835
|
+
background-color: var(--background-highlight);
|
|
1836
|
+
|
|
1837
|
+
button {
|
|
1838
|
+
color: var(--foreground-inverted);
|
|
1839
|
+
}
|
|
1836
1840
|
}
|
|
1837
1841
|
|
|
1838
1842
|
.calendar-module_cell__TTpcD:has(.calendar-module_day_today__P35-i):not(:has([aria-selected="true"])) {
|
|
@@ -1842,6 +1846,9 @@ html[data-theme="dark"] {
|
|
|
1842
1846
|
.calendar-module_cell__TTpcD:has(.calendar-module_day_range_middle__3yKS1) {
|
|
1843
1847
|
border-radius: 0;
|
|
1844
1848
|
background-color: var(--background-base-hover);
|
|
1849
|
+
button {
|
|
1850
|
+
color: var(--foreground-base);
|
|
1851
|
+
}
|
|
1845
1852
|
}
|
|
1846
1853
|
|
|
1847
1854
|
.calendar-module_cell__TTpcD:has(.calendar-module_day_range_start__Qyhit):not(:has(.calendar-module_day_range_end__YF0ad)) {
|
|
@@ -1881,6 +1888,21 @@ html[data-theme="dark"] {
|
|
|
1881
1888
|
color: var(--foreground-inverted);
|
|
1882
1889
|
}
|
|
1883
1890
|
|
|
1891
|
+
.calendar-module_months__IN75k {
|
|
1892
|
+
display: flex;
|
|
1893
|
+
gap: var(--pd-8);
|
|
1894
|
+
}
|
|
1895
|
+
|
|
1896
|
+
.calendar-module_calendarPopover__PY4sa {
|
|
1897
|
+
padding: 0;
|
|
1898
|
+
border: none;
|
|
1899
|
+
min-width: max-content;
|
|
1900
|
+
}
|
|
1901
|
+
|
|
1902
|
+
.calendar-module_datePickerInput__aOnRQ {
|
|
1903
|
+
cursor: pointer;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1884
1906
|
.textfield-module_textfield__u4AGg {
|
|
1885
1907
|
appearance: none;
|
|
1886
1908
|
box-sizing: border-box;
|
|
@@ -1954,6 +1976,11 @@ html[data-theme="dark"] {
|
|
|
1954
1976
|
.textfield-module_textfield-leading__AE-ld {
|
|
1955
1977
|
padding-left: 32px;
|
|
1956
1978
|
}
|
|
1979
|
+
|
|
1980
|
+
.textfield-module_textfield-trailing__Hj2jX {
|
|
1981
|
+
padding-right: 32px;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1957
1984
|
.datatable-module_wrapper__Sxg2d {
|
|
1958
1985
|
width: 100%;
|
|
1959
1986
|
height: 100%;
|
|
@@ -1997,6 +2024,14 @@ html[data-theme="dark"] {
|
|
|
1997
2024
|
min-width: fit-content;
|
|
1998
2025
|
}
|
|
1999
2026
|
|
|
2027
|
+
.datatable-module_filterText__w00L8 {
|
|
2028
|
+
min-width: fit-content;
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
.datatable-module_flex1__fA-kQ {
|
|
2032
|
+
flex: 1;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2000
2035
|
.table-module_table__mqnXB {
|
|
2001
2036
|
width: 100%;
|
|
2002
2037
|
font-size: 12px;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export { Sidebar } from "./sidebar";
|
|
|
31
31
|
export { Switch } from "./switch";
|
|
32
32
|
export { Tooltip } from "./tooltip";
|
|
33
33
|
export { ToggleGroup } from "./toggle-group";
|
|
34
|
-
export { Calendar } from "./calendar";
|
|
34
|
+
export { Calendar, DatePicker, RangePicker } from "./calendar";
|
|
35
35
|
export { ApsaraAggregationFn, ApsaraAggregationOption, ApsaraColumnDef, ApsaraFilterFn, ApsaraFilterOption, DataTable, Table, useTable, } from "./table";
|
|
36
36
|
export { Tabs } from "./tabs";
|
|
37
37
|
export { Text } from "./text";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE/D,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,SAAS,EACT,KAAK,EACL,QAAQ,GACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,8 @@ import React__default, { createContext, useMemo, createElement, useContext, useC
|
|
|
3
3
|
import * as $7SXl2$reactdom from 'react-dom';
|
|
4
4
|
import $7SXl2$reactdom__default, { flushSync, createPortal } from 'react-dom';
|
|
5
5
|
|
|
6
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
7
|
+
|
|
6
8
|
function getDefaultExportFromCjs (x) {
|
|
7
9
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
8
10
|
}
|
|
@@ -2426,6 +2428,28 @@ var ArrowUpIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
|
2426
2428
|
}));
|
|
2427
2429
|
});
|
|
2428
2430
|
|
|
2431
|
+
var _excluded$I = ["color"];
|
|
2432
|
+
var CalendarIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
2433
|
+
var _ref$color = _ref.color,
|
|
2434
|
+
color = _ref$color === void 0 ? 'currentColor' : _ref$color,
|
|
2435
|
+
props = _objectWithoutPropertiesLoose$1(_ref, _excluded$I);
|
|
2436
|
+
|
|
2437
|
+
return createElement("svg", Object.assign({
|
|
2438
|
+
width: "15",
|
|
2439
|
+
height: "15",
|
|
2440
|
+
viewBox: "0 0 15 15",
|
|
2441
|
+
fill: "none",
|
|
2442
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
2443
|
+
}, props, {
|
|
2444
|
+
ref: forwardedRef
|
|
2445
|
+
}), createElement("path", {
|
|
2446
|
+
d: "M4.5 1C4.77614 1 5 1.22386 5 1.5V2H10V1.5C10 1.22386 10.2239 1 10.5 1C10.7761 1 11 1.22386 11 1.5V2H12.5C13.3284 2 14 2.67157 14 3.5V12.5C14 13.3284 13.3284 14 12.5 14H2.5C1.67157 14 1 13.3284 1 12.5V3.5C1 2.67157 1.67157 2 2.5 2H4V1.5C4 1.22386 4.22386 1 4.5 1ZM10 3V3.5C10 3.77614 10.2239 4 10.5 4C10.7761 4 11 3.77614 11 3.5V3H12.5C12.7761 3 13 3.22386 13 3.5V5H2V3.5C2 3.22386 2.22386 3 2.5 3H4V3.5C4 3.77614 4.22386 4 4.5 4C4.77614 4 5 3.77614 5 3.5V3H10ZM2 6V12.5C2 12.7761 2.22386 13 2.5 13H12.5C12.7761 13 13 12.7761 13 12.5V6H2ZM7 7.5C7 7.22386 7.22386 7 7.5 7C7.77614 7 8 7.22386 8 7.5C8 7.77614 7.77614 8 7.5 8C7.22386 8 7 7.77614 7 7.5ZM9.5 7C9.22386 7 9 7.22386 9 7.5C9 7.77614 9.22386 8 9.5 8C9.77614 8 10 7.77614 10 7.5C10 7.22386 9.77614 7 9.5 7ZM11 7.5C11 7.22386 11.2239 7 11.5 7C11.7761 7 12 7.22386 12 7.5C12 7.77614 11.7761 8 11.5 8C11.2239 8 11 7.77614 11 7.5ZM11.5 9C11.2239 9 11 9.22386 11 9.5C11 9.77614 11.2239 10 11.5 10C11.7761 10 12 9.77614 12 9.5C12 9.22386 11.7761 9 11.5 9ZM9 9.5C9 9.22386 9.22386 9 9.5 9C9.77614 9 10 9.22386 10 9.5C10 9.77614 9.77614 10 9.5 10C9.22386 10 9 9.77614 9 9.5ZM7.5 9C7.22386 9 7 9.22386 7 9.5C7 9.77614 7.22386 10 7.5 10C7.77614 10 8 9.77614 8 9.5C8 9.22386 7.77614 9 7.5 9ZM5 9.5C5 9.22386 5.22386 9 5.5 9C5.77614 9 6 9.22386 6 9.5C6 9.77614 5.77614 10 5.5 10C5.22386 10 5 9.77614 5 9.5ZM3.5 9C3.22386 9 3 9.22386 3 9.5C3 9.77614 3.22386 10 3.5 10C3.77614 10 4 9.77614 4 9.5C4 9.22386 3.77614 9 3.5 9ZM3 11.5C3 11.2239 3.22386 11 3.5 11C3.77614 11 4 11.2239 4 11.5C4 11.7761 3.77614 12 3.5 12C3.22386 12 3 11.7761 3 11.5ZM5.5 11C5.22386 11 5 11.2239 5 11.5C5 11.7761 5.22386 12 5.5 12C5.77614 12 6 11.7761 6 11.5C6 11.2239 5.77614 11 5.5 11ZM7 11.5C7 11.2239 7.22386 11 7.5 11C7.77614 11 8 11.2239 8 11.5C8 11.7761 7.77614 12 7.5 12C7.22386 12 7 11.7761 7 11.5ZM9.5 11C9.22386 11 9 11.2239 9 11.5C9 11.7761 9.22386 12 9.5 12C9.77614 12 10 11.7761 10 11.5C10 11.2239 9.77614 11 9.5 11Z",
|
|
2447
|
+
fill: color,
|
|
2448
|
+
fillRule: "evenodd",
|
|
2449
|
+
clipRule: "evenodd"
|
|
2450
|
+
}));
|
|
2451
|
+
});
|
|
2452
|
+
|
|
2429
2453
|
var _excluded$T = ["color"];
|
|
2430
2454
|
var CheckIcon = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
|
|
2431
2455
|
var _ref$color = _ref.color,
|
|
@@ -9699,8 +9723,8 @@ const getHeadline = (status = "Something gone wrong") => {
|
|
|
9699
9723
|
}
|
|
9700
9724
|
};
|
|
9701
9725
|
const errorstate = cva(styles$n.errorstate);
|
|
9702
|
-
function ErrorState({ children, className, status, icon, ...props }) {
|
|
9703
|
-
return (jsxRuntimeExports$1.jsx(Flex, { justify: "center", style: { width: "100%", height: "100%" }, children: jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "large", align: "center", justify: "center", className: errorstate({ className }), style: { textAlign: "center", maxWidth: "400px" }, ...props, children: [icon ? icon : getIcon(status), jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "medium", children: [jsxRuntimeExports$1.jsx(Headline, { size: "large", children: getHeadline(status) }), jsxRuntimeExports$1.jsx(Body, { size: "large", children: getMessage(status) })] })] }) }));
|
|
9726
|
+
function ErrorState({ children, className, status, icon, message, ...props }) {
|
|
9727
|
+
return (jsxRuntimeExports$1.jsx(Flex, { justify: "center", style: { width: "100%", height: "100%" }, children: jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "large", align: "center", justify: "center", className: errorstate({ className }), style: { textAlign: "center", maxWidth: "400px" }, ...props, children: [icon ? icon : getIcon(status), jsxRuntimeExports$1.jsxs(Flex, { direction: "column", gap: "medium", children: [jsxRuntimeExports$1.jsx(Headline, { size: "large", children: getHeadline(status) }), jsxRuntimeExports$1.jsx(Body, { size: "large", children: message ? message : getMessage(status) })] })] }) }));
|
|
9704
9728
|
}
|
|
9705
9729
|
|
|
9706
9730
|
var styles$m = {"grid":"grid-module_grid__UQeew","align-start":"grid-module_align-start__Z7pvl","align-center":"grid-module_align-center__Rwlbt","align-end":"grid-module_align-end__nuXn1","align-stretch":"grid-module_align-stretch__6SP1w","align-baseline":"grid-module_align-baseline__ajEPv","justify-start":"grid-module_justify-start__hRYMn","justify-center":"grid-module_justify-center__zQ7Ym","justify-end":"grid-module_justify-end__92x6b","justify-between":"grid-module_justify-between__vQXi3","flow-row":"grid-module_flow-row__bI9DV","flow-column":"grid-module_flow-column__lsmAV","flow-dense":"grid-module_flow-dense__rAnOn","flow-rowDense":"grid-module_flow-rowDense__vvLwD","flow-columnDense":"grid-module_flow-columnDense__HnI7j","columns-1":"grid-module_columns-1__ISyE5","columns-2":"grid-module_columns-2__nAJXX","columns-3":"grid-module_columns-3__jSanv","columns-4":"grid-module_columns-4__TPrmV","gap-xs":"grid-module_gap-xs__jJXAg","gap-sm":"grid-module_gap-sm__lSOTF","gap-md":"grid-module_gap-md__d44tx","gap-lg":"grid-module_gap-lg__QxI9L","gap-xl":"grid-module_gap-xl__0VXE9","gapX-xs":"grid-module_gapX-xs__vCzot","gapX-sm":"grid-module_gapX-sm__3p68N","gapX-md":"grid-module_gapX-md__JPO3S","gapX-lg":"grid-module_gapX-lg__qFCBX","gapX-xl":"grid-module_gapX-xl__J141F","gapY-xs":"grid-module_gapY-xs__yx6Mm","gapY-sm":"grid-module_gapY-sm__uopNl","gapY-md":"grid-module_gapY-md__4XBeo","gapY-lg":"grid-module_gapY-lg__QrF6Z","gapY-xl":"grid-module_gapY-xl__Y6SHF"};
|
|
@@ -10015,7 +10039,8 @@ const $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2 = $cb5cc270b50c6fcd$export$d7e1f
|
|
|
10015
10039
|
|
|
10016
10040
|
var styles$i = {"popover":"popover-module_popover__Jh8Hg"};
|
|
10017
10041
|
|
|
10018
|
-
const
|
|
10042
|
+
const popoverContent = cva(styles$i.popover);
|
|
10043
|
+
const PopoverContent = React__default.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => (jsxRuntimeExports$1.jsx($cb5cc270b50c6fcd$export$602eac185826482c, { children: jsxRuntimeExports$1.jsx($cb5cc270b50c6fcd$export$7c6e2c02157bb7d2, { ref: ref, align: align, sideOffset: sideOffset, className: popoverContent({ className }), ...props }) })));
|
|
10019
10044
|
PopoverContent.displayName = $cb5cc270b50c6fcd$export$7c6e2c02157bb7d2.displayName;
|
|
10020
10045
|
const Popover = Object.assign($cb5cc270b50c6fcd$export$be92b6f5f03c0fe9, {
|
|
10021
10046
|
Trigger: $cb5cc270b50c6fcd$export$41fb9f06171c75f4,
|
|
@@ -28101,7 +28126,7 @@ function DayPicker(props) {
|
|
|
28101
28126
|
return (jsxRuntimeExports.jsx(RootProvider, __assign({}, props, { children: jsxRuntimeExports.jsx(Root, { initialProps: props }) })));
|
|
28102
28127
|
}
|
|
28103
28128
|
|
|
28104
|
-
var styles$6 = {"calendarRoot":"calendar-module_calendarRoot__KnBz-","caption":"calendar-module_caption__KH06I","caption_label":"calendar-module_caption_label__C5Ys7","nav_button":"calendar-module_nav_button__8W5py","nav_button_previous":"calendar-module_nav_button_previous__lWJYm","nav_button_next":"calendar-module_nav_button_next__1MzRT","head":"calendar-module_head__EIxyS","head_cell":"calendar-module_head_cell__z8NlN","cell":"calendar-module_cell__TTpcD","day_today":"calendar-module_day_today__P35-i","day_range_middle":"calendar-module_day_range_middle__3yKS1","day_range_start":"calendar-module_day_range_start__Qyhit","day_range_end":"calendar-module_day_range_end__YF0ad","row":"calendar-module_row__cjS3G","day":"calendar-module_day__rQFGK","day_outside":"calendar-module_day_outside__WN68B"};
|
|
28129
|
+
var styles$6 = {"calendarRoot":"calendar-module_calendarRoot__KnBz-","caption":"calendar-module_caption__KH06I","caption_label":"calendar-module_caption_label__C5Ys7","nav_button":"calendar-module_nav_button__8W5py","nav_button_previous":"calendar-module_nav_button_previous__lWJYm","nav_button_next":"calendar-module_nav_button_next__1MzRT","head":"calendar-module_head__EIxyS","head_cell":"calendar-module_head_cell__z8NlN","cell":"calendar-module_cell__TTpcD","day_today":"calendar-module_day_today__P35-i","day_range_middle":"calendar-module_day_range_middle__3yKS1","day_range_start":"calendar-module_day_range_start__Qyhit","day_range_end":"calendar-module_day_range_end__YF0ad","row":"calendar-module_row__cjS3G","day":"calendar-module_day__rQFGK","day_outside":"calendar-module_day_outside__WN68B","months":"calendar-module_months__IN75k","calendarPopover":"calendar-module_calendarPopover__PY4sa","datePickerInput":"calendar-module_datePickerInput__aOnRQ"};
|
|
28105
28130
|
|
|
28106
28131
|
const root$1 = cva(styles$6.calendarRoot);
|
|
28107
28132
|
const Calendar = function ({ className, classNames, showOutsideDays = true, ...props }) {
|
|
@@ -28125,10 +28150,100 @@ const Calendar = function ({ className, classNames, showOutsideDays = true, ...p
|
|
|
28125
28150
|
day_range_middle: styles$6.day_range_middle,
|
|
28126
28151
|
day_range_end: styles$6.day_range_end,
|
|
28127
28152
|
day_range_start: styles$6.day_range_start,
|
|
28153
|
+
months: styles$6.months,
|
|
28128
28154
|
...classNames,
|
|
28129
28155
|
}, className: root$1({ className }), ...props }));
|
|
28130
28156
|
};
|
|
28131
28157
|
|
|
28158
|
+
var styles$5 = {"textfield":"textfield-module_textfield__u4AGg","textfield-sm":"textfield-module_textfield-sm__OKPic","textfield-md":"textfield-module_textfield-md__e2ayW","textfield-invlid":"textfield-module_textfield-invlid__zo9MF","textfield-valid":"textfield-module_textfield-valid__6rMM9","textfield-leading":"textfield-module_textfield-leading__AE-ld","textfield-trailing":"textfield-module_textfield-trailing__Hj2jX"};
|
|
28159
|
+
|
|
28160
|
+
const textfield = cva(styles$5.textfield, {
|
|
28161
|
+
variants: {
|
|
28162
|
+
size: {
|
|
28163
|
+
small: styles$5["textfield-sm"],
|
|
28164
|
+
medium: styles$5["textfield-md"],
|
|
28165
|
+
},
|
|
28166
|
+
state: {
|
|
28167
|
+
invalid: styles$5["textfield-invalid"],
|
|
28168
|
+
valid: styles$5["textfield-valid"],
|
|
28169
|
+
},
|
|
28170
|
+
hasLeadingElement: {
|
|
28171
|
+
true: styles$5["textfield-leading"],
|
|
28172
|
+
},
|
|
28173
|
+
hasTrailingElement: {
|
|
28174
|
+
true: styles$5["textfield-trailing"],
|
|
28175
|
+
},
|
|
28176
|
+
},
|
|
28177
|
+
defaultVariants: {
|
|
28178
|
+
size: "small",
|
|
28179
|
+
},
|
|
28180
|
+
});
|
|
28181
|
+
const TextField = forwardRef(({ leading, trailing, className, src, size, state, style, ...props }, ref) => {
|
|
28182
|
+
const hasLeadingElement = Boolean(leading);
|
|
28183
|
+
const hasTrailingElement = Boolean(trailing);
|
|
28184
|
+
return (jsxRuntimeExports$1.jsxs(Flex, { align: "center", style: { position: "relative", width: "100%" }, children: [hasLeadingElement ? (jsxRuntimeExports$1.jsx(Flex, { style: { position: "absolute", left: "8px" }, children: leading })) : null, jsxRuntimeExports$1.jsx("input", { className: cx(textfield({
|
|
28185
|
+
size,
|
|
28186
|
+
state,
|
|
28187
|
+
className,
|
|
28188
|
+
hasLeadingElement,
|
|
28189
|
+
hasTrailingElement,
|
|
28190
|
+
})), ...props, ref: ref }), hasTrailingElement ? (jsxRuntimeExports$1.jsx(Flex, { style: { position: "absolute", right: "8px" }, children: trailing })) : null] }));
|
|
28191
|
+
});
|
|
28192
|
+
TextField.displayName = "TextField";
|
|
28193
|
+
|
|
28194
|
+
var dayjs_min = {exports: {}};
|
|
28195
|
+
|
|
28196
|
+
(function (module, exports) {
|
|
28197
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return b.s(e.$y,4,"0");case"M":return a+1;case"MM":return b.s(a+1,2,"0");case"MMM":return h(n.monthsShort,a,c,3);case"MMMM":return h(c,a);case"D":return e.$D;case"DD":return b.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return h(n.weekdaysMin,e.$W,o,2);case"ddd":return h(n.weekdaysShort,e.$W,o,3);case"dddd":return o[e.$W];case"H":return String(s);case"HH":return b.s(s,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return $(s,u,!0);case"A":return $(s,u,!1);case"m":return String(u);case"mm":return b.s(u,2,"0");case"s":return String(e.$s);case"ss":return b.s(e.$s,2,"0");case"SSS":return b.s(e.$ms,3,"0");case"Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
28198
|
+
} (dayjs_min));
|
|
28199
|
+
|
|
28200
|
+
var dayjs_minExports = dayjs_min.exports;
|
|
28201
|
+
var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
|
|
28202
|
+
|
|
28203
|
+
function DatePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, value = new Date(), onSelect = () => { }, }) {
|
|
28204
|
+
const [showCalendar, setShowCalendar] = useState(false);
|
|
28205
|
+
const dateValue = dayjs(value).format(dateFormat);
|
|
28206
|
+
const handleSelect = (day, selectedDay) => {
|
|
28207
|
+
const selected = day || selectedDay;
|
|
28208
|
+
onSelect(selected);
|
|
28209
|
+
setShowCalendar(false);
|
|
28210
|
+
};
|
|
28211
|
+
function onOpenChange(open) {
|
|
28212
|
+
setShowCalendar(Boolean(open));
|
|
28213
|
+
}
|
|
28214
|
+
return (jsxRuntimeExports$1.jsxs(Popover, { open: showCalendar, onOpenChange: onOpenChange, children: [jsxRuntimeExports$1.jsx(Popover.Trigger, { asChild: true, children: jsxRuntimeExports$1.jsx(TextField, { value: dateValue, trailing: jsxRuntimeExports$1.jsx(CalendarIcon, {}), className: styles$6.datePickerInput, readOnly: true, ...textFieldProps }) }), jsxRuntimeExports$1.jsx(Popover.Content, { side: side, className: styles$6.calendarPopover, children: jsxRuntimeExports$1.jsx(Calendar, { ...calendarProps, mode: "single", selected: value, defaultMonth: value, onSelect: handleSelect }) })] }));
|
|
28215
|
+
}
|
|
28216
|
+
|
|
28217
|
+
function RangePicker({ side = "top", dateFormat = "DD/MM/YYYY", textFieldProps, calendarProps, onSelect = () => { }, value = {
|
|
28218
|
+
to: new Date(),
|
|
28219
|
+
from: new Date(),
|
|
28220
|
+
}, pickerGroupClassName, }) {
|
|
28221
|
+
const [showCalendar, setShowCalendar] = useState(false);
|
|
28222
|
+
const [currentRangeField, setCurrentRangeField] = useState("from");
|
|
28223
|
+
const startDate = dayjs(value.from).format(dateFormat);
|
|
28224
|
+
const endDate = dayjs(value.to).format(dateFormat);
|
|
28225
|
+
// 1st click will select the start date.
|
|
28226
|
+
// 2nd click will select the end date.
|
|
28227
|
+
// 3rd click will select the start date again.
|
|
28228
|
+
const handleSelect = (range, selectedDay) => {
|
|
28229
|
+
const from = value?.from || range?.from;
|
|
28230
|
+
if (currentRangeField === "to" && dayjs(selectedDay).isAfter(dayjs(from))) {
|
|
28231
|
+
// update the end date
|
|
28232
|
+
onSelect({ from, to: selectedDay });
|
|
28233
|
+
setCurrentRangeField("from");
|
|
28234
|
+
}
|
|
28235
|
+
else {
|
|
28236
|
+
// reset the range and select start day
|
|
28237
|
+
onSelect({ from: selectedDay });
|
|
28238
|
+
setCurrentRangeField("to");
|
|
28239
|
+
}
|
|
28240
|
+
};
|
|
28241
|
+
function onOpenChange(open) {
|
|
28242
|
+
setShowCalendar(Boolean(open));
|
|
28243
|
+
}
|
|
28244
|
+
return (jsxRuntimeExports$1.jsxs(Popover, { open: showCalendar, onOpenChange: onOpenChange, children: [jsxRuntimeExports$1.jsx(Popover.Trigger, { asChild: true, children: jsxRuntimeExports$1.jsxs(Flex, { gap: "medium", className: pickerGroupClassName, children: [jsxRuntimeExports$1.jsx(TextField, { value: startDate, trailing: jsxRuntimeExports$1.jsx(CalendarIcon, {}), className: styles$6.datePickerInput, readOnly: true, ...textFieldProps }), jsxRuntimeExports$1.jsx(TextField, { value: endDate, trailing: jsxRuntimeExports$1.jsx(CalendarIcon, {}), className: styles$6.datePickerInput, readOnly: true, ...textFieldProps })] }) }), jsxRuntimeExports$1.jsx(Popover.Content, { side: side, className: styles$6.calendarPopover, children: jsxRuntimeExports$1.jsx(Calendar, { showOutsideDays: false, numberOfMonths: 2, defaultMonth: value.from, ...calendarProps, mode: "range", selected: value, onSelect: handleSelect }) })] }));
|
|
28245
|
+
}
|
|
28246
|
+
|
|
28132
28247
|
/**
|
|
28133
28248
|
* table-core
|
|
28134
28249
|
*
|
|
@@ -31607,43 +31722,41 @@ function DataTableFilterOptions({ children, ...props }) {
|
|
|
31607
31722
|
})] })) : null] }));
|
|
31608
31723
|
}
|
|
31609
31724
|
|
|
31610
|
-
var styles$
|
|
31611
|
-
|
|
31612
|
-
const textfield = cva(styles$5.textfield, {
|
|
31613
|
-
variants: {
|
|
31614
|
-
size: {
|
|
31615
|
-
small: styles$5["textfield-sm"],
|
|
31616
|
-
medium: styles$5["textfield-md"],
|
|
31617
|
-
},
|
|
31618
|
-
state: {
|
|
31619
|
-
invalid: styles$5["textfield-invalid"],
|
|
31620
|
-
valid: styles$5["textfield-valid"],
|
|
31621
|
-
},
|
|
31622
|
-
leading: {
|
|
31623
|
-
true: styles$5["textfield-leading"],
|
|
31624
|
-
},
|
|
31625
|
-
},
|
|
31626
|
-
defaultVariants: {
|
|
31627
|
-
size: "small",
|
|
31628
|
-
},
|
|
31629
|
-
});
|
|
31630
|
-
const TextField = forwardRef(({ leading, className, src, size, state, style, ...props }, ref) => {
|
|
31631
|
-
return (jsxRuntimeExports$1.jsxs(Flex, { align: "center", style: { position: "relative", width: "100%" }, children: [leading ? (jsxRuntimeExports$1.jsx(Flex, { style: { position: "absolute", left: "8px" }, children: leading })) : null, jsxRuntimeExports$1.jsx("input", { className: cx(textfield({ size, state, className, leading })), style: leading ? { paddingLeft: "32px" } : {}, ...props, ref: ref })] }));
|
|
31632
|
-
});
|
|
31633
|
-
TextField.displayName = "TextField";
|
|
31634
|
-
|
|
31635
|
-
var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD","chipWrapper":"datatable-module_chipWrapper__iz69x","filterOperator":"datatable-module_filterOperator__qtDsH"};
|
|
31725
|
+
var styles$4 = {"wrapper":"datatable-module_wrapper__Sxg2d","datatable":"datatable-module_datatable__z-Th2","table":"datatable-module_table__x2IkY","head":"datatable-module_head__zCfCW","toolbar":"datatable-module_toolbar__lO-aI","chip":"datatable-module_chip__IiwTD","chipWrapper":"datatable-module_chipWrapper__iz69x","filterOperator":"datatable-module_filterOperator__qtDsH","filterText":"datatable-module_filterText__w00L8","flex1":"datatable-module_flex1__fA-kQ"};
|
|
31636
31726
|
|
|
31637
31727
|
const columnTypesMap = {
|
|
31638
31728
|
select: "select",
|
|
31639
31729
|
number: "number",
|
|
31640
31730
|
text: "text",
|
|
31731
|
+
date: "date",
|
|
31641
31732
|
};
|
|
31642
31733
|
const filterValueTypeMap = {
|
|
31643
31734
|
select: "select",
|
|
31644
31735
|
text: "text",
|
|
31736
|
+
datePicker: "datePicker",
|
|
31737
|
+
rangePicker: "rangePicker",
|
|
31645
31738
|
};
|
|
31646
31739
|
|
|
31740
|
+
var isSameOrAfter$1 = {exports: {}};
|
|
31741
|
+
|
|
31742
|
+
(function (module, exports) {
|
|
31743
|
+
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)};}}));
|
|
31744
|
+
} (isSameOrAfter$1));
|
|
31745
|
+
|
|
31746
|
+
var isSameOrAfterExports = isSameOrAfter$1.exports;
|
|
31747
|
+
var isSameOrAfter = /*@__PURE__*/getDefaultExportFromCjs(isSameOrAfterExports);
|
|
31748
|
+
|
|
31749
|
+
var isSameOrBefore$1 = {exports: {}};
|
|
31750
|
+
|
|
31751
|
+
(function (module, exports) {
|
|
31752
|
+
!function(e,i){module.exports=i();}(commonjsGlobal,(function(){return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)};}}));
|
|
31753
|
+
} (isSameOrBefore$1));
|
|
31754
|
+
|
|
31755
|
+
var isSameOrBeforeExports = isSameOrBefore$1.exports;
|
|
31756
|
+
var isSameOrBefore = /*@__PURE__*/getDefaultExportFromCjs(isSameOrBeforeExports);
|
|
31757
|
+
|
|
31758
|
+
dayjs.extend(isSameOrAfter);
|
|
31759
|
+
dayjs.extend(isSameOrBefore);
|
|
31647
31760
|
const operationsOptions = {
|
|
31648
31761
|
[columnTypesMap.select]: [
|
|
31649
31762
|
{
|
|
@@ -31759,25 +31872,85 @@ const operationsOptions = {
|
|
|
31759
31872
|
hideValueField: true,
|
|
31760
31873
|
},
|
|
31761
31874
|
],
|
|
31875
|
+
[columnTypesMap.date]: [
|
|
31876
|
+
{
|
|
31877
|
+
label: "is",
|
|
31878
|
+
value: "is",
|
|
31879
|
+
fn: (row, columnId, filterValue) => {
|
|
31880
|
+
return dayjs(row.getValue(columnId)).isSame(dayjs(filterValue.date), "day");
|
|
31881
|
+
},
|
|
31882
|
+
},
|
|
31883
|
+
{
|
|
31884
|
+
label: "is before",
|
|
31885
|
+
value: "is before",
|
|
31886
|
+
fn: (row, columnId, filterValue) => {
|
|
31887
|
+
return dayjs(row.getValue(columnId)).isBefore(dayjs(filterValue.date), "day");
|
|
31888
|
+
},
|
|
31889
|
+
},
|
|
31890
|
+
{
|
|
31891
|
+
label: "is after",
|
|
31892
|
+
value: "is after",
|
|
31893
|
+
fn: (row, columnId, filterValue) => {
|
|
31894
|
+
return dayjs(row.getValue(columnId)).isAfter(dayjs(filterValue.date), "day");
|
|
31895
|
+
},
|
|
31896
|
+
},
|
|
31897
|
+
{
|
|
31898
|
+
label: "is between",
|
|
31899
|
+
value: "is between",
|
|
31900
|
+
fn: (row, columnId, filterValue) => {
|
|
31901
|
+
return (dayjs(row.getValue(columnId)).isSameOrAfter(dayjs(filterValue.dateRange?.from), "day") &&
|
|
31902
|
+
dayjs(row.getValue(columnId)).isSameOrBefore(dayjs(filterValue.dateRange?.to), "day"));
|
|
31903
|
+
},
|
|
31904
|
+
component: "rangePicker",
|
|
31905
|
+
},
|
|
31906
|
+
],
|
|
31762
31907
|
};
|
|
31763
31908
|
|
|
31764
|
-
const
|
|
31765
|
-
|
|
31766
|
-
|
|
31767
|
-
|
|
31768
|
-
|
|
31909
|
+
const getFilterValueType = ({ filterOperation, columnType, }) => {
|
|
31910
|
+
if (filterOperation?.component) {
|
|
31911
|
+
return filterOperation?.component;
|
|
31912
|
+
}
|
|
31913
|
+
else if (columnType === columnTypesMap.date) {
|
|
31914
|
+
return filterValueTypeMap.datePicker;
|
|
31915
|
+
}
|
|
31916
|
+
else if (columnType === columnTypesMap.select) {
|
|
31917
|
+
return filterValueTypeMap.select;
|
|
31918
|
+
}
|
|
31919
|
+
else {
|
|
31920
|
+
return filterValueTypeMap.text;
|
|
31921
|
+
}
|
|
31922
|
+
};
|
|
31923
|
+
const FilterValues = ({ columnType = filterValueTypeMap.text, options = [], onValueChange, filterOperation, ...props }) => {
|
|
31924
|
+
const [value, setValue] = useState({
|
|
31925
|
+
value: "",
|
|
31926
|
+
date: new Date(),
|
|
31927
|
+
dateRange: {
|
|
31928
|
+
to: new Date(),
|
|
31929
|
+
from: new Date(),
|
|
31930
|
+
},
|
|
31931
|
+
});
|
|
31932
|
+
const valueType = getFilterValueType({ filterOperation, columnType });
|
|
31769
31933
|
useEffect(() => {
|
|
31770
|
-
if (
|
|
31771
|
-
onValueChange(
|
|
31934
|
+
if (onValueChange) {
|
|
31935
|
+
onValueChange(value);
|
|
31772
31936
|
}
|
|
31773
31937
|
}, [value]);
|
|
31774
|
-
|
|
31775
|
-
|
|
31776
|
-
|
|
31938
|
+
switch (valueType) {
|
|
31939
|
+
case filterValueTypeMap.select:
|
|
31940
|
+
return (jsxRuntimeExports$1.jsxs(Select, { value: value.value, onValueChange: (value) => setValue({ value }), children: [jsxRuntimeExports$1.jsx(Select.Trigger, { children: jsxRuntimeExports$1.jsx(Select.Value, { placeholder: "Select value" }) }), jsxRuntimeExports$1.jsx(Select.Content, { children: options.map((opt) => {
|
|
31941
|
+
return (jsxRuntimeExports$1.jsx(Select.Item, { value: opt.value, children: opt.label || opt.value }, opt.key));
|
|
31942
|
+
}) })] }));
|
|
31943
|
+
case filterValueTypeMap.datePicker:
|
|
31944
|
+
return (jsxRuntimeExports$1.jsx(DatePicker, { onSelect: (date) => setValue({ date }), value: value.date }));
|
|
31945
|
+
case filterValueTypeMap.rangePicker:
|
|
31946
|
+
return (jsxRuntimeExports$1.jsx(RangePicker, { onSelect: (dateRange) => setValue({ dateRange }), value: value.dateRange }));
|
|
31947
|
+
default:
|
|
31948
|
+
return (jsxRuntimeExports$1.jsx(TextField, { value: value.value, onChange: (e) => setValue({ value: e.target.value }) }));
|
|
31949
|
+
}
|
|
31777
31950
|
};
|
|
31778
31951
|
const Operation = ({ columnType = columnTypesMap.text, onOperationSelect, }) => {
|
|
31779
31952
|
const options = operationsOptions[columnType] || [];
|
|
31780
|
-
const [value, setValue] = useState(options?.[0]
|
|
31953
|
+
const [value, setValue] = useState(options?.[0]?.value);
|
|
31781
31954
|
useEffect(() => {
|
|
31782
31955
|
const selectedOption = options.find((o) => o.value === value);
|
|
31783
31956
|
if (selectedOption) {
|
|
@@ -31809,7 +31982,7 @@ const FilteredChip = ({ column, updateColumnCustomFilter, }) => {
|
|
|
31809
31982
|
setFilterOperation(undefined);
|
|
31810
31983
|
setFilterValue({});
|
|
31811
31984
|
}
|
|
31812
|
-
return (jsxRuntimeExports$1.jsxs(Box, { className: styles$4.chip, children: [jsxRuntimeExports$1.jsx(Text, { children: columnName }), jsxRuntimeExports$1.jsx(Operation, { columnType: filterVariant, onOperationSelect: setFilterOperation }), filterOperation?.hideValueField ? null : (jsxRuntimeExports$1.jsx(FilterValues, { columnType: filterVariant, options: options, onValueChange: setFilterValue })), jsxRuntimeExports$1.jsx(Flex, { children: jsxRuntimeExports$1.jsx(Cross1Icon, { height: "12", width: "12", onClick: removeFilter }) })] }));
|
|
31985
|
+
return (jsxRuntimeExports$1.jsxs(Box, { className: styles$4.chip, children: [jsxRuntimeExports$1.jsx(Text, { className: styles$4.filterText, children: columnName }), jsxRuntimeExports$1.jsx(Operation, { columnType: filterVariant, onOperationSelect: setFilterOperation }), filterOperation?.hideValueField ? null : (jsxRuntimeExports$1.jsx(FilterValues, { columnType: filterVariant, options: options, onValueChange: setFilterValue, filterOperation: filterOperation })), jsxRuntimeExports$1.jsx(Flex, { children: jsxRuntimeExports$1.jsx(Cross1Icon, { height: "12", width: "12", onClick: removeFilter }) })] }));
|
|
31813
31986
|
};
|
|
31814
31987
|
|
|
31815
31988
|
function DataTableFilterChips(props) {
|
|
@@ -31915,7 +32088,98 @@ const Table = Object.assign(TableRoot, {
|
|
|
31915
32088
|
Caption: TableCaption,
|
|
31916
32089
|
});
|
|
31917
32090
|
|
|
31918
|
-
|
|
32091
|
+
/**
|
|
32092
|
+
* @internal
|
|
32093
|
+
*/
|
|
32094
|
+
const SkeletonThemeContext = React__default.createContext({});
|
|
32095
|
+
|
|
32096
|
+
/* eslint-disable react/no-array-index-key */
|
|
32097
|
+
const defaultEnableAnimation = true;
|
|
32098
|
+
// For performance & cleanliness, don't add any inline styles unless we have to
|
|
32099
|
+
function styleOptionsToCssProperties({ baseColor, highlightColor, width, height, borderRadius, circle, direction, duration, enableAnimation = defaultEnableAnimation, }) {
|
|
32100
|
+
const style = {};
|
|
32101
|
+
if (direction === 'rtl')
|
|
32102
|
+
style['--animation-direction'] = 'reverse';
|
|
32103
|
+
if (typeof duration === 'number')
|
|
32104
|
+
style['--animation-duration'] = `${duration}s`;
|
|
32105
|
+
if (!enableAnimation)
|
|
32106
|
+
style['--pseudo-element-display'] = 'none';
|
|
32107
|
+
if (typeof width === 'string' || typeof width === 'number')
|
|
32108
|
+
style.width = width;
|
|
32109
|
+
if (typeof height === 'string' || typeof height === 'number')
|
|
32110
|
+
style.height = height;
|
|
32111
|
+
if (typeof borderRadius === 'string' || typeof borderRadius === 'number')
|
|
32112
|
+
style.borderRadius = borderRadius;
|
|
32113
|
+
if (circle)
|
|
32114
|
+
style.borderRadius = '50%';
|
|
32115
|
+
if (typeof baseColor !== 'undefined')
|
|
32116
|
+
style['--base-color'] = baseColor;
|
|
32117
|
+
if (typeof highlightColor !== 'undefined')
|
|
32118
|
+
style['--highlight-color'] = highlightColor;
|
|
32119
|
+
return style;
|
|
32120
|
+
}
|
|
32121
|
+
function Skeleton({ count = 1, wrapper: Wrapper, className: customClassName, containerClassName, containerTestId, circle = false, style: styleProp, ...originalPropsStyleOptions }) {
|
|
32122
|
+
var _a, _b, _c;
|
|
32123
|
+
const contextStyleOptions = React__default.useContext(SkeletonThemeContext);
|
|
32124
|
+
const propsStyleOptions = { ...originalPropsStyleOptions };
|
|
32125
|
+
// DO NOT overwrite style options from the context if `propsStyleOptions`
|
|
32126
|
+
// has properties explicity set to undefined
|
|
32127
|
+
for (const [key, value] of Object.entries(originalPropsStyleOptions)) {
|
|
32128
|
+
if (typeof value === 'undefined') {
|
|
32129
|
+
delete propsStyleOptions[key];
|
|
32130
|
+
}
|
|
32131
|
+
}
|
|
32132
|
+
// Props take priority over context
|
|
32133
|
+
const styleOptions = {
|
|
32134
|
+
...contextStyleOptions,
|
|
32135
|
+
...propsStyleOptions,
|
|
32136
|
+
circle,
|
|
32137
|
+
};
|
|
32138
|
+
// `styleProp` has the least priority out of everything
|
|
32139
|
+
const style = {
|
|
32140
|
+
...styleProp,
|
|
32141
|
+
...styleOptionsToCssProperties(styleOptions),
|
|
32142
|
+
};
|
|
32143
|
+
let className = 'react-loading-skeleton';
|
|
32144
|
+
if (customClassName)
|
|
32145
|
+
className += ` ${customClassName}`;
|
|
32146
|
+
const inline = (_a = styleOptions.inline) !== null && _a !== void 0 ? _a : false;
|
|
32147
|
+
const elements = [];
|
|
32148
|
+
const countCeil = Math.ceil(count);
|
|
32149
|
+
for (let i = 0; i < countCeil; i++) {
|
|
32150
|
+
let thisStyle = style;
|
|
32151
|
+
if (countCeil > count && i === countCeil - 1) {
|
|
32152
|
+
// count is not an integer and we've reached the last iteration of
|
|
32153
|
+
// the loop, so add a "fractional" skeleton.
|
|
32154
|
+
//
|
|
32155
|
+
// For example, if count is 3.5, we've already added 3 full
|
|
32156
|
+
// skeletons, so now we add one more skeleton that is 0.5 times the
|
|
32157
|
+
// original width.
|
|
32158
|
+
const width = (_b = thisStyle.width) !== null && _b !== void 0 ? _b : '100%'; // 100% is the default since that's what's in the CSS
|
|
32159
|
+
const fractionalPart = count % 1;
|
|
32160
|
+
const fractionalWidth = typeof width === 'number'
|
|
32161
|
+
? width * fractionalPart
|
|
32162
|
+
: `calc(${width} * ${fractionalPart})`;
|
|
32163
|
+
thisStyle = { ...thisStyle, width: fractionalWidth };
|
|
32164
|
+
}
|
|
32165
|
+
const skeletonSpan = (React__default.createElement("span", { className: className, style: thisStyle, key: i }, "\u200C"));
|
|
32166
|
+
if (inline) {
|
|
32167
|
+
elements.push(skeletonSpan);
|
|
32168
|
+
}
|
|
32169
|
+
else {
|
|
32170
|
+
// Without the <br />, the skeleton lines will all run together if
|
|
32171
|
+
// `width` is specified
|
|
32172
|
+
elements.push(React__default.createElement(React__default.Fragment, { key: i },
|
|
32173
|
+
skeletonSpan,
|
|
32174
|
+
React__default.createElement("br", null)));
|
|
32175
|
+
}
|
|
32176
|
+
}
|
|
32177
|
+
return (React__default.createElement("span", { className: containerClassName, "data-testid": containerTestId, "aria-live": "polite", "aria-busy": (_c = styleOptions.enableAnimation) !== null && _c !== void 0 ? _c : defaultEnableAnimation }, Wrapper
|
|
32178
|
+
? elements.map((el, i) => React__default.createElement(Wrapper, { key: i }, el))
|
|
32179
|
+
: elements));
|
|
32180
|
+
}
|
|
32181
|
+
|
|
32182
|
+
function DataTableRoot({ columns, data, emptyState, children, parentStyle, isLoading = false, ShouldShowHeader = true, ...props }) {
|
|
31919
32183
|
const [tableCustomFilter, setTableCustomFilter] = React__default.useState({});
|
|
31920
32184
|
const convertedChildren = Children.toArray(children);
|
|
31921
32185
|
const header = convertedChildren.find((child) => child.type === DataTableToolbar) || null;
|
|
@@ -31934,6 +32198,9 @@ function DataTableRoot({ columns, data, emptyState, children, parentStyle, Shoul
|
|
|
31934
32198
|
if (colId && tableCustomFilter.hasOwnProperty(colId)) {
|
|
31935
32199
|
col.filterFn = tableCustomFilter[colId];
|
|
31936
32200
|
}
|
|
32201
|
+
col.cell = isLoading
|
|
32202
|
+
? () => (jsxRuntimeExports$1.jsx(Skeleton, { containerClassName: styles$4.flex1, highlightColor: "var(--background-base)", baseColor: "var(--background-base-hover)" }))
|
|
32203
|
+
: col.cell;
|
|
31937
32204
|
return col;
|
|
31938
32205
|
});
|
|
31939
32206
|
const updateColumnCustomFilter = (id, filterFn) => {
|
|
@@ -32456,5 +32723,5 @@ function Title({ children, className, size, ...props }) {
|
|
|
32456
32723
|
return (jsxRuntimeExports$1.jsx("span", { className: title({ size, className }), ...props, children: children }));
|
|
32457
32724
|
}
|
|
32458
32725
|
|
|
32459
|
-
export { Accordion, Avatar, badge$1 as Badge, Body, Box, Button$1 as Button, Calendar, Checkbox, Command, Container, DataTable, Dialog, Display, DropdownMenu, EmptyState, ErrorState, Flex, Grid, Headline, Image, InputField, Label, Link, Popover, RSelect, Radio, ScrollArea, Select, Separator, Sheet, Sidebar, Switch, Table, Tabs, Text, TextField, Textarea, ThemeProvider, ThemeSwitcher, Title, ToggleGroup, Tooltip, useTable, useTheme };
|
|
32726
|
+
export { Accordion, Avatar, badge$1 as Badge, Body, Box, Button$1 as Button, Calendar, Checkbox, Command, Container, DataTable, DatePicker, Dialog, Display, DropdownMenu, EmptyState, ErrorState, Flex, Grid, Headline, Image, InputField, Label, Link, Popover, RSelect, Radio, RangePicker, ScrollArea, Select, Separator, Sheet, Sidebar, Switch, Table, Tabs, Text, TextField, Textarea, ThemeProvider, ThemeSwitcher, Title, ToggleGroup, Tooltip, useTable, useTheme };
|
|
32460
32727
|
//# sourceMappingURL=index.js.map
|