@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
|
@@ -20,6 +20,7 @@ export { SingleInputDatePicker } from './forms/date/inputDatePicker';
|
|
|
20
20
|
export { InputDateRangePicker } from './forms/date/inputDateRangePicker';
|
|
21
21
|
export { Modal, ConfirmationModal } from './modal';
|
|
22
22
|
export { Badge } from './badge';
|
|
23
|
+
export { Pill } from './pill';
|
|
23
24
|
export { Pagination } from './pagination';
|
|
24
25
|
export { TanstackTable } from './tanstackTable';
|
|
25
26
|
export { Tooltip } from './tooltip';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { type PillProps } from './types';
|
|
2
|
-
export declare const Pill: ({ children,
|
|
2
|
+
export declare const Pill: ({ children, color, size, variant, type, iconLeft, iconRight, dot, onClose, closeAriaLabel, className, ...rest }: PillProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { type Meta, type StoryObj } from '@storybook/react';
|
|
2
2
|
import { Pill } from './Pill';
|
|
3
|
-
declare const meta: Meta
|
|
3
|
+
declare const meta: Meta<typeof Pill>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Pill>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const AllSizes: Story;
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
8
|
+
export declare const SolidColors: Story;
|
|
9
|
+
export declare const OutlineColors: Story;
|
|
10
|
+
export declare const BadgeVsPill: Story;
|
|
11
|
+
export declare const WithIconLeft: Story;
|
|
12
|
+
export declare const WithIconRight: Story;
|
|
13
|
+
export declare const WithDot: Story;
|
|
14
|
+
export declare const IconOnly: Story;
|
|
15
|
+
export declare const Closeable: Story;
|
|
16
|
+
export declare const Combined: Story;
|
|
17
|
+
export declare const FullMatrix: Story;
|
|
18
|
+
export declare const CloseableMatrix: Story;
|
|
19
|
+
export declare const FigmaMatrix: Story;
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { type ChromaticColor } from '../../types';
|
|
2
|
+
import { type IconName } from '../icons/types';
|
|
2
3
|
import type React from 'react';
|
|
3
4
|
export type PillSize = 'sm' | 'md' | 'lg';
|
|
4
|
-
export type PillColor = ChromaticColor;
|
|
5
|
-
export type
|
|
6
|
-
export
|
|
5
|
+
export type PillColor = ChromaticColor | 'soft';
|
|
6
|
+
export type PillVariant = 'solid' | 'outline';
|
|
7
|
+
export type PillType = 'pill' | 'badge';
|
|
8
|
+
export interface PillProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
7
9
|
/** The content displayed inside the pill */
|
|
8
|
-
children
|
|
9
|
-
/**
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
/** The color scheme, maps to component token color groups */
|
|
10
12
|
color?: PillColor;
|
|
11
|
-
/**
|
|
13
|
+
/** Controls the overall size (padding + font size) */
|
|
12
14
|
size?: PillSize;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
/** Solid (filled) or outline (bordered) appearance */
|
|
16
|
+
variant?: PillVariant;
|
|
17
|
+
/** Badge has a small border-radius; pill is fully rounded */
|
|
18
|
+
type?: PillType;
|
|
19
|
+
/** Optional left icon (pass an IconName string, sizing is automatic) */
|
|
20
|
+
iconLeft?: IconName;
|
|
21
|
+
/** Optional right icon (pass an IconName string, sizing is automatic) */
|
|
22
|
+
iconRight?: IconName;
|
|
23
|
+
/** When true, renders a small colored dot indicator before the content */
|
|
24
|
+
dot?: boolean;
|
|
25
|
+
/** When provided, renders a close button that calls this handler */
|
|
26
|
+
onClose?: () => void;
|
|
27
|
+
/** Accessible label for the close button (for i18n) */
|
|
28
|
+
closeAriaLabel?: string;
|
|
16
29
|
}
|