@northlight/ui 2.28.7 → 2.28.9
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/es/northlight.d.ts +3 -2
- package/dist/es/northlight.js +28 -3
- package/dist/es/northlight.js.map +1 -1
- package/dist/umd/northlight.cjs +28 -3
- package/dist/umd/northlight.cjs.map +1 -1
- package/dist/umd/northlight.min.cjs +3 -3
- package/dist/umd/northlight.min.cjs.map +1 -1
- package/package.json +2 -2
package/dist/umd/northlight.cjs
CHANGED
|
@@ -1738,7 +1738,12 @@
|
|
|
1738
1738
|
"spacing"
|
|
1739
1739
|
]);
|
|
1740
1740
|
const [nbrRemainingAvatars, setNbrRemainingAvatars] = React.useState(0);
|
|
1741
|
-
|
|
1741
|
+
const childrenWithMargin = getChildrenWithProps(
|
|
1742
|
+
children,
|
|
1743
|
+
{ ml: spacing },
|
|
1744
|
+
(_child, idx) => idx > 0
|
|
1745
|
+
);
|
|
1746
|
+
return /* @__PURE__ */ React.createElement(react.HStack, __spreadValues$1_({ bgColor: "background.default" }, rest), /* @__PURE__ */ React.createElement(react.HStack, { spacing: 0 }, /* @__PURE__ */ React.createElement(OverflowGroup, { max, onChange: setNbrRemainingAvatars }, childrenWithMargin)), nbrRemainingAvatars > 0 && /* @__PURE__ */ React.createElement(Small$1, { sx: { color: "blue.500" } }, "+", nbrRemainingAvatars));
|
|
1742
1747
|
};
|
|
1743
1748
|
|
|
1744
1749
|
var __defProp$1Z = Object.defineProperty;
|
|
@@ -2465,6 +2470,7 @@
|
|
|
2465
2470
|
var _b = _a, {
|
|
2466
2471
|
onChange = () => {
|
|
2467
2472
|
},
|
|
2473
|
+
clearable = false,
|
|
2468
2474
|
colors = defaultColors,
|
|
2469
2475
|
expandedColors = paletteColors,
|
|
2470
2476
|
value = null,
|
|
@@ -2473,6 +2479,7 @@
|
|
|
2473
2479
|
popoverProps
|
|
2474
2480
|
} = _b, rest = __objRest$1l(_b, [
|
|
2475
2481
|
"onChange",
|
|
2482
|
+
"clearable",
|
|
2476
2483
|
"colors",
|
|
2477
2484
|
"expandedColors",
|
|
2478
2485
|
"value",
|
|
@@ -2528,6 +2535,10 @@
|
|
|
2528
2535
|
setSelectedColor(color);
|
|
2529
2536
|
onChange(color);
|
|
2530
2537
|
};
|
|
2538
|
+
const clearSelection = () => {
|
|
2539
|
+
setSelectedColor(null);
|
|
2540
|
+
onChange(null);
|
|
2541
|
+
};
|
|
2531
2542
|
return /* @__PURE__ */ React.createElement(react.Box, { "data-testid": "color-picker-test-id" }, /* @__PURE__ */ React.createElement(
|
|
2532
2543
|
Popover$1,
|
|
2533
2544
|
__spreadValues$1O({
|
|
@@ -2550,9 +2561,23 @@
|
|
|
2550
2561
|
react.PopoverHeader,
|
|
2551
2562
|
{
|
|
2552
2563
|
color: "text.default",
|
|
2553
|
-
sx: heading
|
|
2564
|
+
sx: heading,
|
|
2565
|
+
display: "flex",
|
|
2566
|
+
alignItems: "center",
|
|
2567
|
+
justifyContent: "space-between",
|
|
2568
|
+
width: "full"
|
|
2554
2569
|
},
|
|
2555
|
-
"Pick a color"
|
|
2570
|
+
"Pick a color",
|
|
2571
|
+
clearable && trigger.color !== "unset" && /* @__PURE__ */ React.createElement(
|
|
2572
|
+
Button$1,
|
|
2573
|
+
{
|
|
2574
|
+
size: "sm",
|
|
2575
|
+
h: "5",
|
|
2576
|
+
onClick: clearSelection,
|
|
2577
|
+
variant: "ghost"
|
|
2578
|
+
},
|
|
2579
|
+
"Clear"
|
|
2580
|
+
)
|
|
2556
2581
|
), /* @__PURE__ */ React.createElement(react.PopoverBody, { p: 0 }, /* @__PURE__ */ React.createElement(react.Stack, { alignItems: "center", p: 0, spacing: 0 }, /* @__PURE__ */ React.createElement(focus.FocusScope, null, /* @__PURE__ */ React.createElement(
|
|
2557
2582
|
react.SimpleGrid,
|
|
2558
2583
|
{
|