@borisj74/bv-ds 0.1.11 → 0.1.13
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/index.cjs +43 -56
- package/dist/index.js +44 -57
- package/package.json +4 -4
- package/src/components/TextEditor/TextEditor.tsx +20 -37
- package/src/types/bv-ds-icons.d.ts +0 -6
package/dist/index.cjs
CHANGED
|
@@ -4891,10 +4891,10 @@ function ActivityFeed({
|
|
|
4891
4891
|
}
|
|
4892
4892
|
);
|
|
4893
4893
|
}
|
|
4894
|
-
function ringGeometry(diameter,
|
|
4894
|
+
function ringGeometry(diameter, stroke, value, opts = {}) {
|
|
4895
4895
|
const { ringIndex = 0, ringGap = 0, arcFraction = 1 } = opts;
|
|
4896
4896
|
const center = diameter / 2;
|
|
4897
|
-
const radius = center -
|
|
4897
|
+
const radius = center - stroke / 2 - ringIndex * (stroke + ringGap);
|
|
4898
4898
|
const circumference = 2 * Math.PI * radius;
|
|
4899
4899
|
const arc = circumference * arcFraction;
|
|
4900
4900
|
const filled = Math.max(0, Math.min(100, value)) / 100 * arc;
|
|
@@ -4902,7 +4902,7 @@ function ringGeometry(diameter, stroke2, value, opts = {}) {
|
|
|
4902
4902
|
}
|
|
4903
4903
|
function RingPair({
|
|
4904
4904
|
geo,
|
|
4905
|
-
stroke
|
|
4905
|
+
stroke,
|
|
4906
4906
|
trackClass = "stroke-utility-neutral-100",
|
|
4907
4907
|
progressClass,
|
|
4908
4908
|
progressColor,
|
|
@@ -4918,7 +4918,7 @@ function RingPair({
|
|
|
4918
4918
|
r: radius,
|
|
4919
4919
|
fill: "none",
|
|
4920
4920
|
className: trackClass,
|
|
4921
|
-
strokeWidth:
|
|
4921
|
+
strokeWidth: stroke,
|
|
4922
4922
|
strokeDasharray: `${arc} ${circumference}`
|
|
4923
4923
|
}
|
|
4924
4924
|
),
|
|
@@ -4931,7 +4931,7 @@ function RingPair({
|
|
|
4931
4931
|
fill: "none",
|
|
4932
4932
|
className: clsx_default(!progressColor && progressClass),
|
|
4933
4933
|
stroke: progressColor,
|
|
4934
|
-
strokeWidth:
|
|
4934
|
+
strokeWidth: stroke,
|
|
4935
4935
|
strokeLinecap: linecap,
|
|
4936
4936
|
strokeDasharray: `${filled} ${circumference}`
|
|
4937
4937
|
}
|
|
@@ -4963,10 +4963,10 @@ function ActivityGauge({
|
|
|
4963
4963
|
legend = "none",
|
|
4964
4964
|
className
|
|
4965
4965
|
}) {
|
|
4966
|
-
const { diameter, stroke
|
|
4966
|
+
const { diameter, stroke, gap, valueClass } = sizeSpecs[size];
|
|
4967
4967
|
const center = diameter / 2;
|
|
4968
4968
|
const rings = series.map((s2, i) => {
|
|
4969
|
-
const geo = ringGeometry(diameter,
|
|
4969
|
+
const geo = ringGeometry(diameter, stroke, s2.value, { ringIndex: i, ringGap: gap });
|
|
4970
4970
|
const strokeClass = DEFAULT_STROKE_CLASSES[i % DEFAULT_STROKE_CLASSES.length];
|
|
4971
4971
|
return { radius: geo.radius, circumference: geo.circumference, filled: geo.filled, strokeClass, custom: s2.color };
|
|
4972
4972
|
});
|
|
@@ -4988,7 +4988,7 @@ function ActivityGauge({
|
|
|
4988
4988
|
r: r2.radius,
|
|
4989
4989
|
fill: "none",
|
|
4990
4990
|
className: TRACK_STROKE_CLASS,
|
|
4991
|
-
strokeWidth:
|
|
4991
|
+
strokeWidth: stroke
|
|
4992
4992
|
}
|
|
4993
4993
|
),
|
|
4994
4994
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5000,7 +5000,7 @@ function ActivityGauge({
|
|
|
5000
5000
|
fill: "none",
|
|
5001
5001
|
className: clsx_default(!r2.custom && r2.strokeClass),
|
|
5002
5002
|
stroke: r2.custom,
|
|
5003
|
-
strokeWidth:
|
|
5003
|
+
strokeWidth: stroke,
|
|
5004
5004
|
strokeLinecap: "round",
|
|
5005
5005
|
strokeDasharray: `${r2.filled} ${r2.circumference - r2.filled}`
|
|
5006
5006
|
}
|
|
@@ -16002,15 +16002,15 @@ var getMainColorOfGraphicItem = function getMainColorOfGraphicItem2(item) {
|
|
|
16002
16002
|
var _item$type;
|
|
16003
16003
|
var _ref = item, displayName = _ref.type.displayName;
|
|
16004
16004
|
var defaultedProps = (_item$type = item.type) !== null && _item$type !== void 0 && _item$type.defaultProps ? _objectSpread10(_objectSpread10({}, item.type.defaultProps), item.props) : item.props;
|
|
16005
|
-
var
|
|
16005
|
+
var stroke = defaultedProps.stroke, fill = defaultedProps.fill;
|
|
16006
16006
|
var result;
|
|
16007
16007
|
switch (displayName) {
|
|
16008
16008
|
case "Line":
|
|
16009
|
-
result =
|
|
16009
|
+
result = stroke;
|
|
16010
16010
|
break;
|
|
16011
16011
|
case "Area":
|
|
16012
16012
|
case "Radar":
|
|
16013
|
-
result =
|
|
16013
|
+
result = stroke && stroke !== "none" ? stroke : fill;
|
|
16014
16014
|
break;
|
|
16015
16015
|
default:
|
|
16016
16016
|
result = fill;
|
|
@@ -20520,7 +20520,7 @@ var PolarRadiusAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20520
20520
|
key: "renderTicks",
|
|
20521
20521
|
value: function renderTicks() {
|
|
20522
20522
|
var _this = this;
|
|
20523
|
-
var _this$props4 = this.props, ticks2 = _this$props4.ticks, tick = _this$props4.tick, angle = _this$props4.angle, tickFormatter = _this$props4.tickFormatter,
|
|
20523
|
+
var _this$props4 = this.props, ticks2 = _this$props4.ticks, tick = _this$props4.tick, angle = _this$props4.angle, tickFormatter = _this$props4.tickFormatter, stroke = _this$props4.stroke, others = _objectWithoutProperties14(_this$props4, _excluded24);
|
|
20524
20524
|
var textAnchor = this.getTickTextAnchor();
|
|
20525
20525
|
var axisProps = filterProps(others, false);
|
|
20526
20526
|
var customTickProps = filterProps(tick, false);
|
|
@@ -20531,7 +20531,7 @@ var PolarRadiusAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20531
20531
|
transform: "rotate(".concat(90 - angle, ", ").concat(coord.x, ", ").concat(coord.y, ")")
|
|
20532
20532
|
}, axisProps), {}, {
|
|
20533
20533
|
stroke: "none",
|
|
20534
|
-
fill:
|
|
20534
|
+
fill: stroke
|
|
20535
20535
|
}, customTickProps), {}, {
|
|
20536
20536
|
index: i
|
|
20537
20537
|
}, coord), {}, {
|
|
@@ -20809,7 +20809,7 @@ var PolarAngleAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20809
20809
|
key: "renderTicks",
|
|
20810
20810
|
value: function renderTicks() {
|
|
20811
20811
|
var _this = this;
|
|
20812
|
-
var _this$props3 = this.props, ticks2 = _this$props3.ticks, tick = _this$props3.tick, tickLine = _this$props3.tickLine, tickFormatter = _this$props3.tickFormatter,
|
|
20812
|
+
var _this$props3 = this.props, ticks2 = _this$props3.ticks, tick = _this$props3.tick, tickLine = _this$props3.tickLine, tickFormatter = _this$props3.tickFormatter, stroke = _this$props3.stroke;
|
|
20813
20813
|
var axisProps = filterProps(this.props, false);
|
|
20814
20814
|
var customTickProps = filterProps(tick, false);
|
|
20815
20815
|
var tickLineProps = _objectSpread23(_objectSpread23({}, axisProps), {}, {
|
|
@@ -20822,7 +20822,7 @@ var PolarAngleAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20822
20822
|
textAnchor
|
|
20823
20823
|
}, axisProps), {}, {
|
|
20824
20824
|
stroke: "none",
|
|
20825
|
-
fill:
|
|
20825
|
+
fill: stroke
|
|
20826
20826
|
}, customTickProps), {}, {
|
|
20827
20827
|
index: i,
|
|
20828
20828
|
payload: entry,
|
|
@@ -22756,9 +22756,9 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22756
22756
|
}, {
|
|
22757
22757
|
key: "renderBackground",
|
|
22758
22758
|
value: function renderBackground() {
|
|
22759
|
-
var _this$props6 = this.props, x2 = _this$props6.x, y2 = _this$props6.y, width = _this$props6.width, height = _this$props6.height, fill = _this$props6.fill,
|
|
22759
|
+
var _this$props6 = this.props, x2 = _this$props6.x, y2 = _this$props6.y, width = _this$props6.width, height = _this$props6.height, fill = _this$props6.fill, stroke = _this$props6.stroke;
|
|
22760
22760
|
return /* @__PURE__ */ React28__namespace.default.createElement("rect", {
|
|
22761
|
-
stroke
|
|
22761
|
+
stroke,
|
|
22762
22762
|
fill,
|
|
22763
22763
|
x: x2,
|
|
22764
22764
|
y: y2,
|
|
@@ -22833,7 +22833,7 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22833
22833
|
}, {
|
|
22834
22834
|
key: "renderSlide",
|
|
22835
22835
|
value: function renderSlide(startX, endX) {
|
|
22836
|
-
var _this$props9 = this.props, y2 = _this$props9.y, height = _this$props9.height,
|
|
22836
|
+
var _this$props9 = this.props, y2 = _this$props9.y, height = _this$props9.height, stroke = _this$props9.stroke, travellerWidth = _this$props9.travellerWidth;
|
|
22837
22837
|
var x2 = Math.min(startX, endX) + travellerWidth;
|
|
22838
22838
|
var width = Math.max(Math.abs(endX - startX) - travellerWidth, 0);
|
|
22839
22839
|
return /* @__PURE__ */ React28__namespace.default.createElement("rect", {
|
|
@@ -22846,7 +22846,7 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22846
22846
|
cursor: "move"
|
|
22847
22847
|
},
|
|
22848
22848
|
stroke: "none",
|
|
22849
|
-
fill:
|
|
22849
|
+
fill: stroke,
|
|
22850
22850
|
fillOpacity: 0.2,
|
|
22851
22851
|
x: x2,
|
|
22852
22852
|
y: y2,
|
|
@@ -22857,12 +22857,12 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22857
22857
|
}, {
|
|
22858
22858
|
key: "renderText",
|
|
22859
22859
|
value: function renderText() {
|
|
22860
|
-
var _this$props10 = this.props, startIndex = _this$props10.startIndex, endIndex = _this$props10.endIndex, y2 = _this$props10.y, height = _this$props10.height, travellerWidth = _this$props10.travellerWidth,
|
|
22860
|
+
var _this$props10 = this.props, startIndex = _this$props10.startIndex, endIndex = _this$props10.endIndex, y2 = _this$props10.y, height = _this$props10.height, travellerWidth = _this$props10.travellerWidth, stroke = _this$props10.stroke;
|
|
22861
22861
|
var _this$state4 = this.state, startX = _this$state4.startX, endX = _this$state4.endX;
|
|
22862
22862
|
var offset = 5;
|
|
22863
22863
|
var attrs = {
|
|
22864
22864
|
pointerEvents: "none",
|
|
22865
|
-
fill:
|
|
22865
|
+
fill: stroke
|
|
22866
22866
|
};
|
|
22867
22867
|
return /* @__PURE__ */ React28__namespace.default.createElement(Layer, {
|
|
22868
22868
|
className: "recharts-brush-texts"
|
|
@@ -22899,14 +22899,14 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22899
22899
|
}], [{
|
|
22900
22900
|
key: "renderDefaultTraveller",
|
|
22901
22901
|
value: function renderDefaultTraveller(props) {
|
|
22902
|
-
var x2 = props.x, y2 = props.y, width = props.width, height = props.height,
|
|
22902
|
+
var x2 = props.x, y2 = props.y, width = props.width, height = props.height, stroke = props.stroke;
|
|
22903
22903
|
var lineY = Math.floor(y2 + height / 2) - 1;
|
|
22904
22904
|
return /* @__PURE__ */ React28__namespace.default.createElement(React28__namespace.default.Fragment, null, /* @__PURE__ */ React28__namespace.default.createElement("rect", {
|
|
22905
22905
|
x: x2,
|
|
22906
22906
|
y: y2,
|
|
22907
22907
|
width,
|
|
22908
22908
|
height,
|
|
22909
|
-
fill:
|
|
22909
|
+
fill: stroke,
|
|
22910
22910
|
stroke: "none"
|
|
22911
22911
|
}), /* @__PURE__ */ React28__namespace.default.createElement("line", {
|
|
22912
22912
|
x1: x2 + 1,
|
|
@@ -25421,7 +25421,7 @@ var CartesianAxis = /* @__PURE__ */ (function(_Component) {
|
|
|
25421
25421
|
*/
|
|
25422
25422
|
function renderTicks(ticks2, fontSize, letterSpacing) {
|
|
25423
25423
|
var _this2 = this;
|
|
25424
|
-
var _this$props6 = this.props, tickLine = _this$props6.tickLine,
|
|
25424
|
+
var _this$props6 = this.props, tickLine = _this$props6.tickLine, stroke = _this$props6.stroke, tick = _this$props6.tick, tickFormatter = _this$props6.tickFormatter, unit2 = _this$props6.unit;
|
|
25425
25425
|
var finalTicks = getTicks(_objectSpread37(_objectSpread37({}, this.props), {}, {
|
|
25426
25426
|
ticks: ticks2
|
|
25427
25427
|
}), fontSize, letterSpacing);
|
|
@@ -25439,7 +25439,7 @@ var CartesianAxis = /* @__PURE__ */ (function(_Component) {
|
|
|
25439
25439
|
verticalAnchor
|
|
25440
25440
|
}, axisProps), {}, {
|
|
25441
25441
|
stroke: "none",
|
|
25442
|
-
fill:
|
|
25442
|
+
fill: stroke
|
|
25443
25443
|
}, customTickProps), tickCoord), {}, {
|
|
25444
25444
|
index: i,
|
|
25445
25445
|
payload: entry,
|
|
@@ -29131,13 +29131,13 @@ function ChartMini({
|
|
|
29131
29131
|
className,
|
|
29132
29132
|
style
|
|
29133
29133
|
}) {
|
|
29134
|
-
const
|
|
29134
|
+
const stroke = resolveColor(color2, trend);
|
|
29135
29135
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { width, height, ...style }, children: /* @__PURE__ */ jsxRuntime.jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsxRuntime.jsx(LineChart, { data, margin: { top: 4, right: 4, bottom: 4, left: 4 }, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29136
29136
|
Line2,
|
|
29137
29137
|
{
|
|
29138
29138
|
type: "monotone",
|
|
29139
29139
|
dataKey: "value",
|
|
29140
|
-
stroke
|
|
29140
|
+
stroke,
|
|
29141
29141
|
strokeWidth: 2,
|
|
29142
29142
|
dot: false,
|
|
29143
29143
|
isAnimationActive: false
|
|
@@ -31422,8 +31422,8 @@ function LoadingIndicator({
|
|
|
31422
31422
|
if (variant === "dot-circle") {
|
|
31423
31423
|
spinner = /* @__PURE__ */ jsxRuntime.jsx(DotCircle, { px });
|
|
31424
31424
|
} else {
|
|
31425
|
-
const
|
|
31426
|
-
const r2 = (px -
|
|
31425
|
+
const stroke = borderPx[size];
|
|
31426
|
+
const r2 = (px - stroke) / 2;
|
|
31427
31427
|
const c2 = 2 * Math.PI * r2;
|
|
31428
31428
|
spinner = /* @__PURE__ */ jsxRuntime.jsxs(
|
|
31429
31429
|
"svg",
|
|
@@ -31441,7 +31441,7 @@ function LoadingIndicator({
|
|
|
31441
31441
|
r: r2,
|
|
31442
31442
|
fill: "none",
|
|
31443
31443
|
className: "stroke-bg-quaternary",
|
|
31444
|
-
strokeWidth:
|
|
31444
|
+
strokeWidth: stroke
|
|
31445
31445
|
}
|
|
31446
31446
|
),
|
|
31447
31447
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -31452,7 +31452,7 @@ function LoadingIndicator({
|
|
|
31452
31452
|
r: r2,
|
|
31453
31453
|
fill: "none",
|
|
31454
31454
|
className: "stroke-fg-brand-primary",
|
|
31455
|
-
strokeWidth:
|
|
31455
|
+
strokeWidth: stroke,
|
|
31456
31456
|
strokeDasharray: c2,
|
|
31457
31457
|
strokeDashoffset: c2 * 0.75,
|
|
31458
31458
|
strokeLinecap: variant === "line-spinner" ? "round" : "butt"
|
|
@@ -32984,22 +32984,22 @@ function ProgressCircle({
|
|
|
32984
32984
|
size = "xxs",
|
|
32985
32985
|
className
|
|
32986
32986
|
}) {
|
|
32987
|
-
const { d, stroke
|
|
32987
|
+
const { d, stroke, valueClass, labelClass } = SPECS[size];
|
|
32988
32988
|
const isHalf = shape === "half";
|
|
32989
|
-
const geo = ringGeometry(d,
|
|
32989
|
+
const geo = ringGeometry(d, stroke, value, { arcFraction: isHalf ? 0.5 : 1 });
|
|
32990
32990
|
const center = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center text-center", children: [
|
|
32991
32991
|
label && /* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("font-medium text-text-tertiary", labelClass), children: label }),
|
|
32992
32992
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: clsx_default("font-display font-semibold text-text-primary", valueClass), children: valueText ?? `${value}%` })
|
|
32993
32993
|
] });
|
|
32994
32994
|
if (isHalf) {
|
|
32995
|
-
const h = geo.center +
|
|
32995
|
+
const h = geo.center + stroke;
|
|
32996
32996
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("relative", className), style: { width: d, height: h }, children: [
|
|
32997
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "absolute left-0 top-0", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsxRuntime.jsx("g", { transform: `rotate(180 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsxRuntime.jsx(RingPair, { geo, stroke
|
|
32997
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "absolute left-0 top-0", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsxRuntime.jsx("g", { transform: `rotate(180 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsxRuntime.jsx(RingPair, { geo, stroke, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
|
|
32998
32998
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute bottom-0 left-1/2 -translate-x-1/2", children: center })
|
|
32999
32999
|
] });
|
|
33000
33000
|
}
|
|
33001
33001
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: clsx_default("relative", className), style: { width: d, height: d }, children: [
|
|
33002
|
-
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "block", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsxRuntime.jsx("g", { transform: `rotate(-90 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsxRuntime.jsx(RingPair, { geo, stroke
|
|
33002
|
+
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "block", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsxRuntime.jsx("g", { transform: `rotate(-90 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsxRuntime.jsx(RingPair, { geo, stroke, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
|
|
33003
33003
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: center })
|
|
33004
33004
|
] });
|
|
33005
33005
|
}
|
|
@@ -33999,19 +33999,6 @@ function useTextEditor({
|
|
|
33999
33999
|
onUpdate: ({ editor }) => onUpdate?.(editor.getHTML())
|
|
34000
34000
|
});
|
|
34001
34001
|
}
|
|
34002
|
-
var stroke = {
|
|
34003
|
-
fill: "none",
|
|
34004
|
-
stroke: "currentColor",
|
|
34005
|
-
strokeWidth: 2,
|
|
34006
|
-
strokeLinecap: "round",
|
|
34007
|
-
strokeLinejoin: "round"
|
|
34008
|
-
};
|
|
34009
|
-
var ItalicIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M19 4h-9M14 20H5M15 4 9 20" }) });
|
|
34010
|
-
var UnderlineIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 4v6a6 6 0 0 0 12 0V4M4 21h16" }) });
|
|
34011
|
-
var StrikeIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M4 12h16M16 7.5A4 3 0 0 0 8 8M8 16.5a4 3 0 0 0 8-.5" }) });
|
|
34012
|
-
var HeadingIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M6 4v16M18 4v16M6 12h12" }) });
|
|
34013
|
-
var BulletListIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01" }) });
|
|
34014
|
-
var OrderedListIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 6h10M10 12h10M10 18h10M4 4v4M3 14h2l-2 3h2" }) });
|
|
34015
34002
|
var proseClass = clsx_default(
|
|
34016
34003
|
"font-body text-sm text-text-primary",
|
|
34017
34004
|
"[&_.ProseMirror]:min-h-[80px] [&_.ProseMirror]:outline-none",
|
|
@@ -34078,13 +34065,13 @@ function TextEditor({
|
|
|
34078
34065
|
children: [
|
|
34079
34066
|
/* @__PURE__ */ jsxRuntime.jsxs(TextEditorToolbar, { className: "w-full !rounded-none !border-l-0 !border-r-0 !border-t-0 !shadow-none", children: [
|
|
34080
34067
|
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Bold", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Bold01, {}), active: isActive("bold"), onRun: () => editor?.chain().focus().toggleBold().run() }),
|
|
34081
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Italic", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34082
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Underline", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34083
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Strikethrough", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34068
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Italic", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Italic01, {}), active: isActive("italic"), onRun: () => editor?.chain().focus().toggleItalic().run() }),
|
|
34069
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Underline", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Underline01, {}), active: isActive("underline"), onRun: () => editor?.chain().focus().toggleUnderline().run() }),
|
|
34070
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Strikethrough", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Strikethrough01, {}), active: isActive("strike"), onRun: () => editor?.chain().focus().toggleStrike().run() }),
|
|
34084
34071
|
/* @__PURE__ */ jsxRuntime.jsx(TextEditorToolbarDivider, {}),
|
|
34085
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Heading", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34086
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Bullet list", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34087
|
-
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Ordered list", icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
34072
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Heading", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Heading01, {}), active: isActive("heading", { level: 2 }), onRun: () => editor?.chain().focus().toggleHeading({ level: 2 }).run() }),
|
|
34073
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Bullet list", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.List, {}), active: isActive("bulletList"), onRun: () => editor?.chain().focus().toggleBulletList().run() }),
|
|
34074
|
+
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Ordered list", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.Dotpoints01, {}), active: isActive("orderedList"), onRun: () => editor?.chain().focus().toggleOrderedList().run() }),
|
|
34088
34075
|
/* @__PURE__ */ jsxRuntime.jsx(TextEditorToolbarDivider, {}),
|
|
34089
34076
|
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Align left", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.AlignLeft, {}), active: editor?.isActive({ textAlign: "left" }) ?? false, onRun: () => editor?.chain().focus().setTextAlign("left").run() }),
|
|
34090
34077
|
/* @__PURE__ */ jsxRuntime.jsx(ToolbarButton, { label: "Align center", icon: /* @__PURE__ */ jsxRuntime.jsx(bvDsIcons.AlignCenter, {}), active: editor?.isActive({ textAlign: "center" }) ?? false, onRun: () => editor?.chain().focus().setTextAlign("center").run() }),
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
|
4
4
|
import { dateFnsLocalizer, Calendar as Calendar$1 } from 'react-big-calendar';
|
|
5
5
|
import { getDay, parse, format, startOfWeek, isSameDay } from 'date-fns';
|
|
6
6
|
import { enUS } from 'date-fns/locale';
|
|
7
|
-
import { Plus, ChevronDown, LogOut01, ChevronSelectorVertical, XClose as XClose$1, Menu02, Bold01, AlignLeft, AlignCenter, AlignRight, Link01, ArrowLeft, ArrowRight } from '@borisj74/bv-ds-icons';
|
|
7
|
+
import { Plus, ChevronDown, LogOut01, ChevronSelectorVertical, XClose as XClose$1, Menu02, Bold01, Italic01, Underline01, Strikethrough01, Heading01, List, Dotpoints01, AlignLeft, AlignCenter, AlignRight, Link01, ArrowLeft, ArrowRight } from '@borisj74/bv-ds-icons';
|
|
8
8
|
import { useEditor, EditorContent } from '@tiptap/react';
|
|
9
9
|
import { StarterKit } from '@tiptap/starter-kit';
|
|
10
10
|
import { TextAlign } from '@tiptap/extension-text-align';
|
|
@@ -4870,10 +4870,10 @@ function ActivityFeed({
|
|
|
4870
4870
|
}
|
|
4871
4871
|
);
|
|
4872
4872
|
}
|
|
4873
|
-
function ringGeometry(diameter,
|
|
4873
|
+
function ringGeometry(diameter, stroke, value, opts = {}) {
|
|
4874
4874
|
const { ringIndex = 0, ringGap = 0, arcFraction = 1 } = opts;
|
|
4875
4875
|
const center = diameter / 2;
|
|
4876
|
-
const radius = center -
|
|
4876
|
+
const radius = center - stroke / 2 - ringIndex * (stroke + ringGap);
|
|
4877
4877
|
const circumference = 2 * Math.PI * radius;
|
|
4878
4878
|
const arc = circumference * arcFraction;
|
|
4879
4879
|
const filled = Math.max(0, Math.min(100, value)) / 100 * arc;
|
|
@@ -4881,7 +4881,7 @@ function ringGeometry(diameter, stroke2, value, opts = {}) {
|
|
|
4881
4881
|
}
|
|
4882
4882
|
function RingPair({
|
|
4883
4883
|
geo,
|
|
4884
|
-
stroke
|
|
4884
|
+
stroke,
|
|
4885
4885
|
trackClass = "stroke-utility-neutral-100",
|
|
4886
4886
|
progressClass,
|
|
4887
4887
|
progressColor,
|
|
@@ -4897,7 +4897,7 @@ function RingPair({
|
|
|
4897
4897
|
r: radius,
|
|
4898
4898
|
fill: "none",
|
|
4899
4899
|
className: trackClass,
|
|
4900
|
-
strokeWidth:
|
|
4900
|
+
strokeWidth: stroke,
|
|
4901
4901
|
strokeDasharray: `${arc} ${circumference}`
|
|
4902
4902
|
}
|
|
4903
4903
|
),
|
|
@@ -4910,7 +4910,7 @@ function RingPair({
|
|
|
4910
4910
|
fill: "none",
|
|
4911
4911
|
className: clsx_default(!progressColor && progressClass),
|
|
4912
4912
|
stroke: progressColor,
|
|
4913
|
-
strokeWidth:
|
|
4913
|
+
strokeWidth: stroke,
|
|
4914
4914
|
strokeLinecap: linecap,
|
|
4915
4915
|
strokeDasharray: `${filled} ${circumference}`
|
|
4916
4916
|
}
|
|
@@ -4942,10 +4942,10 @@ function ActivityGauge({
|
|
|
4942
4942
|
legend = "none",
|
|
4943
4943
|
className
|
|
4944
4944
|
}) {
|
|
4945
|
-
const { diameter, stroke
|
|
4945
|
+
const { diameter, stroke, gap, valueClass } = sizeSpecs[size];
|
|
4946
4946
|
const center = diameter / 2;
|
|
4947
4947
|
const rings = series.map((s2, i) => {
|
|
4948
|
-
const geo = ringGeometry(diameter,
|
|
4948
|
+
const geo = ringGeometry(diameter, stroke, s2.value, { ringIndex: i, ringGap: gap });
|
|
4949
4949
|
const strokeClass = DEFAULT_STROKE_CLASSES[i % DEFAULT_STROKE_CLASSES.length];
|
|
4950
4950
|
return { radius: geo.radius, circumference: geo.circumference, filled: geo.filled, strokeClass, custom: s2.color };
|
|
4951
4951
|
});
|
|
@@ -4967,7 +4967,7 @@ function ActivityGauge({
|
|
|
4967
4967
|
r: r2.radius,
|
|
4968
4968
|
fill: "none",
|
|
4969
4969
|
className: TRACK_STROKE_CLASS,
|
|
4970
|
-
strokeWidth:
|
|
4970
|
+
strokeWidth: stroke
|
|
4971
4971
|
}
|
|
4972
4972
|
),
|
|
4973
4973
|
/* @__PURE__ */ jsx(
|
|
@@ -4979,7 +4979,7 @@ function ActivityGauge({
|
|
|
4979
4979
|
fill: "none",
|
|
4980
4980
|
className: clsx_default(!r2.custom && r2.strokeClass),
|
|
4981
4981
|
stroke: r2.custom,
|
|
4982
|
-
strokeWidth:
|
|
4982
|
+
strokeWidth: stroke,
|
|
4983
4983
|
strokeLinecap: "round",
|
|
4984
4984
|
strokeDasharray: `${r2.filled} ${r2.circumference - r2.filled}`
|
|
4985
4985
|
}
|
|
@@ -15981,15 +15981,15 @@ var getMainColorOfGraphicItem = function getMainColorOfGraphicItem2(item) {
|
|
|
15981
15981
|
var _item$type;
|
|
15982
15982
|
var _ref = item, displayName = _ref.type.displayName;
|
|
15983
15983
|
var defaultedProps = (_item$type = item.type) !== null && _item$type !== void 0 && _item$type.defaultProps ? _objectSpread10(_objectSpread10({}, item.type.defaultProps), item.props) : item.props;
|
|
15984
|
-
var
|
|
15984
|
+
var stroke = defaultedProps.stroke, fill = defaultedProps.fill;
|
|
15985
15985
|
var result;
|
|
15986
15986
|
switch (displayName) {
|
|
15987
15987
|
case "Line":
|
|
15988
|
-
result =
|
|
15988
|
+
result = stroke;
|
|
15989
15989
|
break;
|
|
15990
15990
|
case "Area":
|
|
15991
15991
|
case "Radar":
|
|
15992
|
-
result =
|
|
15992
|
+
result = stroke && stroke !== "none" ? stroke : fill;
|
|
15993
15993
|
break;
|
|
15994
15994
|
default:
|
|
15995
15995
|
result = fill;
|
|
@@ -20499,7 +20499,7 @@ var PolarRadiusAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20499
20499
|
key: "renderTicks",
|
|
20500
20500
|
value: function renderTicks() {
|
|
20501
20501
|
var _this = this;
|
|
20502
|
-
var _this$props4 = this.props, ticks2 = _this$props4.ticks, tick = _this$props4.tick, angle = _this$props4.angle, tickFormatter = _this$props4.tickFormatter,
|
|
20502
|
+
var _this$props4 = this.props, ticks2 = _this$props4.ticks, tick = _this$props4.tick, angle = _this$props4.angle, tickFormatter = _this$props4.tickFormatter, stroke = _this$props4.stroke, others = _objectWithoutProperties14(_this$props4, _excluded24);
|
|
20503
20503
|
var textAnchor = this.getTickTextAnchor();
|
|
20504
20504
|
var axisProps = filterProps(others, false);
|
|
20505
20505
|
var customTickProps = filterProps(tick, false);
|
|
@@ -20510,7 +20510,7 @@ var PolarRadiusAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20510
20510
|
transform: "rotate(".concat(90 - angle, ", ").concat(coord.x, ", ").concat(coord.y, ")")
|
|
20511
20511
|
}, axisProps), {}, {
|
|
20512
20512
|
stroke: "none",
|
|
20513
|
-
fill:
|
|
20513
|
+
fill: stroke
|
|
20514
20514
|
}, customTickProps), {}, {
|
|
20515
20515
|
index: i
|
|
20516
20516
|
}, coord), {}, {
|
|
@@ -20788,7 +20788,7 @@ var PolarAngleAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20788
20788
|
key: "renderTicks",
|
|
20789
20789
|
value: function renderTicks() {
|
|
20790
20790
|
var _this = this;
|
|
20791
|
-
var _this$props3 = this.props, ticks2 = _this$props3.ticks, tick = _this$props3.tick, tickLine = _this$props3.tickLine, tickFormatter = _this$props3.tickFormatter,
|
|
20791
|
+
var _this$props3 = this.props, ticks2 = _this$props3.ticks, tick = _this$props3.tick, tickLine = _this$props3.tickLine, tickFormatter = _this$props3.tickFormatter, stroke = _this$props3.stroke;
|
|
20792
20792
|
var axisProps = filterProps(this.props, false);
|
|
20793
20793
|
var customTickProps = filterProps(tick, false);
|
|
20794
20794
|
var tickLineProps = _objectSpread23(_objectSpread23({}, axisProps), {}, {
|
|
@@ -20801,7 +20801,7 @@ var PolarAngleAxis = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
20801
20801
|
textAnchor
|
|
20802
20802
|
}, axisProps), {}, {
|
|
20803
20803
|
stroke: "none",
|
|
20804
|
-
fill:
|
|
20804
|
+
fill: stroke
|
|
20805
20805
|
}, customTickProps), {}, {
|
|
20806
20806
|
index: i,
|
|
20807
20807
|
payload: entry,
|
|
@@ -22735,9 +22735,9 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22735
22735
|
}, {
|
|
22736
22736
|
key: "renderBackground",
|
|
22737
22737
|
value: function renderBackground() {
|
|
22738
|
-
var _this$props6 = this.props, x2 = _this$props6.x, y2 = _this$props6.y, width = _this$props6.width, height = _this$props6.height, fill = _this$props6.fill,
|
|
22738
|
+
var _this$props6 = this.props, x2 = _this$props6.x, y2 = _this$props6.y, width = _this$props6.width, height = _this$props6.height, fill = _this$props6.fill, stroke = _this$props6.stroke;
|
|
22739
22739
|
return /* @__PURE__ */ React28__default.createElement("rect", {
|
|
22740
|
-
stroke
|
|
22740
|
+
stroke,
|
|
22741
22741
|
fill,
|
|
22742
22742
|
x: x2,
|
|
22743
22743
|
y: y2,
|
|
@@ -22812,7 +22812,7 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22812
22812
|
}, {
|
|
22813
22813
|
key: "renderSlide",
|
|
22814
22814
|
value: function renderSlide(startX, endX) {
|
|
22815
|
-
var _this$props9 = this.props, y2 = _this$props9.y, height = _this$props9.height,
|
|
22815
|
+
var _this$props9 = this.props, y2 = _this$props9.y, height = _this$props9.height, stroke = _this$props9.stroke, travellerWidth = _this$props9.travellerWidth;
|
|
22816
22816
|
var x2 = Math.min(startX, endX) + travellerWidth;
|
|
22817
22817
|
var width = Math.max(Math.abs(endX - startX) - travellerWidth, 0);
|
|
22818
22818
|
return /* @__PURE__ */ React28__default.createElement("rect", {
|
|
@@ -22825,7 +22825,7 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22825
22825
|
cursor: "move"
|
|
22826
22826
|
},
|
|
22827
22827
|
stroke: "none",
|
|
22828
|
-
fill:
|
|
22828
|
+
fill: stroke,
|
|
22829
22829
|
fillOpacity: 0.2,
|
|
22830
22830
|
x: x2,
|
|
22831
22831
|
y: y2,
|
|
@@ -22836,12 +22836,12 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22836
22836
|
}, {
|
|
22837
22837
|
key: "renderText",
|
|
22838
22838
|
value: function renderText() {
|
|
22839
|
-
var _this$props10 = this.props, startIndex = _this$props10.startIndex, endIndex = _this$props10.endIndex, y2 = _this$props10.y, height = _this$props10.height, travellerWidth = _this$props10.travellerWidth,
|
|
22839
|
+
var _this$props10 = this.props, startIndex = _this$props10.startIndex, endIndex = _this$props10.endIndex, y2 = _this$props10.y, height = _this$props10.height, travellerWidth = _this$props10.travellerWidth, stroke = _this$props10.stroke;
|
|
22840
22840
|
var _this$state4 = this.state, startX = _this$state4.startX, endX = _this$state4.endX;
|
|
22841
22841
|
var offset = 5;
|
|
22842
22842
|
var attrs = {
|
|
22843
22843
|
pointerEvents: "none",
|
|
22844
|
-
fill:
|
|
22844
|
+
fill: stroke
|
|
22845
22845
|
};
|
|
22846
22846
|
return /* @__PURE__ */ React28__default.createElement(Layer, {
|
|
22847
22847
|
className: "recharts-brush-texts"
|
|
@@ -22878,14 +22878,14 @@ var Brush = /* @__PURE__ */ (function(_PureComponent) {
|
|
|
22878
22878
|
}], [{
|
|
22879
22879
|
key: "renderDefaultTraveller",
|
|
22880
22880
|
value: function renderDefaultTraveller(props) {
|
|
22881
|
-
var x2 = props.x, y2 = props.y, width = props.width, height = props.height,
|
|
22881
|
+
var x2 = props.x, y2 = props.y, width = props.width, height = props.height, stroke = props.stroke;
|
|
22882
22882
|
var lineY = Math.floor(y2 + height / 2) - 1;
|
|
22883
22883
|
return /* @__PURE__ */ React28__default.createElement(React28__default.Fragment, null, /* @__PURE__ */ React28__default.createElement("rect", {
|
|
22884
22884
|
x: x2,
|
|
22885
22885
|
y: y2,
|
|
22886
22886
|
width,
|
|
22887
22887
|
height,
|
|
22888
|
-
fill:
|
|
22888
|
+
fill: stroke,
|
|
22889
22889
|
stroke: "none"
|
|
22890
22890
|
}), /* @__PURE__ */ React28__default.createElement("line", {
|
|
22891
22891
|
x1: x2 + 1,
|
|
@@ -25400,7 +25400,7 @@ var CartesianAxis = /* @__PURE__ */ (function(_Component) {
|
|
|
25400
25400
|
*/
|
|
25401
25401
|
function renderTicks(ticks2, fontSize, letterSpacing) {
|
|
25402
25402
|
var _this2 = this;
|
|
25403
|
-
var _this$props6 = this.props, tickLine = _this$props6.tickLine,
|
|
25403
|
+
var _this$props6 = this.props, tickLine = _this$props6.tickLine, stroke = _this$props6.stroke, tick = _this$props6.tick, tickFormatter = _this$props6.tickFormatter, unit2 = _this$props6.unit;
|
|
25404
25404
|
var finalTicks = getTicks(_objectSpread37(_objectSpread37({}, this.props), {}, {
|
|
25405
25405
|
ticks: ticks2
|
|
25406
25406
|
}), fontSize, letterSpacing);
|
|
@@ -25418,7 +25418,7 @@ var CartesianAxis = /* @__PURE__ */ (function(_Component) {
|
|
|
25418
25418
|
verticalAnchor
|
|
25419
25419
|
}, axisProps), {}, {
|
|
25420
25420
|
stroke: "none",
|
|
25421
|
-
fill:
|
|
25421
|
+
fill: stroke
|
|
25422
25422
|
}, customTickProps), tickCoord), {}, {
|
|
25423
25423
|
index: i,
|
|
25424
25424
|
payload: entry,
|
|
@@ -29110,13 +29110,13 @@ function ChartMini({
|
|
|
29110
29110
|
className,
|
|
29111
29111
|
style
|
|
29112
29112
|
}) {
|
|
29113
|
-
const
|
|
29113
|
+
const stroke = resolveColor(color2, trend);
|
|
29114
29114
|
return /* @__PURE__ */ jsx("div", { className, style: { width, height, ...style }, children: /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height: "100%", children: /* @__PURE__ */ jsx(LineChart, { data, margin: { top: 4, right: 4, bottom: 4, left: 4 }, children: /* @__PURE__ */ jsx(
|
|
29115
29115
|
Line2,
|
|
29116
29116
|
{
|
|
29117
29117
|
type: "monotone",
|
|
29118
29118
|
dataKey: "value",
|
|
29119
|
-
stroke
|
|
29119
|
+
stroke,
|
|
29120
29120
|
strokeWidth: 2,
|
|
29121
29121
|
dot: false,
|
|
29122
29122
|
isAnimationActive: false
|
|
@@ -31401,8 +31401,8 @@ function LoadingIndicator({
|
|
|
31401
31401
|
if (variant === "dot-circle") {
|
|
31402
31402
|
spinner = /* @__PURE__ */ jsx(DotCircle, { px });
|
|
31403
31403
|
} else {
|
|
31404
|
-
const
|
|
31405
|
-
const r2 = (px -
|
|
31404
|
+
const stroke = borderPx[size];
|
|
31405
|
+
const r2 = (px - stroke) / 2;
|
|
31406
31406
|
const c2 = 2 * Math.PI * r2;
|
|
31407
31407
|
spinner = /* @__PURE__ */ jsxs(
|
|
31408
31408
|
"svg",
|
|
@@ -31420,7 +31420,7 @@ function LoadingIndicator({
|
|
|
31420
31420
|
r: r2,
|
|
31421
31421
|
fill: "none",
|
|
31422
31422
|
className: "stroke-bg-quaternary",
|
|
31423
|
-
strokeWidth:
|
|
31423
|
+
strokeWidth: stroke
|
|
31424
31424
|
}
|
|
31425
31425
|
),
|
|
31426
31426
|
/* @__PURE__ */ jsx(
|
|
@@ -31431,7 +31431,7 @@ function LoadingIndicator({
|
|
|
31431
31431
|
r: r2,
|
|
31432
31432
|
fill: "none",
|
|
31433
31433
|
className: "stroke-fg-brand-primary",
|
|
31434
|
-
strokeWidth:
|
|
31434
|
+
strokeWidth: stroke,
|
|
31435
31435
|
strokeDasharray: c2,
|
|
31436
31436
|
strokeDashoffset: c2 * 0.75,
|
|
31437
31437
|
strokeLinecap: variant === "line-spinner" ? "round" : "butt"
|
|
@@ -32963,22 +32963,22 @@ function ProgressCircle({
|
|
|
32963
32963
|
size = "xxs",
|
|
32964
32964
|
className
|
|
32965
32965
|
}) {
|
|
32966
|
-
const { d, stroke
|
|
32966
|
+
const { d, stroke, valueClass, labelClass } = SPECS[size];
|
|
32967
32967
|
const isHalf = shape === "half";
|
|
32968
|
-
const geo = ringGeometry(d,
|
|
32968
|
+
const geo = ringGeometry(d, stroke, value, { arcFraction: isHalf ? 0.5 : 1 });
|
|
32969
32969
|
const center = /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center text-center", children: [
|
|
32970
32970
|
label && /* @__PURE__ */ jsx("span", { className: clsx_default("font-medium text-text-tertiary", labelClass), children: label }),
|
|
32971
32971
|
/* @__PURE__ */ jsx("span", { className: clsx_default("font-display font-semibold text-text-primary", valueClass), children: valueText ?? `${value}%` })
|
|
32972
32972
|
] });
|
|
32973
32973
|
if (isHalf) {
|
|
32974
|
-
const h = geo.center +
|
|
32974
|
+
const h = geo.center + stroke;
|
|
32975
32975
|
return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative", className), style: { width: d, height: h }, children: [
|
|
32976
|
-
/* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "absolute left-0 top-0", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(180 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke
|
|
32976
|
+
/* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "absolute left-0 top-0", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(180 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
|
|
32977
32977
|
/* @__PURE__ */ jsx("div", { className: "absolute bottom-0 left-1/2 -translate-x-1/2", children: center })
|
|
32978
32978
|
] });
|
|
32979
32979
|
}
|
|
32980
32980
|
return /* @__PURE__ */ jsxs("div", { className: clsx_default("relative", className), style: { width: d, height: d }, children: [
|
|
32981
|
-
/* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "block", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(-90 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke
|
|
32981
|
+
/* @__PURE__ */ jsx("svg", { width: d, height: d, viewBox: `0 0 ${d} ${d}`, className: "block", role: "img", "aria-label": `${value}%`, children: /* @__PURE__ */ jsx("g", { transform: `rotate(-90 ${geo.center} ${geo.center})`, children: /* @__PURE__ */ jsx(RingPair, { geo, stroke, trackClass: "stroke-bg-quaternary", progressClass: "stroke-fg-brand-primary" }) }) }),
|
|
32982
32982
|
/* @__PURE__ */ jsx("div", { className: "absolute inset-0 flex items-center justify-center", children: center })
|
|
32983
32983
|
] });
|
|
32984
32984
|
}
|
|
@@ -33978,19 +33978,6 @@ function useTextEditor({
|
|
|
33978
33978
|
onUpdate: ({ editor }) => onUpdate?.(editor.getHTML())
|
|
33979
33979
|
});
|
|
33980
33980
|
}
|
|
33981
|
-
var stroke = {
|
|
33982
|
-
fill: "none",
|
|
33983
|
-
stroke: "currentColor",
|
|
33984
|
-
strokeWidth: 2,
|
|
33985
|
-
strokeLinecap: "round",
|
|
33986
|
-
strokeLinejoin: "round"
|
|
33987
|
-
};
|
|
33988
|
-
var ItalicIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M19 4h-9M14 20H5M15 4 9 20" }) });
|
|
33989
|
-
var UnderlineIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M6 4v6a6 6 0 0 0 12 0V4M4 21h16" }) });
|
|
33990
|
-
var StrikeIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M4 12h16M16 7.5A4 3 0 0 0 8 8M8 16.5a4 3 0 0 0 8-.5" }) });
|
|
33991
|
-
var HeadingIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M6 4v16M18 4v16M6 12h12" }) });
|
|
33992
|
-
var BulletListIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01" }) });
|
|
33993
|
-
var OrderedListIcon = () => /* @__PURE__ */ jsx("svg", { viewBox: "0 0 24 24", ...stroke, children: /* @__PURE__ */ jsx("path", { d: "M10 6h10M10 12h10M10 18h10M4 4v4M3 14h2l-2 3h2" }) });
|
|
33994
33981
|
var proseClass = clsx_default(
|
|
33995
33982
|
"font-body text-sm text-text-primary",
|
|
33996
33983
|
"[&_.ProseMirror]:min-h-[80px] [&_.ProseMirror]:outline-none",
|
|
@@ -34057,13 +34044,13 @@ function TextEditor({
|
|
|
34057
34044
|
children: [
|
|
34058
34045
|
/* @__PURE__ */ jsxs(TextEditorToolbar, { className: "w-full !rounded-none !border-l-0 !border-r-0 !border-t-0 !shadow-none", children: [
|
|
34059
34046
|
/* @__PURE__ */ jsx(ToolbarButton, { label: "Bold", icon: /* @__PURE__ */ jsx(Bold01, {}), active: isActive("bold"), onRun: () => editor?.chain().focus().toggleBold().run() }),
|
|
34060
|
-
/* @__PURE__ */ jsx(ToolbarButton, { label: "Italic", icon: /* @__PURE__ */ jsx(
|
|
34061
|
-
/* @__PURE__ */ jsx(ToolbarButton, { label: "Underline", icon: /* @__PURE__ */ jsx(
|
|
34062
|
-
/* @__PURE__ */ jsx(ToolbarButton, { label: "Strikethrough", icon: /* @__PURE__ */ jsx(
|
|
34047
|
+
/* @__PURE__ */ jsx(ToolbarButton, { label: "Italic", icon: /* @__PURE__ */ jsx(Italic01, {}), active: isActive("italic"), onRun: () => editor?.chain().focus().toggleItalic().run() }),
|
|
34048
|
+
/* @__PURE__ */ jsx(ToolbarButton, { label: "Underline", icon: /* @__PURE__ */ jsx(Underline01, {}), active: isActive("underline"), onRun: () => editor?.chain().focus().toggleUnderline().run() }),
|
|
34049
|
+
/* @__PURE__ */ jsx(ToolbarButton, { label: "Strikethrough", icon: /* @__PURE__ */ jsx(Strikethrough01, {}), active: isActive("strike"), onRun: () => editor?.chain().focus().toggleStrike().run() }),
|
|
34063
34050
|
/* @__PURE__ */ jsx(TextEditorToolbarDivider, {}),
|
|
34064
|
-
/* @__PURE__ */ jsx(ToolbarButton, { label: "Heading", icon: /* @__PURE__ */ jsx(
|
|
34065
|
-
/* @__PURE__ */ jsx(ToolbarButton, { label: "Bullet list", icon: /* @__PURE__ */ jsx(
|
|
34066
|
-
/* @__PURE__ */ jsx(ToolbarButton, { label: "Ordered list", icon: /* @__PURE__ */ jsx(
|
|
34051
|
+
/* @__PURE__ */ jsx(ToolbarButton, { label: "Heading", icon: /* @__PURE__ */ jsx(Heading01, {}), active: isActive("heading", { level: 2 }), onRun: () => editor?.chain().focus().toggleHeading({ level: 2 }).run() }),
|
|
34052
|
+
/* @__PURE__ */ jsx(ToolbarButton, { label: "Bullet list", icon: /* @__PURE__ */ jsx(List, {}), active: isActive("bulletList"), onRun: () => editor?.chain().focus().toggleBulletList().run() }),
|
|
34053
|
+
/* @__PURE__ */ jsx(ToolbarButton, { label: "Ordered list", icon: /* @__PURE__ */ jsx(Dotpoints01, {}), active: isActive("orderedList"), onRun: () => editor?.chain().focus().toggleOrderedList().run() }),
|
|
34067
34054
|
/* @__PURE__ */ jsx(TextEditorToolbarDivider, {}),
|
|
34068
34055
|
/* @__PURE__ */ jsx(ToolbarButton, { label: "Align left", icon: /* @__PURE__ */ jsx(AlignLeft, {}), active: editor?.isActive({ textAlign: "left" }) ?? false, onRun: () => editor?.chain().focus().setTextAlign("left").run() }),
|
|
34069
34056
|
/* @__PURE__ */ jsx(ToolbarButton, { label: "Align center", icon: /* @__PURE__ */ jsx(AlignCenter, {}), active: editor?.isActive({ textAlign: "center" }) ?? false, onRun: () => editor?.chain().focus().setTextAlign("center").run() }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@borisj74/bv-ds",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
4
4
|
"description": "bv-ds — React component library synced from Figma (Untitled UI v8.0), built on Tailwind CSS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"@tiptap/starter-kit": ">=2.0.0",
|
|
42
42
|
"date-fns": ">=2.0.0",
|
|
43
43
|
"react": ">=18.0.0",
|
|
44
|
-
"react-
|
|
45
|
-
"react-
|
|
44
|
+
"react-big-calendar": ">=1.8.0",
|
|
45
|
+
"react-dom": ">=18.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@borisj74/bv-ds-icons": "^0.1.
|
|
48
|
+
"@borisj74/bv-ds-icons": "^0.1.5",
|
|
49
49
|
"@storybook/addon-a11y": "^8.0.0",
|
|
50
50
|
"@storybook/addon-essentials": "^8.6.14",
|
|
51
51
|
"@storybook/react-vite": "^8.0.0",
|
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
import { useEffect, type ReactNode } from "react";
|
|
2
2
|
import { EditorContent } from "@tiptap/react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Bold01,
|
|
6
|
+
Italic01,
|
|
7
|
+
Underline01,
|
|
8
|
+
Strikethrough01,
|
|
9
|
+
Heading01,
|
|
10
|
+
List,
|
|
11
|
+
Dotpoints01,
|
|
12
|
+
Link01,
|
|
13
|
+
AlignLeft,
|
|
14
|
+
AlignCenter,
|
|
15
|
+
AlignRight,
|
|
16
|
+
XClose,
|
|
17
|
+
} from "@borisj74/bv-ds-icons";
|
|
5
18
|
import { ButtonUtility } from "../ButtonUtility";
|
|
6
19
|
import { TextEditorToolbar, TextEditorToolbarDivider } from "../TextEditorToolbar";
|
|
7
20
|
import { TextEditorTooltip } from "../TextEditorTooltip";
|
|
@@ -18,36 +31,6 @@ export interface TextEditorProps {
|
|
|
18
31
|
className?: string;
|
|
19
32
|
}
|
|
20
33
|
|
|
21
|
-
/*
|
|
22
|
-
* Inline-SVG fallbacks for formatting glyphs absent from @borisj74/bv-ds-icons
|
|
23
|
-
* v0.1.0 (italic / underline / strike / bullet-list / ordered-list / heading).
|
|
24
|
-
* Swap to package icons once they exist. 24-grid, currentColor stroke.
|
|
25
|
-
*/
|
|
26
|
-
const stroke = {
|
|
27
|
-
fill: "none",
|
|
28
|
-
stroke: "currentColor",
|
|
29
|
-
strokeWidth: 2,
|
|
30
|
-
strokeLinecap: "round" as const,
|
|
31
|
-
strokeLinejoin: "round" as const,
|
|
32
|
-
};
|
|
33
|
-
const ItalicIcon = () => (
|
|
34
|
-
<svg viewBox="0 0 24 24" {...stroke}><path d="M19 4h-9M14 20H5M15 4 9 20" /></svg>
|
|
35
|
-
);
|
|
36
|
-
const UnderlineIcon = () => (
|
|
37
|
-
<svg viewBox="0 0 24 24" {...stroke}><path d="M6 4v6a6 6 0 0 0 12 0V4M4 21h16" /></svg>
|
|
38
|
-
);
|
|
39
|
-
const StrikeIcon = () => (
|
|
40
|
-
<svg viewBox="0 0 24 24" {...stroke}><path d="M4 12h16M16 7.5A4 3 0 0 0 8 8M8 16.5a4 3 0 0 0 8-.5" /></svg>
|
|
41
|
-
);
|
|
42
|
-
const HeadingIcon = () => (
|
|
43
|
-
<svg viewBox="0 0 24 24" {...stroke}><path d="M6 4v16M18 4v16M6 12h12" /></svg>
|
|
44
|
-
);
|
|
45
|
-
const BulletListIcon = () => (
|
|
46
|
-
<svg viewBox="0 0 24 24" {...stroke}><path d="M9 6h11M9 12h11M9 18h11M4.5 6h.01M4.5 12h.01M4.5 18h.01" /></svg>
|
|
47
|
-
);
|
|
48
|
-
const OrderedListIcon = () => (
|
|
49
|
-
<svg viewBox="0 0 24 24" {...stroke}><path d="M10 6h10M10 12h10M10 18h10M4 4v4M3 14h2l-2 3h2" /></svg>
|
|
50
|
-
);
|
|
51
34
|
|
|
52
35
|
// ProseMirror content styling (Tailwind preflight strips list/heading styles).
|
|
53
36
|
const proseClass = clsx(
|
|
@@ -149,13 +132,13 @@ export function TextEditor({
|
|
|
149
132
|
>
|
|
150
133
|
<TextEditorToolbar className="w-full !rounded-none !border-l-0 !border-r-0 !border-t-0 !shadow-none">
|
|
151
134
|
<ToolbarButton label="Bold" icon={<Bold01 />} active={isActive("bold")} onRun={() => editor?.chain().focus().toggleBold().run()} />
|
|
152
|
-
<ToolbarButton label="Italic" icon={<
|
|
153
|
-
<ToolbarButton label="Underline" icon={<
|
|
154
|
-
<ToolbarButton label="Strikethrough" icon={<
|
|
135
|
+
<ToolbarButton label="Italic" icon={<Italic01 />} active={isActive("italic")} onRun={() => editor?.chain().focus().toggleItalic().run()} />
|
|
136
|
+
<ToolbarButton label="Underline" icon={<Underline01 />} active={isActive("underline")} onRun={() => editor?.chain().focus().toggleUnderline().run()} />
|
|
137
|
+
<ToolbarButton label="Strikethrough" icon={<Strikethrough01 />} active={isActive("strike")} onRun={() => editor?.chain().focus().toggleStrike().run()} />
|
|
155
138
|
<TextEditorToolbarDivider />
|
|
156
|
-
<ToolbarButton label="Heading" icon={<
|
|
157
|
-
<ToolbarButton label="Bullet list" icon={<
|
|
158
|
-
<ToolbarButton label="Ordered list" icon={<
|
|
139
|
+
<ToolbarButton label="Heading" icon={<Heading01 />} active={isActive("heading", { level: 2 })} onRun={() => editor?.chain().focus().toggleHeading({ level: 2 }).run()} />
|
|
140
|
+
<ToolbarButton label="Bullet list" icon={<List />} active={isActive("bulletList")} onRun={() => editor?.chain().focus().toggleBulletList().run()} />
|
|
141
|
+
<ToolbarButton label="Ordered list" icon={<Dotpoints01 />} active={isActive("orderedList")} onRun={() => editor?.chain().focus().toggleOrderedList().run()} />
|
|
159
142
|
<TextEditorToolbarDivider />
|
|
160
143
|
<ToolbarButton label="Align left" icon={<AlignLeft />} active={editor?.isActive({ textAlign: "left" }) ?? false} onRun={() => editor?.chain().focus().setTextAlign("left").run()} />
|
|
161
144
|
<ToolbarButton label="Align center" icon={<AlignCenter />} active={editor?.isActive({ textAlign: "center" }) ?? false} onRun={() => editor?.chain().focus().setTextAlign("center").run()} />
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
// The @borisj74/bv-ds-icons package (v0.1.0) ships runtime JS but its published
|
|
2
|
-
// tarball is missing the `dist/index.d.ts` its package.json points at, so TS
|
|
3
|
-
// can't resolve types for the icon imports (TS7016). Declare it as an untyped
|
|
4
|
-
// module until the icons package ships its declarations. Icons are simple SVG
|
|
5
|
-
// React components that accept standard SVG props (className, etc.).
|
|
6
|
-
declare module "@borisj74/bv-ds-icons";
|