@loomhq/lens 12.5.0 → 12.6.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/cjs/index.js +40 -52
- package/dist/cjs/index.js.map +2 -2
- package/dist/esm/index.js +40 -52
- package/dist/esm/index.js.map +2 -2
- package/dist/types/components/list/list.d.ts +1 -1
- package/dist/types/components/list/list.d.ts.map +1 -1
- package/dist/types/components/switch/switch.d.ts +2 -1
- package/dist/types/components/switch/switch.d.ts.map +1 -1
- package/dist/types/components/tabs/tabs.d.ts +1 -3
- package/dist/types/components/tabs/tabs.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -5478,7 +5478,7 @@ var SwitchInput = styled26.input`
|
|
|
5478
5478
|
height: ${(props) => sizes2[props.switchSize].switchHeight}px;
|
|
5479
5479
|
|
|
5480
5480
|
&:focus-visible ~ .SwitchBox {
|
|
5481
|
-
${
|
|
5481
|
+
${getOffsetFocusRing()};
|
|
5482
5482
|
}
|
|
5483
5483
|
&:not(:checked) {
|
|
5484
5484
|
& + .SwitchBox {
|
|
@@ -5529,14 +5529,16 @@ var Switch = (_a) => {
|
|
|
5529
5529
|
onChange,
|
|
5530
5530
|
size = "medium",
|
|
5531
5531
|
ariaLabelledby,
|
|
5532
|
-
ariaLabel
|
|
5532
|
+
ariaLabel,
|
|
5533
|
+
ariaDescribedby
|
|
5533
5534
|
} = _b, props = __objRest(_b, [
|
|
5534
5535
|
"isActive",
|
|
5535
5536
|
"isDisabled",
|
|
5536
5537
|
"onChange",
|
|
5537
5538
|
"size",
|
|
5538
5539
|
"ariaLabelledby",
|
|
5539
|
-
"ariaLabel"
|
|
5540
|
+
"ariaLabel",
|
|
5541
|
+
"ariaDescribedby"
|
|
5540
5542
|
]);
|
|
5541
5543
|
if (ariaLabelledby && ariaLabel) {
|
|
5542
5544
|
throw new Error(
|
|
@@ -5553,6 +5555,7 @@ var Switch = (_a) => {
|
|
|
5553
5555
|
switchSize: size,
|
|
5554
5556
|
"aria-labelledby": ariaLabelledby,
|
|
5555
5557
|
"aria-label": ariaLabel,
|
|
5558
|
+
"aria-describedby": ariaDescribedby,
|
|
5556
5559
|
"aria-checked": isActive
|
|
5557
5560
|
})
|
|
5558
5561
|
), /* @__PURE__ */ React32.createElement(
|
|
@@ -6644,20 +6647,22 @@ var ListRow = (_a) => {
|
|
|
6644
6647
|
className,
|
|
6645
6648
|
backgroundColor,
|
|
6646
6649
|
onClick,
|
|
6647
|
-
href
|
|
6650
|
+
href,
|
|
6651
|
+
role
|
|
6648
6652
|
} = _b, props = __objRest(_b, [
|
|
6649
6653
|
"children",
|
|
6650
6654
|
"htmlTag",
|
|
6651
6655
|
"className",
|
|
6652
6656
|
"backgroundColor",
|
|
6653
6657
|
"onClick",
|
|
6654
|
-
"href"
|
|
6658
|
+
"href",
|
|
6659
|
+
"role"
|
|
6655
6660
|
]);
|
|
6656
6661
|
const classNameFromProp = className ? ` ${className}` : ``;
|
|
6657
6662
|
return /* @__PURE__ */ React43.createElement(
|
|
6658
6663
|
ListRowWrapper,
|
|
6659
6664
|
__spreadValues({
|
|
6660
|
-
role
|
|
6665
|
+
role,
|
|
6661
6666
|
className: `ListRowWrapper${classNameFromProp}`,
|
|
6662
6667
|
as: htmlTag,
|
|
6663
6668
|
backgroundColor,
|
|
@@ -6708,7 +6713,7 @@ var Wrapper = styled35.div`
|
|
|
6708
6713
|
${(props) => props.scrollOffset && `margin: 0 ${negativeScrollOffset(props.scrollOffset)};
|
|
6709
6714
|
`};
|
|
6710
6715
|
`;
|
|
6711
|
-
var TabsNav = styled35.
|
|
6716
|
+
var TabsNav = styled35.div`
|
|
6712
6717
|
--activeIndicatorHeight: 3px;
|
|
6713
6718
|
|
|
6714
6719
|
display: flex;
|
|
@@ -6724,32 +6729,20 @@ var TabsNav = styled35.nav`
|
|
|
6724
6729
|
display: none;
|
|
6725
6730
|
}
|
|
6726
6731
|
|
|
6727
|
-
|
|
6732
|
+
> * {
|
|
6728
6733
|
${(props) => props.hasFullTabs && `flex: 1 0`};
|
|
6729
6734
|
&:not(:first-of-type) {
|
|
6730
6735
|
margin-left: 1rem;
|
|
6731
6736
|
}
|
|
6732
6737
|
}
|
|
6733
6738
|
|
|
6734
|
-
|
|
6735
|
-
width: 100%;
|
|
6736
|
-
}
|
|
6737
|
-
|
|
6738
|
-
ul {
|
|
6739
|
-
display: flex;
|
|
6740
|
-
list-style: none;
|
|
6741
|
-
padding: 0;
|
|
6742
|
-
margin: 0;
|
|
6743
|
-
width: 100%;
|
|
6744
|
-
}
|
|
6745
|
-
|
|
6746
|
-
ul:after {
|
|
6739
|
+
::after {
|
|
6747
6740
|
content: '';
|
|
6748
6741
|
flex-shrink: 0;
|
|
6749
6742
|
${(props) => props.scrollOffset && getSize("width", props.scrollOffset)};
|
|
6750
6743
|
}
|
|
6751
6744
|
`;
|
|
6752
|
-
var TabsNavPilled = styled35.
|
|
6745
|
+
var TabsNavPilled = styled35.div`
|
|
6753
6746
|
${getRadius("200")};
|
|
6754
6747
|
background-color: var(--lns-color-backgroundSecondary);
|
|
6755
6748
|
|
|
@@ -6765,23 +6758,11 @@ var TabsNavPilled = styled35.nav`
|
|
|
6765
6758
|
display: none;
|
|
6766
6759
|
}
|
|
6767
6760
|
|
|
6768
|
-
|
|
6761
|
+
* {
|
|
6769
6762
|
flex: 1 0;
|
|
6770
6763
|
}
|
|
6771
6764
|
|
|
6772
|
-
|
|
6773
|
-
width: 100%;
|
|
6774
|
-
}
|
|
6775
|
-
|
|
6776
|
-
ul {
|
|
6777
|
-
display: flex;
|
|
6778
|
-
list-style: none;
|
|
6779
|
-
padding: 0;
|
|
6780
|
-
margin: 0;
|
|
6781
|
-
width: 100%;
|
|
6782
|
-
}
|
|
6783
|
-
|
|
6784
|
-
ul:after {
|
|
6765
|
+
::after {
|
|
6785
6766
|
content: '';
|
|
6786
6767
|
flex-shrink: 0;
|
|
6787
6768
|
${(props) => props.scrollOffset && getSize("width", props.scrollOffset)};
|
|
@@ -6887,18 +6868,31 @@ var Tab = (_a) => {
|
|
|
6887
6868
|
]);
|
|
6888
6869
|
const { isPilledDesign } = React44.useContext(TabsContext);
|
|
6889
6870
|
if (isPilledDesign) {
|
|
6890
|
-
return /* @__PURE__ */ React44.createElement(
|
|
6871
|
+
return /* @__PURE__ */ React44.createElement(
|
|
6891
6872
|
TabWrapperPilled,
|
|
6892
6873
|
__spreadValues({
|
|
6893
6874
|
as: htmlTag,
|
|
6894
6875
|
isActive,
|
|
6895
|
-
icon
|
|
6876
|
+
icon,
|
|
6877
|
+
role: "tab",
|
|
6878
|
+
"aria-selected": isActive
|
|
6896
6879
|
}, props),
|
|
6897
6880
|
icon && /* @__PURE__ */ React44.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ React44.createElement(icon_default, { icon, color: "currentColor" })),
|
|
6898
6881
|
children
|
|
6899
|
-
)
|
|
6882
|
+
);
|
|
6900
6883
|
}
|
|
6901
|
-
return /* @__PURE__ */ React44.createElement(
|
|
6884
|
+
return /* @__PURE__ */ React44.createElement(
|
|
6885
|
+
TabWrapper,
|
|
6886
|
+
__spreadValues({
|
|
6887
|
+
as: htmlTag,
|
|
6888
|
+
isActive,
|
|
6889
|
+
icon,
|
|
6890
|
+
role: "tab",
|
|
6891
|
+
"aria-selected": isActive
|
|
6892
|
+
}, props),
|
|
6893
|
+
icon && /* @__PURE__ */ React44.createElement(container_default, { htmlTag: "span", paddingRight: children && "small" }, /* @__PURE__ */ React44.createElement(icon_default, { icon, color: "currentColor" })),
|
|
6894
|
+
children
|
|
6895
|
+
);
|
|
6902
6896
|
};
|
|
6903
6897
|
var Tabs = (_a) => {
|
|
6904
6898
|
var _b = _a, {
|
|
@@ -6906,37 +6900,31 @@ var Tabs = (_a) => {
|
|
|
6906
6900
|
scrollOffset,
|
|
6907
6901
|
hasFullTabs,
|
|
6908
6902
|
isPilledDesign,
|
|
6909
|
-
hasBottomBorder = false
|
|
6910
|
-
role,
|
|
6911
|
-
ariaOrientation
|
|
6903
|
+
hasBottomBorder = false
|
|
6912
6904
|
} = _b, props = __objRest(_b, [
|
|
6913
6905
|
"children",
|
|
6914
6906
|
"scrollOffset",
|
|
6915
6907
|
"hasFullTabs",
|
|
6916
6908
|
"isPilledDesign",
|
|
6917
|
-
"hasBottomBorder"
|
|
6918
|
-
"role",
|
|
6919
|
-
"ariaOrientation"
|
|
6909
|
+
"hasBottomBorder"
|
|
6920
6910
|
]);
|
|
6921
6911
|
const tabsContent = isPilledDesign ? /* @__PURE__ */ React44.createElement(
|
|
6922
6912
|
TabsNavPilled,
|
|
6923
6913
|
__spreadValues({
|
|
6924
6914
|
hasFullTabs,
|
|
6925
6915
|
scrollOffset,
|
|
6926
|
-
role
|
|
6927
|
-
"aria-orientation": ariaOrientation
|
|
6916
|
+
role: "tablist"
|
|
6928
6917
|
}, props),
|
|
6929
|
-
|
|
6918
|
+
children
|
|
6930
6919
|
) : /* @__PURE__ */ React44.createElement(
|
|
6931
6920
|
TabsNav,
|
|
6932
6921
|
__spreadValues({
|
|
6933
6922
|
hasFullTabs,
|
|
6934
6923
|
scrollOffset,
|
|
6935
6924
|
hasBottomBorder,
|
|
6936
|
-
role
|
|
6937
|
-
"aria-orientation": ariaOrientation
|
|
6925
|
+
role: "tablist"
|
|
6938
6926
|
}, props),
|
|
6939
|
-
|
|
6927
|
+
children
|
|
6940
6928
|
);
|
|
6941
6929
|
if (scrollOffset) {
|
|
6942
6930
|
return /* @__PURE__ */ React44.createElement(Wrapper, { scrollOffset }, tabsContent);
|