@onereach/ui-components-vue2 26.3.2 → 26.3.3-beta.5867.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,9 +246,9 @@ var script$e = defineComponent({
|
|
|
237
246
|
type: Object,
|
|
238
247
|
default: undefined
|
|
239
248
|
},
|
|
240
|
-
|
|
241
|
-
type:
|
|
242
|
-
default:
|
|
249
|
+
variant: {
|
|
250
|
+
type: String,
|
|
251
|
+
default: DataGridVariant.Standard
|
|
243
252
|
}
|
|
244
253
|
},
|
|
245
254
|
emits: ['input'],
|
|
@@ -249,7 +258,7 @@ var script$e = defineComponent({
|
|
|
249
258
|
const root = ref();
|
|
250
259
|
const rootStyles = computed(() => {
|
|
251
260
|
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}`] : [])];
|
|
261
|
+
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
262
|
});
|
|
254
263
|
const rootInlineStyles = computed(() => {
|
|
255
264
|
if (props.column) {
|
|
@@ -279,7 +288,10 @@ var script$e = defineComponent({
|
|
|
279
288
|
justifyContent: 'center'
|
|
280
289
|
};
|
|
281
290
|
});
|
|
282
|
-
const contentStyles = computed(() =>
|
|
291
|
+
const contentStyles = computed(() => {
|
|
292
|
+
var _a, _b, _c, _d, _e;
|
|
293
|
+
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'])];
|
|
294
|
+
});
|
|
283
295
|
// State
|
|
284
296
|
const model = computed({
|
|
285
297
|
get: () => props.modelValue,
|
|
@@ -448,13 +460,6 @@ const __vue_component__$s = /*#__PURE__*/normalizeComponent({
|
|
|
448
460
|
}, __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
461
|
var __vue_component__$t = __vue_component__$s;
|
|
450
462
|
|
|
451
|
-
var DataGridVariant;
|
|
452
|
-
(function (DataGridVariant) {
|
|
453
|
-
DataGridVariant["Standard"] = "standard";
|
|
454
|
-
DataGridVariant["Comfortable"] = "comfortable";
|
|
455
|
-
DataGridVariant["Compact"] = "compact";
|
|
456
|
-
})(DataGridVariant || (DataGridVariant = {}));
|
|
457
|
-
|
|
458
463
|
const DataGridTableContentRow = [
|
|
459
464
|
// Layout
|
|
460
465
|
'grid grid-cols-[subgrid] col-span-full',
|
|
@@ -479,7 +484,10 @@ const DataGridTableContentRowVariants = {
|
|
|
479
484
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
480
485
|
[DataGridVariant.Compact]: [
|
|
481
486
|
// Box
|
|
482
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
487
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
488
|
+
[DataGridVariant.Dynamic]: [
|
|
489
|
+
// Box
|
|
490
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
483
491
|
};
|
|
484
492
|
|
|
485
493
|
var script$d = defineComponent({
|
|
@@ -676,7 +684,10 @@ const DataGridTableFooterRowVariants = {
|
|
|
676
684
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
677
685
|
[DataGridVariant.Compact]: [
|
|
678
686
|
// Box
|
|
679
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
687
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
688
|
+
[DataGridVariant.Dynamic]: [
|
|
689
|
+
// Box
|
|
690
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
680
691
|
};
|
|
681
692
|
|
|
682
693
|
var script$a = defineComponent({
|
|
@@ -989,7 +1000,10 @@ const DataGridTableHeaderRowVariants = {
|
|
|
989
1000
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
990
1001
|
[DataGridVariant.Compact]: [
|
|
991
1002
|
// Box
|
|
992
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1003
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1004
|
+
[DataGridVariant.Dynamic]: [
|
|
1005
|
+
// Box
|
|
1006
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
993
1007
|
};
|
|
994
1008
|
|
|
995
1009
|
var script$7 = defineComponent({
|
|
@@ -1118,7 +1132,10 @@ const DataGridTablePlaceholderVariants = {
|
|
|
1118
1132
|
'min-h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
1119
1133
|
[DataGridVariant.Compact]: [
|
|
1120
1134
|
// Box
|
|
1121
|
-
'min-h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1135
|
+
'min-h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1136
|
+
[DataGridVariant.Dynamic]: [
|
|
1137
|
+
// Box
|
|
1138
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
1122
1139
|
};
|
|
1123
1140
|
|
|
1124
1141
|
var script$5 = defineComponent({
|
|
@@ -1330,7 +1347,10 @@ const DataGridNotificationPositionVariants = {
|
|
|
1330
1347
|
'top-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
1331
1348
|
[DataGridVariant.Compact]: [
|
|
1332
1349
|
// Position
|
|
1333
|
-
'top-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1350
|
+
'top-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1351
|
+
[DataGridVariant.Dynamic]: [
|
|
1352
|
+
// Position
|
|
1353
|
+
'top-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
1334
1354
|
};
|
|
1335
1355
|
|
|
1336
1356
|
var script$2 = defineComponent({
|
|
@@ -1415,7 +1435,10 @@ const DataGridTableExtraRowVariants = {
|
|
|
1415
1435
|
'h-[calc(theme(spacing.3xl)+theme(spacing.xs))]'],
|
|
1416
1436
|
[DataGridVariant.Compact]: [
|
|
1417
1437
|
// Box
|
|
1418
|
-
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]']
|
|
1438
|
+
'h-[calc(theme(spacing.xl)+theme(spacing.xs))]'],
|
|
1439
|
+
[DataGridVariant.Dynamic]: [
|
|
1440
|
+
// Box
|
|
1441
|
+
'min-h-[calc(theme(spacing.2xl)+theme(spacing.xs))]']
|
|
1419
1442
|
};
|
|
1420
1443
|
|
|
1421
1444
|
var script$1 = defineComponent({
|
|
@@ -1893,6 +1916,7 @@ var __vue_render__ = function () {
|
|
|
1893
1916
|
"column": {
|
|
1894
1917
|
stickiness: 'start'
|
|
1895
1918
|
},
|
|
1919
|
+
"variant": _vm.variant,
|
|
1896
1920
|
"override": true
|
|
1897
1921
|
}
|
|
1898
1922
|
}, [_c('OrSkeletonText')], 1)] : _vm._e(), _vm._v(" "), _vm._l(_vm.columns, function (column) {
|
|
@@ -1901,6 +1925,7 @@ var __vue_render__ = function () {
|
|
|
1901
1925
|
attrs: {
|
|
1902
1926
|
"column": column,
|
|
1903
1927
|
"features": _vm.features,
|
|
1928
|
+
"variant": _vm.variant,
|
|
1904
1929
|
"override": true
|
|
1905
1930
|
}
|
|
1906
1931
|
}, [_vm._t("column-loading", function () {
|
|
@@ -1934,6 +1959,7 @@ var __vue_render__ = function () {
|
|
|
1934
1959
|
"column": {
|
|
1935
1960
|
stickiness: 'start'
|
|
1936
1961
|
},
|
|
1962
|
+
"variant": _vm.variant,
|
|
1937
1963
|
"force-state": 'none'
|
|
1938
1964
|
},
|
|
1939
1965
|
on: {
|
|
@@ -1962,7 +1988,8 @@ var __vue_render__ = function () {
|
|
|
1962
1988
|
attrs: {
|
|
1963
1989
|
"model-value": item[column.name],
|
|
1964
1990
|
"column": column,
|
|
1965
|
-
"features": _vm.features
|
|
1991
|
+
"features": _vm.features,
|
|
1992
|
+
"variant": _vm.variant
|
|
1966
1993
|
},
|
|
1967
1994
|
on: {
|
|
1968
1995
|
"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.5867.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.5867.0",
|
|
44
|
+
"@onereach/ui-components-common": "^26.3.3-beta.5867.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
|
}
|