@cronocode/react-box 3.0.21 → 3.1.2
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/box.d.ts +6 -1
- package/box.mjs +4 -4
- package/components/baseSvg.cjs +1 -1
- package/components/baseSvg.d.ts +1 -1
- package/components/button.cjs +1 -1
- package/components/checkbox.cjs +1 -1
- package/components/dataGrid/components/dataGridBody.d.ts +7 -0
- package/components/dataGrid/components/dataGridBottomBar.d.ts +6 -0
- package/components/dataGrid/components/dataGridCellRowSelection.d.ts +6 -0
- package/components/dataGrid/components/dataGridCellText.d.ts +6 -0
- package/components/dataGrid/components/dataGridColumnGroups.d.ts +1 -1
- package/components/dataGrid/components/dataGridContent.d.ts +6 -0
- package/components/dataGrid/components/dataGridHeader.d.ts +6 -0
- package/components/dataGrid/components/dataGridHeaderCellContextMenu.d.ts +6 -0
- package/components/dataGrid/components/dataGridHeaderCellResizer.d.ts +6 -0
- package/components/dataGrid/components/dataGridPagination.d.ts +1 -1
- package/components/dataGrid/components/dataGridTopBar.d.ts +6 -0
- package/components/dataGrid/components/dataGridTopBarContextMenu.d.ts +6 -0
- package/components/dataGrid/contracts/dataGridContract.d.ts +22 -1
- package/components/dataGrid/models/cellModel.d.ts +1 -1
- package/components/dataGrid/models/columnModel.d.ts +5 -2
- package/components/dataGrid/models/gridModel.d.ts +16 -8
- package/components/dataGrid/models/groupRowModel.d.ts +2 -1
- package/components/dataGrid/models/rowModel.d.ts +7 -6
- package/components/dataGrid.cjs +1 -1
- package/components/dataGrid.d.ts +1 -1
- package/components/dataGrid.mjs +560 -604
- package/components/dropdown.cjs +1 -1
- package/components/dropdown.mjs +112 -136
- package/components/flex.cjs +1 -1
- package/components/form.cjs +1 -1
- package/components/form.mjs +1 -1
- package/components/grid.cjs +1 -1
- package/components/radioButton.cjs +1 -1
- package/components/radioButton.mjs +10 -10
- package/components/semantics.d.ts +25 -25
- package/components/semantics.mjs +1 -1
- package/components/textarea.cjs +1 -1
- package/components/textbox.cjs +1 -1
- package/components/tooltip.cjs +1 -1
- package/components/tooltip.d.ts +6 -3
- package/components/tooltip.mjs +34 -34
- package/core/boxStyles.d.ts +28 -4
- package/core/boxStylesFormatters.d.ts +1 -1
- package/core/coreTypes.d.ts +1 -1
- package/core/extends/boxComponents.d.ts +196 -19
- package/core/extends/useComponents.d.ts +1 -1
- package/core.cjs +3 -3
- package/core.mjs +477 -307
- package/icons/expandIcon.d.ts +2 -0
- package/icons/sortIcon.d.ts +2 -0
- package/package.json +24 -14
- package/ssg.cjs +1 -1
- package/ssg.mjs +17 -16
- package/utils/object/objectUtils.d.ts +2 -2
- package/icons/arrowIcon.d.ts +0 -2
package/components/semantics.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as e } from "react";
|
|
3
3
|
import r from "../box.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { e as a } from "../core.mjs";
|
|
5
5
|
function o(t) {
|
|
6
6
|
const n = e((s, c) => /* @__PURE__ */ i(r, { tag: t, ref: c, component: t, ...s }));
|
|
7
7
|
return n.displayName = a.capitalize(t), n;
|
package/components/textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime"),n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("react/jsx-runtime"),n=require("react"),u=require("../box.cjs"),s=require("../core.cjs"),l=["name","onInput","onChange","placeholder","value","defaultValue","rows","cols","autoFocus","maxLength","minLength","readOnly"];function c(t,a){const r=s.ObjectUtils.buildProps(t,l);return o.jsx(u.default,{ref:a,tag:"textarea",component:"textarea",...r})}const e=n.forwardRef(c);e.displayName="Textarea";exports.default=e;
|
package/components/textbox.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const n=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("react/jsx-runtime"),u=require("react"),a=require("../box.cjs"),s=require("../core.cjs"),l=["name","onInput","onChange","type","placeholder","defaultValue","autoFocus","readOnly","required","value","pattern"];function c(t,o){const r=s.ObjectUtils.buildProps(t,l);return n.jsx(a.default,{ref:o,tag:"input",component:"textbox",...r})}const e=u.forwardRef(c);e.displayName="Textbox";exports.default=e;
|
package/components/tooltip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),s=require("react"),v=require("react-dom"),u=require("../box.cjs"),R=require("../core.cjs"),c=2;function j(f,w){const{onPositionChange:b,...g}=f,i=s.useRef(null),[t,h]=s.useState(),C=R.usePortalContainer(),m=s.useCallback((n,e)=>{const r=d=>{d.target.contains(n)&&e(n)},o=new AbortController;return document.addEventListener("scroll",r,{signal:o.signal,capture:!0}),()=>o.abort()},[t]),x=s.useCallback((n,e)=>{const r=d=>{e(n)},o=new AbortController;return window.addEventListener("resize",r,{signal:o.signal,capture:!0}),()=>o.abort()},[t]),a=s.useCallback(n=>{const e=n.getBoundingClientRect(),r=Math.round((e.top+window.scrollY)*c)/c,o=Math.round((e.left+window.scrollX)*c)/c;(t?.top!==r||t?.left!==o)&&(b?.({top:r,left:o}),h({top:r,left:o,width:e.width>0?e.width:void 0}))},[t]);return s.useLayoutEffect(()=>{if(i.current){a(i.current);const n=m(i.current,a),e=x(i.current,a);return()=>{n(),e()}}},[t]),l.jsxs(l.Fragment,{children:[l.jsx(u.default,{ref:i}),t&&v.createPortal(l.jsx(u.default,{ref:w,position:"absolute",top:0,left:0,transition:"none",style:{transform:`translate(${t.left}px,${t.top}px)`,width:t.width},children:l.jsx(u.default,{...g})}),C)]})}const p=s.forwardRef(j);p.displayName="Tooltip";exports.default=p;
|
package/components/tooltip.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { RefAttributes } from 'react';
|
|
1
2
|
import { BoxProps } from '../box';
|
|
2
|
-
|
|
3
|
+
import { ExtractElementFromTag } from '../core/coreTypes';
|
|
4
|
+
import { ComponentsAndVariants } from '../types';
|
|
5
|
+
interface TooltipProps {
|
|
3
6
|
onPositionChange?(position: {
|
|
4
7
|
top: number;
|
|
5
8
|
left: number;
|
|
6
9
|
}): void;
|
|
7
10
|
}
|
|
8
|
-
declare const
|
|
9
|
-
export default
|
|
11
|
+
declare const _default: <TTag extends keyof React.JSX.IntrinsicElements = "div", TKey extends keyof ComponentsAndVariants = never>(props: BoxProps<TTag, TKey> & RefAttributes<ExtractElementFromTag<TTag>> & TooltipProps) => React.ReactNode;
|
|
12
|
+
export default _default;
|
package/components/tooltip.mjs
CHANGED
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { jsxs as x, Fragment as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
1
|
+
import { jsxs as x, Fragment as v, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as P, useRef as R, useState as y, useCallback as c, useLayoutEffect as z } from "react";
|
|
3
|
+
import { createPortal as A } from "react-dom";
|
|
4
|
+
import p from "../box.mjs";
|
|
5
|
+
import { f as D } from "../core.mjs";
|
|
6
6
|
const i = 2;
|
|
7
|
-
function E(
|
|
8
|
-
const { onPositionChange:
|
|
9
|
-
(
|
|
10
|
-
const n = (
|
|
11
|
-
|
|
12
|
-
},
|
|
13
|
-
return document.addEventListener("scroll", n, { signal:
|
|
7
|
+
function E(d, f) {
|
|
8
|
+
const { onPositionChange: m, ...w } = d, s = R(null), [t, g] = y(), h = D(), b = c(
|
|
9
|
+
(e, o) => {
|
|
10
|
+
const n = (u) => {
|
|
11
|
+
u.target.contains(e) && o(e);
|
|
12
|
+
}, r = new AbortController();
|
|
13
|
+
return document.addEventListener("scroll", n, { signal: r.signal, capture: !0 }), () => r.abort();
|
|
14
14
|
},
|
|
15
15
|
[t]
|
|
16
|
-
),
|
|
17
|
-
(
|
|
18
|
-
const n = (
|
|
19
|
-
o(
|
|
20
|
-
},
|
|
21
|
-
return window.addEventListener("resize", n, { signal:
|
|
16
|
+
), C = c(
|
|
17
|
+
(e, o) => {
|
|
18
|
+
const n = (u) => {
|
|
19
|
+
o(e);
|
|
20
|
+
}, r = new AbortController();
|
|
21
|
+
return window.addEventListener("resize", n, { signal: r.signal, capture: !0 }), () => r.abort();
|
|
22
22
|
},
|
|
23
23
|
[t]
|
|
24
|
-
),
|
|
25
|
-
(
|
|
26
|
-
const o =
|
|
27
|
-
(
|
|
24
|
+
), l = c(
|
|
25
|
+
(e) => {
|
|
26
|
+
const o = e.getBoundingClientRect(), n = Math.round((o.top + window.scrollY) * i) / i, r = Math.round((o.left + window.scrollX) * i) / i;
|
|
27
|
+
(t?.top !== n || t?.left !== r) && (m?.({ top: n, left: r }), g({ top: n, left: r, width: o.width > 0 ? o.width : void 0 }));
|
|
28
28
|
},
|
|
29
29
|
[t]
|
|
30
30
|
);
|
|
31
|
-
return
|
|
31
|
+
return z(() => {
|
|
32
32
|
if (s.current) {
|
|
33
|
-
|
|
34
|
-
const
|
|
33
|
+
l(s.current);
|
|
34
|
+
const e = b(s.current, l), o = C(s.current, l);
|
|
35
35
|
return () => {
|
|
36
|
-
|
|
36
|
+
e(), o();
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
}, [t]), /* @__PURE__ */ x(
|
|
40
|
-
/* @__PURE__ */ a(
|
|
41
|
-
t &&
|
|
39
|
+
}, [t]), /* @__PURE__ */ x(v, { children: [
|
|
40
|
+
/* @__PURE__ */ a(p, { ref: s }),
|
|
41
|
+
t && A(
|
|
42
42
|
/* @__PURE__ */ a(
|
|
43
|
-
|
|
43
|
+
p,
|
|
44
44
|
{
|
|
45
|
-
ref:
|
|
45
|
+
ref: f,
|
|
46
46
|
position: "absolute",
|
|
47
47
|
top: 0,
|
|
48
48
|
left: 0,
|
|
49
49
|
transition: "none",
|
|
50
50
|
style: { transform: `translate(${t.left}px,${t.top}px)`, width: t.width },
|
|
51
|
-
children: /* @__PURE__ */ a(
|
|
51
|
+
children: /* @__PURE__ */ a(p, { ...w })
|
|
52
52
|
}
|
|
53
53
|
),
|
|
54
|
-
|
|
54
|
+
h
|
|
55
55
|
)
|
|
56
56
|
] });
|
|
57
57
|
}
|
|
58
|
-
const H =
|
|
58
|
+
const H = P(E);
|
|
59
59
|
H.displayName = "Tooltip";
|
|
60
60
|
export {
|
|
61
61
|
H as default
|
package/core/boxStyles.d.ts
CHANGED
|
@@ -404,7 +404,7 @@ export declare const cssStyles: {
|
|
|
404
404
|
} | {
|
|
405
405
|
styleName: string;
|
|
406
406
|
values: readonly ["font-size"];
|
|
407
|
-
valueFormat: (
|
|
407
|
+
valueFormat: () => string;
|
|
408
408
|
})[];
|
|
409
409
|
/** The list-style CSS shorthand property allows you to set all the list style properties at once. */
|
|
410
410
|
listStyle: {
|
|
@@ -674,6 +674,11 @@ export declare const cssStyles: {
|
|
|
674
674
|
values: readonly [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1000];
|
|
675
675
|
valueFormat: (value: number) => string;
|
|
676
676
|
}[];
|
|
677
|
+
/** The transition-timing-function CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect. */
|
|
678
|
+
transitionTimingFunction: {
|
|
679
|
+
styleName: string;
|
|
680
|
+
values: readonly ["linear", "ease", "ease-in", "ease-in-out", "ease-out"];
|
|
681
|
+
}[];
|
|
677
682
|
/** The user-select CSS property controls whether the user can select text. This doesn't have any effect on content loaded as part of a browser's user interface (its chrome), except in textboxes. */
|
|
678
683
|
userSelect: {
|
|
679
684
|
styleName: string;
|
|
@@ -754,53 +759,68 @@ export declare const cssStyles: {
|
|
|
754
759
|
styleName: string;
|
|
755
760
|
values: number;
|
|
756
761
|
}[];
|
|
762
|
+
/** The color CSS property sets the foreground color value of an element's text and text decorations, and sets the currentcolor value. */
|
|
757
763
|
color: {
|
|
758
764
|
values: Variables.ColorType[];
|
|
759
765
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
760
766
|
}[];
|
|
767
|
+
/** The background-color CSS property sets the background color of an element. */
|
|
761
768
|
bgColor: {
|
|
762
769
|
values: Variables.ColorType[];
|
|
763
770
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
764
771
|
styleName: string;
|
|
765
772
|
}[];
|
|
773
|
+
/** The border-color shorthand CSS property sets the color of an element's border. */
|
|
766
774
|
borderColor: {
|
|
767
775
|
values: Variables.ColorType[];
|
|
768
776
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
769
777
|
styleName: string;
|
|
770
778
|
}[];
|
|
779
|
+
/** The outline-color CSS property sets the color of an element's outline. */
|
|
771
780
|
outlineColor: {
|
|
772
781
|
values: Variables.ColorType[];
|
|
773
782
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
774
783
|
styleName: string;
|
|
775
784
|
}[];
|
|
785
|
+
/** The fill CSS property defines how SVG text content and the interior canvas of SVG shapes are filled or painted. If present, it overrides the element's fill attribute. */
|
|
776
786
|
fill: {
|
|
777
787
|
values: Variables.ColorType[];
|
|
778
788
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
779
789
|
}[];
|
|
790
|
+
/** The stroke CSS property defines the color or SVG paint server used to draw an element's stroke. */
|
|
780
791
|
stroke: {
|
|
781
792
|
values: Variables.ColorType[];
|
|
782
793
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
783
794
|
}[];
|
|
795
|
+
/** The background-image CSS property sets one or more background images on an element. */
|
|
784
796
|
bgImage: {
|
|
785
797
|
values: readonly ["none", "bg-img-checked", "bg-img-indeterminate", "bg-img-radio"];
|
|
786
798
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
787
799
|
styleName: string;
|
|
788
800
|
}[];
|
|
801
|
+
/** The box-shadow CSS property adds shadow effects around an element's frame */
|
|
789
802
|
shadow: {
|
|
790
|
-
values: readonly ["small
|
|
803
|
+
values: readonly ["small", "medium", "large"];
|
|
791
804
|
valueFormat: (value: string, getVariableValue: (name: string) => string) => string;
|
|
792
805
|
styleName: string;
|
|
793
806
|
}[];
|
|
807
|
+
/** The translateY() CSS function repositions an element vertically on the 2D plane. */
|
|
794
808
|
translateX: {
|
|
795
809
|
values: number;
|
|
796
810
|
valueFormat: (value: number) => string;
|
|
797
811
|
styleName: string;
|
|
798
812
|
}[];
|
|
813
|
+
/** The translateY() CSS function repositions an element vertically on the 2D plane. */
|
|
799
814
|
translateY: {
|
|
800
815
|
values: number;
|
|
801
816
|
valueFormat: (value: number) => string;
|
|
802
817
|
styleName: string;
|
|
803
818
|
}[];
|
|
819
|
+
/** The content CSS property replaces content with a generated value. It can be used to define what is rendered inside an element or pseudo-element. */
|
|
820
|
+
content: {
|
|
821
|
+
values: readonly ["empty"];
|
|
822
|
+
valueFormat: () => string;
|
|
823
|
+
}[];
|
|
804
824
|
};
|
|
805
825
|
export declare const pseudo1: {
|
|
806
826
|
hover: string;
|
|
@@ -815,6 +835,8 @@ export declare const pseudo1: {
|
|
|
815
835
|
hasChecked: string;
|
|
816
836
|
hasRequired: string;
|
|
817
837
|
hasDisabled: string;
|
|
838
|
+
before: string;
|
|
839
|
+
after: string;
|
|
818
840
|
};
|
|
819
841
|
export declare const pseudo2: {
|
|
820
842
|
indeterminate: string;
|
|
@@ -842,10 +864,12 @@ export declare const pseudoClasses: {
|
|
|
842
864
|
hasChecked: string;
|
|
843
865
|
hasRequired: string;
|
|
844
866
|
hasDisabled: string;
|
|
867
|
+
before: string;
|
|
868
|
+
after: string;
|
|
845
869
|
};
|
|
846
|
-
export declare const pseudoClassesWeight: Record<"theme" | "indeterminate" | "checked" | "required" | "disabled" | "selected" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled", number>;
|
|
870
|
+
export declare const pseudoClassesWeight: Record<"theme" | "indeterminate" | "checked" | "required" | "disabled" | "selected" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled" | "before" | "after", number>;
|
|
847
871
|
export declare const pseudoClassesByWeight: {
|
|
848
|
-
[key: number]: ("theme" | "indeterminate" | "checked" | "required" | "disabled" | "selected" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled")[];
|
|
872
|
+
[key: number]: ("theme" | "indeterminate" | "checked" | "required" | "disabled" | "selected" | "hover" | "focus" | "hasFocus" | "active" | "valid" | "hasValid" | "invalid" | "hasInvalid" | "optional" | "hasChecked" | "hasRequired" | "hasDisabled" | "before" | "after")[];
|
|
849
873
|
};
|
|
850
874
|
export declare const pseudoGroupClasses: {
|
|
851
875
|
hoverGroup: "hover";
|
|
@@ -4,7 +4,7 @@ export declare namespace BoxStylesFormatters {
|
|
|
4
4
|
function svg(selector: string): string[];
|
|
5
5
|
}
|
|
6
6
|
namespace Value {
|
|
7
|
-
function rem(value: number, _fn?:
|
|
7
|
+
function rem(value: number, _fn?: () => void, divider?: number): string;
|
|
8
8
|
function px(value: number): string;
|
|
9
9
|
function fraction(value: string): string;
|
|
10
10
|
function widthHeight(key: string, value: string): string;
|
package/core/coreTypes.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type BoxStylesType<T> = T extends ReadonlyArray<
|
|
1
|
+
export type BoxStylesType<T> = T extends ReadonlyArray<unknown> ? T[number] : T;
|
|
2
2
|
export type ExtractElementType<T> = T extends React.DetailedHTMLProps<React.HTMLAttributes<infer E>, infer E> ? E : T extends React.SVGProps<infer E> ? E : never;
|
|
3
3
|
export type ExtractElementFromTag<T extends keyof React.JSX.IntrinsicElements> = ExtractElementType<React.JSX.IntrinsicElements[T]>;
|
|
4
4
|
interface BoxStyleArrayString {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BoxComponentStyles } from '../../types';
|
|
2
2
|
export interface BoxComponent {
|
|
3
3
|
clean?: boolean;
|
|
4
|
-
styles
|
|
4
|
+
styles?: BoxComponentStyles;
|
|
5
5
|
variants?: Record<string, BoxComponentStyles>;
|
|
6
6
|
children?: Record<string, BoxComponent>;
|
|
7
7
|
}
|
|
@@ -65,6 +65,28 @@ declare const boxComponents: {
|
|
|
65
65
|
borderColor: "gray-300";
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
+
variants: {
|
|
69
|
+
hover: {
|
|
70
|
+
position: "relative";
|
|
71
|
+
overflow: "hidden";
|
|
72
|
+
b: number;
|
|
73
|
+
before: {
|
|
74
|
+
position: "absolute";
|
|
75
|
+
top: number;
|
|
76
|
+
left: number;
|
|
77
|
+
width: number;
|
|
78
|
+
height: "fit";
|
|
79
|
+
bgColor: "violet-700";
|
|
80
|
+
content: "empty";
|
|
81
|
+
transitionDuration: 300;
|
|
82
|
+
};
|
|
83
|
+
hover: {
|
|
84
|
+
before: {
|
|
85
|
+
width: "fit";
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
};
|
|
68
90
|
};
|
|
69
91
|
textbox: {
|
|
70
92
|
styles: {
|
|
@@ -154,6 +176,9 @@ declare const boxComponents: {
|
|
|
154
176
|
borderColor: "gray-300";
|
|
155
177
|
};
|
|
156
178
|
};
|
|
179
|
+
variants: {
|
|
180
|
+
datagrid: {};
|
|
181
|
+
};
|
|
157
182
|
};
|
|
158
183
|
radioButton: {
|
|
159
184
|
styles: {
|
|
@@ -240,7 +265,7 @@ declare const boxComponents: {
|
|
|
240
265
|
maxHeight: number;
|
|
241
266
|
borderColor: "violet-300";
|
|
242
267
|
color: "violet-950";
|
|
243
|
-
shadow: "medium
|
|
268
|
+
shadow: "medium";
|
|
244
269
|
};
|
|
245
270
|
};
|
|
246
271
|
item: {
|
|
@@ -333,12 +358,13 @@ declare const boxComponents: {
|
|
|
333
358
|
datagrid: {
|
|
334
359
|
styles: {
|
|
335
360
|
b: number;
|
|
361
|
+
bgColor: "white";
|
|
336
362
|
borderColor: "gray-400";
|
|
337
363
|
overflow: "hidden";
|
|
338
364
|
borderRadius: number;
|
|
339
365
|
};
|
|
340
366
|
children: {
|
|
341
|
-
|
|
367
|
+
topBar: {
|
|
342
368
|
styles: {
|
|
343
369
|
p: number;
|
|
344
370
|
bb: number;
|
|
@@ -346,28 +372,88 @@ declare const boxComponents: {
|
|
|
346
372
|
color: "gray-400";
|
|
347
373
|
gap: number;
|
|
348
374
|
ai: "center";
|
|
349
|
-
height: number;
|
|
350
375
|
};
|
|
351
376
|
children: {
|
|
352
|
-
|
|
377
|
+
contextMenu: {
|
|
378
|
+
clean: true;
|
|
379
|
+
styles: {
|
|
380
|
+
cursor: "pointer";
|
|
381
|
+
p: number;
|
|
382
|
+
hover: {
|
|
383
|
+
bgColor: "gray-200";
|
|
384
|
+
borderRadius: number;
|
|
385
|
+
};
|
|
386
|
+
};
|
|
387
|
+
children: {
|
|
388
|
+
tooltip: {
|
|
389
|
+
styles: {
|
|
390
|
+
bgColor: "white";
|
|
391
|
+
width: number;
|
|
392
|
+
b: number;
|
|
393
|
+
borderColor: "gray-300";
|
|
394
|
+
borderRadius: number;
|
|
395
|
+
display: "flex";
|
|
396
|
+
d: "column";
|
|
397
|
+
mt: number;
|
|
398
|
+
py: number;
|
|
399
|
+
translateX: number;
|
|
400
|
+
shadow: "medium";
|
|
401
|
+
overflow: "auto";
|
|
402
|
+
maxHeight: number;
|
|
403
|
+
};
|
|
404
|
+
children: {
|
|
405
|
+
item: {
|
|
406
|
+
clean: true;
|
|
407
|
+
styles: {
|
|
408
|
+
display: "flex";
|
|
409
|
+
gap: number;
|
|
410
|
+
p: number;
|
|
411
|
+
cursor: "pointer";
|
|
412
|
+
hover: {
|
|
413
|
+
bgColor: "gray-200";
|
|
414
|
+
};
|
|
415
|
+
};
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
columnGroups: {
|
|
353
422
|
styles: {
|
|
354
423
|
gap: number;
|
|
355
424
|
ai: "center";
|
|
356
|
-
b: number;
|
|
357
|
-
borderColor: "gray-400";
|
|
358
|
-
bgColor: "gray-100";
|
|
359
|
-
borderRadius: number;
|
|
360
|
-
py: number;
|
|
361
|
-
pl: number;
|
|
362
|
-
pr: number;
|
|
363
|
-
color: "violet-950";
|
|
364
425
|
};
|
|
365
426
|
children: {
|
|
366
427
|
icon: {
|
|
367
428
|
styles: {
|
|
429
|
+
color: "violet-950";
|
|
368
430
|
width: number;
|
|
369
|
-
|
|
370
|
-
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
separator: {
|
|
434
|
+
styles: {};
|
|
435
|
+
};
|
|
436
|
+
item: {
|
|
437
|
+
styles: {
|
|
438
|
+
gap: number;
|
|
439
|
+
ai: "center";
|
|
440
|
+
b: number;
|
|
441
|
+
borderColor: "gray-400";
|
|
442
|
+
bgColor: "gray-100";
|
|
443
|
+
borderRadius: number;
|
|
444
|
+
py: number;
|
|
445
|
+
pl: number;
|
|
446
|
+
pr: number;
|
|
447
|
+
color: "violet-950";
|
|
448
|
+
};
|
|
449
|
+
children: {
|
|
450
|
+
icon: {
|
|
451
|
+
styles: {
|
|
452
|
+
width: number;
|
|
453
|
+
color: "gray-400";
|
|
454
|
+
cursor: "pointer";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
371
457
|
};
|
|
372
458
|
};
|
|
373
459
|
};
|
|
@@ -381,6 +467,7 @@ declare const boxComponents: {
|
|
|
381
467
|
width: "max-content";
|
|
382
468
|
minWidth: "fit";
|
|
383
469
|
zIndex: 1;
|
|
470
|
+
bgColor: "gray-200";
|
|
384
471
|
};
|
|
385
472
|
variants: {
|
|
386
473
|
isResizeMode: {
|
|
@@ -390,7 +477,6 @@ declare const boxComponents: {
|
|
|
390
477
|
children: {
|
|
391
478
|
cell: {
|
|
392
479
|
styles: {
|
|
393
|
-
bgColor: "gray-200";
|
|
394
480
|
borderColor: "gray-400";
|
|
395
481
|
bb: number;
|
|
396
482
|
minHeight: number;
|
|
@@ -403,6 +489,7 @@ declare const boxComponents: {
|
|
|
403
489
|
isPinned: {
|
|
404
490
|
position: "sticky";
|
|
405
491
|
zIndex: 2;
|
|
492
|
+
bgColor: "gray-200";
|
|
406
493
|
};
|
|
407
494
|
isFirstLeftPinned: {};
|
|
408
495
|
isLastLeftPinned: {
|
|
@@ -416,18 +503,96 @@ declare const boxComponents: {
|
|
|
416
503
|
cursor: "pointer";
|
|
417
504
|
};
|
|
418
505
|
};
|
|
506
|
+
children: {
|
|
507
|
+
contextMenu: {
|
|
508
|
+
clean: true;
|
|
509
|
+
styles: {
|
|
510
|
+
width: number;
|
|
511
|
+
height: number;
|
|
512
|
+
cursor: "pointer";
|
|
513
|
+
userSelect: "none";
|
|
514
|
+
borderRadius: number;
|
|
515
|
+
borderColor: "gray-200";
|
|
516
|
+
display: "flex";
|
|
517
|
+
jc: "center";
|
|
518
|
+
ai: "center";
|
|
519
|
+
transition: "none";
|
|
520
|
+
bgColor: "gray-200";
|
|
521
|
+
hover: {
|
|
522
|
+
bgColor: "gray-300";
|
|
523
|
+
};
|
|
524
|
+
};
|
|
525
|
+
children: {
|
|
526
|
+
icon: {
|
|
527
|
+
styles: {};
|
|
528
|
+
};
|
|
529
|
+
tooltip: {
|
|
530
|
+
styles: {
|
|
531
|
+
bgColor: "white";
|
|
532
|
+
width: number;
|
|
533
|
+
b: number;
|
|
534
|
+
borderColor: "gray-300";
|
|
535
|
+
borderRadius: number;
|
|
536
|
+
display: "flex";
|
|
537
|
+
d: "column";
|
|
538
|
+
mt: number;
|
|
539
|
+
py: number;
|
|
540
|
+
overflow: "hidden";
|
|
541
|
+
translateX: number;
|
|
542
|
+
shadow: "medium";
|
|
543
|
+
};
|
|
544
|
+
variants: {
|
|
545
|
+
openLeft: {
|
|
546
|
+
translateX: number;
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
children: {
|
|
550
|
+
item: {
|
|
551
|
+
clean: true;
|
|
552
|
+
styles: {
|
|
553
|
+
display: "flex";
|
|
554
|
+
gap: number;
|
|
555
|
+
p: number;
|
|
556
|
+
cursor: "pointer";
|
|
557
|
+
hover: {
|
|
558
|
+
bgColor: "gray-200";
|
|
559
|
+
};
|
|
560
|
+
};
|
|
561
|
+
children: {
|
|
562
|
+
icon: {
|
|
563
|
+
styles: {
|
|
564
|
+
width: number;
|
|
565
|
+
color: "violet-950";
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
};
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
};
|
|
572
|
+
};
|
|
573
|
+
};
|
|
574
|
+
resizer: {
|
|
575
|
+
styles: {
|
|
576
|
+
width: number;
|
|
577
|
+
height: "fit";
|
|
578
|
+
bgColor: "gray-400";
|
|
579
|
+
hoverGroup: {
|
|
580
|
+
resizer: {
|
|
581
|
+
bgColor: "gray-600";
|
|
582
|
+
};
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
};
|
|
419
587
|
};
|
|
420
588
|
};
|
|
421
589
|
};
|
|
422
590
|
cell: {
|
|
423
591
|
styles: {
|
|
424
|
-
bgColor: "gray-100";
|
|
425
592
|
bb: number;
|
|
426
593
|
borderColor: "gray-400";
|
|
427
594
|
transition: "none";
|
|
428
595
|
ai: "center";
|
|
429
|
-
overflow: "hidden";
|
|
430
|
-
minHeight: number;
|
|
431
596
|
hoverGroup: {
|
|
432
597
|
'grid-row': {
|
|
433
598
|
bgColor: "gray-200";
|
|
@@ -437,10 +602,13 @@ declare const boxComponents: {
|
|
|
437
602
|
variants: {
|
|
438
603
|
isRowNumber: {
|
|
439
604
|
bgColor: "gray-200";
|
|
605
|
+
jc: "right";
|
|
440
606
|
};
|
|
441
607
|
isRowSelection: {};
|
|
442
608
|
isPinned: {
|
|
443
609
|
position: "sticky";
|
|
610
|
+
bgColor: "gray-100";
|
|
611
|
+
zIndex: 1;
|
|
444
612
|
};
|
|
445
613
|
isFirstLeftPinned: {};
|
|
446
614
|
isLastLeftPinned: {
|
|
@@ -452,6 +620,15 @@ declare const boxComponents: {
|
|
|
452
620
|
isLastRightPinned: {};
|
|
453
621
|
};
|
|
454
622
|
};
|
|
623
|
+
bottomBar: {
|
|
624
|
+
styles: {
|
|
625
|
+
p: number;
|
|
626
|
+
bgColor: "gray-200";
|
|
627
|
+
bt: number;
|
|
628
|
+
borderColor: "gray-400";
|
|
629
|
+
gap: number;
|
|
630
|
+
};
|
|
631
|
+
};
|
|
455
632
|
};
|
|
456
633
|
};
|
|
457
634
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BoxComponentStyles, BoxStyleProps, ComponentsAndVariants } from '../../types';
|
|
2
2
|
export default function useComponents<TKey extends keyof ComponentsAndVariants = never>(props: BoxStyleProps<TKey>): BoxComponentStyles | undefined;
|