@indico-data/design-system 3.20.0 → 3.22.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/lib/index.js CHANGED
@@ -19699,14 +19699,17 @@ function Menu(_a) {
19699
19699
  : child) })));
19700
19700
  }
19701
19701
 
19702
+ const PILL_ICON_SIZE = {
19703
+ sm: 'xxs',
19704
+ md: 'xs',
19705
+ lg: 'xs',
19706
+ };
19702
19707
  const Pill = (_a) => {
19703
- var { children, className, color = 'gray', size = 'sm', shade } = _a, rest = __rest(_a, ["children", "className", "color", "size", "shade"]);
19704
- const pillClasses = classNames('pill', className, {
19705
- [`pill--${color}`]: color && !shade,
19706
- [`pill--${color}-${shade}`]: color && shade,
19707
- [`pill--${size}`]: size,
19708
- });
19709
- return (jsxRuntime.jsx("div", Object.assign({ className: pillClasses }, rest, { children: children })));
19708
+ var { children, color = 'gray', size = 'sm', variant = 'solid', type = 'pill', iconLeft, iconRight, dot, onClose, closeAriaLabel = 'Remove', className } = _a, rest = __rest(_a, ["children", "color", "size", "variant", "type", "iconLeft", "iconRight", "dot", "onClose", "closeAriaLabel", "className"]);
19709
+ return (jsxRuntime.jsxs("div", Object.assign({ className: classNames('pill', `pill--${type}`, `pill--${size}`, `pill--${variant}-${color}`, className, {
19710
+ 'pill--icon-only': !children && (iconLeft || iconRight),
19711
+ 'pill--closeable': !!onClose,
19712
+ }) }, rest, { children: [dot && jsxRuntime.jsx("span", { className: "pill__dot" }), iconLeft && jsxRuntime.jsx(Icon, { name: iconLeft, size: PILL_ICON_SIZE[size] }), children, iconRight && jsxRuntime.jsx(Icon, { name: iconRight, size: PILL_ICON_SIZE[size] }), onClose && (jsxRuntime.jsx("button", { type: "button", className: "pill__close", onClick: onClose, "aria-label": closeAriaLabel, children: jsxRuntime.jsx(Icon, { name: "fa-xmark", size: "xs" }) }))] })));
19710
19713
  };
19711
19714
 
19712
19715
  const Badge = (_a) => {