intable 0.0.9 → 0.0.10
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/LICENSE +21 -21
- package/README.md +378 -378
- package/dist/__uno.css +1 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.js +98 -81
- package/dist/index.js +17 -17
- package/dist/plugins/CellSelectionPlugin.js +15 -12
- package/dist/plugins/DiffPlugin.js +1 -0
- package/dist/plugins/DragPlugin.js +1 -0
- package/dist/plugins/RowGroupPlugin.js +1 -0
- package/dist/style.css +2 -2
- package/dist/theme/antd.scss +42 -42
- package/dist/theme/dark.scss +46 -46
- package/dist/theme/element-plus.scss +38 -38
- package/dist/theme/github.scss +80 -80
- package/dist/theme/material.scss +73 -73
- package/dist/theme/shadcn.scss +66 -66
- package/dist/theme/stripe.scss +57 -57
- package/package.json +1 -1
package/dist/__uno.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--un-bg-opacity:100%;--un-content:"";--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-text-opacity:100%;--un-border-opacity:100%;--un-space-y-reverse:initial;--un-space-x-reverse:initial;--un-outline-style:solid;--un-outline-opacity:100%;--un-leading:initial}}@property --un-leading{syntax:"*";inherits:false}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}:root,:host{--spacing:.25rem;--colors-gray-DEFAULT:#99a1af;--text-sm-fontSize:.875rem;--text-sm-lineHeight:1.25rem;--default-transition-timingFunction:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--
|
|
1
|
+
@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--un-bg-opacity:100%;--un-content:"";--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-text-opacity:100%;--un-border-opacity:100%;--un-space-y-reverse:initial;--un-space-x-reverse:initial;--un-outline-style:solid;--un-outline-opacity:100%;--un-leading:initial}}@property --un-leading{syntax:"*";inherits:false}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}:root,:host{--spacing:.25rem;--colors-gray-DEFAULT:#99a1af;--text-sm-fontSize:.875rem;--text-sm-lineHeight:1.25rem;--radius-sm:.25rem;--default-transition-timingFunction:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--colors-blue-DEFAULT:#54a2ff;--font-sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-monoFont-family:var(--font-mono)}@supports (color:lab(0% 0 0)){:root,:host{--colors-gray-DEFAULT:lab(65.9269% -.832677 -8.17474);--colors-blue-DEFAULT:lab(65.0361% -1.42065 -56.9802)}}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-featureSettings,normal);font-variation-settings:var(--default-font-variationSettings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-monoFont-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-monoFont-featureSettings,normal);font-variation-settings:var(--default-monoFont-variationSettings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}.container{width:100%}.aic{align-items:center}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.text-3\.5{font-size:.875rem}.lh-\[1\]{--un-leading:1;line-height:1}.m9{margin:36px}.mx-1{margin-inline:4px}.mx-3\!{margin-inline:12px!important}.my-1{margin-block:4px}.ml{margin-left:16px}.ml-\.5{margin-left:2px}.ml-1{margin-left:4px}.mr--1{margin-right:-4px}.mr-1{margin-right:4px}.mr-2{margin-right:8px}.mr-2\.5{margin-right:10px}.p-1{padding:4px}.px,.px-4{padding-inline:16px}.px-2{padding-inline:8px}.py-1{padding-block:4px}.py-2{padding-block:8px}.pl-1{padding-left:4px}.pr-4{padding-right:16px}.ps{padding-inline-start:16px}.outline-0{outline-style:var(--un-outline-style);outline-width:0}.outline-2{outline-style:var(--un-outline-style);outline-width:2px}.outline-blue{outline-color:color-mix(in srgb,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.b{border-width:1px}.rd-2{border-radius:.5rem}.rd-sm{border-radius:var(--radius-sm)}.bg-\#dafaea\!{background-color:color-mix(in oklab,#dafaea var(--un-bg-opacity),transparent)!important}.bg-\#ffe8e8\!{background-color:color-mix(in oklab,#ffe8e8 var(--un-bg-opacity),transparent)!important}.bg-\#fff{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent)}.bg-gray\/20{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)20%,transparent)}.op-75{opacity:.75}.op40{opacity:.4}.flex{display:flex}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-2{gap:8px}.grid{display:grid}.size-4\!{width:16px!important;height:16px!important}.size-full{width:100%;height:100%}.h-1\!{height:4px!important}.h-a\!{height:auto!important}.h-full{height:100%}.max-h-100{max-height:400px}.min-h-40{min-height:160px}.min-h-a\!{min-height:auto!important}.w-10px\!{width:10px!important}.after\:h-1:after{height:4px}.after\:w-1:after{width:4px}.inline{display:inline}.block{display:block}.hidden{display:none}.visible{visibility:visible}.collapse{visibility:collapse}.cursor-s-resize{cursor:s-resize}.cursor-w-resize{cursor:w-resize}.resize{resize:both}.resize-none{resize:none}.select-none{-webkit-user-select:none;user-select:none}.translate-x-1\/2{--un-translate-x:50%;translate:var(--un-translate-x)var(--un-translate-y)}.transform{transform:var(--un-rotate-x)var(--un-rotate-y)var(--un-rotate-z)var(--un-skew-x)var(--un-skew-y)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,--un-gradient-from,--un-gradient-via,--un-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--un-ease,var(--default-transition-timingFunction));transition-duration:var(--un-duration,var(--default-transition-duration))}.items-center{align-items:center}.box-border{box-sizing:border-box}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-end\!{justify-content:flex-end!important}.justify-center{justify-content:center}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.z-1{z-index:1}.z-9{z-index:9}.overflow-auto{overflow:auto}.table{display:table}.table-cell{display:table-cell}@supports (color:color-mix(in lab, red, red)){.outline-blue{outline-color:color-mix(in oklab,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.bg-gray\/20{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)20%,transparent)}}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -36,5 +36,6 @@ export declare function useHistory([val, setVal]: [any, any]): {
|
|
|
36
36
|
readonly index: number;
|
|
37
37
|
readonly history: any[];
|
|
38
38
|
};
|
|
39
|
-
export declare function
|
|
39
|
+
export declare function createShallowState(state: any): any;
|
|
40
|
+
export declare function useMemoState(fn: any): any;
|
|
40
41
|
export {};
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unFn } from "../utils.js";
|
|
2
|
-
import { $PROXY, batch, createComputed, createEffect, createMemo, createRenderEffect, createRoot, createSignal, mergeProps, on, onCleanup, untrack } from "solid-js";
|
|
2
|
+
import { $PROXY, batch, createComputed, createEffect, createMemo, createRenderEffect, createRoot, createSignal, getOwner, mergeProps, on, onCleanup, runWithOwner, untrack } from "solid-js";
|
|
3
3
|
import { $RAW, createMutable } from "solid-js/store";
|
|
4
4
|
import { isFunction, isPromise, mapValues } from "es-toolkit";
|
|
5
5
|
import { createEventListener, createEventListenerMap } from "@solid-primitives/event-listener";
|
|
@@ -9,149 +9,166 @@ import { makePersisted, storageSync } from "@solid-primitives/storage";
|
|
|
9
9
|
import { createMutationObserver } from "@solid-primitives/mutation-observer";
|
|
10
10
|
import { castArray } from "es-toolkit/compat";
|
|
11
11
|
import { createKeybindingsHandler } from "tinykeys";
|
|
12
|
-
function usePointerDrag(h,
|
|
13
|
-
|
|
12
|
+
function usePointerDrag(h, B) {
|
|
13
|
+
B = mergeProps({ preventDefault: !0 }, B), createPointerListeners({
|
|
14
14
|
target: h,
|
|
15
15
|
passive: !1,
|
|
16
16
|
onDown(h) {
|
|
17
|
-
|
|
18
|
-
let [
|
|
19
|
-
|
|
17
|
+
B.preventDefault && h.preventDefault();
|
|
18
|
+
let [V, H] = [h.x, h.y], U, W;
|
|
19
|
+
B.start?.(h, (h) => U = h, (h) => W = h), createRoot((B) => {
|
|
20
20
|
createPointerListeners({
|
|
21
21
|
target: document,
|
|
22
22
|
onMove(h) {
|
|
23
|
-
let [
|
|
24
|
-
|
|
25
|
-
sx:
|
|
26
|
-
sy:
|
|
27
|
-
ox:
|
|
28
|
-
oy:
|
|
23
|
+
let [B, W] = [h.x - V, h.y - H];
|
|
24
|
+
U?.(h, {
|
|
25
|
+
sx: V,
|
|
26
|
+
sy: H,
|
|
27
|
+
ox: B,
|
|
28
|
+
oy: W
|
|
29
29
|
});
|
|
30
30
|
},
|
|
31
31
|
onUp() {
|
|
32
|
-
|
|
32
|
+
W?.(h), B(), U = void 0, W = void 0;
|
|
33
33
|
}
|
|
34
|
-
}), createEventListenerMap(document, { drop:
|
|
34
|
+
}), createEventListenerMap(document, { drop: B });
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
|
-
function model(h,
|
|
40
|
-
let [
|
|
41
|
-
createRenderEffect(() => h.value =
|
|
39
|
+
function model(h, B) {
|
|
40
|
+
let [V, H] = B();
|
|
41
|
+
createRenderEffect(() => h.value = V()), h.addEventListener("input", (h) => H(h.target.value));
|
|
42
42
|
}
|
|
43
|
-
function toSignle(h,
|
|
44
|
-
return [() => h[
|
|
43
|
+
function toSignle(h, B) {
|
|
44
|
+
return [() => h[B], (V) => h[B] = V];
|
|
45
45
|
}
|
|
46
46
|
function useDark() {
|
|
47
|
-
let h = (h) => h == "dark" ||
|
|
47
|
+
let h = (h) => h == "dark" || V() && !h, B = (h) => h ? "dark" : "light", V = () => window.matchMedia("(prefers-color-scheme: dark)").matches, H = makePersisted(createSignal(V()), {
|
|
48
48
|
name: "color-schema",
|
|
49
49
|
storage: localStorage,
|
|
50
50
|
sync: storageSync,
|
|
51
|
-
serialize:
|
|
51
|
+
serialize: B,
|
|
52
52
|
deserialize: h
|
|
53
53
|
});
|
|
54
|
-
return createEffect(() => document.documentElement.classList[
|
|
54
|
+
return createEffect(() => document.documentElement.classList[H[0]() ? "add" : "remove"]("dark")), createEffect(() => window.dispatchEvent(new StorageEvent("storage", {
|
|
55
55
|
key: "color-schema",
|
|
56
|
-
newValue:
|
|
57
|
-
}))),
|
|
56
|
+
newValue: B(H[0]())
|
|
57
|
+
}))), H;
|
|
58
58
|
}
|
|
59
|
-
function useMemoAsync(h,
|
|
60
|
-
let
|
|
59
|
+
function useMemoAsync(h, B) {
|
|
60
|
+
let V = Symbol(), [U, W] = createSignal(B);
|
|
61
61
|
return createComputed(async () => {
|
|
62
|
-
let
|
|
63
|
-
|
|
64
|
-
}) :
|
|
65
|
-
|
|
66
|
-
}),
|
|
62
|
+
let B = h(untrack(U)), H = B instanceof Promise ? await new Promise((h) => {
|
|
63
|
+
B.then(h), onCleanup(() => h(V));
|
|
64
|
+
}) : B;
|
|
65
|
+
H == V || W(() => H);
|
|
66
|
+
}), U;
|
|
67
67
|
}
|
|
68
|
-
function useSignle2(h,
|
|
69
|
-
let
|
|
70
|
-
let
|
|
71
|
-
return isPromise(
|
|
72
|
-
},
|
|
68
|
+
function useSignle2(h, B) {
|
|
69
|
+
let V = createSignal(isFunction(h) ? void 0 : h), U = (h) => {
|
|
70
|
+
let V = B?.before?.(h);
|
|
71
|
+
return isPromise(V) ? V.then((B) => B === void 0 ? h : B) : V ?? h;
|
|
72
|
+
}, W = useMemoAsync(() => U(V[0]()));
|
|
73
73
|
if (isFunction(h)) {
|
|
74
|
-
let
|
|
75
|
-
createComputed(() =>
|
|
74
|
+
let B = useMemoAsync(() => U(h()));
|
|
75
|
+
createComputed(() => V[1](B()));
|
|
76
76
|
}
|
|
77
|
-
return [
|
|
77
|
+
return [W, V[1]];
|
|
78
78
|
}
|
|
79
79
|
var $MEMO = Symbol();
|
|
80
|
-
function toReactive(
|
|
81
|
-
let
|
|
80
|
+
function toReactive(V) {
|
|
81
|
+
let H = () => unFn(V), U = () => !0, W = (h) => ((h) => typeof h == "function" && $MEMO in h ? h() : h)(H()[h]);
|
|
82
82
|
return new Proxy(Object.create(null), {
|
|
83
|
-
get: (h,
|
|
84
|
-
set:
|
|
85
|
-
defineProperty: (h,
|
|
86
|
-
deleteProperty:
|
|
87
|
-
getPrototypeOf: () => Object.getPrototypeOf(
|
|
88
|
-
has: (h,
|
|
89
|
-
ownKeys: (h) => Object.keys(
|
|
90
|
-
getOwnPropertyDescriptor: (h,
|
|
83
|
+
get: (h, V, U) => V == $PROXY || V == $RAW ? U : ((h) => typeof h == "function" && $MEMO in h ? h() : h)(H()[V]),
|
|
84
|
+
set: U,
|
|
85
|
+
defineProperty: (h, B, V) => Object.defineProperty(H(), B, V),
|
|
86
|
+
deleteProperty: U,
|
|
87
|
+
getPrototypeOf: () => Object.getPrototypeOf(H()),
|
|
88
|
+
has: (h, V) => V == $PROXY || V in H(),
|
|
89
|
+
ownKeys: (h) => Object.keys(H()),
|
|
90
|
+
getOwnPropertyDescriptor: (h, B) => ({
|
|
91
91
|
enumerable: !0,
|
|
92
92
|
configurable: !0,
|
|
93
93
|
get() {
|
|
94
|
-
return
|
|
94
|
+
return W(B);
|
|
95
95
|
},
|
|
96
|
-
set:
|
|
96
|
+
set: U
|
|
97
97
|
})
|
|
98
98
|
});
|
|
99
99
|
}
|
|
100
100
|
function useMemo(h) {
|
|
101
|
-
let
|
|
102
|
-
return
|
|
101
|
+
let B = createMemo(h);
|
|
102
|
+
return B[$MEMO] = 1, B;
|
|
103
103
|
}
|
|
104
104
|
function useHover(h) {
|
|
105
|
-
let [
|
|
106
|
-
return createEventListener(h, "pointerenter", () =>
|
|
105
|
+
let [B, V] = createSignal(!1);
|
|
106
|
+
return createEventListener(h, "pointerenter", () => V(!0)), createEventListener(h, "pointerleave", () => V(!1)), B;
|
|
107
107
|
}
|
|
108
108
|
function useMouseDown(h) {
|
|
109
|
-
let [
|
|
110
|
-
return createEventListener(h, "pointerdown", () =>
|
|
109
|
+
let [B, V] = createSignal(!1);
|
|
110
|
+
return createEventListener(h, "pointerdown", () => V(!0)), createEventListener(document.body, "pointerup", () => V(!1)), B;
|
|
111
111
|
}
|
|
112
112
|
function useClicked(h) {
|
|
113
|
-
let [
|
|
114
|
-
return createEventListener(() =>
|
|
113
|
+
let [B, V] = createSignal(!1), H = () => castArray(access(h));
|
|
114
|
+
return createEventListener(() => H().map((h) => h?.getRootNode()), "click", (h) => V(H().some((B) => B?.contains(h.target)))), B;
|
|
115
115
|
}
|
|
116
|
-
function useMutation(h,
|
|
117
|
-
let
|
|
118
|
-
return createMutationObserver(h,
|
|
116
|
+
function useMutation(h, B, V) {
|
|
117
|
+
let H = createSignal(V());
|
|
118
|
+
return createMutationObserver(h, B, (h) => H[1](V())), H[0];
|
|
119
119
|
}
|
|
120
|
-
function useTinykeys(h,
|
|
121
|
-
createEventListener(h, "keydown", createKeybindingsHandler({ ...mapValues(
|
|
122
|
-
|
|
120
|
+
function useTinykeys(h, B) {
|
|
121
|
+
createEventListener(h, "keydown", createKeybindingsHandler({ ...mapValues(B, (h) => (B) => {
|
|
122
|
+
B.preventDefault(), h(B);
|
|
123
123
|
}) }));
|
|
124
124
|
}
|
|
125
|
-
function useHistory([h,
|
|
126
|
-
let
|
|
125
|
+
function useHistory([h, B]) {
|
|
126
|
+
let V = 1, H = createMutable({
|
|
127
127
|
index: -1,
|
|
128
128
|
history: []
|
|
129
|
-
}),
|
|
129
|
+
}), U = () => (H.index = 0, H.history = [h()]), W = () => H.index > 0, G = () => H.index < H.history.length - 1;
|
|
130
130
|
return createRenderEffect(on(h, (h) => {
|
|
131
131
|
if (h != null) {
|
|
132
|
-
if (!
|
|
133
|
-
|
|
132
|
+
if (!V) return V = 1;
|
|
133
|
+
G() && (H.history = H.history.slice(0, H.index + 1)), H.history[++H.index] = h;
|
|
134
134
|
}
|
|
135
135
|
})), {
|
|
136
|
-
undo: () =>
|
|
137
|
-
redo: () =>
|
|
138
|
-
clear:
|
|
136
|
+
undo: () => W() && ((V = 0) || B(H.history[--H.index])),
|
|
137
|
+
redo: () => G() && ((V = 0) || B(H.history[++H.index])),
|
|
138
|
+
clear: U,
|
|
139
139
|
get index() {
|
|
140
|
-
return
|
|
140
|
+
return H.index;
|
|
141
141
|
},
|
|
142
142
|
get history() {
|
|
143
|
-
return
|
|
143
|
+
return H.history;
|
|
144
144
|
}
|
|
145
145
|
};
|
|
146
146
|
}
|
|
147
|
+
function createShallowState(h) {
|
|
148
|
+
let V = getOwner(), H = {}, U = (h, B) => H[h] ??= runWithOwner(V, () => createSignal(B));
|
|
149
|
+
for (let B in h) U(B, h[B]);
|
|
150
|
+
return new Proxy(h, {
|
|
151
|
+
get(h, V, H) {
|
|
152
|
+
return V == $PROXY ? H : U(V)[0]();
|
|
153
|
+
},
|
|
154
|
+
set(h, B, V) {
|
|
155
|
+
return h[B] = V, U(B, V)[1](() => V), !0;
|
|
156
|
+
},
|
|
157
|
+
deleteProperty(h, B) {
|
|
158
|
+
return U(B)[1](void 0), delete h[B], delete H[B], !0;
|
|
159
|
+
},
|
|
160
|
+
has: (h, V) => V == $PROXY || V in H,
|
|
161
|
+
ownKeys: (h) => Reflect.ownKeys(H)
|
|
162
|
+
});
|
|
163
|
+
}
|
|
147
164
|
function useMemoState(h) {
|
|
148
|
-
let
|
|
165
|
+
let B = createShallowState({});
|
|
149
166
|
return createComputed(() => {
|
|
150
|
-
let
|
|
167
|
+
let H = { ...h() };
|
|
151
168
|
untrack(() => batch(() => {
|
|
152
|
-
for (let h in
|
|
153
|
-
Object.assign(
|
|
169
|
+
for (let h in B) h in H || delete B[h];
|
|
170
|
+
Object.assign(B, H);
|
|
154
171
|
}));
|
|
155
|
-
}),
|
|
172
|
+
}), B;
|
|
156
173
|
}
|
|
157
|
-
export { model, toReactive, toSignle, useClicked, useDark, useHistory, useHover, useMemo, useMemoAsync, useMemoState, useMouseDown, useMutation, usePointerDrag, useSignle2, useTinykeys };
|
|
174
|
+
export { createShallowState, model, toReactive, toSignle, useClicked, useDark, useHistory, useHover, useMemo, useMemoAsync, useMemoState, useMouseDown, useMutation, usePointerDrag, useSignle2, useTinykeys };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unFn } from "./utils.js";
|
|
2
|
-
import { toReactive, useMemo } from "./hooks/index.js";
|
|
2
|
+
import { toReactive, useMemo, useMemoState } from "./hooks/index.js";
|
|
3
3
|
import './style.css';;/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
import { CellSelectionPlugin } from "./plugins/CellSelectionPlugin.js";
|
|
@@ -29,38 +29,38 @@ var _tmpl$ = /* @__PURE__ */ template("<table>"), _tmpl$2 = /* @__PURE__ */ temp
|
|
|
29
29
|
const Ctx = createContext({
|
|
30
30
|
props: {},
|
|
31
31
|
store: {}
|
|
32
|
-
}), Intable = (
|
|
33
|
-
|
|
34
|
-
let
|
|
32
|
+
}), Intable = (q) => {
|
|
33
|
+
q = mergeProps$1({ rowKey: "id" }, q);
|
|
34
|
+
let J = getOwner(), Y = createMutable({
|
|
35
35
|
get rawProps() {
|
|
36
|
-
return
|
|
36
|
+
return q;
|
|
37
37
|
},
|
|
38
38
|
get plugins() {
|
|
39
39
|
return Z();
|
|
40
40
|
}
|
|
41
|
-
}),
|
|
41
|
+
}), X = memoize((W) => runWithOwner(J, () => unFn(W, Y))), Z = createMemo(() => [
|
|
42
42
|
...defaultsPlugins,
|
|
43
|
-
...
|
|
43
|
+
...q.plugins || [],
|
|
44
44
|
RenderPlugin
|
|
45
|
-
].map(
|
|
45
|
+
].map(X).sort((h, W) => (W.priority || 0) - (h.priority || 0)));
|
|
46
46
|
createComputed((h) => {
|
|
47
47
|
let W = difference(Z(), h);
|
|
48
|
-
return runWithOwner(
|
|
49
|
-
W.forEach((h) => Object.assign(
|
|
48
|
+
return runWithOwner(J, () => {
|
|
49
|
+
W.forEach((h) => Object.assign(Y, h.store?.(Y)));
|
|
50
50
|
}), Z();
|
|
51
51
|
}, []);
|
|
52
52
|
let Q = mapArray(Z, () => createSignal());
|
|
53
|
-
|
|
54
|
-
let
|
|
55
|
-
Q()[
|
|
53
|
+
Y.props = useMemoState(() => Q()[Q().length - 1][0]() || q), createComputed(mapArray(Z, (h, K) => {
|
|
54
|
+
let J = createMemo(() => Q()[K() - 1]?.[0]() || q), X = mergeProps$1(J, toReactive(mapValues(h.rewriteProps || {}, (h) => useMemo(() => h(J(), { store: Y })))));
|
|
55
|
+
Q()[K()][1](X);
|
|
56
56
|
})), onMount(() => {
|
|
57
|
-
createEffect(mapArray(Z, (h) => h.onMount?.(
|
|
57
|
+
createEffect(mapArray(Z, (h) => h.onMount?.(Y)));
|
|
58
58
|
});
|
|
59
59
|
let $ = createMutable({
|
|
60
|
-
props:
|
|
61
|
-
store:
|
|
60
|
+
props: Y.props,
|
|
61
|
+
store: Y
|
|
62
62
|
});
|
|
63
|
-
return window.store =
|
|
63
|
+
return window.store = Y, window.ctx = $, createComponent(Ctx.Provider, {
|
|
64
64
|
value: $,
|
|
65
65
|
get children() {
|
|
66
66
|
return createComponent($.props.Table, { get children() {
|
|
@@ -5,22 +5,25 @@ import { combineProps } from "@solid-primitives/props";
|
|
|
5
5
|
var _tmpl$ = /* @__PURE__ */ template("<div class=area>"), inrange = (e, i, a) => e <= a && e >= i;
|
|
6
6
|
const CellSelectionPlugin = {
|
|
7
7
|
name: "cell-selection",
|
|
8
|
-
store: () => ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
store: (e) => ({
|
|
9
|
+
selected: {
|
|
10
|
+
start: [],
|
|
11
|
+
end: []
|
|
12
|
+
},
|
|
13
|
+
cellSelectionRect: () => {
|
|
14
|
+
let { start: i, end: a } = e.selected, o = [i[0], a[0]].sort((e, i) => e - i), s = [i[1], a[1]].sort((e, i) => e - i);
|
|
15
|
+
return {
|
|
16
|
+
xs: o,
|
|
17
|
+
ys: s
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
}),
|
|
12
21
|
commands: (e) => ({ getAreaRows() {
|
|
13
22
|
let { start: i, end: a } = e.selected, [o, s] = [i[1], a[1]].sort((e, i) => e - i);
|
|
14
23
|
return e.props.data.slice(o, s + 1);
|
|
15
24
|
} }),
|
|
16
25
|
rewriteProps: {
|
|
17
|
-
Table: ({ Table: a }, { store: o }) => (s) => (
|
|
18
|
-
let { start: e, end: i } = o.selected, a = [e[0], i[0]].sort((e, i) => e - i), s = [e[1], i[1]].sort((e, i) => e - i);
|
|
19
|
-
return {
|
|
20
|
-
xs: a,
|
|
21
|
-
ys: s
|
|
22
|
-
};
|
|
23
|
-
}), usePointerDrag(() => o.table, {
|
|
26
|
+
Table: ({ Table: a }, { store: o }) => (s) => (usePointerDrag(() => o.table, {
|
|
24
27
|
preventDefault: !1,
|
|
25
28
|
start(e, i, a) {
|
|
26
29
|
batch(() => {
|
|
@@ -73,7 +76,7 @@ const CellSelectionPlugin = {
|
|
|
73
76
|
Td: ({ Td: e }, { store: s }) => (c) => {
|
|
74
77
|
let u = createMemo(() => {
|
|
75
78
|
let e = "", { xs: i, ys: a } = s.cellSelectionRect(), o = inrange(c.x, i[0], i[1]), l = inrange(c.y, a[0], a[1]);
|
|
76
|
-
return o && l && (e += "range-selected ", c.x == i[0] && (e += "range-selected-l "), c.x == i[1] && (e += "range-selected-r "), c.y == a[0] && (e += "range-selected-t "), c.y == a[1] && (e += "range-selected-b ")), c.col.id == s.$index
|
|
79
|
+
return o && l && (e += "range-selected ", c.x == i[0] && (e += "range-selected-l "), c.x == i[1] && (e += "range-selected-r "), c.y == a[0] && (e += "range-selected-t "), c.y == a[1] && (e += "range-selected-b ")), c.col.id == s.$index?.id && l && (e += "row-range-highlight "), e;
|
|
77
80
|
}), d = combineProps(c, {
|
|
78
81
|
get class() {
|
|
79
82
|
return u();
|
|
@@ -6,6 +6,7 @@ import { groupBy, zipObject } from "es-toolkit";
|
|
|
6
6
|
import { findLast } from "es-toolkit/compat";
|
|
7
7
|
var _tmpl$ = /* @__PURE__ */ template("<div class=\"flex items-center\">"), pathKey = (e) => e.join("\0");
|
|
8
8
|
const RowGroupPlugin = {
|
|
9
|
+
name: "row-group",
|
|
9
10
|
priority: -Infinity,
|
|
10
11
|
store: (e) => ({ rowGroup: {
|
|
11
12
|
expandKeys: {},
|
package/dist/style.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--un-bg-opacity:100%;--un-content:"";--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-text-opacity:100%;--un-border-opacity:100%;--un-space-y-reverse:initial;--un-space-x-reverse:initial;--un-outline-style:solid;--un-outline-opacity:100%;--un-leading:initial}}@property --un-leading{syntax:"*";inherits:false}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}:root,:host{--spacing:.25rem;--colors-gray-DEFAULT:#99a1af;--text-sm-fontSize:.875rem;--text-sm-lineHeight:1.25rem;--default-transition-timingFunction:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--
|
|
1
|
+
@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--un-bg-opacity:100%;--un-content:"";--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-text-opacity:100%;--un-border-opacity:100%;--un-space-y-reverse:initial;--un-space-x-reverse:initial;--un-outline-style:solid;--un-outline-opacity:100%;--un-leading:initial}}@property --un-leading{syntax:"*";inherits:false}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}:root,:host{--spacing:.25rem;--colors-gray-DEFAULT:#99a1af;--text-sm-fontSize:.875rem;--text-sm-lineHeight:1.25rem;--radius-sm:.25rem;--default-transition-timingFunction:cubic-bezier(.4,0,.2,1);--default-transition-duration:.15s;--colors-blue-DEFAULT:#54a2ff;--font-sans:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--default-font-family:var(--font-sans);--default-monoFont-family:var(--font-mono)}@supports (color:lab(0% 0 0)){:root,:host{--colors-gray-DEFAULT:lab(65.9269% -.832677 -8.17474);--colors-blue-DEFAULT:lab(65.0361% -1.42065 -56.9802)}}*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-featureSettings,normal);font-variation-settings:var(--default-font-variationSettings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-monoFont-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-monoFont-featureSettings,normal);font-variation-settings:var(--default-monoFont-variationSettings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden~=until-found])){display:none!important}.container{width:100%}.aic{align-items:center}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.text-3\.5{font-size:.875rem}.lh-\[1\]{--un-leading:1;line-height:1}.m9{margin:36px}.mx-1{margin-inline:4px}.mx-3\!{margin-inline:12px!important}.my-1{margin-block:4px}.ml{margin-left:16px}.ml-\.5{margin-left:2px}.ml-1{margin-left:4px}.mr--1{margin-right:-4px}.mr-1{margin-right:4px}.mr-2{margin-right:8px}.mr-2\.5{margin-right:10px}.p-1{padding:4px}.px,.px-4{padding-inline:16px}.px-2{padding-inline:8px}.py-1{padding-block:4px}.py-2{padding-block:8px}.pl-1{padding-left:4px}.pr-4{padding-right:16px}.ps{padding-inline-start:16px}.outline-0{outline-style:var(--un-outline-style);outline-width:0}.outline-2{outline-style:var(--un-outline-style);outline-width:2px}.outline-blue{outline-color:color-mix(in srgb,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.b{border-width:1px}.rd-2{border-radius:.5rem}.rd-sm{border-radius:var(--radius-sm)}.bg-\#dafaea\!{background-color:color-mix(in oklab,#dafaea var(--un-bg-opacity),transparent)!important}.bg-\#ffe8e8\!{background-color:color-mix(in oklab,#ffe8e8 var(--un-bg-opacity),transparent)!important}.bg-\#fff{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent)}.bg-gray\/20{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)20%,transparent)}.op-75{opacity:.75}.op40{opacity:.4}.flex{display:flex}.flex-shrink{flex-shrink:1}.flex-shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.gap-2{gap:8px}.grid{display:grid}.size-4\!{width:16px!important;height:16px!important}.size-full{width:100%;height:100%}.h-1\!{height:4px!important}.h-a\!{height:auto!important}.h-full{height:100%}.max-h-100{max-height:400px}.min-h-40{min-height:160px}.min-h-a\!{min-height:auto!important}.w-10px\!{width:10px!important}.after\:h-1:after{height:4px}.after\:w-1:after{width:4px}.inline{display:inline}.block{display:block}.hidden{display:none}.visible{visibility:visible}.collapse{visibility:collapse}.cursor-s-resize{cursor:s-resize}.cursor-w-resize{cursor:w-resize}.resize{resize:both}.resize-none{resize:none}.select-none{-webkit-user-select:none;user-select:none}.translate-x-1\/2{--un-translate-x:50%;translate:var(--un-translate-x)var(--un-translate-y)}.transform{transform:var(--un-rotate-x)var(--un-rotate-y)var(--un-rotate-z)var(--un-skew-x)var(--un-skew-y)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,--un-gradient-from,--un-gradient-via,--un-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--un-ease,var(--default-transition-timingFunction));transition-duration:var(--un-duration,var(--default-transition-duration))}.items-center{align-items:center}.box-border{box-sizing:border-box}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-end\!{justify-content:flex-end!important}.justify-center{justify-content:center}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.z-1{z-index:1}.z-9{z-index:9}.overflow-auto{overflow:auto}.table{display:table}.table-cell{display:table-cell}@supports (color:color-mix(in lab, red, red)){.outline-blue{outline-color:color-mix(in oklab,var(--colors-blue-DEFAULT)var(--un-outline-opacity),transparent)}.bg-gray\/20{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)20%,transparent)}}
|
|
2
2
|
|
|
3
|
-
.data-table{--bg:#fff;--c-primary:#51a2ff;--menu-bg:#fff;--li-hover-bg:#99a1af33;--table-b:1px solid var(--table-b-c);--table-b-c:#ebeef5;--table-c:#606266;--table-bg:#fff;--table-header-c:#909399;--table-header-bg:var(--table-bg);--table-row-hover-bg:#f5f7fa;--select-area-bg:#5292f71a;color:color-mix(in oklab,var(--table-c)var(--un-text-opacity),transparent);border-color:color-mix(in oklab,var(--table-b-c)var(--un-border-opacity),transparent);font-size:14px;position:relative}@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}.data-table--table{color:color-mix(in oklab,var(--table-c)var(--un-text-opacity),transparent);outline-style:var(--un-outline-style);border-collapse:collapse;table-layout:fixed;border-collapse:separate;border-spacing:0;border-width:0;outline-width:0;width:max-content}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}.data-table thead{color:color-mix(in oklab,var(--table-header-c)var(--un-text-opacity),transparent)}.data-table tr:hover>td{background-color:color-mix(in oklab,var(--table-row-hover-bg)var(--un-bg-opacity),transparent)}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}.data-table th{background-color:color-mix(in oklab,var(--table-header-bg)var(--un-bg-opacity),transparent)}.data-table td{background-color:color-mix(in oklab,var(--table-bg)var(--un-bg-opacity),transparent)}.data-table td,.data-table th{vertical-align:middle;outline-style:var(--un-outline-style);border-width:0;border-color:color-mix(in oklab,var(--table-b-c)var(--un-border-opacity),transparent);--un-border-style:solid;box-sizing:border-box;text-align:inherit;background-image:linear-gradient(var(--table-b-c),var(--table-b-c));background-position:100% 100%,100% 0;background-repeat:no-repeat;background-size:100% 1px,1px 100%;border-style:solid;outline-width:0;padding-block:2px;padding-inline:8px}.data-table td:empty:after{content:"ㅤ"!important}.data-table--border{border-width:1px}.data-table--border th,.data-table--border td{background-image:linear-gradient(var(--table-b-c),var(--table-b-c)),linear-gradient(var(--table-b-c),var(--table-b-c))}.data-table--scroll-view{overflow:auto}.data-table__layers{pointer-events:none;z-index:1;position:absolute;top:0;left:0}.data-table__layers>*{position:absolute}.range-selected{position:relative}.range-selected>.area{border-width:0;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--select-area-bg)var(--un-bg-opacity),transparent);pointer-events:none;border-style:solid;position:absolute;inset:0}.range-selected-l>.area{border-left-width:1.5px}.range-selected-r>.area{border-right-width:1.5px}.range-selected-t>.area{border-top-width:1.5px}.range-selected-b>.area{border-bottom-width:1.5px}.row-range-highlight,.col-range-highlight{position:relative}.row-range-highlight>.area,.col-range-highlight>.area{border-width:0;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--c-primary)10%,transparent);pointer-events:none;border-style:solid;position:absolute;inset:0}.row-range-highlight.index>.area{border-right-width:1px}.col-range-highlight>.area{border-bottom-width:1px}.sticky-header{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent);z-index:9;position:sticky;top:0}.sticky-header:after{pointer-events:none;--un-content:"";content:var(--un-content);width:100%;height:10px;position:absolute;top:100%;box-shadow:inset 0 10px 10px -10px #00000026}@property --un-content{syntax:"*";inherits:false;initial-value:""}.fixed-left,.fixed-right{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent);z-index:1;position:sticky!important}.fixed-left.is-first:after,.fixed-left.is-last:after,.fixed-right.is-first:after,.fixed-right.is-last:after{pointer-events:none;--un-content:"";content:var(--un-content);width:10px;height:100%;position:absolute;top:0}.is-scroll-right .fixed-left.is-last:after,.is-scroll-mid .fixed-left.is-last:after{left:100%;box-shadow:inset 10px 0 10px -10px #00000026}.is-scroll-left .fixed-right.is-first:after,.is-scroll-mid .fixed-right.is-first:after{right:100%;box-shadow:inset -10px 0 10px -10px #00000026}.copied .range-selected>.area{border-style:dashed}.data-table.virtual{display:block;overflow:auto}.data-table.virtual thead{width:fit-content;display:block}.data-table.virtual thead>tr{display:flex}.data-table.virtual thead>tr>th{flex:none;display:block}.data-table.virtual tbody{width:fit-content;display:block}.data-table.virtual tbody>tr{display:flex}.data-table.virtual tbody>tr>td{flex:none;display:block}.row-selection{width:40px;position:relative}.row-selection>label{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.icon-clickable{box-sizing:border-box;border-radius:.25rem;justify-content:center;align-items:center;width:20px;height:20px;padding:2px;display:flex}.icon-clickable:hover{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent)}@supports (color:color-mix(in lab, red, red)){.icon-clickable:hover{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}.icon-clickable>svg{width:100%;height:100%}input[type=checkbox].you-checkbox{color:color-mix(in oklab,#2196f3 var(--un-text-opacity),transparent);appearance:none;outline-offset:0px;--un-border-style:solid;border:2px solid;border-radius:.25rem;width:16px;height:16px;margin:4px;position:relative}input[type=checkbox].you-checkbox:focus{outline-style:var(--un-outline-style);--un-outline-style:solid;outline:4px solid oklab(65.8156% -.0610626 -.157539/.4)}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}input[type=checkbox].you-checkbox:checked{background-color:currentColor}input[type=checkbox].you-checkbox.checked:after{color:color-mix(in oklab,#fff var(--un-text-opacity),transparent);--un-content:"✓";content:var(--un-content);--un-translate-x:-50%;--un-translate-y:-50%;translate:var(--un-translate-x)var(--un-translate-y);z-index:1;font-size:.75rem;position:absolute;top:50%;left:50%}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}td.is-editing{position:relative}td.is-invalid{outline-offset:-1.5px;outline:1.5px solid #ff4d4f;position:relative}.in-cell-edit-wrapper{z-index:1;position:absolute;inset:0;box-shadow:0 0 10px -2px #00000050}.cell-validating{border-width:2px;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);pointer-events:none;--un-translate-y:-50%;width:12px;height:12px;translate:var(--un-translate-x)var(--un-translate-y);border-top-color:#0000;border-radius:3.40282e38px;animation:1s linear infinite spin;display:block;position:absolute;top:50%;right:4px}.cell-validation-error{z-index:10;color:#ff4d4f;white-space:nowrap;pointer-events:none;background:#fff1f0;border:1px solid #ffccc7;border-radius:4px;padding:2px 8px;font-size:12px;position:absolute;top:100%;left:0;box-shadow:0 2px 8px #00000020}.cell-validation-error:empty{display:none}.in-cell__resize-handle{width:100%;height:100%;position:absolute}.in-cell__resize-handle:hover:after{background-color:color-mix(in oklab,var(--c-primary)40%,transparent)}.in-cell__resize-handle:active:after{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent)}.in-cell__resize-handle:after{--un-content:"";content:var(--un-content)}.li{cursor:pointer;position:relative}.li:hover,.li.hover{background-color:color-mix(in oklab,var(--li-hover-bg)var(--un-bg-opacity),transparent)}.li:active:before,.li.selected:before,.li.active:before{content:"";border-radius:inherit;background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)15%,transparent);position:absolute;inset:0}@supports (color:color-mix(in lab, red, red)){.li:active:before,.li.selected:before,.li.active:before{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)15%,transparent)}}.li.disabled,.li[disabled]{opacity:.4}.tt-menu{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight));border-width:1px;border-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--menu-bg)var(--un-bg-opacity),transparent);cursor:default;--un-shadow:0 10px 15px -3px var(--un-shadow-color,#0000001a),0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-style:solid;border-radius:.5rem;padding-block:4px}@supports (color:color-mix(in lab, red, red)){.tt-menu{border-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}@property --un-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-shadow-color{syntax:"*";inherits:false}@property --un-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-shadow-color{syntax:"*";inherits:false}@property --un-ring-color{syntax:"*";inherits:false}@property --un-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-ring-color{syntax:"*";inherits:false}@property --un-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-ring-inset{syntax:"*";inherits:false}@property --un-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --un-ring-offset-color{syntax:"*";inherits:false}@property --un-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}:where(.tt-menu>:not(:last-child)){--un-space-y-reverse:0;margin-block-start:calc(calc(4px*.5)*var(--un-space-y-reverse));margin-block-end:calc(calc(4px*.5)*calc(1 - var(--un-space-y-reverse)))}@property --un-space-y-reverse{syntax:"*";inherits:false;initial-value:0}.tt-menu-x{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight));border-width:1px;border-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--menu-bg)var(--un-bg-opacity),transparent);cursor:default;--un-shadow:0 10px 15px -3px var(--un-shadow-color,#0000001a),0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-style:solid;border-radius:.5rem;padding-inline:4px}@supports (color:color-mix(in lab, red, red)){.tt-menu-x{border-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}:where(.tt-menu-x>:not(:last-child)){--un-space-x-reverse:0;margin-inline-start:calc(calc(4px*.5)*var(--un-space-x-reverse));margin-inline-end:calc(calc(4px*.5)*calc(1 - var(--un-space-x-reverse)))}@property --un-space-x-reverse{syntax:"*";inherits:false;initial-value:0}.tt-menu-x>.hr{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);width:1px;margin-block:6px}@supports (color:color-mix(in lab, red, red)){.tt-menu-x>.hr{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}.col__guide-line,.row__guide-line{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent);pointer-events:none;z-index:9;position:fixed;top:0;left:0}th[draggable=true],td[draggable=true]{cursor:move}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
|
3
|
+
.data-table{--bg:#fff;--c-primary:#51a2ff;--menu-bg:#fff;--li-hover-bg:#99a1af33;--table-b:1px solid var(--table-b-c);--table-b-c:#ebeef5;--table-c:#606266;--table-bg:#fff;--table-header-c:#909399;--table-header-bg:var(--table-bg);--table-row-hover-bg:#f5f7fa;--select-area-bg:#5292f71a;color:color-mix(in oklab,var(--table-c)var(--un-text-opacity),transparent);border-color:color-mix(in oklab,var(--table-b-c)var(--un-border-opacity),transparent);font-size:14px;position:relative}@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}.data-table--table{color:color-mix(in oklab,var(--table-c)var(--un-text-opacity),transparent);outline-style:var(--un-outline-style);border-collapse:collapse;table-layout:fixed;border-collapse:separate;border-spacing:0;border-width:0;outline-width:0;width:max-content}@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid}.data-table thead{color:color-mix(in oklab,var(--table-header-c)var(--un-text-opacity),transparent)}.data-table tr:hover>td{background-color:color-mix(in oklab,var(--table-row-hover-bg)var(--un-bg-opacity),transparent)}@property --un-bg-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}.data-table th{background-color:color-mix(in oklab,var(--table-header-bg)var(--un-bg-opacity),transparent)}.data-table td{background-color:color-mix(in oklab,var(--table-bg)var(--un-bg-opacity),transparent)}.data-table td,.data-table th{vertical-align:middle;outline-style:var(--un-outline-style);border-width:0;border-color:color-mix(in oklab,var(--table-b-c)var(--un-border-opacity),transparent);--un-border-style:solid;box-sizing:border-box;text-align:inherit;background-image:linear-gradient(var(--table-b-c),var(--table-b-c));background-position:100% 100%,100% 0;background-repeat:no-repeat;background-size:100% 1px,1px 100%;border-style:solid;outline-width:0;padding-block:2px;padding-inline:8px}.data-table td:empty:after{content:"ㅤ"!important}.data-table--border{border-width:1px}.data-table--border th,.data-table--border td{background-image:linear-gradient(var(--table-b-c),var(--table-b-c)),linear-gradient(var(--table-b-c),var(--table-b-c))}.data-table--scroll-view{overflow:auto}.data-table__layers{pointer-events:none;z-index:1;position:absolute;top:0;left:0}.data-table__layers>*{position:absolute}.range-selected{position:relative}.range-selected>.area{border-width:0;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--select-area-bg)var(--un-bg-opacity),transparent);pointer-events:none;border-style:solid;position:absolute;inset:0}.range-selected-l>.area{border-left-width:1.5px}.range-selected-r>.area{border-right-width:1.5px}.range-selected-t>.area{border-top-width:1.5px}.range-selected-b>.area{border-bottom-width:1.5px}.row-range-highlight,.col-range-highlight{position:relative}.row-range-highlight>.area,.col-range-highlight>.area{border-width:0;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--c-primary)10%,transparent);pointer-events:none;border-style:solid;position:absolute;inset:0}.row-range-highlight.index>.area{border-right-width:1px}.col-range-highlight>.area{border-bottom-width:1px}.sticky-header{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent);z-index:9;position:sticky;top:0}.sticky-header:after{pointer-events:none;--un-content:"";content:var(--un-content);width:100%;height:10px;position:absolute;top:100%;box-shadow:inset 0 10px 10px -10px #00000026}@property --un-content{syntax:"*";inherits:false;initial-value:""}.fixed-left,.fixed-right{background-color:color-mix(in oklab,#fff var(--un-bg-opacity),transparent);z-index:1;position:sticky!important}.fixed-left.is-first:after,.fixed-left.is-last:after,.fixed-right.is-first:after,.fixed-right.is-last:after{pointer-events:none;--un-content:"";content:var(--un-content);width:10px;height:100%;position:absolute;top:0}.is-scroll-right .fixed-left.is-last:after,.is-scroll-mid .fixed-left.is-last:after{left:100%;box-shadow:inset 10px 0 10px -10px #00000026}.is-scroll-left .fixed-right.is-first:after,.is-scroll-mid .fixed-right.is-first:after{right:100%;box-shadow:inset -10px 0 10px -10px #00000026}.copied .range-selected>.area{border-style:dashed}.data-table.virtual{display:block;overflow:auto}.data-table.virtual thead{width:fit-content;display:block}.data-table.virtual thead>tr{display:flex}.data-table.virtual thead>tr>th{flex:none;display:block}.data-table.virtual tbody{width:fit-content;display:block}.data-table.virtual tbody>tr{display:flex}.data-table.virtual tbody>tr>td{flex:none;display:block}.row-selection{width:40px;position:relative}.row-selection>label{justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:absolute;inset:0}.icon-clickable{box-sizing:border-box;border-radius:.25rem;justify-content:center;align-items:center;width:20px;height:20px;padding:2px;display:flex}.icon-clickable:hover{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent)}@supports (color:color-mix(in lab, red, red)){.icon-clickable:hover{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}.icon-clickable>svg{width:100%;height:100%}input[type=checkbox].you-checkbox{color:color-mix(in oklab,#2196f3 var(--un-text-opacity),transparent);appearance:none;outline-offset:0px;--un-border-style:solid;border:2px solid;border-radius:.25rem;width:16px;height:16px;margin:4px;position:relative}input[type=checkbox].you-checkbox:focus{outline-style:var(--un-outline-style);--un-outline-style:solid;outline:4px solid oklab(65.8156% -.0610627 -.157539/.4)}@property --un-outline-opacity{syntax:"<percentage>";inherits:false;initial-value:100%}input[type=checkbox].you-checkbox:checked{background-color:currentColor}input[type=checkbox].you-checkbox.checked:after{color:color-mix(in oklab,#fff var(--un-text-opacity),transparent);--un-content:"✓";content:var(--un-content);--un-translate-x:-50%;--un-translate-y:-50%;translate:var(--un-translate-x)var(--un-translate-y);z-index:1;font-size:.75rem;position:absolute;top:50%;left:50%}@property --un-translate-x{syntax:"*";inherits:false;initial-value:0}@property --un-translate-y{syntax:"*";inherits:false;initial-value:0}@property --un-translate-z{syntax:"*";inherits:false;initial-value:0}td.is-editing{position:relative}td.is-invalid{outline-offset:-1.5px;outline:1.5px solid #ff4d4f;position:relative}.in-cell-edit-wrapper{z-index:1;position:absolute;inset:0;box-shadow:0 0 10px -2px #00000050}.cell-validating{border-width:2px;border-color:color-mix(in oklab,var(--c-primary)var(--un-border-opacity),transparent);pointer-events:none;--un-translate-y:-50%;width:12px;height:12px;translate:var(--un-translate-x)var(--un-translate-y);border-top-color:#0000;border-radius:3.40282e38px;animation:1s linear infinite spin;display:block;position:absolute;top:50%;right:4px}.cell-validation-error{z-index:10;color:#ff4d4f;white-space:nowrap;pointer-events:none;background:#fff1f0;border:1px solid #ffccc7;border-radius:4px;padding:2px 8px;font-size:12px;position:absolute;top:100%;left:0;box-shadow:0 2px 8px #00000020}.cell-validation-error:empty{display:none}.in-cell__resize-handle{width:100%;height:100%;position:absolute}.in-cell__resize-handle:hover:after{background-color:color-mix(in oklab,var(--c-primary)40%,transparent)}.in-cell__resize-handle:active:after{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent)}.in-cell__resize-handle:after{--un-content:"";content:var(--un-content)}.li{cursor:pointer;position:relative}.li:hover,.li.hover{background-color:color-mix(in oklab,var(--li-hover-bg)var(--un-bg-opacity),transparent)}.li:active:before,.li.selected:before,.li.active:before{content:"";border-radius:inherit;background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)15%,transparent);position:absolute;inset:0}@supports (color:color-mix(in lab, red, red)){.li:active:before,.li.selected:before,.li.active:before{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)15%,transparent)}}.li.disabled,.li[disabled]{opacity:.4}.tt-menu{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight));border-width:1px;border-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--menu-bg)var(--un-bg-opacity),transparent);cursor:default;--un-shadow:0 10px 15px -3px var(--un-shadow-color,#0000001a),0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-style:solid;border-radius:.5rem;padding-block:4px}@supports (color:color-mix(in lab, red, red)){.tt-menu{border-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}@property --un-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-shadow-color{syntax:"*";inherits:false}@property --un-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-shadow-color{syntax:"*";inherits:false}@property --un-ring-color{syntax:"*";inherits:false}@property --un-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-inset-ring-color{syntax:"*";inherits:false}@property --un-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --un-ring-inset{syntax:"*";inherits:false}@property --un-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --un-ring-offset-color{syntax:"*";inherits:false}@property --un-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}:where(.tt-menu>:not(:last-child)){--un-space-y-reverse:0;margin-block-start:calc(calc(4px*.5)*var(--un-space-y-reverse));margin-block-end:calc(calc(4px*.5)*calc(1 - var(--un-space-y-reverse)))}@property --un-space-y-reverse{syntax:"*";inherits:false;initial-value:0}.tt-menu-x{font-size:var(--text-sm-fontSize);line-height:var(--un-leading,var(--text-sm-lineHeight));border-width:1px;border-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);--un-border-style:solid;background-color:color-mix(in oklab,var(--menu-bg)var(--un-bg-opacity),transparent);cursor:default;--un-shadow:0 10px 15px -3px var(--un-shadow-color,#0000001a),0 4px 6px -4px var(--un-shadow-color,#0000001a);box-shadow:var(--un-inset-shadow),var(--un-inset-ring-shadow),var(--un-ring-offset-shadow),var(--un-ring-shadow),var(--un-shadow);border-style:solid;border-radius:.5rem;padding-inline:4px}@supports (color:color-mix(in lab, red, red)){.tt-menu-x{border-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}:where(.tt-menu-x>:not(:last-child)){--un-space-x-reverse:0;margin-inline-start:calc(calc(4px*.5)*var(--un-space-x-reverse));margin-inline-end:calc(calc(4px*.5)*calc(1 - var(--un-space-x-reverse)))}@property --un-space-x-reverse{syntax:"*";inherits:false;initial-value:0}.tt-menu-x>.hr{background-color:color-mix(in srgb,var(--colors-gray-DEFAULT)30%,transparent);width:1px;margin-block:6px}@supports (color:color-mix(in lab, red, red)){.tt-menu-x>.hr{background-color:color-mix(in oklab,var(--colors-gray-DEFAULT)30%,transparent)}}.col__guide-line,.row__guide-line{background-color:color-mix(in oklab,var(--c-primary)var(--un-bg-opacity),transparent);pointer-events:none;z-index:9;position:fixed;top:0;left:0}th[draggable=true],td[draggable=true]{cursor:move}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
|
package/dist/theme/antd.scss
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
.data-table {
|
|
2
|
-
--table-b: 1px solid var(--table-b-c);
|
|
3
|
-
--table-b-c: var(--ant-table-border-color, #f0f0f0);
|
|
4
|
-
--table-c: var(--ant-color-text, rgba(0,0,0,0.88));
|
|
5
|
-
--table-bg: var(--ant-color-bg-container, #fff);
|
|
6
|
-
|
|
7
|
-
--table-header-c: var(--ant-table-header-color, rgba(0,0,0,0.88));
|
|
8
|
-
--table-header-bg: var(--ant-table-header-bg, #fafafa);
|
|
9
|
-
|
|
10
|
-
--table-row-hover-bg: var(--ant-table-row-hover-bg, #fafafa);
|
|
11
|
-
|
|
12
|
-
font-size: 14px;
|
|
13
|
-
|
|
14
|
-
&:not(&--border) thead th {
|
|
15
|
-
position: relative;
|
|
16
|
-
&:not(:last-child)::before {
|
|
17
|
-
content: '';
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: 50%;
|
|
20
|
-
right: 0;
|
|
21
|
-
height: 1.6em;
|
|
22
|
-
width: 1px;
|
|
23
|
-
background-color: var(--table-b-c);
|
|
24
|
-
transform: translateY(-50%);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
th, td {
|
|
29
|
-
padding: 12px 8px;
|
|
30
|
-
line-height: 22px;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.row-selection {
|
|
34
|
-
width: 35px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&--small {
|
|
38
|
-
th, td {
|
|
39
|
-
padding-left: 8px;
|
|
40
|
-
padding-right: 8px;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
.data-table {
|
|
2
|
+
--table-b: 1px solid var(--table-b-c);
|
|
3
|
+
--table-b-c: var(--ant-table-border-color, #f0f0f0);
|
|
4
|
+
--table-c: var(--ant-color-text, rgba(0,0,0,0.88));
|
|
5
|
+
--table-bg: var(--ant-color-bg-container, #fff);
|
|
6
|
+
|
|
7
|
+
--table-header-c: var(--ant-table-header-color, rgba(0,0,0,0.88));
|
|
8
|
+
--table-header-bg: var(--ant-table-header-bg, #fafafa);
|
|
9
|
+
|
|
10
|
+
--table-row-hover-bg: var(--ant-table-row-hover-bg, #fafafa);
|
|
11
|
+
|
|
12
|
+
font-size: 14px;
|
|
13
|
+
|
|
14
|
+
&:not(&--border) thead th {
|
|
15
|
+
position: relative;
|
|
16
|
+
&:not(:last-child)::before {
|
|
17
|
+
content: '';
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: 50%;
|
|
20
|
+
right: 0;
|
|
21
|
+
height: 1.6em;
|
|
22
|
+
width: 1px;
|
|
23
|
+
background-color: var(--table-b-c);
|
|
24
|
+
transform: translateY(-50%);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
th, td {
|
|
29
|
+
padding: 12px 8px;
|
|
30
|
+
line-height: 22px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.row-selection {
|
|
34
|
+
width: 35px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&--small {
|
|
38
|
+
th, td {
|
|
39
|
+
padding-left: 8px;
|
|
40
|
+
padding-right: 8px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
43
|
}
|