@j2-health/design-system 0.1.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/README.md +113 -0
- package/dist/favicon.png +0 -0
- package/dist/index.cjs +3624 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +3606 -0
- package/dist/index.js.map +1 -0
- package/dist/lib.d.ts +2 -0
- package/dist/src/AppConfigProvider.d.ts +4 -0
- package/dist/src/appTheme.d.ts +2 -0
- package/dist/src/components/alert/Alert.d.ts +11 -0
- package/dist/src/components/alert/index.d.ts +1 -0
- package/dist/src/components/barchart/BarChart.d.ts +30 -0
- package/dist/src/components/barchart/index.d.ts +2 -0
- package/dist/src/components/breadcrumb/Breadcrumb.d.ts +14 -0
- package/dist/src/components/breadcrumb/index.d.ts +1 -0
- package/dist/src/components/bulkActionBar/BulkActionBar.d.ts +38 -0
- package/dist/src/components/bulkActionBar/index.d.ts +1 -0
- package/dist/src/components/button/Button.d.ts +4 -0
- package/dist/src/components/button/index.d.ts +1 -0
- package/dist/src/components/card/Card.d.ts +19 -0
- package/dist/src/components/card/index.d.ts +1 -0
- package/dist/src/components/checkbox/Checkbox.d.ts +7 -0
- package/dist/src/components/checkbox/index.d.ts +1 -0
- package/dist/src/components/checkboxTree/CheckboxTree.d.ts +27 -0
- package/dist/src/components/checkboxTree/TreeNode.d.ts +13 -0
- package/dist/src/components/checkboxTree/index.d.ts +1 -0
- package/dist/src/components/checkboxTree/utils.d.ts +9 -0
- package/dist/src/components/collapse/Collapse.d.ts +9 -0
- package/dist/src/components/collapse/index.d.ts +1 -0
- package/dist/src/components/drawer/Drawer.d.ts +9 -0
- package/dist/src/components/drawer/index.d.ts +1 -0
- package/dist/src/components/dropdown/Dropdown.d.ts +17 -0
- package/dist/src/components/dropdown/index.d.ts +1 -0
- package/dist/src/components/filterform/FilterGroup.d.ts +16 -0
- package/dist/src/components/filterform/FilterInput.d.ts +14 -0
- package/dist/src/components/filterform/FiltersForm.d.ts +10 -0
- package/dist/src/components/filterform/filterHelpers.d.ts +11 -0
- package/dist/src/components/filterform/index.d.ts +2 -0
- package/dist/src/components/filterform/types.d.ts +52 -0
- package/dist/src/components/filterform/useFilterField.d.ts +43 -0
- package/dist/src/components/filterform/useFiltersForm.d.ts +59 -0
- package/dist/src/components/form/Form.d.ts +7 -0
- package/dist/src/components/form/index.d.ts +1 -0
- package/dist/src/components/icons/index.d.ts +1 -0
- package/dist/src/components/input/AntdInput.d.ts +322 -0
- package/dist/src/components/input/AntdSearchInput.d.ts +327 -0
- package/dist/src/components/input/Input.d.ts +4 -0
- package/dist/src/components/input/index.d.ts +3 -0
- package/dist/src/components/inputnumber/InputNumber.d.ts +9 -0
- package/dist/src/components/inputnumber/index.d.ts +1 -0
- package/dist/src/components/legacyNavMenu/LegacyNavMenu.d.ts +27 -0
- package/dist/src/components/legacyNavMenu/UserProfile.d.ts +9 -0
- package/dist/src/components/legacyNavMenu/index.d.ts +4 -0
- package/dist/src/components/listpopover/ListPopover.d.ts +17 -0
- package/dist/src/components/listpopover/index.d.ts +1 -0
- package/dist/src/components/menu/Menu.d.ts +7 -0
- package/dist/src/components/menu/index.d.ts +2 -0
- package/dist/src/components/message/index.d.ts +2 -0
- package/dist/src/components/message/useMessage.d.ts +7 -0
- package/dist/src/components/modal/Modal.d.ts +6 -0
- package/dist/src/components/modal/index.d.ts +2 -0
- package/dist/src/components/navMenu/NavMenu.d.ts +14 -0
- package/dist/src/components/navMenu/index.d.ts +1 -0
- package/dist/src/components/notification/index.d.ts +2 -0
- package/dist/src/components/notification/useNotification.d.ts +10 -0
- package/dist/src/components/notificationModal/NotificationModal.d.ts +11 -0
- package/dist/src/components/notificationModal/index.d.ts +2 -0
- package/dist/src/components/pagination/Pagination.d.ts +18 -0
- package/dist/src/components/pagination/index.d.ts +1 -0
- package/dist/src/components/popover/Popover.d.ts +10 -0
- package/dist/src/components/popover/index.d.ts +1 -0
- package/dist/src/components/progress/Progress.d.ts +3 -0
- package/dist/src/components/progress/index.d.ts +1 -0
- package/dist/src/components/radio/Radio.d.ts +10 -0
- package/dist/src/components/radio/index.d.ts +1 -0
- package/dist/src/components/rate/Rate.d.ts +3 -0
- package/dist/src/components/rate/index.d.ts +1 -0
- package/dist/src/components/select/AntdSelect.d.ts +5 -0
- package/dist/src/components/select/Select.d.ts +7 -0
- package/dist/src/components/select/SummarizedSelect.d.ts +44 -0
- package/dist/src/components/select/index.d.ts +4 -0
- package/dist/src/components/skeleton/Skeleton.d.ts +11 -0
- package/dist/src/components/skeleton/index.d.ts +1 -0
- package/dist/src/components/spinner/Spinner.d.ts +6 -0
- package/dist/src/components/spinner/index.d.ts +1 -0
- package/dist/src/components/steps/Steps.d.ts +10 -0
- package/dist/src/components/steps/index.d.ts +2 -0
- package/dist/src/components/steps/useSteps.d.ts +17 -0
- package/dist/src/components/switch/Switch.d.ts +11 -0
- package/dist/src/components/switch/index.d.ts +1 -0
- package/dist/src/components/table/Table.d.ts +24 -0
- package/dist/src/components/table/index.d.ts +1 -0
- package/dist/src/components/tabs/Tabs.d.ts +3 -0
- package/dist/src/components/tabs/index.d.ts +1 -0
- package/dist/src/components/tag/Tag.d.ts +20 -0
- package/dist/src/components/tag/index.d.ts +1 -0
- package/dist/src/components/tooltip/Tooltip.d.ts +4 -0
- package/dist/src/components/tooltip/index.d.ts +1 -0
- package/dist/src/components/vennDiagram/VennDiagram.d.ts +9 -0
- package/dist/src/components/vennDiagram/index.d.ts +1 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/vite-env.d.ts +1 -0
- package/dist/style.css +1254 -0
- package/dist/tailwind.cjs +170 -0
- package/dist/tailwind.cjs.map +1 -0
- package/dist/tailwind.config.d.ts +305 -0
- package/dist/tailwind.js +170 -0
- package/dist/tailwind.js.map +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +125 -0
- package/src/stylesheets/index.css +327 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SelectProps } from 'antd';
|
|
2
|
+
import { DefaultOptionType } from 'antd/es/select';
|
|
3
|
+
type Option = DefaultOptionType;
|
|
4
|
+
type OptionWithLogo = Option & {
|
|
5
|
+
logo: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
type GroupOption = {
|
|
8
|
+
label: string;
|
|
9
|
+
options: Option[];
|
|
10
|
+
};
|
|
11
|
+
export type SelectOption = Option | GroupOption | OptionWithLogo;
|
|
12
|
+
export type SummarizedSelectVariant = SelectProps['variant'] | 'headlined';
|
|
13
|
+
export type SummarizedSelectTrigger = 'select' | 'dropdown';
|
|
14
|
+
type BaseProps = Omit<SelectProps<string | string[], SelectOption>, 'mode' | 'value' | 'onChange' | 'variant'> & {
|
|
15
|
+
searchPlaceholder?: string;
|
|
16
|
+
formControlPlaceholder?: string;
|
|
17
|
+
rootClassName?: string;
|
|
18
|
+
popupClassName?: string;
|
|
19
|
+
variant?: SummarizedSelectVariant;
|
|
20
|
+
/**
|
|
21
|
+
* Shape of the control that opens the popup.
|
|
22
|
+
* - `'select'` (default): antd Select, styled by `variant`.
|
|
23
|
+
* - `'dropdown'`: antd Dropdown with a `Typography.Link` target (label + caret).
|
|
24
|
+
* Ignores `variant` — the trigger is always a link.
|
|
25
|
+
*/
|
|
26
|
+
trigger?: SummarizedSelectTrigger;
|
|
27
|
+
defaultOpen?: boolean;
|
|
28
|
+
loading?: boolean;
|
|
29
|
+
};
|
|
30
|
+
type SingleProps = {
|
|
31
|
+
multiple?: false;
|
|
32
|
+
renderLabel?: undefined;
|
|
33
|
+
value: string | undefined;
|
|
34
|
+
onChange: (newValue: string) => void;
|
|
35
|
+
};
|
|
36
|
+
type MultiProps = {
|
|
37
|
+
multiple: true;
|
|
38
|
+
renderLabel: (count: number) => string;
|
|
39
|
+
value: string[];
|
|
40
|
+
onChange: (newValue: string[]) => void;
|
|
41
|
+
};
|
|
42
|
+
export type Props = BaseProps & (SingleProps | MultiProps);
|
|
43
|
+
export declare function SummarizedSelect({ searchPlaceholder, formControlPlaceholder, loading, multiple, value, onChange, options, renderLabel, rootClassName, popupClassName, variant, trigger, defaultOpen, ...props }: Props): import("react").JSX.Element;
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SkeletonProps as AntdSkeletonProps } from 'antd';
|
|
2
|
+
type SkeletonProps = Expand<AntdSkeletonProps>;
|
|
3
|
+
declare const Skeleton: {
|
|
4
|
+
(props: SkeletonProps): import("react").JSX.Element;
|
|
5
|
+
Node: import('react').FC<import('antd/es/skeleton/Node').SkeletonNodeProps>;
|
|
6
|
+
Avatar: import('react').FC<import('antd/es/skeleton/Avatar').AvatarProps>;
|
|
7
|
+
Input: import('react').FC<import('antd/es/skeleton/Input').SkeletonInputProps>;
|
|
8
|
+
Image: import('react').FC<import('antd/es/skeleton/Image').SkeletonImageProps>;
|
|
9
|
+
Button: import('react').FC<import('antd/es/skeleton/Button').SkeletonButtonProps>;
|
|
10
|
+
};
|
|
11
|
+
export { Skeleton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Skeleton } from './Skeleton';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Spinner } from './Spinner';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StepsProps, StepProps } from 'antd';
|
|
2
|
+
type AllProps = StepsProps & {
|
|
3
|
+
items: StepProps[];
|
|
4
|
+
dot?: boolean;
|
|
5
|
+
current?: number;
|
|
6
|
+
setCurrent?: (current: number) => void;
|
|
7
|
+
};
|
|
8
|
+
type Props = Expand<AllProps>;
|
|
9
|
+
export declare const Steps: ({ items, current, setCurrent, dot, ...props }: Props) => import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface UseStepsOptions {
|
|
2
|
+
current?: number;
|
|
3
|
+
setCurrent?: (current: number) => void;
|
|
4
|
+
totalSteps: number;
|
|
5
|
+
initialStep?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const useSteps: ({ current, setCurrent, totalSteps, initialStep, }: UseStepsOptions) => {
|
|
8
|
+
next: () => void;
|
|
9
|
+
previous: () => void;
|
|
10
|
+
goToStep: (step: number) => void;
|
|
11
|
+
cancel: () => void;
|
|
12
|
+
current: number;
|
|
13
|
+
setCurrent: (newCurrent: number) => void;
|
|
14
|
+
canGoNext: boolean;
|
|
15
|
+
canGoPrevious: boolean;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SwitchProps } from 'antd';
|
|
2
|
+
type AllProps = SwitchProps & {
|
|
3
|
+
small?: boolean;
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
checked?: boolean;
|
|
7
|
+
onChange?: (checked: boolean, event: Event) => void;
|
|
8
|
+
};
|
|
9
|
+
export type Props = Expand<AllProps>;
|
|
10
|
+
export declare const Switch: ({ small, loading, disabled, checked, onChange, ...props }: Props) => import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Switch } from './Switch';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Table as AntdTable, TableProps } from 'antd';
|
|
2
|
+
import { ComponentProps } from 'react';
|
|
3
|
+
import { AnyObject } from 'antd/es/_util/type';
|
|
4
|
+
type MergedProps<T> = TableProps<T> & {
|
|
5
|
+
verticalBorders?: boolean;
|
|
6
|
+
alternatingRows?: boolean;
|
|
7
|
+
columns?: TableProps<T>['columns'];
|
|
8
|
+
paginationTextLabels?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type Props<T> = Expand<MergedProps<T>>;
|
|
11
|
+
export declare const defaultSortIcon: ({ sortOrder, }: {
|
|
12
|
+
sortOrder: "ascend" | "descend" | null;
|
|
13
|
+
}) => import("react").JSX.Element;
|
|
14
|
+
declare const Table: {
|
|
15
|
+
<T extends unknown = any>({ verticalBorders, alternatingRows, paginationTextLabels, ...props }: Props<T>): import("react").JSX.Element;
|
|
16
|
+
Column: {
|
|
17
|
+
<T extends AnyObject>(props: ColumnProps<T>): import("react").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
Summary: typeof import('rc-table/lib/Footer/Summary').default;
|
|
21
|
+
};
|
|
22
|
+
type ColumnProps<T extends AnyObject> = Expand<ComponentProps<typeof AntdTable.Column<T>>>;
|
|
23
|
+
export type { TableColumnType } from 'antd';
|
|
24
|
+
export { Table };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Table } from './Table';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Tabs';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TagProps } from 'antd';
|
|
2
|
+
import { Icon } from '@phosphor-icons/react';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
type BaseProps = Expand<Omit<TagProps, 'icon'>> & {
|
|
5
|
+
status: 'default' | 'error' | 'success' | 'warning' | 'processing';
|
|
6
|
+
};
|
|
7
|
+
type DefaultSizeProps = BaseProps & {
|
|
8
|
+
size?: 'default';
|
|
9
|
+
icon?: Icon;
|
|
10
|
+
showIcon?: boolean;
|
|
11
|
+
};
|
|
12
|
+
type SmallSizeProps = BaseProps & {
|
|
13
|
+
size: 'small';
|
|
14
|
+
/** Icons are not supported on the small variant — omit this prop. */
|
|
15
|
+
icon?: never;
|
|
16
|
+
showIcon?: never;
|
|
17
|
+
};
|
|
18
|
+
type Props = DefaultSizeProps | SmallSizeProps;
|
|
19
|
+
export declare const Tag: ({ status, showIcon, icon, size, ...props }: Props) => React.JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tag } from './Tag';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Tooltip } from './Tooltip';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Highcharts from '../../../node_modules/highcharts/highcharts.src';
|
|
2
|
+
type Props = {
|
|
3
|
+
data: Highcharts.PointOptionsObject[];
|
|
4
|
+
title?: string;
|
|
5
|
+
tooltip?: Highcharts.TooltipOptions;
|
|
6
|
+
onClick?: Highcharts.SeriesClickCallbackFunction;
|
|
7
|
+
};
|
|
8
|
+
export declare const VennDiagram: ({ data, title, tooltip, onClick }: Props) => import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VennDiagram';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Expand<T> = T extends infer O ? { [K in keyof O]: O[K] } : never
|
|
2
|
+
declare module '*.svg?react' {
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
export const ReactComponent: React.FunctionComponent<
|
|
5
|
+
React.SVGProps<SVGSVGElement>
|
|
6
|
+
>
|
|
7
|
+
const src: string
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line import/no-default-export
|
|
10
|
+
export default src
|
|
11
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|