flexdesk 0.4.7 → 0.5.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.
package/dist/flexdesk.css CHANGED
@@ -504,7 +504,9 @@
504
504
  .twm-preview-table th,
505
505
  .twm-preview-table td {
506
506
  border-bottom: 1px solid #2a2a2a;
507
- padding: var(--space-sm) 8px;
507
+ /* 0.5.0: the row-geometry tokens (tokens.css). Unset, these fall back to
508
+ * exactly the 0.4 padding. */
509
+ padding: var(--twm-dt-cell-pad-block, var(--space-sm)) var(--twm-dt-cell-pad-inline, 8px);
508
510
  white-space: nowrap;
509
511
  /* Never spill text past the column. Once columns are locked to fixed
510
512
  * widths, over-long content is clipped with an ellipsis; the full
@@ -625,6 +627,125 @@ body.twm-dt-col-resizing {
625
627
  .twm-preview-table tbody tr.selected td {
626
628
  background: var(--state-selected, rgba(0, 122, 204, 0.15));
627
629
  }
630
+ /* ── 0.5.0 DataTable options. Each rule below matches only a class or an
631
+ * attribute a 0.5.0 option sets, so a table that asks for none of them is
632
+ * styled exactly as in 0.4. ───────────────────────────────────────────── */
633
+
634
+ /* The row-geometry tokens for the NORMAL density's line height. Compact
635
+ * declares its own on the cells (with the token in front), as 0.4 did; normal
636
+ * never declared one, so this one is NOT on the cells. It is on the ROW GROUPS,
637
+ * which only this component creates, and the cells inherit it. Unset, it
638
+ * computes to `unset` — inheritance from the table, which is exactly what no
639
+ * declaration gives. A declaration on the cells themselves, however weak
640
+ * (`:where()`), would beat any consumer rule for the cells that sits in a
641
+ * cascade LAYER (unlayered author styles outrank every layer, whatever their
642
+ * specificity) and any zero-specificity one loaded before this sheet; on the
643
+ * row groups, a consumer's rule for the cells, the rows or the table still
644
+ * wins, as it did in 0.4. */
645
+ :where(.twm-preview-table) > :where(thead, tbody, tfoot) {
646
+ line-height: var(--twm-dt-cell-line-height);
647
+ }
648
+ /* `firstColumn: 'plain'` — the first column is a column like the others, not
649
+ * the time column this component was built around (120–150px, grey, 500).
650
+ * One class more than both time rules, so the order of the two sheets cannot
651
+ * matter. The header keeps the header's weight and colour. */
652
+ .twm-preview-table.twm-dt--first-plain th:first-child,
653
+ .twm-preview-table.twm-dt--first-plain td:first-child {
654
+ width: auto;
655
+ min-width: 80px;
656
+ max-width: none;
657
+ }
658
+ .twm-preview-table.twm-dt--first-plain td:first-child {
659
+ font-weight: inherit;
660
+ color: inherit;
661
+ }
662
+ .twm-preview-table.twm-dt--first-plain th:first-child {
663
+ font-weight: 600;
664
+ color: #aaa;
665
+ }
666
+ /* `onRowActivate` / `clickable` — a row that opens looks like it: a pointer,
667
+ * and a hover even on a readonly table. Never over a selected row, whose
668
+ * colour has to survive the pointer (see the selection rule's note), and never
669
+ * over the empty or failed state's row, which opens nothing. */
670
+ .twm-preview-table.twm-dt--clickable tbody tr:not(.twm-dt-spacer):not(.data-table__empty-row) {
671
+ cursor: pointer;
672
+ }
673
+ .twm-preview-table.twm-dt--clickable tbody tr:not(.twm-dt-spacer):not(.data-table__empty-row):not(.selected):hover td {
674
+ background: var(--state-hover, rgba(255, 255, 255, 0.05));
675
+ }
676
+ /* `activeRow` — the row that is OPEN. A left edge, not a background: hover
677
+ * and selection keep theirs. */
678
+ .twm-preview-table tbody tr.twm-dt-row--active > td:first-child {
679
+ box-shadow: inset 2px 0 0 0 var(--accent-bright, #007acc);
680
+ }
681
+ /* `rowIcon` — drawn from `data-twm-icon` so the icon's NAME is not cell
682
+ * text (not in a copy, not in the clipped-cell tooltip). The span carries the
683
+ * icon font's class; the pseudo-element inherits its font and ligatures. Top
684
+ * aligned on a line height of 1, so it cannot make its row taller. */
685
+ .twm-preview-table td .twm-dt-row-icon {
686
+ display: inline-block;
687
+ font-size: 1.15em;
688
+ line-height: 1;
689
+ vertical-align: top;
690
+ margin-right: 4px;
691
+ opacity: 0.85;
692
+ }
693
+ .twm-preview-table td .twm-dt-row-icon::before {
694
+ content: attr(data-twm-icon);
695
+ }
696
+ .twm-preview-table td .twm-dt-row-icon--muted { color: var(--text-muted, #888); }
697
+ .twm-preview-table td .twm-dt-row-icon--info { color: var(--color-info, #2196f3); }
698
+ .twm-preview-table td .twm-dt-row-icon--success { color: var(--color-success, #3fb950); }
699
+ .twm-preview-table td .twm-dt-row-icon--warn { color: var(--color-warning, #ff9800); }
700
+ .twm-preview-table td .twm-dt-row-icon--danger { color: var(--color-danger, #c74e4e); }
701
+ /* THESE CELLS ARE OFTEN A ROW'S FIRST CELL, and the first cell is the time
702
+ * column's: `.twm-preview-table td:first-child` (0,2,1, grey and weight 500,
703
+ * declared twice, the second copy far below), `firstColumn: 'plain'` (0,3,1,
704
+ * `color: inherit`) and the compact density's cell padding (0,2,1, in
705
+ * overrides.css) all reach them. A rule of the same weight LOSES to whichever
706
+ * comes later — which drew a failure in an empty list grey, exactly like an
707
+ * empty state, and gave both 2px of padding under compact. So each rule below
708
+ * is (0,3,2) or more: the wrapper and `tbody` in front of the cell's class,
709
+ * which no first-column or density rule matches, and the order of the sheets
710
+ * cannot matter. */
711
+ /* `nullDisplay` — a NULL reads as one, not as the text "NULL". */
712
+ .twm-data-table-component .twm-preview-table tbody td.twm-dt-cell--null {
713
+ color: var(--text-dim, #666);
714
+ font-style: italic;
715
+ }
716
+ /* `emptyState` and `setError` with no rows: the box's own words, which may
717
+ * wrap — muted for an empty state, red for a failure, in both densities. Quiet
718
+ * while loading — an empty table that is still loading is not empty. */
719
+ .twm-data-table-component .twm-preview-table tbody td.twm-data-table__empty-cell.twm-data-table__empty-cell--state,
720
+ .twm-data-table-component .twm-preview-table tbody td.twm-data-table__empty-cell.twm-data-table__empty-cell--error {
721
+ text-align: center;
722
+ padding: 16px;
723
+ white-space: normal;
724
+ font-weight: normal;
725
+ color: var(--text-muted, #888);
726
+ }
727
+ .twm-data-table-component .twm-preview-table tbody td.twm-data-table__empty-cell.twm-data-table__empty-cell--error {
728
+ color: var(--color-danger, #c74e4e);
729
+ }
730
+ .twm-data-table-component--loading .twm-preview-table td.twm-data-table__empty-cell--state {
731
+ visibility: hidden;
732
+ }
733
+ /* `setError` with rows: a banner over the rows that are KEPT. */
734
+ .twm-data-table__error {
735
+ flex: 0 0 auto;
736
+ display: flex;
737
+ align-items: center;
738
+ gap: 6px;
739
+ padding: 4px 8px;
740
+ font-size: var(--font-size-sm, 12px);
741
+ color: var(--color-danger, #c74e4e);
742
+ background: rgba(199, 78, 78, 0.12);
743
+ border-bottom: 1px solid rgba(199, 78, 78, 0.4);
744
+ }
745
+ .twm-data-table__error .twm-data-table__error-icon {
746
+ font-size: 16px;
747
+ line-height: 1;
748
+ }
628
749
  /* Wizard mode: uniform column widths, no selection */
629
750
  .twm-preview-table-wrap--wizard .twm-preview-table {
630
751
  table-layout: auto;
@@ -1606,7 +1727,7 @@ body.twm-window-maximized .twm-resize-handle {
1606
1727
  }
1607
1728
  .twm-preview-table th, .twm-preview-table td {
1608
1729
  border-bottom: 1px solid #2a2a2a;
1609
- padding: var(--space-sm) 8px;
1730
+ padding: var(--twm-dt-cell-pad-block, var(--space-sm)) var(--twm-dt-cell-pad-inline, 8px);
1610
1731
  white-space: nowrap;
1611
1732
  }
1612
1733
  .twm-preview-table th {
@@ -6617,8 +6738,10 @@ tr:hover .twm-row-action { opacity: 1; }
6617
6738
  }
6618
6739
  .twm-data-table-component--compact .twm-preview-table th,
6619
6740
  .twm-data-table-component--compact .twm-preview-table td {
6620
- padding: 2px 6px;
6621
- line-height: 1.35;
6741
+ /* 0.5.0: the row-geometry tokens (tokens.css), falling back to exactly
6742
+ * the 0.4 compact values. */
6743
+ padding: var(--twm-dt-cell-pad-block, 2px) var(--twm-dt-cell-pad-inline, 6px);
6744
+ line-height: var(--twm-dt-cell-line-height, 1.35);
6622
6745
  }
6623
6746
  .twm-data-table-component--compact .twm-pagination-controls {
6624
6747
  padding: 1px 6px !important;