@iress-oss/ids-components 6.0.0-alpha.10 → 6.0.0-alpha.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Col/Col.d.ts +2 -1
- package/dist/components/Col/Col.styles.d.ts +1 -16
- package/dist/components/Col/Col.styles.js +3 -18
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +2 -1
- package/dist/interfaces.d.ts +8 -8
- package/dist/patterns/Loading/hooks/useEstimatedProgressValue.js +17 -22
- package/dist/patterns/Loading/hooks/useShouldRenderLoading.js +20 -14
- package/dist/patterns/Shadow/Shadow.js +302 -1079
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { IressStyledProps, ResponsiveProp } from '../../types';
|
|
3
|
+
import { IressCSSProps } from '../../interfaces';
|
|
3
4
|
import { UtilityValues } from '../../styled-system/types/prop-type';
|
|
4
5
|
export interface IressColProps extends IressStyledProps {
|
|
5
6
|
/**
|
|
6
7
|
* Individual alignment of column
|
|
7
8
|
*/
|
|
8
|
-
alignSelf?: '
|
|
9
|
+
alignSelf?: IressCSSProps['alignSelf'];
|
|
9
10
|
/**
|
|
10
11
|
* Any content you would like to be contained in a column.
|
|
11
12
|
*/
|
|
@@ -1,16 +1 @@
|
|
|
1
|
-
export declare const col: import('../../styled-system/types').RecipeRuntimeFn<{
|
|
2
|
-
alignSelf: {
|
|
3
|
-
start: {
|
|
4
|
-
alignSelf: "start";
|
|
5
|
-
};
|
|
6
|
-
end: {
|
|
7
|
-
alignSelf: "end";
|
|
8
|
-
};
|
|
9
|
-
center: {
|
|
10
|
-
alignSelf: "center";
|
|
11
|
-
};
|
|
12
|
-
stretch: {
|
|
13
|
-
alignSelf: "stretch";
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
}>;
|
|
1
|
+
export declare const col: import('../../styled-system/types').RecipeRuntimeFn<{}>;
|
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
import { c as a } from "../../cva-DtPMccE9.js";
|
|
2
|
-
const
|
|
2
|
+
const r = a({
|
|
3
3
|
base: {
|
|
4
4
|
display: "block",
|
|
5
5
|
boxSizing: "border-box",
|
|
6
6
|
span: "auto"
|
|
7
7
|
},
|
|
8
|
-
variants: {
|
|
9
|
-
alignSelf: {
|
|
10
|
-
start: {
|
|
11
|
-
alignSelf: "start"
|
|
12
|
-
},
|
|
13
|
-
end: {
|
|
14
|
-
alignSelf: "end"
|
|
15
|
-
},
|
|
16
|
-
center: {
|
|
17
|
-
alignSelf: "center"
|
|
18
|
-
},
|
|
19
|
-
stretch: {
|
|
20
|
-
alignSelf: "stretch"
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
},
|
|
8
|
+
variants: {},
|
|
24
9
|
defaultVariants: {}
|
|
25
10
|
});
|
|
26
11
|
export {
|
|
27
|
-
|
|
12
|
+
r as col
|
|
28
13
|
};
|
package/dist/constants.d.ts
CHANGED
|
@@ -87,7 +87,7 @@ export declare const GRID_SIZE = 12;
|
|
|
87
87
|
/**
|
|
88
88
|
* The horizontal alignment options.
|
|
89
89
|
*/
|
|
90
|
-
export declare const HORIZONTAL_ALIGNS: readonly ["around", "between", "center", "evenly", "left", "right"];
|
|
90
|
+
export declare const HORIZONTAL_ALIGNS: readonly ["around", "between", "center", "evenly", "left", "right", "stretch"];
|
|
91
91
|
/**
|
|
92
92
|
* The statuses available for various components.
|
|
93
93
|
*/
|
package/dist/constants.js
CHANGED
package/dist/interfaces.d.ts
CHANGED
|
@@ -166,6 +166,14 @@ export interface BreakpointDetail {
|
|
|
166
166
|
* **Note:** These are the only props we support for styling components. Anything else is at your own risk.
|
|
167
167
|
*/
|
|
168
168
|
export interface IressCSSProps {
|
|
169
|
+
/**
|
|
170
|
+
* The **`align-self`** CSS property overrides a flex item's alignment set by its flex container's `align-items` property.
|
|
171
|
+
*
|
|
172
|
+
* This is useful when you want a single flex item to have a different alignment than the others in the flex container.
|
|
173
|
+
*
|
|
174
|
+
* @see https://developer.mozilla.org/docs/Web/CSS/align-self
|
|
175
|
+
*/
|
|
176
|
+
alignSelf?: ResponsiveProp<'start' | 'end' | 'center' | 'stretch'>;
|
|
169
177
|
/**
|
|
170
178
|
* **`bg`** sets the background color of an element using the `background-color` css property using the color tokens in the design system.
|
|
171
179
|
*
|
|
@@ -368,14 +376,6 @@ export interface IressCSSProps {
|
|
|
368
376
|
* @see https://developer.mozilla.org/docs/Web/CSS/padding-top
|
|
369
377
|
*/
|
|
370
378
|
pt?: ResponsiveProp<PositiveSpacingToken>;
|
|
371
|
-
/**
|
|
372
|
-
* The **`row-gap`** CSS property sets the size of the gap (gutter) between an element's rows.
|
|
373
|
-
*
|
|
374
|
-
* Note: It only has an effect when used as a direct child of a layout component, such as IressRow, IressStack or IressInline.
|
|
375
|
-
*
|
|
376
|
-
* @see https://developer.mozilla.org/docs/Web/CSS/row-gap
|
|
377
|
-
*/
|
|
378
|
-
rowGap?: ResponsiveProp<PositiveSpacingToken>;
|
|
379
379
|
/**
|
|
380
380
|
* The **`scrollable`** property enables scrolling behavior for an element when its content overflows its bounds. It sets the `overflow` CSS property to `auto`, allowing scrollbars to appear as needed. The scrollbar has been styled to match the design system.
|
|
381
381
|
* You can set the value to `true` to enable scrolling on both axes, or specify `'x'` or `'y'` to restrict scrolling to a single axis.
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { useState as
|
|
2
|
-
const
|
|
3
|
-
const [o,
|
|
4
|
-
|
|
5
|
-
t
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const x = Math.max(performance.now() - q, 0), P = o + x;
|
|
13
|
-
w(P), a(P, r, t) && requestAnimationFrame(f);
|
|
1
|
+
import { useState as l, useEffect as A } from "react";
|
|
2
|
+
const v = (r, t = !1, n, e = 0) => {
|
|
3
|
+
const [o, c] = l(n ?? 0);
|
|
4
|
+
return A(() => {
|
|
5
|
+
if (t || n !== void 0)
|
|
6
|
+
return;
|
|
7
|
+
const m = performance.now();
|
|
8
|
+
let a;
|
|
9
|
+
const u = () => {
|
|
10
|
+
const f = Math.max(performance.now() - m, 0);
|
|
11
|
+
c(f), P(f, r, e) && (a = requestAnimationFrame(u));
|
|
14
12
|
};
|
|
15
|
-
requestAnimationFrame(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
o
|
|
21
|
-
]), n !== void 0 ? u ? r : n : !c && o < r ? r : o;
|
|
22
|
-
}, a = (r, u, n) => r < u || r < n;
|
|
13
|
+
return a = requestAnimationFrame(u), () => {
|
|
14
|
+
a && cancelAnimationFrame(a);
|
|
15
|
+
};
|
|
16
|
+
}, [r, t, e, n]), n !== void 0 ? t ? r : n : t || o >= r ? r : o;
|
|
17
|
+
}, P = (r, t, n) => r < t || r < n;
|
|
23
18
|
export {
|
|
24
|
-
|
|
19
|
+
v as useEstimatedProgressValue
|
|
25
20
|
};
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
import { useState as m, useRef as T, useEffect as
|
|
2
|
-
const
|
|
3
|
-
const [
|
|
4
|
-
return
|
|
1
|
+
import { useState as m, useRef as T, useEffect as i } from "react";
|
|
2
|
+
const l = (e, c = 500, n = 250, f = 250) => {
|
|
3
|
+
const [s, t] = m(!1), r = T(0);
|
|
4
|
+
return i(() => {
|
|
5
|
+
if (n === 0) {
|
|
6
|
+
const o = setTimeout(() => {
|
|
7
|
+
e || (t(!0), r.current = performance.now());
|
|
8
|
+
}, 0);
|
|
9
|
+
return () => clearTimeout(o);
|
|
10
|
+
}
|
|
5
11
|
const u = setTimeout(() => {
|
|
6
|
-
e || (
|
|
7
|
-
},
|
|
12
|
+
e || (t(!0), r.current = performance.now());
|
|
13
|
+
}, n);
|
|
8
14
|
return () => clearTimeout(u);
|
|
9
|
-
}, [
|
|
15
|
+
}, [n, e]), i(() => {
|
|
10
16
|
if (e !== !0)
|
|
11
17
|
return;
|
|
12
18
|
const u = setTimeout(() => {
|
|
13
|
-
(!
|
|
14
|
-
}, 0),
|
|
15
|
-
|
|
16
|
-
},
|
|
19
|
+
(!r.current || performance.now() - r.current < f) && t(!1);
|
|
20
|
+
}, 0), o = setTimeout(() => {
|
|
21
|
+
t(!1);
|
|
22
|
+
}, c);
|
|
17
23
|
return () => {
|
|
18
|
-
clearTimeout(u), clearTimeout(
|
|
24
|
+
clearTimeout(u), clearTimeout(o);
|
|
19
25
|
};
|
|
20
|
-
}, [e,
|
|
26
|
+
}, [e, c, f]), e !== !0 || s;
|
|
21
27
|
};
|
|
22
28
|
export {
|
|
23
|
-
|
|
29
|
+
l as useShouldRenderLoading
|
|
24
30
|
};
|