@3mo/data-grid 0.4.14 → 0.4.16

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.
@@ -100,46 +100,46 @@ let DataGridCell = class DataGridCell extends Component {
100
100
  }
101
101
  }
102
102
  static get styles() {
103
- return css `
104
- :host {
105
- position: relative;
106
- padding: 0px var(--mo-data-grid-cell-padding, 3px);
107
- user-select: none;
108
- line-height: var(--mo-data-grid-row-height);
109
- white-space: nowrap;
110
- overflow: hidden !important;
111
- text-overflow: ellipsis;
112
- font-size: var(--mo-data-grid-cell-font-size);
113
- }
114
-
115
- :host(:not([isEditing]):focus) {
116
- outline: 2px solid var(--mo-color-accent);
117
- }
118
-
119
- :host([isEditing]) {
120
- display: grid;
121
- }
122
-
123
- :host([alignment=end]) {
124
- text-align: end;
125
- }
126
-
127
- :host([alignment=start]) {
128
- text-align: start
129
- }
130
-
131
- :host([alignment=center]) {
132
- text-align: center;
133
- }
134
-
135
- :host > :first-child {
136
- line-height: var(--mo-data-grid-row-height);
137
- }
138
-
139
- :host([isEditing]) > :first-child {
140
- align-self: center;
141
- justify-self: stretch;
142
- }
103
+ return css `
104
+ :host {
105
+ position: relative;
106
+ padding: 0px var(--mo-data-grid-cell-padding, 3px);
107
+ user-select: none;
108
+ line-height: var(--mo-data-grid-row-height);
109
+ white-space: nowrap;
110
+ overflow: hidden !important;
111
+ text-overflow: ellipsis;
112
+ font-size: var(--mo-data-grid-cell-font-size);
113
+ }
114
+
115
+ :host(:not([isEditing]):focus) {
116
+ outline: 2px solid var(--mo-color-accent);
117
+ }
118
+
119
+ :host([isEditing]) {
120
+ display: grid;
121
+ }
122
+
123
+ :host([alignment=end]) {
124
+ text-align: end;
125
+ }
126
+
127
+ :host([alignment=start]) {
128
+ text-align: start
129
+ }
130
+
131
+ :host([alignment=center]) {
132
+ text-align: center;
133
+ }
134
+
135
+ :host > :first-child {
136
+ line-height: var(--mo-data-grid-row-height);
137
+ }
138
+
139
+ :host([isEditing]) > :first-child {
140
+ align-self: center;
141
+ justify-self: stretch;
142
+ }
143
143
  `;
144
144
  }
145
145
  get tooltip() { return this.valueTextContent; }
@@ -20,44 +20,44 @@ let DataGridFooter = class DataGridFooter extends Component {
20
20
  this.manualPageSize = false;
21
21
  }
22
22
  static get styles() {
23
- return css `
24
- :host {
25
- grid-column: 1 / last-line;
26
- grid-row: 3;
27
- min-height: var(--mo-data-grid-footer-min-height);
28
- background: var(--mo-data-grid-footer-background);
29
- }
30
-
31
- :host(:not([hideTopBorder])) {
32
- border-top: var(--mo-data-grid-border);
33
- }
34
-
35
- img {
36
- height: 100%;
37
- transition: .25s;
38
- -webkit-filter: grayscale(100%);
39
- filter: grayscale(100%);
40
- }
41
-
42
- img:hover {
43
- -webkit-filter: grayscale(0%);
44
- filter: grayscale(0%);
45
- }
23
+ return css `
24
+ :host {
25
+ grid-column: 1 / last-line;
26
+ grid-row: 3;
27
+ min-height: var(--mo-data-grid-footer-min-height);
28
+ background: var(--mo-data-grid-footer-background);
29
+ }
30
+
31
+ :host(:not([hideTopBorder])) {
32
+ border-top: var(--mo-data-grid-border);
33
+ }
34
+
35
+ img {
36
+ height: 100%;
37
+ transition: .25s;
38
+ -webkit-filter: grayscale(100%);
39
+ filter: grayscale(100%);
40
+ }
41
+
42
+ img:hover {
43
+ -webkit-filter: grayscale(0%);
44
+ filter: grayscale(0%);
45
+ }
46
46
  `;
47
47
  }
48
48
  get template() {
49
49
  this.toggleAttribute('hideTopBorder', this.dataGrid.hasFooter === false);
50
- return this.dataGrid.hasFooter === false ? html.nothing : html `
51
- <mo-flex direction='horizontal' justifyContent='space-between' alignItems='center' wrap='wrap-reverse' gap='6px' ${style({ flex: '1', padding: '0 6px', height: '100%' })}>
52
- <mo-flex direction='horizontal' alignItems='center' gap='1vw' ${style({ flexBasis: 'auto' })}>
53
- ${this.paginationTemplate}
54
- </mo-flex>
55
-
56
- <mo-flex direction='horizontal' alignItems='center' gap='10px' wrap='wrap-reverse' ${style({ paddingInlineEnd: 'var(--mo-data-grid-footer-trailing-padding)' })}>
57
- ${this.dataGrid.sumsTemplate}
58
- <slot name='sum'></slot>
59
- </mo-flex>
60
- </mo-flex>
50
+ return this.dataGrid.hasFooter === false ? html.nothing : html `
51
+ <mo-flex direction='horizontal' justifyContent='space-between' alignItems='center' wrap='wrap-reverse' gap='6px' ${style({ flex: '1', padding: '0 6px', height: '100%' })}>
52
+ <mo-flex direction='horizontal' alignItems='center' gap='1vw' ${style({ flexBasis: 'auto' })}>
53
+ ${this.paginationTemplate}
54
+ </mo-flex>
55
+
56
+ <mo-flex direction='horizontal' alignItems='center' gap='10px' wrap='wrap-reverse' ${style({ paddingInlineEnd: 'var(--mo-data-grid-footer-trailing-padding)' })}>
57
+ ${this.dataGrid.sumsTemplate}
58
+ <slot name='sum'></slot>
59
+ </mo-flex>
60
+ </mo-flex>
61
61
  `;
62
62
  }
63
63
  get paginationTemplate() {
@@ -71,51 +71,51 @@ let DataGridFooter = class DataGridFooter extends Component {
71
71
  `${(Math.min(from, to)).format()}-${to.format()}`,
72
72
  hasUnknownDataLength ? undefined : this.dataGrid.dataLength.format(),
73
73
  ].filter(Boolean).join(' / ');
74
- return !this.dataGrid.hasPagination ? html.nothing : html `
75
- <mo-flex direction='horizontal' gap='4px' alignItems='center' justifyContent='center'>
76
- <mo-icon-button dense icon=${isRtl ? 'last_page' : 'first_page'}
77
- ?disabled=${this.page === 1}
78
- @click=${() => this.setPage(1)}
79
- ></mo-icon-button>
80
-
81
- <mo-icon-button dense icon=${isRtl ? 'keyboard_arrow_right' : 'keyboard_arrow_left'}
82
- ?disabled=${this.page === 1}
83
- @click=${() => this.setPage(this.page - 1)}
84
- ></mo-icon-button>
85
-
86
- <div ${style({ cursor: 'pointer', width: hasUnknownDataLength ? '40px' : '75px', textAlign: 'center' })}>
87
- ${this.manualPagination ? html `
88
- <mo-field-number dense
89
- value=${this.page}
90
- @change=${(e) => this.handleManualPageChange(e.detail)}>
91
- </mo-field-number>
92
- ` : html `
93
- <div ${style({ fontSize: 'small' })} @click=${() => this.manualPagination = hasUnknownDataLength === false}>${pageText}</div>
94
- `}
95
- </div>
96
-
97
- <mo-icon-button dense icon=${isRtl ? 'keyboard_arrow_left' : 'keyboard_arrow_right'}
98
- ?disabled=${!this.dataGrid.hasNextPage}
99
- @click=${() => this.setPage(this.page + 1)}
100
- ></mo-icon-button>
101
-
102
- <mo-icon-button dense icon=${isRtl ? 'first_page' : 'last_page'}
103
- ?disabled=${hasUnknownDataLength || this.page === this.dataGrid.maxPage}
104
- @click=${() => { var _a; return this.setPage((_a = this.dataGrid.maxPage) !== null && _a !== void 0 ? _a : 1); }}
105
- ></mo-icon-button>
106
- </mo-flex>
107
-
108
- <div ${style({ color: 'var(--mo-color-gray)', marginInlineStart: '8px' })}>
109
- ${!this.manualPageSize ? html `
110
- <div ${style({ fontSize: 'small' })} @click=${() => this.manualPageSize = true}>${pageSizeText}</div>
111
- ` : html `
112
- <mo-field-select-data-grid-page-size dense ${style({ width: '90px' })}
113
- .dataGrid=${this.dataGrid}
114
- value=${ifDefined(this.dataGrid.pagination)}
115
- @change=${(e) => this.handlePaginationChange(e.detail)}>
116
- </mo-field-select-data-grid-page-size>
117
- `}
118
- </div>
74
+ return !this.dataGrid.hasPagination ? html.nothing : html `
75
+ <mo-flex direction='horizontal' gap='4px' alignItems='center' justifyContent='center'>
76
+ <mo-icon-button dense icon=${isRtl ? 'last_page' : 'first_page'}
77
+ ?disabled=${this.page === 1}
78
+ @click=${() => this.setPage(1)}
79
+ ></mo-icon-button>
80
+
81
+ <mo-icon-button dense icon=${isRtl ? 'keyboard_arrow_right' : 'keyboard_arrow_left'}
82
+ ?disabled=${this.page === 1}
83
+ @click=${() => this.setPage(this.page - 1)}
84
+ ></mo-icon-button>
85
+
86
+ <div ${style({ cursor: 'pointer', width: hasUnknownDataLength ? '40px' : '75px', textAlign: 'center' })}>
87
+ ${this.manualPagination ? html `
88
+ <mo-field-number dense
89
+ value=${this.page}
90
+ @change=${(e) => this.handleManualPageChange(e.detail)}>
91
+ </mo-field-number>
92
+ ` : html `
93
+ <div ${style({ fontSize: 'small' })} @click=${() => this.manualPagination = hasUnknownDataLength === false}>${pageText}</div>
94
+ `}
95
+ </div>
96
+
97
+ <mo-icon-button dense icon=${isRtl ? 'keyboard_arrow_left' : 'keyboard_arrow_right'}
98
+ ?disabled=${!this.dataGrid.hasNextPage}
99
+ @click=${() => this.setPage(this.page + 1)}
100
+ ></mo-icon-button>
101
+
102
+ <mo-icon-button dense icon=${isRtl ? 'first_page' : 'last_page'}
103
+ ?disabled=${hasUnknownDataLength || this.page === this.dataGrid.maxPage}
104
+ @click=${() => { var _a; return this.setPage((_a = this.dataGrid.maxPage) !== null && _a !== void 0 ? _a : 1); }}
105
+ ></mo-icon-button>
106
+ </mo-flex>
107
+
108
+ <div ${style({ color: 'var(--mo-color-gray)', marginInlineStart: '8px' })}>
109
+ ${!this.manualPageSize ? html `
110
+ <div ${style({ fontSize: 'small' })} @click=${() => this.manualPageSize = true}>${pageSizeText}</div>
111
+ ` : html `
112
+ <mo-field-select-data-grid-page-size dense ${style({ width: '90px' })}
113
+ .dataGrid=${this.dataGrid}
114
+ value=${ifDefined(this.dataGrid.pagination)}
115
+ @change=${(e) => this.handlePaginationChange(e.detail)}>
116
+ </mo-field-select-data-grid-page-size>
117
+ `}
118
+ </div>
119
119
  `;
120
120
  }
121
121
  handlePaginationChange(value) {
@@ -40,45 +40,45 @@ let DataGridHeader = class DataGridHeader extends Component {
40
40
  this.dataGrid.selectionChange.unsubscribe(this.handleDataGridSelectionChange);
41
41
  }
42
42
  static get styles() {
43
- return css `
44
- :host {
45
- --mo-data-grid-header-separator-height: 15px;
46
- --mo-data-grid-header-separator-width: 2px;
47
- display: inherit;
48
- font-size: small;
49
- }
50
-
51
- #header {
52
- border-top: var(--mo-data-grid-border);
53
- border-bottom: var(--mo-data-grid-border);
54
- position: relative;
55
- height: var(--mo-data-grid-header-height);
56
- background: var(--mo-data-grid-header-background);
57
- }
58
-
59
- .headerContent {
60
- padding: 0 var(--mo-data-grid-cell-padding, 3px);
61
- display: inline-block;
62
- overflow: hidden !important;
63
- color: var(--mo-color-foreground);
64
- font-weight: 500;
65
- line-height: var(--mo-data-grid-header-height);
66
- white-space: nowrap;
67
- text-overflow: ellipsis;
68
- }
69
-
70
- .sort-rank {
71
- background: var(--mo-color-transparent-gray-3);
72
- color: var(--mo-color-foreground);
73
- border: 1px solid var(--mo-color-gray-transparent);
74
- border-radius: 50%;
75
- width: 20px;
76
- height: 20px;
77
- aspect-ratio: 1 / 1;
78
- display: flex;
79
- align-items: center;
80
- justify-content: center;
81
- }
43
+ return css `
44
+ :host {
45
+ --mo-data-grid-header-separator-height: 15px;
46
+ --mo-data-grid-header-separator-width: 2px;
47
+ display: inherit;
48
+ font-size: small;
49
+ }
50
+
51
+ #header {
52
+ border-top: var(--mo-data-grid-border);
53
+ border-bottom: var(--mo-data-grid-border);
54
+ position: relative;
55
+ height: var(--mo-data-grid-header-height);
56
+ background: var(--mo-data-grid-header-background);
57
+ }
58
+
59
+ .headerContent {
60
+ padding: 0 var(--mo-data-grid-cell-padding, 3px);
61
+ display: inline-block;
62
+ overflow: hidden !important;
63
+ color: var(--mo-color-foreground);
64
+ font-weight: 500;
65
+ line-height: var(--mo-data-grid-header-height);
66
+ white-space: nowrap;
67
+ text-overflow: ellipsis;
68
+ }
69
+
70
+ .sort-rank {
71
+ background: var(--mo-color-transparent-gray-3);
72
+ color: var(--mo-color-foreground);
73
+ border: 1px solid var(--mo-color-gray-transparent);
74
+ border-radius: 50%;
75
+ width: 20px;
76
+ height: 20px;
77
+ aspect-ratio: 1 / 1;
78
+ display: flex;
79
+ align-items: center;
80
+ justify-content: center;
81
+ }
82
82
  `;
83
83
  }
84
84
  get skeletonColumns() {
@@ -93,75 +93,75 @@ let DataGridHeader = class DataGridHeader extends Component {
93
93
  return this.dataGrid.dataColumnsWidths.join(' var(--mo-data-grid-columns-gap) ');
94
94
  }
95
95
  get template() {
96
- return html `
97
- <mo-grid id='header' columns=${this.skeletonColumns} columnGap='var(--mo-data-grid-columns-gap)'>
98
- ${this.detailsExpanderTemplate}
99
- ${this.selectionTemplate}
100
- ${this.contentTemplate}
101
- ${this.moreTemplate}
102
- </mo-grid>
96
+ return html `
97
+ <mo-grid id='header' columns=${this.skeletonColumns} columnGap='var(--mo-data-grid-columns-gap)'>
98
+ ${this.detailsExpanderTemplate}
99
+ ${this.selectionTemplate}
100
+ ${this.contentTemplate}
101
+ ${this.moreTemplate}
102
+ </mo-grid>
103
103
  `;
104
104
  }
105
105
  get detailsExpanderTemplate() {
106
- return this.dataGrid.hasDetails === false ? html.nothing : html `
107
- <mo-flex justifyContent='center' alignItems='center'>
108
- ${!this.dataGrid.hasDetails || !this.dataGrid.multipleDetails ? html.nothing : html `
109
- <mo-icon-button dense ${style({ padding: '-10px 0px 0 -10px' })}
110
- ${style({ display: 'inherit' })}
111
- icon=${this.dataGrid.allRowDetailsOpen ? 'unfold_less' : 'unfold_more'}
112
- @click=${() => this.toggleAllDetails()}
113
- ></mo-icon-button>
114
- `}
115
- </mo-flex>
106
+ return this.dataGrid.hasDetails === false ? html.nothing : html `
107
+ <mo-flex justifyContent='center' alignItems='center'>
108
+ ${!this.dataGrid.hasDetails || !this.dataGrid.multipleDetails ? html.nothing : html `
109
+ <mo-icon-button dense ${style({ padding: '-10px 0px 0 -10px' })}
110
+ ${style({ display: 'inherit' })}
111
+ icon=${this.dataGrid.allRowDetailsOpen ? 'unfold_less' : 'unfold_more'}
112
+ @click=${() => this.toggleAllDetails()}
113
+ ></mo-icon-button>
114
+ `}
115
+ </mo-flex>
116
116
  `;
117
117
  }
118
118
  get selectionTemplate() {
119
- return this.dataGrid.hasSelection === false || this.dataGrid.selectionCheckboxesHidden ? html.nothing : html `
120
- <mo-flex justifyContent='center' alignItems='center'>
121
- ${this.dataGrid.selectionMode !== DataGridSelectionMode.Multiple ? html.nothing : html `
122
- <mo-checkbox ${style({ position: 'absolute' })} .selected=${this.selection} @change=${this.handleSelectionChange}></mo-checkbox>
123
- `}
124
- </mo-flex>
119
+ return this.dataGrid.hasSelection === false || this.dataGrid.selectionCheckboxesHidden ? html.nothing : html `
120
+ <mo-flex justifyContent='center' alignItems='center'>
121
+ ${this.dataGrid.selectionMode !== DataGridSelectionMode.Multiple ? html.nothing : html `
122
+ <mo-checkbox ${style({ position: 'absolute' })} .selected=${this.selection} @change=${this.handleSelectionChange}></mo-checkbox>
123
+ `}
124
+ </mo-flex>
125
125
  `;
126
126
  }
127
127
  get contentTemplate() {
128
- return html `
129
- <mo-grid columns=${this.separatorAdjustedColumns}>
130
- ${join(this.dataGrid.visibleColumns.map(column => this.getHeaderCellTemplate(column)), index => html `
131
- <mo-data-grid-header-separator
132
- .dataGrid=${this.dataGrid}
133
- .column=${this.dataGrid.visibleColumns[index]}
134
- @columnUpdate=${() => this.dataGrid.requestUpdate()}
135
- ></mo-data-grid-header-separator>
136
- `)}
137
- </mo-grid>
128
+ return html `
129
+ <mo-grid columns=${this.separatorAdjustedColumns}>
130
+ ${join(this.dataGrid.visibleColumns.map(column => this.getHeaderCellTemplate(column)), index => html `
131
+ <mo-data-grid-header-separator
132
+ .dataGrid=${this.dataGrid}
133
+ .column=${this.dataGrid.visibleColumns[index]}
134
+ @columnUpdate=${() => this.dataGrid.requestUpdate()}
135
+ ></mo-data-grid-header-separator>
136
+ `)}
137
+ </mo-grid>
138
138
  `;
139
139
  }
140
140
  getHeaderCellTemplate(column) {
141
141
  const sortingDefinition = this.dataGrid.getSortingDefinition(column);
142
142
  const sortIcon = !sortingDefinition ? undefined : sortingDefinition.strategy === DataGridSortingStrategy.Ascending ? 'arrow_upward' : 'arrow_downward';
143
143
  const sortingRank = !sortingDefinition || this.dataGrid.getSorting().length <= 1 ? undefined : sortingDefinition.rank;
144
- return html `
145
- <mo-flex direction=${column.alignment === 'end' ? 'horizontal-reversed' : 'horizontal'} alignItems='center'
146
- ${style({ overflow: 'hidden', position: 'relative', cursor: 'pointer', userSelect: 'none' })}
147
- @click=${() => this.sort(column)}
148
- >
149
- <div class='headerContent' ${style({ width: '100%', textAlign: column.alignment })} title=${column.title || column.heading}>${column.heading}</div>
150
-
151
- ${sortIcon === undefined ? html.nothing : html `
152
- ${!sortingRank ? html.nothing : html `<span class='sort-rank'>${sortingRank}</span>`}
153
- <mo-icon ${style({ color: 'var(--mo-color-accent)' })} icon=${ifDefined(sortIcon)}></mo-icon>
154
- `}
155
- </mo-flex>
144
+ return html `
145
+ <mo-flex direction=${column.alignment === 'end' ? 'horizontal-reversed' : 'horizontal'} alignItems='center'
146
+ ${style({ overflow: 'hidden', position: 'relative', cursor: 'pointer', userSelect: 'none' })}
147
+ @click=${() => this.sort(column)}
148
+ >
149
+ <div class='headerContent' ${style({ width: '100%', textAlign: column.alignment })} title=${column.title || column.heading}>${column.heading}</div>
150
+
151
+ ${sortIcon === undefined ? html.nothing : html `
152
+ ${!sortingRank ? html.nothing : html `<span class='sort-rank'>${sortingRank}</span>`}
153
+ <mo-icon ${style({ color: 'var(--mo-color-accent)' })} icon=${ifDefined(sortIcon)}></mo-icon>
154
+ `}
155
+ </mo-flex>
156
156
  `;
157
157
  }
158
158
  get moreTemplate() {
159
- return this.dataGrid.hasToolbar || this.dataGrid.sidePanelHidden ? html.nothing : html `
160
- <mo-flex alignItems='center' justifyContent='center' ${style({ marginInlineEnd: '8px', cursor: 'pointer', position: 'relative' })}>
161
- <mo-icon-button dense icon='settings' ${style({ color: 'var(--mo-color-accent)', fontSize: 'large' })}
162
- @click=${() => this.dataGrid.navigateToSidePanelTab(this.dataGrid.sidePanelTab ? undefined : DataGridSidePanelTab.Settings)}
163
- ></mo-icon-button>
164
- </mo-flex>
159
+ return this.dataGrid.hasToolbar || this.dataGrid.sidePanelHidden ? html.nothing : html `
160
+ <mo-flex alignItems='center' justifyContent='center' ${style({ marginInlineEnd: '8px', cursor: 'pointer', position: 'relative' })}>
161
+ <mo-icon-button dense icon='settings' ${style({ color: 'var(--mo-color-accent)', fontSize: 'large' })}
162
+ @click=${() => this.dataGrid.navigateToSidePanelTab(this.dataGrid.sidePanelTab ? undefined : DataGridSidePanelTab.Settings)}
163
+ ></mo-icon-button>
164
+ </mo-flex>
165
165
  `;
166
166
  }
167
167
  sort(column) {
@@ -13,51 +13,51 @@ let DataGridHeaderSeparator = class DataGridHeaderSeparator extends Component {
13
13
  };
14
14
  }
15
15
  static get styles() {
16
- return css `
17
- div.separator {
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- inset-inline-start: calc(var(--mo-data-grid-columns-gap) * -1);
22
- width: var(--mo-data-grid-columns-gap);
23
- height: 100%;
24
- cursor: col-resize;
25
- user-select: none;
26
- }
27
-
28
- .knob {
29
- height: var(--mo-data-grid-header-separator-height);
30
- width: var(--mo-data-grid-header-separator-width);
31
- border-radius: 100px;
32
- background-color: var(--mo-color-gray);
33
- transition: 0.2s;
34
- }
35
-
36
- .separator:hover .knob {
37
- --mo-data-grid-header-separator-height: 30px;
38
- --mo-data-grid-header-separator-width: 8px;
39
- background-color: var(--mo-color-accent);
40
- cursor: col-resize;
41
- }
42
-
43
- .resizerOverlay {
44
- position: fixed;
45
- top: 0;
46
- height: 100%;
47
- background: var(--mo-color-gray);
48
- width: 2px;
49
- }
16
+ return css `
17
+ div.separator {
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ inset-inline-start: calc(var(--mo-data-grid-columns-gap) * -1);
22
+ width: var(--mo-data-grid-columns-gap);
23
+ height: 100%;
24
+ cursor: col-resize;
25
+ user-select: none;
26
+ }
27
+
28
+ .knob {
29
+ height: var(--mo-data-grid-header-separator-height);
30
+ width: var(--mo-data-grid-header-separator-width);
31
+ border-radius: 100px;
32
+ background-color: var(--mo-color-gray);
33
+ transition: 0.2s;
34
+ }
35
+
36
+ .separator:hover .knob {
37
+ --mo-data-grid-header-separator-height: 30px;
38
+ --mo-data-grid-header-separator-width: 8px;
39
+ background-color: var(--mo-color-accent);
40
+ cursor: col-resize;
41
+ }
42
+
43
+ .resizerOverlay {
44
+ position: fixed;
45
+ top: 0;
46
+ height: 100%;
47
+ background: var(--mo-color-gray);
48
+ width: 2px;
49
+ }
50
50
  `;
51
51
  }
52
52
  get template() {
53
- return html `
54
- <div class='separator' @mousedown=${this.handleMouseDown}>
55
- <div class='knob'></div>
56
- </div>
57
-
58
- ${this.isResizing === false ? html.nothing : html `
59
- <div class='resizerOverlay' ${style({ marginInlineStart: `${this.delta}px` })}></div>
60
- `}
53
+ return html `
54
+ <div class='separator' @mousedown=${this.handleMouseDown}>
55
+ <div class='knob'></div>
56
+ </div>
57
+
58
+ ${this.isResizing === false ? html.nothing : html `
59
+ <div class='resizerOverlay' ${style({ marginInlineStart: `${this.delta}px` })}></div>
60
+ `}
61
61
  `;
62
62
  }
63
63
  handleMouseUp() {
@@ -3,11 +3,11 @@ import { component, css } from '@a11d/lit';
3
3
  import { ContextMenuItem } from '@3mo/context-menu';
4
4
  let DataGridPrimaryContextMenuItem = class DataGridPrimaryContextMenuItem extends ContextMenuItem {
5
5
  static get styles() {
6
- return css `
7
- ${super.styles}
8
- :host {
9
- font-weight: bold;
10
- }
6
+ return css `
7
+ ${super.styles}
8
+ :host {
9
+ font-weight: bold;
10
+ }
11
11
  `;
12
12
  }
13
13
  };