@prismicio/editor-ui 0.3.0 → 0.4.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 +1 -1
- package/dist/components/Alert/Alert.css.d.ts +4 -0
- package/dist/components/Alert/Alert.d.ts +11 -0
- package/dist/components/Alert/Alert.stories.d.ts +5 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/{AnimatedList/AnimatedList.stories.d.ts → Animated/Animated.stories.d.ts} +2 -0
- package/dist/components/Animated/AnimatedElement.d.ts +18 -0
- package/dist/components/{AnimatedList → Animated}/AnimatedList.css.d.ts +1 -1
- package/dist/components/{AnimatedList → Animated}/AnimatedList.d.ts +2 -0
- package/dist/components/Animated/index.d.ts +2 -0
- package/dist/components/AppBackground.d.ts +6 -2
- package/dist/components/Badge/Badge.css.d.ts +5 -0
- package/dist/components/Badge/Badge.stories.d.ts +4 -4
- package/dist/components/Box/Box.d.ts +17 -6
- package/dist/components/Box/Box.stories.d.ts +80 -3
- package/dist/components/Button/Button.css.d.ts +3 -0
- package/dist/components/Button/Button.d.ts +1 -0
- package/dist/components/Button/Button.stories.d.ts +2 -0
- package/dist/components/Calendar/Calendar.d.ts +4 -3
- package/dist/components/Calendar/Calendar.stories.d.ts +5 -6
- package/dist/components/Calendar/index.d.ts +1 -1
- package/dist/components/ColorInput/ColorArea.css.d.ts +2 -0
- package/dist/components/ColorInput/ColorArea.d.ts +2 -0
- package/dist/components/ColorInput/ColorInput.css.d.ts +7 -0
- package/dist/components/ColorInput/ColorInput.d.ts +8 -0
- package/dist/components/ColorInput/ColorInput.stories.d.ts +14 -0
- package/dist/components/ColorInput/ColorSlider.css.d.ts +3 -0
- package/dist/components/ColorInput/ColorSlider.d.ts +2 -0
- package/dist/components/ColorInput/index.d.ts +1 -0
- package/dist/components/Cropper/Cropper.stories.d.ts +2 -2
- package/dist/components/DateInput/DateInput.css.d.ts +2 -0
- package/dist/components/DateInput/DateInput.d.ts +8 -9
- package/dist/components/DateInput/DateInput.stories.d.ts +12 -6
- package/dist/components/DateInput/DateSegments.css.d.ts +7 -0
- package/dist/components/DateInput/DateSegments.d.ts +3 -0
- package/dist/components/Dialog/Dialog.css.d.ts +0 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -1
- package/dist/components/Dialog/Dialog.stories.d.ts +3 -2
- package/dist/components/Dialog/FullscreenDialog.css.d.ts +1 -0
- package/dist/components/Dialog/FullscreenDialog.d.ts +6 -0
- package/dist/components/Dialog/Options/DialogOptions.css.d.ts +4 -0
- package/dist/components/Dialog/Options/DialogOptions.d.ts +1 -1
- package/dist/components/DocumentStatusBar/DocumentStatusBar.css.d.ts +1 -0
- package/dist/components/DocumentStatusBar/DocumentStatusBar.d.ts +5 -0
- package/dist/components/DocumentStatusBar/DocumentStatusBar.stories.d.ts +8 -0
- package/dist/components/DocumentStatusBar/index.d.ts +1 -0
- package/dist/components/DocumentStatusDot/DocumentStatusDot.css.d.ts +1 -0
- package/dist/components/DocumentStatusDot/DocumentStatusDot.d.ts +5 -0
- package/dist/components/DocumentStatusDot/DocumentStatusDot.stories.d.ts +8 -0
- package/dist/components/DocumentStatusDot/index.d.ts +1 -0
- package/dist/components/DocumentVersions/DocumentVersions.css.d.ts +5 -0
- package/dist/components/DocumentVersions/DocumentVersions.d.ts +15 -0
- package/dist/components/DocumentVersions/DocumentVersions.stories.d.ts +48 -0
- package/dist/components/DocumentVersions/index.d.ts +1 -0
- package/dist/components/DragCard/DragCard.css.d.ts +3 -0
- package/dist/components/Embed/EmbedPreview.css.d.ts +4 -0
- package/dist/components/Embed/EmbedPreview.d.ts +12 -0
- package/dist/components/Embed/EmbedPreview.stories.d.ts +22 -0
- package/dist/components/Embed/EmptyEmbed.d.ts +5 -0
- package/dist/components/Embed/EmptyEmbed.stories.d.ts +8 -0
- package/dist/components/Embed/Icon.d.ts +5 -0
- package/dist/components/Embed/index.d.ts +2 -0
- package/dist/components/ErrorBoundary/ErrorBoundary.d.ts +9 -6
- package/dist/components/Field/Field.css.d.ts +1 -0
- package/dist/components/Field/Field.d.ts +4 -2
- package/dist/components/Field/Field.stories.d.ts +2 -0
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/FieldSet/FieldSet.css.d.ts +4 -0
- package/dist/components/FieldSet/FieldSet.d.ts +4 -2
- package/dist/components/FieldSet/FieldSet.stories.d.ts +4 -0
- package/dist/components/Form/Form.css.d.ts +1 -0
- package/dist/components/Form/Form.d.ts +8 -0
- package/dist/components/Form/Form.stories.d.ts +5 -0
- package/dist/components/Form/FormInput.css.d.ts +3 -0
- package/dist/components/Form/FormInput.d.ts +8 -0
- package/dist/components/Form/index.d.ts +2 -0
- package/dist/components/Icon/Icon.css.d.ts +0 -5
- package/dist/components/Icon/Icon.d.ts +1 -1
- package/dist/components/Icon/Icon.stories.d.ts +4 -4
- package/dist/components/Icon/PrismicLogo.css.d.ts +1 -0
- package/dist/components/Icon/PrismicLogo.d.ts +5 -0
- package/dist/components/Icon/iconNames.d.ts +1 -1
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/IconButton/IconButton.css.d.ts +4 -1
- package/dist/components/IconButton/IconButton.d.ts +8 -7
- package/dist/components/IconButton/IconButton.stories.d.ts +2 -12
- package/dist/components/Image/Image.css.d.ts +4 -0
- package/dist/components/Image/Image.d.ts +2 -0
- package/dist/components/Image/Image.stories.d.ts +4 -0
- package/dist/components/ProgressCircle/ProgressCircle.css.d.ts +2 -0
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +10 -0
- package/dist/components/ProgressCircle/ProgressCircle.stories.d.ts +5 -0
- package/dist/components/ProgressCircle/index.d.ts +1 -0
- package/dist/components/Separator/Separator.stories.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.css.d.ts +9 -2
- package/dist/components/Skeleton/Skeleton.d.ts +4 -3
- package/dist/components/Skeleton/Skeleton.stories.d.ts +4 -4
- package/dist/components/Slice/Slice.stories.d.ts +9 -0
- package/dist/components/Slice/SliceCard.css.d.ts +10 -0
- package/dist/components/Slice/SliceCard.d.ts +12 -0
- package/dist/components/Slice/SliceVariationCard.css.d.ts +5 -0
- package/dist/components/Slice/SliceVariationCard.d.ts +9 -0
- package/dist/components/Slice/index.d.ts +2 -0
- package/dist/components/Slider/Slider.stories.d.ts +2 -2
- package/dist/components/Switch/Switch.stories.d.ts +2 -2
- package/dist/components/Tab/Tab.css.d.ts +5 -0
- package/dist/components/Tab/Tab.d.ts +7 -0
- package/dist/components/Tab/Tab.stories.d.ts +5 -0
- package/dist/components/Tab/index.d.ts +1 -0
- package/dist/components/Text/Text.css.d.ts +1 -26
- package/dist/components/Text/Text.d.ts +4 -5
- package/dist/components/Text/Text.stories.d.ts +4 -6
- package/dist/components/TextLink/TextLink.css.d.ts +1 -0
- package/dist/components/TextLink/TextLink.d.ts +9 -0
- package/dist/components/TextLink/TextLink.stories.d.ts +4 -0
- package/dist/components/TextLink/index.d.ts +1 -0
- package/dist/components/Toast/Toast.css.d.ts +4 -0
- package/dist/components/Toast/Toast.d.ts +16 -0
- package/dist/components/Toast/Toast.stories.d.ts +27 -0
- package/dist/components/Toast/index.d.ts +1 -0
- package/dist/components/ToggleButtonGroup/ToggleButtonGroup.stories.d.ts +4 -4
- package/dist/components/Toolbar/Toolbar.stories.d.ts +2 -2
- package/dist/index.d.ts +19 -5
- package/dist/index.es.js +17596 -9808
- package/dist/index.umd.js +133 -106
- package/dist/style.css +1 -1
- package/dist/theme/colors.d.ts +90 -10
- package/dist/theme/selectors.d.ts +20 -20
- package/dist/theme/sprinkles.css.d.ts +2992 -600
- package/dist/theme/vars.css.d.ts +128 -136
- package/package.json +13 -6
- package/dist/components/AnimatedList/index.d.ts +0 -1
- package/dist/components/Link/Link.d.ts +0 -7
- package/dist/components/Link/index.d.ts +0 -1
- package/dist/theme/utils.d.ts +0 -2
- /package/dist/components/{Link/Link.css.d.ts → Embed/EmptyEmbed.css.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
1. Export the SVG icon from [Figma](https://www.figma.com/file/V5pub1BwPMJGY52YHmhTmX/Prismic---Design-System?node-id=46%3A2811). It should always be the variant with a viewbox of 24x24.
|
|
15
15
|
2. Move the file to `src/icons` and rename it with the official Material name: https://fonts.google.com/icons but with a lower camel case name.
|
|
16
16
|
3. You can repeat 1. and 2. as many times as needed.
|
|
17
|
-
4. Run `deno task update-icons
|
|
17
|
+
4. Run `deno task update-icons` (it does not matter where in the monorepo you run this from)
|
|
18
18
|
5. Check that your icon is visible in Storybook.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
declare type Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
subtitle?: string;
|
|
4
|
+
buttons?: React.ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export declare function Alert({ title, subtitle, buttons }: Props): JSX.Element;
|
|
7
|
+
export declare const AlertButton: ({ title, onClick }: {
|
|
8
|
+
title: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
}) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Alert, AlertButton } from "./Alert";
|
package/dist/components/{AnimatedList/AnimatedList.stories.d.ts → Animated/Animated.stories.d.ts}
RENAMED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
import { AnimatedElement } from "./AnimatedElement";
|
|
2
3
|
import { AnimatedList } from "./AnimatedList";
|
|
3
4
|
declare const _default: ComponentMeta<typeof AnimatedList>;
|
|
4
5
|
export default _default;
|
|
5
6
|
export declare const Default: ComponentStoryFn<typeof AnimatedList>;
|
|
7
|
+
export declare const AnimatedElementTemplateStory: ComponentStoryFn<typeof AnimatedElement>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { Sprinkles } from "../../theme/sprinkles.css";
|
|
3
|
+
interface Props {
|
|
4
|
+
children: OnlyChild;
|
|
5
|
+
animationDuration?: Sprinkles["animationDuration"];
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Animates a single element in & out based on whether it's currently rendered.
|
|
9
|
+
* An exit then enter animation will also play sequentially if the element's key changes.
|
|
10
|
+
* Unlike React CSSTransition(Group), this is based on CSS animations rather than a bunch of transition classes
|
|
11
|
+
* and the element doesn't have to be evaluated/rendered at all if it's not currently shown.
|
|
12
|
+
*
|
|
13
|
+
* If you only need to animate a single element's entrance (and not exit/swap), you don't need this component:
|
|
14
|
+
* you can just set a CSS animation on the element styles.
|
|
15
|
+
*/
|
|
16
|
+
export declare function AnimatedElement({ children, animationDuration }: Props): JSX.Element;
|
|
17
|
+
declare type OnlyChild = ReactElement | null | undefined | false | 0;
|
|
18
|
+
export {};
|
|
@@ -5,4 +5,4 @@ export declare const entering: string;
|
|
|
5
5
|
export declare const enteringDelay: string;
|
|
6
6
|
export declare const present: string;
|
|
7
7
|
export declare const exiting: string;
|
|
8
|
-
export declare const gaps: Record<
|
|
8
|
+
export declare const gaps: Record<0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80, string>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Key, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { Sprinkles } from "../../theme/sprinkles.css";
|
|
2
3
|
import * as styles from "./AnimatedList.css";
|
|
3
4
|
interface AnimatedListProps<ITEM> {
|
|
4
5
|
gap?: keyof typeof styles.gaps;
|
|
@@ -6,6 +7,7 @@ interface AnimatedListProps<ITEM> {
|
|
|
6
7
|
items: readonly ITEM[];
|
|
7
8
|
getItemKey: (item: ITEM) => Key;
|
|
8
9
|
children: (item: ITEM, index: number) => ReactNode;
|
|
10
|
+
animationDuration?: Sprinkles["animationDuration"];
|
|
9
11
|
}
|
|
10
12
|
export declare function AnimatedList<ITEM>(props: AnimatedListProps<ITEM>): ReactElement;
|
|
11
13
|
export {};
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
export declare function AppBackground({ children }: Props): JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
2
|
declare const _default: ComponentMeta<import("react").FC<Readonly<{
|
|
3
3
|
children?: import("react").ReactNode;
|
|
4
|
-
color?: "grey" | undefined;
|
|
5
|
-
size?: "large" | undefined;
|
|
4
|
+
color?: "green" | "grey" | "purple" | "tomato" | "amber" | undefined;
|
|
5
|
+
size?: "medium" | "large" | undefined;
|
|
6
6
|
}>>>;
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const Default: ComponentStoryFn<import("react").FC<Readonly<{
|
|
9
9
|
children?: import("react").ReactNode;
|
|
10
|
-
color?: "grey" | undefined;
|
|
11
|
-
size?: "large" | undefined;
|
|
10
|
+
color?: "green" | "grey" | "purple" | "tomato" | "amber" | undefined;
|
|
11
|
+
size?: "medium" | "large" | undefined;
|
|
12
12
|
}>>>;
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
import { type ThemeColor } from "../../theme/colors";
|
|
3
3
|
import { type Sprinkles } from "../../theme/sprinkles.css";
|
|
4
|
-
declare type
|
|
4
|
+
declare type BoxProps = {
|
|
5
5
|
as?: "div" | "nav" | "ul" | "ol" | "article" | "header";
|
|
6
6
|
children?: ReactNode;
|
|
7
|
-
position?: "absolute" | "relative";
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
position?: "absolute" | "relative" | "sticky" | "fixed";
|
|
8
|
+
top?: Sprinkles["top"];
|
|
9
|
+
right?: Sprinkles["right"];
|
|
10
|
+
bottom?: Sprinkles["bottom"];
|
|
11
|
+
width?: Sprinkles["width"] | number;
|
|
12
|
+
maxWidth?: Sprinkles["maxWidth"] | number;
|
|
13
|
+
height?: Sprinkles["height"] | number;
|
|
14
|
+
maxHeight?: Sprinkles["maxHeight"] | number | string;
|
|
10
15
|
padding?: Padding;
|
|
11
16
|
border?: Border;
|
|
17
|
+
borderRadius?: Sprinkles["borderRadius"];
|
|
12
18
|
backgroundColor?: ThemeColor;
|
|
19
|
+
overflowY?: "auto";
|
|
13
20
|
} & DisplayProps;
|
|
14
21
|
declare type DisplayProps = {
|
|
15
22
|
gap?: Sprinkles["gap"];
|
|
23
|
+
alignItems?: Sprinkles["alignItems"];
|
|
24
|
+
justifyContent?: Sprinkles["justifyContent"];
|
|
16
25
|
} & (GridDisplayProps | FlexDisplayProps);
|
|
17
26
|
declare type GridDisplayProps = {
|
|
18
27
|
display: "grid";
|
|
@@ -24,6 +33,8 @@ declare type FlexDisplayProps = {
|
|
|
24
33
|
flexDirection?: "column" | "row";
|
|
25
34
|
};
|
|
26
35
|
declare type Padding = Sprinkles["padding"] | {
|
|
36
|
+
block?: Sprinkles["padding"];
|
|
37
|
+
inline?: Sprinkles["padding"];
|
|
27
38
|
top?: Sprinkles["padding"];
|
|
28
39
|
bottom?: Sprinkles["padding"];
|
|
29
40
|
left?: Sprinkles["padding"];
|
|
@@ -35,5 +46,5 @@ declare type Border = boolean | {
|
|
|
35
46
|
left?: boolean;
|
|
36
47
|
right?: boolean;
|
|
37
48
|
};
|
|
38
|
-
export declare
|
|
49
|
+
export declare const Box: import("react").ForwardRefExoticComponent<BoxProps & import("react").RefAttributes<HTMLElement>>;
|
|
39
50
|
export {};
|
|
@@ -1,5 +1,82 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<({
|
|
3
|
+
as?: "article" | "div" | "header" | "nav" | "ol" | "ul" | undefined;
|
|
4
|
+
children?: import("react").ReactNode;
|
|
5
|
+
position?: "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
6
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
7
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
8
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
9
|
+
width?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
10
|
+
maxWidth?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
11
|
+
height?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
12
|
+
maxHeight?: string | number | undefined;
|
|
13
|
+
padding?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | {
|
|
14
|
+
block?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
15
|
+
inline?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
16
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
17
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
18
|
+
left?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
19
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
20
|
+
} | undefined;
|
|
21
|
+
border?: (boolean | {
|
|
22
|
+
top?: boolean | undefined;
|
|
23
|
+
bottom?: boolean | undefined;
|
|
24
|
+
left?: boolean | undefined;
|
|
25
|
+
right?: boolean | undefined;
|
|
26
|
+
}) | undefined;
|
|
27
|
+
borderRadius?: 0 | 1 | 2 | "100%" | 4 | 6 | 8 | 10 | 12 | undefined;
|
|
28
|
+
backgroundColor?: "indigo10" | "indigo11" | "green3" | "green4" | "green9" | "green10" | "green11" | "amber3" | "amber4" | "amber9" | "amber10" | "amber11" | "tomato1" | "tomato3" | "tomato7" | "tomato10" | "tomato11" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "purple11" | "purple12" | "purpleAlpha1" | "currentColor" | "inherit" | "transparent" | "grey1" | "grey2" | "grey3" | "grey4" | "grey5" | "grey6" | "grey7" | "grey8" | "grey9" | "grey10" | "grey11" | "grey12" | "dark2" | "dark6" | "dark7" | "dark12" | undefined;
|
|
29
|
+
overflowY?: "auto" | undefined;
|
|
30
|
+
} & ({
|
|
31
|
+
gap?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
32
|
+
alignItems?: "center" | "flex-start" | undefined;
|
|
33
|
+
justifyContent?: "space-between" | "center" | undefined;
|
|
34
|
+
} & ({
|
|
35
|
+
display: "grid";
|
|
36
|
+
gridTemplateColumns?: string | undefined;
|
|
37
|
+
gridTemplateRows?: string | undefined;
|
|
38
|
+
} | {
|
|
39
|
+
display?: "flex" | undefined;
|
|
40
|
+
flexDirection?: "column" | "row" | undefined;
|
|
41
|
+
}))) & import("react").RefAttributes<HTMLElement>>>;
|
|
4
42
|
export default _default;
|
|
5
|
-
export declare const Default: ComponentStoryFn<
|
|
43
|
+
export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticComponent<({
|
|
44
|
+
as?: "article" | "div" | "header" | "nav" | "ol" | "ul" | undefined;
|
|
45
|
+
children?: import("react").ReactNode;
|
|
46
|
+
position?: "fixed" | "absolute" | "relative" | "sticky" | undefined;
|
|
47
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
48
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
49
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
50
|
+
width?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
51
|
+
maxWidth?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
52
|
+
height?: number | "fit-content" | "100%" | "100vw" | "100vh" | undefined;
|
|
53
|
+
maxHeight?: string | number | undefined;
|
|
54
|
+
padding?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | {
|
|
55
|
+
block?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
56
|
+
inline?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
57
|
+
top?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
58
|
+
bottom?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
59
|
+
left?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
60
|
+
right?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
61
|
+
} | undefined;
|
|
62
|
+
border?: (boolean | {
|
|
63
|
+
top?: boolean | undefined;
|
|
64
|
+
bottom?: boolean | undefined;
|
|
65
|
+
left?: boolean | undefined;
|
|
66
|
+
right?: boolean | undefined;
|
|
67
|
+
}) | undefined;
|
|
68
|
+
borderRadius?: 0 | 1 | 2 | "100%" | 4 | 6 | 8 | 10 | 12 | undefined;
|
|
69
|
+
backgroundColor?: "indigo10" | "indigo11" | "green3" | "green4" | "green9" | "green10" | "green11" | "amber3" | "amber4" | "amber9" | "amber10" | "amber11" | "tomato1" | "tomato3" | "tomato7" | "tomato10" | "tomato11" | "purple1" | "purple2" | "purple3" | "purple4" | "purple5" | "purple6" | "purple7" | "purple8" | "purple9" | "purple10" | "purple11" | "purple12" | "purpleAlpha1" | "currentColor" | "inherit" | "transparent" | "grey1" | "grey2" | "grey3" | "grey4" | "grey5" | "grey6" | "grey7" | "grey8" | "grey9" | "grey10" | "grey11" | "grey12" | "dark2" | "dark6" | "dark7" | "dark12" | undefined;
|
|
70
|
+
overflowY?: "auto" | undefined;
|
|
71
|
+
} & ({
|
|
72
|
+
gap?: 0 | 2 | 4 | 6 | 8 | 10 | 12 | 16 | 24 | 32 | 72 | 48 | 80 | undefined;
|
|
73
|
+
alignItems?: "center" | "flex-start" | undefined;
|
|
74
|
+
justifyContent?: "space-between" | "center" | undefined;
|
|
75
|
+
} & ({
|
|
76
|
+
display: "grid";
|
|
77
|
+
gridTemplateColumns?: string | undefined;
|
|
78
|
+
gridTemplateRows?: string | undefined;
|
|
79
|
+
} | {
|
|
80
|
+
display?: "flex" | undefined;
|
|
81
|
+
flexDirection?: "column" | "row" | undefined;
|
|
82
|
+
}))) & import("react").RefAttributes<HTMLElement>>>;
|
|
@@ -10,3 +10,6 @@ export declare const iconVariant: {
|
|
|
10
10
|
export declare const startIcon: string;
|
|
11
11
|
export declare const text: string;
|
|
12
12
|
export declare const endIcon: string;
|
|
13
|
+
export declare const dim: string;
|
|
14
|
+
export declare const hidden: string;
|
|
15
|
+
export declare const progressCircle: string;
|
|
@@ -4,6 +4,7 @@ export declare const Button: import("react").ForwardRefExoticComponent<Readonly<
|
|
|
4
4
|
className?: string | undefined;
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
endIcon?: ReactNode;
|
|
7
|
+
loading?: boolean | undefined;
|
|
7
8
|
onClick?: ((event: MouseEvent) => void) | undefined;
|
|
8
9
|
size?: "medium" | "large" | "small" | undefined;
|
|
9
10
|
startIcon?: ReactNode;
|
|
@@ -4,6 +4,7 @@ declare const _default: ComponentMeta<import("react").ForwardRefExoticComponent<
|
|
|
4
4
|
className?: string | undefined;
|
|
5
5
|
disabled?: boolean | undefined;
|
|
6
6
|
endIcon?: import("react").ReactNode;
|
|
7
|
+
loading?: boolean | undefined;
|
|
7
8
|
onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
8
9
|
size?: "medium" | "large" | "small" | undefined;
|
|
9
10
|
startIcon?: import("react").ReactNode;
|
|
@@ -15,6 +16,7 @@ export declare const Default: ComponentStoryFn<import("react").ForwardRefExoticC
|
|
|
15
16
|
className?: string | undefined;
|
|
16
17
|
disabled?: boolean | undefined;
|
|
17
18
|
endIcon?: import("react").ReactNode;
|
|
19
|
+
loading?: boolean | undefined;
|
|
18
20
|
onClick?: ((event: import("react").MouseEvent<Element, MouseEvent>) => void) | undefined;
|
|
19
21
|
size?: "medium" | "large" | "small" | undefined;
|
|
20
22
|
startIcon?: import("react").ReactNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { DateValue, GregorianCalendar } from "@internationalized/date";
|
|
1
2
|
declare type Props = {
|
|
2
|
-
value:
|
|
3
|
-
onValueChange: (value:
|
|
4
|
-
onFocusReady: (focus: () => void) => void;
|
|
3
|
+
value: DateValue;
|
|
4
|
+
onValueChange: (value: DateValue) => void;
|
|
5
5
|
};
|
|
6
6
|
export declare const Calendar: (props: Props) => JSX.Element;
|
|
7
|
+
export declare const createCalendar: () => GregorianCalendar;
|
|
7
8
|
export {};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
+
import { DateValue } from "@internationalized/date";
|
|
1
2
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
3
|
declare const _default: ComponentMeta<(props: {
|
|
3
|
-
value:
|
|
4
|
-
onValueChange: (value:
|
|
5
|
-
onFocusReady: (focus: () => void) => void;
|
|
4
|
+
value: DateValue;
|
|
5
|
+
onValueChange: (value: DateValue) => void;
|
|
6
6
|
}) => JSX.Element>;
|
|
7
7
|
export default _default;
|
|
8
8
|
export declare const Default: ComponentStoryFn<(props: {
|
|
9
|
-
value:
|
|
10
|
-
onValueChange: (value:
|
|
11
|
-
onFocusReady: (focus: () => void) => void;
|
|
9
|
+
value: DateValue;
|
|
10
|
+
onValueChange: (value: DateValue) => void;
|
|
12
11
|
}) => JSX.Element>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Calendar } from "./Calendar";
|
|
1
|
+
export { Calendar, createCalendar } from "./Calendar";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const container: string;
|
|
2
|
+
export declare const input: string;
|
|
3
|
+
export declare const colorSquare: string;
|
|
4
|
+
export declare const emptyColorSquare: string;
|
|
5
|
+
export declare const areaContainer: string;
|
|
6
|
+
export declare const header: string;
|
|
7
|
+
export declare const footer: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<({ value, onValueChange, ...props }: {
|
|
3
|
+
value?: string | undefined;
|
|
4
|
+
onValueChange: (value?: string | undefined) => void;
|
|
5
|
+
"aria-labelledby": string;
|
|
6
|
+
placeholder?: string | undefined;
|
|
7
|
+
}) => JSX.Element>;
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const Default: ComponentStoryFn<({ value, onValueChange, ...props }: {
|
|
10
|
+
value?: string | undefined;
|
|
11
|
+
onValueChange: (value?: string | undefined) => void;
|
|
12
|
+
"aria-labelledby": string;
|
|
13
|
+
placeholder?: string | undefined;
|
|
14
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ColorInput } from "./ColorInput";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
2
|
declare const _default: ComponentMeta<import("react").FC<{
|
|
3
3
|
zoom: number;
|
|
4
|
-
image?: string | undefined;
|
|
5
4
|
crop: import("react-easy-crop").Point;
|
|
5
|
+
image?: string | undefined;
|
|
6
6
|
aspect: number;
|
|
7
7
|
onZoomChange?: ((zoom: number) => void) | undefined;
|
|
8
8
|
onCropChange: (location: import("react-easy-crop").Point) => void;
|
|
@@ -12,8 +12,8 @@ declare const _default: ComponentMeta<import("react").FC<{
|
|
|
12
12
|
export default _default;
|
|
13
13
|
export declare const Default: ComponentStoryFn<import("react").FC<{
|
|
14
14
|
zoom: number;
|
|
15
|
-
image?: string | undefined;
|
|
16
15
|
crop: import("react-easy-crop").Point;
|
|
16
|
+
image?: string | undefined;
|
|
17
17
|
aspect: number;
|
|
18
18
|
onZoomChange?: ((zoom: number) => void) | undefined;
|
|
19
19
|
onCropChange: (location: import("react-easy-crop").Point) => void;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
onValueChange: (
|
|
1
|
+
declare type Mode = "date" | "date-time";
|
|
2
|
+
declare type Props = {
|
|
3
|
+
readOnly?: boolean;
|
|
4
|
+
value?: string;
|
|
5
|
+
onValueChange: (value?: string) => void;
|
|
6
|
+
mode: Mode;
|
|
7
|
+
"aria-labelledby": string;
|
|
6
8
|
};
|
|
7
|
-
export declare const DateInput: ({
|
|
8
|
-
export declare const validDraft: (value: string) => string;
|
|
9
|
-
export declare const validDate: (draft: string) => string | null;
|
|
10
|
-
export declare const userDate: (validDate: string) => string | null;
|
|
9
|
+
export declare const DateInput: ({ "aria-labelledby": ariaLabelledBy, readOnly, value, onValueChange, mode }: Props) => JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
-
declare const _default: ComponentMeta<({
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
declare const _default: ComponentMeta<({ "aria-labelledby": ariaLabelledBy, readOnly, value, onValueChange, mode }: {
|
|
3
|
+
readOnly?: boolean | undefined;
|
|
4
|
+
value?: string | undefined;
|
|
5
|
+
onValueChange: (value?: string | undefined) => void;
|
|
6
|
+
mode: "date" | "date-time";
|
|
7
|
+
"aria-labelledby": string;
|
|
5
8
|
}) => JSX.Element>;
|
|
6
9
|
export default _default;
|
|
7
|
-
export declare const Default: ComponentStoryFn<({
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
export declare const Default: ComponentStoryFn<({ "aria-labelledby": ariaLabelledBy, readOnly, value, onValueChange, mode }: {
|
|
11
|
+
readOnly?: boolean | undefined;
|
|
12
|
+
value?: string | undefined;
|
|
13
|
+
onValueChange: (value?: string | undefined) => void;
|
|
14
|
+
mode: "date" | "date-time";
|
|
15
|
+
"aria-labelledby": string;
|
|
10
16
|
}) => JSX.Element>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const root: string;
|
|
2
|
+
export declare const flexSpace: string;
|
|
3
|
+
export declare const segment: string;
|
|
4
|
+
export declare const segmentColor: string;
|
|
5
|
+
export declare const segmentDisabledColor: string;
|
|
6
|
+
export declare const segmentInlinePadding: string;
|
|
7
|
+
export declare const segmentLiteralInlinePadding: string;
|
|
@@ -3,6 +3,7 @@ import { type IconName } from "../Icon";
|
|
|
3
3
|
export interface DialogProps {
|
|
4
4
|
trigger?: ReactNode;
|
|
5
5
|
children?: ReactNode;
|
|
6
|
+
fullscreen?: boolean;
|
|
6
7
|
open?: boolean;
|
|
7
8
|
onOpenChange?: (open: boolean) => void;
|
|
8
9
|
onAnimationEnd?: () => void;
|
|
@@ -11,7 +12,7 @@ export interface DialogProps {
|
|
|
11
12
|
* A Dialog rendered in document.body.
|
|
12
13
|
* The first focusable child will automatically be focused.
|
|
13
14
|
*/
|
|
14
|
-
export declare
|
|
15
|
+
export declare function Dialog(props: DialogProps): JSX.Element;
|
|
15
16
|
interface DialogHeaderProps {
|
|
16
17
|
icon: IconName;
|
|
17
18
|
title: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
import { Dialog } from "./";
|
|
2
3
|
export declare const DialogOptionsStory: ComponentStoryFn<({ value, onValueChange, children }: import("./Options/DialogOptions").DialogOptionsProps) => JSX.Element>;
|
|
3
|
-
declare const _default: ComponentMeta<
|
|
4
|
+
declare const _default: ComponentMeta<typeof Dialog>;
|
|
4
5
|
export default _default;
|
|
5
|
-
export declare const Default: ComponentStoryFn<
|
|
6
|
+
export declare const Default: ComponentStoryFn<typeof Dialog>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const container: string;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { DialogProps } from "./Dialog";
|
|
2
|
+
declare type Props = {
|
|
3
|
+
onEscapeKeyDown: (evt: KeyboardEvent) => void;
|
|
4
|
+
} & Pick<DialogProps, "open" | "onOpenChange" | "trigger" | "children" | "onAnimationEnd">;
|
|
5
|
+
export declare function FullscreenDialog(props: Props): JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -8,7 +8,7 @@ export interface DialogOptionsProps {
|
|
|
8
8
|
export declare const DialogOptions: ({ value, onValueChange, children }: DialogOptionsProps) => JSX.Element;
|
|
9
9
|
interface DialogOptionsItemProps {
|
|
10
10
|
value: string;
|
|
11
|
-
icon
|
|
11
|
+
icon?: IconName;
|
|
12
12
|
title: string;
|
|
13
13
|
subtitle: string;
|
|
14
14
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const root: Record<"published" | "release" | "archived" | "unclassified", string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<({ status }: {
|
|
3
|
+
status: "published" | "release" | "archived" | "unclassified";
|
|
4
|
+
}) => JSX.Element>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: ComponentStoryFn<({ status }: {
|
|
7
|
+
status: "published" | "release" | "archived" | "unclassified";
|
|
8
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DocumentStatusBar } from "./DocumentStatusBar";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const root: Record<"published" | "release" | "archived" | "unclassified", string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentMeta, ComponentStoryFn } from "@storybook/react";
|
|
2
|
+
declare const _default: ComponentMeta<({ status }: {
|
|
3
|
+
status: "published" | "release" | "archived" | "unclassified";
|
|
4
|
+
}) => JSX.Element>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Default: ComponentStoryFn<({ status }: {
|
|
7
|
+
status: "published" | "release" | "archived" | "unclassified";
|
|
8
|
+
}) => JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DocumentStatusDot } from "./DocumentStatusDot";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare type Section = {
|
|
2
|
+
header: string;
|
|
3
|
+
title: string;
|
|
4
|
+
subtitle: string;
|
|
5
|
+
selected: boolean;
|
|
6
|
+
onSelect: () => void;
|
|
7
|
+
};
|
|
8
|
+
declare type Props = {
|
|
9
|
+
local?: Omit<Section, "subtitle">;
|
|
10
|
+
unclassified?: Section;
|
|
11
|
+
published?: Section;
|
|
12
|
+
};
|
|
13
|
+
export declare const DocumentVersions: ({ local, unclassified, published }: Props) => JSX.Element;
|
|
14
|
+
declare const Section: ({ children }: React.PropsWithChildren) => JSX.Element;
|
|
15
|
+
export {};
|