@mrpelz/uikit-ish 7.8.0 → 7.10.0

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 (308) hide show
  1. package/dist/components/accordion/main.d.ts +12 -0
  2. package/dist/components/accordion/main.d.ts.map +1 -0
  3. package/dist/components/accordion/main.js +20 -0
  4. package/dist/components/accordion/main.js.map +1 -0
  5. package/dist/components/accordion/style.css +23 -0
  6. package/dist/components/action-sheet/main.d.ts +22 -16
  7. package/dist/components/action-sheet/main.d.ts.map +1 -1
  8. package/dist/components/action-sheet/main.js +89 -19
  9. package/dist/components/action-sheet/main.js.map +1 -1
  10. package/dist/components/action-sheet/props.d.ts +17 -5
  11. package/dist/components/action-sheet/props.d.ts.map +1 -1
  12. package/dist/components/action-sheet/style.css +24 -0
  13. package/dist/components/activity-view/main.d.ts +15 -4
  14. package/dist/components/activity-view/main.d.ts.map +1 -1
  15. package/dist/components/activity-view/main.js +27 -14
  16. package/dist/components/activity-view/main.js.map +1 -1
  17. package/dist/components/activity-view/props.d.ts +2 -10
  18. package/dist/components/activity-view/props.d.ts.map +1 -1
  19. package/dist/components/activity-view/style.css +29 -67
  20. package/dist/components/alert/main.d.ts +8 -7
  21. package/dist/components/alert/main.d.ts.map +1 -1
  22. package/dist/components/alert/main.js +32 -19
  23. package/dist/components/alert/main.js.map +1 -1
  24. package/dist/components/alert/props.d.ts +13 -2
  25. package/dist/components/alert/props.d.ts.map +1 -1
  26. package/dist/components/alert/style.css +36 -50
  27. package/dist/components/avatar/main.d.ts +5 -3
  28. package/dist/components/avatar/main.d.ts.map +1 -1
  29. package/dist/components/avatar/main.js +10 -8
  30. package/dist/components/avatar/main.js.map +1 -1
  31. package/dist/components/avatar/props.d.ts +4 -0
  32. package/dist/components/avatar/props.d.ts.map +1 -1
  33. package/dist/components/avatar/style.css +1 -7
  34. package/dist/components/badge/main.d.ts +3 -3
  35. package/dist/components/badge/main.d.ts.map +1 -1
  36. package/dist/components/badge/main.js +9 -9
  37. package/dist/components/badge/main.js.map +1 -1
  38. package/dist/components/badge/props.d.ts +4 -3
  39. package/dist/components/badge/props.d.ts.map +1 -1
  40. package/dist/components/badge/style.css +10 -4
  41. package/dist/components/button/main.d.ts.map +1 -1
  42. package/dist/components/button/main.js +15 -15
  43. package/dist/components/button/main.js.map +1 -1
  44. package/dist/components/button/props.d.ts +8 -8
  45. package/dist/components/button/props.d.ts.map +1 -1
  46. package/dist/components/button/style.css +37 -55
  47. package/dist/components/checkbox/main.d.ts.map +1 -1
  48. package/dist/components/checkbox/main.js +5 -7
  49. package/dist/components/checkbox/main.js.map +1 -1
  50. package/dist/components/checkbox/style.css +5 -8
  51. package/dist/components/collapsible/main.d.ts +9 -0
  52. package/dist/components/collapsible/main.d.ts.map +1 -0
  53. package/dist/components/collapsible/main.js +19 -0
  54. package/dist/components/collapsible/main.js.map +1 -0
  55. package/dist/components/collapsible/style.css +23 -0
  56. package/dist/components/color-picker/main.d.ts +27 -4
  57. package/dist/components/color-picker/main.d.ts.map +1 -1
  58. package/dist/components/color-picker/main.js +292 -110
  59. package/dist/components/color-picker/main.js.map +1 -1
  60. package/dist/components/color-picker/props.d.ts +64 -15
  61. package/dist/components/color-picker/props.d.ts.map +1 -1
  62. package/dist/components/color-picker/style.css +133 -65
  63. package/dist/components/contextual-menu/main.d.ts +11 -7
  64. package/dist/components/contextual-menu/main.d.ts.map +1 -1
  65. package/dist/components/contextual-menu/main.js +207 -202
  66. package/dist/components/contextual-menu/main.js.map +1 -1
  67. package/dist/components/contextual-menu/props.d.ts +21 -34
  68. package/dist/components/contextual-menu/props.d.ts.map +1 -1
  69. package/dist/components/contextual-menu/style.css +63 -34
  70. package/dist/components/date-picker/handle.d.ts +41 -0
  71. package/dist/components/date-picker/handle.d.ts.map +1 -0
  72. package/dist/components/date-picker/handle.js +47 -0
  73. package/dist/components/date-picker/handle.js.map +1 -0
  74. package/dist/components/date-picker/main.d.ts +31 -49
  75. package/dist/components/date-picker/main.d.ts.map +1 -1
  76. package/dist/components/date-picker/main.js +373 -178
  77. package/dist/components/date-picker/main.js.map +1 -1
  78. package/dist/components/date-picker/pager.d.ts +24 -0
  79. package/dist/components/date-picker/pager.d.ts.map +1 -0
  80. package/dist/components/date-picker/pager.js +307 -0
  81. package/dist/components/date-picker/pager.js.map +1 -0
  82. package/dist/components/date-picker/props.d.ts +98 -27
  83. package/dist/components/date-picker/props.d.ts.map +1 -1
  84. package/dist/components/date-picker/style.css +110 -118
  85. package/dist/components/drawer/main.d.ts +31 -0
  86. package/dist/components/drawer/main.d.ts.map +1 -0
  87. package/dist/components/drawer/main.js +119 -0
  88. package/dist/components/drawer/main.js.map +1 -0
  89. package/dist/components/drawer/props.d.ts +39 -0
  90. package/dist/components/drawer/props.d.ts.map +1 -0
  91. package/dist/components/drawer/props.js +2 -0
  92. package/dist/components/drawer/props.js.map +1 -0
  93. package/dist/components/drawer/style.css +135 -0
  94. package/dist/components/edit-menu/main.d.ts +7 -7
  95. package/dist/components/edit-menu/main.d.ts.map +1 -1
  96. package/dist/components/edit-menu/main.js +57 -40
  97. package/dist/components/edit-menu/main.js.map +1 -1
  98. package/dist/components/edit-menu/props.d.ts +14 -1
  99. package/dist/components/edit-menu/props.d.ts.map +1 -1
  100. package/dist/components/edit-menu/style.css +15 -8
  101. package/dist/components/form/main.d.ts +8 -0
  102. package/dist/components/form/main.d.ts.map +1 -1
  103. package/dist/components/form/main.js +18 -5
  104. package/dist/components/form/main.js.map +1 -1
  105. package/dist/components/form/props.d.ts +1 -2
  106. package/dist/components/form/props.d.ts.map +1 -1
  107. package/dist/components/glass/main.d.ts +1 -1
  108. package/dist/components/glass/main.js +4 -4
  109. package/dist/components/glass/main.js.map +1 -1
  110. package/dist/components/glass/props.d.ts +5 -5
  111. package/dist/components/glass/props.d.ts.map +1 -1
  112. package/dist/components/glass/style.css +176 -161
  113. package/dist/components/header/main.d.ts +5 -4
  114. package/dist/components/header/main.d.ts.map +1 -1
  115. package/dist/components/header/main.js +64 -34
  116. package/dist/components/header/main.js.map +1 -1
  117. package/dist/components/header/props.d.ts +2 -3
  118. package/dist/components/header/props.d.ts.map +1 -1
  119. package/dist/components/header/style.css +46 -65
  120. package/dist/components/index.d.ts +27 -23
  121. package/dist/components/index.d.ts.map +1 -1
  122. package/dist/components/index.js +17 -13
  123. package/dist/components/index.js.map +1 -1
  124. package/dist/components/layout/main.d.ts +2 -2
  125. package/dist/components/layout/main.d.ts.map +1 -1
  126. package/dist/components/layout/main.js +63 -167
  127. package/dist/components/layout/main.js.map +1 -1
  128. package/dist/components/layout/props.d.ts +2 -20
  129. package/dist/components/layout/props.d.ts.map +1 -1
  130. package/dist/components/layout/style.css +20 -91
  131. package/dist/components/list/main.d.ts +58 -10
  132. package/dist/components/list/main.d.ts.map +1 -1
  133. package/dist/components/list/main.js +1022 -465
  134. package/dist/components/list/main.js.map +1 -1
  135. package/dist/components/list/props.d.ts +211 -21
  136. package/dist/components/list/props.d.ts.map +1 -1
  137. package/dist/components/list/reorder.d.ts +146 -0
  138. package/dist/components/list/reorder.d.ts.map +1 -0
  139. package/dist/components/list/reorder.js +819 -0
  140. package/dist/components/list/reorder.js.map +1 -0
  141. package/dist/components/list/select.d.ts +6 -0
  142. package/dist/components/list/select.d.ts.map +1 -0
  143. package/dist/components/list/select.js +141 -0
  144. package/dist/components/list/select.js.map +1 -0
  145. package/dist/components/list/style.css +492 -507
  146. package/dist/components/list/swipe-actions-handle.d.ts +40 -0
  147. package/dist/components/list/swipe-actions-handle.d.ts.map +1 -0
  148. package/dist/components/list/swipe-actions-handle.js +51 -0
  149. package/dist/components/list/swipe-actions-handle.js.map +1 -0
  150. package/dist/components/menu/main.d.ts +102 -32
  151. package/dist/components/menu/main.d.ts.map +1 -1
  152. package/dist/components/menu/main.js +510 -99
  153. package/dist/components/menu/main.js.map +1 -1
  154. package/dist/components/menu/props.d.ts +5 -5
  155. package/dist/components/menu/props.d.ts.map +1 -1
  156. package/dist/components/menu/style.css +35 -43
  157. package/dist/components/navigation/main.d.ts +14 -2
  158. package/dist/components/navigation/main.d.ts.map +1 -1
  159. package/dist/components/navigation/main.js +437 -119
  160. package/dist/components/navigation/main.js.map +1 -1
  161. package/dist/components/navigation/props.d.ts +53 -3
  162. package/dist/components/navigation/props.d.ts.map +1 -1
  163. package/dist/components/navigation/style.css +56 -9
  164. package/dist/components/page/main.d.ts.map +1 -1
  165. package/dist/components/page/main.js +13 -8
  166. package/dist/components/page/main.js.map +1 -1
  167. package/dist/components/page/props.d.ts +8 -0
  168. package/dist/components/page/props.d.ts.map +1 -1
  169. package/dist/components/page/style.css +39 -4
  170. package/dist/components/page-control/main.d.ts +2 -2
  171. package/dist/components/page-control/main.d.ts.map +1 -1
  172. package/dist/components/page-control/main.js +66 -32
  173. package/dist/components/page-control/main.js.map +1 -1
  174. package/dist/components/page-control/props.d.ts +10 -2
  175. package/dist/components/page-control/props.d.ts.map +1 -1
  176. package/dist/components/page-control/style.css +7 -2
  177. package/dist/components/popover/main.d.ts +11 -6
  178. package/dist/components/popover/main.d.ts.map +1 -1
  179. package/dist/components/popover/main.js +63 -38
  180. package/dist/components/popover/main.js.map +1 -1
  181. package/dist/components/popover/props.d.ts +7 -6
  182. package/dist/components/popover/props.d.ts.map +1 -1
  183. package/dist/components/popover/style.css +54 -4
  184. package/dist/components/progress/main.d.ts +2 -3
  185. package/dist/components/progress/main.d.ts.map +1 -1
  186. package/dist/components/progress/main.js +148 -29
  187. package/dist/components/progress/main.js.map +1 -1
  188. package/dist/components/progress/props.d.ts +43 -9
  189. package/dist/components/progress/props.d.ts.map +1 -1
  190. package/dist/components/progress/style.css +82 -50
  191. package/dist/components/roll/main.d.ts +1 -1
  192. package/dist/components/roll/main.d.ts.map +1 -1
  193. package/dist/components/roll/main.js +90 -34
  194. package/dist/components/roll/main.js.map +1 -1
  195. package/dist/components/roll/props.d.ts +25 -8
  196. package/dist/components/roll/props.d.ts.map +1 -1
  197. package/dist/components/roll/style.css +12 -24
  198. package/dist/components/segmented/main.d.ts.map +1 -1
  199. package/dist/components/segmented/main.js +47 -30
  200. package/dist/components/segmented/main.js.map +1 -1
  201. package/dist/components/segmented/style.css +16 -23
  202. package/dist/components/sheet/main.d.ts +25 -15
  203. package/dist/components/sheet/main.d.ts.map +1 -1
  204. package/dist/components/sheet/main.js +66 -78
  205. package/dist/components/sheet/main.js.map +1 -1
  206. package/dist/components/sheet/props.d.ts +37 -3
  207. package/dist/components/sheet/props.d.ts.map +1 -1
  208. package/dist/components/sheet/style.css +183 -45
  209. package/dist/components/sidebar/main.d.ts.map +1 -1
  210. package/dist/components/sidebar/main.js +9 -13
  211. package/dist/components/sidebar/main.js.map +1 -1
  212. package/dist/components/sidebar/style.css +20 -14
  213. package/dist/components/slider/main.d.ts.map +1 -1
  214. package/dist/components/slider/main.js +23 -22
  215. package/dist/components/slider/main.js.map +1 -1
  216. package/dist/components/slider/props.d.ts +1 -2
  217. package/dist/components/slider/props.d.ts.map +1 -1
  218. package/dist/components/slider/style.css +27 -53
  219. package/dist/components/stepper/main.d.ts +4 -6
  220. package/dist/components/stepper/main.d.ts.map +1 -1
  221. package/dist/components/stepper/main.js +29 -25
  222. package/dist/components/stepper/main.js.map +1 -1
  223. package/dist/components/stepper/style.css +12 -16
  224. package/dist/components/switch/main.d.ts.map +1 -1
  225. package/dist/components/switch/main.js +40 -28
  226. package/dist/components/switch/main.js.map +1 -1
  227. package/dist/components/switch/props.d.ts +7 -5
  228. package/dist/components/switch/props.d.ts.map +1 -1
  229. package/dist/components/switch/style.css +40 -17
  230. package/dist/components/symbol/main.d.ts +2 -2
  231. package/dist/components/symbol/main.d.ts.map +1 -1
  232. package/dist/components/symbol/main.js +36 -28
  233. package/dist/components/symbol/main.js.map +1 -1
  234. package/dist/components/symbol/props.d.ts +39 -4
  235. package/dist/components/symbol/props.d.ts.map +1 -1
  236. package/dist/components/symbol/style.css +26 -5
  237. package/dist/components/tab-bar/main.d.ts +2 -2
  238. package/dist/components/tab-bar/main.d.ts.map +1 -1
  239. package/dist/components/tab-bar/main.js +133 -101
  240. package/dist/components/tab-bar/main.js.map +1 -1
  241. package/dist/components/tab-bar/props.d.ts +6 -6
  242. package/dist/components/tab-bar/props.d.ts.map +1 -1
  243. package/dist/components/tab-bar/style.css +113 -99
  244. package/dist/components/text-field/main.d.ts +3 -2
  245. package/dist/components/text-field/main.d.ts.map +1 -1
  246. package/dist/components/text-field/main.js +29 -30
  247. package/dist/components/text-field/main.js.map +1 -1
  248. package/dist/components/text-field/props.d.ts +23 -1
  249. package/dist/components/text-field/props.d.ts.map +1 -1
  250. package/dist/components/text-field/style.css +122 -82
  251. package/dist/components/toolbar/main.js +27 -27
  252. package/dist/components/toolbar/main.js.map +1 -1
  253. package/dist/components/toolbar/props.d.ts +10 -4
  254. package/dist/components/toolbar/props.d.ts.map +1 -1
  255. package/dist/components/toolbar/style.css +39 -33
  256. package/dist/components/tooltip/main.d.ts +10 -9
  257. package/dist/components/tooltip/main.d.ts.map +1 -1
  258. package/dist/components/tooltip/main.js +39 -10
  259. package/dist/components/tooltip/main.js.map +1 -1
  260. package/dist/components/tooltip/props.d.ts +2 -0
  261. package/dist/components/tooltip/props.d.ts.map +1 -1
  262. package/dist/components/tooltip/style.css +16 -16
  263. package/dist/components/typography/main.d.ts +2 -2
  264. package/dist/components/typography/main.d.ts.map +1 -1
  265. package/dist/components/typography/main.js +24 -16
  266. package/dist/components/typography/main.js.map +1 -1
  267. package/dist/components/typography/props.d.ts +11 -18
  268. package/dist/components/typography/props.d.ts.map +1 -1
  269. package/dist/components/typography/style.css +503 -623
  270. package/dist/components/utils/main.d.ts +78 -8
  271. package/dist/components/utils/main.d.ts.map +1 -1
  272. package/dist/components/utils/main.js +235 -16
  273. package/dist/components/utils/main.js.map +1 -1
  274. package/dist/components/utils/props.d.ts +27 -4
  275. package/dist/components/utils/props.d.ts.map +1 -1
  276. package/dist/components/utils/style.css +31 -18
  277. package/dist/components/viewport/edge-effect.d.ts +10 -0
  278. package/dist/components/viewport/edge-effect.d.ts.map +1 -0
  279. package/dist/components/viewport/edge-effect.js +100 -0
  280. package/dist/components/viewport/edge-effect.js.map +1 -0
  281. package/dist/components/viewport/edge.d.ts +39 -0
  282. package/dist/components/viewport/edge.d.ts.map +1 -0
  283. package/dist/components/viewport/edge.js +151 -0
  284. package/dist/components/viewport/edge.js.map +1 -0
  285. package/dist/components/viewport/input.d.ts +39 -0
  286. package/dist/components/viewport/input.d.ts.map +1 -0
  287. package/dist/components/viewport/input.js +280 -0
  288. package/dist/components/viewport/input.js.map +1 -0
  289. package/dist/components/viewport/main.d.ts +47 -9
  290. package/dist/components/viewport/main.d.ts.map +1 -1
  291. package/dist/components/viewport/main.js +745 -86
  292. package/dist/components/viewport/main.js.map +1 -1
  293. package/dist/components/viewport/padding.d.ts +78 -0
  294. package/dist/components/viewport/padding.d.ts.map +1 -0
  295. package/dist/components/viewport/padding.js +321 -0
  296. package/dist/components/viewport/padding.js.map +1 -0
  297. package/dist/components/viewport/props.d.ts +220 -11
  298. package/dist/components/viewport/props.d.ts.map +1 -1
  299. package/dist/components/viewport/style.css +377 -6
  300. package/dist/main.d.ts +0 -1
  301. package/dist/main.d.ts.map +1 -1
  302. package/dist/main.js.map +1 -1
  303. package/dist/styles.css +318 -302
  304. package/dist/styles.d.ts +2 -1
  305. package/dist/styles.d.ts.map +1 -1
  306. package/dist/styles.js +2 -1
  307. package/dist/styles.js.map +1 -1
  308. package/package.json +8 -16
@@ -9,7 +9,7 @@
9
9
  opacity: calc(1 - var(--uikit-switch-pressed));
10
10
  place-items: center;
11
11
  pointer-events: none;
12
- transition: opacity var(--glass-ios-lens-duration);
12
+ transition: opacity var(--glass-ui-lens-duration);
13
13
 
14
14
  &::before {
15
15
  width: 1px;
@@ -30,13 +30,13 @@
30
30
  opacity: calc(1 - var(--uikit-switch-pressed));
31
31
  place-items: center;
32
32
  pointer-events: none;
33
- transition: opacity var(--glass-ios-lens-duration);
33
+ transition: opacity var(--glass-ui-lens-duration);
34
34
 
35
35
  &::before {
36
36
  width: 9px;
37
37
  height: 9px;
38
38
  box-sizing: border-box;
39
- border: 1px solid var(--color-ios-tertiary-label);
39
+ border: 1px solid var(--color-ui-tertiary-label);
40
40
  border-radius: 50%;
41
41
  content: '';
42
42
  }
@@ -49,8 +49,8 @@
49
49
  --uikit-switch-knob-width: 39px;
50
50
  --uikit-switch-knob-start: 2px;
51
51
  --uikit-switch-pressed: 0;
52
- --uikit-switch-on-color: var(--color-ios-system-green);
53
- --uikit-switch-off-color: var(--color-ios-system-fill);
52
+ --uikit-switch-on-color: var(--color-ui-system-green);
53
+ --uikit-switch-off-color: var(--color-ui-system-fill);
54
54
 
55
55
  position: relative;
56
56
  display: inline-block;
@@ -60,6 +60,7 @@
60
60
  align-self: center;
61
61
  border-radius: 100px;
62
62
  touch-action: pan-y;
63
+ -webkit-user-select: none;
63
64
  user-select: none;
64
65
  vertical-align: middle;
65
66
 
@@ -75,7 +76,27 @@
75
76
  content: '';
76
77
  inset: 0;
77
78
  transform: scale(calc(1 - 0.25 * var(--uikit-switch-pressed)));
78
- transition-duration: var(--glass-ios-lens-duration);
79
+ transition-duration: var(--glass-ui-lens-duration);
80
+ }
81
+
82
+ /* Mixed but checked (see below): the on color from its start, fading
83
+ out halfway (under the knob), faded in. */
84
+ &::after {
85
+ position: absolute;
86
+ z-index: 0;
87
+ border-radius: inherit;
88
+ background-color: var(--uikit-switch-on-color);
89
+ content: '';
90
+ inset: 0;
91
+ mask-image: linear-gradient(to right, #000 25%, transparent 50%);
92
+ opacity: 0;
93
+ transform: scale(calc(1 - 0.25 * var(--uikit-switch-pressed)));
94
+ transition-duration: var(--glass-ui-lens-duration);
95
+ transition-property: opacity, transform;
96
+ }
97
+
98
+ &:dir(rtl)::after {
99
+ mask-image: linear-gradient(to left, #000 25%, transparent 50%);
79
100
  }
80
101
 
81
102
  &[data-checked] {
@@ -88,10 +109,6 @@
88
109
  }
89
110
  }
90
111
 
91
- &:active {
92
- --uikit-switch-pressed: 1;
93
- }
94
-
95
112
  &[data-disabled],
96
113
  &[data-readonly] {
97
114
  --uikit-switch-pressed: 0;
@@ -103,7 +120,9 @@
103
120
  opacity: 0.55;
104
121
  }
105
122
 
106
- /* Mixed: the knob centered, the track off (over checked, see above). */
123
+ /* Mixed: the knob centered, the track off (over checked, see above);
124
+ checked, its start half tinted (see above), so it tells which it'll
125
+ be. */
107
126
  &[data-indeterminate] {
108
127
  --uikit-switch-knob-start: calc(50% - var(--uikit-switch-knob-width) / 2);
109
128
 
@@ -111,6 +130,10 @@
111
130
  background-color: var(--uikit-switch-off-color);
112
131
  }
113
132
 
133
+ &[data-checked]::after {
134
+ opacity: 1;
135
+ }
136
+
114
137
  & > [data-switch-part='label'] {
115
138
  opacity: 0;
116
139
  }
@@ -133,12 +156,12 @@
133
156
  );
134
157
  inset-inline-start: var(--uikit-switch-knob-start);
135
158
  transform: scale(
136
- calc(1 + (var(--glass-ios-lens-scale) - 1) * var(--uikit-switch-pressed))
159
+ calc(1 + (var(--glass-ui-lens-scale) - 1) * var(--uikit-switch-pressed))
137
160
  );
138
161
  transform-origin: center;
139
162
  transition-duration:
140
- var(--uikit-switch-knob-move-duration, var(--glass-ios-lens-duration)),
141
- var(--glass-ios-lens-duration), var(--glass-ios-lens-duration);
163
+ var(--uikit-switch-knob-move-duration, var(--glass-ui-lens-duration)),
164
+ var(--glass-ui-lens-duration), var(--glass-ui-lens-duration);
142
165
  transition-property: inset-inline-start, background-color, transform;
143
166
 
144
167
  &::before {
@@ -152,17 +175,17 @@
152
175
  color-mix(in srgb, var(--uikit-switch-on-color) 75%, transparent);
153
176
  content: '';
154
177
  opacity: var(--uikit-switch-pressed);
155
- transition-duration: var(--glass-ios-lens-duration);
178
+ transition-duration: var(--glass-ui-lens-duration);
156
179
  }
157
180
 
158
181
  &::after {
159
182
  position: absolute;
160
183
  border-radius: inherit;
161
- box-shadow: var(--glass-ios-lens-shadow);
184
+ box-shadow: var(--glass-ui-lens-shadow);
162
185
  content: '';
163
186
  inset: 0;
164
187
  opacity: var(--uikit-switch-pressed);
165
- transition-duration: var(--glass-ios-lens-duration);
188
+ transition-duration: var(--glass-ui-lens-duration);
166
189
  }
167
190
  }
168
191
  }
@@ -1,7 +1,7 @@
1
1
  import './style.css';
2
2
  import type { SymbolProps } from './props.js';
3
- export type { SymbolProps } from './props.js';
4
- /** An SF Symbol (from `@bradleyhodges/sfsymbols`), with e.g. a `Badge`. */
3
+ export type { SymbolIcon, SymbolProps } from './props.js';
4
+ /** An icon's outlines (e.g. an SF Symbol's), with e.g. a `Badge`. */
5
5
  export declare const Symbol: import("preact").FunctionalComponent<import("react").PropsWithoutRef<SymbolProps> & {
6
6
  ref?: import("preact").Ref<HTMLSpanElement> | undefined;
7
7
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAoB9C,2EAA2E;AAC3E,eAAO,MAAM,MAAM;;EAgFlB,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAc,WAAW,EAAE,MAAM,YAAY,CAAC;AAE1D,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AA0E1D,qEAAqE;AACrE,eAAO,MAAM,MAAM;;EAyClB,CAAC"}
@@ -1,32 +1,40 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import './style.css';
3
- import { forwardRef, useId } from 'react';
4
- import { cn } from '../utils/main.js';
5
- // An SF Symbol, sized like the SF Pro glyph at the current font size, so it
6
- // can stand in for one (e.g. `􀋃` in Figma). Its weight follows the font
7
- // weight its host sets (see `fontWeight`): heavier than regular, stroked;
8
- // lighter, masked by its own outline stroked as much
9
- // (`--uikit-symbol-thinning`, in its units), which takes as much off its
10
- // edges.
3
+ import { forwardRef } from 'react';
4
+ import { cn, withStyle } from '../utils/main.js';
5
+ // An icon's outlines (e.g. an SF Symbol's; the library ships none), sized
6
+ // like the SF Pro glyph at the current font size, so it can stand in for
7
+ // one. Its outlines are filled as given (SF Symbols': the Regular weight
8
+ // only, whatever its host's font weight), its layers at their relative
9
+ // opacities.
11
10
  //
12
- // Its children (e.g. a `Badge`) sit on it: the glyph alone is blended and
13
- // scaled by its host (`--uikit-symbol-blend`, `--uikit-symbol-scale`,
11
+ // Emphasized (e.g. a selected tab's), it shows its `emphasizedIcon` (e.g.
12
+ // the filled variant) instead: both glyphs stacked, faded by
13
+ // `--uikit-symbol-emphasis` (0 to 1, inherited: set by its host, e.g. on
14
+ // its selected state; see styles.css), so no state of the app's needs to
15
+ // pick the icon.
16
+ //
17
+ // Its children (e.g. a `Badge`) sit on it: the glyphs alone are blended
18
+ // and scaled by its host (`--uikit-symbol-blend`, `--uikit-symbol-scale`,
14
19
  // e.g. a glass button's vibrant content), so they stay solid.
15
- // The catalogue's paths are SF Pro glyphs at 20pt (e.g. `circle` is 19.92
16
- // wide, the glyph's ink box 0.996em).
17
- const unitsPerEm = 20;
18
- // Room for strokes beyond the view box (in its units, see `fontWeight`).
19
- const bleed = 2;
20
- /** An SF Symbol (from `@bradleyhodges/sfsymbols`), with e.g. a `Badge`. */
21
- export const Symbol = forwardRef(({ children, className, icon, ...props }, ref) => {
22
- const mask = `uikit-symbol-${useId().replaceAll(/[^\w-]/gu, '')}`;
23
- const [width = 0, height = 0] = icon.viewBox
24
- .split(' ')
25
- .slice(2)
26
- .map(Number);
27
- const paths = icon.svgPathData.map(({ d }) => d);
28
- return (_jsxs("span", { ref: ref, "data-symbol": icon.sourceName, ...props, className: cn('uikit-symbol', className), children: [_jsx("span", { className: "uikit-symbol-glyph", "data-symbol-part": "glyph", children: _jsxs("svg", { "aria-hidden": "true", fill: "currentcolor", height: `${String(height / unitsPerEm)}em`, viewBox: icon.viewBox, width: `${String(width / unitsPerEm)}em`, children: [_jsxs("mask", { height: height + 2 * bleed, id: mask, maskUnits: "userSpaceOnUse", style: { maskType: 'luminance' }, width: width + 2 * bleed, x: -bleed, y: -bleed, children: [paths.map((d, index) => (_jsx("path", { d: d, fill: "#fff", stroke: "#fff" }, index))), _jsx("g", { style: { strokeWidth: 0 }, children: paths.map((d, index) => (_jsx("path", { d: d, fill: "none", stroke: "#000", style: {
29
- strokeWidth: 'var(--uikit-symbol-thinning, 0px)',
30
- } }, index))) })] }), _jsx("rect", { fill: "currentcolor", height: height + 2 * bleed, mask: `url(#${mask})`, width: width + 2 * bleed, x: -bleed, y: -bleed })] }) }), children] }));
31
- });
20
+ // In a line of text, its ink's center on the text's: half the cap height up
21
+ // from the baseline (`baselineShift`, see style.css).
22
+ //
23
+ // SF Symbols' paths are SF Pro glyphs at 20pt (e.g. `circle` is 19.92 wide,
24
+ // the glyph's ink box 0.996em): other icons give their own units.
25
+ const defaultUnitsPerEm = 20;
26
+ /** An icon's size (em), from its view box. */
27
+ const sizeOf = ({ unitsPerEm = defaultUnitsPerEm, viewBox }) => {
28
+ const [width = 0, height = 0] = viewBox.split(' ').slice(2).map(Number);
29
+ return { height: height / unitsPerEm, width: width / unitsPerEm };
30
+ };
31
+ // An icon's glyph: its layers, each at its opacity relative to the most
32
+ // opaque one's.
33
+ const Glyph = ({ icon, variant, }) => {
34
+ const { height, width } = sizeOf(icon);
35
+ const opacity = Math.max(...icon.svgPathData.map(({ fillOpacity = 1 }) => fillOpacity));
36
+ return (_jsx("span", { className: "uikit-symbol-glyph", "data-symbol-part": "glyph", "data-variant": variant, children: _jsx("svg", { "aria-hidden": "true", fill: "currentcolor", height: `${String(height)}em`, viewBox: icon.viewBox, width: `${String(width)}em`, children: icon.svgPathData.map(({ d, fillOpacity = 1 }, index) => (_jsx("path", { d: d, fillOpacity: fillOpacity === opacity ? undefined : fillOpacity / opacity }, index))) }) }));
37
+ };
38
+ /** An icon's outlines (e.g. an SF Symbol's), with e.g. a `Badge`. */
39
+ export const Symbol = forwardRef(({ baselineShift = 'optical', children, className, emphasizedIcon, icon, style, ...props }, ref) => (_jsxs("span", { ref: ref, "data-baseline-shift": baselineShift, "data-symbol": icon.sourceName, style: withStyle({ '--uikit-symbol-height': `${String(sizeOf(icon).height)}em` }, style), ...props, className: cn('uikit-symbol', className), children: [emphasizedIcon ? (_jsxs(_Fragment, { children: [_jsx(Glyph, { icon: icon, variant: "regular" }), _jsx(Glyph, { icon: emphasizedIcon, variant: "emphasized" })] })) : (_jsx(Glyph, { icon: icon })), children] })));
32
40
  //# sourceMappingURL=main.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/symbol/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAKtC,4EAA4E;AAC5E,yEAAyE;AACzE,0EAA0E;AAC1E,qDAAqD;AACrD,yEAAyE;AACzE,SAAS;AACT,EAAE;AACF,0EAA0E;AAC1E,sEAAsE;AACtE,8DAA8D;AAE9D,0EAA0E;AAC1E,sCAAsC;AACtC,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,yEAAyE;AACzE,MAAM,KAAK,GAAG,CAAC,CAAC;AAEhB,2EAA2E;AAC3E,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAC9B,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE;IAC/C,MAAM,IAAI,GAAG,gBAAgB,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,EAAE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T,cAAc,EACd,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE,CAAC,CACH,gBACE,GAAG,EAAE,GAAG,yBACa,aAAa,iBACrB,IAAI,CAAC,UAAU,EAC5B,KAAK,EAAE,SAAS,CACd,EAAE,uBAAuB,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,EAC/D,KAAK,CACN,KACG,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,cAAc,EAAE,SAAS,CAAC,aAEvC,cAAc,CAAC,CAAC,CAAC,CAChB,8BACE,KAAC,KAAK,IACJ,IAAI,EAAE,IAAI,EACV,OAAO,EAAC,SAAS,GACjB,EACF,KAAC,KAAK,IACJ,IAAI,EAAE,cAAc,EACpB,OAAO,EAAC,YAAY,GACpB,IACD,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,KAAK,IAAC,IAAI,EAAE,IAAI,GAAI,CACtB,EACA,QAAQ,IACJ,CACR,CACF,CAAC"}
@@ -1,10 +1,45 @@
1
- import type { IconDefinition } from '@bradleyhodges/sfsymbols-types';
2
1
  import type { ComponentProps } from 'react';
2
+ /**
3
+ * An icon's outlines: filled paths in a view box. The library ships no
4
+ * icons: e.g. an SF Symbol from `@bradleyhodges/sfsymbols` (`sfBell`) has
5
+ * this shape (Apple's, licensed for Apple platforms only; no dependency).
6
+ */
7
+ export type SymbolIcon = {
8
+ /** Its name (e.g. `bell`), as its `data-symbol`. */
9
+ sourceName?: string;
10
+ /**
11
+ * Its outlines (filled), each a layer: its opacity relative to the
12
+ * most opaque one's (SF Symbols' hierarchical layers: 0.85 primary,
13
+ * 0.425 secondary, 0.2125 tertiary; drawn 1, 0.5, 0.25).
14
+ */
15
+ svgPathData: readonly {
16
+ d: string;
17
+ fillOpacity?: number;
18
+ }[];
19
+ /**
20
+ * Its view box's units in an em (its size at the font size).
21
+ * @default 20 (SF Symbols' outlines: SF Pro glyphs at 20pt)
22
+ */
23
+ unitsPerEm?: number;
24
+ /** Its view box (`minX minY width height`): its ink's, as SF Symbols'. */
25
+ viewBox: string;
26
+ };
3
27
  export type SymbolProps = ComponentProps<'span'> & {
4
28
  /**
5
- * The SF Symbol (from `@bradleyhodges/sfsymbols`, e.g. `sfBell`; a peer
6
- * dependency, mind Apple's terms for SF Symbols).
29
+ * Its place in a line of text: its ink's center on the text's (its cap
30
+ * height's middle, as SF Symbols set with SF Pro), or its ink's bottom on
31
+ * the baseline. In a flex or grid container (e.g. a button's), none: the
32
+ * container places it.
33
+ * @default 'optical'
34
+ */
35
+ baselineShift?: 'none' | 'optical';
36
+ /**
37
+ * The icon shown emphasized (e.g. `sfBellFill`), in place of `icon`: as
38
+ * much as its host emphasizes it (`--uikit-symbol-emphasis`, 0 to 1, e.g.
39
+ * a selected tab's), with no state of its own.
7
40
  */
8
- icon: IconDefinition;
41
+ emphasizedIcon?: SymbolIcon;
42
+ /** The icon (see `SymbolIcon`), e.g. `sfBell`. */
43
+ icon: SymbolIcon;
9
44
  };
10
45
  //# sourceMappingURL=props.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AACrE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IACjD;;;OAGG;IACH,IAAI,EAAE,cAAc,CAAC;CACtB,CAAC"}
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/symbol/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C;;;;GAIG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,WAAW,EAAE,SAAS;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5D;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IACjD;;;;;;OAMG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;;;OAIG;IACH,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,kDAAkD;IAClD,IAAI,EAAE,UAAU,CAAC;CAClB,CAAC"}
@@ -6,21 +6,42 @@
6
6
  position: relative;
7
7
  display: inline-flex;
8
8
  flex: none;
9
+
10
+ /* In a line of text, its ink's center on the text's: half the cap
11
+ height up from the baseline, its ink's bottom (its baseline) half its
12
+ height below that (`--uikit-symbol-height`, see main.tsx). In a flex
13
+ or grid container, no effect. */
14
+ &[data-baseline-shift='optical'] {
15
+ vertical-align: calc(0.5cap - var(--uikit-symbol-height, 1em) / 2);
16
+ }
9
17
  }
10
18
 
11
- /* Blended and scaled as its host's content (see main.tsx). Strokes (see
12
- `fontWeight`) extend beyond the view box; the margin is the glyph's side
13
- bearing (SF Pro: `circle` 0.087em, `magnifyingglass` 0.112em,
14
- `star.fill` 0.096em). */
19
+ /* Blended and scaled as its host's content (see main.tsx). The margin is
20
+ the glyph's side bearing (SF Pro: `circle` 0.087em, `magnifyingglass`
21
+ 0.112em, `star.fill` 0.096em). */
15
22
  .uikit-symbol-glyph {
16
23
  display: inline-flex;
17
24
  mix-blend-mode: var(--uikit-symbol-blend, normal);
18
25
  scale: var(--uikit-symbol-scale, none);
19
- transition: scale var(--glass-ios-lens-duration, 0s);
26
+ transition: scale var(--glass-ui-lens-duration, 0s);
20
27
 
21
28
  & > svg {
22
29
  overflow: visible;
23
30
  margin-inline: 0.1em;
24
31
  }
32
+
33
+ /* Its regular and emphasized glyphs, stacked (the emphasized one
34
+ centered on the regular one's box), faded by its host's emphasis. */
35
+ &[data-variant='regular'] {
36
+ opacity: calc(1 - var(--uikit-symbol-emphasis));
37
+ }
38
+
39
+ &[data-variant='emphasized'] {
40
+ position: absolute;
41
+ align-items: center;
42
+ justify-content: center;
43
+ inset: 0;
44
+ opacity: var(--uikit-symbol-emphasis);
45
+ }
25
46
  }
26
47
  }
@@ -3,8 +3,8 @@ import './style.css';
3
3
  import type { CollapsedGroupSelection, TabBarAccessoryProps, TabBarGroupProps, TabBarListProps, TabBarRootProps, TabBarTabProps } from './props.js';
4
4
  export type { AccessoryVisibility, CollapsedContent, CollapsedGroupSelection, CollapsedPosition, TabBarAccessoryProps, TabBarGroupProps, TabBarListProps, TabBarRootProps, TabBarTabProps, } from './props.js';
5
5
  /**
6
- * A choice of what remains while collapsed (for `visibleWhenCollapsed`), as
7
- * iOS's: the active tab (by its value, among the groups' tab values) and its
6
+ * A choice of what remains while collapsed (for `visibleWhenCollapsed`): the
7
+ * active tab (by its value, among the groups' tab values) and its
8
8
  * group; without one, the first group's first tab. Every group's `tab` is
9
9
  * its active tab, or its first (for groups the app keeps, too).
10
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/tab-bar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AA2BrB,OAAO,KAAK,EAGV,uBAAuB,EAKvB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AAyOpB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,EACtC,QAAQ,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EACrC,OAAO,KAAK,GAAG,SAAS,KACvB,uBAAuB,EAQzB,CAAC;AA40CF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CAUlB,CAAC"}
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/tab-bar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AA6BrB,OAAO,KAAK,EAGV,uBAAuB,EAKvB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,uBAAuB,EACvB,iBAAiB,EACjB,oBAAoB,EACpB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,cAAc,GACf,MAAM,YAAY,CAAC;AAuOpB;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,KAAK,EACtC,QAAQ,SAAS,CAAC,SAAS,KAAK,EAAE,CAAC,EAAE,EACrC,OAAO,KAAK,GAAG,SAAS,KACvB,uBAAuB,EAQzB,CAAC;AAs4CF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CAUlB,CAAC"}