@redsift/dashboard 7.3.0 → 7.4.0-alpha.1
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/CONTRIBUTING.md +2 -2
- package/index.d.ts +92 -2
- package/index.js +278 -85
- package/index.js.map +1 -1
- package/package.json +4 -4
package/CONTRIBUTING.md
CHANGED
|
@@ -32,7 +32,7 @@ The Design System is following a monorepo architecture, providing multiple packa
|
|
|
32
32
|
|
|
33
33
|
- `@redsift/icons`
|
|
34
34
|
|
|
35
|
-
This package provides icons based on [Material Design Icon](https://
|
|
35
|
+
This package provides icons based on [Material Design Icon](https://pictogrammers.com/library/mdi/) library.
|
|
36
36
|
|
|
37
37
|
- `@redsift/design-system`
|
|
38
38
|
|
|
@@ -123,7 +123,7 @@ import { Comp } from '~/types';
|
|
|
123
123
|
import { StyledBadge } from './styles';
|
|
124
124
|
import { BadgeProps } from './types';
|
|
125
125
|
|
|
126
|
-
const COMPONENT_NAME = '
|
|
126
|
+
const COMPONENT_NAME = 'Badge';
|
|
127
127
|
const CLASSNAME = 'redsift-badge';
|
|
128
128
|
const DEFAULT_PROPS: Partial<BadgeProps> = {
|
|
129
129
|
// default values
|
package/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ type Comp<P, T = HTMLElement> = {
|
|
|
54
54
|
};
|
|
55
55
|
/** Get types of the values of a record. */
|
|
56
56
|
type ValueOf<T extends Record<any, any>> = T[keyof T];
|
|
57
|
+
|
|
57
58
|
/**
|
|
58
59
|
* Color palette.
|
|
59
60
|
*/
|
|
@@ -77,6 +78,93 @@ declare const ProductColorPalette: {
|
|
|
77
78
|
};
|
|
78
79
|
type ProductColorPalette = ValueOf<typeof ProductColorPalette>;
|
|
79
80
|
|
|
81
|
+
declare const AlignSelf: {
|
|
82
|
+
readonly auto: "auto";
|
|
83
|
+
readonly normal: "normal";
|
|
84
|
+
readonly start: "start";
|
|
85
|
+
readonly end: "end";
|
|
86
|
+
readonly center: "center";
|
|
87
|
+
readonly 'flex-start': "flex-start";
|
|
88
|
+
readonly 'flex-end': "flex-end";
|
|
89
|
+
readonly 'self-start': "self-start";
|
|
90
|
+
readonly 'self-end': "self-end";
|
|
91
|
+
readonly baseline: "baseline";
|
|
92
|
+
readonly stretch: "stretch";
|
|
93
|
+
};
|
|
94
|
+
type AlignSelf = ValueOf<typeof AlignSelf>;
|
|
95
|
+
interface LayoutProps {
|
|
96
|
+
/** When used in a flex layout, specifies how the element will grow or shrink to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex">MDN</a>. */
|
|
97
|
+
flex?: string;
|
|
98
|
+
/** When used in a flex layout, specifies how the element will grow to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow">MDN</a>. */
|
|
99
|
+
flexGrow?: number;
|
|
100
|
+
/** When used in a flex layout, specifies how the element will shrink to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink">MDN</a>. */
|
|
101
|
+
flexShrink?: number;
|
|
102
|
+
/** When used in a flex layout, specifies the initial main size of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex_basis">MDN</a>. */
|
|
103
|
+
flexBasis?: string;
|
|
104
|
+
/** Overrides the alignItems property of a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-self">MDN</a>. */
|
|
105
|
+
alignSelf?: AlignSelf;
|
|
106
|
+
/** Specifies how the element is justified inside a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self">MDN</a>. */
|
|
107
|
+
justifySelf?: string;
|
|
108
|
+
/** The layout order for the element within a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/order">MDN</a>. */
|
|
109
|
+
order?: number;
|
|
110
|
+
/** When used in a grid layout, specifies the named grid area that the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area">MDN</a>. */
|
|
111
|
+
gridArea?: string;
|
|
112
|
+
/** When used in a grid layout, specifies the column the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column">MDN</a>. */
|
|
113
|
+
gridColumn?: string;
|
|
114
|
+
/** When used in a grid layout, specifies the row the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row">MDN</a>. */
|
|
115
|
+
gridRow?: string;
|
|
116
|
+
/** When used in a grid layout, specifies the starting column to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start">MDN</a>. */
|
|
117
|
+
gridColumnStart?: string;
|
|
118
|
+
/** When used in a grid layout, specifies the ending column to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end">MDN</a>. */
|
|
119
|
+
gridColumnEnd?: string;
|
|
120
|
+
/** When used in a grid layout, specifies the starting row to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start">MDN</a>. */
|
|
121
|
+
gridRowStart?: string;
|
|
122
|
+
/** When used in a grid layout, specifies the ending row to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end">MDN</a>. */
|
|
123
|
+
gridRowEnd?: string;
|
|
124
|
+
}
|
|
125
|
+
interface SpacingProps {
|
|
126
|
+
/** The margin for all four sides of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin">MDN</a>. */
|
|
127
|
+
margin?: string;
|
|
128
|
+
/** The margin for the bottom side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom">MDN</a>. */
|
|
129
|
+
marginBottom?: string;
|
|
130
|
+
/** The margin for the left side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left">MDN</a>. */
|
|
131
|
+
marginLeft?: string;
|
|
132
|
+
/** The margin for the right side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right">MDN</a>. */
|
|
133
|
+
marginRight?: string;
|
|
134
|
+
/** The margin for the top side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top">MDN</a>. */
|
|
135
|
+
marginTop?: string;
|
|
136
|
+
}
|
|
137
|
+
interface SizingProps {
|
|
138
|
+
/** The height of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/height">MDN</a>. */
|
|
139
|
+
height?: string | number;
|
|
140
|
+
/** The maximum height of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/max-height">MDN</a>. */
|
|
141
|
+
maxHeight?: string;
|
|
142
|
+
/** The maximum width of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/max-width">MDN</a>. */
|
|
143
|
+
maxWidth?: string;
|
|
144
|
+
/** The minimum height of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/min-height">MDN</a>. */
|
|
145
|
+
minHeight?: string;
|
|
146
|
+
/** The minimum width of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/min-width">MDN</a>. */
|
|
147
|
+
minWidth?: string;
|
|
148
|
+
/** The width of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/width">MDN</a>. */
|
|
149
|
+
width?: string | number;
|
|
150
|
+
}
|
|
151
|
+
interface PositioningProps {
|
|
152
|
+
/** Specifies how the element is positioned. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position">MDN</a>. */
|
|
153
|
+
position?: string;
|
|
154
|
+
/** The top position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/top">MDN</a>. */
|
|
155
|
+
top?: string;
|
|
156
|
+
/** The bottom position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/bottom">MDN</a>. */
|
|
157
|
+
bottom?: string;
|
|
158
|
+
/** The left position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/left">MDN</a>. Consider using start instead for RTL support. */
|
|
159
|
+
left?: string;
|
|
160
|
+
/** The right position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/right">MDN</a>. Consider using start instead for RTL support. */
|
|
161
|
+
right?: string;
|
|
162
|
+
/** The stacking order for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/z-index">MDN</a>. */
|
|
163
|
+
zIndex?: string;
|
|
164
|
+
}
|
|
165
|
+
interface StylingProps extends LayoutProps, SpacingProps, SizingProps, PositioningProps {
|
|
166
|
+
}
|
|
167
|
+
|
|
80
168
|
/*
|
|
81
169
|
* Copyright 2020 Adobe. All rights reserved.
|
|
82
170
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -121,11 +209,11 @@ type ButtonVariant = ValueOf<typeof ButtonVariant>;
|
|
|
121
209
|
/**
|
|
122
210
|
* Component color.
|
|
123
211
|
*/
|
|
124
|
-
type ButtonColor =
|
|
212
|
+
type ButtonColor = ColorPalette | ProductColorPalette;
|
|
125
213
|
/**
|
|
126
214
|
* Component props.
|
|
127
215
|
*/
|
|
128
|
-
interface ButtonProps extends ComponentProps<'button'
|
|
216
|
+
interface ButtonProps extends ComponentProps<'button'>, StylingProps {
|
|
129
217
|
/** Color variant. The product colors are available but should only be used to display the Button in the color of another product. To display a Button with a color of the current product, use `default`. */
|
|
130
218
|
color?: ButtonColor;
|
|
131
219
|
/** Whether the component take the full width or not. */
|
|
@@ -134,6 +222,8 @@ interface ButtonProps extends ComponentProps<'button'> {
|
|
|
134
222
|
isActive?: boolean;
|
|
135
223
|
/** Whether the component is disabled or not. */
|
|
136
224
|
isDisabled?: boolean;
|
|
225
|
+
/** Whether the component is in a loading state or not. */
|
|
226
|
+
isLoading?: boolean;
|
|
137
227
|
/**
|
|
138
228
|
* Icon path data (`d` property of the `path` SVG element).<br />
|
|
139
229
|
* See <a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths">https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths</a>.<br />
|
package/index.js
CHANGED
|
@@ -20,7 +20,6 @@ const SUM = groupReduceSum;
|
|
|
20
20
|
// Material Design Icons v7.1.96
|
|
21
21
|
var mdiRefresh = "M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,20C15.73,20 18.84,17.45 19.73,14H17.65C16.83,16.33 14.61,18 12,18A6,6 0 0,1 6,12A6,6 0 0,1 12,6C13.66,6 15.14,6.69 16.22,7.78L13,11H20V4L17.65,6.35Z";
|
|
22
22
|
|
|
23
|
-
/** Component Type. */
|
|
24
23
|
/**
|
|
25
24
|
* Color palette.
|
|
26
25
|
*/
|
|
@@ -44,7 +43,7 @@ const ProductColorPalette = {
|
|
|
44
43
|
|
|
45
44
|
/**
|
|
46
45
|
* Do not edit directly
|
|
47
|
-
* Generated on Thu,
|
|
46
|
+
* Generated on Thu, 09 Feb 2023 16:05:01 GMT
|
|
48
47
|
*/
|
|
49
48
|
|
|
50
49
|
const RedsiftColorDefaultPrimary = '#0079e1';
|
|
@@ -2118,15 +2117,185 @@ const IconSize = {
|
|
|
2118
2117
|
xsmall: 'xsmall',
|
|
2119
2118
|
small: 'small',
|
|
2120
2119
|
medium: 'medium',
|
|
2121
|
-
large: 'large'
|
|
2120
|
+
large: 'large',
|
|
2121
|
+
xlarge: 'xlarge'
|
|
2122
2122
|
};
|
|
2123
2123
|
|
|
2124
|
+
const baseLayout = css`
|
|
2125
|
+
${_ref => {
|
|
2126
|
+
let {
|
|
2127
|
+
flex,
|
|
2128
|
+
flexGrow,
|
|
2129
|
+
flexShrink,
|
|
2130
|
+
flexBasis,
|
|
2131
|
+
alignSelf,
|
|
2132
|
+
justifySelf,
|
|
2133
|
+
order,
|
|
2134
|
+
gridArea,
|
|
2135
|
+
gridColumn,
|
|
2136
|
+
gridRow,
|
|
2137
|
+
gridColumnStart,
|
|
2138
|
+
gridColumnEnd,
|
|
2139
|
+
gridRowStart,
|
|
2140
|
+
gridRowEnd
|
|
2141
|
+
} = _ref;
|
|
2142
|
+
return css`
|
|
2143
|
+
${flex ? `flex: ${flex};` : ''}
|
|
2144
|
+
${flexGrow ? `flex-grow: ${flexGrow};` : ''}
|
|
2145
|
+
${flexShrink ? `flex-shrink: ${flexShrink};` : ''}
|
|
2146
|
+
${flexBasis ? `flex-basis: ${flexBasis};` : ''}
|
|
2147
|
+
${alignSelf ? `align-self: ${alignSelf};` : ''}
|
|
2148
|
+
${justifySelf ? `justify-self: ${justifySelf};` : ''}
|
|
2149
|
+
${order ? `order: ${order};` : ''}
|
|
2150
|
+
${gridArea ? `grid-area: ${gridArea};` : ''}
|
|
2151
|
+
${gridColumn ? `grid-column: ${gridColumn};` : ''}
|
|
2152
|
+
${gridRow ? `grid-row: ${gridRow};` : ''}
|
|
2153
|
+
${gridColumnStart ? `grid-column-start: ${gridColumnStart};` : ''}
|
|
2154
|
+
${gridColumnEnd ? `grid-column-end: ${gridColumnEnd};` : ''}
|
|
2155
|
+
${gridRowStart ? `grid-row-start: ${gridRowStart};` : ''}
|
|
2156
|
+
${gridRowEnd ? `grid-row-end: ${gridRowEnd};` : ''}
|
|
2157
|
+
`;
|
|
2158
|
+
}}
|
|
2159
|
+
`;
|
|
2160
|
+
const baseSpacing = css`
|
|
2161
|
+
${_ref2 => {
|
|
2162
|
+
let {
|
|
2163
|
+
margin,
|
|
2164
|
+
marginBottom,
|
|
2165
|
+
marginLeft,
|
|
2166
|
+
marginRight,
|
|
2167
|
+
marginTop
|
|
2168
|
+
} = _ref2;
|
|
2169
|
+
return css`
|
|
2170
|
+
${margin ? `margin: ${margin};` : ''}
|
|
2171
|
+
${marginBottom ? `margin-bottom: ${marginBottom};` : ''}
|
|
2172
|
+
${marginLeft ? `margin-left: ${marginLeft};` : ''}
|
|
2173
|
+
${marginRight ? `margin-right: ${marginRight};` : ''}
|
|
2174
|
+
${marginTop ? `margin-top: ${marginTop};` : ''}
|
|
2175
|
+
`;
|
|
2176
|
+
}}
|
|
2177
|
+
`;
|
|
2178
|
+
const baseSizing = css`
|
|
2179
|
+
${_ref3 => {
|
|
2180
|
+
let {
|
|
2181
|
+
height,
|
|
2182
|
+
maxHeight,
|
|
2183
|
+
maxWidth,
|
|
2184
|
+
minHeight,
|
|
2185
|
+
minWidth,
|
|
2186
|
+
width
|
|
2187
|
+
} = _ref3;
|
|
2188
|
+
return css`
|
|
2189
|
+
${height ? `height: ${typeof height === 'number' ? `${height}px` : height};` : ''}
|
|
2190
|
+
${maxHeight ? `max-height: ${maxHeight};` : ''}
|
|
2191
|
+
${maxWidth ? `max-width: ${maxWidth};` : ''}
|
|
2192
|
+
${minHeight ? `min-height: ${minHeight};` : ''}
|
|
2193
|
+
${minWidth ? `min-width: ${minWidth};` : ''}
|
|
2194
|
+
${width ? `width: ${typeof width === 'number' ? `${width}px` : width};` : ''}
|
|
2195
|
+
`;
|
|
2196
|
+
}}
|
|
2197
|
+
`;
|
|
2198
|
+
const basePositioning = css`
|
|
2199
|
+
${_ref4 => {
|
|
2200
|
+
let {
|
|
2201
|
+
position,
|
|
2202
|
+
top,
|
|
2203
|
+
bottom,
|
|
2204
|
+
left,
|
|
2205
|
+
right,
|
|
2206
|
+
zIndex
|
|
2207
|
+
} = _ref4;
|
|
2208
|
+
return css`
|
|
2209
|
+
${position ? `position: ${position};` : ''}
|
|
2210
|
+
${top ? `top: ${top};` : ''}
|
|
2211
|
+
${bottom ? `bottom: ${bottom};` : ''}
|
|
2212
|
+
${left ? `left: ${left};` : ''}
|
|
2213
|
+
${right ? `right: ${right};` : ''}
|
|
2214
|
+
${zIndex ? `z-index: ${zIndex};` : ''}
|
|
2215
|
+
`;
|
|
2216
|
+
}}
|
|
2217
|
+
`;
|
|
2218
|
+
const baseFlexbox = css`
|
|
2219
|
+
${_ref5 => {
|
|
2220
|
+
let {
|
|
2221
|
+
alignContent,
|
|
2222
|
+
alignItems,
|
|
2223
|
+
flexDirection,
|
|
2224
|
+
flexWrap,
|
|
2225
|
+
gap,
|
|
2226
|
+
justifyContent
|
|
2227
|
+
} = _ref5;
|
|
2228
|
+
return css`
|
|
2229
|
+
${alignContent ? `align-content: ${alignContent};` : ''}
|
|
2230
|
+
${alignItems ? `align-items: ${alignItems};` : ''}
|
|
2231
|
+
${flexDirection ? `flex-direction: ${flexDirection};` : ''}
|
|
2232
|
+
${flexWrap ? `flex-wrap: ${flexWrap};` : ''}
|
|
2233
|
+
gap: ${gap};
|
|
2234
|
+
${justifyContent ? `justify-content: ${justifyContent};` : ''}
|
|
2235
|
+
`;
|
|
2236
|
+
}}
|
|
2237
|
+
`;
|
|
2238
|
+
const baseGrid = css`
|
|
2239
|
+
${_ref6 => {
|
|
2240
|
+
let {
|
|
2241
|
+
alignContent,
|
|
2242
|
+
alignItems,
|
|
2243
|
+
gap,
|
|
2244
|
+
gridAutoColumns,
|
|
2245
|
+
gridAutoRows,
|
|
2246
|
+
gridTemplateAreas,
|
|
2247
|
+
gridTemplateColumns,
|
|
2248
|
+
gridTemplateRows,
|
|
2249
|
+
justifyContent,
|
|
2250
|
+
justifyItems
|
|
2251
|
+
} = _ref6;
|
|
2252
|
+
return css`
|
|
2253
|
+
${alignContent ? `align-content: ${alignContent};` : ''}
|
|
2254
|
+
${alignItems ? `align-items: ${alignItems};` : ''}
|
|
2255
|
+
${gap ? `gap: ${gap};` : ''}
|
|
2256
|
+
${gridAutoColumns ? `grid-auto-columns: ${gridAutoColumns};` : ''}
|
|
2257
|
+
${gridAutoRows ? `grid-auto-rows: ${gridAutoRows};` : ''}
|
|
2258
|
+
${gridTemplateAreas ? `grid-template-areas: ${gridTemplateAreas};` : ''}
|
|
2259
|
+
${gridTemplateColumns ? `grid-template-columns: ${gridTemplateColumns};` : ''}
|
|
2260
|
+
${gridTemplateRows ? `grid-template-rows: ${gridTemplateRows};` : ''}
|
|
2261
|
+
${justifyContent ? `justify-content: ${justifyContent};` : ''}
|
|
2262
|
+
${justifyItems ? `justify-items: ${justifyItems};` : ''}
|
|
2263
|
+
`;
|
|
2264
|
+
}}
|
|
2265
|
+
`;
|
|
2266
|
+
const baseStyling = css`
|
|
2267
|
+
font-family: var(--redsift-typography-body-font-family);
|
|
2268
|
+
font-size: var(--redsift-typography-body-font-size);
|
|
2269
|
+
font-weight: var(--redsift-typography-body-font-weight);
|
|
2270
|
+
line-height: var(--redsift-typography-body-line-height);
|
|
2271
|
+
color: var(--redsift-color-neutral-black);
|
|
2272
|
+
|
|
2273
|
+
${baseLayout}
|
|
2274
|
+
${baseSpacing}
|
|
2275
|
+
${baseSizing}
|
|
2276
|
+
${basePositioning}
|
|
2277
|
+
`;
|
|
2278
|
+
css`
|
|
2279
|
+
${_ref7 => {
|
|
2280
|
+
let {
|
|
2281
|
+
display
|
|
2282
|
+
} = _ref7;
|
|
2283
|
+
return display ? `display: ${display};` : '';
|
|
2284
|
+
}}
|
|
2285
|
+
|
|
2286
|
+
${baseStyling}
|
|
2287
|
+
${baseFlexbox}
|
|
2288
|
+
${baseGrid}
|
|
2289
|
+
`;
|
|
2290
|
+
|
|
2124
2291
|
/**
|
|
2125
2292
|
* Component style.
|
|
2126
2293
|
*/
|
|
2127
2294
|
const StyledIcon = styled.span`
|
|
2128
|
-
font-style: normal;
|
|
2129
2295
|
position: relative;
|
|
2296
|
+
${baseStyling}
|
|
2297
|
+
|
|
2298
|
+
font-style: normal;
|
|
2130
2299
|
|
|
2131
2300
|
svg {
|
|
2132
2301
|
vertical-align: -0.125em;
|
|
@@ -2148,6 +2317,25 @@ const StyledIcon = styled.span`
|
|
|
2148
2317
|
$size
|
|
2149
2318
|
} = _ref2;
|
|
2150
2319
|
switch ($size) {
|
|
2320
|
+
case IconSize.xlarge:
|
|
2321
|
+
return css`
|
|
2322
|
+
font-size: 40px;
|
|
2323
|
+
height: 40px;
|
|
2324
|
+
line-height: 40px;
|
|
2325
|
+
width: 40px;
|
|
2326
|
+
|
|
2327
|
+
& .redsift-badge-standard {
|
|
2328
|
+
position: absolute;
|
|
2329
|
+
right: -24px;
|
|
2330
|
+
top: -2px;
|
|
2331
|
+
}
|
|
2332
|
+
|
|
2333
|
+
& .redsift-badge-dot {
|
|
2334
|
+
position: absolute;
|
|
2335
|
+
right: -14px;
|
|
2336
|
+
top: 6px;
|
|
2337
|
+
}
|
|
2338
|
+
`;
|
|
2151
2339
|
case IconSize.large:
|
|
2152
2340
|
return css`
|
|
2153
2341
|
font-size: 28px;
|
|
@@ -2230,7 +2418,7 @@ const StyledIcon = styled.span`
|
|
|
2230
2418
|
`;
|
|
2231
2419
|
|
|
2232
2420
|
const _excluded$8 = ["aria-hidden", "aria-label", "badge", "className", "color", "icon", "size", "svgProps"];
|
|
2233
|
-
const COMPONENT_NAME$8 = '
|
|
2421
|
+
const COMPONENT_NAME$8 = 'Icon';
|
|
2234
2422
|
const CLASSNAME$8 = 'redsift-icon';
|
|
2235
2423
|
const DEFAULT_PROPS$7 = {
|
|
2236
2424
|
size: IconSize.medium
|
|
@@ -2289,6 +2477,8 @@ const ButtonVariant = {
|
|
|
2289
2477
|
* Component style.
|
|
2290
2478
|
*/
|
|
2291
2479
|
const StyledButton = styled.button`
|
|
2480
|
+
${baseStyling}
|
|
2481
|
+
|
|
2292
2482
|
align-items: center;
|
|
2293
2483
|
background: none;
|
|
2294
2484
|
border: none;
|
|
@@ -2296,6 +2486,7 @@ const StyledButton = styled.button`
|
|
|
2296
2486
|
font-family: var(--redsift-typography-button-font-family);
|
|
2297
2487
|
font-size: var(--redsift-typography-button-font-size);
|
|
2298
2488
|
font-weight: var(--redsift-typography-button-font-weight);
|
|
2489
|
+
gap: 8px;
|
|
2299
2490
|
justify-content: center;
|
|
2300
2491
|
line-height: var(--redsift-typography-button-line-height);
|
|
2301
2492
|
text-decoration: none;
|
|
@@ -2405,76 +2596,10 @@ const StyledButton = styled.button`
|
|
|
2405
2596
|
.redsift-icon.right {
|
|
2406
2597
|
margin-left: unset;
|
|
2407
2598
|
}
|
|
2408
|
-
|
|
2409
|
-
span {
|
|
2410
|
-
margin-right: 8px;
|
|
2411
|
-
margin-left: 8px;
|
|
2412
|
-
}
|
|
2413
2599
|
` : '';
|
|
2414
2600
|
}}
|
|
2415
2601
|
`;
|
|
2416
2602
|
|
|
2417
|
-
const _excluded$7 = ["children", "className", "color", "disabled", "fullWidth", "isActive", "isDisabled", "leftIcon", "onPress", "rightIcon", "variant"];
|
|
2418
|
-
const COMPONENT_NAME$7 = 'RedSiftButton';
|
|
2419
|
-
const CLASSNAME$7 = 'redsift-button';
|
|
2420
|
-
const DEFAULT_PROPS$6 = {
|
|
2421
|
-
color: ColorPalette.default,
|
|
2422
|
-
variant: ButtonVariant.primary
|
|
2423
|
-
};
|
|
2424
|
-
|
|
2425
|
-
/**
|
|
2426
|
-
* The Button is a semantic button that looks like a button.
|
|
2427
|
-
*
|
|
2428
|
-
* For a semantic link that looks like a button, please use the ButtonLink component.
|
|
2429
|
-
* For a semantic link that looks like a link, please use the Link component.
|
|
2430
|
-
* For a semantic button that looks like a link, please use the LinkButton component.
|
|
2431
|
-
*/
|
|
2432
|
-
const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2433
|
-
const buttonRef = ref || useRef();
|
|
2434
|
-
const {
|
|
2435
|
-
buttonProps
|
|
2436
|
-
} = $701a24aa0da5b062$export$ea18c227d4417cc3(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
2437
|
-
preventFocusOnPress: true
|
|
2438
|
-
}), buttonRef);
|
|
2439
|
-
const {
|
|
2440
|
-
children,
|
|
2441
|
-
className,
|
|
2442
|
-
color,
|
|
2443
|
-
disabled,
|
|
2444
|
-
fullWidth,
|
|
2445
|
-
isActive,
|
|
2446
|
-
isDisabled,
|
|
2447
|
-
leftIcon,
|
|
2448
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2449
|
-
onPress,
|
|
2450
|
-
rightIcon,
|
|
2451
|
-
variant
|
|
2452
|
-
} = props,
|
|
2453
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$7);
|
|
2454
|
-
return /*#__PURE__*/React.createElement(StyledButton, _extends({}, forwardedProps, buttonProps, {
|
|
2455
|
-
$color: color,
|
|
2456
|
-
$fullWidth: fullWidth,
|
|
2457
|
-
$isActive: isActive,
|
|
2458
|
-
$isDisabled: isDisabled || disabled,
|
|
2459
|
-
$variant: variant,
|
|
2460
|
-
"aria-disabled": isDisabled || disabled,
|
|
2461
|
-
className: classNames(Button.className, className),
|
|
2462
|
-
disabled: isDisabled || disabled,
|
|
2463
|
-
ref: buttonRef
|
|
2464
|
-
}), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
2465
|
-
icon: leftIcon,
|
|
2466
|
-
"aria-hidden": "true",
|
|
2467
|
-
className: "left"
|
|
2468
|
-
}) : null, children && /*#__PURE__*/React.createElement("span", null, children), rightIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
2469
|
-
icon: rightIcon,
|
|
2470
|
-
"aria-hidden": "true",
|
|
2471
|
-
className: "right"
|
|
2472
|
-
}) : null);
|
|
2473
|
-
});
|
|
2474
|
-
Button.className = CLASSNAME$7;
|
|
2475
|
-
Button.defaultProps = DEFAULT_PROPS$6;
|
|
2476
|
-
Button.displayName = COMPONENT_NAME$7;
|
|
2477
|
-
|
|
2478
2603
|
var loading$1 = "Loading...";
|
|
2479
2604
|
var enUS = {
|
|
2480
2605
|
loading: loading$1
|
|
@@ -2501,6 +2626,8 @@ const SpinnerSize = {
|
|
|
2501
2626
|
};
|
|
2502
2627
|
|
|
2503
2628
|
const StyledSpinner = styled.img`
|
|
2629
|
+
${baseStyling}
|
|
2630
|
+
|
|
2504
2631
|
display: inline;
|
|
2505
2632
|
line-height: 0px;
|
|
2506
2633
|
vertical-align: -0.125em;
|
|
@@ -2524,7 +2651,7 @@ var spinnerTools = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My
|
|
|
2524
2651
|
|
|
2525
2652
|
var spinnerWebsite = 'data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgNDAwIDQwMCIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iIHRleHQtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogIDxzdHlsZT4KICAgIC5zcGlubmluZyB7CiAgICAgIGFuaW1hdGlvbjogc3Bpbm5pbmcta2V5ZnJhbWVzIDMwMDBtcyBsaW5lYXIgaW5maW5pdGUgbm9ybWFsIGZvcndhcmRzOwogICAgICB0cmFuc2Zvcm0tb3JpZ2luOiBjZW50ZXI7CiAgICAgIGFuaW1hdGlvbi10aW1pbmctZnVuY3Rpb246IGN1YmljLWJlemllcigwLjQyLCAwLCAwLjU4LCAxKTsKICAgIH0KICAgIEBrZXlmcmFtZXMgc3Bpbm5pbmcta2V5ZnJhbWVzIHsKICAgICAgMCUgewogICAgICAgIHRyYW5zZm9ybTogIHJvdGF0ZSgwZGVnKTsKICAgICAgfQoKICAgICAgMzMlIHsKICAgICAgICB0cmFuc2Zvcm06ICByb3RhdGUoMTgwZGVnKTsKICAgICAgfQoKICAgICAgNTAlIHsKICAgICAgICB0cmFuc2Zvcm06IHJvdGF0ZSgxODBkZWcpOwogICAgICB9CgogICAgICA4MyUgewogICAgICAgIHRyYW5zZm9ybTogIHJvdGF0ZSgzNjBkZWcpOwogICAgICB9CgogICAgICAxMDAlIHsKICAgICAgICB0cmFuc2Zvcm06ICByb3RhdGUoMzYwZGVnKQogICAgICB9CiAgICB9CiAgPC9zdHlsZT4KICA8cGF0aAogICAgbWFzaz0idXJsKCNzcGlubmVyLXUtbWFza3MpIgogICAgZmlsbD0iIzAwNzllMSIKICAgIGQ9Ik0zMTggMTg2LjlWMTA4LjhMMjAwIDU3IDgyIDEwOC44djc4LjFDODIgMjU5IDEzMi4zIDMyNi40IDIwMCAzNDNjNjcuNy0xNi42IDExOC04NCAxMTgtMTU2LjF6TTQwMCAyMDBjMCAxMTAuNS04OS41IDIwMC0yMDAgMjAwUzAgMzEwLjUgMCAyMDAgODkuNSAwIDIwMCAwczIwMCA4OS41IDIwMCAyMDB6IgogIC8+CiAgPG1hc2sgaWQ9InNwaW5uZXItdS1tYXNrcyI+CiAgICA8cGF0aAogICAgICBjbGFzcz0ic3Bpbm5pbmciCiAgICAgIGQ9Ik0wLDIwMEMwLDg5LjU0MzA1LDg5LjU0MzA1LDAsMjAwLDB2NDAwQzg5LjU0MzA1LDQwMCwwLDMxMC40NTY5NSwwLDIwMFoiCiAgICAgIGZpbGw9IiNmZmYiCiAgICAvPgogIDwvbWFzaz4KICA8cGF0aAogICAgbWFzaz0idXJsKCNzcGlubmVyLXUtbWFza3MyKSIKICAgIGZpbGw9IiMwMDc5ZTEiCiAgICBkPSJNODIsMTg2LjkzOXYtNzguMDg5TDIwMCw1N2wxMTgsNTEuODV2NzguMDg5QzMxOCwyNTkuMDAyLDI2Ny42ODYsMzI2LjQwMiwyMDAsMzQzQzEzMi4zMTQsMzI2LjQwMiw4MiwyNTkuMDAyLDgyLDE4Ni45MzlaIgogIC8+CiAgPG1hc2sgaWQ9InNwaW5uZXItdS1tYXNrczIiPgogICAgPHBhdGgKICAgICAgY2xhc3M9InNwaW5uaW5nIgogICAgICBkPSJNNDAwIDIwMEM0MDAgMzEwLjUgMzEwLjUgNDAwIDIwMCA0MDBWMGMxMTAuNSAwIDIwMCA4OS41IDIwMCAyMDB6IgogICAgICBmaWxsPSIjZmZmIgogICAgLz4KICA8L21hc2s+Cjwvc3ZnPg==';
|
|
2526
2653
|
|
|
2527
|
-
const _excluded$
|
|
2654
|
+
const _excluded$7 = ["aria-hidden", "aria-label", "className", "color", "size"];
|
|
2528
2655
|
const colorToFile = {
|
|
2529
2656
|
default: spinnerDefault,
|
|
2530
2657
|
hardenize: spinnerHardenize,
|
|
@@ -2536,9 +2663,9 @@ const colorToFile = {
|
|
|
2536
2663
|
tools: spinnerTools,
|
|
2537
2664
|
website: spinnerWebsite
|
|
2538
2665
|
};
|
|
2539
|
-
const COMPONENT_NAME$
|
|
2540
|
-
const CLASSNAME$
|
|
2541
|
-
const DEFAULT_PROPS$
|
|
2666
|
+
const COMPONENT_NAME$7 = 'Spinner';
|
|
2667
|
+
const CLASSNAME$7 = 'redsift-shield';
|
|
2668
|
+
const DEFAULT_PROPS$6 = {
|
|
2542
2669
|
color: ColorPalette.default,
|
|
2543
2670
|
size: SpinnerSize.medium
|
|
2544
2671
|
};
|
|
@@ -2579,7 +2706,7 @@ const Spinner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2579
2706
|
color,
|
|
2580
2707
|
size
|
|
2581
2708
|
} = props,
|
|
2582
|
-
forwardedProps = _objectWithoutProperties(props, _excluded$
|
|
2709
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$7);
|
|
2583
2710
|
const {
|
|
2584
2711
|
width,
|
|
2585
2712
|
height
|
|
@@ -2599,9 +2726,75 @@ const Spinner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
2599
2726
|
$size: size
|
|
2600
2727
|
}));
|
|
2601
2728
|
});
|
|
2602
|
-
Spinner.className = CLASSNAME$
|
|
2603
|
-
Spinner.defaultProps = DEFAULT_PROPS$
|
|
2604
|
-
Spinner.displayName = COMPONENT_NAME$
|
|
2729
|
+
Spinner.className = CLASSNAME$7;
|
|
2730
|
+
Spinner.defaultProps = DEFAULT_PROPS$6;
|
|
2731
|
+
Spinner.displayName = COMPONENT_NAME$7;
|
|
2732
|
+
|
|
2733
|
+
const _excluded$6 = ["children", "className", "color", "disabled", "fullWidth", "isActive", "isDisabled", "isLoading", "leftIcon", "onPress", "rightIcon", "variant"];
|
|
2734
|
+
const COMPONENT_NAME$6 = 'Button';
|
|
2735
|
+
const CLASSNAME$6 = 'redsift-button';
|
|
2736
|
+
const DEFAULT_PROPS$5 = {
|
|
2737
|
+
color: ColorPalette.default,
|
|
2738
|
+
variant: ButtonVariant.primary
|
|
2739
|
+
};
|
|
2740
|
+
|
|
2741
|
+
/**
|
|
2742
|
+
* The Button is a semantic button that looks like a button.
|
|
2743
|
+
*
|
|
2744
|
+
* For a semantic link that looks like a button, please use the ButtonLink component.
|
|
2745
|
+
* For a semantic link that looks like a link, please use the Link component.
|
|
2746
|
+
* For a semantic button that looks like a link, please use the LinkButton component.
|
|
2747
|
+
*/
|
|
2748
|
+
const Button = /*#__PURE__*/forwardRef((props, ref) => {
|
|
2749
|
+
const buttonRef = ref || useRef();
|
|
2750
|
+
const {
|
|
2751
|
+
buttonProps
|
|
2752
|
+
} = $701a24aa0da5b062$export$ea18c227d4417cc3(_objectSpread2(_objectSpread2({}, props), {}, {
|
|
2753
|
+
isDisabled: props.isLoading || props.isDisabled || props.disabled,
|
|
2754
|
+
preventFocusOnPress: true
|
|
2755
|
+
}), buttonRef);
|
|
2756
|
+
const {
|
|
2757
|
+
children,
|
|
2758
|
+
className,
|
|
2759
|
+
color,
|
|
2760
|
+
disabled,
|
|
2761
|
+
fullWidth,
|
|
2762
|
+
isActive,
|
|
2763
|
+
isDisabled,
|
|
2764
|
+
isLoading,
|
|
2765
|
+
leftIcon,
|
|
2766
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2767
|
+
onPress,
|
|
2768
|
+
rightIcon,
|
|
2769
|
+
variant
|
|
2770
|
+
} = props,
|
|
2771
|
+
forwardedProps = _objectWithoutProperties(props, _excluded$6);
|
|
2772
|
+
return /*#__PURE__*/React.createElement(StyledButton, _extends({}, forwardedProps, buttonProps, {
|
|
2773
|
+
$color: color,
|
|
2774
|
+
$fullWidth: fullWidth,
|
|
2775
|
+
$isActive: isActive,
|
|
2776
|
+
$isDisabled: isLoading || isDisabled || disabled,
|
|
2777
|
+
$variant: variant,
|
|
2778
|
+
"aria-disabled": isLoading || isDisabled || disabled,
|
|
2779
|
+
className: classNames(Button.className, className),
|
|
2780
|
+
disabled: isLoading || isDisabled || disabled,
|
|
2781
|
+
ref: buttonRef
|
|
2782
|
+
}), leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
2783
|
+
icon: leftIcon,
|
|
2784
|
+
"aria-hidden": "true",
|
|
2785
|
+
className: "left"
|
|
2786
|
+
}) : null, isLoading ? /*#__PURE__*/React.createElement(Spinner, {
|
|
2787
|
+
size: "small",
|
|
2788
|
+
color: "no-data"
|
|
2789
|
+
}) : null, children, rightIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
2790
|
+
icon: rightIcon,
|
|
2791
|
+
"aria-hidden": "true",
|
|
2792
|
+
className: "right"
|
|
2793
|
+
}) : null);
|
|
2794
|
+
});
|
|
2795
|
+
Button.className = CLASSNAME$6;
|
|
2796
|
+
Button.defaultProps = DEFAULT_PROPS$5;
|
|
2797
|
+
Button.displayName = COMPONENT_NAME$6;
|
|
2605
2798
|
|
|
2606
2799
|
/**
|
|
2607
2800
|
* Component style.
|
|
@@ -2633,7 +2826,7 @@ const StyledResetButton = styled(Button)`
|
|
|
2633
2826
|
margin-top: 8px;
|
|
2634
2827
|
`;
|
|
2635
2828
|
|
|
2636
|
-
const COMPONENT_NAME$5 = '
|
|
2829
|
+
const COMPONENT_NAME$5 = 'ChartEmptyState';
|
|
2637
2830
|
const CLASSNAME$5 = 'redsift-chart-empty-state';
|
|
2638
2831
|
const DEFAULT_PROPS$4 = {
|
|
2639
2832
|
title: 'No Data Available',
|
|
@@ -2836,7 +3029,7 @@ const DashboardReducer = (state, action) => {
|
|
|
2836
3029
|
};
|
|
2837
3030
|
|
|
2838
3031
|
const _excluded$5 = ["children", "className", "data"];
|
|
2839
|
-
const COMPONENT_NAME$4 = '
|
|
3032
|
+
const COMPONENT_NAME$4 = 'Dashboard';
|
|
2840
3033
|
const CLASSNAME$4 = 'redsift-dashboard-container';
|
|
2841
3034
|
const DEFAULT_PROPS$3 = {};
|
|
2842
3035
|
const Dashboard = /*#__PURE__*/forwardRef((props, ref) => {
|
|
@@ -3140,7 +3333,7 @@ const useChartAsListbox = _ref => {
|
|
|
3140
3333
|
};
|
|
3141
3334
|
|
|
3142
3335
|
const _excluded$3 = ["aria-label", "aria-labelledby", "areXLabelsRotated", "caping", "caption", "className", "data", "datagridFilter", "dimension", "group", "isDimensionArray", "isResetable", "localeText", "onFilter", "others", "setLabels", "size", "theme", "title"];
|
|
3143
|
-
const COMPONENT_NAME$3 = '
|
|
3336
|
+
const COMPONENT_NAME$3 = 'HorizontalBarChart';
|
|
3144
3337
|
const CLASSNAME$3 = 'redsift-horizontal-barchart';
|
|
3145
3338
|
const DEFAULT_PROPS$2 = {
|
|
3146
3339
|
isResetable: true,
|
|
@@ -3694,7 +3887,7 @@ const PdfDocument = _ref5 => {
|
|
|
3694
3887
|
};
|
|
3695
3888
|
|
|
3696
3889
|
const _excluded$2 = ["children", "className", "componentRef", "fileName", "introduction", "localeText", "logo", "onClick", "primaryColor"];
|
|
3697
|
-
const COMPONENT_NAME$2 = '
|
|
3890
|
+
const COMPONENT_NAME$2 = 'PdfExportButton';
|
|
3698
3891
|
const CLASSNAME$2 = 'redsift-pdf-export-button';
|
|
3699
3892
|
const getDashboardImage = async componentRef => {
|
|
3700
3893
|
var _componentRef$current, _componentRef$current2, _componentRef$current3, _componentRef$current4;
|
|
@@ -6909,7 +7102,7 @@ const StyledPieChartContainer = styled.div`
|
|
|
6909
7102
|
`;
|
|
6910
7103
|
|
|
6911
7104
|
const _excluded$1 = ["aria-label", "aria-labelledby", "caping", "caption", "className", "data", "datagridFilter", "isResetable", "labelVariant", "dimension", "group", "isDimensionArray", "localeText", "onFilter", "others", "setLabels", "size", "text", "middleText", "subtext", "theme", "title", "variant"];
|
|
6912
|
-
const COMPONENT_NAME$1 = '
|
|
7105
|
+
const COMPONENT_NAME$1 = 'PieChart';
|
|
6913
7106
|
const CLASSNAME$1 = 'redsift-piechart';
|
|
6914
7107
|
const DEFAULT_PROPS$1 = {
|
|
6915
7108
|
isResetable: true,
|
|
@@ -7301,7 +7494,7 @@ const StyledTimeSeriesBarChartContainer = styled.div`
|
|
|
7301
7494
|
`;
|
|
7302
7495
|
|
|
7303
7496
|
const _excluded = ["areXLabelsRotated", "caption", "className", "columnToFilter", "data", "dateTimeFieldName", "dateTimeFormat", "dateTimeGroup", "dimension", "isResetable", "localeText", "onFilter", "size", "theme", "title", "stackedCategory", "xAxisLabel", "yAxisLabel"];
|
|
7304
|
-
const COMPONENT_NAME = '
|
|
7497
|
+
const COMPONENT_NAME = 'TimeSeriesBarChart';
|
|
7305
7498
|
const CLASSNAME = 'redsift-timeseries-barchart';
|
|
7306
7499
|
const DEFAULT_PROPS = {
|
|
7307
7500
|
dateTimeFormat: '%Y-%m-%d %H:%M:%S',
|