@indico-data/design-system 3.21.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/components/index.d.ts +1 -0
- package/lib/components/pill/Pill.d.ts +1 -1
- package/lib/components/pill/Pill.stories.d.ts +13 -3
- package/lib/components/pill/types.d.ts +22 -9
- package/lib/index.css +616 -2719
- package/lib/index.d.ts +22 -10
- package/lib/index.esm.css +616 -2719
- package/lib/index.esm.js +10 -7
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +10 -7
- package/lib/index.js.map +1 -1
- package/lib/types.d.ts +2 -2
- package/package.json +1 -1
- package/src/components/index.ts +1 -0
- package/src/components/pill/Pill.mdx +66 -7
- package/src/components/pill/Pill.stories.tsx +384 -116
- package/src/components/pill/Pill.tsx +39 -10
- package/src/components/pill/__tests__/Pill.test.tsx +104 -40
- package/src/components/pill/styles/Pill.scss +118 -21
- package/src/components/pill/styles/_tokens.scss +408 -0
- package/src/components/pill/types.ts +22 -10
- package/src/styles/index.scss +2 -0
- package/src/types.ts +7 -2
package/lib/index.d.ts
CHANGED
|
@@ -229,18 +229,30 @@ type IconProps = PermafrostComponent & {
|
|
|
229
229
|
};
|
|
230
230
|
|
|
231
231
|
type PillSize = 'sm' | 'md' | 'lg';
|
|
232
|
-
type PillColor = ChromaticColor;
|
|
233
|
-
type
|
|
234
|
-
|
|
232
|
+
type PillColor = ChromaticColor | 'soft';
|
|
233
|
+
type PillVariant = 'solid' | 'outline';
|
|
234
|
+
type PillType = 'pill' | 'badge';
|
|
235
|
+
interface PillProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
235
236
|
/** The content displayed inside the pill */
|
|
236
|
-
children
|
|
237
|
-
/**
|
|
237
|
+
children?: React$1.ReactNode;
|
|
238
|
+
/** The color scheme, maps to component token color groups */
|
|
238
239
|
color?: PillColor;
|
|
239
|
-
/**
|
|
240
|
+
/** Controls the overall size (padding + font size) */
|
|
240
241
|
size?: PillSize;
|
|
241
|
-
/**
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
/** Solid (filled) or outline (bordered) appearance */
|
|
243
|
+
variant?: PillVariant;
|
|
244
|
+
/** Badge has a small border-radius; pill is fully rounded */
|
|
245
|
+
type?: PillType;
|
|
246
|
+
/** Optional left icon (pass an IconName string, sizing is automatic) */
|
|
247
|
+
iconLeft?: IconName;
|
|
248
|
+
/** Optional right icon (pass an IconName string, sizing is automatic) */
|
|
249
|
+
iconRight?: IconName;
|
|
250
|
+
/** When true, renders a small colored dot indicator before the content */
|
|
251
|
+
dot?: boolean;
|
|
252
|
+
/** When provided, renders a close button that calls this handler */
|
|
253
|
+
onClose?: () => void;
|
|
254
|
+
/** Accessible label for the close button (for i18n) */
|
|
255
|
+
closeAriaLabel?: string;
|
|
244
256
|
}
|
|
245
257
|
|
|
246
258
|
type Direction = `${Direction$1}`;
|
|
@@ -840,7 +852,7 @@ type MenuProps = {
|
|
|
840
852
|
};
|
|
841
853
|
declare function Menu({ children, className, ...rest }: MenuProps): react_jsx_runtime.JSX.Element;
|
|
842
854
|
|
|
843
|
-
declare const Pill: ({ children,
|
|
855
|
+
declare const Pill: ({ children, color, size, variant, type, iconLeft, iconRight, dot, onClose, closeAriaLabel, className, ...rest }: PillProps) => react_jsx_runtime.JSX.Element;
|
|
844
856
|
|
|
845
857
|
type BadgeSizes = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
846
858
|
interface BadgeProps {
|