@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
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@swiftwc/ui",
3
- "version": "0.0.0-dev.3",
4
- "description": "Elegant SwiftUI-inspired web components for ambitious web apps and web extensions.",
3
+ "version": "0.0.0-dev.5",
4
+ "description": "Elegant SwiftUI-inspired web components for standalone web apps and web extensions.",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -43,7 +43,8 @@
43
43
  "default": "./generated/client/index.js"
44
44
  },
45
45
  "./styles.css": "./generated/styles.css",
46
- "./scss": "./scss/index.scss"
46
+ "./scss": "./scss/index.scss",
47
+ "./scss/*": "./scss/*.scss"
47
48
  },
48
49
  "bin": {
49
50
  "swiftwc": "./generated/index.js"
@@ -51,8 +52,11 @@
51
52
  "scripts": {
52
53
  "prebuild": "rm -rf generated",
53
54
  "build": "npm run build:ts && npm run build:scss",
55
+ "build:ts:watch": "npm run prebuild && tsc --watch",
54
56
  "build:ts": "tsc",
55
- "build:scss": "sass --no-source-map scss/index.scss generated/styles.css"
57
+ "build:scss": "sass --no-source-map scss/index.scss generated/styles.css",
58
+ "format:check": "prettier . --check",
59
+ "format:write": "prettier . --write"
56
60
  },
57
61
  "devDependencies": {
58
62
  "sass": "^1.97.2"
@@ -0,0 +1,5 @@
1
+ @forward 'base/root';
2
+
3
+ @forward 'base/reboot';
4
+
5
+ @forward 'base/layout';
@@ -0,0 +1,39 @@
1
+ @forward 'components/index';
2
+
3
+ @forward 'components/v-keyboard';
4
+
5
+ @forward 'components/disclosure-group';
6
+
7
+ @forward 'components/body-view';
8
+
9
+ @forward 'components/tab-view';
10
+
11
+ @forward 'components/tab-bar';
12
+
13
+ @forward 'components/tab-bar-stack';
14
+
15
+ @forward 'components/sidebar-toggle';
16
+
17
+ @forward 'components/full-screen';
18
+
19
+ @forward 'components/sheet-view';
20
+
21
+ @forward 'components/navigation-stack';
22
+
23
+ @forward 'components/navigation-split-view';
24
+
25
+ @forward 'components/toolbars';
26
+
27
+ @forward 'components/sidebar-view';
28
+
29
+ @forward 'components/scroll-view';
30
+
31
+ @forward 'components/v-stack';
32
+
33
+ @forward 'components/tool-bar';
34
+
35
+ @forward 'components/tool-bar-item';
36
+
37
+ @forward 'components/tool-bar-item-group';
38
+
39
+ @forward 'components/borderless-button';
package/scss/_dev.scss ADDED
@@ -0,0 +1,68 @@
1
+ @layer final {
2
+ #console {
3
+ position: fixed;
4
+ left: 30%;
5
+ bottom: 50%;
6
+ z-index: 999999999;
7
+ }
8
+
9
+ #tb {
10
+ position: fixed;
11
+ box-shadow: inset 0 0 0 12px greenyellow;
12
+ top: env(titlebar-area-y);
13
+ width: env(titlebar-area-width);
14
+ left: env(titlebar-area-x);
15
+ height: env(titlebar-area-height);
16
+ z-index: 999999999;
17
+ }
18
+
19
+ #sa {
20
+ position: fixed;
21
+ box-shadow: inset 0 0 0 10px green;
22
+ inset: env(safe-area-inset-top) env(safe-area-inset-right)
23
+ env(safe-area-inset-bottom) env(safe-area-inset-left);
24
+ z-index: 999999999;
25
+ }
26
+
27
+ #kb {
28
+ display: grid;
29
+ position: fixed;
30
+ box-shadow: inset 0 0 0 8px red;
31
+ background-color: rosybrown;
32
+ top: env(keyboard-inset-top, var(--keyboard-inset-top));
33
+ /* right: env(keyboard-inset-right, 0); */
34
+ left: env(keyboard-inset-left, 0);
35
+ /* bottom: env(keyboard-inset-bottom, 0px); */
36
+ height: env(keyboard-inset-height, var(--keyboard-inset-height));
37
+ width: env(keyboard-inset-width, 100lvw);
38
+ z-index: 999999999;
39
+ }
40
+
41
+ #dv {
42
+ position: fixed;
43
+ box-shadow: inset 0 0 0 6px blue;
44
+ top: 0vh;
45
+ left: 0vw;
46
+ width: 100vw;
47
+ height: 100vh;
48
+ z-index: 999999999;
49
+ }
50
+ #sv {
51
+ position: fixed;
52
+ box-shadow: inset 0 0 0 4px magenta;
53
+ top: 0svh;
54
+ left: 0svw;
55
+ width: 100svw;
56
+ height: 100svh;
57
+ z-index: 999999999;
58
+ }
59
+ #lv {
60
+ position: fixed;
61
+ box-shadow: inset 0 0 0 2px maroon;
62
+ top: 0lvh;
63
+ left: 0lvw;
64
+ width: 100lvw;
65
+ height: 100lvh;
66
+ z-index: 999999999;
67
+ }
68
+ }
@@ -0,0 +1,21 @@
1
+ @use 'sass:math';
2
+ @use 'sass:string';
3
+
4
+ @function subtract-tiny($value) {
5
+ @if math.unit($value) == 'px' {
6
+ @return $value - 0.01px;
7
+ } @else if math.unit($value) == 'rem' {
8
+ @return $value - 0.0001rem; // “very large” subtraction
9
+ } @else {
10
+ @warn "Unsupported unit: #{unit($value)}";
11
+ @return $value;
12
+ }
13
+ }
14
+
15
+ @function map-to-query($map) {
16
+ $parts: '';
17
+ @each $key, $value in $map {
18
+ $parts: string.insert($parts, '&#{$key}=#{$value}', 0);
19
+ }
20
+ @return string.slice($parts, 2);
21
+ }
@@ -0,0 +1,172 @@
1
+ @use 'vars';
2
+
3
+ @mixin span-all {
4
+ grid-column: 1 / -1; // span all columns
5
+ grid-row: 1 / -1; // span all rows
6
+ }
7
+
8
+ @mixin make-scrollable {
9
+ & > * {
10
+ @include span-all;
11
+ // grid-column: 1 / -1; // span all columns
12
+ // grid-row: 1 / -1; // span all rows
13
+ }
14
+
15
+ &::before {
16
+ @include span-all;
17
+ // grid-column: 1 / -1; // span all columns
18
+ // grid-row: 1 / -1; // span all rows
19
+ content: '';
20
+ display: block;
21
+ height: calc(100% + 1px); /* creates overflow */
22
+ // background-color: red;
23
+ z-index: -1;
24
+ pointer-events: none;
25
+ }
26
+ }
27
+
28
+ @mixin contain-overscroll() {
29
+ overscroll-behavior: contain;
30
+ -webkit-overflow-scrolling: touch;
31
+ }
32
+
33
+ @mixin reset-dialog {
34
+ // position: absolute;
35
+ inset-inline: 0px;
36
+ inset-block: 0px; //inset-inline-start: 0px;
37
+ // width: fit-content;
38
+ // height: fit-content;
39
+ margin: 0px; //margin-top: auto;
40
+ border: none; //border-top-style: solid;border-right-style: solid;border-bottom-style: solid;border-left-style: solid;
41
+ padding: 0px; //padding-top: 1em;
42
+ background-color: transparent; //background-color: canvas;
43
+ color: var(--primary-text); //color: canvastext;
44
+ // display: none;
45
+
46
+ // dialog:modal {
47
+ // position: fixed;
48
+ // overflow-x: auto;
49
+ // overflow-y: auto;
50
+ // inset-block-start: 0px;
51
+ max-width: 100lvw; //max-width: calc(100% - 2em - 6px);
52
+ max-height: 100lvh; //max-height: calc(100% - 2em - 6px);
53
+ // visibility: visible;
54
+ // }
55
+
56
+ outline: none;
57
+ }
58
+
59
+ @mixin make-navbar($dir: bottom) {
60
+ &:before,
61
+ &:after {
62
+ backface-visibility: hidden;
63
+
64
+ content: '';
65
+ inset: 0;
66
+ position: absolute;
67
+ pointer-events: none;
68
+
69
+ z-index: -1;
70
+ }
71
+
72
+ &:before {
73
+ backdrop-filter: blur(2px);
74
+ mask-image: linear-gradient(to #{$dir}, #000 50%, #0000 100%);
75
+ }
76
+
77
+ &:after {
78
+ background-image: linear-gradient(
79
+ to #{$dir},
80
+ var(--canvas-bg) 0,
81
+ #0000 100%
82
+ );
83
+ }
84
+ }
85
+
86
+ @mixin vt-toolbar-item-offscreen-keyframe($important: false) {
87
+ @if $important {
88
+ transform: scale(
89
+ var(--view-transition-toolbar-cell-offscreen-scale)
90
+ ) !important;
91
+ filter: blur(10px) !important;
92
+ opacity: 0 !important;
93
+ } @else {
94
+ transform: scale(var(--view-transition-toolbar-cell-offscreen-scale));
95
+ filter: blur(10px);
96
+ opacity: 0;
97
+ }
98
+ }
99
+
100
+ @mixin vt-toolbar-item-onscreen-keyframe($important: false) {
101
+ @if $important {
102
+ transform: scale(
103
+ var(--view-transition-toolbar-cell-onscreen-scale)
104
+ ) !important;
105
+ filter: none !important;
106
+ opacity: 1 !important;
107
+ } @else {
108
+ transform: scale(var(--view-transition-toolbar-cell-onscreen-scale));
109
+ filter: none;
110
+ opacity: 1;
111
+ }
112
+ }
113
+
114
+ @mixin toolbar-item-vt-state($transform, $filter, $opacity) {
115
+ transform: $transform;
116
+ filter: $filter;
117
+ opacity: $opacity;
118
+ }
119
+
120
+ @mixin if-iphone-landscape {
121
+ @media (max-width: #{vars.$ipad-landscape-bp-max}) and (orientation: landscape) {
122
+ @content;
123
+ }
124
+ }
125
+
126
+ @mixin if-iphone-portrait {
127
+ @media (max-width: #{vars.$ipad-portrait-bp-max}) and (orientation: portrait) {
128
+ @content;
129
+ }
130
+ }
131
+
132
+ @mixin if-ipad-landscape {
133
+ @media (min-width: #{vars.$ipad-landscape-bp-min}) and (orientation: landscape) {
134
+ @content;
135
+ }
136
+ }
137
+
138
+ @mixin if-ipad-portrait {
139
+ @media (min-width: #{vars.$ipad-portrait-bp-min}) and (orientation: portrait) {
140
+ @content;
141
+ }
142
+ }
143
+
144
+ @mixin if-ipad-sheet-fits {
145
+ @media (min-width: #{vars.$ipad-sheet-view-width}) and (min-height: #{vars.$ipad-sheet-view-height}) {
146
+ @content;
147
+ }
148
+ }
149
+
150
+ @mixin if-2col-split-view-fits {
151
+ @media (min-width: #{vars.$nav-split-view-2col-bp-min}) {
152
+ @content;
153
+ }
154
+ }
155
+
156
+ @mixin if-3col-split-view-fits {
157
+ @media (min-width: #{vars.$nav-split-view-3col-bp-min}) {
158
+ @content;
159
+ }
160
+ }
161
+
162
+ @mixin ifnot-2col-split-view-fits {
163
+ @media (max-width: #{vars.$nav-split-view-2col-bp-max}) {
164
+ @content;
165
+ }
166
+ }
167
+
168
+ @mixin ifnot-3col-split-view-fits {
169
+ @media (max-width: #{vars.$nav-split-view-3col-bp-max}) {
170
+ @content;
171
+ }
172
+ }
@@ -0,0 +1,11 @@
1
+ @forward 'transitions/index';
2
+
3
+ @forward 'transitions/fwd';
4
+
5
+ @forward 'transitions/bwd';
6
+
7
+ @forward 'transitions/fwd.navbar';
8
+
9
+ @forward 'transitions/bwd.navbar';
10
+
11
+ @forward 'transitions/dialog';
package/scss/_vars.scss CHANGED
@@ -1,3 +1,60 @@
1
+ @use 'functions';
2
+ @use 'sass:math';
3
+
1
4
  $base-layer: base !default;
2
5
  $components-layer: components !default;
6
+ $colors-layer: colors !default;
7
+ $ui-layer: actions !default;
3
8
  $transitions-layer: transitions !default;
9
+ $final-layer: final !default;
10
+
11
+ $vt-fwd-class-name: fwd !default;
12
+
13
+ $disclosure-group-contents-height-css-prop: --disclosure-group-contents-height !default;
14
+ $disclosure-group-animation-duration-css-prop: --disclosure-group-animation-duration !default;
15
+ $disclosure-group-animation-close-class: close !default;
16
+
17
+ $nav-split-view-2col-bp: 43rem !default;
18
+ $nav-split-view-3col-bp: 56rem !default;
19
+
20
+ // $ipad-sheet-view-width: 12rem !default;
21
+ $ipad-sheet-view-width: 37rem !default;
22
+
23
+ $ipad-sheet-view-aspect-ratio: math.div(4, 3) !default;
24
+
25
+ $sidebar-transition-duration: 250ms !default;
26
+
27
+ // $ipad-portrait-bp: 20rem !default;
28
+ $ipad-portrait-bp: 43rem !default;
29
+
30
+ // $ipad-landscape-bp: 30rem !default;
31
+ $ipad-landscape-bp: 68rem !default;
32
+
33
+ // computed
34
+
35
+ $ipad-portrait-bp-max: #{functions.subtract-tiny($ipad-portrait-bp)};
36
+ $ipad-portrait-bp-min: $ipad-portrait-bp;
37
+ $ipad-landscape-bp-max: #{functions.subtract-tiny($ipad-landscape-bp)};
38
+ $ipad-landscape-bp-min: $ipad-landscape-bp;
39
+
40
+ $ipad-sheet-view-height: math.div(
41
+ $ipad-sheet-view-width,
42
+ $ipad-sheet-view-aspect-ratio
43
+ ); //4/3
44
+
45
+ $nav-split-view-2col-bp-max: #{functions.subtract-tiny($nav-split-view-2col-bp)};
46
+ $nav-split-view-2col-bp-min: $nav-split-view-2col-bp;
47
+ $nav-split-view-3col-bp-max: #{functions.subtract-tiny($nav-split-view-3col-bp)};
48
+ $nav-split-view-3col-bp-min: $nav-split-view-3col-bp;
49
+
50
+ @debug $ipad-portrait-bp-max;
51
+
52
+ // checks
53
+
54
+ @if ($ipad-portrait-bp < $ipad-sheet-view-width) {
55
+ @warn "$ipad-sheet-view-width should not be larger than $ipad-portrait-bp! Breaks centering";
56
+ }
57
+
58
+ @if ($nav-split-view-3col-bp < $nav-split-view-2col-bp) {
59
+ @warn "$nav-split-view-2col-bp should not be larger than $nav-split-view-3col-bp!";
60
+ }
@@ -0,0 +1,40 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ body-view,
6
+ navigation-stack,
7
+ navigation-split-view,
8
+ dialog[is='full-screen'],
9
+ dialog[is='sheet-view'] {
10
+ position: relative;
11
+
12
+ grid-auto-flow: column;
13
+
14
+ grid-template-columns: minmax(0, 1fr); //repeat(auto-fit, minmax(0, 1fr));
15
+ grid-template-rows: minmax(0, 1fr);
16
+
17
+ & > *:not([slot]) {
18
+ @include mixins.span-all;
19
+ }
20
+ }
21
+
22
+ navigation-stack:has(> navigation-stack:not([hidden])),
23
+ navigation-stack:has(> body-view),
24
+ navigation-split-view:has(> body-view),
25
+ dialog:has(> body-view),
26
+ // body-view:has(> dialog),
27
+ body-view:has(> body-view) {
28
+ & > scroll-view,
29
+ [is='sidebar-view'] > scroll-view {
30
+ transform: translateX(var(--view-transition-leading-x));
31
+ }
32
+
33
+ & > navigation-bar > tool-bar-item,
34
+ & > bottom-bar > tool-bar-item,
35
+ & > navigation-bar > tool-bar-item-group,
36
+ & > bottom-bar > tool-bar-item-group {
37
+ transform: scale(var(--view-transition-toolbar-cell-offscreen-scale));
38
+ }
39
+ }
40
+ }
@@ -0,0 +1,55 @@
1
+ @use '../vars';
2
+ @use '../functions';
3
+
4
+ @layer #{vars.$base-layer}, #{vars.$components-layer}, #{vars.$colors-layer}, #{vars.$ui-layer}, #{vars.$transitions-layer}, #{vars.$final-layer};
5
+
6
+ @layer #{vars.$base-layer} {
7
+ // html,
8
+ // body {
9
+ // overflow: auto;
10
+ // }
11
+
12
+ :root {
13
+ interpolate-size: allow-keywords;
14
+ }
15
+
16
+ *,
17
+ *::before,
18
+ *::after {
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ // dialog {
23
+ // margin: 0;
24
+ // }
25
+
26
+ body {
27
+ background-color: var(--primary-bg);
28
+ }
29
+
30
+ body {
31
+ display: grid;
32
+
33
+ position: absolute;
34
+ inset: 0;
35
+
36
+ margin: 0;
37
+ padding: 0;
38
+
39
+ touch-action: none !important;
40
+ }
41
+
42
+ $CONFIG: (
43
+ vt-fwd-class-name: vars.$vt-fwd-class-name,
44
+ disclosure-group-contents-height-css-prop: vars.$disclosure-group-contents-height-css-prop,
45
+ disclosure-group-animation-duration-css-prop: vars.$disclosure-group-animation-duration-css-prop,
46
+ disclosure-group-animation-close-class: vars.$disclosure-group-animation-close-class,
47
+ );
48
+
49
+ @debug functions.map-to-query($CONFIG);
50
+
51
+ html::before {
52
+ content: '#{functions.map-to-query($CONFIG)}';
53
+ display: none;
54
+ }
55
+ }
@@ -0,0 +1,69 @@
1
+ @use '../vars';
2
+
3
+ @layer #{vars.$components-layer} {
4
+ :root {
5
+ // --ipad-bp: #{vars.$ipad-portrait-bp};
6
+
7
+ // --edge-inset-inline-start: 10px;
8
+ // --edge-inset-inline-end: 10px;
9
+ // --edge-inset-block-start: 10px;
10
+ // --edge-inset-block-end: 10px;
11
+
12
+ // tabview adds extra to these
13
+ --safe-area-inset-top: env(safe-area-inset-top);
14
+ --safe-area-inset-right: env(safe-area-inset-right);
15
+ --safe-area-inset-bottom: env(safe-area-inset-bottom);
16
+ --safe-area-inset-left: env(safe-area-inset-left);
17
+
18
+ --tool-bar-height: 4rem;
19
+
20
+ --tab-bar-iphone-max-width: 90svw;
21
+ --tab-bar-iphone-height: var(--tool-bar-height);
22
+ --tab-bar-iphone-border-radius: 9999px;
23
+
24
+ --tab-bar-ipad-width: 21rem;
25
+ --tab-bar-ipad-height: 3rem;
26
+ --tab-bar-ipad-border-radius: 9999px;
27
+
28
+ --tab-bar-sidebar-width: 20rem;
29
+ --tab-bar-sidebar-border-radius: 1rem;
30
+ --tab-bar-sidebar-spacing: 1rem;
31
+
32
+ --navigation-bar-height: 4rem;
33
+
34
+ --nav-split-view-sidebar-width: 20rem;
35
+ --nav-split-view-content-width: 25rem;
36
+
37
+ --primary-text: black;
38
+ --primary-bg: aliceblue;
39
+ --secondary-bg: burlywood;
40
+
41
+ --view-transition-leading-x: -50%;
42
+ --view-transition-principal-x: 0%;
43
+ --view-transition-trailing-x: 100%;
44
+
45
+ --view-transition-toolbar-cell-onscreen-scale: 1;
46
+ --view-transition-toolbar-cell-offscreen-scale: 0;
47
+
48
+ --view-transition-dialog-onscreen-y: 0lvh;
49
+ --view-transition-dialog-onscreen-backdrop-bg: rgb(0 0 0 / 25%);
50
+ --view-transition-dialog-offscreen-y: 100lvh;
51
+
52
+ --view-transition-duration: 500ms;
53
+ // --view-transition-duration: 5s;
54
+
55
+ --pill-border-radius: 99999px;
56
+
57
+ --toolbar-col-gap: 0.6rem;
58
+ --toolbar-cell-bg: white;
59
+ --toolbar-cell-inline-padding: 0.3rem;
60
+ --toolbar-cell-block-padding: 0.3rem;
61
+ --toolbar-cell-border-radius: var(--pill-border-radius);
62
+
63
+ --toolbar-cell-focus-bg: lightpink;
64
+ --toolbar-cell-active-bg: gray;
65
+
66
+ #{vars.$disclosure-group-animation-duration-css-prop}: 500ms;
67
+ --disclosure-group-animation-easing: ease-out;
68
+ }
69
+ }
@@ -0,0 +1,99 @@
1
+ @use '../vars';
2
+
3
+ @layer #{vars.$colors-layer} {
4
+ navigation-stack,
5
+ navigation-split-view,
6
+ body-view {
7
+ --canvas-bg: var(--primary-bg);
8
+ }
9
+
10
+ [is='sheet-view'],
11
+ [is='full-screen'] {
12
+ --canvas-bg: var(--secondary-bg);
13
+ }
14
+
15
+ body-view {
16
+ --primary-bg: oklch(0.984 0.019 200.873);
17
+ --secondary-bg: oklch(0.984 0.019 200.873);
18
+ }
19
+
20
+ body-view > body-view {
21
+ --primary-bg: oklch(0.956 0.045 203.388);
22
+ --secondary-bg: oklch(0.956 0.045 203.388);
23
+ }
24
+
25
+ body-view > body-view > body-view {
26
+ --primary-bg: oklch(0.917 0.08 205.041);
27
+ --secondary-bg: oklch(0.917 0.08 205.041);
28
+ }
29
+
30
+ body-view > body-view > body-view > body-view {
31
+ --primary-bg: oklch(0.865 0.127 207.078);
32
+ --secondary-bg: oklch(0.865 0.127 207.078);
33
+ }
34
+
35
+ body-view > body-view > body-view > body-view > body-view {
36
+ --primary-bg: oklch(0.789 0.154 211.53);
37
+ --secondary-bg: oklch(0.789 0.154 211.53);
38
+ }
39
+
40
+ body-view > body-view > body-view > body-view > body-view {
41
+ --primary-bg: oklch(0.715 0.143 215.221);
42
+ --secondary-bg: oklch(0.715 0.143 215.221);
43
+ }
44
+
45
+ body-view > body-view > body-view > body-view > body-view > body-view {
46
+ --primary-bg: oklch(0.609 0.126 221.723);
47
+ --secondary-bg: oklch(0.609 0.126 221.723);
48
+ }
49
+
50
+ body-view
51
+ > body-view
52
+ > body-view
53
+ > body-view
54
+ > body-view
55
+ > body-view
56
+ > body-view {
57
+ --primary-bg: oklch(0.52 0.105 223.128);
58
+ --secondary-bg: oklch(0.52 0.105 223.128);
59
+ }
60
+
61
+ body-view
62
+ > body-view
63
+ > body-view
64
+ > body-view
65
+ > body-view
66
+ > body-view
67
+ > body-view
68
+ > body-view {
69
+ --primary-bg: oklch(0.45 0.085 224.283);
70
+ --secondary-bg: oklch(0.45 0.085 224.283);
71
+ }
72
+
73
+ body-view
74
+ > body-view
75
+ > body-view
76
+ > body-view
77
+ > body-view
78
+ > body-view
79
+ > body-view
80
+ > body-view
81
+ > body-view {
82
+ --primary-bg: oklch(0.398 0.07 227.392);
83
+ --secondary-bg: oklch(0.398 0.07 227.392);
84
+ }
85
+
86
+ body-view
87
+ > body-view
88
+ > body-view
89
+ > body-view
90
+ > body-view
91
+ > body-view
92
+ > body-view
93
+ > body-view
94
+ > body-view
95
+ > body-view {
96
+ --primary-bg: oklch(0.302 0.056 229.695);
97
+ --secondary-bg: oklch(0.302 0.056 229.695);
98
+ }
99
+ }
@@ -0,0 +1,8 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+
4
+ @layer #{vars.$components-layer} {
5
+ body-view {
6
+ // pointer-events: none;
7
+ }
8
+ }
@@ -0,0 +1,14 @@
1
+ @use '../vars';
2
+
3
+ @layer #{vars.$components-layer} {
4
+ [is='borderless-button'] {
5
+ display: grid;
6
+
7
+ place-items: center;
8
+ place-content: center;
9
+
10
+ // background-color: transparent;
11
+ // color: blue;
12
+ // border: none;
13
+ }
14
+ }