@freegridjs/core 1.1.0 → 1.7.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.
@@ -112,6 +112,12 @@
112
112
  background: var(--fg-input-bg); color: inherit; font: inherit;
113
113
  }
114
114
  .fg-input:focus, .fg-filter-op:focus { outline: 2px solid var(--fg-focus); outline-offset: -1px; }
115
+ /* every select in the grid, its menus and dialogs: a drawn chevron with room on the right */
116
+ .fg-root select:not([multiple]):not([size]), .fg-menu select:not([multiple]):not([size]) {
117
+ appearance: none; -webkit-appearance: none; padding-right: 26px;
118
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%238a93a6' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
119
+ background-repeat: no-repeat; background-position: right 9px center; background-size: 11px;
120
+ }
115
121
  .fg-set-list { max-height: 220px; overflow: auto; display: flex; flex-direction: column; }
116
122
  .fg-set-item { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
117
123
  .fg-set-item:hover { background: var(--fg-row-hover); }
@@ -130,6 +136,16 @@
130
136
  font: 600 var(--fg-font-size) var(--fg-font); cursor: pointer;
131
137
  }
132
138
  .fg-sidebar-tab[aria-expanded="true"] { color: var(--fg-accent); box-shadow: inset 2px 0 var(--fg-accent); }
139
+ .fg-sidebar-open .fg-sidebar-tabs { width: 32px; gap: 4px; padding: 8px 4px 8px 0; }
140
+ .fg-sidebar-open .fg-sidebar-tab {
141
+ position: relative; margin-left: -1px; padding: 14px 0; border: 1px solid var(--fg-border); border-left-color: transparent;
142
+ border-radius: 0 7px 7px 0; background: var(--fg-header-bg); color: var(--fg-muted);
143
+ }
144
+ .fg-sidebar-open .fg-sidebar-tab:hover { color: var(--fg-header-fg); background: var(--fg-row-hover); }
145
+ .fg-sidebar-open .fg-sidebar-tab[aria-expanded="true"] {
146
+ background: var(--fg-bg); color: var(--fg-accent); border-left-color: var(--fg-bg); box-shadow: inset -3px 0 var(--fg-accent); z-index: 1;
147
+ }
148
+ .fg-sidebar-open .fg-sidebar-tab:focus-visible { outline: 2px solid var(--fg-accent); outline-offset: -2px; }
133
149
  .fg-chooser { display: flex; flex-direction: column; gap: 6px; padding: 8px; min-height: 0; flex: 1; }
134
150
  .fg-chooser-dialog { width: 280px; }
135
151
  .fg-chooser-dialog .fg-chooser { max-height: 420px; }
@@ -195,6 +211,7 @@
195
211
  .fg-theme-classic .fg-sort-icon, .fg-theme-classic .fg-menu-btn.fg-filter-active { color: #ffd166; }
196
212
  .fg-theme-classic .fg-sidebar-tab { color: #c9d2e0; }
197
213
  .fg-theme-classic .fg-sidebar-tab[aria-expanded="true"] { color: #ffd166; box-shadow: inset 2px 0 #ffd166; }
214
+ .fg-theme-classic .fg-sidebar-open .fg-sidebar-tab[aria-expanded="true"] { color: var(--fg-accent); box-shadow: inset -3px 0 var(--fg-accent); }
198
215
  .fg-theme-board .fg-header-cell, .fg-theme-erp .fg-header-cell, .fg-theme-excel .fg-header-cell, .fg-theme-classic .fg-header-cell { flex-direction: row; justify-content: center; }
199
216
  .fg-theme-board .fg-menu-btn, .fg-theme-erp .fg-menu-btn, .fg-theme-excel .fg-menu-btn, .fg-theme-classic .fg-menu-btn {
200
217
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); margin: 0;
@@ -439,9 +456,15 @@ textarea.fg-editor-control { padding-top: 8px; resize: none; }
439
456
  .fg-tooltip.fg-theme-dark { background: #e6e9f0; color: #11141b; }
440
457
 
441
458
  /* cells changed by applyTransaction */
442
- .fg-cell-flash { animation: fg-flash 1s ease-out; }
459
+ .fg-cell-flash { animation: fg-flash var(--fg-flash-duration, 1s) ease-out; }
443
460
  @keyframes fg-flash { from { background: color-mix(in srgb, var(--fg-accent) 35%, transparent); } to { background: transparent; } }
444
- @media (prefers-reduced-motion: reduce) { .fg-cell-flash { animation: none; outline: 1px solid var(--fg-accent); outline-offset: -1px; } }
461
+ .fg-cell-flash-up { animation-name: fg-flash-up; }
462
+ .fg-cell-flash-down { animation-name: fg-flash-down; }
463
+ @keyframes fg-flash-up { from { background: color-mix(in srgb, var(--fg-up, #16a34a) 32%, transparent); } to { background: transparent; } }
464
+ @keyframes fg-flash-down { from { background: color-mix(in srgb, var(--fg-down, #dc2626) 32%, transparent); } to { background: transparent; } }
465
+ @media (prefers-reduced-motion: reduce) { .fg-cell-flash { animation: none; outline: 1px solid var(--fg-accent); outline-offset: -1px; }
466
+ .fg-cell-flash-up { outline-color: var(--fg-up, #16a34a); }
467
+ .fg-cell-flash-down { outline-color: var(--fg-down, #dc2626); } }
445
468
 
446
469
  /* editType 'row': the row being edited */
447
470
  .fg-row-editing { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fg-accent) 45%, transparent); background: color-mix(in srgb, var(--fg-accent) 5%, var(--fg-bg)); }
@@ -468,3 +491,35 @@ textarea.fg-editor-control { padding-top: 8px; resize: none; }
468
491
  /* density */
469
492
  .fg-density-compact { --fg-cell-px: 7px; }
470
493
  .fg-density-comfortable { --fg-cell-px: 14px; }
494
+
495
+ /* conditional formats */
496
+ .fg-cf-bar { background-image: linear-gradient(to right, transparent var(--fg-bar-from), color-mix(in srgb, var(--fg-bar-color) 38%, transparent) var(--fg-bar-from), color-mix(in srgb, var(--fg-bar-color) 38%, transparent) var(--fg-bar-to), transparent var(--fg-bar-to)); background-repeat: no-repeat; background-size: 100% 70%; background-position: 0 50%; }
497
+ .fg-cf-icon { display: inline-block; margin-inline-end: 6px; font-size: .9em; line-height: 1; }
498
+ .fg-cf-dialog { width: 340px; }
499
+ .fg-cf-list { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 10px; }
500
+ .fg-cf-rule { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border: 1px solid var(--fg-border); border-radius: 6px; }
501
+ .fg-cf-rule-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
502
+ .fg-cf-sample { flex: none; width: 34px; height: 18px; border-radius: 4px; border: 1px solid var(--fg-border); display: grid; place-items: center; font-size: 11px; }
503
+ .fg-cf-form { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
504
+ .fg-cf-form > .fg-cf-wide { grid-column: 1 / -1; }
505
+ .fg-cf-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
506
+ .fg-cf-swatch { width: 30px; height: 22px; border-radius: 5px; border: 1px solid var(--fg-border); cursor: pointer; font: 600 11px/1 var(--fg-font); padding: 0; }
507
+ .fg-cf-swatch[aria-pressed="true"] { outline: 2px solid var(--fg-accent); outline-offset: 1px; }
508
+ .fg-cf-empty { color: var(--fg-muted); padding: 4px 0; }
509
+
510
+ /* AI assistant */
511
+ .fg-ai-panel { width: 360px; display: flex; flex-direction: column; gap: 8px; }
512
+ .fg-ai-log { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow-y: auto; }
513
+ .fg-ai-log:empty { display: none; }
514
+ .fg-ai-msg { padding: 7px 10px; border-radius: 10px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92%; }
515
+ .fg-ai-user { align-self: flex-end; background: var(--fg-accent); color: var(--fg-accent-fg); border-bottom-right-radius: 3px; }
516
+ .fg-ai-ai { align-self: flex-start; background: var(--fg-header-bg); border: 1px solid var(--fg-border); border-bottom-left-radius: 3px; }
517
+ .fg-ai-error { align-self: flex-start; color: #b91c1c; background: #fef2f2; border: 1px solid #fecaca; }
518
+ .fg-ai-wait { color: var(--fg-muted); }
519
+ .fg-ai-note { margin-top: 4px; font-size: .9em; color: var(--fg-muted); }
520
+ .fg-ai-undo { margin-top: 6px; height: 24px; padding: 0 10px; }
521
+ .fg-ai-form { display: flex; gap: 6px; align-items: flex-end; }
522
+ .fg-ai-input { flex: 1; resize: vertical; min-height: 40px; max-height: 140px; padding: 6px 8px; font: inherit; }
523
+ .fg-ai-tips { display: flex; flex-wrap: wrap; gap: 6px; }
524
+ .fg-ai-tip { border: 1px solid var(--fg-border); border-radius: 999px; background: none; color: inherit; font: inherit; font-size: .92em; padding: 3px 10px; cursor: pointer; }
525
+ .fg-ai-tip:hover { background: var(--fg-row-hover); }