@moderneinc/design-system-components 6.0.0 → 6.0.1-next.24493d
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.esm.js +2 -9
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -9
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1860,14 +1860,7 @@ const StyledCheckbox = styled(Checkbox, {
|
|
|
1860
1860
|
*/
|
|
1861
1861
|
const ModCheckbox = ({ size = 'medium', label, helperText, disabled, icon, checkedIcon, indeterminateIcon, className, ...props }) => {
|
|
1862
1862
|
// Identifies ModCheckbox instances to consumer stylesheets.
|
|
1863
|
-
|
|
1864
|
-
// `neo-checkbox` ships alongside for one major. Consumers select on these
|
|
1865
|
-
// names from their own CSS, where nothing type-checks the string — moderne-ui
|
|
1866
|
-
// has `'&:not(.neo-checkbox)'`, which on a bare rename would stop excluding
|
|
1867
|
-
// anything and silently start overriding every checkbox. Remove the legacy
|
|
1868
|
-
// name once consumers have migrated.
|
|
1869
|
-
const ownClassNames = 'mod-checkbox neo-checkbox';
|
|
1870
|
-
const combinedClassName = className ? `${ownClassNames} ${className}` : ownClassNames;
|
|
1863
|
+
const combinedClassName = className ? `mod-checkbox ${className}` : 'mod-checkbox';
|
|
1871
1864
|
// Default icons (sized via CSS on the SVG); overridable per instance
|
|
1872
1865
|
const defaultIcon = icon || jsx(Square, {});
|
|
1873
1866
|
const defaultCheckedIcon = checkedIcon || jsx(SquareCheck, {});
|
|
@@ -5711,7 +5704,7 @@ function ModNavigationItem({ icon, label, selected = false, tag, tooltip, slotPr
|
|
|
5711
5704
|
// When collapsed the label is hidden, so fall back to it for the tooltip and
|
|
5712
5705
|
// accessible name — otherwise an icon-only button has no name (WCAG 4.1.2).
|
|
5713
5706
|
const collapsedTooltip = tooltip ?? label;
|
|
5714
|
-
const item = (jsxs(StyledRoot, { selected: selected, "aria-label": collapsed && typeof label === 'string' ? label : undefined, disableRipple: true, ...props, children: [jsx(IconPadding, { className: "mod-nav-icon-padding
|
|
5707
|
+
const item = (jsxs(StyledRoot, { selected: selected, "aria-label": collapsed && typeof label === 'string' ? label : undefined, disableRipple: true, ...props, children: [jsx(IconPadding, { className: "mod-nav-icon-padding", children: icon }), !collapsed && label && jsx(Label$2, { className: "mod-nav-label", children: label }), !collapsed && tag && (jsx(ModTag, { size: "medium", variant: "filled", intent: "beta", shape: "rounded", label: tag, ...slotProps?.badge })), children] }));
|
|
5715
5708
|
if (collapsed && collapsedTooltip) {
|
|
5716
5709
|
return (jsx(ModTooltip, { title: collapsedTooltip, placement: "right", arrow: true, children: item }));
|
|
5717
5710
|
}
|