@vtable-guild/vtable-guild 2.9.0-alpha.7 → 2.9.0-alpha.9

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 (43) hide show
  1. package/css/index.css +197 -0
  2. package/css/style.css +197 -18
  3. package/css/tailwind3-utilities.css +0 -18
  4. package/css/tailwind3.css +197 -0
  5. package/css/tailwind4.css +197 -0
  6. package/dist/css/index.css +197 -0
  7. package/dist/css/style.css +197 -18
  8. package/dist/css/tailwind3-utilities.css +0 -18
  9. package/dist/css/tailwind3.css +197 -0
  10. package/dist/css/tailwind4.css +197 -0
  11. package/dist/icons/src/ElFilterIcon.mjs +9 -0
  12. package/dist/index.full.mjs +6059 -5504
  13. package/dist/table/src/components/TableLightFilter.d.ts +76 -0
  14. package/dist/table/src/components/TableLightFilter.d.ts.map +1 -0
  15. package/dist/table/src/components/TableLightFilter.mjs +318 -0
  16. package/dist/table/src/components/TableLightFilter.test.d.ts +2 -0
  17. package/dist/table/src/components/TableLightFilter.test.d.ts.map +1 -0
  18. package/dist/table/src/components/TableQuery.d.ts +101 -46
  19. package/dist/table/src/components/TableQuery.d.ts.map +1 -1
  20. package/dist/table/src/components/TableQuery.mjs +312 -184
  21. package/dist/table/src/components/VTableQuery.vue.d.ts +4 -3
  22. package/dist/table/src/components/VTableQuery.vue.d.ts.map +1 -1
  23. package/dist/table/src/components/VTableQuery.vue.mjs +49 -30
  24. package/dist/table/src/controls.d.ts.map +1 -1
  25. package/dist/table/src/controls.mjs +95 -68
  26. package/dist/table/src/types/controls.d.ts +20 -1
  27. package/dist/table/src/types/controls.d.ts.map +1 -1
  28. package/dist/table/src/types/editable.d.ts +4 -3
  29. package/dist/table/src/types/editable.d.ts.map +1 -1
  30. package/dist/table/src/types/query-form.d.ts +71 -16
  31. package/dist/table/src/types/query-form.d.ts.map +1 -1
  32. package/dist/table/src/types/query-form.typecheck.d.ts +15 -0
  33. package/dist/table/src/types/query-form.typecheck.d.ts.map +1 -1
  34. package/dist/table/src/utils/queryFields.mjs +11 -11
  35. package/dist/table/src/utils/queryFilterLayout.d.ts +29 -0
  36. package/dist/table/src/utils/queryFilterLayout.d.ts.map +1 -0
  37. package/dist/table/src/utils/queryFilterLayout.mjs +74 -0
  38. package/dist/table/src/utils/queryFilterLayout.test.d.ts +2 -0
  39. package/dist/table/src/utils/queryFilterLayout.test.d.ts.map +1 -0
  40. package/dist/theme/src/query.d.ts +54 -49
  41. package/dist/theme/src/query.d.ts.map +1 -1
  42. package/dist/theme/src/query.mjs +25 -19
  43. package/package.json +1 -1
@@ -625,6 +625,71 @@
625
625
  * 新增主题只需在此添加一行 @import 即可。
626
626
  */
627
627
 
628
+ [data-query-grid] {
629
+ display: grid;
630
+ grid-template-columns: repeat(24, minmax(0, 1fr));
631
+ row-gap: var(--vtg-query-row-gap, 24px);
632
+ margin-inline: calc(var(--vtg-query-column-gap, 24px) / -2);
633
+ container-type: inline-size;
634
+ }
635
+
636
+ [data-query-grid] > :is([data-query-field], [data-query-actions]) {
637
+ box-sizing: border-box;
638
+ min-width: 0;
639
+ padding-inline: calc(var(--vtg-query-column-gap, 24px) / 2);
640
+ }
641
+
642
+ [data-query-grid] > [data-query-field][hidden] {
643
+ display: none;
644
+ }
645
+
646
+ [data-query-grid] > [data-query-field] > label {
647
+ width: var(--vtg-query-label-width, 80px);
648
+ max-width: 50%;
649
+ justify-content: end;
650
+ }
651
+
652
+ [data-query-layout='inline'] > [data-query-grid] > [data-query-field] > label {
653
+ width: auto;
654
+ }
655
+
656
+ [data-query-layout='vertical'] > [data-query-grid] > [data-query-field] {
657
+ flex-direction: column;
658
+ align-items: stretch;
659
+ gap: var(--vtg-query-vertical-label-gap, 4px);
660
+ }
661
+
662
+ [data-query-layout='vertical'] > [data-query-grid] > [data-query-field] > label {
663
+ width: auto;
664
+ max-width: none;
665
+ height: auto;
666
+ justify-content: start;
667
+ }
668
+
669
+ [data-query-layout='vertical'] > [data-query-grid] > [data-query-actions] {
670
+ align-self: end;
671
+ }
672
+
673
+ /* Host controls define unlayered widths. */
674
+ [data-query-grid] [data-query-value-type] > * {
675
+ box-sizing: border-box;
676
+ width: 100%;
677
+ max-width: 100%;
678
+ }
679
+
680
+ [data-query-layout='vertical'] > [data-query-grid] > [data-query-split] {
681
+ position: relative;
682
+ }
683
+
684
+ [data-query-layout='vertical'] > [data-query-grid] > [data-query-split]::after {
685
+ position: absolute;
686
+ width: calc(100cqi - var(--vtg-query-column-gap, 24px));
687
+ inset-block-end: calc(var(--vtg-query-row-gap, 24px) / -2);
688
+ inset-inline-end: calc(var(--vtg-query-column-gap, 24px) / 2);
689
+ border-block-end: 1px dashed var(--vtg-query-split-color, var(--vtg-table-border-color));
690
+ content: '';
691
+ }
692
+
628
693
  .vtg-table-popup {
629
694
  box-sizing: border-box;
630
695
  overflow: auto;
@@ -642,6 +707,138 @@
642
707
  transform-origin: top center;
643
708
  }
644
709
 
710
+ .vtg-light-filter {
711
+ display: flex;
712
+ min-width: 0;
713
+ flex-wrap: wrap;
714
+ gap: var(--vtg-query-light-gap, 8px);
715
+ }
716
+
717
+ .vtg-light-filter__chip {
718
+ display: inline-flex;
719
+ max-width: 100%;
720
+ align-items: stretch;
721
+ border: 1px solid var(--vtg-query-light-border, transparent);
722
+ border-radius: var(--vtg-query-light-radius, var(--vtg-btn-border-radius));
723
+ background: var(--vtg-query-light-bg, transparent);
724
+ color: var(--color-on-surface);
725
+ }
726
+
727
+ .vtg-light-filter__chip:hover,
728
+ .vtg-light-filter__chip:focus-within {
729
+ border-color: var(--vtg-query-light-hover-border, var(--color-primary));
730
+ background: var(--vtg-query-light-hover-bg, var(--color-surface-hover));
731
+ }
732
+
733
+ .vtg-light-filter__chip[data-active='true'] {
734
+ background: var(--vtg-query-light-active-bg, var(--vtg-table-row-selected-bg));
735
+ color: var(--vtg-query-light-active-color, var(--color-primary));
736
+ }
737
+
738
+ .vtg-light-filter__chip[data-invalid='true'] {
739
+ border-color: var(--vtg-cell-error);
740
+ color: var(--vtg-cell-error);
741
+ }
742
+
743
+ .vtg-light-filter__trigger,
744
+ .vtg-light-filter__clear {
745
+ display: inline-flex;
746
+ min-width: 0;
747
+ min-height: var(--vtg-query-light-height, var(--vtg-query-control-height, 32px));
748
+ align-items: center;
749
+ padding: 0 var(--vtg-query-light-trigger-padding, 8px);
750
+ border: 0;
751
+ border-radius: inherit;
752
+ background: transparent;
753
+ color: inherit;
754
+ cursor: pointer;
755
+ font: inherit;
756
+ white-space: nowrap;
757
+ }
758
+
759
+ .vtg-light-filter__clear {
760
+ padding-inline-start: 0;
761
+ }
762
+
763
+ .vtg-light-filter__trigger:disabled,
764
+ .vtg-light-filter__clear:disabled {
765
+ color: var(--color-text-disabled);
766
+ cursor: not-allowed;
767
+ }
768
+
769
+ .vtg-light-filter__trigger:focus-visible,
770
+ .vtg-light-filter__clear:focus-visible {
771
+ outline: 2px solid var(--color-primary);
772
+ outline-offset: -2px;
773
+ }
774
+
775
+ .vtg-light-filter__value {
776
+ overflow: hidden;
777
+ max-width: var(--vtg-query-light-summary-width, 244px);
778
+ text-overflow: ellipsis;
779
+ }
780
+
781
+ .vtg-light-filter__icon {
782
+ flex: none;
783
+ margin-inline-start: var(--vtg-query-light-icon-gap, 6px);
784
+ font-size: var(--vtg-query-light-icon-size, 10px);
785
+ }
786
+
787
+ .vtg-light-filter__collapse-icon {
788
+ width: var(--vtg-query-light-collapse-icon-size, 14px);
789
+ height: var(--vtg-query-light-collapse-icon-size, 14px);
790
+ flex: none;
791
+ }
792
+
793
+ .vtg-table-popup.vtg-light-filter__popup {
794
+ display: flex;
795
+ overflow: visible;
796
+ flex-direction: column;
797
+ padding: var(--vtg-query-light-popup-padding, 12px);
798
+ }
799
+
800
+ .vtg-light-filter__fields {
801
+ display: grid;
802
+ overflow: auto;
803
+ min-height: 0;
804
+ gap: var(--vtg-query-light-popup-gap, 12px);
805
+ }
806
+
807
+ .vtg-light-filter__field {
808
+ display: grid;
809
+ min-width: 0;
810
+ width: var(--vtg-query-light-control-width, 200px);
811
+ max-width: 100%;
812
+ gap: var(--vtg-query-light-label-gap, 4px);
813
+ }
814
+
815
+ .vtg-light-filter__field:is(
816
+ [data-query-value-type='dateRange'],
817
+ [data-query-value-type='dateTimeRange']
818
+ ) {
819
+ width: var(--vtg-query-light-range-width, 320px);
820
+ }
821
+
822
+ .vtg-light-filter__popup .vtg-light-filter__field > * {
823
+ box-sizing: border-box;
824
+ min-width: 0;
825
+ width: 100%;
826
+ }
827
+
828
+ .vtg-light-filter__error {
829
+ color: var(--vtg-cell-error);
830
+ font-size: var(--vtg-query-error-font-size, 12px);
831
+ }
832
+
833
+ .vtg-light-filter__footer {
834
+ display: flex;
835
+ flex: none;
836
+ flex-wrap: wrap;
837
+ justify-content: flex-end;
838
+ margin-top: var(--vtg-query-light-popup-gap, 12px);
839
+ gap: var(--vtg-query-action-gap, 8px);
840
+ }
841
+
645
842
  /* Hide native scrollbar — used by Scrollbar component */
646
843
  .scrollbar-none {
647
844
  scrollbar-width: none;
@@ -0,0 +1,9 @@
1
+ import { createSvgIcon as a } from "./createSvgIcon.mjs";
2
+ const o = a({
3
+ name: "ElFilterIcon",
4
+ viewBox: "0 0 1024 1024",
5
+ path: "M384 523.392V928a32 32 0 0 0 46.336 28.608l192-96A32 32 0 0 0 640 832V523.392l280.768-343.104a32 32 0 0 0-24.768-52.288H128a32 32 0 0 0-24.768 52.288L384 523.392z"
6
+ });
7
+ export {
8
+ o as default
9
+ };