@redsift/design-system 11.6.0-muiv5-alpha.5 → 11.6.0-muiv5-alpha.6
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/_internal/Alert.d2.ts +54 -0
- package/_internal/Alert2.js +182 -39
- package/_internal/AppBar.d.ts +37 -0
- package/_internal/AppBar.js +240 -29
- package/_internal/AppContainer.d.ts +96 -0
- package/_internal/AppContainer.js +132 -86
- package/_internal/AppContent.d.ts +25 -0
- package/_internal/AppContent.js +84 -17
- package/_internal/Badge.d2.ts +9 -0
- package/_internal/Badge2.js +137 -4
- package/_internal/BreadcrumbItem.d.ts +9 -0
- package/_internal/BreadcrumbItem.js +85 -3
- package/_internal/Breadcrumbs.d2.ts +29 -0
- package/_internal/Breadcrumbs2.js +86 -21
- package/_internal/Button.d2.ts +30 -0
- package/_internal/Button2.js +81 -20
- package/_internal/ButtonGroup.d.ts +41 -0
- package/_internal/ButtonGroup.js +165 -25
- package/_internal/ButtonLink.d.ts +28 -0
- package/_internal/ButtonLink.js +74 -18
- package/_internal/Card.d2.ts +35 -0
- package/_internal/Card2.js +151 -29
- package/_internal/CardActions.d.ts +9 -0
- package/_internal/CardActions.js +38 -3
- package/_internal/CardBody.d.ts +9 -0
- package/_internal/CardBody.js +36 -3
- package/_internal/CardHeader.d.ts +9 -0
- package/_internal/CardHeader.js +77 -3
- package/_internal/Checkbox.d2.ts +68 -0
- package/_internal/Checkbox2.js +234 -58
- package/_internal/CheckboxGroup.d.ts +10 -0
- package/_internal/CheckboxGroup.js +182 -4
- package/_internal/ConditionalWrapper.d.ts +14 -0
- package/_internal/ConditionalWrapper.js +11 -12
- package/_internal/DetailedCard.d.ts +52 -0
- package/_internal/DetailedCard.js +6912 -48
- package/_internal/DetailedCardCollapsibleSectionItems.d.ts +9 -0
- package/_internal/DetailedCardCollapsibleSectionItems.js +58 -3
- package/_internal/DetailedCardHeader.d.ts +9 -0
- package/_internal/DetailedCardHeader.js +61 -3
- package/_internal/DetailedCardSection.d.ts +9 -0
- package/_internal/DetailedCardSection.js +166 -3
- package/_internal/DetailedCardSectionItem.d.ts +9 -0
- package/_internal/DetailedCardSectionItem.js +88 -3
- package/_internal/Flexbox.d2.ts +30 -0
- package/_internal/Flexbox2.js +85 -22
- package/_internal/Grid.d2.ts +32 -0
- package/_internal/Grid2.js +87 -24
- package/_internal/GridItem.d.ts +9 -0
- package/_internal/GridItem.js +34 -3
- package/_internal/Heading.d2.ts +9 -0
- package/_internal/Heading2.js +107 -3
- package/_internal/Icon.d2.ts +10 -0
- package/_internal/Icon2.js +206 -5
- package/_internal/IconButton.d.ts +12 -0
- package/_internal/IconButton.js +71 -3
- package/_internal/IconButtonLink.d.ts +28 -0
- package/_internal/IconButtonLink.js +65 -18
- package/_internal/Item.d2.ts +82 -0
- package/_internal/Item2.js +390 -73
- package/_internal/Link.d2.ts +26 -0
- package/_internal/Link2.js +56 -15
- package/_internal/LinkButton.d.ts +23 -0
- package/_internal/LinkButton.js +56 -13
- package/_internal/Number.d2.ts +69 -0
- package/_internal/Number2.js +103 -61
- package/_internal/NumberField.d.ts +80 -0
- package/_internal/NumberField.js +3959 -65
- package/_internal/Pill.d2.ts +9 -0
- package/_internal/Pill2.js +400 -4
- package/_internal/ProgressBar.d.ts +26 -0
- package/_internal/ProgressBar.js +61 -18
- package/_internal/Radio.d2.ts +66 -0
- package/_internal/Radio2.js +227 -56
- package/_internal/RadioGroup.d.ts +10 -0
- package/_internal/RadioGroup.js +170 -4
- package/_internal/Shield.d2.ts +9 -0
- package/_internal/Shield2.js +220 -4
- package/_internal/SideNavigationMenu.d.ts +9 -0
- package/_internal/SideNavigationMenu.js +586 -4
- package/_internal/{SideNavigationMenuBar.js → SideNavigationMenuBar.d.ts} +1 -1
- package/_internal/SideNavigationMenuItem.d.ts +9 -0
- package/_internal/SideNavigationMenuItem.js +299 -4
- package/_internal/Skeleton.d2.ts +15 -0
- package/_internal/Skeleton2.js +36 -9
- package/_internal/SkeletonCircle.d.ts +9 -0
- package/_internal/SkeletonCircle.js +52 -3
- package/_internal/SkeletonText.d.ts +9 -0
- package/_internal/SkeletonText.js +71 -3
- package/_internal/Spinner.d2.ts +43 -0
- package/_internal/Spinner2.js +319 -29
- package/_internal/Switch.d2.ts +66 -0
- package/_internal/Switch2.js +310 -56
- package/_internal/SwitchGroup.d.ts +10 -0
- package/_internal/SwitchGroup.js +182 -4
- package/_internal/Text.d2.ts +9 -0
- package/_internal/Text2.js +45 -3
- package/_internal/TextArea.d.ts +34 -0
- package/_internal/TextArea.js +430 -20
- package/_internal/TextField.d.ts +29 -0
- package/_internal/TextField.js +463 -19
- package/_internal/alert.d.ts +5 -0
- package/_internal/alert.js +2 -5
- package/_internal/app-bar.d.ts +8 -0
- package/_internal/app-bar.js +2 -8
- package/_internal/app-container.d.ts +9 -0
- package/_internal/app-container.js +3 -9
- package/_internal/app-content.d.ts +5 -0
- package/_internal/app-content.js +2 -5
- package/_internal/app-side-panel.d.ts +11 -0
- package/_internal/app-side-panel.js +3 -11
- package/_internal/badge.d.ts +6 -0
- package/_internal/badge.js +2 -6
- package/_internal/breadcrumb-item.d.ts +5 -0
- package/_internal/breadcrumb-item.js +1 -4
- package/_internal/breadcrumbs.d.ts +6 -0
- package/_internal/breadcrumbs.js +2 -6
- package/_internal/button-group.d.ts +5 -0
- package/_internal/button-group.js +2 -5
- package/_internal/button-link.d.ts +8 -0
- package/_internal/button-link.js +2 -8
- package/_internal/button.d.ts +8 -0
- package/_internal/button.js +3 -8
- package/_internal/card-actions.d.ts +5 -0
- package/_internal/card-actions.js +1 -4
- package/_internal/card-body.d.ts +5 -0
- package/_internal/card-body.js +1 -4
- package/_internal/card-header.d.ts +9 -0
- package/_internal/card-header.js +1 -8
- package/_internal/card.d.ts +11 -0
- package/_internal/card.js +2 -11
- package/_internal/checkbox-group.d.ts +6 -0
- package/_internal/checkbox-group.js +2 -6
- package/_internal/checkbox.d.ts +6 -0
- package/_internal/checkbox.js +2 -6
- package/_internal/colors.d.ts +102 -0
- package/_internal/colors.js +87 -91
- package/_internal/conditional-wrapper.d.ts +2 -0
- package/_internal/conditional-wrapper.js +2 -2
- package/_internal/detailed-card-collapsible-section-items.d.ts +4 -0
- package/_internal/detailed-card-collapsible-section-items.js +1 -3
- package/_internal/detailed-card-header.d.ts +8 -0
- package/_internal/detailed-card-header.js +1 -7
- package/_internal/detailed-card-section-item.d.ts +11 -0
- package/_internal/detailed-card-section-item.js +1 -10
- package/_internal/detailed-card-section.d.ts +7 -0
- package/_internal/detailed-card-section.js +1 -6
- package/_internal/detailed-card.d.ts +16 -0
- package/_internal/detailed-card.js +2 -16
- package/_internal/flexbox.d.ts +5 -0
- package/_internal/flexbox.js +2 -5
- package/_internal/focus-within-group.d.ts +3 -0
- package/_internal/focus-within-group.js +3 -3
- package/_internal/fonts.d.ts +12 -0
- package/_internal/fonts.js +4 -6
- package/_internal/gradient-border.d.ts +19 -0
- package/_internal/gradient-border.js +35 -16
- package/_internal/grid-item.d.ts +5 -0
- package/_internal/grid-item.js +1 -4
- package/_internal/grid.d.ts +6 -0
- package/_internal/grid.js +2 -6
- package/_internal/heading.d.ts +7 -0
- package/_internal/heading.js +2 -6
- package/_internal/icon-button-link.d.ts +8 -0
- package/_internal/icon-button-link.js +2 -8
- package/_internal/icon-button.d.ts +7 -0
- package/_internal/icon-button.js +2 -6
- package/_internal/icon.d.ts +6 -0
- package/_internal/icon.js +2 -6
- package/_internal/item.d.ts +8 -0
- package/_internal/item.js +2 -8
- package/_internal/link-button.d.ts +8 -0
- package/_internal/link-button.js +2 -8
- package/_internal/link.d.ts +8 -0
- package/_internal/link.js +3 -8
- package/_internal/listbox.d.ts +6 -0
- package/_internal/listbox.js +3 -6
- package/_internal/number-field.d.ts +9 -0
- package/_internal/number-field.js +2 -9
- package/_internal/number.d.ts +7 -0
- package/_internal/number.js +2 -7
- package/_internal/pill.d.ts +6 -0
- package/_internal/pill.js +2 -6
- package/_internal/progress-bar.d.ts +5 -0
- package/_internal/progress-bar.js +2 -5
- package/_internal/radio-group.d.ts +6 -0
- package/_internal/radio-group.js +2 -6
- package/_internal/radio.d.ts +6 -0
- package/_internal/radio.js +2 -6
- package/_internal/shared.d.ts +5 -0
- package/_internal/shared.js +2 -5
- package/_internal/shield.d.ts +6 -0
- package/_internal/shield.js +2 -6
- package/_internal/side-navigation-menu-bar.d.ts +9 -0
- package/_internal/side-navigation-menu-bar.js +3 -9
- package/_internal/side-navigation-menu-item.d.ts +8 -0
- package/_internal/side-navigation-menu-item.js +2 -8
- package/_internal/side-navigation-menu.d.ts +8 -0
- package/_internal/side-navigation-menu.js +2 -8
- package/_internal/skeleton-circle.d.ts +7 -0
- package/_internal/skeleton-circle.js +1 -6
- package/_internal/skeleton-text.d.ts +7 -0
- package/_internal/skeleton-text.js +2 -6
- package/_internal/skeleton.d.ts +8 -0
- package/_internal/skeleton.js +1 -7
- package/_internal/spinner.d.ts +5 -0
- package/_internal/spinner.js +2 -5
- package/_internal/styles.d.ts +17 -0
- package/_internal/styles.d2.ts +283 -0
- package/_internal/styles.js +235 -17
- package/_internal/styles2.js +44 -280
- package/_internal/switch-group.d.ts +6 -0
- package/_internal/switch-group.js +2 -6
- package/_internal/switch.d.ts +6 -0
- package/_internal/switch.js +2 -6
- package/_internal/text-area.d.ts +9 -0
- package/_internal/text-area.js +2 -9
- package/_internal/text-field.d.ts +10 -0
- package/_internal/text-field.js +2 -10
- package/_internal/text.d.ts +7 -0
- package/_internal/text.js +2 -6
- package/_internal/theme.d.ts +4 -0
- package/_internal/theme.js +1 -3
- package/_internal/types.d.ts +39 -0
- package/_internal/{types10.js → types.d10.ts} +1 -1
- package/_internal/{types11.js → types.d11.ts} +1 -1
- package/_internal/{types12.js → types.d12.ts} +4 -4
- package/_internal/{types14.js → types.d14.ts} +1 -1
- package/_internal/{types15.js → types.d15.ts} +1 -1
- package/_internal/{types16.js → types.d16.ts} +2 -2
- package/_internal/{types17.js → types.d17.ts} +1 -1
- package/_internal/{types18.js → types.d18.ts} +2 -2
- package/_internal/{types19.js → types.d19.ts} +2 -2
- package/_internal/types.d2.ts +37 -0
- package/_internal/{types20.js → types.d20.ts} +1 -1
- package/_internal/{types21.js → types.d21.ts} +1 -1
- package/_internal/{types22.js → types.d22.ts} +1 -1
- package/_internal/{types23.js → types.d23.ts} +2 -2
- package/_internal/{types24.js → types.d24.ts} +1 -1
- package/_internal/{types25.js → types.d25.ts} +1 -1
- package/_internal/{types26.js → types.d26.ts} +1 -1
- package/_internal/{types27.js → types.d27.ts} +1 -1
- package/_internal/{types28.js → types.d28.ts} +1 -1
- package/_internal/{types29.js → types.d29.ts} +4 -4
- package/_internal/types.d3.ts +23 -0
- package/_internal/{types4.js → types.d4.ts} +2 -2
- package/_internal/{types5.js → types.d5.ts} +1 -1
- package/_internal/{types6.js → types.d6.ts} +1 -1
- package/_internal/{types7.js → types.d7.ts} +3 -3
- package/_internal/{types8.js → types.d8.ts} +1 -1
- package/_internal/types.js +7 -31
- package/_internal/types2.js +18 -29
- package/_internal/types3.js +15 -18
- package/_internal/useAppSidePanel.d.ts +12 -0
- package/_internal/useAppSidePanel.js +331 -6
- package/_internal/useFocusOnList.d.ts +83 -0
- package/_internal/useFocusOnList.js +502 -44
- package/_internal/useListboxItem.d.ts +32 -0
- package/_internal/useListboxItem.js +120 -23
- package/_internal/useSideNavigationMenuBar.d.ts +9 -0
- package/_internal/useSideNavigationMenuBar.js +371 -7
- package/_internal/useTheme.d.ts +13 -0
- package/_internal/useTheme.js +10 -8
- package/index.d.ts +1738 -0
- package/index.js +523 -1674
- package/package.json +2 -2
- /package/_internal/{helpers.js → helpers.d.ts} +0 -0
- /package/_internal/{types13.js → types.d13.ts} +0 -0
- /package/_internal/{types9.js → types.d9.ts} +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction, RefObject, ComponentProps, ReactElement } from 'react';
|
|
2
|
+
import { A as AppSidePanelVariant } from './types.js';
|
|
3
|
+
import { B as BreadcrumbItemProps } from './types.d3.ts';
|
|
4
|
+
import { V as ValueOf, C as Comp } from './helpers.js';
|
|
5
|
+
import { T as Theme } from './colors.js';
|
|
6
|
+
|
|
7
|
+
declare const Product: {
|
|
8
|
+
readonly asm: "asm";
|
|
9
|
+
readonly 'brand-trust': "brand-trust";
|
|
10
|
+
readonly certificates: "certificates";
|
|
11
|
+
readonly ondmarc: "ondmarc";
|
|
12
|
+
readonly pulse: "pulse";
|
|
13
|
+
readonly radar: "radar";
|
|
14
|
+
readonly 'rojo-ds': "rojo-ds";
|
|
15
|
+
readonly 'vendor-secure': "vendor-secure";
|
|
16
|
+
readonly website: "website";
|
|
17
|
+
};
|
|
18
|
+
type Product = ValueOf<typeof Product>;
|
|
19
|
+
declare const ProductName: {
|
|
20
|
+
readonly asm: "ASM";
|
|
21
|
+
readonly 'brand-trust': "Brand Trust";
|
|
22
|
+
readonly certificates: "Certificates";
|
|
23
|
+
readonly ondmarc: "OnDMARC";
|
|
24
|
+
readonly pulse: "Pulse";
|
|
25
|
+
readonly radar: "RADAR";
|
|
26
|
+
readonly 'rojo-ds': "ROJO DS";
|
|
27
|
+
readonly 'vendor-secure': "Vendor Secure";
|
|
28
|
+
readonly website: "Website";
|
|
29
|
+
};
|
|
30
|
+
type ProductName = ValueOf<typeof ProductName>;
|
|
31
|
+
declare const ProductLogo: {
|
|
32
|
+
readonly asm: JSX.Element;
|
|
33
|
+
readonly 'brand-trust': JSX.Element;
|
|
34
|
+
readonly certificates: JSX.Element;
|
|
35
|
+
readonly ondmarc: JSX.Element;
|
|
36
|
+
readonly pulse: JSX.Element;
|
|
37
|
+
readonly radar: JSX.Element;
|
|
38
|
+
readonly 'rojo-ds': JSX.Element;
|
|
39
|
+
readonly 'vendor-secure': JSX.Element;
|
|
40
|
+
readonly website: JSX.Element;
|
|
41
|
+
};
|
|
42
|
+
type ProductLogo = ValueOf<typeof ProductLogo>;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Context props.
|
|
46
|
+
*/
|
|
47
|
+
type AppContainerState = {
|
|
48
|
+
/** Collapses the side panel. */
|
|
49
|
+
collapseSidePanel(): void;
|
|
50
|
+
/** Expandes the side panel. */
|
|
51
|
+
expandSidePanel(): void;
|
|
52
|
+
/** Product theme. */
|
|
53
|
+
product?: AppContainerProps['product'];
|
|
54
|
+
/** Set breadcrumbs of the page. */
|
|
55
|
+
setBreadcrumbs(breadcrumbs?: Omit<BreadcrumbItemProps, 'ref'>[]): void;
|
|
56
|
+
/** Page breadcrumbs. */
|
|
57
|
+
readonly breadcrumbs?: Omit<BreadcrumbItemProps, 'ref'>[];
|
|
58
|
+
/** Side panel variant. */
|
|
59
|
+
sidePanelVariant: AppSidePanelVariant;
|
|
60
|
+
/** Change side panel variant. */
|
|
61
|
+
setSidePanelVariant: Dispatch<SetStateAction<AppSidePanelVariant>>;
|
|
62
|
+
/** AppContainer ref. */
|
|
63
|
+
appContainerRef: RefObject<HTMLDivElement>;
|
|
64
|
+
/** Whether the App takes the entire screen or not. */
|
|
65
|
+
isFullScreen?: boolean;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Component props.
|
|
69
|
+
*/
|
|
70
|
+
interface AppContainerProps extends ComponentProps<'div'> {
|
|
71
|
+
/** Whether the App takes the entire screen or not. */
|
|
72
|
+
isFullScreen?: boolean;
|
|
73
|
+
/** The locale to apply to the children. */
|
|
74
|
+
locale?: string;
|
|
75
|
+
/** Product theme to apply to everything within. This overrides the CSS variables automatically. */
|
|
76
|
+
product?: Product | {
|
|
77
|
+
name: string;
|
|
78
|
+
logo?: ReactElement;
|
|
79
|
+
};
|
|
80
|
+
/** Overall theme. */
|
|
81
|
+
theme?: Theme;
|
|
82
|
+
}
|
|
83
|
+
type StyledAppContainerProps = Omit<AppContainerProps, 'locale' | 'product'> & {
|
|
84
|
+
$theme: Theme;
|
|
85
|
+
$product?: AppContainerProps['product'];
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
declare const AppContainerContext: React.Context<AppContainerState | null>;
|
|
89
|
+
|
|
90
|
+
declare const RadarSvgLinearGradient: React.FC;
|
|
91
|
+
/**
|
|
92
|
+
* The AppContainer component.
|
|
93
|
+
*/
|
|
94
|
+
declare const AppContainer: Comp<AppContainerProps, HTMLDivElement>;
|
|
95
|
+
|
|
96
|
+
export { AppContainerContext as A, Product as P, RadarSvgLinearGradient as R, StyledAppContainerProps as S, ProductName as a, ProductLogo as b, AppContainerState as c, AppContainerProps as d, AppContainer as e };
|
|
@@ -1,96 +1,142 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef, useRef, useState, useEffect } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { A as AppContainerContext } from './context.js';
|
|
5
|
+
import styled from 'styled-components';
|
|
2
6
|
import { A as AppSidePanelVariant } from './types.js';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { T as Theme } from './colors.js';
|
|
7
|
+
import { I as I18nProvider } from './context2.js';
|
|
8
|
+
import { u as useTheme, a as ThemeProvider } from './useTheme.js';
|
|
6
9
|
|
|
7
|
-
declare const Product: {
|
|
8
|
-
readonly asm: "asm";
|
|
9
|
-
readonly 'brand-trust': "brand-trust";
|
|
10
|
-
readonly certificates: "certificates";
|
|
11
|
-
readonly ondmarc: "ondmarc";
|
|
12
|
-
readonly pulse: "pulse";
|
|
13
|
-
readonly radar: "radar";
|
|
14
|
-
readonly 'rojo-ds': "rojo-ds";
|
|
15
|
-
readonly 'vendor-secure': "vendor-secure";
|
|
16
|
-
readonly website: "website";
|
|
17
|
-
};
|
|
18
|
-
type Product = ValueOf<typeof Product>;
|
|
19
|
-
declare const ProductName: {
|
|
20
|
-
readonly asm: "ASM";
|
|
21
|
-
readonly 'brand-trust': "Brand Trust";
|
|
22
|
-
readonly certificates: "Certificates";
|
|
23
|
-
readonly ondmarc: "OnDMARC";
|
|
24
|
-
readonly pulse: "Pulse";
|
|
25
|
-
readonly radar: "RADAR";
|
|
26
|
-
readonly 'rojo-ds': "ROJO DS";
|
|
27
|
-
readonly 'vendor-secure': "Vendor Secure";
|
|
28
|
-
readonly website: "Website";
|
|
29
|
-
};
|
|
30
|
-
type ProductName = ValueOf<typeof ProductName>;
|
|
31
|
-
declare const ProductLogo: {
|
|
32
|
-
readonly asm: JSX.Element;
|
|
33
|
-
readonly 'brand-trust': JSX.Element;
|
|
34
|
-
readonly certificates: JSX.Element;
|
|
35
|
-
readonly ondmarc: JSX.Element;
|
|
36
|
-
readonly pulse: JSX.Element;
|
|
37
|
-
readonly radar: JSX.Element;
|
|
38
|
-
readonly 'rojo-ds': JSX.Element;
|
|
39
|
-
readonly 'vendor-secure': JSX.Element;
|
|
40
|
-
readonly website: JSX.Element;
|
|
41
|
-
};
|
|
42
|
-
type ProductLogo = ValueOf<typeof ProductLogo>;
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Context props.
|
|
46
|
-
*/
|
|
47
|
-
type AppContainerState = {
|
|
48
|
-
/** Collapses the side panel. */
|
|
49
|
-
collapseSidePanel(): void;
|
|
50
|
-
/** Expandes the side panel. */
|
|
51
|
-
expandSidePanel(): void;
|
|
52
|
-
/** Product theme. */
|
|
53
|
-
product?: AppContainerProps['product'];
|
|
54
|
-
/** Set breadcrumbs of the page. */
|
|
55
|
-
setBreadcrumbs(breadcrumbs?: Omit<BreadcrumbItemProps, 'ref'>[]): void;
|
|
56
|
-
/** Page breadcrumbs. */
|
|
57
|
-
readonly breadcrumbs?: Omit<BreadcrumbItemProps, 'ref'>[];
|
|
58
|
-
/** Side panel variant. */
|
|
59
|
-
sidePanelVariant: AppSidePanelVariant;
|
|
60
|
-
/** Change side panel variant. */
|
|
61
|
-
setSidePanelVariant: Dispatch<SetStateAction<AppSidePanelVariant>>;
|
|
62
|
-
/** AppContainer ref. */
|
|
63
|
-
appContainerRef: RefObject<HTMLDivElement>;
|
|
64
|
-
/** Whether the App takes the entire screen or not. */
|
|
65
|
-
isFullScreen?: boolean;
|
|
66
|
-
};
|
|
67
10
|
/**
|
|
68
|
-
* Component
|
|
11
|
+
* Component style.
|
|
69
12
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
theme
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
13
|
+
const StyledAppContainer = styled.div`
|
|
14
|
+
box-sizing: content-box;
|
|
15
|
+
|
|
16
|
+
--redsift-color-text-primary: ${_ref => {
|
|
17
|
+
let {
|
|
18
|
+
$theme
|
|
19
|
+
} = _ref;
|
|
20
|
+
return `var(--redsift-color-${$theme}-components-text-primary);`;
|
|
21
|
+
}};
|
|
22
|
+
--redsift-color-text-secondary: ${_ref2 => {
|
|
23
|
+
let {
|
|
24
|
+
$theme
|
|
25
|
+
} = _ref2;
|
|
26
|
+
return `var(--redsift-color-${$theme}-components-text-secondary);`;
|
|
27
|
+
}};
|
|
28
|
+
color: ${_ref3 => {
|
|
29
|
+
let {
|
|
30
|
+
$theme
|
|
31
|
+
} = _ref3;
|
|
32
|
+
return `var(--redsift-color-${$theme}-components-text-primary)`;
|
|
33
|
+
}};
|
|
34
|
+
`;
|
|
87
35
|
|
|
88
|
-
|
|
36
|
+
const _excluded = ["children", "className", "locale", "product", "theme", "isFullScreen"];
|
|
37
|
+
const COMPONENT_NAME = 'AppContainer';
|
|
38
|
+
const CLASSNAME = 'redsift-app-container';
|
|
39
|
+
const RadarSvgLinearGradient = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
40
|
+
width: "0",
|
|
41
|
+
height: "0"
|
|
42
|
+
}, /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
43
|
+
id: "radar-gradient-default",
|
|
44
|
+
x1: "100%",
|
|
45
|
+
y1: "100%",
|
|
46
|
+
x2: "0%",
|
|
47
|
+
y2: "0%"
|
|
48
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
49
|
+
stopColor: "rgba(81, 183, 164, 1)",
|
|
50
|
+
offset: "0%"
|
|
51
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
52
|
+
stopColor: "rgba(0, 129, 195, 1)",
|
|
53
|
+
offset: "100%"
|
|
54
|
+
})), /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
55
|
+
id: "radar-gradient-hover",
|
|
56
|
+
x1: "100%",
|
|
57
|
+
y1: "100%",
|
|
58
|
+
x2: "0%",
|
|
59
|
+
y2: "0%"
|
|
60
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
61
|
+
stopColor: "rgba(65, 146, 131, 1)",
|
|
62
|
+
offset: "0%"
|
|
63
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
64
|
+
stopColor: "rgba(3, 114, 171, 1)",
|
|
65
|
+
offset: "100%"
|
|
66
|
+
})), /*#__PURE__*/React__default.createElement("linearGradient", {
|
|
67
|
+
id: "radar-gradient-active",
|
|
68
|
+
x1: "100%",
|
|
69
|
+
y1: "100%",
|
|
70
|
+
x2: "0%",
|
|
71
|
+
y2: "0%"
|
|
72
|
+
}, /*#__PURE__*/React__default.createElement("stop", {
|
|
73
|
+
stopColor: "rgba(58, 122, 110, 1)",
|
|
74
|
+
offset: "0%"
|
|
75
|
+
}), /*#__PURE__*/React__default.createElement("stop", {
|
|
76
|
+
stopColor: "rgba(0, 96, 145, 1)",
|
|
77
|
+
offset: "100%"
|
|
78
|
+
})));
|
|
89
79
|
|
|
90
|
-
declare const RadarSvgLinearGradient: React.FC;
|
|
91
80
|
/**
|
|
92
81
|
* The AppContainer component.
|
|
93
82
|
*/
|
|
94
|
-
|
|
83
|
+
const AppContainer = /*#__PURE__*/forwardRef((props, ref) => {
|
|
84
|
+
const _ref = useRef();
|
|
85
|
+
const divRef = ref || _ref;
|
|
86
|
+
const {
|
|
87
|
+
children,
|
|
88
|
+
className,
|
|
89
|
+
locale,
|
|
90
|
+
product,
|
|
91
|
+
theme: propsTheme,
|
|
92
|
+
isFullScreen = false
|
|
93
|
+
} = props,
|
|
94
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
95
|
+
const theme = useTheme(propsTheme);
|
|
96
|
+
const [sidePanelVariant, setSidePanelVariant] = useState(isFullScreen ? AppSidePanelVariant.hidden : AppSidePanelVariant.standard);
|
|
97
|
+
const [breadcrumbs, setBreadcrumbs] = useState();
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (isFullScreen && sidePanelVariant !== AppSidePanelVariant.hidden) {
|
|
100
|
+
setSidePanelVariant(AppSidePanelVariant.hidden);
|
|
101
|
+
} else if (!isFullScreen && sidePanelVariant !== AppSidePanelVariant.standard) {
|
|
102
|
+
setSidePanelVariant(AppSidePanelVariant.standard);
|
|
103
|
+
}
|
|
104
|
+
}, [isFullScreen]);
|
|
105
|
+
const state = {
|
|
106
|
+
collapseSidePanel() {
|
|
107
|
+
setSidePanelVariant(AppSidePanelVariant.shrinked);
|
|
108
|
+
},
|
|
109
|
+
expandSidePanel() {
|
|
110
|
+
setSidePanelVariant(AppSidePanelVariant.standard);
|
|
111
|
+
},
|
|
112
|
+
setBreadcrumbs(breadcrumbs) {
|
|
113
|
+
setBreadcrumbs(breadcrumbs);
|
|
114
|
+
},
|
|
115
|
+
product,
|
|
116
|
+
breadcrumbs,
|
|
117
|
+
sidePanelVariant,
|
|
118
|
+
setSidePanelVariant,
|
|
119
|
+
appContainerRef: divRef,
|
|
120
|
+
isFullScreen
|
|
121
|
+
};
|
|
122
|
+
return /*#__PURE__*/React__default.createElement(StyledAppContainer, _extends({}, forwardedProps, {
|
|
123
|
+
id: "redsift-app-container",
|
|
124
|
+
$theme: theme,
|
|
125
|
+
$product: product,
|
|
126
|
+
className: classNames(AppContainer.className, className),
|
|
127
|
+
ref: divRef
|
|
128
|
+
}), /*#__PURE__*/React__default.createElement(AppContainerContext.Provider, {
|
|
129
|
+
value: state
|
|
130
|
+
}, /*#__PURE__*/React__default.createElement(ThemeProvider, {
|
|
131
|
+
value: {
|
|
132
|
+
theme
|
|
133
|
+
}
|
|
134
|
+
}, /*#__PURE__*/React__default.createElement(I18nProvider, {
|
|
135
|
+
locale: locale
|
|
136
|
+
}, children))), /*#__PURE__*/React__default.createElement(RadarSvgLinearGradient, null));
|
|
137
|
+
});
|
|
138
|
+
AppContainer.className = CLASSNAME;
|
|
139
|
+
AppContainer.displayName = COMPONENT_NAME;
|
|
95
140
|
|
|
96
|
-
export {
|
|
141
|
+
export { AppContainer as A, RadarSvgLinearGradient as R };
|
|
142
|
+
//# sourceMappingURL=AppContainer.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
import { h as StylingProps, C as ContainerProps } from './styles.d2.ts';
|
|
3
|
+
import { T as Theme } from './colors.js';
|
|
4
|
+
import { C as Comp } from './helpers.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Component props.
|
|
8
|
+
*/
|
|
9
|
+
interface AppContentProps extends ComponentProps<'main'>, StylingProps, ContainerProps {
|
|
10
|
+
/** Theme. */
|
|
11
|
+
theme?: Theme;
|
|
12
|
+
}
|
|
13
|
+
type StyledAppContentProps = Omit<AppContentProps, 'product'> & {
|
|
14
|
+
$isLoaded: boolean;
|
|
15
|
+
$isSidePanelCollapsed: boolean;
|
|
16
|
+
$isAppFullScreen: boolean;
|
|
17
|
+
$theme: AppContentProps['theme'];
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* The AppContent component.
|
|
22
|
+
*/
|
|
23
|
+
declare const AppContent: Comp<AppContentProps, HTMLElement>;
|
|
24
|
+
|
|
25
|
+
export { AppContentProps as A, StyledAppContentProps as S, AppContent as a };
|
package/_internal/AppContent.js
CHANGED
|
@@ -1,25 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef, useContext } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { A as AppContainerContext } from './context.js';
|
|
5
|
+
import { u as useIsLoaded } from './useIsLoaded.js';
|
|
6
|
+
import styled, { css } from 'styled-components';
|
|
7
|
+
import { j as baseContainer } from './styles4.js';
|
|
8
|
+
import { u as useTheme } from './useTheme.js';
|
|
9
|
+
import { A as AppSidePanelVariant } from './types.js';
|
|
5
10
|
|
|
6
11
|
/**
|
|
7
|
-
* Component
|
|
12
|
+
* Component style.
|
|
8
13
|
*/
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
$
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
14
|
+
const StyledAppContent = styled.main`
|
|
15
|
+
padding: 16px 64px;
|
|
16
|
+
${baseContainer}
|
|
17
|
+
|
|
18
|
+
${_ref => {
|
|
19
|
+
let {
|
|
20
|
+
$theme
|
|
21
|
+
} = _ref;
|
|
22
|
+
return $theme ? css`
|
|
23
|
+
background-color: var(--redsift-color-${$theme}-components-page-background);
|
|
24
|
+
` : '';
|
|
25
|
+
}}
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
min-height: calc(100vh - 92px);
|
|
28
|
+
|
|
29
|
+
@media screen and (max-width: 768px) {
|
|
30
|
+
padding: 0px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
${_ref2 => {
|
|
34
|
+
let {
|
|
35
|
+
$isSidePanelCollapsed,
|
|
36
|
+
$isAppFullScreen
|
|
37
|
+
} = _ref2;
|
|
38
|
+
return $isAppFullScreen ? css`
|
|
39
|
+
transform: translate(0px);
|
|
40
|
+
width: calc(100%);
|
|
41
|
+
` : !$isSidePanelCollapsed ? css`
|
|
42
|
+
transform: translate(254px);
|
|
43
|
+
width: calc(100% - 254px);
|
|
44
|
+
` : css`
|
|
45
|
+
transform: translate(68px);
|
|
46
|
+
width: calc(100% - 68px);
|
|
47
|
+
`;
|
|
48
|
+
}}
|
|
49
|
+
|
|
50
|
+
${_ref3 => {
|
|
51
|
+
let {
|
|
52
|
+
$isLoaded
|
|
53
|
+
} = _ref3;
|
|
54
|
+
return $isLoaded ? css`
|
|
55
|
+
transition: transform 0.25s ease-out, width 0.25s ease-out;
|
|
56
|
+
` : '';
|
|
57
|
+
}}
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
const _excluded = ["children", "className", "theme"];
|
|
61
|
+
const COMPONENT_NAME = 'AppContent';
|
|
62
|
+
const CLASSNAME = 'redsift-app-content';
|
|
19
63
|
|
|
20
64
|
/**
|
|
21
65
|
* The AppContent component.
|
|
22
66
|
*/
|
|
23
|
-
|
|
67
|
+
const AppContent = /*#__PURE__*/forwardRef((props, ref) => {
|
|
68
|
+
const {
|
|
69
|
+
children,
|
|
70
|
+
className,
|
|
71
|
+
theme: propsTheme
|
|
72
|
+
} = props,
|
|
73
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
74
|
+
const {
|
|
75
|
+
isLoaded
|
|
76
|
+
} = useIsLoaded();
|
|
77
|
+
const appContainerState = useContext(AppContainerContext);
|
|
78
|
+
const theme = useTheme(propsTheme);
|
|
79
|
+
return /*#__PURE__*/React__default.createElement(StyledAppContent, _extends({}, forwardedProps, {
|
|
80
|
+
$isLoaded: isLoaded,
|
|
81
|
+
$isSidePanelCollapsed: appContainerState ? appContainerState.sidePanelVariant === AppSidePanelVariant.shrinked : true,
|
|
82
|
+
$isAppFullScreen: appContainerState ? appContainerState.sidePanelVariant === AppSidePanelVariant.hidden : false,
|
|
83
|
+
$theme: theme,
|
|
84
|
+
className: classNames(AppContent.className, className),
|
|
85
|
+
ref: ref
|
|
86
|
+
}), children);
|
|
87
|
+
});
|
|
88
|
+
AppContent.className = CLASSNAME;
|
|
89
|
+
AppContent.displayName = COMPONENT_NAME;
|
|
24
90
|
|
|
25
|
-
export {
|
|
91
|
+
export { AppContent as A };
|
|
92
|
+
//# sourceMappingURL=AppContent.js.map
|
package/_internal/Badge2.js
CHANGED
|
@@ -1,9 +1,142 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { b as _objectWithoutProperties, c as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
+
import React__default, { forwardRef } from 'react';
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import styled, { css } from 'styled-components';
|
|
5
|
+
import { T as Theme, f as PresentationColorPalette, N as NotificationsColorPalette } from './colors.js';
|
|
6
|
+
import { i as baseStyling } from './styles4.js';
|
|
7
|
+
import { u as useTheme } from './useTheme.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Component variant.
|
|
11
|
+
*/
|
|
12
|
+
const BadgeVariant = {
|
|
13
|
+
dot: 'dot',
|
|
14
|
+
standard: 'standard'
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Component props.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Component style.
|
|
23
|
+
*/
|
|
24
|
+
const StyledBadge = styled.div`
|
|
25
|
+
${baseStyling}
|
|
26
|
+
box-sizing: content-box;
|
|
27
|
+
|
|
28
|
+
${_ref => {
|
|
29
|
+
let {
|
|
30
|
+
$color,
|
|
31
|
+
$isReversed,
|
|
32
|
+
$theme
|
|
33
|
+
} = _ref;
|
|
34
|
+
if ($isReversed) {
|
|
35
|
+
return css`
|
|
36
|
+
background-color: var(--redsift-color-neutral-${$theme === Theme.light ? 'white' : 'x-dark-grey'});
|
|
37
|
+
|
|
38
|
+
&,
|
|
39
|
+
.redsift-icon {
|
|
40
|
+
color: ${Object.keys(PresentationColorPalette).includes($color) ? `var(--redsift-color-presentation-${$color}-darker);` : Object.keys(NotificationsColorPalette).includes($color) ? `var(--redsift-color-notifications-${$color}-primary);` : css`var(--redsift-color-neutral-x-dark-grey);`};
|
|
41
|
+
}
|
|
42
|
+
`;
|
|
43
|
+
} else {
|
|
44
|
+
return css`
|
|
45
|
+
background-color: ${Object.keys(PresentationColorPalette).includes($color) ? `var(--redsift-color-presentation-${$color}-darker);` : Object.keys(NotificationsColorPalette).includes($color) ? `var(--redsift-color-notifications-${$color}-primary);` : css`var(--redsift-color-neutral-x-dark-grey);`};
|
|
46
|
+
&,
|
|
47
|
+
.redsift-icon {
|
|
48
|
+
color: var(--redsift-color-neutral-white);
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
}
|
|
52
|
+
}}
|
|
53
|
+
|
|
54
|
+
${_ref2 => {
|
|
55
|
+
let {
|
|
56
|
+
$variant,
|
|
57
|
+
$autoBreak
|
|
58
|
+
} = _ref2;
|
|
59
|
+
switch ($variant) {
|
|
60
|
+
case BadgeVariant.dot:
|
|
61
|
+
return css`
|
|
62
|
+
border-radius: 50%;
|
|
63
|
+
height: 8px;
|
|
64
|
+
margin-bottom: 12px;
|
|
65
|
+
margin-right: 12px;
|
|
66
|
+
width: 8px;
|
|
67
|
+
`;
|
|
68
|
+
case BadgeVariant.standard:
|
|
69
|
+
default:
|
|
70
|
+
return css`
|
|
71
|
+
align-items: center;
|
|
72
|
+
border-radius: 64px;
|
|
73
|
+
display: inline-flex;
|
|
74
|
+
gap: 4px;
|
|
75
|
+
height: fit-content;
|
|
76
|
+
justify-content: center;
|
|
77
|
+
min-width: 8px;
|
|
78
|
+
padding: 4px 6px;
|
|
79
|
+
text-align: center;
|
|
80
|
+
width: fit-content;
|
|
81
|
+
word-break: ${$autoBreak ? 'break-word' : 'normal'};
|
|
82
|
+
|
|
83
|
+
&,
|
|
84
|
+
.redsift-icon,
|
|
85
|
+
.redsift-number,
|
|
86
|
+
.redsift-text {
|
|
87
|
+
font-family: var(--redsift-typography-badge-font-family);
|
|
88
|
+
font-size: var(--redsift-typography-badge-font-size);
|
|
89
|
+
font-weight: var(--redsift-typography-badge-font-weight);
|
|
90
|
+
line-height: var(--redsift-typography-badge-line-height);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.redsift-icon {
|
|
94
|
+
width: unset;
|
|
95
|
+
height: unset;
|
|
96
|
+
|
|
97
|
+
> svg {
|
|
98
|
+
width: 1em;
|
|
99
|
+
height: 1em;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
104
|
+
}}
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
const _excluded = ["autoBreak", "children", "className", "color", "isReversed", "theme", "variant"];
|
|
108
|
+
const COMPONENT_NAME = 'Badge';
|
|
109
|
+
const CLASSNAME = 'redsift-badge';
|
|
3
110
|
|
|
4
111
|
/**
|
|
5
112
|
* The Badge component.
|
|
6
113
|
*/
|
|
7
|
-
|
|
114
|
+
const Badge = /*#__PURE__*/forwardRef((props, ref) => {
|
|
115
|
+
const {
|
|
116
|
+
autoBreak,
|
|
117
|
+
children,
|
|
118
|
+
className,
|
|
119
|
+
color: propsColor,
|
|
120
|
+
isReversed,
|
|
121
|
+
theme: propsTheme,
|
|
122
|
+
variant: propsVariant
|
|
123
|
+
} = props,
|
|
124
|
+
forwardedProps = _objectWithoutProperties(props, _excluded);
|
|
125
|
+
const theme = useTheme(propsTheme);
|
|
126
|
+
const color = [...Object.values(NotificationsColorPalette), ...Object.values(PresentationColorPalette)].includes(propsColor) ? propsColor : 'question';
|
|
127
|
+
const variant = Object.values(BadgeVariant).includes(propsVariant) ? propsVariant : 'dot';
|
|
128
|
+
return /*#__PURE__*/React__default.createElement(StyledBadge, _extends({}, forwardedProps, {
|
|
129
|
+
$autoBreak: autoBreak,
|
|
130
|
+
$color: color,
|
|
131
|
+
$isReversed: isReversed,
|
|
132
|
+
$theme: theme,
|
|
133
|
+
$variant: variant,
|
|
134
|
+
className: classNames(Badge.className, `${Badge.className}-${variant}`, className),
|
|
135
|
+
ref: ref
|
|
136
|
+
}), variant === BadgeVariant.standard ? children : null);
|
|
137
|
+
});
|
|
138
|
+
Badge.className = CLASSNAME;
|
|
139
|
+
Badge.displayName = COMPONENT_NAME;
|
|
8
140
|
|
|
9
|
-
export {
|
|
141
|
+
export { BadgeVariant as B, Badge as a };
|
|
142
|
+
//# sourceMappingURL=Badge2.js.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { B as BreadcrumbItemProps } from './types.d3.ts';
|
|
2
|
+
import { C as Comp } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The BreadcrumbItem components is a list of links to the parent pages of the current page in hierarchical order.
|
|
6
|
+
*/
|
|
7
|
+
declare const BreadcrumbItem: Comp<BreadcrumbItemProps, HTMLAnchorElement>;
|
|
8
|
+
|
|
9
|
+
export { BreadcrumbItem as B };
|