@kaizen/components 1.24.0 → 1.24.2
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/cjs/{SuccessIcon-30c8cfe6.js → SuccessIcon-cb7b5e33.js} +1 -1
- package/dist/cjs/{SuccessIcon-30c8cfe6.js.map → SuccessIcon-cb7b5e33.js.map} +1 -1
- package/dist/cjs/{SuccessIcon-3b7434ae.js → SuccessIcon-d0cca714.js} +1 -1
- package/dist/cjs/{SuccessIcon-3b7434ae.js.map → SuccessIcon-d0cca714.js.map} +1 -1
- package/dist/cjs/dts/Avatar/Avatar.d.ts +50 -0
- package/dist/cjs/dts/Avatar/index.d.ts +1 -0
- package/dist/cjs/dts/AvatarGroup/AvatarGroup.d.ts +28 -0
- package/dist/cjs/dts/AvatarGroup/_docs/example-data.d.ts +8 -0
- package/dist/cjs/dts/AvatarGroup/index.d.ts +1 -0
- package/dist/cjs/dts/Badge/Badge.d.ts +32 -0
- package/dist/cjs/dts/Badge/index.d.ts +1 -0
- package/dist/cjs/dts/BrandMoment/BrandMoment.d.ts +4 -0
- package/dist/cjs/dts/Button/Button/Button.d.ts +8 -0
- package/dist/cjs/dts/Button/Button/index.d.ts +1 -0
- package/dist/cjs/dts/Button/DirectionalLink/DirectionalLink.d.ts +19 -0
- package/dist/cjs/dts/Button/DirectionalLink/index.d.ts +1 -0
- package/dist/cjs/dts/Button/{subcomponents → GenericButton}/GenericButton.d.ts +5 -6
- package/dist/cjs/dts/Button/GenericButton/index.d.ts +1 -0
- package/dist/cjs/dts/Button/IconButton/IconButton.d.ts +30 -0
- package/dist/cjs/dts/Button/IconButton/index.d.ts +1 -0
- package/dist/cjs/dts/Button/PaginationLink/PaginationLink.d.ts +19 -0
- package/dist/cjs/dts/Button/PaginationLink/index.d.ts +1 -0
- package/dist/cjs/dts/Button/index.d.ts +4 -1
- package/dist/cjs/dts/Card/Card.d.ts +26 -0
- package/dist/cjs/dts/Card/index.d.ts +1 -0
- package/dist/cjs/dts/Divider/Divider.d.ts +14 -0
- package/dist/cjs/dts/Divider/index.d.ts +1 -0
- package/dist/cjs/dts/EmptyState/EmptyState.d.ts +24 -0
- package/dist/cjs/dts/EmptyState/index.d.ts +1 -0
- package/dist/cjs/dts/FilterMultiSelect/FilterMultiSelect.d.ts +1 -1
- package/dist/cjs/dts/Heading/Heading.d.ts +26 -0
- package/dist/cjs/dts/Heading/index.d.ts +1 -0
- package/dist/cjs/dts/MultiSelect/subcomponents/Popover/Popover.d.ts +18 -0
- package/dist/cjs/dts/MultiSelect/subcomponents/Popover/index.d.ts +2 -0
- package/dist/cjs/dts/Notification/GenericNotification/GenericNotification.d.ts +38 -0
- package/dist/cjs/dts/Notification/GenericNotification/index.d.ts +3 -0
- package/dist/cjs/dts/Notification/GlobalNotification/GlobalNotification.d.ts +17 -0
- package/dist/cjs/dts/Notification/GlobalNotification/index.d.ts +1 -0
- package/dist/cjs/dts/Notification/InlineNotification/InlineNotification.d.ts +25 -0
- package/dist/cjs/dts/Notification/InlineNotification/index.d.ts +1 -0
- package/dist/cjs/dts/Notification/index.d.ts +2 -0
- package/dist/cjs/dts/Notification/types.d.ts +1 -0
- package/dist/cjs/dts/Text/Text.d.ts +23 -0
- package/dist/cjs/dts/Text/index.d.ts +1 -0
- package/dist/cjs/dts/index.d.ts +1 -1
- package/dist/cjs/dts/types/OverrideClassName.d.ts +1 -0
- package/dist/cjs/future.js +1 -1
- package/dist/cjs/index.css +3 -3
- package/dist/cjs/index.js +42 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/{SuccessIcon-24e9ab24.js → SuccessIcon-3556331e.js} +1 -1
- package/dist/esm/{SuccessIcon-24e9ab24.js.map → SuccessIcon-3556331e.js.map} +1 -1
- package/dist/esm/{SuccessIcon-a3db6485.js → SuccessIcon-9460f0cf.js} +1 -1
- package/dist/esm/{SuccessIcon-a3db6485.js.map → SuccessIcon-9460f0cf.js.map} +1 -1
- package/dist/esm/dts/Avatar/Avatar.d.ts +50 -0
- package/dist/esm/dts/Avatar/index.d.ts +1 -0
- package/dist/esm/dts/AvatarGroup/AvatarGroup.d.ts +28 -0
- package/dist/esm/dts/AvatarGroup/_docs/example-data.d.ts +8 -0
- package/dist/esm/dts/AvatarGroup/index.d.ts +1 -0
- package/dist/esm/dts/Badge/Badge.d.ts +32 -0
- package/dist/esm/dts/Badge/index.d.ts +1 -0
- package/dist/esm/dts/BrandMoment/BrandMoment.d.ts +4 -0
- package/dist/esm/dts/Button/Button/Button.d.ts +8 -0
- package/dist/esm/dts/Button/Button/index.d.ts +1 -0
- package/dist/esm/dts/Button/DirectionalLink/DirectionalLink.d.ts +19 -0
- package/dist/esm/dts/Button/DirectionalLink/index.d.ts +1 -0
- package/dist/esm/dts/Button/{subcomponents → GenericButton}/GenericButton.d.ts +5 -6
- package/dist/esm/dts/Button/GenericButton/index.d.ts +1 -0
- package/dist/esm/dts/Button/IconButton/IconButton.d.ts +30 -0
- package/dist/esm/dts/Button/IconButton/index.d.ts +1 -0
- package/dist/esm/dts/Button/PaginationLink/PaginationLink.d.ts +19 -0
- package/dist/esm/dts/Button/PaginationLink/index.d.ts +1 -0
- package/dist/esm/dts/Button/index.d.ts +4 -1
- package/dist/esm/dts/Card/Card.d.ts +26 -0
- package/dist/esm/dts/Card/index.d.ts +1 -0
- package/dist/esm/dts/Divider/Divider.d.ts +14 -0
- package/dist/esm/dts/Divider/index.d.ts +1 -0
- package/dist/esm/dts/EmptyState/EmptyState.d.ts +24 -0
- package/dist/esm/dts/EmptyState/index.d.ts +1 -0
- package/dist/esm/dts/FilterMultiSelect/FilterMultiSelect.d.ts +1 -1
- package/dist/esm/dts/Heading/Heading.d.ts +26 -0
- package/dist/esm/dts/Heading/index.d.ts +1 -0
- package/dist/esm/dts/MultiSelect/subcomponents/Popover/Popover.d.ts +18 -0
- package/dist/esm/dts/MultiSelect/subcomponents/Popover/index.d.ts +2 -0
- package/dist/esm/dts/Notification/GenericNotification/GenericNotification.d.ts +38 -0
- package/dist/esm/dts/Notification/GenericNotification/index.d.ts +3 -0
- package/dist/esm/dts/Notification/GlobalNotification/GlobalNotification.d.ts +17 -0
- package/dist/esm/dts/Notification/GlobalNotification/index.d.ts +1 -0
- package/dist/esm/dts/Notification/InlineNotification/InlineNotification.d.ts +25 -0
- package/dist/esm/dts/Notification/InlineNotification/index.d.ts +1 -0
- package/dist/esm/dts/Notification/index.d.ts +2 -0
- package/dist/esm/dts/Notification/types.d.ts +1 -0
- package/dist/esm/dts/Text/Text.d.ts +23 -0
- package/dist/esm/dts/Text/index.d.ts +1 -0
- package/dist/esm/dts/index.d.ts +1 -1
- package/dist/esm/dts/types/OverrideClassName.d.ts +1 -0
- package/dist/esm/future.js +1 -1
- package/dist/esm/index.css +4 -4
- package/dist/esm/index.js +40 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/index.d.ts +446 -387
- package/dist/styles.css +1 -1
- package/future/README.md +1 -1
- package/package.json +15 -6
- package/dist/cjs/dts/Button/Button.d.ts +0 -7
- package/dist/esm/dts/Button/Button.d.ts +0 -7
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React$1, { MouseEvent, FocusEvent, ComponentType, ButtonHTMLAttributes, HTMLAttributes, ReactNode, InputHTMLAttributes, CSSProperties, Context
|
|
2
|
+
import React$1, { MouseEvent, FocusEvent, ComponentType, ButtonHTMLAttributes, HTMLAttributes, ReactNode, SVGAttributes, InputHTMLAttributes, CSSProperties, Context } from 'react';
|
|
3
3
|
import { DateInputProps, CalendarSingleProps, DisabledDays, DateRange } from '@kaizen/date-picker';
|
|
4
4
|
export { DateRange, DisabledDays } from '@kaizen/date-picker';
|
|
5
5
|
import { FieldMessageStatus } from '@kaizen/draft-form';
|
|
@@ -44,7 +44,6 @@ type GenericProps = {
|
|
|
44
44
|
component?: ComponentType<CustomButtonProps>;
|
|
45
45
|
classNameOverride?: string;
|
|
46
46
|
};
|
|
47
|
-
type ButtonType = "submit" | "reset" | "button";
|
|
48
47
|
type WorkingProps = {
|
|
49
48
|
working: true;
|
|
50
49
|
workingLabel: string;
|
|
@@ -53,30 +52,23 @@ type WorkingProps = {
|
|
|
53
52
|
type WorkingUndefinedProps = {
|
|
54
53
|
working?: false;
|
|
55
54
|
};
|
|
56
|
-
type
|
|
55
|
+
type ButtonBadgeProps = {
|
|
57
56
|
text: string;
|
|
58
57
|
animateChange?: boolean;
|
|
59
58
|
variant?: "default" | "dark" | "active";
|
|
60
59
|
reversed?: boolean;
|
|
61
60
|
};
|
|
62
|
-
type RenderProps = ButtonProps & {
|
|
63
|
-
additionalContent?: React$1.ReactNode;
|
|
64
|
-
iconButton?: boolean;
|
|
65
|
-
directionalLink?: boolean;
|
|
66
|
-
paginationLink?: boolean;
|
|
67
|
-
isActive?: boolean;
|
|
68
|
-
};
|
|
69
61
|
type ButtonRef = {
|
|
70
62
|
focus: () => void;
|
|
71
63
|
};
|
|
72
|
-
type
|
|
64
|
+
type GenericButtonProps = GenericProps & ButtonFormAttributes & (WorkingProps | WorkingUndefinedProps) & {
|
|
73
65
|
label: string;
|
|
74
66
|
primary?: boolean;
|
|
75
67
|
destructive?: boolean;
|
|
76
68
|
secondary?: boolean;
|
|
77
69
|
/** @default "regular" */
|
|
78
70
|
size?: "small" | "regular";
|
|
79
|
-
badge?:
|
|
71
|
+
badge?: ButtonBadgeProps;
|
|
80
72
|
type?: "submit" | "reset" | "button";
|
|
81
73
|
fullWidth?: boolean;
|
|
82
74
|
iconPosition?: "start" | "end";
|
|
@@ -84,13 +76,80 @@ type ButtonProps = GenericProps & ButtonFormAttributes & (WorkingProps | Working
|
|
|
84
76
|
disabled?: boolean;
|
|
85
77
|
};
|
|
86
78
|
|
|
79
|
+
type ButtonProps = GenericButtonProps;
|
|
80
|
+
/**
|
|
81
|
+
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button Guidance} |
|
|
82
|
+
* {@link https://cultureamp.design/?path=/docs/components-buttons-button--docs Storybook}
|
|
83
|
+
*/
|
|
84
|
+
declare const Button: React$1.ForwardRefExoticComponent<GenericButtonProps & React$1.RefAttributes<ButtonRef | undefined>>;
|
|
85
|
+
|
|
86
|
+
type IconButtonProps = GenericProps & ButtonFormAttributes & (WorkingProps | WorkingUndefinedProps) & {
|
|
87
|
+
label: string;
|
|
88
|
+
primary?: boolean;
|
|
89
|
+
destructive?: boolean;
|
|
90
|
+
secondary?: boolean;
|
|
91
|
+
/** @default "regular" */
|
|
92
|
+
size?: "small" | "regular";
|
|
93
|
+
badge?: ButtonBadgeProps;
|
|
94
|
+
type?: "submit" | "reset" | "button";
|
|
95
|
+
fullWidth?: boolean;
|
|
96
|
+
icon?: JSX.Element;
|
|
97
|
+
disabled?: boolean;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3062890984/Button Guidance} |
|
|
101
|
+
* {@link https://cultureamp.design/?path=/docs/components-iconbutton--docs Storybook}
|
|
102
|
+
*/
|
|
103
|
+
declare const IconButton: {
|
|
104
|
+
(props: IconButtonProps): JSX.Element;
|
|
105
|
+
defaultProps: {
|
|
106
|
+
primary: boolean;
|
|
107
|
+
destructive: boolean;
|
|
108
|
+
disabled: boolean;
|
|
109
|
+
reversed: boolean;
|
|
110
|
+
secondary: boolean;
|
|
111
|
+
};
|
|
112
|
+
displayName: string;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
type PaginationLinkProps = GenericProps & {
|
|
116
|
+
pageNumber: number;
|
|
117
|
+
isActive?: boolean;
|
|
118
|
+
"aria-label": string;
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082092975/Pagination Guidance} |
|
|
122
|
+
* {@link https://cultureamp.design/?path=/story/components-buttons-paginationlink--docs Storybook}
|
|
123
|
+
*/
|
|
124
|
+
declare const PaginationLink: {
|
|
125
|
+
({ pageNumber, ...restProps }: PaginationLinkProps): JSX.Element;
|
|
126
|
+
defaultProps: {
|
|
127
|
+
reversed: boolean;
|
|
128
|
+
isActive: boolean;
|
|
129
|
+
};
|
|
130
|
+
displayName: string;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
type DirectionalLinkProps = {
|
|
134
|
+
label: string;
|
|
135
|
+
disabled?: boolean;
|
|
136
|
+
direction: "prev" | "next" | "start" | "end";
|
|
137
|
+
} & GenericProps;
|
|
87
138
|
/**
|
|
88
|
-
* {@link https://cultureamp.
|
|
89
|
-
* {@link https://cultureamp.design
|
|
139
|
+
* {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3082092975/Pagination Guidance} |
|
|
140
|
+
* {@link https://cultureamp.design/?path=/story/components-buttons-directionallink--docs Storybook}
|
|
90
141
|
*/
|
|
91
|
-
declare const
|
|
142
|
+
declare const DirectionalLink: {
|
|
143
|
+
(props: DirectionalLinkProps): JSX.Element;
|
|
144
|
+
defaultProps: {
|
|
145
|
+
reversed: boolean;
|
|
146
|
+
disabled: boolean;
|
|
147
|
+
};
|
|
148
|
+
displayName: string;
|
|
149
|
+
};
|
|
92
150
|
|
|
93
151
|
type OverrideClassName<T extends Record<string, any>> = Omit<T, "className"> & {
|
|
152
|
+
/** Add extra classnames to the component. Try out some Tailwind classes (eg. `!mb-48`) to see! */
|
|
94
153
|
classNameOverride?: string;
|
|
95
154
|
};
|
|
96
155
|
|
|
@@ -586,7 +645,7 @@ declare const FilterMultiSelect: {
|
|
|
586
645
|
displayName: string;
|
|
587
646
|
};
|
|
588
647
|
LoadMoreButton: {
|
|
589
|
-
(props:
|
|
648
|
+
(props: GenericButtonProps): JSX.Element;
|
|
590
649
|
displayName: string;
|
|
591
650
|
};
|
|
592
651
|
NoResults: {
|
|
@@ -781,378 +840,20 @@ declare const FilterBar: {
|
|
|
781
840
|
};
|
|
782
841
|
};
|
|
783
842
|
|
|
784
|
-
type
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
}
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
843
|
+
type BaseSVGProps = {
|
|
844
|
+
inheritSize?: boolean;
|
|
845
|
+
} & OverrideClassName<SVGAttributes<SVGElement>>;
|
|
846
|
+
type MeaningfulIcon = {
|
|
847
|
+
role: "img";
|
|
848
|
+
"aria-label": string;
|
|
849
|
+
};
|
|
850
|
+
type DecorativeIcon = {
|
|
851
|
+
role: "presentation";
|
|
852
|
+
"aria-label"?: never;
|
|
794
853
|
};
|
|
854
|
+
type IconProps = BaseSVGProps & (MeaningfulIcon | DecorativeIcon);
|
|
795
855
|
|
|
796
|
-
|
|
797
|
-
* Use this class to set and apply themes, and to access or subscribe to the currently active one.
|
|
798
|
-
* This class fulfills the idea of theming and runtime theme switching by relying on CSS variables,
|
|
799
|
-
* and the ability to update them in JavaScript - a framework agnostic method.
|
|
800
|
-
*
|
|
801
|
-
* It works by converting a Theme interface to a flattened map of CSS variable keys and values, then calling `document.documentElement.style.setProperty(key, value)`.
|
|
802
|
-
*/
|
|
803
|
-
declare class ThemeManager<Theme extends Theme$1 = Theme$1> {
|
|
804
|
-
private themeChangeListeners;
|
|
805
|
-
private theme;
|
|
806
|
-
private rootElement;
|
|
807
|
-
private rootElementId;
|
|
808
|
-
constructor(theme: Theme, rootElementId?: string, apply?: boolean);
|
|
809
|
-
getRootElement: () => HTMLElement | null;
|
|
810
|
-
getRootElementId: () => string;
|
|
811
|
-
getCurrentTheme: () => Theme;
|
|
812
|
-
setRootElement: (element: HTMLElement) => void;
|
|
813
|
-
setRootElementId: (rootElementId: string) => string;
|
|
814
|
-
setAndApplyTheme: (theme: Theme, force?: boolean) => void;
|
|
815
|
-
addThemeChangeListener: (listener: (theme: Theme) => void) => void;
|
|
816
|
-
removeThemeChangeListener: (listener: (theme: Theme) => void) => void;
|
|
817
|
-
applyCurrentTheme: () => void;
|
|
818
|
-
private notifyThemeChangeListeners;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
/**
|
|
822
|
-
* Use a custom type for CSS properties becauase we should eventually write a more strongly typed version using template literal types.
|
|
823
|
-
* This could definitely be contributed back to the community too. An example starting point here https://github.com/ghoullier/awesome-template-literal-types#css-parser
|
|
824
|
-
* For example:
|
|
825
|
-
* ```ts
|
|
826
|
-
* type Font = {
|
|
827
|
-
* fontSize: `${number}rem`,
|
|
828
|
-
*
|
|
829
|
-
* }
|
|
830
|
-
* type HexDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F ;
|
|
831
|
-
* type Color = `rgba(${number}, ${number}, ${number}, ${number}) | #${HexDigit}${HexDigit}${HexDigit}` // You get the point
|
|
832
|
-
*
|
|
833
|
-
* ```
|
|
834
|
-
* */
|
|
835
|
-
type KaizenCSSProperties = CSSProperties;
|
|
836
|
-
type Hex = string;
|
|
837
|
-
type TypographyFont = {
|
|
838
|
-
fontFamily: KaizenCSSProperties["fontFamily"];
|
|
839
|
-
fontWeight: KaizenCSSProperties["fontWeight"];
|
|
840
|
-
fontSize: KaizenCSSProperties["fontSize"];
|
|
841
|
-
lineHeight: KaizenCSSProperties["lineHeight"];
|
|
842
|
-
letterSpacing: KaizenCSSProperties["letterSpacing"];
|
|
843
|
-
};
|
|
844
|
-
type ThemeKey = "heart" | "custom";
|
|
845
|
-
type Theme = {
|
|
846
|
-
themeKey: ThemeKey;
|
|
847
|
-
border: {
|
|
848
|
-
solid: {
|
|
849
|
-
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
850
|
-
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
851
|
-
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
852
|
-
borderColor: KaizenCSSProperties["borderColor"];
|
|
853
|
-
};
|
|
854
|
-
dashed: {
|
|
855
|
-
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
856
|
-
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
857
|
-
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
858
|
-
};
|
|
859
|
-
borderless: {
|
|
860
|
-
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
861
|
-
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
862
|
-
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
863
|
-
borderColor: KaizenCSSProperties["borderColor"];
|
|
864
|
-
};
|
|
865
|
-
focusRing: {
|
|
866
|
-
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
867
|
-
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
868
|
-
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
869
|
-
};
|
|
870
|
-
};
|
|
871
|
-
animation: {
|
|
872
|
-
easingFunction: {
|
|
873
|
-
easeInOut: string;
|
|
874
|
-
easeIn: string;
|
|
875
|
-
easeOut: string;
|
|
876
|
-
linear: string;
|
|
877
|
-
bounceIn: string;
|
|
878
|
-
bounceOut: string;
|
|
879
|
-
bounceInOut: string;
|
|
880
|
-
};
|
|
881
|
-
duration: {
|
|
882
|
-
instant: string;
|
|
883
|
-
immediate: string;
|
|
884
|
-
rapid: string;
|
|
885
|
-
fast: string;
|
|
886
|
-
slow: string;
|
|
887
|
-
deliberate: string;
|
|
888
|
-
};
|
|
889
|
-
};
|
|
890
|
-
color: {
|
|
891
|
-
purple: {
|
|
892
|
-
"100": Hex;
|
|
893
|
-
"200": Hex;
|
|
894
|
-
"300": Hex;
|
|
895
|
-
"400": Hex;
|
|
896
|
-
"500": Hex;
|
|
897
|
-
"600": Hex;
|
|
898
|
-
"700": Hex;
|
|
899
|
-
"800": Hex;
|
|
900
|
-
};
|
|
901
|
-
blue: {
|
|
902
|
-
"100": Hex;
|
|
903
|
-
"200": Hex;
|
|
904
|
-
"300": Hex;
|
|
905
|
-
"400": Hex;
|
|
906
|
-
"500": Hex;
|
|
907
|
-
"600": Hex;
|
|
908
|
-
"700": Hex;
|
|
909
|
-
};
|
|
910
|
-
green: {
|
|
911
|
-
"100": Hex;
|
|
912
|
-
"200": Hex;
|
|
913
|
-
"300": Hex;
|
|
914
|
-
"400": Hex;
|
|
915
|
-
"500": Hex;
|
|
916
|
-
"600": Hex;
|
|
917
|
-
"700": Hex;
|
|
918
|
-
};
|
|
919
|
-
yellow: {
|
|
920
|
-
"100": Hex;
|
|
921
|
-
"200": Hex;
|
|
922
|
-
"300": Hex;
|
|
923
|
-
"400": Hex;
|
|
924
|
-
"500": Hex;
|
|
925
|
-
"600": Hex;
|
|
926
|
-
"700": Hex;
|
|
927
|
-
};
|
|
928
|
-
red: {
|
|
929
|
-
"100": Hex;
|
|
930
|
-
"200": Hex;
|
|
931
|
-
"300": Hex;
|
|
932
|
-
"400": Hex;
|
|
933
|
-
"500": Hex;
|
|
934
|
-
"600": Hex;
|
|
935
|
-
"700": Hex;
|
|
936
|
-
};
|
|
937
|
-
orange: {
|
|
938
|
-
"100": Hex;
|
|
939
|
-
"200": Hex;
|
|
940
|
-
"300": Hex;
|
|
941
|
-
"400": Hex;
|
|
942
|
-
"500": Hex;
|
|
943
|
-
"600": Hex;
|
|
944
|
-
"700": Hex;
|
|
945
|
-
};
|
|
946
|
-
gray: {
|
|
947
|
-
"100": Hex;
|
|
948
|
-
"200": Hex;
|
|
949
|
-
"300": Hex;
|
|
950
|
-
"400": Hex;
|
|
951
|
-
"500": Hex;
|
|
952
|
-
"600": Hex;
|
|
953
|
-
};
|
|
954
|
-
white: Hex;
|
|
955
|
-
};
|
|
956
|
-
dataViz: {
|
|
957
|
-
favorable: Hex;
|
|
958
|
-
unfavorable: Hex;
|
|
959
|
-
};
|
|
960
|
-
layout: {
|
|
961
|
-
contentMaxWidth: string;
|
|
962
|
-
contentMaxWidthWithSidebar: string;
|
|
963
|
-
contentSideMargin: string;
|
|
964
|
-
mobileActionsDrawerHeight: string;
|
|
965
|
-
navigationBarHeight: string;
|
|
966
|
-
breakpoints: {
|
|
967
|
-
medium: string;
|
|
968
|
-
large: string;
|
|
969
|
-
};
|
|
970
|
-
};
|
|
971
|
-
shadow: {
|
|
972
|
-
small: {
|
|
973
|
-
boxShadow: string;
|
|
974
|
-
};
|
|
975
|
-
large: {
|
|
976
|
-
boxShadow: string;
|
|
977
|
-
};
|
|
978
|
-
};
|
|
979
|
-
spacing: {
|
|
980
|
-
xs: string;
|
|
981
|
-
sm: string;
|
|
982
|
-
md: string;
|
|
983
|
-
lg: string;
|
|
984
|
-
xl: string;
|
|
985
|
-
xxl: string;
|
|
986
|
-
xxxl: string;
|
|
987
|
-
xxxxl: string;
|
|
988
|
-
xxxxxl: string;
|
|
989
|
-
0: string;
|
|
990
|
-
1: string;
|
|
991
|
-
2: string;
|
|
992
|
-
4: string;
|
|
993
|
-
6: string;
|
|
994
|
-
8: string;
|
|
995
|
-
12: string;
|
|
996
|
-
16: string;
|
|
997
|
-
24: string;
|
|
998
|
-
32: string;
|
|
999
|
-
40: string;
|
|
1000
|
-
48: string;
|
|
1001
|
-
56: string;
|
|
1002
|
-
64: string;
|
|
1003
|
-
72: string;
|
|
1004
|
-
80: string;
|
|
1005
|
-
96: string;
|
|
1006
|
-
112: string;
|
|
1007
|
-
128: string;
|
|
1008
|
-
160: string;
|
|
1009
|
-
200: string;
|
|
1010
|
-
240: string;
|
|
1011
|
-
280: string;
|
|
1012
|
-
320: string;
|
|
1013
|
-
};
|
|
1014
|
-
typography: {
|
|
1015
|
-
dataLarge: TypographyFont;
|
|
1016
|
-
dataLargeUnits: TypographyFont;
|
|
1017
|
-
dataMedium: TypographyFont;
|
|
1018
|
-
dataMediumUnits: TypographyFont;
|
|
1019
|
-
dataSmall: TypographyFont;
|
|
1020
|
-
dataSmallUnits: TypographyFont;
|
|
1021
|
-
display0: TypographyFont;
|
|
1022
|
-
heading1: TypographyFont;
|
|
1023
|
-
heading2: TypographyFont;
|
|
1024
|
-
heading3: TypographyFont;
|
|
1025
|
-
heading4: TypographyFont;
|
|
1026
|
-
heading5: TypographyFont;
|
|
1027
|
-
heading6: TypographyFont;
|
|
1028
|
-
paragraphIntroLede: TypographyFont;
|
|
1029
|
-
paragraphBody: TypographyFont;
|
|
1030
|
-
paragraphSmall: TypographyFont;
|
|
1031
|
-
paragraphExtraSmall: TypographyFont;
|
|
1032
|
-
paragraphBold: {
|
|
1033
|
-
fontWeight: KaizenCSSProperties["fontWeight"];
|
|
1034
|
-
};
|
|
1035
|
-
buttonPrimary: TypographyFont;
|
|
1036
|
-
buttonSecondary: TypographyFont;
|
|
1037
|
-
};
|
|
1038
|
-
};
|
|
1039
|
-
type DeepMapObjectLeafs<T, LeafType> = T extends string | number | bigint | boolean | symbol | null | undefined | ((...params: any[]) => any) ? LeafType : T extends Record<any, any> ? {
|
|
1040
|
-
[Key in keyof T]: DeepMapObjectLeafs<T[Key], LeafType>;
|
|
1041
|
-
} : T;
|
|
1042
|
-
/**
|
|
1043
|
-
* Apologies for the complex types.
|
|
1044
|
-
* This type represents the Theme type but with every leaf value in the tree mapped strictly to a string, rather than a number or a more complex type such as a string union.
|
|
1045
|
-
* The reason for this is to have a more accurate type for the generated hierarchy of design tokens which are represented as CSS custom properties, e.g. `var(--color-purple-800)`.
|
|
1046
|
-
*/
|
|
1047
|
-
type CSSVariableTheme = DeepMapObjectLeafs<Theme, string>;
|
|
1048
|
-
|
|
1049
|
-
declare const heartTheme: Theme;
|
|
1050
|
-
|
|
1051
|
-
declare const defaultTheme: Theme;
|
|
1052
|
-
|
|
1053
|
-
declare const ThemeContext: Context<Theme>;
|
|
1054
|
-
/**
|
|
1055
|
-
* Wrap your application in this provider using a ThemeManager, to synchronise it with a react context.
|
|
1056
|
-
* This allows child react elements to more easily use theme variables, using the {@link useTheme} hook.
|
|
1057
|
-
*/
|
|
1058
|
-
declare const ThemeProvider: ({ themeManager, ...props }: {
|
|
1059
|
-
themeManager?: ThemeManager<_kaizen_design_tokens.Theme> | undefined;
|
|
1060
|
-
children: React$1.ReactNode;
|
|
1061
|
-
}) => JSX.Element;
|
|
1062
|
-
declare const useTheme: () => Theme;
|
|
1063
|
-
|
|
1064
|
-
type KaizenProviderProps = {
|
|
1065
|
-
children: React$1.ReactNode;
|
|
1066
|
-
themeManager?: ThemeManager;
|
|
1067
|
-
locale?: string;
|
|
1068
|
-
};
|
|
1069
|
-
declare const KaizenProvider: {
|
|
1070
|
-
({ children, themeManager, locale, }: KaizenProviderProps): JSX.Element;
|
|
1071
|
-
displayName: string;
|
|
1072
|
-
};
|
|
1073
|
-
|
|
1074
|
-
type ProgressStepperProps = {
|
|
1075
|
-
stepName: string;
|
|
1076
|
-
steps: [string, ...string[]];
|
|
1077
|
-
isComplete?: boolean;
|
|
1078
|
-
};
|
|
1079
|
-
|
|
1080
|
-
type FooterProps = {
|
|
1081
|
-
/** An action to return to a previous step */
|
|
1082
|
-
previousAction?: JSX.Element;
|
|
1083
|
-
/** An action to progress to the next step or submit the form */
|
|
1084
|
-
nextAction?: JSX.Element;
|
|
1085
|
-
} & ProgressStepperProps & OverrideClassName<Omit<HTMLAttributes<HTMLElement>, "children">>;
|
|
1086
|
-
|
|
1087
|
-
type WorkflowStatus = {
|
|
1088
|
-
/** @default: "statusDraft" */
|
|
1089
|
-
variant?: DefaultTagProps["variant"];
|
|
1090
|
-
content?: string;
|
|
1091
|
-
};
|
|
1092
|
-
type WorkflowTitlesProps = {
|
|
1093
|
-
workflowName: string;
|
|
1094
|
-
stepName: string;
|
|
1095
|
-
status?: WorkflowStatus;
|
|
1096
|
-
} & OverrideClassName<HTMLAttributes<HTMLDivElement>>;
|
|
1097
|
-
|
|
1098
|
-
type WorkflowActionsProps = {
|
|
1099
|
-
/**
|
|
1100
|
-
* Header actions will render in order of the array.
|
|
1101
|
-
*/
|
|
1102
|
-
headerActions?: JSX.Element[];
|
|
1103
|
-
} & OverrideClassName<Omit<HTMLAttributes<HTMLDivElement>, "children">>;
|
|
1104
|
-
|
|
1105
|
-
type HeaderProps = WorkflowTitlesProps & WorkflowActionsProps;
|
|
1106
|
-
|
|
1107
|
-
type WorkflowMainProps = OverrideClassName<HTMLAttributes<HTMLDivElement>> & {
|
|
1108
|
-
children: ReactNode;
|
|
1109
|
-
};
|
|
1110
|
-
|
|
1111
|
-
type WorkflowWrapperProps = OverrideClassName<HTMLAttributes<HTMLDivElement>> & {
|
|
1112
|
-
children: ReactNode;
|
|
1113
|
-
};
|
|
1114
|
-
|
|
1115
|
-
type WorkflowProps = OverrideClassName<HTMLAttributes<HTMLDivElement>> & FooterProps & HeaderProps;
|
|
1116
|
-
/**
|
|
1117
|
-
* @deprecated Use { Workflow } from `@kaizen/components/future`
|
|
1118
|
-
*/
|
|
1119
|
-
declare const Workflow: (({ stepName, steps, isComplete, workflowName, status, headerActions, children, nextAction, previousAction, classNameOverride, ...restProps }: WorkflowProps) => JSX.Element) & {
|
|
1120
|
-
Header: {
|
|
1121
|
-
({ workflowName, stepName, status, headerActions, ...restProps }: HeaderProps): JSX.Element;
|
|
1122
|
-
displayName: string;
|
|
1123
|
-
};
|
|
1124
|
-
Footer: {
|
|
1125
|
-
({ steps, stepName, isComplete, previousAction, nextAction, ...restProps }: FooterProps): JSX.Element;
|
|
1126
|
-
displayName: string;
|
|
1127
|
-
};
|
|
1128
|
-
Main: {
|
|
1129
|
-
({ children, classNameOverride, ...restProps }: WorkflowMainProps): JSX.Element;
|
|
1130
|
-
displayName: string;
|
|
1131
|
-
};
|
|
1132
|
-
ProgressStepper: {
|
|
1133
|
-
({ stepName, steps, isComplete, ...restprops }: ProgressStepperProps): JSX.Element;
|
|
1134
|
-
displayName: string;
|
|
1135
|
-
};
|
|
1136
|
-
Wrapper: {
|
|
1137
|
-
({ children, classNameOverride, ...restProps }: WorkflowWrapperProps): JSX.Element;
|
|
1138
|
-
displayName: string;
|
|
1139
|
-
};
|
|
1140
|
-
};
|
|
1141
|
-
|
|
1142
|
-
type BaseSVGProps = {
|
|
1143
|
-
inheritSize?: boolean;
|
|
1144
|
-
} & OverrideClassName<SVGAttributes<SVGElement>>;
|
|
1145
|
-
type MeaningfulIcon = {
|
|
1146
|
-
role: "img";
|
|
1147
|
-
"aria-label": string;
|
|
1148
|
-
};
|
|
1149
|
-
type DecorativeIcon = {
|
|
1150
|
-
role: "presentation";
|
|
1151
|
-
"aria-label"?: never;
|
|
1152
|
-
};
|
|
1153
|
-
type IconProps = BaseSVGProps & (MeaningfulIcon | DecorativeIcon);
|
|
1154
|
-
|
|
1155
|
-
declare const AcademyIcon: (props: IconProps) => JSX.Element;
|
|
856
|
+
declare const AcademyIcon: (props: IconProps) => JSX.Element;
|
|
1156
857
|
|
|
1157
858
|
declare const ActionOffIcon: (props: IconProps) => JSX.Element;
|
|
1158
859
|
|
|
@@ -1624,4 +1325,362 @@ declare const ZoomInIcon: (props: IconProps) => JSX.Element;
|
|
|
1624
1325
|
|
|
1625
1326
|
declare const ZoomOutIcon: (props: IconProps) => JSX.Element;
|
|
1626
1327
|
|
|
1627
|
-
|
|
1328
|
+
type InputSearchProps = {
|
|
1329
|
+
id: string;
|
|
1330
|
+
reversed?: boolean;
|
|
1331
|
+
loading?: boolean;
|
|
1332
|
+
secondary?: boolean;
|
|
1333
|
+
onClear?: () => void;
|
|
1334
|
+
} & OverrideClassName<Omit<InputHTMLAttributes<HTMLInputElement>, "defaultValue">>;
|
|
1335
|
+
declare const InputSearch: {
|
|
1336
|
+
(props: InputSearchProps): JSX.Element;
|
|
1337
|
+
displayName: string;
|
|
1338
|
+
};
|
|
1339
|
+
|
|
1340
|
+
/**
|
|
1341
|
+
* Use this class to set and apply themes, and to access or subscribe to the currently active one.
|
|
1342
|
+
* This class fulfills the idea of theming and runtime theme switching by relying on CSS variables,
|
|
1343
|
+
* and the ability to update them in JavaScript - a framework agnostic method.
|
|
1344
|
+
*
|
|
1345
|
+
* It works by converting a Theme interface to a flattened map of CSS variable keys and values, then calling `document.documentElement.style.setProperty(key, value)`.
|
|
1346
|
+
*/
|
|
1347
|
+
declare class ThemeManager<Theme extends Theme$1 = Theme$1> {
|
|
1348
|
+
private themeChangeListeners;
|
|
1349
|
+
private theme;
|
|
1350
|
+
private rootElement;
|
|
1351
|
+
private rootElementId;
|
|
1352
|
+
constructor(theme: Theme, rootElementId?: string, apply?: boolean);
|
|
1353
|
+
getRootElement: () => HTMLElement | null;
|
|
1354
|
+
getRootElementId: () => string;
|
|
1355
|
+
getCurrentTheme: () => Theme;
|
|
1356
|
+
setRootElement: (element: HTMLElement) => void;
|
|
1357
|
+
setRootElementId: (rootElementId: string) => string;
|
|
1358
|
+
setAndApplyTheme: (theme: Theme, force?: boolean) => void;
|
|
1359
|
+
addThemeChangeListener: (listener: (theme: Theme) => void) => void;
|
|
1360
|
+
removeThemeChangeListener: (listener: (theme: Theme) => void) => void;
|
|
1361
|
+
applyCurrentTheme: () => void;
|
|
1362
|
+
private notifyThemeChangeListeners;
|
|
1363
|
+
}
|
|
1364
|
+
|
|
1365
|
+
/**
|
|
1366
|
+
* Use a custom type for CSS properties becauase we should eventually write a more strongly typed version using template literal types.
|
|
1367
|
+
* This could definitely be contributed back to the community too. An example starting point here https://github.com/ghoullier/awesome-template-literal-types#css-parser
|
|
1368
|
+
* For example:
|
|
1369
|
+
* ```ts
|
|
1370
|
+
* type Font = {
|
|
1371
|
+
* fontSize: `${number}rem`,
|
|
1372
|
+
*
|
|
1373
|
+
* }
|
|
1374
|
+
* type HexDigit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F ;
|
|
1375
|
+
* type Color = `rgba(${number}, ${number}, ${number}, ${number}) | #${HexDigit}${HexDigit}${HexDigit}` // You get the point
|
|
1376
|
+
*
|
|
1377
|
+
* ```
|
|
1378
|
+
* */
|
|
1379
|
+
type KaizenCSSProperties = CSSProperties;
|
|
1380
|
+
type Hex = string;
|
|
1381
|
+
type TypographyFont = {
|
|
1382
|
+
fontFamily: KaizenCSSProperties["fontFamily"];
|
|
1383
|
+
fontWeight: KaizenCSSProperties["fontWeight"];
|
|
1384
|
+
fontSize: KaizenCSSProperties["fontSize"];
|
|
1385
|
+
lineHeight: KaizenCSSProperties["lineHeight"];
|
|
1386
|
+
letterSpacing: KaizenCSSProperties["letterSpacing"];
|
|
1387
|
+
};
|
|
1388
|
+
type ThemeKey = "heart" | "custom";
|
|
1389
|
+
type Theme = {
|
|
1390
|
+
themeKey: ThemeKey;
|
|
1391
|
+
border: {
|
|
1392
|
+
solid: {
|
|
1393
|
+
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
1394
|
+
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
1395
|
+
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
1396
|
+
borderColor: KaizenCSSProperties["borderColor"];
|
|
1397
|
+
};
|
|
1398
|
+
dashed: {
|
|
1399
|
+
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
1400
|
+
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
1401
|
+
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
1402
|
+
};
|
|
1403
|
+
borderless: {
|
|
1404
|
+
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
1405
|
+
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
1406
|
+
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
1407
|
+
borderColor: KaizenCSSProperties["borderColor"];
|
|
1408
|
+
};
|
|
1409
|
+
focusRing: {
|
|
1410
|
+
borderWidth: KaizenCSSProperties["borderWidth"];
|
|
1411
|
+
borderRadius: KaizenCSSProperties["borderRadius"];
|
|
1412
|
+
borderStyle: KaizenCSSProperties["borderStyle"];
|
|
1413
|
+
};
|
|
1414
|
+
};
|
|
1415
|
+
animation: {
|
|
1416
|
+
easingFunction: {
|
|
1417
|
+
easeInOut: string;
|
|
1418
|
+
easeIn: string;
|
|
1419
|
+
easeOut: string;
|
|
1420
|
+
linear: string;
|
|
1421
|
+
bounceIn: string;
|
|
1422
|
+
bounceOut: string;
|
|
1423
|
+
bounceInOut: string;
|
|
1424
|
+
};
|
|
1425
|
+
duration: {
|
|
1426
|
+
instant: string;
|
|
1427
|
+
immediate: string;
|
|
1428
|
+
rapid: string;
|
|
1429
|
+
fast: string;
|
|
1430
|
+
slow: string;
|
|
1431
|
+
deliberate: string;
|
|
1432
|
+
};
|
|
1433
|
+
};
|
|
1434
|
+
color: {
|
|
1435
|
+
purple: {
|
|
1436
|
+
"100": Hex;
|
|
1437
|
+
"200": Hex;
|
|
1438
|
+
"300": Hex;
|
|
1439
|
+
"400": Hex;
|
|
1440
|
+
"500": Hex;
|
|
1441
|
+
"600": Hex;
|
|
1442
|
+
"700": Hex;
|
|
1443
|
+
"800": Hex;
|
|
1444
|
+
};
|
|
1445
|
+
blue: {
|
|
1446
|
+
"100": Hex;
|
|
1447
|
+
"200": Hex;
|
|
1448
|
+
"300": Hex;
|
|
1449
|
+
"400": Hex;
|
|
1450
|
+
"500": Hex;
|
|
1451
|
+
"600": Hex;
|
|
1452
|
+
"700": Hex;
|
|
1453
|
+
};
|
|
1454
|
+
green: {
|
|
1455
|
+
"100": Hex;
|
|
1456
|
+
"200": Hex;
|
|
1457
|
+
"300": Hex;
|
|
1458
|
+
"400": Hex;
|
|
1459
|
+
"500": Hex;
|
|
1460
|
+
"600": Hex;
|
|
1461
|
+
"700": Hex;
|
|
1462
|
+
};
|
|
1463
|
+
yellow: {
|
|
1464
|
+
"100": Hex;
|
|
1465
|
+
"200": Hex;
|
|
1466
|
+
"300": Hex;
|
|
1467
|
+
"400": Hex;
|
|
1468
|
+
"500": Hex;
|
|
1469
|
+
"600": Hex;
|
|
1470
|
+
"700": Hex;
|
|
1471
|
+
};
|
|
1472
|
+
red: {
|
|
1473
|
+
"100": Hex;
|
|
1474
|
+
"200": Hex;
|
|
1475
|
+
"300": Hex;
|
|
1476
|
+
"400": Hex;
|
|
1477
|
+
"500": Hex;
|
|
1478
|
+
"600": Hex;
|
|
1479
|
+
"700": Hex;
|
|
1480
|
+
};
|
|
1481
|
+
orange: {
|
|
1482
|
+
"100": Hex;
|
|
1483
|
+
"200": Hex;
|
|
1484
|
+
"300": Hex;
|
|
1485
|
+
"400": Hex;
|
|
1486
|
+
"500": Hex;
|
|
1487
|
+
"600": Hex;
|
|
1488
|
+
"700": Hex;
|
|
1489
|
+
};
|
|
1490
|
+
gray: {
|
|
1491
|
+
"100": Hex;
|
|
1492
|
+
"200": Hex;
|
|
1493
|
+
"300": Hex;
|
|
1494
|
+
"400": Hex;
|
|
1495
|
+
"500": Hex;
|
|
1496
|
+
"600": Hex;
|
|
1497
|
+
};
|
|
1498
|
+
white: Hex;
|
|
1499
|
+
};
|
|
1500
|
+
dataViz: {
|
|
1501
|
+
favorable: Hex;
|
|
1502
|
+
unfavorable: Hex;
|
|
1503
|
+
};
|
|
1504
|
+
layout: {
|
|
1505
|
+
contentMaxWidth: string;
|
|
1506
|
+
contentMaxWidthWithSidebar: string;
|
|
1507
|
+
contentSideMargin: string;
|
|
1508
|
+
mobileActionsDrawerHeight: string;
|
|
1509
|
+
navigationBarHeight: string;
|
|
1510
|
+
breakpoints: {
|
|
1511
|
+
medium: string;
|
|
1512
|
+
large: string;
|
|
1513
|
+
};
|
|
1514
|
+
};
|
|
1515
|
+
shadow: {
|
|
1516
|
+
small: {
|
|
1517
|
+
boxShadow: string;
|
|
1518
|
+
};
|
|
1519
|
+
large: {
|
|
1520
|
+
boxShadow: string;
|
|
1521
|
+
};
|
|
1522
|
+
};
|
|
1523
|
+
spacing: {
|
|
1524
|
+
xs: string;
|
|
1525
|
+
sm: string;
|
|
1526
|
+
md: string;
|
|
1527
|
+
lg: string;
|
|
1528
|
+
xl: string;
|
|
1529
|
+
xxl: string;
|
|
1530
|
+
xxxl: string;
|
|
1531
|
+
xxxxl: string;
|
|
1532
|
+
xxxxxl: string;
|
|
1533
|
+
0: string;
|
|
1534
|
+
1: string;
|
|
1535
|
+
2: string;
|
|
1536
|
+
4: string;
|
|
1537
|
+
6: string;
|
|
1538
|
+
8: string;
|
|
1539
|
+
12: string;
|
|
1540
|
+
16: string;
|
|
1541
|
+
24: string;
|
|
1542
|
+
32: string;
|
|
1543
|
+
40: string;
|
|
1544
|
+
48: string;
|
|
1545
|
+
56: string;
|
|
1546
|
+
64: string;
|
|
1547
|
+
72: string;
|
|
1548
|
+
80: string;
|
|
1549
|
+
96: string;
|
|
1550
|
+
112: string;
|
|
1551
|
+
128: string;
|
|
1552
|
+
160: string;
|
|
1553
|
+
200: string;
|
|
1554
|
+
240: string;
|
|
1555
|
+
280: string;
|
|
1556
|
+
320: string;
|
|
1557
|
+
};
|
|
1558
|
+
typography: {
|
|
1559
|
+
dataLarge: TypographyFont;
|
|
1560
|
+
dataLargeUnits: TypographyFont;
|
|
1561
|
+
dataMedium: TypographyFont;
|
|
1562
|
+
dataMediumUnits: TypographyFont;
|
|
1563
|
+
dataSmall: TypographyFont;
|
|
1564
|
+
dataSmallUnits: TypographyFont;
|
|
1565
|
+
display0: TypographyFont;
|
|
1566
|
+
heading1: TypographyFont;
|
|
1567
|
+
heading2: TypographyFont;
|
|
1568
|
+
heading3: TypographyFont;
|
|
1569
|
+
heading4: TypographyFont;
|
|
1570
|
+
heading5: TypographyFont;
|
|
1571
|
+
heading6: TypographyFont;
|
|
1572
|
+
paragraphIntroLede: TypographyFont;
|
|
1573
|
+
paragraphBody: TypographyFont;
|
|
1574
|
+
paragraphSmall: TypographyFont;
|
|
1575
|
+
paragraphExtraSmall: TypographyFont;
|
|
1576
|
+
paragraphBold: {
|
|
1577
|
+
fontWeight: KaizenCSSProperties["fontWeight"];
|
|
1578
|
+
};
|
|
1579
|
+
buttonPrimary: TypographyFont;
|
|
1580
|
+
buttonSecondary: TypographyFont;
|
|
1581
|
+
};
|
|
1582
|
+
};
|
|
1583
|
+
type DeepMapObjectLeafs<T, LeafType> = T extends string | number | bigint | boolean | symbol | null | undefined | ((...params: any[]) => any) ? LeafType : T extends Record<any, any> ? {
|
|
1584
|
+
[Key in keyof T]: DeepMapObjectLeafs<T[Key], LeafType>;
|
|
1585
|
+
} : T;
|
|
1586
|
+
/**
|
|
1587
|
+
* Apologies for the complex types.
|
|
1588
|
+
* This type represents the Theme type but with every leaf value in the tree mapped strictly to a string, rather than a number or a more complex type such as a string union.
|
|
1589
|
+
* The reason for this is to have a more accurate type for the generated hierarchy of design tokens which are represented as CSS custom properties, e.g. `var(--color-purple-800)`.
|
|
1590
|
+
*/
|
|
1591
|
+
type CSSVariableTheme = DeepMapObjectLeafs<Theme, string>;
|
|
1592
|
+
|
|
1593
|
+
declare const heartTheme: Theme;
|
|
1594
|
+
|
|
1595
|
+
declare const defaultTheme: Theme;
|
|
1596
|
+
|
|
1597
|
+
declare const ThemeContext: Context<Theme>;
|
|
1598
|
+
/**
|
|
1599
|
+
* Wrap your application in this provider using a ThemeManager, to synchronise it with a react context.
|
|
1600
|
+
* This allows child react elements to more easily use theme variables, using the {@link useTheme} hook.
|
|
1601
|
+
*/
|
|
1602
|
+
declare const ThemeProvider: ({ themeManager, ...props }: {
|
|
1603
|
+
themeManager?: ThemeManager<_kaizen_design_tokens.Theme> | undefined;
|
|
1604
|
+
children: React$1.ReactNode;
|
|
1605
|
+
}) => JSX.Element;
|
|
1606
|
+
declare const useTheme: () => Theme;
|
|
1607
|
+
|
|
1608
|
+
type KaizenProviderProps = {
|
|
1609
|
+
children: React$1.ReactNode;
|
|
1610
|
+
themeManager?: ThemeManager;
|
|
1611
|
+
locale?: string;
|
|
1612
|
+
};
|
|
1613
|
+
declare const KaizenProvider: {
|
|
1614
|
+
({ children, themeManager, locale, }: KaizenProviderProps): JSX.Element;
|
|
1615
|
+
displayName: string;
|
|
1616
|
+
};
|
|
1617
|
+
|
|
1618
|
+
type ProgressStepperProps = {
|
|
1619
|
+
stepName: string;
|
|
1620
|
+
steps: [string, ...string[]];
|
|
1621
|
+
isComplete?: boolean;
|
|
1622
|
+
};
|
|
1623
|
+
|
|
1624
|
+
type FooterProps = {
|
|
1625
|
+
/** An action to return to a previous step */
|
|
1626
|
+
previousAction?: JSX.Element;
|
|
1627
|
+
/** An action to progress to the next step or submit the form */
|
|
1628
|
+
nextAction?: JSX.Element;
|
|
1629
|
+
} & ProgressStepperProps & OverrideClassName<Omit<HTMLAttributes<HTMLElement>, "children">>;
|
|
1630
|
+
|
|
1631
|
+
type WorkflowStatus = {
|
|
1632
|
+
/** @default: "statusDraft" */
|
|
1633
|
+
variant?: DefaultTagProps["variant"];
|
|
1634
|
+
content?: string;
|
|
1635
|
+
};
|
|
1636
|
+
type WorkflowTitlesProps = {
|
|
1637
|
+
workflowName: string;
|
|
1638
|
+
stepName: string;
|
|
1639
|
+
status?: WorkflowStatus;
|
|
1640
|
+
} & OverrideClassName<HTMLAttributes<HTMLDivElement>>;
|
|
1641
|
+
|
|
1642
|
+
type WorkflowActionsProps = {
|
|
1643
|
+
/**
|
|
1644
|
+
* Header actions will render in order of the array.
|
|
1645
|
+
*/
|
|
1646
|
+
headerActions?: JSX.Element[];
|
|
1647
|
+
} & OverrideClassName<Omit<HTMLAttributes<HTMLDivElement>, "children">>;
|
|
1648
|
+
|
|
1649
|
+
type HeaderProps = WorkflowTitlesProps & WorkflowActionsProps;
|
|
1650
|
+
|
|
1651
|
+
type WorkflowMainProps = OverrideClassName<HTMLAttributes<HTMLDivElement>> & {
|
|
1652
|
+
children: ReactNode;
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
type WorkflowWrapperProps = OverrideClassName<HTMLAttributes<HTMLDivElement>> & {
|
|
1656
|
+
children: ReactNode;
|
|
1657
|
+
};
|
|
1658
|
+
|
|
1659
|
+
type WorkflowProps = OverrideClassName<HTMLAttributes<HTMLDivElement>> & FooterProps & HeaderProps;
|
|
1660
|
+
/**
|
|
1661
|
+
* @deprecated Use { Workflow } from `@kaizen/components/future`
|
|
1662
|
+
*/
|
|
1663
|
+
declare const Workflow: (({ stepName, steps, isComplete, workflowName, status, headerActions, children, nextAction, previousAction, classNameOverride, ...restProps }: WorkflowProps) => JSX.Element) & {
|
|
1664
|
+
Header: {
|
|
1665
|
+
({ workflowName, stepName, status, headerActions, ...restProps }: HeaderProps): JSX.Element;
|
|
1666
|
+
displayName: string;
|
|
1667
|
+
};
|
|
1668
|
+
Footer: {
|
|
1669
|
+
({ steps, stepName, isComplete, previousAction, nextAction, ...restProps }: FooterProps): JSX.Element;
|
|
1670
|
+
displayName: string;
|
|
1671
|
+
};
|
|
1672
|
+
Main: {
|
|
1673
|
+
({ children, classNameOverride, ...restProps }: WorkflowMainProps): JSX.Element;
|
|
1674
|
+
displayName: string;
|
|
1675
|
+
};
|
|
1676
|
+
ProgressStepper: {
|
|
1677
|
+
({ stepName, steps, isComplete, ...restprops }: ProgressStepperProps): JSX.Element;
|
|
1678
|
+
displayName: string;
|
|
1679
|
+
};
|
|
1680
|
+
Wrapper: {
|
|
1681
|
+
({ children, classNameOverride, ...restProps }: WorkflowWrapperProps): JSX.Element;
|
|
1682
|
+
displayName: string;
|
|
1683
|
+
};
|
|
1684
|
+
};
|
|
1685
|
+
|
|
1686
|
+
export { AcademyIcon, ActionOffIcon, ActionOffWhiteIcon, ActionOnIcon, type ActiveFiltersArray, AddIcon, AddLinkIcon, AddWhiteIcon, ArchivedIcon, ArchivedWhiteIcon, ArrowBackwardIcon, ArrowDownIcon, ArrowForwardIcon, ArrowLeftIcon, ArrowRightIcon, ArrowUpIcon, BlankIcon, BoldIcon, BookmarkOffIcon, BookmarkOnIcon, BranchingIcon, BullettedListIcon, Button, type ButtonProps, type CSSVariableTheme, CaMonogramIcon, CameraIcon, CautionIcon, CautionWhiteIcon, CheckIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, ClearButton, type ClearButtonProps, ClearIcon, ClearWhiteIcon, CloseIcon, ClosedIcon, ClosedWhiteIcon, CommentAddIcon, CommentAddWhiteIcon, CommentBankIcon, CommentDisabledIcon, CommentDisabledWhiteIcon, CommentIcon, CommentWhiteIcon, CommunicationsIcon, CompetencyLibraryIcon, ConfigureIcon, ConnectIcon, ConnectLineIcon, type CustomButtonProps, CustomIcon, DashboardIcon, DateEndIcon, DateEndWhiteIcon, type DateRangeFieldValidationMessage, DateRangeIcon, DateRangeWhiteIcon, DateStartIcon, DateStartWhiteIcon, type DateValidationResponse, DecreaseIndentIcon, type DeepMapObjectLeafs, DeltaBareIcon, DeltaBareWhiteIcon, DeltaFlatIcon, DeltaIcon, DeltaNegativeIcon, DeltaPositiveIcon, DeltaWhiteIcon, DemographicsIcon, DepartmentIcon, DirectionalLink, type DirectionalLinkProps, DraftIcon, DraftWhiteIcon, DragIcon, DuplicateIcon, EditIcon, EffectivenessIcon, EllipsisIcon, EmailIcon, EmptyIcon, EmptyWhiteIcon, EndIcon, EngagementIcon, EngagementWhiteIcon, EqualIcon, EqualWhiteIcon, ErrorPage, type ErrorPageProps, ExclamationIcon, ExclamationOctagonIcon, ExclamationOctagonWhiteIcon, ExclamationWhiteIcon, ExperienceIcon, ExportIcon, ExportWhiteIcon, ExternalLinkIcon, FaceDissatisfiedIcon, FaceDissatisfiedWhiteIcon, FaceNeutralIcon, FaceNeutralWhiteIcon, FaceSatisfiedIcon, FaceSatisfiedWhiteIcon, FaceVeryDissatisfiedIcon, FaceVeryDissatisfiedWhiteIcon, FaceVerySatisfiedIcon, FaceVerySatisfiedWhiteIcon, FactorsIcon, FavoriteOffIcon, FavoriteOnIcon, FeedbackClassifyIcon, FeedbackClassifyWhiteIcon, FeedbackCompletedIcon, FeedbackCompletedWhiteIcon, FeedbackReportIcon, FeedbackReportWhiteIcon, FeedbackReviewIcon, FeedbackReviewWhiteIcon, FeedbackShareIcon, FeedbackShareWhiteIcon, FileIcon, FileWhiteIcon, Filter, type FilterAttributes, FilterBar, type FilterBarContextValue, type FilterBarProps, FilterBarProvider, type FilterBarProviderProps, type FilterBarState, type FilterBarStateFilters, FilterButton, type FilterButtonProps, FilterButtonRemovable, type FilterButtonRemovableProps, type FilterButtonRemovableRefs, FilterContents, type FilterContentsProps, FilterDatePicker, FilterDatePickerField, type FilterDatePickerFieldProps, type FilterDatePickerProps, FilterDateRangePicker, type FilterDateRangePickerProps, type FilterDateSupportedLocales, FilterIcon, type FilterIsUsableWhen, FilterMultiSelect, type FilterMultiSelectProps, type FilterProps, FilterSelect, type FilterSelectProps, type FilterState, type FilterStateEditableAttributes, type FilterTriggerButtonProps, type FilterTriggerRef, type Filters, type FiltersValues, FlagOffIcon, FlagOffWhiteIcon, FlagOnIcon, FullIcon, type GetDateValidationHandlerArgs, GridViewIcon, GuidanceIcon, HamburgerIcon, HeatmapIcon, HeatmapWhiteIcon, HierarchyIcon, HomeIcon, IconButton, type IconButtonProps, ImportIcon, ImportWhiteIcon, IncreaseIndentIcon, IndicatorActiveIcon, IndicatorInactiveIcon, InformationIcon, InformationWhiteIcon, InputSearch, type InputSearchProps, InsightIcon, InsightsIcon, type InternalFilterState, InvisibleIcon, ItalicsIcon, type ItemType, KaizenProvider, type KaizenProviderProps, KebabIcon, KioskIcon, KioskWhiteIcon, LaunchIcon, LaunchWhiteIcon, LeaderboardIcon, type ListBoxItems, type ListBoxProps, type ListBoxSectionProps$1 as ListBoxSectionProps, ListViewIcon, LiveIcon, type LoadMoreButtonProps, LockIcon, LockWhiteIcon, LogOutIcon, type MappedFilters, MaximizeIcon, MeatballsIcon, type MenuFooterProps, type MenuLoadingSkeletonProps, MenuTriggerConsumer, MenuTriggerProvider, type MenuTriggerProviderContextType, type MenuTriggerProviderProps, MinimizeIcon, MinusIcon, type MultiSelectItem, type MultiSelectOptionProps, NavigatorIcon, type NoResultsProps, NotificationIcon, NumberedListIcon, NumberedListRtlIcon, OpenIcon, OpenWhiteIcon, OrganizationIcon, PaginationLink, type PaginationLinkProps, ParticipationIcon, ParticipationWhiteIcon, PauseIcon, PauseWhiteIcon, PercentageIcon, PermissionsIcon, PersonIcon, PhotoUploadIcon, PowerIcon, PrintIcon, PrintWhiteIcon, ProcessManagerIcon, PromotionIcon, PromotionWhiteIcon, QuestionIcon, QuestionWhiteIcon, QuestionsIcon, RedoIcon, RefreshIcon, type RemovableFilterTriggerProps, RemoveLinkIcon, RepeatsIcon, ReportIcon, ReportSharingIcon, RestoreIcon, SaveIcon, SearchIcon, type SearchInputProps, SearchWhiteIcon, SecurityTipIcon, type SelectItem, type SelectItemNode, type SelectOption, type SelectOptionGroup, type SelectOptionGroupNode, type SelectOptionNode, SelectionConsumer, SelectionProvider, type SelectionProviderContextType, type SelectionProviderProps, SendIcon, SendRtlIcon, SettingsIcon, SettingsWhiteIcon, ShareIcon, SkipIcon, SkipWhiteIcon, SortAscendingIcon, SortDescendingIcon, type SourceFiltersState, SpinnerIcon, StarOffIcon, StarOnIcon, StartIcon, SubtractIcon, SubtractWhiteIcon, SuccessIcon, SuccessWhiteIcon, SupportIcon, SurveysIcon, SurveysWhiteIcon, SyncIcon, TagIcon, TasksIcon, TasksWhiteIcon, TemplateIcon, TemplateWhiteIcon, TextAnalyticsIcon, TextAnalyticsWhiteIcon, type Theme, ThemeContext, type ThemeKey, ThemeManager, ThemeProvider, ThumbsDownIcon, ThumbsUpIcon, TimeIcon, TimeWhiteIcon, TranslationIcon, TrashIcon, type TypographyFont, UnattributedIcon, UnattributedWhiteIcon, UnderlineIcon, UndoIcon, type UseDateValidationArgs, type UseDateValidationValue, UserAddIcon, UserDeleteIcon, UserExitIcon, UserIcon, UserSelectIcon, UserSettingsIcon, UserUpdateIcon, UsersIcon, type ValidateDateResponse, type ValidationMessage, type ValueType, VisibleIcon, Workflow, type WorkflowProps, WritingIcon, ZoomInIcon, ZoomOutIcon, defaultTheme, getDateValidationHandler, getSelectedOptionKeys, getSelectedOptionLabels, getTruncatedLabels, heartTheme, useDateValidation, useFilterBarContext, useMenuTriggerContext, useSelectionContext, useTheme, validateDate };
|