@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.
- package/dist/components/accordion/main.d.ts +12 -0
- package/dist/components/accordion/main.d.ts.map +1 -0
- package/dist/components/accordion/main.js +20 -0
- package/dist/components/accordion/main.js.map +1 -0
- package/dist/components/accordion/style.css +23 -0
- package/dist/components/action-sheet/main.d.ts +22 -16
- package/dist/components/action-sheet/main.d.ts.map +1 -1
- package/dist/components/action-sheet/main.js +89 -19
- package/dist/components/action-sheet/main.js.map +1 -1
- package/dist/components/action-sheet/props.d.ts +17 -5
- package/dist/components/action-sheet/props.d.ts.map +1 -1
- package/dist/components/action-sheet/style.css +24 -0
- package/dist/components/activity-view/main.d.ts +15 -4
- package/dist/components/activity-view/main.d.ts.map +1 -1
- package/dist/components/activity-view/main.js +27 -14
- package/dist/components/activity-view/main.js.map +1 -1
- package/dist/components/activity-view/props.d.ts +2 -10
- package/dist/components/activity-view/props.d.ts.map +1 -1
- package/dist/components/activity-view/style.css +29 -67
- package/dist/components/alert/main.d.ts +8 -7
- package/dist/components/alert/main.d.ts.map +1 -1
- package/dist/components/alert/main.js +32 -19
- package/dist/components/alert/main.js.map +1 -1
- package/dist/components/alert/props.d.ts +13 -2
- package/dist/components/alert/props.d.ts.map +1 -1
- package/dist/components/alert/style.css +36 -50
- package/dist/components/avatar/main.d.ts +5 -3
- package/dist/components/avatar/main.d.ts.map +1 -1
- package/dist/components/avatar/main.js +10 -8
- package/dist/components/avatar/main.js.map +1 -1
- package/dist/components/avatar/props.d.ts +4 -0
- package/dist/components/avatar/props.d.ts.map +1 -1
- package/dist/components/avatar/style.css +1 -7
- package/dist/components/badge/main.d.ts +3 -3
- package/dist/components/badge/main.d.ts.map +1 -1
- package/dist/components/badge/main.js +9 -9
- package/dist/components/badge/main.js.map +1 -1
- package/dist/components/badge/props.d.ts +4 -3
- package/dist/components/badge/props.d.ts.map +1 -1
- package/dist/components/badge/style.css +10 -4
- package/dist/components/button/main.d.ts.map +1 -1
- package/dist/components/button/main.js +15 -15
- package/dist/components/button/main.js.map +1 -1
- package/dist/components/button/props.d.ts +8 -8
- package/dist/components/button/props.d.ts.map +1 -1
- package/dist/components/button/style.css +37 -55
- package/dist/components/checkbox/main.d.ts.map +1 -1
- package/dist/components/checkbox/main.js +5 -7
- package/dist/components/checkbox/main.js.map +1 -1
- package/dist/components/checkbox/style.css +5 -8
- package/dist/components/collapsible/main.d.ts +9 -0
- package/dist/components/collapsible/main.d.ts.map +1 -0
- package/dist/components/collapsible/main.js +19 -0
- package/dist/components/collapsible/main.js.map +1 -0
- package/dist/components/collapsible/style.css +23 -0
- package/dist/components/color-picker/main.d.ts +27 -4
- package/dist/components/color-picker/main.d.ts.map +1 -1
- package/dist/components/color-picker/main.js +292 -110
- package/dist/components/color-picker/main.js.map +1 -1
- package/dist/components/color-picker/props.d.ts +64 -15
- package/dist/components/color-picker/props.d.ts.map +1 -1
- package/dist/components/color-picker/style.css +133 -65
- package/dist/components/contextual-menu/main.d.ts +11 -7
- package/dist/components/contextual-menu/main.d.ts.map +1 -1
- package/dist/components/contextual-menu/main.js +207 -202
- package/dist/components/contextual-menu/main.js.map +1 -1
- package/dist/components/contextual-menu/props.d.ts +21 -34
- package/dist/components/contextual-menu/props.d.ts.map +1 -1
- package/dist/components/contextual-menu/style.css +63 -34
- package/dist/components/date-picker/handle.d.ts +41 -0
- package/dist/components/date-picker/handle.d.ts.map +1 -0
- package/dist/components/date-picker/handle.js +47 -0
- package/dist/components/date-picker/handle.js.map +1 -0
- package/dist/components/date-picker/main.d.ts +31 -49
- package/dist/components/date-picker/main.d.ts.map +1 -1
- package/dist/components/date-picker/main.js +373 -178
- package/dist/components/date-picker/main.js.map +1 -1
- package/dist/components/date-picker/pager.d.ts +24 -0
- package/dist/components/date-picker/pager.d.ts.map +1 -0
- package/dist/components/date-picker/pager.js +307 -0
- package/dist/components/date-picker/pager.js.map +1 -0
- package/dist/components/date-picker/props.d.ts +98 -27
- package/dist/components/date-picker/props.d.ts.map +1 -1
- package/dist/components/date-picker/style.css +110 -118
- package/dist/components/drawer/main.d.ts +31 -0
- package/dist/components/drawer/main.d.ts.map +1 -0
- package/dist/components/drawer/main.js +119 -0
- package/dist/components/drawer/main.js.map +1 -0
- package/dist/components/drawer/props.d.ts +39 -0
- package/dist/components/drawer/props.d.ts.map +1 -0
- package/dist/components/drawer/props.js +2 -0
- package/dist/components/drawer/props.js.map +1 -0
- package/dist/components/drawer/style.css +135 -0
- package/dist/components/edit-menu/main.d.ts +7 -7
- package/dist/components/edit-menu/main.d.ts.map +1 -1
- package/dist/components/edit-menu/main.js +57 -40
- package/dist/components/edit-menu/main.js.map +1 -1
- package/dist/components/edit-menu/props.d.ts +14 -1
- package/dist/components/edit-menu/props.d.ts.map +1 -1
- package/dist/components/edit-menu/style.css +15 -8
- package/dist/components/form/main.d.ts +8 -0
- package/dist/components/form/main.d.ts.map +1 -1
- package/dist/components/form/main.js +18 -5
- package/dist/components/form/main.js.map +1 -1
- package/dist/components/form/props.d.ts +1 -2
- package/dist/components/form/props.d.ts.map +1 -1
- package/dist/components/glass/main.d.ts +1 -1
- package/dist/components/glass/main.js +4 -4
- package/dist/components/glass/main.js.map +1 -1
- package/dist/components/glass/props.d.ts +5 -5
- package/dist/components/glass/props.d.ts.map +1 -1
- package/dist/components/glass/style.css +176 -161
- package/dist/components/header/main.d.ts +5 -4
- package/dist/components/header/main.d.ts.map +1 -1
- package/dist/components/header/main.js +64 -34
- package/dist/components/header/main.js.map +1 -1
- package/dist/components/header/props.d.ts +2 -3
- package/dist/components/header/props.d.ts.map +1 -1
- package/dist/components/header/style.css +46 -65
- package/dist/components/index.d.ts +27 -23
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +17 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/main.d.ts +2 -2
- package/dist/components/layout/main.d.ts.map +1 -1
- package/dist/components/layout/main.js +63 -167
- package/dist/components/layout/main.js.map +1 -1
- package/dist/components/layout/props.d.ts +2 -20
- package/dist/components/layout/props.d.ts.map +1 -1
- package/dist/components/layout/style.css +20 -91
- package/dist/components/list/main.d.ts +58 -10
- package/dist/components/list/main.d.ts.map +1 -1
- package/dist/components/list/main.js +1022 -465
- package/dist/components/list/main.js.map +1 -1
- package/dist/components/list/props.d.ts +211 -21
- package/dist/components/list/props.d.ts.map +1 -1
- package/dist/components/list/reorder.d.ts +146 -0
- package/dist/components/list/reorder.d.ts.map +1 -0
- package/dist/components/list/reorder.js +819 -0
- package/dist/components/list/reorder.js.map +1 -0
- package/dist/components/list/select.d.ts +6 -0
- package/dist/components/list/select.d.ts.map +1 -0
- package/dist/components/list/select.js +141 -0
- package/dist/components/list/select.js.map +1 -0
- package/dist/components/list/style.css +492 -507
- package/dist/components/list/swipe-actions-handle.d.ts +40 -0
- package/dist/components/list/swipe-actions-handle.d.ts.map +1 -0
- package/dist/components/list/swipe-actions-handle.js +51 -0
- package/dist/components/list/swipe-actions-handle.js.map +1 -0
- package/dist/components/menu/main.d.ts +102 -32
- package/dist/components/menu/main.d.ts.map +1 -1
- package/dist/components/menu/main.js +510 -99
- package/dist/components/menu/main.js.map +1 -1
- package/dist/components/menu/props.d.ts +5 -5
- package/dist/components/menu/props.d.ts.map +1 -1
- package/dist/components/menu/style.css +35 -43
- package/dist/components/navigation/main.d.ts +14 -2
- package/dist/components/navigation/main.d.ts.map +1 -1
- package/dist/components/navigation/main.js +437 -119
- package/dist/components/navigation/main.js.map +1 -1
- package/dist/components/navigation/props.d.ts +53 -3
- package/dist/components/navigation/props.d.ts.map +1 -1
- package/dist/components/navigation/style.css +56 -9
- package/dist/components/page/main.d.ts.map +1 -1
- package/dist/components/page/main.js +13 -8
- package/dist/components/page/main.js.map +1 -1
- package/dist/components/page/props.d.ts +8 -0
- package/dist/components/page/props.d.ts.map +1 -1
- package/dist/components/page/style.css +39 -4
- package/dist/components/page-control/main.d.ts +2 -2
- package/dist/components/page-control/main.d.ts.map +1 -1
- package/dist/components/page-control/main.js +66 -32
- package/dist/components/page-control/main.js.map +1 -1
- package/dist/components/page-control/props.d.ts +10 -2
- package/dist/components/page-control/props.d.ts.map +1 -1
- package/dist/components/page-control/style.css +7 -2
- package/dist/components/popover/main.d.ts +11 -6
- package/dist/components/popover/main.d.ts.map +1 -1
- package/dist/components/popover/main.js +63 -38
- package/dist/components/popover/main.js.map +1 -1
- package/dist/components/popover/props.d.ts +7 -6
- package/dist/components/popover/props.d.ts.map +1 -1
- package/dist/components/popover/style.css +54 -4
- package/dist/components/progress/main.d.ts +2 -3
- package/dist/components/progress/main.d.ts.map +1 -1
- package/dist/components/progress/main.js +148 -29
- package/dist/components/progress/main.js.map +1 -1
- package/dist/components/progress/props.d.ts +43 -9
- package/dist/components/progress/props.d.ts.map +1 -1
- package/dist/components/progress/style.css +82 -50
- package/dist/components/roll/main.d.ts +1 -1
- package/dist/components/roll/main.d.ts.map +1 -1
- package/dist/components/roll/main.js +90 -34
- package/dist/components/roll/main.js.map +1 -1
- package/dist/components/roll/props.d.ts +25 -8
- package/dist/components/roll/props.d.ts.map +1 -1
- package/dist/components/roll/style.css +12 -24
- package/dist/components/segmented/main.d.ts.map +1 -1
- package/dist/components/segmented/main.js +47 -30
- package/dist/components/segmented/main.js.map +1 -1
- package/dist/components/segmented/style.css +16 -23
- package/dist/components/sheet/main.d.ts +25 -15
- package/dist/components/sheet/main.d.ts.map +1 -1
- package/dist/components/sheet/main.js +66 -78
- package/dist/components/sheet/main.js.map +1 -1
- package/dist/components/sheet/props.d.ts +37 -3
- package/dist/components/sheet/props.d.ts.map +1 -1
- package/dist/components/sheet/style.css +183 -45
- package/dist/components/sidebar/main.d.ts.map +1 -1
- package/dist/components/sidebar/main.js +9 -13
- package/dist/components/sidebar/main.js.map +1 -1
- package/dist/components/sidebar/style.css +20 -14
- package/dist/components/slider/main.d.ts.map +1 -1
- package/dist/components/slider/main.js +23 -22
- package/dist/components/slider/main.js.map +1 -1
- package/dist/components/slider/props.d.ts +1 -2
- package/dist/components/slider/props.d.ts.map +1 -1
- package/dist/components/slider/style.css +27 -53
- package/dist/components/stepper/main.d.ts +4 -6
- package/dist/components/stepper/main.d.ts.map +1 -1
- package/dist/components/stepper/main.js +29 -25
- package/dist/components/stepper/main.js.map +1 -1
- package/dist/components/stepper/style.css +12 -16
- package/dist/components/switch/main.d.ts.map +1 -1
- package/dist/components/switch/main.js +40 -28
- package/dist/components/switch/main.js.map +1 -1
- package/dist/components/switch/props.d.ts +7 -5
- package/dist/components/switch/props.d.ts.map +1 -1
- package/dist/components/switch/style.css +40 -17
- package/dist/components/symbol/main.d.ts +2 -2
- package/dist/components/symbol/main.d.ts.map +1 -1
- package/dist/components/symbol/main.js +36 -28
- package/dist/components/symbol/main.js.map +1 -1
- package/dist/components/symbol/props.d.ts +39 -4
- package/dist/components/symbol/props.d.ts.map +1 -1
- package/dist/components/symbol/style.css +26 -5
- package/dist/components/tab-bar/main.d.ts +2 -2
- package/dist/components/tab-bar/main.d.ts.map +1 -1
- package/dist/components/tab-bar/main.js +133 -101
- package/dist/components/tab-bar/main.js.map +1 -1
- package/dist/components/tab-bar/props.d.ts +6 -6
- package/dist/components/tab-bar/props.d.ts.map +1 -1
- package/dist/components/tab-bar/style.css +113 -99
- package/dist/components/text-field/main.d.ts +3 -2
- package/dist/components/text-field/main.d.ts.map +1 -1
- package/dist/components/text-field/main.js +29 -30
- package/dist/components/text-field/main.js.map +1 -1
- package/dist/components/text-field/props.d.ts +23 -1
- package/dist/components/text-field/props.d.ts.map +1 -1
- package/dist/components/text-field/style.css +122 -82
- package/dist/components/toolbar/main.js +27 -27
- package/dist/components/toolbar/main.js.map +1 -1
- package/dist/components/toolbar/props.d.ts +10 -4
- package/dist/components/toolbar/props.d.ts.map +1 -1
- package/dist/components/toolbar/style.css +39 -33
- package/dist/components/tooltip/main.d.ts +10 -9
- package/dist/components/tooltip/main.d.ts.map +1 -1
- package/dist/components/tooltip/main.js +39 -10
- package/dist/components/tooltip/main.js.map +1 -1
- package/dist/components/tooltip/props.d.ts +2 -0
- package/dist/components/tooltip/props.d.ts.map +1 -1
- package/dist/components/tooltip/style.css +16 -16
- package/dist/components/typography/main.d.ts +2 -2
- package/dist/components/typography/main.d.ts.map +1 -1
- package/dist/components/typography/main.js +24 -16
- package/dist/components/typography/main.js.map +1 -1
- package/dist/components/typography/props.d.ts +11 -18
- package/dist/components/typography/props.d.ts.map +1 -1
- package/dist/components/typography/style.css +503 -623
- package/dist/components/utils/main.d.ts +78 -8
- package/dist/components/utils/main.d.ts.map +1 -1
- package/dist/components/utils/main.js +235 -16
- package/dist/components/utils/main.js.map +1 -1
- package/dist/components/utils/props.d.ts +27 -4
- package/dist/components/utils/props.d.ts.map +1 -1
- package/dist/components/utils/style.css +31 -18
- package/dist/components/viewport/edge-effect.d.ts +10 -0
- package/dist/components/viewport/edge-effect.d.ts.map +1 -0
- package/dist/components/viewport/edge-effect.js +100 -0
- package/dist/components/viewport/edge-effect.js.map +1 -0
- package/dist/components/viewport/edge.d.ts +39 -0
- package/dist/components/viewport/edge.d.ts.map +1 -0
- package/dist/components/viewport/edge.js +151 -0
- package/dist/components/viewport/edge.js.map +1 -0
- package/dist/components/viewport/input.d.ts +39 -0
- package/dist/components/viewport/input.d.ts.map +1 -0
- package/dist/components/viewport/input.js +280 -0
- package/dist/components/viewport/input.js.map +1 -0
- package/dist/components/viewport/main.d.ts +47 -9
- package/dist/components/viewport/main.d.ts.map +1 -1
- package/dist/components/viewport/main.js +745 -86
- package/dist/components/viewport/main.js.map +1 -1
- package/dist/components/viewport/padding.d.ts +78 -0
- package/dist/components/viewport/padding.d.ts.map +1 -0
- package/dist/components/viewport/padding.js +321 -0
- package/dist/components/viewport/padding.js.map +1 -0
- package/dist/components/viewport/props.d.ts +220 -11
- package/dist/components/viewport/props.d.ts.map +1 -1
- package/dist/components/viewport/style.css +377 -6
- package/dist/main.d.ts +0 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/styles.css +318 -302
- package/dist/styles.d.ts +2 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +2 -1
- package/dist/styles.js.map +1 -1
- 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-
|
|
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-
|
|
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-
|
|
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-
|
|
53
|
-
--uikit-switch-off-color: var(--color-
|
|
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-
|
|
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-
|
|
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-
|
|
141
|
-
var(--glass-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
|
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,
|
|
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
|
|
4
|
-
import { cn } from '../utils/main.js';
|
|
5
|
-
// An
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
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
|
-
//
|
|
13
|
-
//
|
|
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
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const [width = 0, height = 0] =
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../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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
|
-
*
|
|
6
|
-
*
|
|
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
|
-
|
|
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,
|
|
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).
|
|
12
|
-
|
|
13
|
-
|
|
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-
|
|
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`)
|
|
7
|
-
*
|
|
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;
|
|
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"}
|