@swiftwc/ui 0.0.0-dev.3 → 0.0.0-dev.5

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 (91) hide show
  1. package/generated/client/index.d.ts +5 -1
  2. package/generated/client/index.js +222 -7
  3. package/generated/components/body-view.d.ts +5 -0
  4. package/generated/components/body-view.js +11 -0
  5. package/generated/components/borderless-button.d.ts +9 -0
  6. package/generated/components/borderless-button.js +25 -0
  7. package/generated/components/bottom-bar.d.ts +10 -0
  8. package/generated/components/bottom-bar.js +73 -0
  9. package/generated/components/disclosure-group.d.ts +12 -0
  10. package/generated/components/disclosure-group.js +76 -0
  11. package/generated/components/index.d.ts +15 -1
  12. package/generated/components/index.js +15 -1
  13. package/generated/components/navigation-bar.d.ts +10 -0
  14. package/generated/components/navigation-bar.js +80 -0
  15. package/generated/components/navigation-split-view.d.ts +5 -0
  16. package/generated/components/navigation-split-view.js +9 -0
  17. package/generated/components/navigation-stack.d.ts +6 -0
  18. package/generated/components/navigation-stack.js +67 -0
  19. package/generated/components/screen-view.d.ts +5 -0
  20. package/generated/components/screen-view.js +9 -0
  21. package/generated/components/scroll-view.d.ts +8 -0
  22. package/generated/components/scroll-view.js +80 -0
  23. package/generated/components/sheet-view.d.ts +9 -0
  24. package/generated/components/sheet-view.js +26 -0
  25. package/generated/components/sidebar-toggle.d.ts +7 -0
  26. package/generated/components/sidebar-toggle.js +81 -0
  27. package/generated/components/sidebar-view.d.ts +9 -0
  28. package/generated/components/sidebar-view.js +26 -0
  29. package/generated/components/tab-bar.d.ts +9 -0
  30. package/generated/components/tab-bar.js +26 -0
  31. package/generated/components/tab-item.d.ts +6 -0
  32. package/generated/components/tab-item.js +35 -0
  33. package/generated/components/tab-view.d.ts +7 -0
  34. package/generated/components/tab-view.js +29 -0
  35. package/generated/components/v-keyboard.d.ts +9 -0
  36. package/generated/components/v-keyboard.js +82 -0
  37. package/generated/index.js +1 -1
  38. package/generated/internal/class.d.ts +18 -0
  39. package/generated/internal/class.js +18 -0
  40. package/generated/internal/utils/css-time.d.ts +1 -0
  41. package/generated/internal/utils/css-time.js +3 -0
  42. package/generated/internal/utils/index.d.ts +2 -1
  43. package/generated/internal/utils/index.js +2 -1
  44. package/generated/internal/utils/kebab-case.js +3 -3
  45. package/generated/namespace/index.d.ts +6 -0
  46. package/generated/namespace/index.js +1 -0
  47. package/generated/snapshot/index.d.ts +16 -0
  48. package/generated/snapshot/index.js +150 -0
  49. package/generated/styles.css +1298 -1
  50. package/package.json +8 -4
  51. package/scss/_base.scss +5 -0
  52. package/scss/_components.scss +39 -0
  53. package/scss/_dev.scss +68 -0
  54. package/scss/_functions.scss +21 -0
  55. package/scss/_mixins.scss +172 -0
  56. package/scss/_transitions.scss +11 -0
  57. package/scss/_vars.scss +57 -0
  58. package/scss/base/_layout.scss +40 -0
  59. package/scss/base/_reboot.scss +55 -0
  60. package/scss/base/_root.scss +69 -0
  61. package/scss/colors/_index.scss +99 -0
  62. package/scss/components/_body-view.scss +8 -0
  63. package/scss/components/_borderless-button.scss +14 -0
  64. package/scss/components/_disclosure-group.scss +80 -0
  65. package/scss/components/_full-screen.scss +13 -0
  66. package/scss/components/_index.scss +24 -0
  67. package/scss/components/_navigation-split-view.scss +364 -0
  68. package/scss/components/_navigation-stack.scss +11 -0
  69. package/scss/components/_scroll-view.scss +86 -0
  70. package/scss/components/_sheet-view.scss +60 -0
  71. package/scss/components/_sidebar-toggle.scss +61 -0
  72. package/scss/components/_sidebar-view.scss +63 -0
  73. package/scss/components/_tab-bar-stack.scss +101 -0
  74. package/scss/components/_tab-bar.scss +137 -0
  75. package/scss/components/_tab-view.scss +168 -0
  76. package/scss/components/_tool-bar-item-group.scss +37 -0
  77. package/scss/components/_tool-bar-item.scss +87 -0
  78. package/scss/components/_tool-bar.scss +90 -0
  79. package/scss/components/_toolbars.scss +100 -0
  80. package/scss/components/_v-keyboard.scss +12 -0
  81. package/scss/components/_v-stack.scss +19 -0
  82. package/scss/index.scss +11 -6
  83. package/scss/transitions/_bwd.navbar.scss +29 -0
  84. package/scss/transitions/_bwd.scss +55 -0
  85. package/scss/transitions/_dialog.scss +32 -0
  86. package/scss/transitions/_fwd.navbar.scss +46 -0
  87. package/scss/transitions/_fwd.scss +54 -0
  88. package/scss/transitions/_index.scss +182 -0
  89. package/generated/internal/snapshot.d.ts +0 -5
  90. package/generated/internal/snapshot.js +0 -23
  91. package/scss/_reboot.scss +0 -11
@@ -0,0 +1,63 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ [is='sidebar-view'] {
6
+ @include mixins.reset-dialog;
7
+
8
+ // dowh
9
+ width: 100%;
10
+ height: 100%;
11
+ position: relative;
12
+
13
+ @media (prefers-reduced-motion: no-preference) {
14
+ @include mixins.if-2col-split-view-fits {
15
+ navigation-split-view:has(
16
+ > dialog[is='sidebar-view']
17
+ )[preferred-compact-column='content']
18
+ & {
19
+ transition: margin-inline-start #{vars.$sidebar-transition-duration}
20
+ ease-out allow-discrete;
21
+ }
22
+ }
23
+ }
24
+
25
+ &::backdrop {
26
+ background-color: transparent;
27
+
28
+ @media (prefers-reduced-motion: no-preference) {
29
+ transition:
30
+ display var(--view-transition-duration) allow-discrete,
31
+ overlay var(--view-transition-duration) allow-discrete,
32
+ background-color var(--view-transition-duration);
33
+ will-change: background-color, overlay, display;
34
+ }
35
+ }
36
+
37
+ &[open] {
38
+ &::backdrop {
39
+ background-color: var(--view-transition-dialog-onscreen-backdrop-bg);
40
+ }
41
+
42
+ @starting-style {
43
+ &::backdrop {
44
+ background-color: transparent;
45
+ }
46
+ }
47
+
48
+ @starting-style {
49
+ & {
50
+ transform: translateY(var(--view-transition-dialog-offscreen-y));
51
+ }
52
+ }
53
+ }
54
+ }
55
+ }
56
+
57
+ @layer #{vars.$final-layer} {
58
+ [is='sidebar-view'] {
59
+ &[open] {
60
+ margin-inline-start: 0px !important;
61
+ }
62
+ }
63
+ }
@@ -0,0 +1,101 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ // [is='tab-bar'] > scroll-view {
6
+ // display: grid;
7
+ // // border-radius: inherit;
8
+ // }
9
+
10
+ // tab-bar-stack {
11
+ // box-shadow: inset 0 0 0 12px firebrick;
12
+ // }
13
+
14
+ @include mixins.if-iphone-portrait {
15
+ [is='tab-bar']>scroll-view {
16
+ grid-auto-flow: column;
17
+
18
+ // @include mixins.contain-overscroll;
19
+
20
+ // grid-auto-flow: column;
21
+
22
+ // overflow: auto clip;
23
+ }
24
+
25
+ tab-bar-stack {
26
+ grid-auto-flow: column;
27
+ margin-block: 0 !important; // scroll-view > * override
28
+ }
29
+ }
30
+
31
+ @include mixins.if-ipad-portrait {
32
+ tab-bar-stack {
33
+ grid-auto-flow: column;
34
+
35
+ [is='tab-bar'][open] & {
36
+ grid-auto-flow: row;
37
+
38
+ align-content: start;
39
+
40
+ row-gap: 0.5rem;
41
+ }
42
+
43
+ [is='tab-bar']:not([open]) & {
44
+ margin-block: 0 !important; // scroll-view > * override
45
+ }
46
+ }
47
+
48
+ scroll-view {
49
+ [is='tab-bar']>& {
50
+ @include mixins.contain-overscroll;
51
+
52
+ grid-auto-flow: column;
53
+
54
+ overflow: auto clip;
55
+ }
56
+
57
+ [is='tab-bar'][open]>& {
58
+ // padding-block-start: 30px;
59
+ grid-auto-flow: row;
60
+
61
+ overflow: clip auto;
62
+
63
+ @include mixins.make-scrollable;
64
+ }
65
+ }
66
+ }
67
+
68
+ @include mixins.if-iphone-landscape {
69
+ tab-bar-stack {
70
+ align-content: start;
71
+
72
+ row-gap: 0.5rem;
73
+ }
74
+
75
+ [is='tab-bar']>scroll-view {
76
+ overflow: clip auto;
77
+ @include mixins.contain-overscroll;
78
+ @include mixins.make-scrollable;
79
+ }
80
+ }
81
+
82
+ @include mixins.if-ipad-landscape {
83
+ tab-bar-stack {
84
+ align-content: start;
85
+
86
+ row-gap: 0.5rem;
87
+ }
88
+
89
+ [is='tab-bar']>scroll-view {
90
+ //
91
+
92
+
93
+ overflow: clip auto;
94
+ @include mixins.contain-overscroll;
95
+
96
+ @include mixins.make-scrollable;
97
+ }
98
+
99
+
100
+ }
101
+ }
@@ -0,0 +1,137 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ [is='tab-bar'] {
6
+ @include mixins.reset-dialog;
7
+
8
+ // dowh
9
+ overflow: clip;
10
+ width: fit-content;
11
+ height: auto;
12
+
13
+ position: fixed; // show always
14
+
15
+ background: #ffffff9e;
16
+ backdrop-filter: blur(4px);
17
+
18
+ box-shadow:
19
+ 0 0 0 1px #fff inset,
20
+ 0px 0px 4px 2px #0000001c;
21
+
22
+ transition: all #{vars.$sidebar-transition-duration} ease-out allow-discrete;
23
+
24
+ touch-action: none; // important for backdrop pans!
25
+
26
+ navigation-bar,
27
+ bottom-bar {
28
+ padding-inline: 0;
29
+ }
30
+
31
+
32
+ @include mixins.if-iphone-portrait {
33
+ max-width: var(--tab-bar-iphone-max-width);
34
+ height: var(--tab-bar-iphone-height);
35
+ // left: 50%;
36
+ border-radius: var(--tab-bar-iphone-border-radius);
37
+ inset: auto auto max(var(--safe-area-inset-bottom), var(--tab-bar-sidebar-spacing)) 50%;
38
+ transform: translateX(-50%);
39
+ //
40
+ grid-auto-flow: column;
41
+
42
+ &:not([open]) {
43
+ tool-bar {
44
+ display: none;
45
+ }
46
+ }
47
+ }
48
+
49
+
50
+
51
+
52
+ @include mixins.if-ipad-portrait {
53
+ width: var(--tab-bar-ipad-width);
54
+ height: var(--tab-bar-ipad-height);
55
+
56
+ inset: max(var(--safe-area-inset-top), var(--tab-bar-sidebar-spacing)) auto auto 50%;
57
+ transform: translateX(-50%);
58
+
59
+ border-radius: var(--tab-bar-ipad-border-radius);
60
+
61
+ grid-auto-flow: column;
62
+
63
+ // transition: all 250ms ease-out allow-discrete;
64
+
65
+ &:not([open]) {
66
+ tool-bar {
67
+ display: none;
68
+ }
69
+ }
70
+
71
+ &[open] {
72
+ // @include mixins.make-navbar;
73
+
74
+ inset: max(var(--safe-area-inset-top), var(--tab-bar-sidebar-spacing)) auto max(var(--safe-area-inset-bottom), var(--tab-bar-sidebar-spacing)) max(var(--safe-area-inset-left), var(--tab-bar-sidebar-spacing));
75
+
76
+ height: auto; // override topbar
77
+ transform: translateX(0);
78
+ width: var(--tab-bar-sidebar-width);
79
+
80
+ border-radius: var(--tab-bar-sidebar-border-radius);
81
+
82
+ grid-auto-flow: row;
83
+
84
+ &>* {
85
+ @include mixins.span-all;
86
+
87
+ --safe-area-inset-top: 0px !important; // reset navbar > span
88
+ --safe-area-inset-bottom: 0px !important; // reset navbar > span
89
+ }
90
+
91
+ // animation: slide-in 250ms ease-out forwards;
92
+ }
93
+ }
94
+
95
+ @include mixins.if-iphone-landscape {
96
+ inset: max(var(--safe-area-inset-top), var(--tab-bar-sidebar-spacing)) auto max(var(--safe-area-inset-bottom), var(--tab-bar-sidebar-spacing)) -100%;
97
+
98
+ width: var(--tab-bar-sidebar-width);
99
+
100
+ border-radius: var(--tab-bar-sidebar-border-radius);
101
+
102
+ &[open] {
103
+ left: max(var(--safe-area-inset-left), var(--tab-bar-sidebar-spacing));
104
+ // transform: translateX(0);
105
+
106
+ --tabview-padding-inline-start: 0px !important; // override tab-view prop
107
+
108
+ >scroll-view {
109
+ --canvas-bg: #ffffff9e;
110
+ }
111
+ }
112
+ }
113
+
114
+ @include mixins.if-ipad-landscape {
115
+ // grid-area: aside;
116
+ // position: relative;
117
+ // margin: 10px;
118
+ // height: 100svh;
119
+ inset: max(var(--safe-area-inset-top), var(--tab-bar-sidebar-spacing)) auto max(var(--safe-area-inset-bottom), var(--tab-bar-sidebar-spacing)) max(var(--safe-area-inset-left), var(--tab-bar-sidebar-spacing));
120
+
121
+ width: var(--tab-bar-sidebar-width);
122
+
123
+ // max-height: calc(
124
+ // var(--100lvh, 100lvh) - max(
125
+ // var(--safe-area-inset-top),
126
+ // var(--tab-bar-sidebar-spacing)
127
+ // ) - max(var(--safe-area-inset-bottom), var(--tab-bar-sidebar-spacing))
128
+ // );
129
+
130
+ border-radius: var(--tab-bar-sidebar-border-radius);
131
+
132
+ overflow: clip;
133
+
134
+ // animation: slide-in 250ms ease-out forwards;
135
+ }
136
+ }
137
+ }
@@ -0,0 +1,168 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ tab-view {
6
+ // grid-area: main;
7
+ grid-template-columns: subgrid; // inherits columns from container
8
+ grid-template-rows: subgrid; // inherits rows if needed
9
+ }
10
+
11
+ // @media (max-width: #{vars.$ipad-portrait-bp-max}) and (orientation: portrait) {
12
+ // }
13
+
14
+ // @media (min-width: #{vars.$ipad-portrait-bp-max}) and (orientation: portrait) {
15
+ // }
16
+
17
+ // @media (max-width: #{vars.$ipad-landscape-bp-max}) and (orientation: landscape) {
18
+ // }
19
+
20
+ // tab-view {
21
+ // position: fixed;
22
+ // width: 100px;
23
+ // height: 50px;
24
+ // left: 50%;
25
+ // bottom: var(--safe-area-inset-bottom);
26
+ // transform: translateX(-50%);
27
+ // background: yellow;
28
+ // }
29
+
30
+ // make tab-view responsive
31
+ body {
32
+ // grid-template: 'aside main' 1fr / 0px minmax(0, 1fr);
33
+ grid-template-rows: 1fr;
34
+ grid-template-columns: minmax(0px, 1fr);
35
+ // grid-template-areas: 'main';
36
+ // will-change: grid-template;
37
+ // transition: grid-template 750ms ease;
38
+ }
39
+
40
+ // body:has(tab-view input[type='checkbox']:checked) {
41
+ // grid-template: 'aside main' 1fr / 300px minmax(0, 1fr);
42
+ // }
43
+
44
+ @media (orientation: landscape) {
45
+ scroll-view:not(dialog scroll-view) {
46
+ tab-view navigation-stack > &,
47
+ tab-view navigation-split-view > &,
48
+ tab-view body-view > &,
49
+ tab-view & ~ navigation-bar,
50
+ tab-view & ~ bottom-bar {
51
+ --safe-area-inset-top: max(
52
+ env(safe-area-inset-top),
53
+ var(--tab-bar-sidebar-spacing)
54
+ );
55
+ --safe-area-inset-bottom: max(
56
+ env(safe-area-inset-bottom),
57
+ var(--tab-bar-sidebar-spacing)
58
+ );
59
+ }
60
+ }
61
+ tab-view navigation-split-view > [is='sidebar-view'] > scroll-view {
62
+ --safe-area-inset-top: max(
63
+ env(safe-area-inset-top),
64
+ var(--tab-bar-sidebar-spacing)
65
+ );
66
+ --safe-area-inset-bottom: max(
67
+ env(safe-area-inset-bottom),
68
+ var(--tab-bar-sidebar-spacing)
69
+ );
70
+ }
71
+ }
72
+
73
+ @include mixins.if-iphone-portrait {
74
+ scroll-view:not(dialog scroll-view) {
75
+ tab-view navigation-stack > &,
76
+ tab-view navigation-split-view > &,
77
+ tab-view body-view > &,
78
+ tab-view & ~ navigation-bar,
79
+ tab-view & ~ bottom-bar {
80
+ --safe-area-inset-bottom: max(
81
+ env(safe-area-inset-bottom),
82
+ var(--tab-bar-sidebar-spacing)
83
+ );
84
+ }
85
+ }
86
+ tab-view navigation-split-view > [is='sidebar-view'] > scroll-view {
87
+ --safe-area-inset-bottom: max(
88
+ env(safe-area-inset-bottom),
89
+ var(--tab-bar-sidebar-spacing)
90
+ );
91
+ }
92
+ }
93
+
94
+ @include mixins.if-iphone-landscape {
95
+ scroll-view:not(dialog scroll-view) {
96
+ // tab-view navigation-stack > &,
97
+ // tab-view navigation-split-view > &,
98
+ // tab-view body-view > &,
99
+ tab-view & ~ navigation-bar,
100
+ tab-view & ~ bottom-bar {
101
+ --safe-area-inset-left: var(--tabview-padding-inline-start, 0px);
102
+ }
103
+ }
104
+ }
105
+
106
+ @include mixins.if-ipad-portrait {
107
+ scroll-view:not(dialog scroll-view) {
108
+ tab-view navigation-stack > &,
109
+ tab-view navigation-split-view > &,
110
+ tab-view body-view > &,
111
+ tab-view & ~ navigation-bar,
112
+ tab-view & ~ bottom-bar {
113
+ --safe-area-inset-top: calc(
114
+ max(env(safe-area-inset-top), var(--tab-bar-sidebar-spacing)) +
115
+ var(--tab-bar-ipad-height)
116
+ );
117
+ }
118
+ }
119
+ tab-view navigation-split-view > [is='sidebar-view'] > scroll-view {
120
+ --safe-area-inset-top: calc(
121
+ max(env(safe-area-inset-top), var(--tab-bar-sidebar-spacing)) +
122
+ var(--tab-bar-ipad-height)
123
+ );
124
+ }
125
+ }
126
+
127
+ @include mixins.if-ipad-landscape {
128
+ // body:has(> tab-view) {
129
+ // grid-template-columns: 300px minmax(0px, 1fr);
130
+ // }
131
+
132
+ // tab-view {
133
+ // grid-column: 1 / -1; // span all columns
134
+ // grid-row: 1 / -1; // span all rows
135
+ // }
136
+
137
+ // tab-view {
138
+ // padding-inline-start: calc(
139
+ // max(var(--safe-area-inset-left), var(--tab-bar-sidebar-spacing)) +
140
+ // var(--tab-bar-sidebar-width)
141
+ // );
142
+ scroll-view:not(dialog scroll-view) {
143
+ tab-view navigation-stack > &,
144
+ tab-view navigation-split-view > &,
145
+ tab-view body-view > &,
146
+ tab-view & ~ navigation-bar,
147
+ tab-view & ~ bottom-bar {
148
+ --safe-area-inset-left: calc(
149
+ max(env(safe-area-inset-left), var(--tab-bar-sidebar-spacing)) +
150
+ var(--tab-bar-sidebar-width)
151
+ );
152
+ }
153
+ }
154
+ // }
155
+ }
156
+
157
+ // @media (min-width: 600px) and (orientation: landscape) {
158
+ // tab-view {
159
+ // position: relative;
160
+ // grid-area: aside;
161
+ // height: var(--100svh, 100svh);
162
+ // transform: none;
163
+ // left: 0;
164
+ // width: 300px;
165
+ // justify-self: end;
166
+ // }
167
+ // }
168
+ }
@@ -0,0 +1,37 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ tool-bar-item-group {
6
+ // pointer-events: all;
7
+
8
+ grid-auto-flow: column;
9
+ grid-template-columns: minmax(0, 1fr);
10
+ column-gap: var(--toolbar-col-gap);
11
+
12
+ background-color: var(--toolbar-cell-bg);
13
+ padding-inline: var(--toolbar-cell-inline-padding);
14
+ padding-block: var(--toolbar-cell-block-padding);
15
+ border-radius: var(--toolbar-cell-border-radius);
16
+ border-width: 0;
17
+
18
+ //
19
+ // --component-bg: white;
20
+ // --component-padding-inline: 5px;
21
+ // --component-padding-block: 5px;
22
+ // --component-border-radius: 99999px;
23
+ // --component-border-width: 0;
24
+
25
+ // button {
26
+ // // appearance: none;
27
+ // // -webkit-appearance: none;
28
+ // // box-shadow: none;
29
+ // // outline: 0;
30
+ // border: var(--component-border-width);
31
+ // background-color: var(--component-bg);
32
+ // padding-inline: var(--component-padding-inline);
33
+ // padding-block: var(--component-padding-block);
34
+ // border-radius: var(--component-border-radius);
35
+ // }
36
+ }
37
+ }
@@ -0,0 +1,87 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ tool-bar-item,
6
+ tab-item {
7
+ // background-color: red;
8
+ // padding: 5px;
9
+ // border-radius: 99999px;
10
+
11
+ // height: 40px;
12
+
13
+ // pointer-events: all;
14
+
15
+ //
16
+ --component-bg: var(--toolbar-cell-bg);
17
+ --component-padding-inline: var(--toolbar-cell-inline-padding);
18
+ --component-padding-block: var(--toolbar-cell-block-padding);
19
+ --component-border-radius: var(--toolbar-cell-border-radius);
20
+ --component-border-width: 0;
21
+
22
+ button,
23
+ input {
24
+ appearance: none;
25
+ -webkit-appearance: none;
26
+ // box-shadow: none;
27
+ // outline: 0;
28
+ border: var(--component-border-width);
29
+ background-color: var(--component-bg);
30
+ padding-inline: var(--component-padding-inline);
31
+ padding-block: var(--component-padding-block);
32
+ border-radius: var(--component-border-radius);
33
+ min-width: 25px; // NOTE: For inputs overflowing-x
34
+
35
+ // &:not(:disabled):not([readonly]) {
36
+ // &:focus-visible {
37
+ // background-color: var(--toolbar-cell-focus-bg);
38
+ // }
39
+ // // order matters! BEFORE active
40
+ // @media (pointer: fine) {
41
+ // &:hover {
42
+ // background-color: var(--toolbar-cell-focus-bg);
43
+ // }
44
+ // }
45
+ // // order matters! AFTER hover/fvisible
46
+ // &:active {
47
+ // background-color: var(--toolbar-cell-active-bg);
48
+ // }
49
+ // }
50
+ }
51
+ }
52
+ }
53
+
54
+ @layer #{vars.$colors-layer} {
55
+ tool-bar-item,
56
+ tab-item {
57
+ button,
58
+ input {
59
+ &:not(:disabled):not([readonly]) {
60
+ &:focus-visible {
61
+ background-color: var(--toolbar-cell-focus-bg);
62
+ }
63
+
64
+ // order matters! BEFORE active
65
+ @media (pointer: fine) {
66
+ &:hover {
67
+ background-color: var(--toolbar-cell-focus-bg);
68
+ }
69
+ }
70
+ }
71
+ }
72
+ }
73
+ }
74
+
75
+ @layer #{vars.$ui-layer} {
76
+ tool-bar-item,
77
+ tab-item {
78
+ button,
79
+ input {
80
+ &:not(:disabled):not([readonly]) {
81
+ &:active {
82
+ background-color: var(--toolbar-cell-active-bg);
83
+ }
84
+ }
85
+ }
86
+ }
87
+ }
@@ -0,0 +1,90 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ tool-bar {
6
+ // background-color: red;
7
+ position: sticky;
8
+ width: 100%;
9
+
10
+ place-items: center;
11
+ place-content: center;
12
+ // grid-template-columns: 1fr auto 1fr;
13
+
14
+ pointer-events: none;
15
+
16
+ > span {
17
+ display: grid;
18
+ grid-template-columns: 1fr auto 1fr;
19
+
20
+ &::before,
21
+ &::after {
22
+ content: '';
23
+ display: grid;
24
+ }
25
+
26
+ &::before {
27
+ height: 20px;
28
+ background: green;
29
+ }
30
+
31
+ &::after {
32
+ height: 20px;
33
+ background: darkgoldenrod;
34
+ }
35
+ }
36
+
37
+ @media (pointer: fine) {
38
+ & {
39
+ justify-content: start;
40
+ }
41
+ }
42
+ }
43
+
44
+ tool-bar[slot='navigation-bar'] {
45
+ top: 0;
46
+ height: calc(var(--safe-area-inset-top) + var(--navigation-bar-height));
47
+ padding-block-start: var(--safe-area-inset-top);
48
+ transform: translateY(calc(var(--safe-area-inset-top) * -1));
49
+
50
+ > span {
51
+ &::before {
52
+ width: calc(
53
+ var(--navbar-padding-inline-start, 0px) +
54
+ var(--toolbar-area-inset-left, 0px)
55
+ );
56
+ }
57
+
58
+ &::after {
59
+ width: var(--navbar-padding-inline-end, 0px);
60
+ }
61
+ }
62
+
63
+ // > div {
64
+ @include mixins.make-navbar(bottom);
65
+ // height: calc(var(--safe-area-inset-top) + 50px);
66
+ // }
67
+ }
68
+
69
+ tool-bar[slot='bottom-bar'] {
70
+ top: calc(100% - var(--tool-bar-height) - var(--safe-area-inset-bottom));
71
+ // background-color: red;
72
+ height: calc(var(--safe-area-inset-bottom) + var(--tool-bar-height));
73
+ padding-block-end: var(--safe-area-inset-bottom);
74
+ transform: translateY(var(--safe-area-inset-bottom));
75
+
76
+ > span {
77
+ &::before {
78
+ width: var(--toolbar-padding-inline-start);
79
+ }
80
+
81
+ &::after {
82
+ width: var(--toolbar-padding-inline-end);
83
+ }
84
+ }
85
+
86
+ // > div {
87
+ @include mixins.make-navbar(top);
88
+ // }
89
+ }
90
+ }