@onereach/ui-components-vue2 26.3.2 → 26.3.3-beta.5868.0
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.
|
@@ -188,9 +188,17 @@ const __vue_component__$u = /*#__PURE__*/normalizeComponent({
|
|
|
188
188
|
}, __vue_inject_styles__$f, __vue_script__$f, __vue_scope_id__$f, __vue_is_functional_template__$f, __vue_module_identifier__$f, false, undefined, undefined, undefined);
|
|
189
189
|
var __vue_component__$v = __vue_component__$u;
|
|
190
190
|
|
|
191
|
+
var DataGridVariant;
|
|
192
|
+
(function (DataGridVariant) {
|
|
193
|
+
DataGridVariant["Standard"] = "standard";
|
|
194
|
+
DataGridVariant["Comfortable"] = "comfortable";
|
|
195
|
+
DataGridVariant["Compact"] = "compact";
|
|
196
|
+
DataGridVariant["Dynamic"] = "dynamic";
|
|
197
|
+
})(DataGridVariant || (DataGridVariant = {}));
|
|
198
|
+
|
|
191
199
|
const DataGridTableContentCell = [
|
|
192
200
|
// Layout
|
|
193
|
-
'layout-row',
|
|
201
|
+
'layout-row items-center',
|
|
194
202
|
// Spacing
|
|
195
203
|
'px-sm+', 'py-0', 'gap-xs',
|
|
196
204
|
// Theme
|
|
@@ -226,6 +234,7 @@ var script$e = defineComponent({
|
|
|
226
234
|
},
|
|
227
235
|
props: {
|
|
228
236
|
modelValue: {
|
|
237
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
229
238
|
type: undefined,
|
|
230
239
|
default: undefined
|
|
231
240
|
},
|
|
@@ -237,6 +246,10 @@ var script$e = defineComponent({
|
|
|
237
246
|
type: Object,
|
|
238
247
|
default: undefined
|
|
239
248
|
},
|
|
249
|
+
variant: {
|
|
250
|
+
type: String,
|
|
251
|
+
default: DataGridVariant.Standard
|
|
252
|
+
},
|
|
240
253
|
override: {
|
|
241
254
|
type: Boolean,
|
|
242
255
|
default: false
|
|
@@ -249,7 +262,7 @@ var script$e = defineComponent({
|
|
|
249
262
|
const root = ref();
|
|
250
263
|
const rootStyles = computed(() => {
|
|
251
264
|
var _a;
|
|
252
|
-
return ['or-data-grid-table-content-cell-v3', ...DataGridTableContentCell, ...(((_a = props.column) === null || _a === void 0 ? void 0 : _a.stickiness) ? [`sticky-${props.column.stickiness}`] : [])];
|
|
265
|
+
return ['or-data-grid-table-content-cell-v3', ...DataGridTableContentCell, ...(((_a = props.column) === null || _a === void 0 ? void 0 : _a.stickiness) ? [`sticky-${props.column.stickiness}`] : []), ...(props.variant === DataGridVariant.Dynamic ? ['!py-xs'] : [])];
|
|
253
266
|
});
|
|
254
267
|
const rootInlineStyles = computed(() => {
|
|
255
268
|
if (props.column) {
|
|
@@ -279,7 +292,10 @@ var script$e = defineComponent({
|
|
|
279
292
|
justifyContent: 'center'
|
|
280
293
|
};
|
|
281
294
|
});
|
|
282
|
-
const contentStyles = computed(() =>
|
|
295
|
+
const contentStyles = computed(() => {
|
|
296
|
+
var _a, _b, _c, _d, _e;
|
|
297
|
+
return [...DataGridTableContentCellContent, ...(((_b = (_a = props.column) === null || _a === void 0 ? void 0 : _a.control) === null || _b === void 0 ? void 0 : _b.type) !== 'text' && ((_d = (_c = props.column) === null || _c === void 0 ? void 0 : _c.control) === null || _d === void 0 ? void 0 : _d.type) !== 'number' ? [] : ['grow']), ...(props.variant === DataGridVariant.Dynamic && !((_e = props.column) === null || _e === void 0 ? void 0 : _e.control) ? ['whitespace-pre-wrap break-words'] : ['truncate'])];
|
|
298
|
+
});
|
|
283
299
|
// State
|
|
284
300
|
const model = computed({
|
|
285
301
|
get: () => props.modelValue,
|
|
@@ -448,13 +464,6 @@ const __vue_component__$s = /*#__PURE__*/normalizeComponent({
|
|
|
448
464
|
}, __vue_inject_styles__$e, __vue_script__$e, __vue_scope_id__$e, __vue_is_functional_template__$e, __vue_module_identifier__$e, false, undefined, undefined, undefined);
|
|
449
465
|
var __vue_component__$t = __vue_component__$s;
|
|
450
466
|
|
|
451
|
-
var DataGridVariant;
|
|
452
|
-
(function (DataGridVariant) {
|
|
453
|
-
DataGridVariant["Standard"] = "standard";
|
|
454
|
-
DataGridVariant["Comfortable"] = "comfortable";
|
|
455
|
-
DataGridVariant["Compact"] = "compact";
|
|
456
|
-
})(DataGridVariant || (DataGridVariant = {}));
|
|
457
|
-
|
|
458
467
|
const DataGridTableContentRow = [
|
|
459
468
|
// Layout
|
|
460
469
|
'grid grid-cols-[subgrid] col-span-full',
|
|
@@ -479,7 +488,10 @@ const DataGridTableContentRowVariants = {
|
|
|
479
488
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
480
489
|
[DataGridVariant.Compact]: [
|
|
481
490
|
// Box
|
|
482
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
491
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
492
|
+
[DataGridVariant.Dynamic]: [
|
|
493
|
+
// Box
|
|
494
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
483
495
|
};
|
|
484
496
|
|
|
485
497
|
var script$d = defineComponent({
|
|
@@ -676,7 +688,10 @@ const DataGridTableFooterRowVariants = {
|
|
|
676
688
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
677
689
|
[DataGridVariant.Compact]: [
|
|
678
690
|
// Box
|
|
679
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
691
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
692
|
+
[DataGridVariant.Dynamic]: [
|
|
693
|
+
// Box
|
|
694
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
680
695
|
};
|
|
681
696
|
|
|
682
697
|
var script$a = defineComponent({
|
|
@@ -989,7 +1004,10 @@ const DataGridTableHeaderRowVariants = {
|
|
|
989
1004
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
990
1005
|
[DataGridVariant.Compact]: [
|
|
991
1006
|
// Box
|
|
992
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1007
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1008
|
+
[DataGridVariant.Dynamic]: [
|
|
1009
|
+
// Box
|
|
1010
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
993
1011
|
};
|
|
994
1012
|
|
|
995
1013
|
var script$7 = defineComponent({
|
|
@@ -1118,7 +1136,10 @@ const DataGridTablePlaceholderVariants = {
|
|
|
1118
1136
|
'min-h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
1119
1137
|
[DataGridVariant.Compact]: [
|
|
1120
1138
|
// Box
|
|
1121
|
-
'min-h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1139
|
+
'min-h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1140
|
+
[DataGridVariant.Dynamic]: [
|
|
1141
|
+
// Box
|
|
1142
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
1122
1143
|
};
|
|
1123
1144
|
|
|
1124
1145
|
var script$5 = defineComponent({
|
|
@@ -1330,7 +1351,10 @@ const DataGridNotificationPositionVariants = {
|
|
|
1330
1351
|
'top-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
1331
1352
|
[DataGridVariant.Compact]: [
|
|
1332
1353
|
// Position
|
|
1333
|
-
'top-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1354
|
+
'top-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1355
|
+
[DataGridVariant.Dynamic]: [
|
|
1356
|
+
// Position
|
|
1357
|
+
'top-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
1334
1358
|
};
|
|
1335
1359
|
|
|
1336
1360
|
var script$2 = defineComponent({
|
|
@@ -1415,7 +1439,10 @@ const DataGridTableExtraRowVariants = {
|
|
|
1415
1439
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
1416
1440
|
[DataGridVariant.Compact]: [
|
|
1417
1441
|
// Box
|
|
1418
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1442
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1443
|
+
[DataGridVariant.Dynamic]: [
|
|
1444
|
+
// Box
|
|
1445
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
1419
1446
|
};
|
|
1420
1447
|
|
|
1421
1448
|
var script$1 = defineComponent({
|
|
@@ -1893,6 +1920,7 @@ var __vue_render__ = function () {
|
|
|
1893
1920
|
"column": {
|
|
1894
1921
|
stickiness: 'start'
|
|
1895
1922
|
},
|
|
1923
|
+
"variant": _vm.variant,
|
|
1896
1924
|
"override": true
|
|
1897
1925
|
}
|
|
1898
1926
|
}, [_c('OrSkeletonText')], 1)] : _vm._e(), _vm._v(" "), _vm._l(_vm.columns, function (column) {
|
|
@@ -1901,6 +1929,7 @@ var __vue_render__ = function () {
|
|
|
1901
1929
|
attrs: {
|
|
1902
1930
|
"column": column,
|
|
1903
1931
|
"features": _vm.features,
|
|
1932
|
+
"variant": _vm.variant,
|
|
1904
1933
|
"override": true
|
|
1905
1934
|
}
|
|
1906
1935
|
}, [_vm._t("column-loading", function () {
|
|
@@ -1934,6 +1963,8 @@ var __vue_render__ = function () {
|
|
|
1934
1963
|
"column": {
|
|
1935
1964
|
stickiness: 'start'
|
|
1936
1965
|
},
|
|
1966
|
+
"variant": _vm.variant,
|
|
1967
|
+
"override": true,
|
|
1937
1968
|
"force-state": 'none'
|
|
1938
1969
|
},
|
|
1939
1970
|
on: {
|
|
@@ -1962,7 +1993,8 @@ var __vue_render__ = function () {
|
|
|
1962
1993
|
attrs: {
|
|
1963
1994
|
"model-value": item[column.name],
|
|
1964
1995
|
"column": column,
|
|
1965
|
-
"features": _vm.features
|
|
1996
|
+
"features": _vm.features,
|
|
1997
|
+
"variant": _vm.variant
|
|
1966
1998
|
},
|
|
1967
1999
|
on: {
|
|
1968
2000
|
"input": function ($event) {
|
|
@@ -27,7 +27,8 @@ export type DataGridColumn = {
|
|
|
27
27
|
export declare enum DataGridVariant {
|
|
28
28
|
Standard = "standard",
|
|
29
29
|
Comfortable = "comfortable",
|
|
30
|
-
Compact = "compact"
|
|
30
|
+
Compact = "compact",
|
|
31
|
+
Dynamic = "dynamic"
|
|
31
32
|
}
|
|
32
33
|
export type DataGridFeatures = {
|
|
33
34
|
selecting?: boolean | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onereach/ui-components-vue2",
|
|
3
|
-
"version": "26.3.
|
|
3
|
+
"version": "26.3.3-beta.5868.0",
|
|
4
4
|
"description": "Vue components library for v2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"@codemirror/view": "^6",
|
|
41
41
|
"@floating-ui/dom": "1.5.3",
|
|
42
42
|
"@lezer/highlight": "*",
|
|
43
|
-
"@onereach/styles": "^26.3.
|
|
44
|
-
"@onereach/ui-components-common": "^26.3.
|
|
43
|
+
"@onereach/styles": "^26.3.3-beta.5868.0",
|
|
44
|
+
"@onereach/ui-components-common": "^26.3.3-beta.5868.0",
|
|
45
45
|
"@splidejs/splide": "4.0.6",
|
|
46
46
|
"@tiptap/core": "2.27.1",
|
|
47
47
|
"@tiptap/extension-blockquote": "2.27.1",
|
|
@@ -102,6 +102,5 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"npmUnpacked": "4.15.2"
|
|
106
|
-
"gitHead": "ddb4823a66c209dadbc4e185392cafc4ab9bbe6a"
|
|
105
|
+
"npmUnpacked": "4.15.2"
|
|
107
106
|
}
|