@swiftwc/ui 0.0.0-dev.66 → 0.0.0-dev.67

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 (32) hide show
  1. package/generated/components/h-stack.d.ts +4 -0
  2. package/generated/components/h-stack.js +4 -0
  3. package/generated/components/index.d.ts +1 -0
  4. package/generated/components/index.js +1 -0
  5. package/generated/components/label-view.d.ts +5 -0
  6. package/generated/components/label-view.js +5 -0
  7. package/generated/components/toggle-view.d.ts +28 -0
  8. package/generated/components/toggle-view.js +222 -0
  9. package/generated/components/v-stack.d.ts +4 -0
  10. package/generated/components/v-stack.js +4 -0
  11. package/generated/css/index.css +110 -31
  12. package/generated/events/index.d.ts +1 -0
  13. package/generated/events/index.js +1 -0
  14. package/generated/events/toggle-view.d.ts +9 -0
  15. package/generated/events/toggle-view.js +1 -0
  16. package/package.json +1 -1
  17. package/scss/_components.scss +2 -0
  18. package/scss/components/_date-picker.scss +15 -15
  19. package/scss/components/_h-stack.scss +17 -1
  20. package/scss/components/_index.scss +4 -0
  21. package/scss/components/_menu-view.scss +53 -49
  22. package/scss/components/_picker-view.scss +38 -39
  23. package/scss/components/_scroll-view-proxy.scss +4 -2
  24. package/scss/components/_section-view.scss +23 -22
  25. package/scss/components/_table-view.scss +6 -6
  26. package/scss/components/_text-field.scss +26 -26
  27. package/scss/components/_toggle-view.scss +79 -0
  28. package/scss/components/_tool-bar.scss +52 -52
  29. package/scss/mixins/_index.scss +9 -2
  30. package/scss/placeholders/_lists.scss +14 -12
  31. package/scss/transitions/_menu-view.scss +17 -15
  32. package/web-components.html-data/en.json +175 -0
@@ -16,80 +16,80 @@
16
16
  'top-bar'
17
17
  'spacer'
18
18
  'bottom-bar';
19
- }
20
19
 
21
- :where(& > *:not(sidebar-toggle), & > sidebar-toggle > tool-bar-item, tab-view > sidebar-toggle > tool-bar-item, navigation-split-view > sidebar-toggle > tool-bar-item) {
22
- backdrop-filter: var(--liquid-glass-backdrop-filter);
23
- box-shadow: var(--toolbar-cell-box-shadow);
20
+ &::part(top-bar),
21
+ &::part(bottom-bar) {
22
+ position: relative; // SAFARI BUG
24
23
 
25
- min-inline-size: var(--toolbar-cell-min-size);
24
+ padding-inline: var(--safe-area-inset-left, 0px) var(--safe-area-inset-right, 0px);
25
+ pointer-events: none;
26
26
 
27
- // tfo
28
- transform: var(--toolbar-cell-scale,);
29
- filter: var(--toolbar-cell-filter,);
30
- opacity: var(--toolbar-cell-opacity,);
27
+ grid-template-columns: auto 1fr auto;
28
+ column-gap: var(--toolbar-col-gap);
29
+ // grid-auto-rows: 40px;
31
30
 
32
- // min-width: calc(var(--tool-bar-block-size) - var(--toolbar-cell-block-padding-start) - var(--toolbar-cell-block-padding-end));
33
- }
31
+ grid-template-rows: var(--toolbar-cell-min-size);
34
32
 
35
- :where(&)::part(top-bar),
36
- :where(&)::part(bottom-bar) {
37
- position: relative; // SAFARI BUG
33
+ // place-items: center;
34
+ place-content: center; // middle of y axis
35
+ }
38
36
 
39
- padding-inline: var(--safe-area-inset-left, 0px) var(--safe-area-inset-right, 0px);
40
- pointer-events: none;
37
+ &::part(top-bar) {
38
+ // padding-inline: calc(
39
+ // var(--safe-area-inset-left, 0px) + var(--navbar-area-inset-left, 0px)
40
+ // )
41
+ // calc(
42
+ // var(--safe-area-inset-right, 0px) + var(--navbar-area-inset-right, 0px)
43
+ // );
41
44
 
42
- grid-template-columns: auto 1fr auto;
43
- column-gap: var(--toolbar-col-gap);
44
- // grid-auto-rows: 40px;
45
+ grid-area: top-bar;
45
46
 
46
- grid-template-rows: var(--toolbar-cell-min-size);
47
+ block-size: calc(var(--safe-area-inset-top) + var(--navigation-bar-block-size));
47
48
 
48
- // place-items: center;
49
- place-content: center; // middle of y axis
50
- }
49
+ padding-block-start: var(--safe-area-inset-top);
50
+ }
51
51
 
52
- :where(&)::part(top-bar) {
53
- // padding-inline: calc(
54
- // var(--safe-area-inset-left, 0px) + var(--navbar-area-inset-left, 0px)
55
- // )
56
- // calc(
57
- // var(--safe-area-inset-right, 0px) + var(--navbar-area-inset-right, 0px)
58
- // );
52
+ &::part(bottom-bar) {
53
+ // padding-inline: calc(
54
+ // var(--safe-area-inset-left, 0px) + var(--toolbar-area-inset-left, 0px)
55
+ // )
56
+ // calc(
57
+ // var(--safe-area-inset-right, 0px) + var(--toolbar-area-inset-right, 0px)
58
+ // );
59
59
 
60
- grid-area: top-bar;
60
+ grid-area: bottom-bar;
61
61
 
62
- block-size: calc(var(--safe-area-inset-top) + var(--navigation-bar-block-size));
62
+ block-size: calc(var(--safe-area-inset-bottom) + var(--tool-bar-block-size));
63
63
 
64
- padding-block-start: var(--safe-area-inset-top);
65
- }
64
+ padding-block-end: var(--safe-area-inset-bottom);
65
+ }
66
66
 
67
- :where(&)::part(bottom-bar) {
68
- // padding-inline: calc(
69
- // var(--safe-area-inset-left, 0px) + var(--toolbar-area-inset-left, 0px)
70
- // )
71
- // calc(
72
- // var(--safe-area-inset-right, 0px) + var(--toolbar-area-inset-right, 0px)
73
- // );
67
+ &::part(toolbar-leading-stack),
68
+ &::part(toolbar-principal-stack),
69
+ &::part(toolbar-trailing-stack) {
70
+ display: grid;
74
71
 
75
- grid-area: bottom-bar;
72
+ grid-auto-flow: column;
73
+ grid-template-columns: minmax(0, 1fr);
76
74
 
77
- block-size: calc(var(--safe-area-inset-bottom) + var(--tool-bar-block-size));
75
+ column-gap: var(--toolbar-col-gap);
78
76
 
79
- padding-block-end: var(--safe-area-inset-bottom);
77
+ padding-inline: var(--toolbar-col-gap) var(--toolbar-col-gap);
78
+ }
80
79
  }
81
80
 
82
- :where(&)::part(toolbar-leading-stack),
83
- :where(&)::part(toolbar-principal-stack),
84
- :where(&)::part(toolbar-trailing-stack) {
85
- display: grid;
81
+ :where(& > *:not(sidebar-toggle), & > sidebar-toggle > tool-bar-item, tab-view > sidebar-toggle > tool-bar-item, navigation-split-view > sidebar-toggle > tool-bar-item) {
82
+ backdrop-filter: var(--liquid-glass-backdrop-filter);
83
+ box-shadow: var(--toolbar-cell-box-shadow);
86
84
 
87
- grid-auto-flow: column;
88
- grid-template-columns: minmax(0, 1fr);
85
+ min-inline-size: var(--toolbar-cell-min-size);
89
86
 
90
- column-gap: var(--toolbar-col-gap);
87
+ // tfo
88
+ transform: var(--toolbar-cell-scale,);
89
+ filter: var(--toolbar-cell-filter,);
90
+ opacity: var(--toolbar-cell-opacity,);
91
91
 
92
- padding-inline: var(--toolbar-col-gap) var(--toolbar-col-gap);
92
+ // min-width: calc(var(--tool-bar-block-size) - var(--toolbar-cell-block-padding-start) - var(--toolbar-cell-block-padding-end));
93
93
  }
94
94
 
95
95
  @include mixins.if-ipad-sheet-fits {
@@ -111,9 +111,16 @@
111
111
  }
112
112
  }
113
113
 
114
- @mixin contain-overscroll() {
115
- overscroll-behavior: contain;
114
+ @mixin contain-overscroll($axis: both) {
116
115
  -webkit-overflow-scrolling: touch;
116
+
117
+ @if $axis == inline {
118
+ overscroll-behavior-inline: contain;
119
+ } @else if $axis == block {
120
+ overscroll-behavior-block: contain;
121
+ } @else {
122
+ overscroll-behavior: contain;
123
+ }
117
124
  }
118
125
 
119
126
  @mixin make-toolbar-pseudos($dir: bottom) {
@@ -352,24 +352,26 @@ $list-item-selector: ':not([slot], section-view, [is="disclosure-group"], picker
352
352
 
353
353
  // SECTION: style section heders/footers
354
354
  section-view:not(section-view section-view, menu-view *) {
355
- :where(&)::part(section-footer-stack),
356
- :where(&)::part(section-header-stack) {
357
- // outline: magenta 4px solid;
358
- padding-inline: calc(var(--list--root-padding-inline, 0px) + var(--itempadistart, 0px)) calc(var(--list--root-padding-inline, 0px) + var(--itempadiend, 0px));
355
+ :where(&) {
356
+ &::part(section-footer-stack),
357
+ &::part(section-header-stack) {
358
+ // outline: magenta 4px solid;
359
+ padding-inline: calc(var(--list--root-padding-inline, 0px) + var(--itempadistart, 0px)) calc(var(--list--root-padding-inline, 0px) + var(--itempadiend, 0px));
359
360
 
360
- margin-inline: calc(var(--list--root-padding-inline) * -1);
361
+ margin-inline: calc(var(--list--root-padding-inline) * -1);
361
362
 
362
- padding-block: 1px;
363
- }
363
+ padding-block: 1px;
364
+ }
364
365
 
365
- :where(&)::part(section-header-stack) {
366
- top: calc(var(--list--sticky-block-size, 0px) + var(--navigation-bar-block-size));
366
+ &::part(section-header-stack) {
367
+ top: calc(var(--list--sticky-block-size, 0px) + var(--navigation-bar-block-size));
367
368
 
368
- position: sticky;
369
+ position: sticky;
369
370
 
370
- // backdrop-filter: blur(20px);
371
+ // backdrop-filter: blur(20px);
371
372
 
372
- // text-shadow: 0 0 5px var(--face);
373
+ // text-shadow: 0 0 5px var(--face);
374
+ }
373
375
  }
374
376
  }
375
377
 
@@ -4,22 +4,24 @@
4
4
  @layer #{vars.$transitions-layer} {
5
5
  @media (prefers-reduced-motion: no-preference) {
6
6
  menu-view {
7
- :where(&)::part(menu-summary) {
8
- transition:
9
- transform var(--touchglass-transition-duration) allow-discrete ease-out,
10
- filter var(--touchglass-transition-duration) allow-discrete ease-out;
11
- will-change: transform;
12
- }
7
+ :where(&) {
8
+ &::part(menu-summary) {
9
+ transition:
10
+ transform var(--touchglass-transition-duration) allow-discrete ease-out,
11
+ filter var(--touchglass-transition-duration) allow-discrete ease-out;
12
+ will-change: transform;
13
+ }
13
14
 
14
- :where(&)::part(menu-dialog) {
15
- // transition:
16
- // block-size var(--menu-animation-duration) allow-discrete ease-out,
17
- // inline-size var(--menu-animation-duration) allow-discrete ease-out,
18
- // display var(--menu-animation-duration) allow-discrete ease-out,
19
- // overlay var(--menu-animation-duration) allow-discrete ease-out,
20
- // transform var(--menu-animation-duration) allow-discrete ease-out;
21
- transition: all var(--touchglass-transition-duration) allow-discrete ease-out;
22
- // will-change: block-size, inline-size, transform, overlay, display;
15
+ &::part(menu-dialog) {
16
+ // transition:
17
+ // block-size var(--menu-animation-duration) allow-discrete ease-out,
18
+ // inline-size var(--menu-animation-duration) allow-discrete ease-out,
19
+ // display var(--menu-animation-duration) allow-discrete ease-out,
20
+ // overlay var(--menu-animation-duration) allow-discrete ease-out,
21
+ // transform var(--menu-animation-duration) allow-discrete ease-out;
22
+ transition: all var(--touchglass-transition-duration) allow-discrete ease-out;
23
+ // will-change: block-size, inline-size, transform, overlay, display;
24
+ }
23
25
  }
24
26
  }
25
27
  }
@@ -182,6 +182,21 @@
182
182
  "name": "spacing",
183
183
  "description": "\nDescription: The gap between the primary axis",
184
184
  "valueSet": "spacingSet"
185
+ },
186
+ {
187
+ "name": "alignment - The cross",
188
+ "description": "\nDescription: axis alignment",
189
+ "valueSet": "alignmentSet"
190
+ },
191
+ {
192
+ "name": "distribution - The main",
193
+ "description": "\nDescription: axis alignment",
194
+ "valueSet": "distributionSet"
195
+ },
196
+ {
197
+ "name": "placement - The main",
198
+ "description": "\nDescription: axis alignment",
199
+ "valueSet": "placementSet"
185
200
  }
186
201
  ]
187
202
  },
@@ -195,7 +210,13 @@
195
210
  },
196
211
  {
197
212
  "name": "label-view",
213
+ "description": "",
198
214
  "attributes": [
215
+ {
216
+ "name": "font",
217
+ "description": "\nDescription: Sets the default font for text in this view.",
218
+ "valueSet": "fontSet"
219
+ },
199
220
  {
200
221
  "name": "system-image"
201
222
  },
@@ -493,6 +514,33 @@
493
514
  }
494
515
  ]
495
516
  },
517
+ {
518
+ "name": "toggle-view",
519
+ "description": "",
520
+ "attributes": [
521
+ {
522
+ "name": "label"
523
+ },
524
+ {
525
+ "name": "name"
526
+ },
527
+ {
528
+ "name": "value"
529
+ },
530
+ {
531
+ "name": "is-on"
532
+ },
533
+ {
534
+ "name": "keyboard-type"
535
+ },
536
+ {
537
+ "name": "required"
538
+ },
539
+ {
540
+ "name": "disabled"
541
+ }
542
+ ]
543
+ },
496
544
  {
497
545
  "name": "tool-bar-item-group"
498
546
  },
@@ -576,6 +624,21 @@
576
624
  "name": "spacing",
577
625
  "description": "\nDescription: The gap between the primary axis",
578
626
  "valueSet": "spacingSet"
627
+ },
628
+ {
629
+ "name": "alignment - The cross",
630
+ "description": "\nDescription: axis alignment",
631
+ "valueSet": "alignmentSet"
632
+ },
633
+ {
634
+ "name": "distribution - The main",
635
+ "description": "\nDescription: axis alignment",
636
+ "valueSet": "distributionSet"
637
+ },
638
+ {
639
+ "name": "placement - The main",
640
+ "description": "\nDescription: axis alignment",
641
+ "valueSet": "placementSet"
579
642
  }
580
643
  ]
581
644
  }
@@ -608,6 +671,59 @@
608
671
  }
609
672
  ],
610
673
  "valueSets": [
674
+ {
675
+ "name": "fontSet",
676
+ "values": [
677
+ {
678
+ "name": "footnote",
679
+ "description": "A font with the footnote text style"
680
+ },
681
+ {
682
+ "name": "caption2",
683
+ "description": "Create a font with the alternate caption text style"
684
+ },
685
+ {
686
+ "name": "caption",
687
+ "description": "A font with the caption text style"
688
+ },
689
+ {
690
+ "name": "callout",
691
+ "description": "A font with the callout text style"
692
+ },
693
+ {
694
+ "name": "body",
695
+ "description": "A font with the body text style"
696
+ },
697
+ {
698
+ "name": "subheadline",
699
+ "description": "A font with the subheadline text style"
700
+ },
701
+ {
702
+ "name": "headline",
703
+ "description": "A font with the headline text style"
704
+ },
705
+ {
706
+ "name": "title3",
707
+ "description": "Create a font for third level hierarchical headings"
708
+ },
709
+ {
710
+ "name": "title2",
711
+ "description": "Create a font for second level hierarchical headings"
712
+ },
713
+ {
714
+ "name": "title",
715
+ "description": "A font with the title text style"
716
+ },
717
+ {
718
+ "name": "large-title",
719
+ "description": "A font with the large title text style"
720
+ },
721
+ {
722
+ "name": "extra-large-title",
723
+ "description": "Create a font with the extra large title text style"
724
+ }
725
+ ]
726
+ },
611
727
  {
612
728
  "name": "spacingSet",
613
729
  "values": [
@@ -699,6 +815,65 @@
699
815
  }
700
816
  ]
701
817
  },
818
+ {
819
+ "name": "alignmentSet",
820
+ "values": [
821
+ {
822
+ "name": "leading",
823
+ "description": "start cross-axis alignment"
824
+ },
825
+ {
826
+ "name": "center",
827
+ "description": "center cross-axis alignment"
828
+ },
829
+ {
830
+ "name": "trailing",
831
+ "description": "end cross-axis alignment"
832
+ },
833
+ {
834
+ "name": "fill",
835
+ "description": "stretch cross-axis alignment"
836
+ }
837
+ ]
838
+ },
839
+ {
840
+ "name": "distributionSet",
841
+ "values": [
842
+ {
843
+ "name": "leading",
844
+ "description": "start cross-axis distribution"
845
+ },
846
+ {
847
+ "name": "center",
848
+ "description": "center cross-axis distribution"
849
+ },
850
+ {
851
+ "name": "trailing",
852
+ "description": "end cross-axis distribution"
853
+ },
854
+ {
855
+ "name": "fill",
856
+ "description": "stretch cross-axis distribution"
857
+ }
858
+ ]
859
+ },
860
+ {
861
+ "name": "placementSet",
862
+ "values": [
863
+ {
864
+ "name": "fill",
865
+ "description": "short cut for `distribution=\"fill\" alignment=\"fill\"`"
866
+ },
867
+ {
868
+ "name": "leading fill",
869
+ "description": "short cut for `distribution=\"leading\" alignment=\"fill\"`"
870
+ },
871
+ {
872
+ "name": "fill leading",
873
+ "description": "short cut for `distribution=\"fill\" alignment=\"leading\"`"
874
+ }
875
+ ]
876
+ },
702
877
  {
703
878
  "name": "frameWidth",
704
879
  "values": [