@swiftwc/ui 0.0.0-dev.2 → 0.0.0-dev.21

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 (292) hide show
  1. package/README.md +15 -0
  2. package/generated/buses/alert-dialog.d.ts +2 -0
  3. package/generated/buses/alert-dialog.js +1 -0
  4. package/generated/buses/confirmation-dialog.d.ts +2 -0
  5. package/generated/buses/confirmation-dialog.js +1 -0
  6. package/generated/buses/index.d.ts +6 -0
  7. package/generated/buses/index.js +6 -0
  8. package/generated/buses/lifecycle-observer.d.ts +2 -0
  9. package/generated/buses/lifecycle-observer.js +1 -0
  10. package/generated/client/index.d.ts +29 -2
  11. package/generated/client/index.js +341 -8
  12. package/generated/components/alert-dialog.d.ts +8 -0
  13. package/generated/components/alert-dialog.js +94 -0
  14. package/generated/components/body-view.d.ts +5 -0
  15. package/generated/components/body-view.js +11 -0
  16. package/generated/components/bordered-button.d.ts +9 -0
  17. package/generated/components/bordered-button.js +34 -0
  18. package/generated/components/bordered-prominent-button.d.ts +9 -0
  19. package/generated/components/bordered-prominent-button.js +34 -0
  20. package/generated/components/borderless-button.d.ts +9 -0
  21. package/generated/components/borderless-button.js +34 -0
  22. package/generated/components/confirmation-dialog.d.ts +9 -0
  23. package/generated/components/confirmation-dialog.js +108 -0
  24. package/generated/components/content-unavailable-view.d.ts +24 -0
  25. package/generated/components/content-unavailable-view.js +78 -0
  26. package/generated/components/date-picker.d.ts +46 -0
  27. package/generated/components/date-picker.js +436 -0
  28. package/generated/components/disclosure-group.d.ts +9 -0
  29. package/generated/components/disclosure-group.js +54 -0
  30. package/generated/components/form-view.d.ts +6 -0
  31. package/generated/components/form-view.js +58 -0
  32. package/generated/components/glass-button.d.ts +8 -0
  33. package/generated/components/glass-button.js +31 -0
  34. package/generated/components/glass-prominent-button.d.ts +8 -0
  35. package/generated/components/glass-prominent-button.js +31 -0
  36. package/generated/components/index.d.ts +39 -1
  37. package/generated/components/index.js +39 -6
  38. package/generated/components/label-view.d.ts +9 -0
  39. package/generated/components/label-view.js +83 -0
  40. package/generated/components/list-view.d.ts +5 -0
  41. package/generated/components/list-view.js +29 -0
  42. package/generated/components/menu-view.d.ts +9 -0
  43. package/generated/components/menu-view.js +138 -0
  44. package/generated/components/navigation-large-title.d.ts +6 -0
  45. package/generated/components/navigation-large-title.js +177 -0
  46. package/generated/components/navigation-split-view.d.ts +10 -0
  47. package/generated/components/navigation-split-view.js +21 -0
  48. package/generated/components/navigation-stack.d.ts +10 -0
  49. package/generated/components/navigation-stack.js +27 -0
  50. package/generated/components/navigation-title.d.ts +8 -0
  51. package/generated/components/navigation-title.js +66 -0
  52. package/generated/components/picker-view.d.ts +27 -0
  53. package/generated/components/picker-view.js +448 -0
  54. package/generated/components/plain-button.d.ts +7 -0
  55. package/generated/components/plain-button.js +20 -0
  56. package/generated/components/screen-view.d.ts +5 -0
  57. package/generated/components/screen-view.js +9 -0
  58. package/generated/components/scroll-view-proxy.d.ts +8 -0
  59. package/generated/components/scroll-view-proxy.js +14 -0
  60. package/generated/components/scroll-view.d.ts +10 -0
  61. package/generated/components/scroll-view.js +196 -0
  62. package/generated/components/section-view.d.ts +9 -0
  63. package/generated/components/section-view.js +81 -0
  64. package/generated/components/sheet-view.d.ts +9 -0
  65. package/generated/components/sheet-view.js +73 -0
  66. package/generated/components/sidebar-toggle.d.ts +7 -0
  67. package/generated/components/sidebar-toggle.js +82 -0
  68. package/generated/components/sidebar-view.d.ts +7 -0
  69. package/generated/components/sidebar-view.js +35 -0
  70. package/generated/components/sticky-container.d.ts +6 -0
  71. package/generated/components/sticky-container.js +24 -0
  72. package/generated/components/tab-bar.d.ts +10 -0
  73. package/generated/components/tab-bar.js +42 -0
  74. package/generated/components/tab-item.d.ts +7 -0
  75. package/generated/components/tab-item.js +125 -0
  76. package/generated/components/tab-view.d.ts +22 -0
  77. package/generated/components/tab-view.js +259 -0
  78. package/generated/components/table-view.d.ts +7 -0
  79. package/generated/components/table-view.js +181 -0
  80. package/generated/components/text-field.d.ts +29 -0
  81. package/generated/components/text-field.js +473 -0
  82. package/generated/components/tool-bar-item-group.d.ts +7 -0
  83. package/generated/components/tool-bar-item-group.js +39 -0
  84. package/generated/components/tool-bar-item.d.ts +7 -0
  85. package/generated/components/tool-bar-item.js +49 -0
  86. package/generated/components/tool-bar.d.ts +7 -0
  87. package/generated/components/tool-bar.js +77 -0
  88. package/generated/components/v-keyboard.d.ts +11 -0
  89. package/generated/components/v-keyboard.js +81 -0
  90. package/generated/components/v-stack.d.ts +10 -0
  91. package/generated/components/v-stack.js +16 -0
  92. package/generated/css/index.css +7594 -0
  93. package/generated/events/alert-dialog.d.ts +8 -0
  94. package/generated/events/alert-dialog.js +1 -0
  95. package/generated/events/confirmation-dialog.d.ts +9 -0
  96. package/generated/events/confirmation-dialog.js +1 -0
  97. package/generated/events/date-picker.d.ts +8 -0
  98. package/generated/events/date-picker.js +1 -0
  99. package/generated/events/index.d.ts +8 -0
  100. package/generated/events/index.js +8 -0
  101. package/generated/events/lifecycle-observer.d.ts +10 -0
  102. package/generated/events/lifecycle-observer.js +1 -0
  103. package/generated/events/picker-view.d.ts +8 -0
  104. package/generated/events/picker-view.js +1 -0
  105. package/generated/events/scroll-view.d.ts +10 -0
  106. package/generated/events/scroll-view.js +1 -0
  107. package/generated/events/tab-view.d.ts +24 -0
  108. package/generated/events/tab-view.js +1 -0
  109. package/generated/events/text-field.d.ts +8 -0
  110. package/generated/events/text-field.js +1 -0
  111. package/generated/i18n/index.d.ts +34 -0
  112. package/generated/i18n/index.js +167 -0
  113. package/generated/i18n/locales/el.d.ts +17 -0
  114. package/generated/i18n/locales/el.js +17 -0
  115. package/generated/i18n/locales/en.d.ts +17 -0
  116. package/generated/i18n/locales/en.js +17 -0
  117. package/generated/i18n/locales/index.d.ts +4 -0
  118. package/generated/i18n/locales/index.js +4 -0
  119. package/generated/index.js +1 -1
  120. package/generated/internal/class/cleanup-registry.d.ts +5 -0
  121. package/generated/internal/class/cleanup-registry.js +38 -0
  122. package/generated/internal/class/css-style-observer.d.ts +8 -0
  123. package/generated/internal/class/css-style-observer.js +25 -0
  124. package/generated/internal/class/form-associated-base.d.ts +20 -0
  125. package/generated/internal/class/form-associated-base.js +96 -0
  126. package/generated/internal/class/mutation-observer-singleton.d.ts +10 -0
  127. package/generated/internal/class/mutation-observer-singleton.js +46 -0
  128. package/generated/internal/class/navigation-path.d.ts +15 -0
  129. package/generated/internal/class/navigation-path.js +84 -0
  130. package/generated/internal/class/navigation-view.d.ts +8 -0
  131. package/generated/internal/class/navigation-view.js +77 -0
  132. package/generated/internal/class/resize-observer-singleton.d.ts +7 -0
  133. package/generated/internal/class/resize-observer-singleton.js +22 -0
  134. package/generated/internal/decorators/custom-element.d.ts +5 -0
  135. package/generated/internal/decorators/custom-element.js +4 -0
  136. package/generated/internal/privateNamespace.d.ts +4 -0
  137. package/generated/internal/privateNamespace.js +1 -0
  138. package/generated/internal/utils/add.d.ts +1 -0
  139. package/generated/internal/utils/add.js +7 -0
  140. package/generated/internal/utils/button-role.d.ts +1 -0
  141. package/generated/internal/utils/button-role.js +19 -0
  142. package/generated/internal/utils/cash/ancestors.d.ts +1 -0
  143. package/generated/internal/utils/cash/ancestors.js +27 -0
  144. package/generated/internal/utils/cash/index.d.ts +23 -0
  145. package/generated/internal/utils/cash/index.js +25 -0
  146. package/generated/internal/utils/cash/next-all.d.ts +1 -0
  147. package/generated/internal/utils/cash/next-all.js +10 -0
  148. package/generated/internal/utils/cash/next.d.ts +1 -0
  149. package/generated/internal/utils/cash/next.js +9 -0
  150. package/generated/internal/utils/cash/prev-all.d.ts +1 -0
  151. package/generated/internal/utils/cash/prev-all.js +10 -0
  152. package/generated/internal/utils/cash/prev.d.ts +1 -0
  153. package/generated/internal/utils/cash/prev.js +9 -0
  154. package/generated/internal/utils/cash/prop.d.ts +18 -0
  155. package/generated/internal/utils/cash/prop.js +30 -0
  156. package/generated/internal/utils/cash/siblings.d.ts +1 -0
  157. package/generated/internal/utils/cash/siblings.js +10 -0
  158. package/generated/internal/utils/clamp.d.ts +1 -0
  159. package/generated/internal/utils/clamp.js +4 -0
  160. package/generated/internal/utils/compare-big-decimals.d.ts +1 -0
  161. package/generated/internal/utils/compare-big-decimals.js +90 -0
  162. package/generated/internal/utils/css-time.d.ts +1 -0
  163. package/generated/internal/utils/css-time.js +3 -0
  164. package/generated/internal/utils/debounce.d.ts +1 -0
  165. package/generated/internal/utils/debounce.js +13 -0
  166. package/generated/internal/utils/frame.d.ts +1 -0
  167. package/generated/internal/utils/frame.js +6 -0
  168. package/generated/internal/utils/index.d.ts +20 -1
  169. package/generated/internal/utils/index.js +21 -1
  170. package/generated/internal/utils/is-inside.d.ts +1 -0
  171. package/generated/internal/utils/is-inside.js +4 -0
  172. package/generated/internal/utils/kebab-case.d.ts +1 -1
  173. package/generated/internal/utils/kebab-case.js +3 -3
  174. package/generated/internal/utils/list-active.d.ts +7 -0
  175. package/generated/internal/utils/list-active.js +83 -0
  176. package/generated/internal/utils/microtask.d.ts +1 -0
  177. package/generated/internal/utils/microtask.js +3 -0
  178. package/generated/internal/utils/onoff.d.ts +45 -0
  179. package/generated/internal/utils/onoff.js +31 -0
  180. package/generated/internal/utils/set.d.ts +1 -0
  181. package/generated/internal/utils/set.js +7 -0
  182. package/generated/internal/utils/sleep.d.ts +1 -0
  183. package/generated/internal/utils/sleep.js +3 -0
  184. package/generated/internal/utils/slow-hide-show.d.ts +1 -0
  185. package/generated/internal/utils/slow-hide-show.js +16 -0
  186. package/generated/internal/utils/timeout.d.ts +5 -0
  187. package/generated/internal/utils/timeout.js +16 -0
  188. package/generated/internal/utils/toolbar-repositioner.d.ts +1 -0
  189. package/generated/internal/utils/toolbar-repositioner.js +12 -0
  190. package/generated/internal/utils/touch-glass.d.ts +7 -0
  191. package/generated/internal/utils/touch-glass.js +19 -0
  192. package/generated/namespace-browser/base.d.ts +36 -0
  193. package/generated/namespace-browser/base.js +92 -0
  194. package/generated/namespace-browser/index.d.ts +7 -0
  195. package/generated/namespace-browser/index.js +1 -0
  196. package/generated/snapshot/index.d.ts +9 -0
  197. package/generated/snapshot/index.js +58 -0
  198. package/package.json +36 -9
  199. package/scss/_base.scss +5 -0
  200. package/scss/_components.scss +79 -0
  201. package/scss/_final.scss +1 -0
  202. package/scss/_functions.scss +31 -0
  203. package/scss/_mixins.scss +3 -0
  204. package/scss/_placeholders.scss +3 -0
  205. package/scss/_transitions.scss +28 -0
  206. package/scss/_utils.scss +9 -0
  207. package/scss/_vars.scss +174 -3
  208. package/scss/base/_layout.scss +56 -0
  209. package/scss/base/_reboot.scss +160 -0
  210. package/scss/base/_root.scss +396 -0
  211. package/scss/colors/_index.scss +635 -0
  212. package/scss/components/_alert-dialog.scss +106 -0
  213. package/scss/components/_body-view.scss +17 -0
  214. package/scss/components/_bordered-button.scss +30 -0
  215. package/scss/components/_bordered-prominent-button.scss +27 -0
  216. package/scss/components/_borderless-button.scss +27 -0
  217. package/scss/components/_confirmation-dialog.scss +110 -0
  218. package/scss/components/_content-unavailable-view.scss +45 -0
  219. package/scss/components/_date-picker.scss +30 -0
  220. package/scss/components/_detail-placeholder.scss +153 -0
  221. package/scss/components/_disclosure-group.scss +128 -0
  222. package/scss/components/_form-view.scss +195 -0
  223. package/scss/components/_full-screen.scss +15 -0
  224. package/scss/components/_glass-button.scss +32 -0
  225. package/scss/components/_glass-prominent-button.scss +32 -0
  226. package/scss/components/_h-divider.scss +13 -0
  227. package/scss/components/_h-flex-stack.scss +23 -0
  228. package/scss/components/_h-stack.scss +29 -0
  229. package/scss/components/_index.scss +246 -0
  230. package/scss/components/_label-view.scss +393 -0
  231. package/scss/components/_labeled-content.scss +9 -0
  232. package/scss/components/_list-view.scss +229 -0
  233. package/scss/components/_menu-view.scss +188 -0
  234. package/scss/components/_navigation-large-title.scss +27 -0
  235. package/scss/components/_navigation-split-view.scss +424 -0
  236. package/scss/components/_navigation-stack.scss +11 -0
  237. package/scss/components/_navigation-title.scss +10 -0
  238. package/scss/components/_picker-view.scss +122 -0
  239. package/scss/components/_plain-button.scss +18 -0
  240. package/scss/components/_scroll-view-proxy.scss +79 -0
  241. package/scss/components/_scroll-view-toolbars.scss +126 -0
  242. package/scss/components/_scroll-view.scss +130 -0
  243. package/scss/components/_section-view.scss +119 -0
  244. package/scss/components/_sheet-view.scss +102 -0
  245. package/scss/components/_sidebar-toggle.scss +121 -0
  246. package/scss/components/_sidebar-view.scss +53 -0
  247. package/scss/components/_sticky-container.scss +42 -0
  248. package/scss/components/_tab-bar.scss +255 -0
  249. package/scss/components/_tab-item.scss +25 -0
  250. package/scss/components/_tab-view.scss +312 -0
  251. package/scss/components/_table-column.scss +52 -0
  252. package/scss/components/_table-row.scss +172 -0
  253. package/scss/components/_table-view.scss +223 -0
  254. package/scss/components/_text-field.scss +37 -0
  255. package/scss/components/_tool-bar-item-group.scss +48 -0
  256. package/scss/components/_tool-bar-item.scss +145 -0
  257. package/scss/components/_tool-bar.scss +128 -0
  258. package/scss/components/_v-divider.scss +13 -0
  259. package/scss/components/_v-flex-stack.scss +29 -0
  260. package/scss/components/_v-keyboard.scss +14 -0
  261. package/scss/components/_v-stack.scss +25 -0
  262. package/scss/final/_touch-glass.scss +91 -0
  263. package/scss/index.scss +15 -6
  264. package/scss/mixins/_dialog.scss +89 -0
  265. package/scss/mixins/_index.scss +422 -0
  266. package/scss/placeholders/_buttons.scss +125 -0
  267. package/scss/placeholders/_lists.scss +561 -0
  268. package/scss/transitions/_alert-dialog.scss +19 -0
  269. package/scss/transitions/_bwd.navbar.scss +19 -0
  270. package/scss/transitions/_bwd.scss +39 -0
  271. package/scss/transitions/_confirmation-dialog.scss +19 -0
  272. package/scss/transitions/_dialog.scss +28 -0
  273. package/scss/transitions/_disclosure-group.scss +35 -0
  274. package/scss/transitions/_fwd.navbar.scss +41 -0
  275. package/scss/transitions/_fwd.scss +24 -0
  276. package/scss/transitions/_glass-button.scss +12 -0
  277. package/scss/transitions/_glass-prominent-button.scss +12 -0
  278. package/scss/transitions/_index.scss +74 -0
  279. package/scss/transitions/_menu-view.scss +26 -0
  280. package/scss/transitions/_navigation-split-view.scss +23 -0
  281. package/scss/transitions/_sidebar-view.scss +36 -0
  282. package/scss/transitions/_tab-bar.scss +19 -0
  283. package/scss/utils/_frame.scss +91 -0
  284. package/scss/utils/_index.scss +68 -0
  285. package/scss/utils/_scroll-view.scss +14 -0
  286. package/scss/utils/_spacing.scss +25 -0
  287. package/scss/utils/_stacks.scss +247 -0
  288. package/web-components.html-data/en.json +423 -0
  289. package/generated/internal/snapshot.d.ts +0 -5
  290. package/generated/internal/snapshot.js +0 -23
  291. package/generated/styles.css +0 -8
  292. package/scss/_reboot.scss +0 -11
@@ -0,0 +1,393 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+ @use 'sass:string';
4
+ @use 'sass:map';
5
+
6
+ // scalpel precision
7
+ @property --label-gap {
8
+ syntax: '<length>';
9
+ inherits: false;
10
+ initial-value: 0;
11
+ }
12
+
13
+ @property --label-image-size {
14
+ syntax: '<length>';
15
+ inherits: false;
16
+ initial-value: 0;
17
+ }
18
+
19
+ // @property --label-style {
20
+ // syntax: 'title-and-icon | icon-only | title-only | automatic';
21
+ // inherits: true;
22
+ // initial-value: automatic;
23
+ // }
24
+
25
+ // @property --label--style {
26
+ // syntax: '<number>';
27
+ // inherits: false;
28
+ // initial-value: 0;
29
+ // }
30
+
31
+ // @property --label-truncation-mode {
32
+ // syntax: 'tail';
33
+ // inherits: true;
34
+ // }
35
+
36
+ // @property --label--has-icon {
37
+ // syntax: 'yes | no';
38
+ // inherits: true;
39
+ // initial-value: no;
40
+ // }
41
+
42
+ $label-truncation-ifs: (
43
+ tail: (
44
+ --label--overflow: hidden,
45
+
46
+ --label--text-overflow: ellipsis,
47
+ ),
48
+ );
49
+
50
+ $label-line-ifs: (
51
+ 1: (
52
+ --label--host-white-space: nowrap,
53
+ ),
54
+ 2: (
55
+ --label--host-white-space: normal,
56
+ --label--display: -webkit-box,
57
+ --label--box-orient: vertical,
58
+ --label--line-clamp: 2,
59
+ ),
60
+ );
61
+
62
+ @mixin set-label-style($label-style) {
63
+ @if $label-style == h-title-and-icon {
64
+ --label-style: title-and-icon;
65
+
66
+ --label--host-grid-template-columns: auto minmax(0, 1fr);
67
+ --label--host-grid-template-rows: minmax(0, 1fr);
68
+ --label--host-align-items: center;
69
+ --label--host-justify-items: normal;
70
+
71
+ --label-gap: 0.3rem;
72
+ --label--host-gap: var(--label-gap);
73
+
74
+ --label--iconstack-display: grid;
75
+ --label--titlestack-display: grid;
76
+ } @else if $label-style == h-icon-only {
77
+ --label-style: icon-only;
78
+
79
+ --label--iconstack-display: grid;
80
+ } @else if $label-style == h-title-only {
81
+ --label-style: title-only;
82
+
83
+ --label--titlestack-display: grid;
84
+ } @else if $label-style == v-title-and-icon {
85
+ --label-style: title-and-icon;
86
+
87
+ --label--host-grid-template-columns: minmax(0, 1fr);
88
+ --label--host-grid-template-rows: auto minmax(0, 1fr);
89
+ --label--host-align-items: normal;
90
+ --label--host-justify-items: center;
91
+
92
+ --label-gap: 0.3rem;
93
+ --label--host-gap: var(--label-gap);
94
+
95
+ --label--iconstack-display: grid;
96
+ --label--titlestack-display: grid;
97
+ } @else if $label-style == v-icon-only {
98
+ --label-style: icon-only;
99
+
100
+ --label--iconstack-display: grid;
101
+ } @else if $label-style == v-title-only {
102
+ --label-style: title-only;
103
+
104
+ --label--titlestack-display: grid;
105
+ }
106
+ }
107
+
108
+ // @mixin set-label-truncation-mode($value) {
109
+ // @if $value == 'tail' {
110
+ // --label--overflow: hidden;
111
+
112
+ // --label--text-overflow: ellipsis;
113
+ // }
114
+ // }
115
+
116
+ // @mixin set-label-line-limit($value) {
117
+ // @if $value == 1 {
118
+ // --label--host-white-space: nowrap;
119
+ // } @else {
120
+ // --label--host-white-space: normal;
121
+ // --label--display: -webkit-box;
122
+ // --label--box-orient: vertical;
123
+ // --label--line-clamp: #{$value};
124
+ // }
125
+ // }
126
+
127
+ @mixin set-label-font($value) {
128
+ --label--titlestack-font-size: var(--label-#{$value}-font-size);
129
+ --label--titlestack-line-height: var(--label-#{$value}-line-height);
130
+ --label--titlestack-font-weight: var(--label-#{$value}-font-weight);
131
+ }
132
+
133
+ @function if-chain($labels, $prop: null) {
134
+ $if-chain: null;
135
+
136
+ @each $label, $size in $labels {
137
+ @if $if-chain == null {
138
+ $if-chain: 'style(--label-font: #{$label}): var(--label-#{$label}-#{$prop}) ;';
139
+ } @else {
140
+ $if-chain: '#{$if-chain} style(--label-font: #{$label}): var(--label-#{$label}-#{$prop}) ;';
141
+ }
142
+ }
143
+
144
+ @return $if-chain;
145
+ }
146
+
147
+ @mixin if-chain($key, $prop, $label) {
148
+ @container style(#{$key}: #{$label}) {
149
+ :where(&) {
150
+ @content;
151
+ }
152
+ }
153
+ @container not style(#{$key}: #{$label}) {
154
+ :where(&[#{$prop}='#{$label}']) {
155
+ @content;
156
+ }
157
+ }
158
+ }
159
+
160
+ @layer #{vars.$components-layer} {
161
+ label-view {
162
+ :where(&) {
163
+ // transition: --label--style 1ms step-start;
164
+
165
+ align-items: var(--label--host-align-items,);
166
+ justify-items: var(--label--host-justify-items,);
167
+ // place-items: center;
168
+ // place-content: center;
169
+
170
+ // grid-auto-flow: column;
171
+ // grid-auto-columns: minmax(0, 1fr);
172
+ grid-template-columns: var(--label--host-grid-template-columns,);
173
+ grid-template-rows: var(--label--host-grid-template-rows,);
174
+ // grid-template-areas: 'label-image-stack label-title-stack';
175
+
176
+ gap: var(--label--host-gap,); //;
177
+
178
+ --label-image-size: 2rem;
179
+ --label-imagestack-fontsize: var(--label-image-size);
180
+ // gap: 0;
181
+
182
+ white-space: var(--label--host-white-space,);
183
+
184
+ &::part(label-image-stack),
185
+ &::part(label-title-stack) {
186
+ // display: none;
187
+
188
+ grid-auto-columns: minmax(0, 1fr);
189
+ grid-auto-rows: minmax(0, 1fr);
190
+ // grid-template-columns: subgrid;
191
+ // grid-template-rows: subgrid;
192
+ }
193
+
194
+ &::part(label-image-stack) {
195
+ display: var(--label--iconstack-display, none);
196
+ }
197
+
198
+ &::part(label-title-stack) {
199
+ display: var(--label--titlestack-display, none);
200
+ }
201
+
202
+ &::part(label-image-stack) {
203
+ aspect-ratio: 1 / 1;
204
+
205
+ inline-size: var(--label-imagestack-fontsize);
206
+ font-size: var(--label-imagestack-fontsize);
207
+
208
+ // line-height: 1;
209
+
210
+ // grid-area: label-image-stack;
211
+ }
212
+
213
+ &::part(label-title-stack) {
214
+ text-decoration: underline;
215
+
216
+ font-size: var(--label--titlestack-font-size,);
217
+ line-height: var(--label--titlestack-line-height,);
218
+ font-weight: var(--label--titlestack-font-weight,);
219
+
220
+ // grid-area: label-title-stack;
221
+ }
222
+ }
223
+
224
+ :where(&:has(> [slot='image'])) {
225
+ --label--has-icon: yes;
226
+ // background-color: green;
227
+ }
228
+ :where(&:has(> :not([slot]))) {
229
+ --label--has-title: yes;
230
+ // background-color: red;
231
+ }
232
+
233
+ :where(& > :not([slot])) {
234
+ // grid-area: label-title-stack;
235
+ overflow: var(--label--overflow,);
236
+
237
+ text-overflow: var(--label--text-overflow,);
238
+
239
+ display: var(--label--display,);
240
+
241
+ -webkit-box-orient: var(--label--box-orient,);
242
+
243
+ line-clamp: var(--label--line-clamp,);
244
+ -webkit-line-clamp: var(--label--line-clamp,);
245
+ }
246
+
247
+ // vars
248
+ @supports (x: #{string.unquote('if(else:red)')}) {
249
+ :where(&) {
250
+ --label--titlestack-font-size: if(#{if-chain(vars.$label-fonts, font-size)});
251
+ --label--titlestack-line-height: if(#{if-chain(vars.$label-fonts, line-height)});
252
+ --label--titlestack-font-weight: if(#{if-chain(vars.$label-fonts, font-weight)});
253
+ // if(
254
+ // style(--label-font: callout): 0.5rem ; style(--label-font: large-title): 3rem ; style(--label-font: large-title): 3rem ;
255
+ // );
256
+ // ANCHOR: truncation-mode
257
+ @include mixins.write-ifs(--label-truncation-mode, $label-truncation-ifs);
258
+ // --label--overflow: if(style(--label-truncation-mode: tail): hidden ;);
259
+ // --label--text-overflow: if(style(--label-truncation-mode: tail): ellipsis ;);
260
+
261
+ // ANCHOR: line-limit
262
+ @include mixins.write-ifs(--label-line-limit, $label-line-ifs);
263
+ // --label--host-white-space: if(style(--label-line-limit: 1): nowrap ; style(--label-line-limit: 2): normal ;);
264
+ // --label--display: if(style(--label-line-limit: 2): -webkit-box ;);
265
+ // --label--box-orient: if(style(--label-line-limit: 2): vertical ;);
266
+ // --label--line-clamp: if(style(--label-line-limit: 2): 2 ;);
267
+
268
+ // ANCHOR: label-flow
269
+ --label--host-align-items: if(style(--label-flow: vertical): normal ; else: center ;);
270
+ --label--host-justify-items: if(style(--label-flow: vertical): center ; else: normal ;);
271
+
272
+ // ANCHOR: label-style
273
+ --label--host-grid-template-columns: if(
274
+ style(--label-style: icon-only): minmax(0, 1fr) ; style(--label-style: title-only): minmax(0, 1fr) ;
275
+ style(--label-style: title-and-icon): if(style(--label-flow: vertical): minmax(0, 1fr) ; else: auto minmax(0, 1fr) ;) ;
276
+ else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): if(style(--label-flow: vertical): minmax(0, 1fr) ; else: auto minmax(0, 1fr) ;) ; else: minmax(0, 1fr) ;) ;
277
+ );
278
+ --label--host-grid-template-rows: if(
279
+ style(--label-style: icon-only): minmax(0, 1fr) ; style(--label-style: title-only): minmax(0, 1fr) ;
280
+ style(--label-style: title-and-icon): if(style(--label-flow: vertical): auto minmax(0, 1fr) ; else: minmax(0, 1fr) ;) ;
281
+ else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): if(style(--label-flow: vertical): auto minmax(0, 1fr) ; else: minmax(0, 1fr) ;) ; else: minmax(0, 1fr) ;) ;
282
+ );
283
+
284
+ --label-gap: if(style(--label-style: title-and-icon): 0.3rem ; else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): 0.3rem ;) ;);
285
+ --label--host-gap: if(style(--label-style: title-and-icon): var(--label-gap) ; else: if(style(--label--has-icon: yes) and style(--label--has-title: yes): var(--label-gap) ;) ;);
286
+
287
+ --label--iconstack-display: if(
288
+ style(--label-style: icon-only): grid ; style(--label-style: title-only): none ; style(--label-style: title-and-icon): grid ; else: if(style(--label--has-icon: yes): grid ; else: none;) ;
289
+ );
290
+
291
+ --label--titlestack-display: if(
292
+ style(--label-style: icon-only): none ; style(--label-style: title-only): grid ; style(--label-style: title-and-icon): grid ; else: if(style(--label--has-title: yes): grid ; else: none;) ;
293
+ );
294
+ }
295
+ }
296
+
297
+ @supports not (x: #{string.unquote('if(else:red)')}) {
298
+ :where(&:not([label-style])) {
299
+ @each $v in vars.$label-styles {
300
+ @container style(--label-style: #{$v}) {
301
+ @include set-label-style(h-#{$v});
302
+ }
303
+ }
304
+ }
305
+ @each $v in vars.$label-styles {
306
+ :where(&[label-style='#{$v}']) {
307
+ @include set-label-style(h-#{$v});
308
+ }
309
+ }
310
+ @container not style(--label-style) {
311
+ &:not([label-style]) {
312
+ // :where(&[image-hint='yes'][title-hint='yes']) {
313
+ :where(&:has(> [slot='image']):has(> :not([slot]))) {
314
+ @include set-label-style(h-title-and-icon);
315
+ }
316
+ // :where(&[image-hint='yes']:not([title-hint='yes'])) {
317
+ :where(&:has(> [slot='image']):not(:has(> :not([slot])))) {
318
+ @include set-label-style(h-icon-only);
319
+ }
320
+ // :where(&[title-hint='yes']:not([image-hint='yes'])) {
321
+ :where(&:has(> :not([slot])):not(:has(> [slot='image']))) {
322
+ @include set-label-style(h-title-only);
323
+ }
324
+ }
325
+ }
326
+ // AGAIN
327
+ :where(&:not([label-style])) {
328
+ @each $v in vars.$label-styles {
329
+ @container style(--label-style: #{$v}) and style(--label-flow: vertical) {
330
+ @include set-label-style(v-#{$v});
331
+ }
332
+ }
333
+ }
334
+ @container style(--label-flow: vertical) {
335
+ @each $v in vars.$label-styles {
336
+ :where(&[label-style='#{$v}']) {
337
+ @include set-label-style(v-#{$v});
338
+ }
339
+ }
340
+ }
341
+ @container (not style(--label-style)) and style(--label-flow: vertical) {
342
+ &:not([label-style]) {
343
+ :where(&:has(> [slot='image']):has(> :not([slot]))) {
344
+ @include set-label-style(v-title-and-icon);
345
+ }
346
+ :where(&:has(> [slot='image']):not(:has(> :not([slot])))) {
347
+ @include set-label-style(v-icon-only);
348
+ }
349
+ :where(&:has(> :not([slot])):not(:has(> [slot='image']))) {
350
+ @include set-label-style(v-title-only);
351
+ }
352
+ }
353
+ }
354
+ //
355
+ @for $i from 1 through 2 {
356
+ @include if-chain(--label-line-limit, line-limit, $i) {
357
+ @include mixins.write-props(map.get($label-line-ifs, $i)); //@include set-label-line-limit($i);
358
+ }
359
+ }
360
+ //
361
+ @include if-chain(--label-truncation-mode, truncation-mode, tail) {
362
+ @include mixins.write-props(map.get($label-truncation-ifs, tail)); //@include set-label-truncation-mode(tail);
363
+ }
364
+ //
365
+ @each $label, $size in vars.$label-fonts {
366
+ @include if-chain(--label-font, font, $label) {
367
+ @include set-label-font($label);
368
+ }
369
+ }
370
+ }
371
+
372
+ // ifs finally
373
+ @supports (x: #{string.unquote('attr(x type(*))')}) {
374
+ :where(&) {
375
+ --label-style: attr(label-style type(<custom-ident>), inherit);
376
+ --label-truncation-mode: attr(truncation-mode type(<custom-ident>), inherit);
377
+ --label-line-limit: attr(line-limit type(<number>), inherit);
378
+ --label-font: attr(font type(<custom-ident>), inherit);
379
+ }
380
+ }
381
+
382
+ @supports not (x: #{string.unquote('attr(x type(*))')}) {
383
+ @for $i from 1 through 2 {
384
+ :where(&[line-limit='#{$i}']) {
385
+ --label-line-limit: #{$i};
386
+ }
387
+ }
388
+ :where(&[truncation-mode='tail']) {
389
+ --label-truncation-mode: tail;
390
+ }
391
+ }
392
+ }
393
+ }
@@ -0,0 +1,9 @@
1
+ @use '../vars';
2
+
3
+ @layer #{vars.$components-layer} {
4
+ labeled-content {
5
+ :where(&) {
6
+ display: grid;
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,229 @@
1
+ @use '../vars';
2
+ @use '../mixins';
3
+ @use '../placeholders';
4
+ @use 'sass:string';
5
+ @use 'sass:map';
6
+
7
+ $list-ifs: (
8
+ inset: (
9
+ --list--item-color: var(--insetlist-item-color,),
10
+ --list--item-background-color: var(--insetlist-item-background-color,),
11
+ --list--highlighteditem-color: var(--insetlist-highlighteditem-color,),
12
+ --list--highlighteditem-background-color: var(--insetlist-highlighteditem-background-color,),
13
+ --list--item-border-radius: var(--insetlist-item-border-radius),
14
+ --list--host-background-color: var(--insetlist-background-color,),
15
+ --list--host-padding-inline: var(--insetlist-padding-inline),
16
+ --list--host-padding-block: var(--insetlist-padding-block),
17
+ //
18
+ --list--adjacentdetailsitem-border-radius: 0,
19
+ //
20
+ --list--details-background-color: var(--insetlist-openitem-background-color,),
21
+ --list--details-color: var(--insetlist-openitem-color,),
22
+ --list--opendetails-background-color: var(--insetlist-openitem-background-color,),
23
+ --list--opendetails-color: var(--insetlist-openitem-color,),
24
+ --list--opensummary-background-color: var(--insetlist-opensummary-background-color,),
25
+ --list--opensummary-color: var(--insetlist-opensummary-color,),
26
+ ),
27
+ inset-grouped: (
28
+ --list--item-color: var(--insetgroupedlist-item-color,),
29
+ --list--item-background-color: var(--insetgroupedlist-item-background-color,),
30
+ --list--item-border-radius: var(--insetlist-item-border-radius),
31
+ --list--highlighteditem-color: var(--insetgroupedlist-highlighteditem-color,),
32
+ --list--highlighteditem-background-color: var(--insetgroupedlist-highlighteditem-background-color,),
33
+ --list--host-background-color: var(--insetgroupedlist-background-color,),
34
+ --list--host-padding-inline: var(--insetgroupedlist-padding-inline),
35
+ --list--host-padding-block: var(--insetgroupedlist-padding-block),
36
+ //
37
+ --list--adjacentitem-border-radius: 0,
38
+ //
39
+ --list--details-background-color: var(--insetgroupedlist-openitem-background-color,),
40
+ --list--details-color: var(--insetgroupedlist-openitem-color,),
41
+ --list--opendetails-background-color: var(--insetgroupedlist-openitem-background-color,),
42
+ --list--opendetails-color: var(--insetgroupedlist-openitem-color,),
43
+ --list--opensummary-background-color: var(--insetgroupedlist-opensummary-background-color,),
44
+ --list--opensummary-color: var(--insetgroupedlist-opensummary-color,),
45
+ ),
46
+ sidebar: (
47
+ --list--item-border-radius: var(--insetlist-item-border-radius),
48
+ --list--details-gap: var(--list-row-gap),
49
+ --list--rootsummary-padding-inline-start: 5px,
50
+ --list--rootsummary-padding-inline-end: 5px,
51
+ --list--rootsummary-padding-block-start: 2px,
52
+ --list--rootsummary-padding-block-end: 2px,
53
+
54
+ --list--item-padding-inline-start: 5px,
55
+ --list--item-padding-inline-end: 5px,
56
+ --list--item-padding-block-start: 5px,
57
+ --list--item-padding-block-end: 5px,
58
+
59
+ --list--adjacentitem-border-radius: unset,
60
+ //
61
+ --list--host-background-color: var(--sidebarlist-background-color,),
62
+ --list--host-padding-inline: var(--sidebarlist-padding-inline),
63
+ --list--host-padding-block: var(--sidebarlist-padding-block),
64
+ //
65
+ --list--item-background-color: var(--sidebarlist-item-background-color,),
66
+ --list--item-color: var(--sidebarlist-item-color,),
67
+ --list--highlighteditem-background-color: var(--sidebarlist-highlighteditem-background-color,),
68
+ --list--highlighteditem-color: var(--sidebarlist-highlighteditem-color,),
69
+ //
70
+ --list--rootsummary-background-color: transparent,
71
+ --list--rootsummary-color: var(--primary,),
72
+ // --list--rootsummary-border-radius: 0px,
73
+ --list--selectedrootsummary-background-color: transparent,
74
+ --list--selectedrootsummary-color: var(--primary,),
75
+ //
76
+ --list--separator-background-color: transparent,
77
+ --list--activeseparator-background-color: transparent,
78
+ //
79
+ --list--details-background-color: var(--sidebarlist-openitem-background-color,),
80
+ --list--details-color: var(--sidebarlist-openitem-color,),
81
+ --list--opensummary-background-color: var(--sidebarlist-opensummary-background-color,),
82
+ --list--opensummary-color: var(--sidebarlist-opensummary-color,),
83
+ //
84
+ // --list--item-grid-template-columns: minmax(0, 1fr),
85
+ --list--accessories-display: none,
86
+ //
87
+ --list--rootsummary-marker-display: marker-trailing,
88
+ ),
89
+ );
90
+ $list-elses: (
91
+ --list--host-background-color: var(--list-background-color,),
92
+ --list--highlighteditem-background-color: var(--list-highlighteditem-background-color,),
93
+ --list--item-background-color: var(--list-item-background-color,),
94
+ --list--item-padding-inline-start: var(--list-item-padding-inline-start),
95
+ --list--item-padding-inline-end: var(--list-item-padding-inline-end),
96
+ --list--item-padding-block-start: var(--list-item-padding-block-start),
97
+ --list--item-padding-block-end: var(--list-item-padding-block-end),
98
+ --list--item-color: var(--list-item-color,),
99
+ --list--highlighteditem-color: var(--list-highlighteditem-color,),
100
+ //
101
+ --list--details-background-color: var(--list-openitem-background-color,),
102
+ --list--details-color: var(--list-openitem-color,),
103
+ --list--opensummary-background-color: var(--list-opensummary-background-color,),
104
+ --list--opensummary-color: var(--list-opensummary-color,),
105
+ //
106
+ // --list--item-grid-template-columns: minmax(0, 1fr) 1rem,
107
+ --list--accessories-size: 1.1rem,
108
+ --list--accessories-display: grid,
109
+ );
110
+
111
+ @layer #{vars.$components-layer} {
112
+ list-view {
113
+ &:not(& &, [is='form-view'] &, table-view &) {
114
+ @extend %list;
115
+
116
+ // wire
117
+ :where(&) {
118
+ --list--section-gap: var(--list-row-gap);
119
+
120
+ @include mixins.write-props($list-elses);
121
+ // --list--item-padding-inline-start: var(--list-item-padding-inline-start);
122
+ // --list--item-padding-inline-end: var(--list-item-padding-inline-end);
123
+ // --list--item-padding-block-start: var(--list-item-padding-block-start);
124
+ // --list--item-padding-block-end: var(--list-item-padding-block-end);
125
+
126
+ // --list--item-background-color: var(--list-item-background-color,);
127
+ }
128
+
129
+ // SECTION: ifs
130
+ @supports (x: #{string.unquote('if(else:red)')}) {
131
+ :where(&) {
132
+ @include mixins.write-ifs(--list-style, $list-ifs, $list-elses);
133
+ // --list--root-padding-inline: if(style(--list-style: inset-grouped): 0.5rem ; style(--list-style: sidebar): 0.5rem ;);
134
+
135
+ // --toolbaritemradius: if(style(--list-style: inset-grouped): 1rem ; style(--list-style: sidebar): 1rem ;);
136
+
137
+ // --list--separator-block-size: if(style(--list-style: sidebar): 0px ;);
138
+ // --list--separator-visibility: if(style(--list-style: collapse): 0px ;);
139
+
140
+ // --list--root-background-color: if(style(--list-style: sidebar): transparent ;);
141
+ }
142
+ }
143
+
144
+ // SECTION: ifs polyfill
145
+ @supports not (x: #{string.unquote('if(else:red)')}) {
146
+ :where(&:not([list-style])) {
147
+ @each $v in vars.$list-styles {
148
+ @container style(--list-style: #{$v}) {
149
+ @include mixins.write-props(map.get($list-ifs, $v));
150
+ }
151
+ }
152
+ }
153
+ @each $v in vars.$list-styles {
154
+ :where(&[list-style='#{$v}']) {
155
+ @include mixins.write-props(map.get($list-ifs, $v));
156
+ }
157
+ }
158
+ @include mixins.if-2col-split-view-fits {
159
+ :where(navigation-split-view [is='sidebar-view'] &[list-style]) {
160
+ @include mixins.write-props(map.get($list-ifs, sidebar));
161
+ }
162
+ :where(navigation-split-view > scroll-view &[preferred-expanded-style], navigation-split-view > body-view > scroll-view &[preferred-expanded-style]) {
163
+ @include mixins.write-props(map.get($list-ifs, inset));
164
+ }
165
+ }
166
+ }
167
+
168
+ // SECTION: attrs finally
169
+ @supports (x: #{string.unquote('attr(x type(*))')}) {
170
+ :where(&) {
171
+ --list-style: attr(list-style type(<custom-ident>), inherit);
172
+ }
173
+ @include mixins.if-2col-split-view-fits {
174
+ :where(navigation-split-view:has(> [is='sidebar-view']) > [is='sidebar-view'] &[list-style]) {
175
+ --list-style: sidebar;
176
+ }
177
+ :where(navigation-split-view > scroll-view &[preferred-expanded-style], navigation-split-view > body-view > scroll-view &[preferred-expanded-style]) {
178
+ --list-style: inset;
179
+ }
180
+ }
181
+ }
182
+
183
+ &[preferred-root-disclosure-style='sidebar'] {
184
+ --list--rootsummary-color: var(--primary);
185
+ --list--selectedrootsummary-color: var(--primary);
186
+ --list--rootsummary-background-color: transparent;
187
+ --list--selectedrootsummary-background-color: transparent;
188
+ --list--rootsummary-padding-inline-start: var(--list--item-padding-inline-start);
189
+ --list--rootsummary-padding-inline-end: var(--list--item-padding-inline-start);
190
+ --list--rootsummary-padding-block-start: 5px;
191
+ --list--rootsummary-padding-block-end: 5px;
192
+
193
+ > [is='disclosure-group'] ~ [is='disclosure-group'],
194
+ > section-view > [is='disclosure-group'] ~ [is='disclosure-group'] {
195
+ margin-block-start: var(--list-row-gap);
196
+
197
+ &::before {
198
+ display: none;
199
+ }
200
+ }
201
+
202
+ > [is='disclosure-group'],
203
+ > section-view > [is='disclosure-group'] {
204
+ --list--details-background-color: var(--list--item-background-color);
205
+ --list--opensummary-background-color: var(--list--item-background-color);
206
+
207
+ > details,
208
+ > button:first-of-type {
209
+ --itemradiustl: var(--list--item-border-radius);
210
+ --itemradiustr: var(--list--item-border-radius);
211
+
212
+ &::before {
213
+ display: none;
214
+ }
215
+ }
216
+ }
217
+ }
218
+
219
+ // FINALLY AFTER ALL IFS
220
+ // TODO: Also apply this on state of sidebar w/ full-screen detail 1/2
221
+ @include mixins.if-2col-split-view-fits {
222
+ :where(navigation-split-view > scroll-view &, navigation-split-view > body-view > scroll-view &) {
223
+ // --list--item-grid-template-columns: minmax(0, 1fr);
224
+ --list--accessories-display: none;
225
+ }
226
+ }
227
+ }
228
+ }
229
+ }