@loomhq/lens 12.3.0 → 12.3.2
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/cjs/index.js +82 -79
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +82 -79
- package/dist/esm/index.js.map +2 -2
- package/dist/types/colors.d.ts +2 -1
- package/dist/types/colors.d.ts.map +1 -1
- package/dist/types/components/color-picker/color-picker.d.ts.map +1 -1
- package/dist/types/components/list/list.d.ts.map +1 -1
- package/dist/types/components/radio/radio.d.ts.map +1 -1
- package/dist/types/components/select/select.d.ts.map +1 -1
- package/dist/types/components/switch/switch.d.ts.map +1 -1
- package/dist/types/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/components/typeahead/typeahead.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -291,6 +291,7 @@ var hslaBaseColors = {
|
|
|
291
291
|
blueLight: { h: 216.5, s: 92, l: 90.2, a: 1 },
|
|
292
292
|
blue: { h: 215.4, s: 80, l: 47.65, a: 1 },
|
|
293
293
|
blueDark: { h: 216.3, s: 69.2, l: 23, a: 1 },
|
|
294
|
+
magenta: { h: 323, s: 42, l: 48, a: 1 },
|
|
294
295
|
orangeLight: { h: 4, s: 100, l: 91.2, a: 1 },
|
|
295
296
|
orange: { h: 11, s: 100, l: 62.2, a: 1 },
|
|
296
297
|
orangeDark: { h: 10.9, s: 100, l: 42.2, a: 1 },
|
|
@@ -4094,8 +4095,7 @@ var Select = (_a) => {
|
|
|
4094
4095
|
}) => {
|
|
4095
4096
|
return (
|
|
4096
4097
|
// Don't set the role to combobox to ensure a consistent experience for screen readers
|
|
4097
|
-
/*
|
|
4098
|
-
/* @__PURE__ */ import_react23.default.createElement("div", { role: null }, /* @__PURE__ */ import_react23.default.createElement("div", __spreadValues({}, triggerProps), trigger ? /* @__PURE__ */ import_react23.default.createElement(
|
|
4098
|
+
/* @__PURE__ */ import_react23.default.createElement("div", { role: "presentation" }, /* @__PURE__ */ import_react23.default.createElement("div", __spreadValues({}, triggerProps), trigger ? /* @__PURE__ */ import_react23.default.createElement(
|
|
4099
4099
|
CustomHeader,
|
|
4100
4100
|
{
|
|
4101
4101
|
getToggleButtonProps,
|
|
@@ -4393,15 +4393,15 @@ var ModalCard = (_a) => {
|
|
|
4393
4393
|
"removeClose",
|
|
4394
4394
|
"initialFocus"
|
|
4395
4395
|
]);
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
onCloseClick(e);
|
|
4402
|
-
}
|
|
4396
|
+
const keyListener = (e) => {
|
|
4397
|
+
if (e.key === "Escape") {
|
|
4398
|
+
e.preventDefault();
|
|
4399
|
+
if (!removeClose) {
|
|
4400
|
+
onCloseClick(e);
|
|
4403
4401
|
}
|
|
4404
|
-
}
|
|
4402
|
+
}
|
|
4403
|
+
};
|
|
4404
|
+
(0, import_react26.useEffect)(() => {
|
|
4405
4405
|
window.addEventListener("keydown", keyListener);
|
|
4406
4406
|
return () => {
|
|
4407
4407
|
window.removeEventListener("keydown", keyListener);
|
|
@@ -4440,10 +4440,9 @@ var ModalCard = (_a) => {
|
|
|
4440
4440
|
)),
|
|
4441
4441
|
/* @__PURE__ */ import_react26.default.createElement(
|
|
4442
4442
|
ModalCardChildrenSection,
|
|
4443
|
-
{
|
|
4444
|
-
tabIndex: removeClose ? 0 : -1,
|
|
4443
|
+
__spreadProps(__spreadValues({}, removeClose ? { tabIndex: 0 } : { tabIndex: -1 }), {
|
|
4445
4444
|
maxHeight
|
|
4446
|
-
},
|
|
4445
|
+
}),
|
|
4447
4446
|
children
|
|
4448
4447
|
)
|
|
4449
4448
|
)
|
|
@@ -5200,8 +5199,7 @@ var Typeahead = (_a) => {
|
|
|
5200
5199
|
}) => {
|
|
5201
5200
|
return (
|
|
5202
5201
|
// Don't set the role to combobox to ensure a consistent experience for screen readers
|
|
5203
|
-
/*
|
|
5204
|
-
/* @__PURE__ */ import_react30.default.createElement("div", { role: null }, /* @__PURE__ */ import_react30.default.createElement("div", __spreadValues({}, triggerProps), /* @__PURE__ */ import_react30.default.createElement(
|
|
5202
|
+
/* @__PURE__ */ import_react30.default.createElement("div", { role: "presentation" }, /* @__PURE__ */ import_react30.default.createElement("div", __spreadValues({}, triggerProps), /* @__PURE__ */ import_react30.default.createElement(
|
|
5205
5203
|
TypeaheadHeader,
|
|
5206
5204
|
{
|
|
5207
5205
|
inputRef,
|
|
@@ -5495,21 +5493,18 @@ var Radio = (0, import_react32.forwardRef)(
|
|
|
5495
5493
|
"onChange",
|
|
5496
5494
|
"onBlur"
|
|
5497
5495
|
]);
|
|
5498
|
-
return (
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
}, props)
|
|
5511
|
-
), /* @__PURE__ */ import_react32.default.createElement(RadioBox, { className: "RadioBox" }))
|
|
5512
|
-
);
|
|
5496
|
+
return /* @__PURE__ */ import_react32.default.createElement(RadioLabel, { htmlFor: props.id }, /* @__PURE__ */ import_react32.default.createElement(
|
|
5497
|
+
RadioInput,
|
|
5498
|
+
__spreadValues({
|
|
5499
|
+
type: "radio",
|
|
5500
|
+
disabled: isDisabled,
|
|
5501
|
+
checked: isChecked,
|
|
5502
|
+
onFocus,
|
|
5503
|
+
onChange,
|
|
5504
|
+
onBlur,
|
|
5505
|
+
ref
|
|
5506
|
+
}, props)
|
|
5507
|
+
), /* @__PURE__ */ import_react32.default.createElement(RadioBox, { className: "RadioBox" }));
|
|
5513
5508
|
}
|
|
5514
5509
|
);
|
|
5515
5510
|
var radio_default = Radio;
|
|
@@ -5638,30 +5633,27 @@ var Switch = (_a) => {
|
|
|
5638
5633
|
"ariaLabelledby and ariaLabel serve the same purpose and therefore cannot be used at the same time. Choose the one that best suites your needs."
|
|
5639
5634
|
);
|
|
5640
5635
|
}
|
|
5641
|
-
return (
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
SwitchBox,
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
|
|
5661
|
-
|
|
5662
|
-
}
|
|
5663
|
-
))
|
|
5664
|
-
);
|
|
5636
|
+
return /* @__PURE__ */ import_react33.default.createElement(SwitchLabel, { htmlFor: props.id }, /* @__PURE__ */ import_react33.default.createElement(
|
|
5637
|
+
SwitchInput,
|
|
5638
|
+
__spreadProps(__spreadValues({}, props), {
|
|
5639
|
+
checked: isActive,
|
|
5640
|
+
disabled: isDisabled,
|
|
5641
|
+
onChange,
|
|
5642
|
+
type: "checkbox",
|
|
5643
|
+
switchSize: size,
|
|
5644
|
+
"aria-labelledby": ariaLabelledby,
|
|
5645
|
+
"aria-label": ariaLabel,
|
|
5646
|
+
"aria-checked": isActive
|
|
5647
|
+
})
|
|
5648
|
+
), /* @__PURE__ */ import_react33.default.createElement(
|
|
5649
|
+
SwitchBox,
|
|
5650
|
+
{
|
|
5651
|
+
className: "SwitchBox",
|
|
5652
|
+
isDisabled,
|
|
5653
|
+
isActive,
|
|
5654
|
+
switchSize: size
|
|
5655
|
+
}
|
|
5656
|
+
));
|
|
5665
5657
|
};
|
|
5666
5658
|
var switch_default = Switch;
|
|
5667
5659
|
|
|
@@ -6047,10 +6039,10 @@ var Toast = ({
|
|
|
6047
6039
|
}, toastDuration);
|
|
6048
6040
|
return () => clearTimeout(timer);
|
|
6049
6041
|
}, [isOpen]);
|
|
6050
|
-
return /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null, isOpen && /*
|
|
6051
|
-
/* @__PURE__ */ import_react41.default.createElement(
|
|
6042
|
+
return /* @__PURE__ */ import_react41.default.createElement(import_react41.default.Fragment, null, isOpen && /* @__PURE__ */ import_react41.default.createElement(
|
|
6052
6043
|
ToastWrapper,
|
|
6053
6044
|
{
|
|
6045
|
+
role: "presentation",
|
|
6054
6046
|
onClick: (e) => e.stopPropagation(),
|
|
6055
6047
|
zIndex,
|
|
6056
6048
|
isOpen,
|
|
@@ -6134,6 +6126,7 @@ var TooltipBox = (_a) => {
|
|
|
6134
6126
|
"zIndex"
|
|
6135
6127
|
]);
|
|
6136
6128
|
return (
|
|
6129
|
+
// These are being added to hide the tooltip when users hover over
|
|
6137
6130
|
/* eslint-disable-next-line styled-components-a11y/no-static-element-interactions */
|
|
6138
6131
|
/* @__PURE__ */ import_react42.default.createElement(
|
|
6139
6132
|
TooltipBoxWrapper,
|
|
@@ -6740,19 +6733,24 @@ var ListRow = (_a) => {
|
|
|
6740
6733
|
"href"
|
|
6741
6734
|
]);
|
|
6742
6735
|
const classNameFromProp = className ? ` ${className}` : ``;
|
|
6743
|
-
return (
|
|
6744
|
-
|
|
6745
|
-
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
|
|
6753
|
-
|
|
6754
|
-
|
|
6755
|
-
|
|
6736
|
+
return /* @__PURE__ */ import_react48.default.createElement(
|
|
6737
|
+
ListRowWrapper,
|
|
6738
|
+
__spreadValues({
|
|
6739
|
+
role: "row",
|
|
6740
|
+
className: `ListRowWrapper${classNameFromProp}`,
|
|
6741
|
+
as: htmlTag,
|
|
6742
|
+
backgroundColor,
|
|
6743
|
+
onClick,
|
|
6744
|
+
tabIndex: 0,
|
|
6745
|
+
onKeyDown: (e) => {
|
|
6746
|
+
if (e.key === "Enter") {
|
|
6747
|
+
e.preventDefault();
|
|
6748
|
+
onClick(e);
|
|
6749
|
+
}
|
|
6750
|
+
},
|
|
6751
|
+
href
|
|
6752
|
+
}, props),
|
|
6753
|
+
children
|
|
6756
6754
|
);
|
|
6757
6755
|
};
|
|
6758
6756
|
var formatColumns = (columns) => columns.map((columnValue) => getSizeValue(columnValue)).join(" ");
|
|
@@ -7479,17 +7477,22 @@ var Swatch = import_styled40.default.div`
|
|
|
7479
7477
|
`;
|
|
7480
7478
|
var SwatchSelector = ({ swatches, currentColor, onSwatchClick }) => {
|
|
7481
7479
|
const selectedSwatch = swatches.includes(currentColor) && currentColor;
|
|
7482
|
-
return /* @__PURE__ */ import_react55.default.createElement(SwatchesContainer, null, swatches.map((swatch) => (
|
|
7483
|
-
|
|
7484
|
-
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7480
|
+
return /* @__PURE__ */ import_react55.default.createElement(SwatchesContainer, null, swatches.map((swatch) => /* @__PURE__ */ import_react55.default.createElement(
|
|
7481
|
+
Swatch,
|
|
7482
|
+
{
|
|
7483
|
+
key: swatch,
|
|
7484
|
+
color: swatch,
|
|
7485
|
+
selected: selectedSwatch,
|
|
7486
|
+
onClick: () => onSwatchClick(swatch),
|
|
7487
|
+
role: "button",
|
|
7488
|
+
tabIndex: 0,
|
|
7489
|
+
onKeyDown: (e) => {
|
|
7490
|
+
if (e.key === "Enter") {
|
|
7491
|
+
e.preventDefault();
|
|
7492
|
+
onSwatchClick(swatch);
|
|
7493
|
+
}
|
|
7491
7494
|
}
|
|
7492
|
-
|
|
7495
|
+
}
|
|
7493
7496
|
)));
|
|
7494
7497
|
};
|
|
7495
7498
|
var ColorSelector = ({ color, setColor }) => {
|