intable 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__uno.css +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +5 -2
- package/dist/plugins/CopyPastePlugin.js +28 -21
- package/dist/plugins/DiffPlugin.d.ts +1 -1
- package/dist/plugins/EditablePlugin.d.ts +5 -1
- package/dist/plugins/EditablePlugin.js +143 -133
- package/dist/style.css +2 -2
- 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
|
|
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-leading:initial;--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%}}@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;--colors-green-DEFAULT:#05df72;--colors-red-DEFAULT:#ff6568;--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);--colors-green-DEFAULT:lab(78.503% -64.9264 39.7492);--colors-red-DEFAULT:lab(63.7053% 60.745 31.3109)}}*,: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-\#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)}.bg-green\!{background-color:color-mix(in srgb,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in srgb,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}.op-20{opacity:.2}.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}.pointer-events-none{pointer-events:none}.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}.inset-0{inset:0}.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-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)}.bg-green\!{background-color:color-mix(in oklab,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in oklab,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}}
|
package/dist/index.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ export interface TableProps {
|
|
|
99
99
|
export type THProps = {
|
|
100
100
|
x: number;
|
|
101
101
|
col: TableColumn;
|
|
102
|
-
children
|
|
102
|
+
children?: JSX.Element;
|
|
103
103
|
rowspan?: number;
|
|
104
104
|
colspan?: number;
|
|
105
105
|
style?: any;
|
|
@@ -109,7 +109,7 @@ export type TDProps = {
|
|
|
109
109
|
y: number;
|
|
110
110
|
data: any;
|
|
111
111
|
col: TableColumn;
|
|
112
|
-
children
|
|
112
|
+
children?: JSX.Element;
|
|
113
113
|
rowspan?: number;
|
|
114
114
|
colspan?: number;
|
|
115
115
|
};
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ import { createLazyMemo } from "@solid-primitives/memo";
|
|
|
25
25
|
import { createElementSize, createResizeObserver, makeResizeObserver } from "@solid-primitives/resize-observer";
|
|
26
26
|
import { createScrollPosition } from "@solid-primitives/scroll";
|
|
27
27
|
import { difference, isEqual, memoize, sumBy } from "es-toolkit";
|
|
28
|
-
var _tmpl$ = /* @__PURE__ */ template("<table>"), _tmpl$2 = /* @__PURE__ */ template("<thead>"), _tmpl$3 = /* @__PURE__ */ template("<tbody>"), _tmpl$4 = /* @__PURE__ */ template("<tr>"), _tmpl$5 = /* @__PURE__ */ template("<th>"), _tmpl$6 = /* @__PURE__ */ template("<td>"), _tmpl$7 = /* @__PURE__ */ template("<div tabindex=-1><div class=data-table__layers></div><table class=data-table--table>");
|
|
28
|
+
var _tmpl$ = /* @__PURE__ */ template("<table>"), _tmpl$2 = /* @__PURE__ */ template("<thead>"), _tmpl$3 = /* @__PURE__ */ template("<tbody>"), _tmpl$4 = /* @__PURE__ */ template("<tr>"), _tmpl$5 = /* @__PURE__ */ template("<th>"), _tmpl$6 = /* @__PURE__ */ template("<td>"), _tmpl$7 = /* @__PURE__ */ template("<div tabindex=-1><div class=data-table__layers></div><table class=data-table--table>"), _tmpl$8 = /* @__PURE__ */ template("<div class=data-table__empty>No data");
|
|
29
29
|
const Ctx = createContext({
|
|
30
30
|
props: {},
|
|
31
31
|
store: {}
|
|
@@ -366,7 +366,10 @@ const ScrollPlugin = {
|
|
|
366
366
|
let Z = mapArray(() => q.plugins.flatMap((v) => v.layers ?? []), (v) => createComponent(v, q));
|
|
367
367
|
return (() => {
|
|
368
368
|
var J = _tmpl$7(), Y = J.firstChild, X = Y.nextSibling;
|
|
369
|
-
return spread(J, v, !1, !0), insert(Y, Z), use((v) => q.table = v, X), insert(X, () => v.children), J
|
|
369
|
+
return spread(J, v, !1, !0), insert(Y, Z), use((v) => q.table = v, X), insert(X, () => v.children), insert(J, (() => {
|
|
370
|
+
var v = memo(() => !q.props.data.length);
|
|
371
|
+
return () => v() && _tmpl$8();
|
|
372
|
+
})(), null), J;
|
|
370
373
|
})();
|
|
371
374
|
} }
|
|
372
375
|
}, defaultsPlugins = [
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { unFn } from "../utils.js";
|
|
1
2
|
import { createEffect } from "solid-js";
|
|
2
3
|
const ClipboardPlugin = {
|
|
3
4
|
name: "clipboard",
|
|
@@ -7,40 +8,46 @@ const ClipboardPlugin = {
|
|
|
7
8
|
},
|
|
8
9
|
"$mod+v": () => e.commands.paste()
|
|
9
10
|
}),
|
|
10
|
-
onMount: (
|
|
11
|
+
onMount: (e) => {
|
|
11
12
|
createEffect(() => {
|
|
12
|
-
JSON.stringify(
|
|
13
|
+
JSON.stringify(e.selected), e.scroll_el?.classList.remove("copied");
|
|
13
14
|
});
|
|
14
15
|
},
|
|
15
16
|
menus: (e) => [],
|
|
16
|
-
commands: (
|
|
17
|
+
commands: (t) => ({
|
|
17
18
|
copy: () => {
|
|
18
|
-
let { start:
|
|
19
|
-
if (!
|
|
20
|
-
let [r, i] = [
|
|
19
|
+
let { start: e, end: n } = t.selected;
|
|
20
|
+
if (!e?.length) return;
|
|
21
|
+
let [r, i] = [e[0], n[0]].sort((e, t) => e - t), [a, o] = [e[1], n[1]].sort((e, t) => e - t), s = t.props.columns.slice(r, i + 1).filter((e) => !e[t.internal]), c = t.props.data.slice(a, o + 1).map((e) => s.map((t) => {
|
|
21
22
|
let n = e[t.id] ?? "";
|
|
22
23
|
return String(n).replace(/[\t\r\n]/g, " ");
|
|
23
24
|
}).join(" ")).join("\n");
|
|
24
25
|
navigator.clipboard.writeText(c);
|
|
25
26
|
},
|
|
26
27
|
paste: async () => {
|
|
27
|
-
let { start:
|
|
28
|
-
if (!
|
|
29
|
-
let
|
|
30
|
-
for (let
|
|
31
|
-
let
|
|
32
|
-
for (let
|
|
33
|
-
let
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
let { start: n, end: r } = t.selected;
|
|
29
|
+
if (!n?.length) return;
|
|
30
|
+
let i = (await navigator.clipboard.readText()).replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\n$/, "").split("\n").map((e) => e.split(" ")), a = i.length, o = i[0].length, [s, c] = [n[0], r[0]].sort((e, t) => e - t), [l, u] = [n[1], r[1]].sort((e, t) => e - t), d = u - l + 1, f = c - s + 1, p = d > a && d % a === 0 ? d : a, m = f > o && f % o === 0 ? f : o, h = t.props.columns, g = [];
|
|
31
|
+
for (let e = s; e < h.length && g.length < m; e++) h[e][t.internal] || g.push(h[e]);
|
|
32
|
+
let _ = t.props.data.slice(), v = Math.min(l + p - 1, _.length - 1);
|
|
33
|
+
for (let n = 0; n <= v - l; n++) {
|
|
34
|
+
let r = {};
|
|
35
|
+
g.forEach((s, c) => {
|
|
36
|
+
let u = _[l + n];
|
|
37
|
+
unFn(t.props.editable, {
|
|
38
|
+
col: s,
|
|
39
|
+
data: u,
|
|
40
|
+
x: h.indexOf(s),
|
|
41
|
+
y: l + n
|
|
42
|
+
}) && (r[s.id] = i[n % a][c % o]);
|
|
43
|
+
}), _[l + n] = {
|
|
44
|
+
..._[l + n],
|
|
45
|
+
...r
|
|
39
46
|
};
|
|
40
47
|
}
|
|
41
|
-
let
|
|
42
|
-
for (let
|
|
43
|
-
|
|
48
|
+
let y = s, b = 0;
|
|
49
|
+
for (let e = s; e < h.length && b < g.length; e++) h[e][t.internal] || (y = e, b++);
|
|
50
|
+
t.selected.end = [y, v], t.props.onDataChange?.(_);
|
|
44
51
|
}
|
|
45
52
|
})
|
|
46
53
|
};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { type JSX } from 'solid-js';
|
|
2
2
|
import { type Plugin, type TableColumn } from '..';
|
|
3
3
|
declare module '../index' {
|
|
4
|
+
interface TableProps {
|
|
5
|
+
editable?: boolean | ((props: TDProps) => boolean);
|
|
6
|
+
}
|
|
4
7
|
interface TableColumn {
|
|
5
|
-
editable?: boolean;
|
|
8
|
+
editable?: boolean | ((props: TDProps) => boolean);
|
|
6
9
|
editor?: string | Editor;
|
|
7
10
|
editorProps?: any;
|
|
8
11
|
editorPopup?: boolean;
|
|
@@ -33,6 +36,7 @@ export interface EditorOpt {
|
|
|
33
36
|
export declare const EditablePlugin: Plugin;
|
|
34
37
|
export declare const editors: {
|
|
35
38
|
text: Editor;
|
|
39
|
+
textarea: Editor;
|
|
36
40
|
number: Editor;
|
|
37
41
|
range: Editor;
|
|
38
42
|
date: Editor;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { chooseFile, resolveOptions } from "../utils.js";
|
|
1
|
+
import { chooseFile, resolveOptions, unFn } from "../utils.js";
|
|
2
2
|
import { Checkbox, Files } from "./RenderPlugin/components.js";
|
|
3
3
|
import { Ctx } from "../index.js";
|
|
4
4
|
import { createComponent, delegateEvents, effect, insert, memo, mergeProps, spread, template, use } from "solid-js/web";
|
|
@@ -7,152 +7,162 @@ import { createMutable } from "solid-js/store";
|
|
|
7
7
|
import { combineProps } from "@solid-primitives/props";
|
|
8
8
|
import { createAsyncMemo } from "@solid-primitives/memo";
|
|
9
9
|
import { delay } from "es-toolkit";
|
|
10
|
-
var _tmpl$ = /* @__PURE__ */ template("<input style=position:absolute;margin-top:1em;width:0;height:0;pointer-events:none;opacity:0>"), _tmpl$2 = /* @__PURE__ */ template("<div class=in-cell-edit-wrapper>"), _tmpl$3 = /* @__PURE__ */ template("<span class=cell-validating>"), _tmpl$4 = /* @__PURE__ */ template("<input>"), _tmpl$5 = /* @__PURE__ */ template("<
|
|
10
|
+
var _tmpl$ = /* @__PURE__ */ template("<input style=position:absolute;margin-top:1em;width:0;height:0;pointer-events:none;opacity:0>"), _tmpl$2 = /* @__PURE__ */ template("<div class=in-cell-edit-wrapper>"), _tmpl$3 = /* @__PURE__ */ template("<span class=cell-validating>"), _tmpl$4 = /* @__PURE__ */ template("<input>"), _tmpl$5 = /* @__PURE__ */ template("<textarea>"), _tmpl$6 = /* @__PURE__ */ template("<label class=\"h-full flex items-center\">"), _tmpl$7 = /* @__PURE__ */ template("<select>"), _tmpl$8 = /* @__PURE__ */ template("<option>");
|
|
11
11
|
const EditablePlugin = {
|
|
12
12
|
name: "editable",
|
|
13
13
|
store: () => ({ editors: { ...editors } }),
|
|
14
|
-
rewriteProps: {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
14
|
+
rewriteProps: {
|
|
15
|
+
editable: ({ editable: e }, { store: g }) => (v) => {
|
|
16
|
+
let y = [v.col.editable, e].filter((e) => e != null);
|
|
17
|
+
return !!y.length && y.every((e) => unFn(e, v)) && !v.data[g.internal] && !v.col[g.internal];
|
|
18
|
+
},
|
|
19
|
+
Td: ({ Td: e }, { store: g }) => (v) => {
|
|
20
|
+
let y, { props: x } = useContext(Ctx), S = createMemo(() => unFn(x.editable, v)), [w, T] = createSignal(!1), A = "", j = createMemo(() => (([e, g]) => v.x == e && v.y == g)(g.selected.start || [])), M = createMemo(() => j() && S() && !w()), [N, P] = createSignal(!1);
|
|
21
|
+
createEffect(() => {
|
|
22
|
+
w() || (g.clearCellValidation?.(v.data, v.col), P(!1));
|
|
23
|
+
});
|
|
24
|
+
let F = createAsyncMemo(() => {
|
|
25
|
+
if (w()) {
|
|
26
|
+
let e = !1, _ = ((e) => typeof e == "string" ? g.editors[e] : e)(v.col.editor || "text"), y = {
|
|
27
|
+
props: v.col.editorProps,
|
|
28
|
+
col: v.col,
|
|
29
|
+
eventKey: A,
|
|
30
|
+
data: v.data,
|
|
31
|
+
value: v.data[v.col.id],
|
|
32
|
+
ok: async () => {
|
|
33
|
+
await I(b.getValue()), T(!1);
|
|
34
|
+
},
|
|
35
|
+
cancel: () => (e = !0, g.clearCellValidation?.(v.data, v.col), T(!1)),
|
|
36
|
+
onChange: (e) => I(e).catch(() => {})
|
|
37
|
+
}, b = _(y);
|
|
38
|
+
return onCleanup(() => {
|
|
39
|
+
if (!e && b.getValue() !== v.data[v.col.id]) {
|
|
40
|
+
let e = [...x.data];
|
|
41
|
+
e[v.y] = {
|
|
42
|
+
...e[v.y],
|
|
43
|
+
[v.col.id]: b.getValue()
|
|
44
|
+
}, x.onDataChange?.(e);
|
|
45
|
+
}
|
|
46
|
+
e || I(b.getValue()), b.destroy();
|
|
47
|
+
}), [y, b];
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
async function I(e) {
|
|
51
|
+
if (g.validateCell) try {
|
|
52
|
+
P(!0), await g.validateCell(e, v.data, v.col);
|
|
53
|
+
} finally {
|
|
54
|
+
P(!1);
|
|
55
|
+
}
|
|
50
56
|
}
|
|
57
|
+
createEffect(() => {
|
|
58
|
+
F()?.[1]?.focus?.();
|
|
59
|
+
}), createEffect(() => {
|
|
60
|
+
if (w()) {
|
|
61
|
+
let e = createMemo(() => JSON.stringify(g.selected));
|
|
62
|
+
createEffect(on(e, () => T(!1), { defer: !0 }));
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
let L, R = createMutable({
|
|
66
|
+
w: 0,
|
|
67
|
+
h: 0
|
|
68
|
+
});
|
|
69
|
+
return createComputed(() => w() && (R.w = y.getBoundingClientRect().width, R.h = y.getBoundingClientRect().height)), v = combineProps(v, {
|
|
70
|
+
ref: (e) => y = e,
|
|
71
|
+
get class() {
|
|
72
|
+
return w() ? "is-editing" : "";
|
|
73
|
+
},
|
|
74
|
+
get style() {
|
|
75
|
+
return w() ? `width: ${R.w}px; height: ${R.h}px; padding: 0; ` : "";
|
|
76
|
+
},
|
|
77
|
+
onClick: () => L?.focus?.(),
|
|
78
|
+
onDblClick: () => T(S()),
|
|
79
|
+
onKeyDown: (e) => e.key == "Escape" && F()?.[0].cancel()
|
|
80
|
+
}), createComponent(e, mergeProps(v, { get children() {
|
|
81
|
+
return [memo(() => memo(() => !!M())() && (() => {
|
|
82
|
+
var e = _tmpl$();
|
|
83
|
+
return e.addEventListener("compositionend", () => {
|
|
84
|
+
T(!0);
|
|
85
|
+
}), e.$$input = (e) => {
|
|
86
|
+
A = e.target.value, T(!e.isComposing);
|
|
87
|
+
}, e.$$keydown = (e) => {
|
|
88
|
+
e.key == " " && e.preventDefault();
|
|
89
|
+
}, use((e) => {
|
|
90
|
+
L = e, delay(0).then(() => e.focus({ preventScroll: !0 }));
|
|
91
|
+
}, e), e;
|
|
92
|
+
})()), memo(() => memo(() => !!F()?.[1]?.el)() ? (() => {
|
|
93
|
+
var e = _tmpl$2();
|
|
94
|
+
return insert(e, () => F()?.[1]?.el, null), insert(e, (() => {
|
|
95
|
+
var e = memo(() => !!N());
|
|
96
|
+
return () => e() && _tmpl$3();
|
|
97
|
+
})(), null), e;
|
|
98
|
+
})() : v.children)];
|
|
99
|
+
} }));
|
|
51
100
|
}
|
|
52
|
-
|
|
53
|
-
G()?.[1]?.focus?.();
|
|
54
|
-
}), createEffect(() => {
|
|
55
|
-
if (P()) {
|
|
56
|
-
let n = createMemo(() => JSON.stringify(E.selected));
|
|
57
|
-
createEffect(on(n, () => F(!1), { defer: !0 }));
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
let q, J = createMutable({
|
|
61
|
-
w: 0,
|
|
62
|
-
h: 0
|
|
63
|
-
});
|
|
64
|
-
return createComputed(() => P() && (J.w = O.getBoundingClientRect().width, J.h = O.getBoundingClientRect().height)), D = combineProps(D, {
|
|
65
|
-
ref: (n) => O = n,
|
|
66
|
-
get class() {
|
|
67
|
-
return P() ? "is-editing" : "";
|
|
68
|
-
},
|
|
69
|
-
get style() {
|
|
70
|
-
return P() ? `width: ${J.w}px; height: ${J.h}px; padding: 0; ` : "";
|
|
71
|
-
},
|
|
72
|
-
onClick: () => q?.focus?.(),
|
|
73
|
-
onDblClick: () => F(M()),
|
|
74
|
-
onKeyDown: (n) => n.key == "Escape" && G()?.[0].cancel()
|
|
75
|
-
}), createComponent(n, mergeProps(D, { get children() {
|
|
76
|
-
return [memo(() => memo(() => !!H())() && (() => {
|
|
77
|
-
var n = _tmpl$();
|
|
78
|
-
return n.addEventListener("compositionend", () => {
|
|
79
|
-
F(!0);
|
|
80
|
-
}), n.$$input = (n) => {
|
|
81
|
-
B = n.target.value, F(!n.isComposing);
|
|
82
|
-
}, n.$$keydown = (n) => {
|
|
83
|
-
n.key == " " && n.preventDefault();
|
|
84
|
-
}, use((n) => {
|
|
85
|
-
q = n, delay(0).then(() => n.focus({ preventScroll: !0 }));
|
|
86
|
-
}, n), n;
|
|
87
|
-
})()), memo(() => memo(() => !!G()?.[1]?.el)() ? (() => {
|
|
88
|
-
var n = _tmpl$2();
|
|
89
|
-
return insert(n, () => G()?.[1]?.el, null), insert(n, (() => {
|
|
90
|
-
var n = memo(() => !!U());
|
|
91
|
-
return () => n() && _tmpl$3();
|
|
92
|
-
})(), null), n;
|
|
93
|
-
})() : D.children)];
|
|
94
|
-
} }));
|
|
95
|
-
} }
|
|
101
|
+
}
|
|
96
102
|
};
|
|
97
|
-
var createEditor = (
|
|
98
|
-
let [
|
|
99
|
-
return createComponent(
|
|
100
|
-
ref: (
|
|
103
|
+
var createEditor = (e, _, v) => ({ eventKey: y, value: b, col: x, ok: S, cancel: C, props: w, onChange: T }) => createRoot((E) => {
|
|
104
|
+
let [D, O] = createSignal(y || b), k;
|
|
105
|
+
return createComponent(e, mergeProps({
|
|
106
|
+
ref: (e) => k = e,
|
|
101
107
|
class: "relative block px-2 size-full z-9 box-border resize-none outline-0",
|
|
102
108
|
get value() {
|
|
103
|
-
return
|
|
109
|
+
return D();
|
|
104
110
|
},
|
|
105
|
-
onInput: (
|
|
106
|
-
onChange: (
|
|
107
|
-
"on:pointerdown": (
|
|
108
|
-
"on:keydown": (
|
|
109
|
-
|
|
111
|
+
onInput: (e) => (O(e instanceof Event ? e.target.value : e), T?.(D())),
|
|
112
|
+
onChange: (e) => (O(e instanceof Event ? e.target.value : e), T?.(D()), v && S()),
|
|
113
|
+
"on:pointerdown": (e) => e.stopPropagation(),
|
|
114
|
+
"on:keydown": (e) => {
|
|
115
|
+
e.stopPropagation(), e.key == "Enter" && !e.shiftKey && S(), e.key == "Escape" && C();
|
|
110
116
|
},
|
|
111
117
|
get options() {
|
|
112
|
-
return memo(() => !!
|
|
118
|
+
return memo(() => !!x.enum)() ? resolveOptions(x.enum ?? []) : void 0;
|
|
113
119
|
}
|
|
114
|
-
},
|
|
115
|
-
el:
|
|
116
|
-
getValue:
|
|
117
|
-
focus: () =>
|
|
118
|
-
destroy:
|
|
120
|
+
}, _, w)), {
|
|
121
|
+
el: k,
|
|
122
|
+
getValue: D,
|
|
123
|
+
focus: () => k.focus(),
|
|
124
|
+
destroy: E
|
|
119
125
|
};
|
|
120
|
-
}), Input = (
|
|
121
|
-
var
|
|
122
|
-
return spread(
|
|
123
|
-
})()
|
|
124
|
-
var E = _tmpl$5();
|
|
125
|
-
return spread(E, n, !1, !0), insert(E, () => n.options?.map((n) => (() => {
|
|
126
|
-
var E = _tmpl$6();
|
|
127
|
-
return insert(E, () => n.label), effect(() => E.value = n.value), E;
|
|
128
|
-
})())), E;
|
|
129
|
-
})(), {}, !0), file = createEditor((E) => createComponent(Files, mergeProps(E, {
|
|
130
|
-
class: "relative z-9 outline-2 outline-blue min-h-a! h-a! p-1 bg-#fff",
|
|
131
|
-
onAdd: () => chooseFile({ multiple: !0 }).then((n) => E.onChange([...E.value || [], ...n.map((n) => ({
|
|
132
|
-
name: n.name,
|
|
133
|
-
size: n.size
|
|
134
|
-
}))]))
|
|
135
|
-
}))), checkbox = createEditor((n) => (() => {
|
|
136
|
-
var E = _tmpl$7(), O = n.ref;
|
|
137
|
-
return typeof O == "function" ? use(O, E) : n.ref = E, insert(E, createComponent(Checkbox, mergeProps(n, {
|
|
138
|
-
ref: () => {},
|
|
139
|
-
onInput: () => {},
|
|
140
|
-
class: "mx-3!"
|
|
141
|
-
}))), E;
|
|
142
|
-
})());
|
|
126
|
+
}), Input = (e) => (() => {
|
|
127
|
+
var g = _tmpl$4();
|
|
128
|
+
return spread(g, e, !1, !1), g;
|
|
129
|
+
})();
|
|
143
130
|
const editors = {
|
|
144
|
-
text,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
131
|
+
text: createEditor(Input),
|
|
132
|
+
textarea: createEditor((e) => (() => {
|
|
133
|
+
var g = _tmpl$5();
|
|
134
|
+
return spread(g, e, !1, !1), g;
|
|
135
|
+
})()),
|
|
136
|
+
number: createEditor(Input, { type: "number" }),
|
|
137
|
+
range: createEditor(Input, { type: "range" }),
|
|
138
|
+
date: createEditor(Input, { type: "date" }, !0),
|
|
139
|
+
time: createEditor(Input, { type: "time" }, !0),
|
|
140
|
+
datetime: createEditor(Input, { type: "datetime-local" }, !0),
|
|
141
|
+
color: createEditor(Input, { type: "color" }),
|
|
142
|
+
tel: createEditor(Input, { type: "tel" }),
|
|
143
|
+
password: createEditor(Input, { type: "password" }),
|
|
144
|
+
file: createEditor((g) => createComponent(Files, mergeProps(g, {
|
|
145
|
+
class: "relative z-9 outline-2 outline-blue min-h-a! h-a! p-1 bg-#fff",
|
|
146
|
+
onAdd: () => chooseFile({ multiple: !0 }).then((e) => g.onChange([...g.value || [], ...e.map((e) => ({
|
|
147
|
+
name: e.name,
|
|
148
|
+
size: e.size
|
|
149
|
+
}))]))
|
|
150
|
+
}))),
|
|
151
|
+
checkbox: createEditor((e) => (() => {
|
|
152
|
+
var g = _tmpl$6(), _ = e.ref;
|
|
153
|
+
return typeof _ == "function" ? use(_, g) : e.ref = g, insert(g, createComponent(Checkbox, mergeProps(e, {
|
|
154
|
+
ref: () => {},
|
|
155
|
+
onInput: () => {},
|
|
156
|
+
class: "mx-3!"
|
|
157
|
+
}))), g;
|
|
158
|
+
})()),
|
|
159
|
+
select: createEditor((e) => (() => {
|
|
160
|
+
var g = _tmpl$7();
|
|
161
|
+
return spread(g, e, !1, !0), insert(g, () => e.options?.map((e) => (() => {
|
|
162
|
+
var g = _tmpl$8();
|
|
163
|
+
return insert(g, () => e.label), effect(() => g.value = e.value), g;
|
|
164
|
+
})())), g;
|
|
165
|
+
})(), {}, !0)
|
|
156
166
|
};
|
|
157
167
|
delegateEvents(["keydown", "input"]);
|
|
158
168
|
export { EditablePlugin, editors };
|
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
|
|
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-leading:initial;--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%}}@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;--colors-green-DEFAULT:#05df72;--colors-red-DEFAULT:#ff6568;--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);--colors-green-DEFAULT:lab(78.503% -64.9264 39.7492);--colors-red-DEFAULT:lab(63.7053% 60.745 31.3109)}}*,: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-\#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)}.bg-green\!{background-color:color-mix(in srgb,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in srgb,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}.op-20{opacity:.2}.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}.pointer-events-none{pointer-events:none}.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}.inset-0{inset:0}.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-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)}.bg-green\!{background-color:color-mix(in oklab,var(--colors-green-DEFAULT)var(--un-bg-opacity),transparent)!important}.bg-red\!{background-color:color-mix(in oklab,var(--colors-red-DEFAULT)var(--un-bg-opacity),transparent)!important}}
|
|
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:2;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:2;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__empty{--un-leading:calc(4px*15);opacity:.4;justify-content:center;align-items:center;width:100%;line-height:60px;display:flex;position:sticky;left:0}@property --un-leading{syntax:"*";inherits:false}.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:2;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:2;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)}}
|