@carto/meridian-ds 2.2.0-alpha-filter-dropdown.8 → 2.2.0-alpha-filter-dropdown.10
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.
|
@@ -1551,7 +1551,8 @@ const FilterDropdownMenuItem = ({
|
|
|
1551
1551
|
subtitle,
|
|
1552
1552
|
divider,
|
|
1553
1553
|
fixed,
|
|
1554
|
-
selected
|
|
1554
|
+
selected,
|
|
1555
|
+
iconColor
|
|
1555
1556
|
} = item;
|
|
1556
1557
|
const [menuItemId] = React.useState(() => `filter-dropdown-item-${uniqueId()}`);
|
|
1557
1558
|
const isSelected = selected || (selectedValue == null ? void 0 : selectedValue.id) === id;
|
|
@@ -1568,6 +1569,7 @@ const FilterDropdownMenuItem = ({
|
|
|
1568
1569
|
subtitle,
|
|
1569
1570
|
divider,
|
|
1570
1571
|
fixed,
|
|
1572
|
+
iconColor,
|
|
1571
1573
|
"aria-label": ariaLabel,
|
|
1572
1574
|
"aria-labelledby": menuItemId,
|
|
1573
1575
|
"aria-selected": isSelected,
|
|
@@ -1657,7 +1659,8 @@ function _FilterDropdown({
|
|
|
1657
1659
|
id: buttonId,
|
|
1658
1660
|
"aria-controls": isOpen ? menuId : void 0,
|
|
1659
1661
|
"aria-haspopup": !disabled,
|
|
1660
|
-
"aria-expanded": isOpen
|
|
1662
|
+
"aria-expanded": isOpen,
|
|
1663
|
+
"data-color": buttonColor
|
|
1661
1664
|
};
|
|
1662
1665
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1663
1666
|
/* @__PURE__ */ jsxRuntime.jsx(material.Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsxRuntime.jsx(ButtonWrapper, { isOpen, buttonColor, ref, children: isIcon ? /* @__PURE__ */ jsxRuntime.jsx(Link.IconButton, { ...commonButtonProps, icon }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -1682,12 +1685,14 @@ function _FilterDropdown({
|
|
|
1682
1685
|
...slotProps,
|
|
1683
1686
|
paper: {
|
|
1684
1687
|
"data-name": "filter-dropdown",
|
|
1685
|
-
"data-dense": dense,
|
|
1686
1688
|
...slotProps == null ? void 0 : slotProps.paper
|
|
1687
1689
|
}
|
|
1688
1690
|
},
|
|
1689
1691
|
MenuListProps: {
|
|
1690
1692
|
"aria-labelledby": buttonId,
|
|
1693
|
+
...dense && {
|
|
1694
|
+
"data-dense": dense
|
|
1695
|
+
},
|
|
1691
1696
|
autoFocus: true,
|
|
1692
1697
|
// To allow keyboard navigation
|
|
1693
1698
|
...MenuListProps
|
package/dist/components/index.js
CHANGED
|
@@ -1551,7 +1551,8 @@ const FilterDropdownMenuItem = ({
|
|
|
1551
1551
|
subtitle,
|
|
1552
1552
|
divider,
|
|
1553
1553
|
fixed,
|
|
1554
|
-
selected
|
|
1554
|
+
selected,
|
|
1555
|
+
iconColor
|
|
1555
1556
|
} = item;
|
|
1556
1557
|
const [menuItemId] = useState(() => `filter-dropdown-item-${uniqueId()}`);
|
|
1557
1558
|
const isSelected = selected || (selectedValue == null ? void 0 : selectedValue.id) === id;
|
|
@@ -1568,6 +1569,7 @@ const FilterDropdownMenuItem = ({
|
|
|
1568
1569
|
subtitle,
|
|
1569
1570
|
divider,
|
|
1570
1571
|
fixed,
|
|
1572
|
+
iconColor,
|
|
1571
1573
|
"aria-label": ariaLabel,
|
|
1572
1574
|
"aria-labelledby": menuItemId,
|
|
1573
1575
|
"aria-selected": isSelected,
|
|
@@ -1657,7 +1659,8 @@ function _FilterDropdown({
|
|
|
1657
1659
|
id: buttonId,
|
|
1658
1660
|
"aria-controls": isOpen ? menuId : void 0,
|
|
1659
1661
|
"aria-haspopup": !disabled,
|
|
1660
|
-
"aria-expanded": isOpen
|
|
1662
|
+
"aria-expanded": isOpen,
|
|
1663
|
+
"data-color": buttonColor
|
|
1661
1664
|
};
|
|
1662
1665
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1663
1666
|
/* @__PURE__ */ jsx(Tooltip, { title: tooltipLabel, placement: tooltipPlacement, children: /* @__PURE__ */ jsx(ButtonWrapper, { isOpen, buttonColor, ref, children: isIcon ? /* @__PURE__ */ jsx(IconButton$1, { ...commonButtonProps, icon }) : /* @__PURE__ */ jsx(
|
|
@@ -1682,12 +1685,14 @@ function _FilterDropdown({
|
|
|
1682
1685
|
...slotProps,
|
|
1683
1686
|
paper: {
|
|
1684
1687
|
"data-name": "filter-dropdown",
|
|
1685
|
-
"data-dense": dense,
|
|
1686
1688
|
...slotProps == null ? void 0 : slotProps.paper
|
|
1687
1689
|
}
|
|
1688
1690
|
},
|
|
1689
1691
|
MenuListProps: {
|
|
1690
1692
|
"aria-labelledby": buttonId,
|
|
1693
|
+
...dense && {
|
|
1694
|
+
"data-dense": dense
|
|
1695
|
+
},
|
|
1691
1696
|
autoFocus: true,
|
|
1692
1697
|
// To allow keyboard navigation
|
|
1693
1698
|
...MenuListProps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdown.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/FilterDropdown/FilterDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoC,YAAY,EAAE,MAAM,OAAO,CAAA;AAQ7E,OAAO,EAA2B,mBAAmB,EAAE,MAAM,SAAS,CAAA;AA0BtE,wBAAgB,eAAe,CAC7B,EACE,SAAS,EACT,WAAW,EACX,KAAK,EACL,YAA2B,EAC3B,SAAS,EACT,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,UAAU,EACV,WAAuB,EACvB,KAAa,EACb,QAAgB,EAChB,YAAY,EAAE,SAAS,EACvB,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,EACtB,GAAG,EAAE,YAAY,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"FilterDropdown.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/FilterDropdown/FilterDropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAoC,YAAY,EAAE,MAAM,OAAO,CAAA;AAQ7E,OAAO,EAA2B,mBAAmB,EAAE,MAAM,SAAS,CAAA;AA0BtE,wBAAgB,eAAe,CAC7B,EACE,SAAS,EACT,WAAW,EACX,KAAK,EACL,YAA2B,EAC3B,SAAS,EACT,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,UAAU,EACV,WAAuB,EACvB,KAAa,EACb,QAAgB,EAChB,YAAY,EAAE,SAAS,EACvB,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,aAAa,EACb,GAAG,KAAK,EACT,EAAE,mBAAmB,EACtB,GAAG,EAAE,YAAY,CAAC,cAAc,CAAC,2CAuGlC;AAID,QAAA,MAAM,cAAc,yGAEnB,CAAA;AACD,eAAe,cAAc,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterDropdownMenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/FilterDropdown/FilterDropdownMenuItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAErD,eAAO,MAAM,sBAAsB,4DAMhC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"FilterDropdownMenuItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/FilterDropdown/FilterDropdownMenuItem.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAA;AAErD,eAAO,MAAM,sBAAsB,4DAMhC,2BAA2B,mDAsD7B,CAAA"}
|