@one-grid-core/angular 0.1.0-beta.5

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.
Files changed (125) hide show
  1. package/README.md +168 -0
  2. package/esm2022/lib/components/one-grid/one-grid.component.mjs +388 -0
  3. package/esm2022/lib/components/one-grid-body/one-grid-body.component.mjs +570 -0
  4. package/esm2022/lib/components/one-grid-cell-currency/one-grid-cell-currency.component.mjs +90 -0
  5. package/esm2022/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.mjs +31 -0
  6. package/esm2022/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.mjs +67 -0
  7. package/esm2022/lib/components/one-grid-checkbox/one-grid-checkbox.component.mjs +47 -0
  8. package/esm2022/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.mjs +62 -0
  9. package/esm2022/lib/components/one-grid-header/one-grid-header.component.mjs +140 -0
  10. package/esm2022/lib/components/one-grid-pagination/one-grid-pagination.component.mjs +76 -0
  11. package/esm2022/lib/components/one-grid-row-action/one-grid-row-action.component.mjs +193 -0
  12. package/esm2022/lib/components/one-grid-status/one-grid-status.component.mjs +35 -0
  13. package/esm2022/lib/core/directives/one-cell-input-validator.directive.mjs +71 -0
  14. package/esm2022/lib/core/directives/one-cell-renderer-component.directive.mjs +77 -0
  15. package/esm2022/lib/core/directives/one-cell-text-expand.directive.mjs +82 -0
  16. package/esm2022/lib/core/instants/one-grid-api.class.mjs +591 -0
  17. package/esm2022/lib/core/instants/one-row-node.class.mjs +90 -0
  18. package/esm2022/lib/core/models/constants/one-pagination.constant.mjs +2 -0
  19. package/esm2022/lib/core/models/one-column-def-types.model.mjs +2 -0
  20. package/esm2022/lib/core/models/one-event-types.model.mjs +2 -0
  21. package/esm2022/lib/core/models/one-filter.model.mjs +2 -0
  22. package/esm2022/lib/core/models/one-grid-types.model.mjs +2 -0
  23. package/esm2022/lib/core/models/one-master-detail.model.mjs +2 -0
  24. package/esm2022/lib/core/models/one-pagination-types.model.mjs +2 -0
  25. package/esm2022/lib/core/models/one-row.model.mjs +13 -0
  26. package/esm2022/lib/core/models/one-tree-data.model.mjs +2 -0
  27. package/esm2022/lib/core/models/one-validation.model.mjs +2 -0
  28. package/esm2022/lib/core/pipes/cell-action-button-enable.pipe.mjs +21 -0
  29. package/esm2022/lib/core/pipes/cell-action-button-visible.pipe.mjs +17 -0
  30. package/esm2022/lib/core/pipes/cell-disable-resolver.pipe.mjs +26 -0
  31. package/esm2022/lib/core/pipes/cell-editable.pipe.mjs +30 -0
  32. package/esm2022/lib/core/pipes/cell-field-value-empty.pipe.mjs +21 -0
  33. package/esm2022/lib/core/pipes/cell-field-value.pipe.mjs +25 -0
  34. package/esm2022/lib/core/pipes/cell-field.pipe.mjs +20 -0
  35. package/esm2022/lib/core/pipes/cell-invalid.pipe.mjs +21 -0
  36. package/esm2022/lib/core/pipes/cell-key.pipe.mjs +21 -0
  37. package/esm2022/lib/core/pipes/cell-level-padding.pipe.mjs +18 -0
  38. package/esm2022/lib/core/pipes/cell-number-value.pipe.mjs +19 -0
  39. package/esm2022/lib/core/pipes/cell-selected.pipe.mjs +20 -0
  40. package/esm2022/lib/core/pipes/cell-state-group-renderer.pipe.mjs +21 -0
  41. package/esm2022/lib/core/pipes/cell-state-renderer.pipe.mjs +24 -0
  42. package/esm2022/lib/core/pipes/cell-value-getter.pipe.mjs +23 -0
  43. package/esm2022/lib/core/pipes/column-sort-state.pipe.mjs +19 -0
  44. package/esm2022/lib/core/pipes/header-checkbox-checked.pipe.mjs +17 -0
  45. package/esm2022/lib/core/pipes/header-checkbox-disabled.pipe.mjs +17 -0
  46. package/esm2022/lib/core/pipes/header-checkbox-indeterminate.pipe.mjs +17 -0
  47. package/esm2022/lib/core/services/og-column.service.mjs +81 -0
  48. package/esm2022/lib/core/services/one-grid-cell.service.mjs +88 -0
  49. package/esm2022/lib/core/services/one-grid-event.service.mjs +42 -0
  50. package/esm2022/lib/core/services/one-grid-expansion.service.mjs +40 -0
  51. package/esm2022/lib/core/services/one-grid-row.service.mjs +29 -0
  52. package/esm2022/lib/core/services/one-grid-selection.service.mjs +54 -0
  53. package/esm2022/lib/core/services/one-grid-tree-data.service.mjs +59 -0
  54. package/esm2022/lib/helpers/one-cell.helper.mjs +42 -0
  55. package/esm2022/lib/helpers/one-column-def.helper.mjs +28 -0
  56. package/esm2022/lib/helpers/one-filter.helper.mjs +52 -0
  57. package/esm2022/lib/helpers/one-validation.helper.mjs +95 -0
  58. package/esm2022/lib/index.mjs +19 -0
  59. package/esm2022/lib/one-grid.module.mjs +142 -0
  60. package/esm2022/one-grid-core-angular.mjs +5 -0
  61. package/esm2022/public-api.mjs +5 -0
  62. package/fesm2022/one-grid-core-angular.mjs +3573 -0
  63. package/fesm2022/one-grid-core-angular.mjs.map +1 -0
  64. package/index.d.ts +5 -0
  65. package/lib/components/one-grid/one-grid.component.d.ts +139 -0
  66. package/lib/components/one-grid-body/one-grid-body.component.d.ts +176 -0
  67. package/lib/components/one-grid-cell-currency/one-grid-cell-currency.component.d.ts +27 -0
  68. package/lib/components/one-grid-cell-group-renderer/one-grid-cell-group-renderer.component.d.ts +16 -0
  69. package/lib/components/one-grid-cell-option-menu/one-grid-cell-option-menu.component.d.ts +21 -0
  70. package/lib/components/one-grid-checkbox/one-grid-checkbox.component.d.ts +19 -0
  71. package/lib/components/one-grid-checkbox-header/one-grid-checkbox-header.component.d.ts +24 -0
  72. package/lib/components/one-grid-header/one-grid-header.component.d.ts +41 -0
  73. package/lib/components/one-grid-pagination/one-grid-pagination.component.d.ts +21 -0
  74. package/lib/components/one-grid-row-action/one-grid-row-action.component.d.ts +59 -0
  75. package/lib/components/one-grid-status/one-grid-status.component.d.ts +15 -0
  76. package/lib/core/directives/one-cell-input-validator.directive.d.ts +15 -0
  77. package/lib/core/directives/one-cell-renderer-component.directive.d.ts +20 -0
  78. package/lib/core/directives/one-cell-text-expand.directive.d.ts +21 -0
  79. package/lib/core/instants/one-grid-api.class.d.ts +161 -0
  80. package/lib/core/instants/one-row-node.class.d.ts +49 -0
  81. package/lib/core/models/constants/one-pagination.constant.d.ts +1 -0
  82. package/lib/core/models/one-column-def-types.model.d.ts +139 -0
  83. package/lib/core/models/one-event-types.model.d.ts +78 -0
  84. package/lib/core/models/one-filter.model.d.ts +15 -0
  85. package/lib/core/models/one-grid-types.model.d.ts +48 -0
  86. package/lib/core/models/one-master-detail.model.d.ts +18 -0
  87. package/lib/core/models/one-pagination-types.model.d.ts +9 -0
  88. package/lib/core/models/one-row.model.d.ts +38 -0
  89. package/lib/core/models/one-tree-data.model.d.ts +9 -0
  90. package/lib/core/models/one-validation.model.d.ts +9 -0
  91. package/lib/core/pipes/cell-action-button-enable.pipe.d.ts +8 -0
  92. package/lib/core/pipes/cell-action-button-visible.pipe.d.ts +9 -0
  93. package/lib/core/pipes/cell-disable-resolver.pipe.d.ts +9 -0
  94. package/lib/core/pipes/cell-editable.pipe.d.ts +9 -0
  95. package/lib/core/pipes/cell-field-value-empty.pipe.d.ts +7 -0
  96. package/lib/core/pipes/cell-field-value.pipe.d.ts +7 -0
  97. package/lib/core/pipes/cell-field.pipe.d.ts +7 -0
  98. package/lib/core/pipes/cell-invalid.pipe.d.ts +9 -0
  99. package/lib/core/pipes/cell-key.pipe.d.ts +7 -0
  100. package/lib/core/pipes/cell-level-padding.pipe.d.ts +7 -0
  101. package/lib/core/pipes/cell-number-value.pipe.d.ts +7 -0
  102. package/lib/core/pipes/cell-selected.pipe.d.ts +7 -0
  103. package/lib/core/pipes/cell-state-group-renderer.pipe.d.ts +9 -0
  104. package/lib/core/pipes/cell-state-renderer.pipe.d.ts +8 -0
  105. package/lib/core/pipes/cell-value-getter.pipe.d.ts +9 -0
  106. package/lib/core/pipes/column-sort-state.pipe.d.ts +8 -0
  107. package/lib/core/pipes/header-checkbox-checked.pipe.d.ts +9 -0
  108. package/lib/core/pipes/header-checkbox-disabled.pipe.d.ts +9 -0
  109. package/lib/core/pipes/header-checkbox-indeterminate.pipe.d.ts +9 -0
  110. package/lib/core/services/og-column.service.d.ts +22 -0
  111. package/lib/core/services/one-grid-cell.service.d.ts +29 -0
  112. package/lib/core/services/one-grid-event.service.d.ts +17 -0
  113. package/lib/core/services/one-grid-expansion.service.d.ts +13 -0
  114. package/lib/core/services/one-grid-row.service.d.ts +15 -0
  115. package/lib/core/services/one-grid-selection.service.d.ts +17 -0
  116. package/lib/core/services/one-grid-tree-data.service.d.ts +10 -0
  117. package/lib/helpers/one-cell.helper.d.ts +26 -0
  118. package/lib/helpers/one-column-def.helper.d.ts +17 -0
  119. package/lib/helpers/one-filter.helper.d.ts +20 -0
  120. package/lib/helpers/one-validation.helper.d.ts +21 -0
  121. package/lib/index.d.ts +18 -0
  122. package/lib/one-grid.module.d.ts +45 -0
  123. package/package.json +48 -0
  124. package/public-api.d.ts +1 -0
  125. package/scss/_one-grid.scss +999 -0
@@ -0,0 +1,999 @@
1
+ // ============================================================================
2
+ // OneGrid Theme
3
+ // ============================================================================
4
+ // Three customization layers (highest priority first):
5
+ //
6
+ // 1. Runtime CSS custom properties — set `--one-grid-<token>` on :root, a
7
+ // theme class, or a single grid element. Inherits like any CSS variable,
8
+ // so you can theme globally, per page, or per grid instance:
9
+ //
10
+ // :root { --one-grid-cell-height: 36px; }
11
+ // .dark { --one-grid-body-bg: #1e1e1e; }
12
+ // one-grid.compact { --one-grid-cell-height: 24px; }
13
+ //
14
+ // 2. Compile-time Sass configuration — every `$var` below is `!default`:
15
+ //
16
+ // @use "one-grid/scss/one-grid" with ($cell-height: 36px);
17
+ //
18
+ // 3. Design-system integration — defaults read Bootstrap CSS variables
19
+ // (`--bs-*`) when they exist and fall back to neutral built-in values,
20
+ // so the grid renders correctly with or without Bootstrap.
21
+ // ============================================================================
22
+
23
+ // Prefix of the host design system's CSS variables (Bootstrap's by default).
24
+ $prefix: 'bs-' !default;
25
+
26
+ // Prefix of the grid's own public CSS custom properties.
27
+ $og-prefix: 'one-grid-' !default;
28
+
29
+ // Header
30
+ $header-bg: var(--#{$prefix}tertiary-bg, #f8f9fa) !default;
31
+ $header-cell-seperator-width: 1px !default;
32
+ $header-cell-seperator-height: 100% !default;
33
+ $header-cell-height: 34px !default;
34
+ $header-cell-padding: 0px 8px !default;
35
+
36
+ // Body
37
+ $body-bg: var(--#{$prefix}card-bg, #fff) !default;
38
+ $border-color: var(--#{$prefix}border-color, #dee2e6) !default;
39
+ $primary-rgb: var(--#{$prefix}primary-rgb, 13, 110, 253) !default;
40
+ $success-rgb: var(--#{$prefix}success-rgb, 25, 135, 84) !default;
41
+ $danger-rgb: var(--#{$prefix}danger-rgb, 220, 53, 69) !default;
42
+ $info-rgb: var(--#{$prefix}info-rgb, 13, 202, 240) !default;
43
+ $hover-color: rgba($primary-rgb, 0.08) !default;
44
+ $selected-color: rgba($primary-rgb, 0.08) !default;
45
+ $text-color: var(--#{$prefix}body-color, #212529) !default;
46
+ $font-size: 12px !default;
47
+
48
+ // Row
49
+ $row-odd-bg: var(--#{$prefix}card-bg, #fff) !default;
50
+ $row-even-bg: var(--#{$prefix}body-bg, #f8f9fa) !default;
51
+ $row-action-btn-width-height: 20px !default;
52
+ $row-action-btn-border-radius: 4px !default;
53
+
54
+ // Cell
55
+ $cell-height: 30px !default;
56
+ $cell-line-height: 1.2 !default;
57
+ $cell-item-space: 8px !default;
58
+ $cell-padding: 0px 10px !default;
59
+ $cell-selected-color: rgba($primary-rgb, 0.16) !default;
60
+ $cell-selected-flush-color: rgba($primary-rgb, 0.60) !default;
61
+ $input-bg: var(--#{$prefix}input-bg, #fff) !default;
62
+
63
+ // Pagination
64
+ $pagination-bg: var(--#{$prefix}card-bg, #fff) !default;
65
+ $pagination-btn-color: var(--#{$prefix}body-color, #212529) !default;
66
+ $pagination-height: 40px !default;
67
+
68
+ // Colors
69
+ $og-success: var(--#{$prefix}success, #198754) !default;
70
+ $og-primary: var(--#{$prefix}primary, #0d6efd) !default;
71
+ $og-warning: var(--#{$prefix}warning, #ffc107) !default;
72
+ $og-danger: var(--#{$prefix}danger, #dc3545) !default;
73
+ $og-info: var(--#{$prefix}info, #0dcaf0) !default;
74
+ $og-white: var(--#{$prefix}white, #fff) !default;
75
+ // Ink for glyphs sitting on the accent fill. The accent themes flip between
76
+ // light fills (navy ink) and dark fills (white ink), so hard-coded white is
77
+ // unreadable on amber/teal; the theme system publishes the matching ink.
78
+ $og-primary-ink: var(--tl-accent-ink, #fff) !default;
79
+
80
+ // Elevation & shape
81
+ $border-radius: var(--#{$prefix}one-grid-border-radius, 0) !default;
82
+ $menu-shadow: var(--#{$prefix}box-shadow-lg, 0 1rem 3rem rgba(0, 0, 0, 0.175)) !default;
83
+
84
+ // ----------------------------------------------------------------------------
85
+ // Public token registry: custom-property name -> compiled-in default.
86
+ // Every value below is themable at runtime as `--one-grid-<token>`.
87
+ // ----------------------------------------------------------------------------
88
+ $_og-defaults: (
89
+ // Surfaces & text
90
+ header-bg: $header-bg,
91
+ body-bg: $body-bg,
92
+ row-odd-bg: $row-odd-bg,
93
+ row-even-bg: $row-even-bg,
94
+ border-color: $border-color,
95
+ text-color: $text-color,
96
+ font-size: $font-size,
97
+ // States
98
+ hover-bg: $hover-color,
99
+ selected-bg: $selected-color,
100
+ cell-selected-bg: $cell-selected-color,
101
+ cell-selected-flash-bg: $cell-selected-flush-color,
102
+ // Density & shape
103
+ header-cell-height: $header-cell-height,
104
+ cell-height: $cell-height,
105
+ cell-line-height: $cell-line-height,
106
+ cell-item-space: $cell-item-space,
107
+ cell-padding: $cell-padding,
108
+ action-btn-size: $row-action-btn-width-height,
109
+ action-btn-radius: $row-action-btn-border-radius,
110
+ border-radius: $border-radius,
111
+ // Editing
112
+ input-bg: $input-bg,
113
+ // Pagination
114
+ pagination-bg: $pagination-bg,
115
+ pagination-btn-color: $pagination-btn-color,
116
+ pagination-height: $pagination-height,
117
+ // Accents
118
+ primary: $og-primary,
119
+ success: $og-success,
120
+ warning: $og-warning,
121
+ danger: $og-danger,
122
+ info: $og-info,
123
+ on-accent: $og-white,
124
+ primary-ink: $og-primary-ink,
125
+ // Subtle accent fills
126
+ primary-subtle-bg: rgba($primary-rgb, 0.08),
127
+ success-subtle-bg: rgba($success-rgb, 0.1),
128
+ danger-subtle-bg: rgba($danger-rgb, 0.15),
129
+ info-subtle-bg: rgba($info-rgb, 0.15),
130
+ drop-valid-bg: rgba($success-rgb, 0.1),
131
+ drop-invalid-bg: rgba($danger-rgb, 0.1),
132
+ // Elevation
133
+ menu-shadow: $menu-shadow,
134
+ ) !default;
135
+
136
+ // Resolves a token to `var(--one-grid-<token>, <default>)` so consumer-set
137
+ // custom properties win at runtime and the Sass value is the fallback.
138
+ @function og-var($token) {
139
+ @if not map-has-key($_og-defaults, $token) {
140
+ @error "Unknown OneGrid theme token: #{$token}";
141
+ }
142
+
143
+ @return var(--#{$og-prefix}#{$token}, #{map-get($_og-defaults, $token)});
144
+ }
145
+
146
+ // One Grid UI
147
+ .one-grid {
148
+ height: inherit;
149
+ position: relative;
150
+ overflow: hidden;
151
+ display: flex;
152
+ flex-direction: column;
153
+ font-size: og-var(font-size);
154
+ border: 1px solid og-var(border-color);
155
+ // Opt-in rounding hook; no theme sets it today, so grids stay square.
156
+ border-radius: og-var(border-radius);
157
+
158
+ // Header, body and pagination stack as flex rows: fixed header, body takes
159
+ // whatever is left, pagination sits in flow below it. This replaces the old
160
+ // `calc(100% - 30px)` body height and padding-bottom compensation, which
161
+ // undercounted the 35px header (34px cells + 1px border) and left the
162
+ // body's horizontal scrollbar clipped by this element's overflow: hidden.
163
+ > one-grid-header,
164
+ > one-grid-pagination {
165
+ flex: 0 0 auto;
166
+ display: block;
167
+ }
168
+
169
+ > one-grid-body {
170
+ flex: 1 1 auto;
171
+ display: block;
172
+ min-height: 0;
173
+ }
174
+
175
+ // One Grid Header UI
176
+ .one-grid-header {
177
+ overflow: hidden;
178
+ display: block;
179
+ position: relative;
180
+ background-color: og-var(header-bg);
181
+ border-bottom: 1px solid og-var(border-color);
182
+
183
+ .one-group-header-row {
184
+ position: relative;
185
+ display: flex;
186
+ width: max-content;
187
+ background-color: og-var(header-bg);
188
+
189
+ .one-group-header-cell {
190
+ width: inherit;
191
+ font-style: italic;
192
+ font-weight: bold;
193
+ line-height: og-var(cell-line-height);
194
+ color: og-var(text-color);
195
+ white-space: nowrap;
196
+ overflow: hidden;
197
+ text-overflow: ellipsis;
198
+ border-right: 1px solid og-var(border-color);
199
+ height: og-var(header-cell-height);
200
+ padding: og-var(cell-padding);
201
+ display: flex;
202
+ justify-content: center;
203
+ align-items: center;
204
+ border-bottom: 1px solid og-var(border-color);
205
+ }
206
+ }
207
+
208
+ .one-grid-header-viewport {
209
+ display: flex;
210
+ position: relative;
211
+ z-index: 1;
212
+ overflow: hidden;
213
+ }
214
+
215
+ // One Grid Header Row UI
216
+ .one-header-row {
217
+ position: relative;
218
+ display: flex;
219
+ width: inherit;
220
+ z-index: 10 !important;
221
+
222
+ // One Grid Header Column UI
223
+ .one-grid-header-column {
224
+ position: relative;
225
+ width: inherit;
226
+ min-width: inherit;
227
+ max-width: inherit;
228
+ background-color: og-var(header-bg);
229
+
230
+ &::after {
231
+ content: '';
232
+ position: absolute;
233
+ top: 0;
234
+ right: 0;
235
+ width: $header-cell-seperator-width;
236
+ height: $header-cell-seperator-height;
237
+ background-color: og-var(border-color);
238
+ }
239
+
240
+ .one-grid-header-cell {
241
+ display: flex;
242
+ align-items: center;
243
+ justify-content: space-between;
244
+ height: og-var(header-cell-height);
245
+ padding: og-var(cell-padding);
246
+ font-weight: bold;
247
+ line-height: og-var(cell-line-height);
248
+ color: og-var(text-color);
249
+ white-space: nowrap;
250
+ overflow: hidden;
251
+ text-overflow: ellipsis;
252
+ position: relative;
253
+
254
+ .og-resize-handle {
255
+ position: absolute;
256
+ /* Position at right edge of header cell */
257
+ top: 0;
258
+ right: 0;
259
+ width: 12px;
260
+ /* Clickable area width */
261
+ height: 100%;
262
+ cursor: col-resize;
263
+ /* Show resize cursor */
264
+ background: transparent;
265
+ /* Invisible by default */
266
+ transition: background 0.2s;
267
+ z-index: 10;
268
+ display: flex;
269
+ justify-content: center;
270
+ align-items: center;
271
+
272
+ i {
273
+ opacity: 0;
274
+ color: og-var(text-color);
275
+ }
276
+ }
277
+
278
+ .og-resize-handle:hover {
279
+
280
+ i {
281
+ opacity: .6;
282
+ }
283
+ }
284
+
285
+ .og-resize-handle:active {
286
+ font-weight: bold;
287
+
288
+ i {
289
+ opacity: 1;
290
+ }
291
+ }
292
+
293
+ .one-grid-header-cell-group {
294
+ display: flex;
295
+ align-items: center;
296
+ }
297
+
298
+ .one-grid-header-menu-button {
299
+ width: og-var(action-btn-size);
300
+ height: og-var(action-btn-size);
301
+ display: flex;
302
+ justify-content: center;
303
+ align-items: center;
304
+ font-size: 16px;
305
+
306
+ &:hover {
307
+ cursor: pointer;
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ }
314
+
315
+ // One Grid Body UI
316
+ .one-grid-body {
317
+ height: 100%;
318
+ background-color: og-var(body-bg);
319
+ user-select: none;
320
+ -webkit-user-select: none;
321
+ -moz-user-select: none;
322
+ -ms-user-select: none;
323
+ position: relative;
324
+
325
+ .one-grid-body-viewport {
326
+ width: 100%;
327
+ height: 100%;
328
+
329
+ .one-row-detail-container {
330
+ width: 100%;
331
+ height: inherit;
332
+ padding: calc(#{og-var(cell-height)} / 2);
333
+ border-radius: og-var(action-btn-radius);
334
+ }
335
+
336
+ &::-webkit-scrollbar-corner {
337
+ background: og-var(body-bg);
338
+ }
339
+ }
340
+
341
+ // One Grid Odd & Event Row UI
342
+ .one-row {
343
+ display: flex;
344
+ flex-wrap: nowrap;
345
+ width: fit-content;
346
+ height: og-var(cell-height);
347
+ border-bottom: 1px solid og-var(border-color);
348
+ font-size: og-var(font-size);
349
+
350
+ .one-column {
351
+ min-width: inherit;
352
+ max-width: inherit;
353
+ position: relative;
354
+ display: flex;
355
+ margin: 0;
356
+ padding: 0;
357
+ height: og-var(cell-height);
358
+
359
+ .one-column-object-active {
360
+ position: absolute;
361
+ top: 2px;
362
+ left: 0px;
363
+ line-height: .8;
364
+ font-size: 8px;
365
+ font-weight: 600;
366
+ color: og-var(info);
367
+ display: flex;
368
+ justify-content: center;
369
+ align-items: center;
370
+ }
371
+
372
+ // Cell Context Option Menu
373
+ .cell-option-menu {
374
+ position: absolute;
375
+ min-width: 200px;
376
+ padding: 8px;
377
+ right: og-var(cell-item-space);
378
+ top: calc(#{og-var(cell-height)} + #{og-var(cell-item-space)});
379
+ background: og-var(row-odd-bg);
380
+ border: 1px solid og-var(border-color);
381
+ border-radius: 8px;
382
+ box-shadow: og-var(menu-shadow);
383
+ z-index: 1000;
384
+ transform-origin: top right;
385
+ animation: menuOpen 120ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
386
+
387
+ &.open-up {
388
+ top: auto;
389
+ bottom: 100%;
390
+ }
391
+
392
+ .cell-option-menu-item {
393
+ display: flex;
394
+ align-items: center;
395
+ padding: 6px 12px;
396
+ cursor: pointer;
397
+ border-bottom: 1px solid og-var(border-color);
398
+
399
+
400
+ &:last-child {
401
+ border-bottom: none;
402
+ }
403
+ }
404
+
405
+ .cell-option-menu-item:hover {
406
+ background: og-var(row-even-bg);
407
+ }
408
+ }
409
+
410
+ // Cell Typeahead Component
411
+ .one-dropdown-typeahead {
412
+ min-width: inherit;
413
+ max-width: inherit;
414
+ height: og-var(cell-height);
415
+ padding: og-var(cell-padding);
416
+ display: flex;
417
+ align-items: center;
418
+
419
+ .cell-typeahead-object-active {
420
+ position: absolute;
421
+ top: 2px;
422
+ left: 2px;
423
+ line-height: .8;
424
+ font-size: xx-small;
425
+ color: og-var(success);
426
+ }
427
+
428
+ .cell-typeahead-warning::after {
429
+ content: '';
430
+ position: absolute;
431
+ top: 2px;
432
+ right: 2px;
433
+ width: 4px;
434
+ height: 4px;
435
+ border-radius: 2px;
436
+ background-color: og-var(warning);
437
+ opacity: .6;
438
+ }
439
+
440
+ .cell-typeahead-danger::after {
441
+ content: '';
442
+ position: absolute;
443
+ top: 2px;
444
+ right: 2px;
445
+ width: 4px;
446
+ height: 4px;
447
+ border-radius: 2px;
448
+ background-color: og-var(danger);
449
+ opacity: .6;
450
+ }
451
+
452
+ .cell-typeahead-success::after {
453
+ content: '';
454
+ position: absolute;
455
+ top: 2px;
456
+ right: 2px;
457
+ width: 4px;
458
+ height: 4px;
459
+ border-radius: 2px;
460
+ background-color: og-var(success);
461
+ opacity: .6;
462
+ }
463
+
464
+ .cell-typeahead-primary::after {
465
+ content: '';
466
+ position: absolute;
467
+ top: 2px;
468
+ right: 2px;
469
+ width: 4px;
470
+ height: 4px;
471
+ border-radius: 2px;
472
+ background-color: og-var(primary);
473
+ opacity: .6;
474
+ }
475
+
476
+ .cell-typeahead {
477
+ background-color: transparent;
478
+ border: none;
479
+ width: 100%;
480
+ color: og-var(text-color);
481
+ }
482
+
483
+ .cell-typeahead-reset {
484
+ width: og-var(action-btn-size);
485
+ height: og-var(action-btn-size);
486
+ // padding-left: og-var(cell-item-space);
487
+ padding-right: og-var(cell-item-space);
488
+ display: flex;
489
+ justify-content: center;
490
+ align-items: center;
491
+ font-size: 10px;
492
+ color: og-var(text-color);
493
+ }
494
+
495
+ .cell-typeahead-action {
496
+ width: og-var(action-btn-size);
497
+ height: og-var(action-btn-size);
498
+ font-size: 8;
499
+ border-radius: og-var(action-btn-radius);
500
+ background-color: transparent;
501
+ transition: all .1s ease-out;
502
+ display: flex;
503
+ justify-content: center;
504
+ align-items: center;
505
+ color: og-var(primary);
506
+ border: 1px solid og-var(primary);
507
+
508
+ &:hover {
509
+ color: og-var(primary-ink);
510
+ background-color: og-var(primary);
511
+ }
512
+ }
513
+ }
514
+
515
+ .one-cell {
516
+ position: relative;
517
+ display: flex;
518
+ align-items: center;
519
+ width: calc(100% - 1px);
520
+ height: og-var(cell-height);
521
+ padding: og-var(cell-padding);
522
+
523
+ &.align-content-left {
524
+ justify-content: start;
525
+ text-align: start;
526
+ }
527
+
528
+ &.align-content-center {
529
+ justify-content: center;
530
+ text-align: center;
531
+ }
532
+
533
+ &.align-content-right {
534
+ justify-content: end;
535
+ text-align: end;
536
+ }
537
+
538
+ &.one-cell-allowed-edit-active::after {
539
+ content: '';
540
+ position: absolute;
541
+ top: 2px;
542
+ right: 2px;
543
+ width: 4px;
544
+ height: 4px;
545
+ border-radius: 2px;
546
+ background-color: og-var(success);
547
+ opacity: .6;
548
+ }
549
+
550
+ .cell-group-renderer {
551
+ width: inherit;
552
+ display: flex;
553
+ justify-content: flex-end;
554
+ align-items: center;
555
+ height: og-var(cell-height);
556
+ margin-right: og-var(cell-item-space);
557
+
558
+ .expansion-icon {
559
+ display: flex;
560
+ justify-content: center;
561
+ align-items: center;
562
+ width: og-var(action-btn-size);
563
+ height: og-var(action-btn-size);
564
+ border-radius: og-var(action-btn-radius);
565
+ transition: transform 0.2s ease-in-out;
566
+
567
+ &:hover {
568
+ cursor: pointer;
569
+ }
570
+ }
571
+
572
+ .expansion-icon {
573
+ &.node-expanded {
574
+ transform: rotate(90deg);
575
+ }
576
+ }
577
+ }
578
+
579
+ .one-cell-text {
580
+ line-height: og-var(cell-line-height);
581
+ white-space: nowrap;
582
+ overflow: hidden;
583
+ text-overflow: ellipsis;
584
+ color: og-var(text-color);
585
+
586
+ &.one-cell-placeholder {
587
+ opacity: .5 !important;
588
+ }
589
+ }
590
+ }
591
+
592
+ // One Grid Status UI
593
+ .one-cell-status {
594
+ width: inherit;
595
+ min-width: inherit;
596
+ max-width: inherit;
597
+ height: og-var(cell-height);
598
+ display: flex;
599
+ justify-content: center;
600
+ align-items: center;
601
+ padding-left: og-var(cell-item-space);
602
+ padding-right: og-var(cell-item-space);
603
+
604
+ .one-cell-status-body {
605
+ width: 100%;
606
+ display: flex;
607
+ justify-content: center;
608
+ align-items: center;
609
+ height: og-var(action-btn-size);
610
+ border-radius: og-var(action-btn-radius);
611
+ color: og-var(on-accent);
612
+ }
613
+ }
614
+
615
+ .one-column-drag-icon {
616
+ width: og-var(action-btn-size);
617
+ height: og-var(cell-height);
618
+ display: flex;
619
+ justify-content: flex-end;
620
+ align-items: center;
621
+
622
+ &:hover {
623
+ cursor: grab;
624
+ }
625
+ }
626
+
627
+ &.one-column-border-top {
628
+
629
+ &::before {
630
+ content: '';
631
+ position: absolute;
632
+ top: 0;
633
+ left: 0;
634
+ height: 1px;
635
+ width: 100%;
636
+ background-color: og-var(border-color);
637
+ }
638
+ }
639
+
640
+ &::after {
641
+ content: '';
642
+ position: absolute;
643
+ top: 0;
644
+ right: 0;
645
+ width: 1px;
646
+ background-color: og-var(border-color);
647
+ height: og-var(cell-height);
648
+ }
649
+
650
+ &.one-cell-invalid {
651
+ border: 1px solid og-var(danger);
652
+ }
653
+
654
+ // One Grid Cell Edit UI
655
+ &>.one-cell-input {
656
+ position: absolute;
657
+ top: 0;
658
+ left: 0;
659
+ width: calc(100% - 1px);
660
+ height: 100%;
661
+ padding: 0px 6px;
662
+ background-color: og-var(input-bg);
663
+ border: 1px solid og-var(success);
664
+ border-radius: og-var(action-btn-radius);
665
+ z-index: 5;
666
+ }
667
+ }
668
+
669
+ &:hover {
670
+ background-color: og-var(hover-bg) !important;
671
+ }
672
+
673
+ &:nth-child(odd) {
674
+ background-color: og-var(row-odd-bg);
675
+ }
676
+
677
+ &:nth-child(even) {
678
+ background-color: og-var(row-even-bg);
679
+ }
680
+ }
681
+
682
+ .one-row-selected {
683
+ background-color: og-var(selected-bg) !important;
684
+ }
685
+ }
686
+
687
+ // One Grid Row Action Button UI
688
+ .btn-action-container {
689
+ display: flex;
690
+ justify-content: start;
691
+
692
+ .btn-action {
693
+ margin: 0;
694
+ padding: 0;
695
+ margin-left: 4px;
696
+ display: flex;
697
+ justify-content: center;
698
+ align-items: center;
699
+ width: og-var(action-btn-size);
700
+ height: og-var(action-btn-size);
701
+ font-size: 8;
702
+ border-radius: og-var(action-btn-radius);
703
+ background-color: transparent;
704
+ transition: all .1s ease-out;
705
+
706
+ &:first-child {
707
+ margin-left: 0 !important;
708
+ }
709
+
710
+ &.btn-action-primary {
711
+ color: og-var(primary);
712
+ border: 1px solid og-var(primary);
713
+
714
+ &:hover {
715
+ color: og-var(primary-ink);
716
+ background-color: og-var(primary);
717
+ }
718
+ }
719
+
720
+ &.btn-action-success {
721
+ color: og-var(success);
722
+ border: 1px solid og-var(success);
723
+
724
+ &:hover {
725
+ color: og-var(on-accent);
726
+ background-color: og-var(success);
727
+ }
728
+ }
729
+
730
+ &.btn-action-warning {
731
+ color: og-var(warning);
732
+ border: 1px solid og-var(warning);
733
+
734
+ &:hover {
735
+ color: og-var(on-accent);
736
+ background-color: og-var(warning);
737
+ }
738
+ }
739
+
740
+ &.btn-action-danger {
741
+ color: og-var(danger);
742
+ border: 1px solid og-var(danger);
743
+
744
+ &:hover {
745
+ color: og-var(on-accent);
746
+ background-color: og-var(danger);
747
+ }
748
+ }
749
+ }
750
+ }
751
+
752
+ // One Grid Pagination UI
753
+ .one-grid-pagination {
754
+ display: flex;
755
+ justify-content: flex-end;
756
+ align-items: center;
757
+ height: og-var(pagination-height);
758
+ padding: 0 8px;
759
+ border-top: 1px solid og-var(border-color);
760
+ background-color: og-var(pagination-bg);
761
+
762
+ // One Grid Pagination Row UI
763
+ .one-pagination-row {
764
+ display: flex;
765
+ justify-content: flex-end;
766
+ align-items: center;
767
+ height: 100%;
768
+
769
+ .one-pagination-columns-group {
770
+ display: flex;
771
+ align-items: center;
772
+ margin-left: 16px;
773
+
774
+ .one-pagination-column {
775
+ display: flex;
776
+ align-items: center;
777
+
778
+ .one-pagination-btn {
779
+ cursor: pointer;
780
+ width: og-var(action-btn-size);
781
+ height: og-var(action-btn-size);
782
+ display: flex;
783
+ justify-content: center;
784
+ align-items: center;
785
+ font-weight: bold;
786
+ border: none;
787
+ color: og-var(pagination-btn-color);
788
+ background-color: transparent;
789
+ font-size: .8rem;
790
+ }
791
+
792
+ & select {
793
+ color: og-var(text-color);
794
+ width: fit-content;
795
+ padding: 2px 4px;
796
+ background-color: transparent;
797
+ border-radius: og-var(action-btn-radius);
798
+ border-color: og-var(border-color);
799
+ background-color: og-var(pagination-bg);
800
+ }
801
+ }
802
+ }
803
+ }
804
+ }
805
+
806
+ .editable-active::after {
807
+ content: '';
808
+ position: absolute;
809
+ top: 2px;
810
+ right: 2px;
811
+ width: 4px;
812
+ height: 4px;
813
+ border-radius: 2px;
814
+ background-color: og-var(success);
815
+ opacity: .6;
816
+ }
817
+
818
+ // One Grid Checkbox UI
819
+ .one-grid-checkbox {
820
+ margin: 0;
821
+ padding: 0;
822
+ height: inherit;
823
+ display: flex;
824
+ justify-content: center;
825
+ padding-right: 4px;
826
+
827
+ input[type='checkbox'] {
828
+ cursor: pointer;
829
+ position: relative;
830
+ appearance: none;
831
+ width: og-var(action-btn-size);
832
+ height: og-var(action-btn-size);
833
+ border: 2px solid og-var(border-color);
834
+ border-radius: og-var(action-btn-radius);
835
+ font-size: 10px;
836
+ opacity: 1;
837
+ background-color: og-var(body-bg);
838
+
839
+ &:indeterminate {
840
+ background-color: og-var(row-even-bg);
841
+ border-color: og-var(border-color);
842
+
843
+ &:indeterminate::after {
844
+ content: '–';
845
+ color: og-var(border-color);
846
+ position: absolute;
847
+ top: 50%;
848
+ left: 50%;
849
+ transform: translate(-50%, -50%);
850
+ font-size: medium;
851
+ font-weight: bold;
852
+ }
853
+ }
854
+
855
+ &:checked {
856
+ background-color: og-var(primary);
857
+ border-color: og-var(primary);
858
+
859
+ &:checked::after {
860
+ content: "";
861
+ width: 6px;
862
+ height: 11px;
863
+ border-right: 2px solid og-var(primary-ink);
864
+ border-bottom: 2px solid og-var(primary-ink);
865
+ position: absolute;
866
+ top: 40%;
867
+ left: 50%;
868
+ transform: translate(-50%, -50%) rotate(45deg);
869
+ display: inline-block;
870
+ }
871
+ }
872
+ }
873
+ }
874
+
875
+ // Drag & Drop Feature
876
+ .one-row-dragging {
877
+ opacity: 0.6;
878
+ /* fade */
879
+ border: 1px dashed og-var(primary);
880
+ border-radius: og-var(action-btn-radius);
881
+ cursor: grabbing;
882
+ }
883
+
884
+ .drop-valid {
885
+ border: 2px solid og-var(success);
886
+ background-color: og-var(drop-valid-bg);
887
+ }
888
+
889
+ .drop-invalid {
890
+ border: 2px solid og-var(danger);
891
+ background-color: og-var(drop-invalid-bg);
892
+ }
893
+
894
+ // Utilities Class
895
+ .hidden {
896
+ display: none;
897
+ }
898
+
899
+ .disabled {
900
+ pointer-events: none;
901
+ cursor: not-allowed;
902
+ opacity: .5 !important;
903
+ }
904
+
905
+ .one-warning-bg {
906
+ background-color: og-var(warning);
907
+ }
908
+
909
+ .one-success-bg {
910
+ background-color: og-var(success);
911
+ }
912
+
913
+ .one-cell-margin-left {
914
+ margin-left: og-var(cell-item-space);
915
+ }
916
+
917
+ .one-cell-margin-right {
918
+ margin-right: og-var(cell-item-space);
919
+ }
920
+
921
+ .one-cell-selected {
922
+ background-color: og-var(cell-selected-bg);
923
+ }
924
+
925
+ .one-cell-invalid {
926
+ border: 1px solid og-var(danger) !important;
927
+ }
928
+
929
+ // Flush Animation For Copy Event Feedback
930
+ .one-cell-copied {
931
+ animation: flashCopied .8s ease-in-out;
932
+ }
933
+
934
+ // "red"/"blue" are legacy class names; the colors are the system danger
935
+ // and info tokens so they track the palette and both modes.
936
+ .bg-red-light {
937
+ background-color: og-var(danger-subtle-bg);
938
+ }
939
+
940
+ .bg-blue-light {
941
+ background-color: og-var(info-subtle-bg);
942
+ }
943
+
944
+ .og-text-red {
945
+
946
+ .one-cell-text {
947
+ color: og-var(danger) !important;
948
+ }
949
+ }
950
+
951
+ .og-text-blue {
952
+
953
+ .one-cell-text {
954
+ color: og-var(info) !important;
955
+ }
956
+ }
957
+
958
+ @keyframes flashCopied {
959
+
960
+ 0% {
961
+ background-color: og-var(cell-selected-flash-bg);
962
+ }
963
+
964
+ 100% {
965
+ background-color: og-var(cell-selected-bg);
966
+ }
967
+ }
968
+
969
+ // Placeholder Disply Empty Rows Data Message
970
+ .one-grid-empty-message {
971
+ z-index: 10;
972
+ line-height: og-var(cell-line-height);
973
+ font-size: .6rem;
974
+ opacity: 0;
975
+ animation: fadeIn .4s ease forwards;
976
+ }
977
+
978
+ @keyframes fadeIn {
979
+ from {
980
+ opacity: 0;
981
+ }
982
+
983
+ to {
984
+ opacity: 1;
985
+ }
986
+ }
987
+
988
+ @keyframes menuOpen {
989
+ from {
990
+ opacity: 0;
991
+ transform: scale(0.94) translateY(-4px);
992
+ }
993
+
994
+ to {
995
+ opacity: 1;
996
+ transform: scale(1) translateY(0);
997
+ }
998
+ }
999
+ }