@embeddable.com/remarkable-ui 2.0.17 → 2.0.19
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/{DateRangePicker-E7WV7TPK.css → DateRangePicker-PLOUUN7Q.css} +8 -0
- package/dist/{DateRangePickerChevron.module-DWIFI5J2.module.css → DateRangePickerChevron.module-XDPDMPIS.module.css} +12 -0
- package/dist/{TableBody.module-ARNVVKDL.module.css → TableBody.module-MLQLXJ62.module.css} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +41 -30
- package/dist/index.js.map +1 -1
- package/dist/{tables.module-GNDYDW3Z.module.css → tables.module-TLDWBBPV.module.css} +4 -0
- package/package.json +1 -1
|
@@ -203,6 +203,14 @@
|
|
|
203
203
|
align-items: center;
|
|
204
204
|
gap: var(--rdp-dropdown-gap);
|
|
205
205
|
}
|
|
206
|
+
|
|
207
|
+
.rdp-dropdowns span {
|
|
208
|
+
color: var(--em-daterangepicker-label-color, #212129);
|
|
209
|
+
font-family: var(--em-daterangepicker-label-font-family, sans-serif);
|
|
210
|
+
font-size: var(--em-daterangepicker-label-font-size, 0.875rem);
|
|
211
|
+
font-weight: var(--em-daterangepicker-label-font-weight, 500);
|
|
212
|
+
}
|
|
213
|
+
|
|
206
214
|
.rdp-dropdown {
|
|
207
215
|
z-index: 2;
|
|
208
216
|
|
|
@@ -24,3 +24,15 @@
|
|
|
24
24
|
.chevron:active {
|
|
25
25
|
background: var(--em-daterangepicker-chevron--active, #ededf1);
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
.chevron.small {
|
|
29
|
+
background: unset;
|
|
30
|
+
width: calc(var(--em-daterangepicker-chevron-size, 2rem) / 2);
|
|
31
|
+
height: calc(var(--em-daterangepicker-chevron-size, 2rem) / 2);
|
|
32
|
+
padding: calc(var(--em-daterangepicker-chevron-padding, 0.5rem) / 2);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.chevron.small svg {
|
|
36
|
+
width: calc(var(--em-daterangepicker-chevron-icon-size, 1rem) / 2);
|
|
37
|
+
height: calc(var(--em-daterangepicker-chevron-icon-size, 1rem) / 2);
|
|
38
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -454,9 +454,9 @@ type HeatMapProps<T extends Record<string, unknown>> = {
|
|
|
454
454
|
/** Color thresholds — number = raw value, "NN%" = percentage of [min..max]. */
|
|
455
455
|
minThreshold?: HeatMapPropsThreshold;
|
|
456
456
|
maxThreshold?: HeatMapPropsThreshold;
|
|
457
|
-
minColor
|
|
458
|
-
midColor
|
|
459
|
-
maxColor
|
|
457
|
+
minColor?: string;
|
|
458
|
+
midColor?: string;
|
|
459
|
+
maxColor?: string;
|
|
460
460
|
columnWidth?: number;
|
|
461
461
|
firstColumnWidth?: number;
|
|
462
462
|
missingCellColor?: string;
|
package/dist/index.js
CHANGED
|
@@ -860,20 +860,24 @@ NumberField.displayName = "NumberField";
|
|
|
860
860
|
// src/components/editors/dates/DateRangePicker/DateRangePicker.tsx
|
|
861
861
|
import { useState as useState3 } from "react";
|
|
862
862
|
import { DayPicker } from "react-day-picker";
|
|
863
|
-
import "./DateRangePicker-
|
|
863
|
+
import "./DateRangePicker-PLOUUN7Q.css";
|
|
864
864
|
|
|
865
865
|
// src/components/editors/dates/DateRangePicker/DateRangePickerChevron.tsx
|
|
866
866
|
import { IconCaretDownFilled as IconCaretDownFilled2 } from "@tabler/icons-react";
|
|
867
|
-
import styles21 from "./DateRangePickerChevron.module-
|
|
867
|
+
import styles21 from "./DateRangePickerChevron.module-XDPDMPIS.module.css";
|
|
868
|
+
import clsx16 from "clsx";
|
|
868
869
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
870
|
+
var SMALL_SIZE = 18;
|
|
869
871
|
var DateRangePickerChevron = ({
|
|
870
|
-
orientation
|
|
872
|
+
orientation,
|
|
873
|
+
size
|
|
871
874
|
}) => {
|
|
872
875
|
const rotation = orientation === "left" ? "rotate(90deg)" : orientation === "right" ? "rotate(-90deg)" : void 0;
|
|
876
|
+
const isSmallChevron = size === SMALL_SIZE;
|
|
873
877
|
return /* @__PURE__ */ jsx23(
|
|
874
878
|
"button",
|
|
875
879
|
{
|
|
876
|
-
className: styles21.chevron,
|
|
880
|
+
className: clsx16(styles21.chevron, isSmallChevron && styles21.small),
|
|
877
881
|
style: {
|
|
878
882
|
transform: rotation
|
|
879
883
|
},
|
|
@@ -907,6 +911,8 @@ var DateRangePicker = ({
|
|
|
907
911
|
}
|
|
908
912
|
onChange(range);
|
|
909
913
|
};
|
|
914
|
+
const now = /* @__PURE__ */ new Date();
|
|
915
|
+
const endMonth = new Date(now.getFullYear() + 2, now.getMonth());
|
|
910
916
|
return /* @__PURE__ */ jsx24(
|
|
911
917
|
DayPicker,
|
|
912
918
|
{
|
|
@@ -920,7 +926,10 @@ var DateRangePicker = ({
|
|
|
920
926
|
onSelect: handleChange,
|
|
921
927
|
selected: value,
|
|
922
928
|
timeZone: "UTC",
|
|
923
|
-
showOutsideDays: true
|
|
929
|
+
showOutsideDays: true,
|
|
930
|
+
captionLayout: "dropdown-years",
|
|
931
|
+
endMonth,
|
|
932
|
+
animate: true
|
|
924
933
|
}
|
|
925
934
|
);
|
|
926
935
|
};
|
|
@@ -1635,7 +1644,7 @@ import styles26 from "./KpiChart.module-2LUIN66C.module.css";
|
|
|
1635
1644
|
|
|
1636
1645
|
// src/components/charts/kpis/components/KpiChartChange.tsx
|
|
1637
1646
|
import styles25 from "./KpiChartChange.module-BAW7YCOW.module.css";
|
|
1638
|
-
import
|
|
1647
|
+
import clsx17 from "clsx";
|
|
1639
1648
|
import { IconTrendingDown, IconTrendingUp } from "@tabler/icons-react";
|
|
1640
1649
|
import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1641
1650
|
var getChangeClass = (isPositive, invertChangeColors) => {
|
|
@@ -1667,11 +1676,11 @@ var KpiChartChange = ({
|
|
|
1667
1676
|
const Icon = isPositive ? IconTrendingUp : IconTrendingDown;
|
|
1668
1677
|
const showNoPreviousData = showChangeAsPercentage && Number(comparisonValue) === 0;
|
|
1669
1678
|
return /* @__PURE__ */ jsxs15("div", { className: styles25.kpiChangeContainerSizeGuide, children: [
|
|
1670
|
-
/* @__PURE__ */ jsxs15("div", { className:
|
|
1679
|
+
/* @__PURE__ */ jsxs15("div", { className: clsx17(styles25.kpiChartChangeContainer, styles25.hidden), children: [
|
|
1671
1680
|
/* @__PURE__ */ jsxs15(
|
|
1672
1681
|
"span",
|
|
1673
1682
|
{
|
|
1674
|
-
className:
|
|
1683
|
+
className: clsx17(styles25.kpiChangeBadge, getChangeClass(isPositive, invertChangeColors)),
|
|
1675
1684
|
children: [
|
|
1676
1685
|
/* @__PURE__ */ jsx28(Icon, {}),
|
|
1677
1686
|
/* @__PURE__ */ jsx28("span", { children: displayValue })
|
|
@@ -1684,7 +1693,7 @@ var KpiChartChange = ({
|
|
|
1684
1693
|
!equalComparison && /* @__PURE__ */ jsxs15(
|
|
1685
1694
|
"span",
|
|
1686
1695
|
{
|
|
1687
|
-
className:
|
|
1696
|
+
className: clsx17(
|
|
1688
1697
|
styles25.kpiChangeBadge,
|
|
1689
1698
|
getChangeClass(isPositive, invertChangeColors)
|
|
1690
1699
|
),
|
|
@@ -1957,8 +1966,8 @@ var PieChart = ({
|
|
|
1957
1966
|
|
|
1958
1967
|
// src/components/charts/tables/Table/TablePaginated.tsx
|
|
1959
1968
|
import * as React3 from "react";
|
|
1960
|
-
import styles32 from "./tables.module-
|
|
1961
|
-
import
|
|
1969
|
+
import styles32 from "./tables.module-TLDWBBPV.module.css";
|
|
1970
|
+
import clsx20 from "clsx";
|
|
1962
1971
|
|
|
1963
1972
|
// src/components/charts/tables/Table/components/TablePagination/TablePagination.tsx
|
|
1964
1973
|
import {
|
|
@@ -2055,8 +2064,8 @@ var TableHeaderAlign = {
|
|
|
2055
2064
|
};
|
|
2056
2065
|
|
|
2057
2066
|
// src/components/charts/tables/Table/components/TableHeader/TableHeader.tsx
|
|
2058
|
-
import tableStyles from "./tables.module-
|
|
2059
|
-
import
|
|
2067
|
+
import tableStyles from "./tables.module-TLDWBBPV.module.css";
|
|
2068
|
+
import clsx18 from "clsx";
|
|
2060
2069
|
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2061
2070
|
var getHeaderAriaSort = (sort, header) => {
|
|
2062
2071
|
return sort?.id === header.id ? sort.direction === "asc" ? "ascending" : "descending" : "none";
|
|
@@ -2098,7 +2107,7 @@ var TableHeader = ({
|
|
|
2098
2107
|
}
|
|
2099
2108
|
};
|
|
2100
2109
|
return /* @__PURE__ */ jsx34("thead", { className: styles30.tableHeader, children: /* @__PURE__ */ jsxs18("tr", { children: [
|
|
2101
|
-
showIndex && /* @__PURE__ */ jsx34("th", { className:
|
|
2110
|
+
showIndex && /* @__PURE__ */ jsx34("th", { className: clsx18(tableStyles.mutedCell, tableStyles.stickyFirstColumn), children: "#" }),
|
|
2102
2111
|
headers.map((header) => /* @__PURE__ */ jsx34(
|
|
2103
2112
|
"th",
|
|
2104
2113
|
{
|
|
@@ -2124,11 +2133,11 @@ var TableHeader = ({
|
|
|
2124
2133
|
};
|
|
2125
2134
|
|
|
2126
2135
|
// src/components/charts/tables/Table/components/TableBody/TableBody.tsx
|
|
2127
|
-
import styles31 from "./TableBody.module-
|
|
2128
|
-
import
|
|
2136
|
+
import styles31 from "./TableBody.module-MLQLXJ62.module.css";
|
|
2137
|
+
import clsx19 from "clsx";
|
|
2129
2138
|
import { IconCopy, IconCopyCheckFilled } from "@tabler/icons-react";
|
|
2130
2139
|
import { useState as useState6 } from "react";
|
|
2131
|
-
import tableStyles2 from "./tables.module-
|
|
2140
|
+
import tableStyles2 from "./tables.module-TLDWBBPV.module.css";
|
|
2132
2141
|
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2133
2142
|
var TableBody = ({
|
|
2134
2143
|
headers,
|
|
@@ -2142,9 +2151,9 @@ var TableBody = ({
|
|
|
2142
2151
|
"tr",
|
|
2143
2152
|
{
|
|
2144
2153
|
onClick: () => onRowIndexClick?.(rowIndex),
|
|
2145
|
-
className:
|
|
2154
|
+
className: clsx19(rowIndex === rows.length - 1 && tableStyles2.tableLastRow),
|
|
2146
2155
|
children: [
|
|
2147
|
-
showIndex && /* @__PURE__ */ jsx35("td", { className:
|
|
2156
|
+
showIndex && /* @__PURE__ */ jsx35("td", { className: clsx19(tableStyles2.mutedCell, tableStyles2.stickyFirstColumn), children: pageSize * page + rowIndex + 1 }),
|
|
2148
2157
|
headers.map((header, cellIndex) => /* @__PURE__ */ jsx35(
|
|
2149
2158
|
TableBodyCell,
|
|
2150
2159
|
{
|
|
@@ -2188,7 +2197,7 @@ var TableBodyCell = ({ header, row, rowIndex, cellIndex }) => {
|
|
|
2188
2197
|
title: `Copy: ${String(value)}`,
|
|
2189
2198
|
onMouseDown: handleCopy,
|
|
2190
2199
|
icon: isPressedCopy ? IconCopyCheckFilled : IconCopy,
|
|
2191
|
-
className:
|
|
2200
|
+
className: clsx19(
|
|
2192
2201
|
styles31.copyButton,
|
|
2193
2202
|
header.align === TableHeaderAlign.RIGHT && styles31.leftAlign
|
|
2194
2203
|
),
|
|
@@ -2221,7 +2230,7 @@ var TablePaginated = React3.forwardRef(
|
|
|
2221
2230
|
onPageChange,
|
|
2222
2231
|
onSortChange
|
|
2223
2232
|
} = props;
|
|
2224
|
-
return /* @__PURE__ */ jsxs20("div", { ref, className:
|
|
2233
|
+
return /* @__PURE__ */ jsxs20("div", { ref, className: clsx20(styles32.tableContainer, className), children: [
|
|
2225
2234
|
/* @__PURE__ */ jsx36("div", { className: styles32.tableContainerScroll, children: /* @__PURE__ */ jsxs20("table", { className: styles32.table, children: [
|
|
2226
2235
|
/* @__PURE__ */ jsx36(
|
|
2227
2236
|
TableHeader,
|
|
@@ -2261,8 +2270,8 @@ TablePaginated.displayName = "TablePaginated";
|
|
|
2261
2270
|
|
|
2262
2271
|
// src/components/charts/tables/PivotTable/PivotTable.tsx
|
|
2263
2272
|
import { useEffect as useEffect6, useMemo as useMemo3, useState as useState7 } from "react";
|
|
2264
|
-
import tableStyles3 from "./tables.module-
|
|
2265
|
-
import
|
|
2273
|
+
import tableStyles3 from "./tables.module-TLDWBBPV.module.css";
|
|
2274
|
+
import clsx21 from "clsx";
|
|
2266
2275
|
|
|
2267
2276
|
// src/components/charts/tables/tables.utils.ts
|
|
2268
2277
|
var getTableCellWidthStyle = (width) => {
|
|
@@ -2393,10 +2402,10 @@ var PivotTable = ({
|
|
|
2393
2402
|
};
|
|
2394
2403
|
}, [progressive, batchSize, batchDelayMs, rowValues.length, data]);
|
|
2395
2404
|
const visibleRows = progressive ? rowValues.slice(0, visibleCount) : rowValues;
|
|
2396
|
-
return /* @__PURE__ */ jsx37("div", { className:
|
|
2405
|
+
return /* @__PURE__ */ jsx37("div", { className: clsx21(tableStyles3.tableFullContainer, className), children: /* @__PURE__ */ jsx37(
|
|
2397
2406
|
"div",
|
|
2398
2407
|
{
|
|
2399
|
-
className:
|
|
2408
|
+
className: clsx21(
|
|
2400
2409
|
tableStyles3.tableAdjustedContainer,
|
|
2401
2410
|
(!columnWidth || !firstColumnWidth) && tableStyles3.fullWidth
|
|
2402
2411
|
),
|
|
@@ -2538,7 +2547,7 @@ var PivotTable = ({
|
|
|
2538
2547
|
"th",
|
|
2539
2548
|
{
|
|
2540
2549
|
scope: "row",
|
|
2541
|
-
className:
|
|
2550
|
+
className: clsx21(tableStyles3.stickyFirstColumn, tableStyles3.boltCell),
|
|
2542
2551
|
title: totalLabel,
|
|
2543
2552
|
children: totalLabel
|
|
2544
2553
|
}
|
|
@@ -2589,8 +2598,8 @@ var PivotTable = ({
|
|
|
2589
2598
|
|
|
2590
2599
|
// src/components/charts/tables/HeatMap/HeatMap.tsx
|
|
2591
2600
|
import { useMemo as useMemo4, useCallback } from "react";
|
|
2592
|
-
import tableStyles4 from "./tables.module-
|
|
2593
|
-
import
|
|
2601
|
+
import tableStyles4 from "./tables.module-TLDWBBPV.module.css";
|
|
2602
|
+
import clsx22 from "clsx";
|
|
2594
2603
|
|
|
2595
2604
|
// src/components/charts/tables/HeatMap/HeatMap.utils.ts
|
|
2596
2605
|
var clamp01 = (x) => x < 0 ? 0 : x > 1 ? 1 : x;
|
|
@@ -2710,6 +2719,8 @@ var createColorForValue = ({
|
|
|
2710
2719
|
midColor,
|
|
2711
2720
|
maxColor
|
|
2712
2721
|
}) => {
|
|
2722
|
+
minColor = minColor ?? lerpColor(midColor, LERP_LIGHTEST_COLOR, 0.5);
|
|
2723
|
+
maxColor = maxColor ?? lerpColor(midColor, LERP_DARKEST_COLOR, 0.5);
|
|
2713
2724
|
const midPoint = getMidPoint(domainMin, domainMax);
|
|
2714
2725
|
const scale = makeDiverging(minColor, midColor, maxColor, midPoint);
|
|
2715
2726
|
const leftTailLen = Math.max(1e-6, domainMin - rawMin);
|
|
@@ -2812,10 +2823,10 @@ var HeatMap = ({
|
|
|
2812
2823
|
},
|
|
2813
2824
|
[domainMin, domainMax, rawMin, rawMax, minColor, midColor, maxColor]
|
|
2814
2825
|
);
|
|
2815
|
-
return /* @__PURE__ */ jsx38("div", { className:
|
|
2826
|
+
return /* @__PURE__ */ jsx38("div", { className: clsx22(tableStyles4.tableFullContainer, className), children: /* @__PURE__ */ jsx38(
|
|
2816
2827
|
"div",
|
|
2817
2828
|
{
|
|
2818
|
-
className:
|
|
2829
|
+
className: clsx22(
|
|
2819
2830
|
tableStyles4.tableAdjustedContainer,
|
|
2820
2831
|
(!columnWidth || !firstColumnWidth) && tableStyles4.fullWidth
|
|
2821
2832
|
),
|