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/css/base.css CHANGED
@@ -496,7 +496,9 @@
496
496
  .twm-preview-table th,
497
497
  .twm-preview-table td {
498
498
  border-bottom: 1px solid #2a2a2a;
499
- padding: var(--space-sm) 8px;
499
+ /* 0.5.0: the row-geometry tokens (tokens.css). Unset, these fall back to
500
+ * exactly the 0.4 padding. */
501
+ padding: var(--twm-dt-cell-pad-block, var(--space-sm)) var(--twm-dt-cell-pad-inline, 8px);
500
502
  white-space: nowrap;
501
503
  /* Never spill text past the column. Once columns are locked to fixed
502
504
  * widths, over-long content is clipped with an ellipsis; the full
@@ -598,6 +600,125 @@ body.twm-dt-col-resizing {
598
600
  .twm-preview-table:not(.twm-preview-table--readonly) tr:hover td {
599
601
  background: rgba(255, 255, 255, 0.04);
600
602
  }
603
+ /* ── 0.5.0 DataTable options. Each rule below matches only a class or an
604
+ * attribute a 0.5.0 option sets, so a table that asks for none of them is
605
+ * styled exactly as in 0.4. ───────────────────────────────────────────── */
606
+
607
+ /* The row-geometry tokens for the NORMAL density's line height. Compact
608
+ * declares its own on the cells (with the token in front), as 0.4 did; normal
609
+ * never declared one, so this one is NOT on the cells. It is on the ROW GROUPS,
610
+ * which only this component creates, and the cells inherit it. Unset, it
611
+ * computes to `unset` — inheritance from the table, which is exactly what no
612
+ * declaration gives. A declaration on the cells themselves, however weak
613
+ * (`:where()`), would beat any consumer rule for the cells that sits in a
614
+ * cascade LAYER (unlayered author styles outrank every layer, whatever their
615
+ * specificity) and any zero-specificity one loaded before this sheet; on the
616
+ * row groups, a consumer's rule for the cells, the rows or the table still
617
+ * wins, as it did in 0.4. */
618
+ :where(.twm-preview-table) > :where(thead, tbody, tfoot) {
619
+ line-height: var(--twm-dt-cell-line-height);
620
+ }
621
+ /* `firstColumn: 'plain'` — the first column is a column like the others, not
622
+ * the time column this component was built around (120–150px, grey, 500).
623
+ * One class more than both time rules, so the order of the two sheets cannot
624
+ * matter. The header keeps the header's weight and colour. */
625
+ .twm-preview-table.twm-dt--first-plain th:first-child,
626
+ .twm-preview-table.twm-dt--first-plain td:first-child {
627
+ width: auto;
628
+ min-width: 80px;
629
+ max-width: none;
630
+ }
631
+ .twm-preview-table.twm-dt--first-plain td:first-child {
632
+ font-weight: inherit;
633
+ color: inherit;
634
+ }
635
+ .twm-preview-table.twm-dt--first-plain th:first-child {
636
+ font-weight: 600;
637
+ color: #aaa;
638
+ }
639
+ /* `onRowActivate` / `clickable` — a row that opens looks like it: a pointer,
640
+ * and a hover even on a readonly table. Never over a selected row, whose
641
+ * colour has to survive the pointer (see the selection rule's note), and never
642
+ * over the empty or failed state's row, which opens nothing. */
643
+ .twm-preview-table.twm-dt--clickable tbody tr:not(.twm-dt-spacer):not(.data-table__empty-row) {
644
+ cursor: pointer;
645
+ }
646
+ .twm-preview-table.twm-dt--clickable tbody tr:not(.twm-dt-spacer):not(.data-table__empty-row):not(.selected):hover td {
647
+ background: var(--state-hover, rgba(255, 255, 255, 0.05));
648
+ }
649
+ /* `activeRow` — the row that is OPEN. A left edge, not a background: hover
650
+ * and selection keep theirs. */
651
+ .twm-preview-table tbody tr.twm-dt-row--active > td:first-child {
652
+ box-shadow: inset 2px 0 0 0 var(--accent-bright, #007acc);
653
+ }
654
+ /* `rowIcon` — drawn from `data-twm-icon` so the icon's NAME is not cell
655
+ * text (not in a copy, not in the clipped-cell tooltip). The span carries the
656
+ * icon font's class; the pseudo-element inherits its font and ligatures. Top
657
+ * aligned on a line height of 1, so it cannot make its row taller. */
658
+ .twm-preview-table td .twm-dt-row-icon {
659
+ display: inline-block;
660
+ font-size: 1.15em;
661
+ line-height: 1;
662
+ vertical-align: top;
663
+ margin-right: 4px;
664
+ opacity: 0.85;
665
+ }
666
+ .twm-preview-table td .twm-dt-row-icon::before {
667
+ content: attr(data-twm-icon);
668
+ }
669
+ .twm-preview-table td .twm-dt-row-icon--muted { color: var(--text-muted, #888); }
670
+ .twm-preview-table td .twm-dt-row-icon--info { color: var(--color-info, #2196f3); }
671
+ .twm-preview-table td .twm-dt-row-icon--success { color: var(--color-success, #3fb950); }
672
+ .twm-preview-table td .twm-dt-row-icon--warn { color: var(--color-warning, #ff9800); }
673
+ .twm-preview-table td .twm-dt-row-icon--danger { color: var(--color-danger, #c74e4e); }
674
+ /* THESE CELLS ARE OFTEN A ROW'S FIRST CELL, and the first cell is the time
675
+ * column's: `.twm-preview-table td:first-child` (0,2,1, grey and weight 500,
676
+ * declared twice, the second copy far below), `firstColumn: 'plain'` (0,3,1,
677
+ * `color: inherit`) and the compact density's cell padding (0,2,1, in
678
+ * overrides.css) all reach them. A rule of the same weight LOSES to whichever
679
+ * comes later — which drew a failure in an empty list grey, exactly like an
680
+ * empty state, and gave both 2px of padding under compact. So each rule below
681
+ * is (0,3,2) or more: the wrapper and `tbody` in front of the cell's class,
682
+ * which no first-column or density rule matches, and the order of the sheets
683
+ * cannot matter. */
684
+ /* `nullDisplay` — a NULL reads as one, not as the text "NULL". */
685
+ .twm-data-table-component .twm-preview-table tbody td.twm-dt-cell--null {
686
+ color: var(--text-dim, #666);
687
+ font-style: italic;
688
+ }
689
+ /* `emptyState` and `setError` with no rows: the box's own words, which may
690
+ * wrap — muted for an empty state, red for a failure, in both densities. Quiet
691
+ * while loading — an empty table that is still loading is not empty. */
692
+ .twm-data-table-component .twm-preview-table tbody td.twm-data-table__empty-cell.twm-data-table__empty-cell--state,
693
+ .twm-data-table-component .twm-preview-table tbody td.twm-data-table__empty-cell.twm-data-table__empty-cell--error {
694
+ text-align: center;
695
+ padding: 16px;
696
+ white-space: normal;
697
+ font-weight: normal;
698
+ color: var(--text-muted, #888);
699
+ }
700
+ .twm-data-table-component .twm-preview-table tbody td.twm-data-table__empty-cell.twm-data-table__empty-cell--error {
701
+ color: var(--color-danger, #c74e4e);
702
+ }
703
+ .twm-data-table-component--loading .twm-preview-table td.twm-data-table__empty-cell--state {
704
+ visibility: hidden;
705
+ }
706
+ /* `setError` with rows: a banner over the rows that are KEPT. */
707
+ .twm-data-table__error {
708
+ flex: 0 0 auto;
709
+ display: flex;
710
+ align-items: center;
711
+ gap: 6px;
712
+ padding: 4px 8px;
713
+ font-size: var(--font-size-sm, 12px);
714
+ color: var(--color-danger, #c74e4e);
715
+ background: rgba(199, 78, 78, 0.12);
716
+ border-bottom: 1px solid rgba(199, 78, 78, 0.4);
717
+ }
718
+ .twm-data-table__error .twm-data-table__error-icon {
719
+ font-size: 16px;
720
+ line-height: 1;
721
+ }
601
722
  /* Wizard mode: uniform column widths, no selection */
602
723
  .twm-preview-table-wrap--wizard .twm-preview-table {
603
724
  table-layout: auto;
@@ -1508,7 +1629,7 @@ body.twm-window-maximized .twm-resize-handle {
1508
1629
  }
1509
1630
  .twm-preview-table th, .twm-preview-table td {
1510
1631
  border-bottom: 1px solid #2a2a2a;
1511
- padding: var(--space-sm) 8px;
1632
+ padding: var(--twm-dt-cell-pad-block, var(--space-sm)) var(--twm-dt-cell-pad-inline, 8px);
1512
1633
  white-space: nowrap;
1513
1634
  }
1514
1635
  .twm-preview-table th {
package/css/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;
package/css/overrides.css CHANGED
@@ -1873,8 +1873,10 @@ tr:hover .twm-row-action { opacity: 1; }
1873
1873
  }
1874
1874
  .twm-data-table-component--compact .twm-preview-table th,
1875
1875
  .twm-data-table-component--compact .twm-preview-table td {
1876
- padding: 2px 6px;
1877
- line-height: 1.35;
1876
+ /* 0.5.0: the row-geometry tokens (tokens.css), falling back to exactly
1877
+ * the 0.4 compact values. */
1878
+ padding: var(--twm-dt-cell-pad-block, 2px) var(--twm-dt-cell-pad-inline, 6px);
1879
+ line-height: var(--twm-dt-cell-line-height, 1.35);
1878
1880
  }
1879
1881
  .twm-data-table-component--compact .twm-pagination-controls {
1880
1882
  padding: 1px 6px !important;
package/css/tokens.css CHANGED
@@ -179,4 +179,18 @@
179
179
  --ea-text-muted: var(--text-muted);
180
180
  --ea-text-dim: var(--text-dim);
181
181
  --ea-accent: var(--accent-bright);
182
+
183
+ /* ── DataTable row geometry (0.5.0) — DELIBERATELY UNSET ──────
184
+ Three tokens make every DataTable's rows one height, whatever its
185
+ density. Set them (on :root, or on any ancestor of the tables) and
186
+ both the normal and the compact density read them:
187
+
188
+ --twm-dt-cell-pad-block: 2px; the cell's top and bottom padding
189
+ --twm-dt-cell-pad-inline: 6px; its left and right padding
190
+ --twm-dt-cell-line-height: 1.35; the line height in a cell
191
+
192
+ They are NOT defined here, and must not be: each density falls back
193
+ to its OWN 0.4 values when a token is unset (normal: 6px 8px and an
194
+ inherited line height; compact: 2px 6px and 1.35), and a default here
195
+ would replace both densities' values with one. */
182
196
  }