@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.
@@ -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?: 'start' | 'end' | 'center' | 'stretch';
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 t = a({
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
- t as col
12
+ r as col
28
13
  };
@@ -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
@@ -84,7 +84,8 @@ const e = {
84
84
  "center",
85
85
  "evenly",
86
86
  "left",
87
- "right"
87
+ "right",
88
+ "stretch"
88
89
  ], a = ["danger", "info", "success", "warning"], r = [
89
90
  "inherit",
90
91
  "left",
@@ -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 A, useMemo as E, useEffect as V } from "react";
2
- const l = (r, u = !1, n, t = 0) => {
3
- const [o, w] = A(n ?? 0), c = E(() => !u && !n && a(o, r, t), [
4
- r,
5
- t,
6
- u,
7
- n,
8
- o
9
- ]);
10
- return V(() => {
11
- const q = performance.now(), f = () => {
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(f);
16
- }, [
17
- r,
18
- c,
19
- t,
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
- l as useEstimatedProgressValue
19
+ v as useEstimatedProgressValue
25
20
  };
@@ -1,24 +1,30 @@
1
- import { useState as m, useRef as T, useEffect as f } from "react";
2
- const a = (e, o = 500, t = 250, c = 250) => {
3
- const [i, r] = m(t === 0), n = T(0);
4
- return f(() => {
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 || (r(!0), n.current = performance.now());
7
- }, t);
12
+ e || (t(!0), r.current = performance.now());
13
+ }, n);
8
14
  return () => clearTimeout(u);
9
- }, [t, e]), f(() => {
15
+ }, [n, e]), i(() => {
10
16
  if (e !== !0)
11
17
  return;
12
18
  const u = setTimeout(() => {
13
- (!n.current || performance.now() - n.current < c) && r(!1);
14
- }, 0), s = setTimeout(() => {
15
- r(!1);
16
- }, o);
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(s);
24
+ clearTimeout(u), clearTimeout(o);
19
25
  };
20
- }, [e, o, c]), e !== !0 || i;
26
+ }, [e, c, f]), e !== !0 || s;
21
27
  };
22
28
  export {
23
- a as useShouldRenderLoading
29
+ l as useShouldRenderLoading
24
30
  };