@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
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
width: 100%;
|
|
23
23
|
height: var(--uikit-slider-bar-size);
|
|
24
24
|
border-radius: 3px;
|
|
25
|
-
background-color: var(--color-
|
|
25
|
+
background-color: var(--color-ui-system-fill);
|
|
26
26
|
|
|
27
27
|
&[data-orientation='vertical'] {
|
|
28
28
|
width: var(--uikit-slider-bar-size);
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
width: 4px;
|
|
90
90
|
height: 4px;
|
|
91
91
|
border-radius: 50%;
|
|
92
|
-
background-color: var(--color-
|
|
92
|
+
background-color: var(--color-ui-quaternary-label);
|
|
93
93
|
translate: -50% 0;
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -116,47 +116,28 @@
|
|
|
116
116
|
align-items: center;
|
|
117
117
|
align-self: stretch;
|
|
118
118
|
justify-content: center;
|
|
119
|
-
color: var(--color-
|
|
120
|
-
font-size: var(--font-
|
|
119
|
+
color: var(--color-ui-secondary-label);
|
|
120
|
+
font-size: var(--font-ui-body-size);
|
|
121
121
|
font-style: normal;
|
|
122
|
-
font-variation-settings: 'wght' var(--font-
|
|
123
|
-
font-weight: round(down, var(--font-
|
|
124
|
-
letter-spacing: var(--font-
|
|
125
|
-
line-height: var(--font-
|
|
126
|
-
stroke: currentcolor;
|
|
127
|
-
stroke-linejoin: round;
|
|
128
|
-
stroke-width: max(
|
|
129
|
-
0px,
|
|
130
|
-
(var(--font-ios-body-weight-emphasized) - 400) / 326 * 1px
|
|
131
|
-
);
|
|
122
|
+
font-variation-settings: 'wght' var(--font-ui-body-weight-emphasized);
|
|
123
|
+
font-weight: round(down, var(--font-ui-body-weight-emphasized), 100);
|
|
124
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
125
|
+
line-height: var(--font-ui-body-line-height);
|
|
132
126
|
text-align: center;
|
|
133
|
-
|
|
134
|
-
--uikit-symbol-thinning: max(
|
|
135
|
-
0px,
|
|
136
|
-
(400 - var(--font-ios-body-weight-emphasized)) / 326 * 1px
|
|
137
|
-
);
|
|
138
127
|
}
|
|
139
128
|
|
|
140
129
|
.uikit-slider-value {
|
|
141
130
|
display: grid;
|
|
142
131
|
flex: none;
|
|
143
|
-
color: var(--color-
|
|
144
|
-
font-size: var(--font-
|
|
132
|
+
color: var(--color-ui-secondary-label);
|
|
133
|
+
font-size: var(--font-ui-body-size);
|
|
145
134
|
font-style: normal;
|
|
146
135
|
font-variant-numeric: tabular-nums;
|
|
147
|
-
font-variation-settings: 'wght' var(--font-
|
|
148
|
-
font-weight: round(down, var(--font-
|
|
136
|
+
font-variation-settings: 'wght' var(--font-ui-body-weight);
|
|
137
|
+
font-weight: round(down, var(--font-ui-body-weight), 100);
|
|
149
138
|
justify-items: end;
|
|
150
|
-
letter-spacing: var(--font-
|
|
151
|
-
line-height: var(--font-
|
|
152
|
-
stroke: currentcolor;
|
|
153
|
-
stroke-linejoin: round;
|
|
154
|
-
stroke-width: max(0px, (var(--font-ios-body-weight) - 400) / 326 * 1px);
|
|
155
|
-
|
|
156
|
-
--uikit-symbol-thinning: max(
|
|
157
|
-
0px,
|
|
158
|
-
(400 - var(--font-ios-body-weight)) / 326 * 1px
|
|
159
|
-
);
|
|
139
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
140
|
+
line-height: var(--font-ui-body-line-height);
|
|
160
141
|
|
|
161
142
|
/* In tooltips (see Thumb): for assistive technology only. */
|
|
162
143
|
&[data-slider-placement='tooltip'],
|
|
@@ -172,21 +153,13 @@
|
|
|
172
153
|
|
|
173
154
|
.uikit-slider-label {
|
|
174
155
|
flex: none;
|
|
175
|
-
color: var(--color-
|
|
176
|
-
font-size: var(--font-
|
|
156
|
+
color: var(--color-ui-label);
|
|
157
|
+
font-size: var(--font-ui-body-size);
|
|
177
158
|
font-style: normal;
|
|
178
|
-
font-variation-settings: 'wght' var(--font-
|
|
179
|
-
font-weight: round(down, var(--font-
|
|
180
|
-
letter-spacing: var(--font-
|
|
181
|
-
line-height: var(--font-
|
|
182
|
-
stroke: currentcolor;
|
|
183
|
-
stroke-linejoin: round;
|
|
184
|
-
stroke-width: max(0px, (var(--font-ios-body-weight) - 400) / 326 * 1px);
|
|
185
|
-
|
|
186
|
-
--uikit-symbol-thinning: max(
|
|
187
|
-
0px,
|
|
188
|
-
(400 - var(--font-ios-body-weight)) / 326 * 1px
|
|
189
|
-
);
|
|
159
|
+
font-variation-settings: 'wght' var(--font-ui-body-weight);
|
|
160
|
+
font-weight: round(down, var(--font-ui-body-weight), 100);
|
|
161
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
162
|
+
line-height: var(--font-ui-body-line-height);
|
|
190
163
|
}
|
|
191
164
|
|
|
192
165
|
.uikit-slider-root {
|
|
@@ -195,8 +168,8 @@
|
|
|
195
168
|
--uikit-slider-bar-size: 6px;
|
|
196
169
|
--uikit-slider-knob-width: 38px;
|
|
197
170
|
--uikit-slider-knob-height: 24px;
|
|
198
|
-
--uikit-slider-min-length:
|
|
199
|
-
--uikit-slider-tint: var(--color-
|
|
171
|
+
--uikit-slider-min-length: 120px;
|
|
172
|
+
--uikit-slider-tint: var(--color-ui-primary);
|
|
200
173
|
|
|
201
174
|
position: relative;
|
|
202
175
|
display: flex;
|
|
@@ -205,6 +178,7 @@
|
|
|
205
178
|
align-self: center;
|
|
206
179
|
gap: 12px;
|
|
207
180
|
touch-action: pan-y;
|
|
181
|
+
-webkit-user-select: none;
|
|
208
182
|
user-select: none;
|
|
209
183
|
|
|
210
184
|
@media (hover: hover) {
|
|
@@ -296,7 +270,7 @@
|
|
|
296
270
|
color-mix(in srgb, var(--uikit-slider-tint) 75%, transparent);
|
|
297
271
|
content: '';
|
|
298
272
|
opacity: 0;
|
|
299
|
-
transition-duration: var(--glass-
|
|
273
|
+
transition-duration: var(--glass-ui-lens-duration);
|
|
300
274
|
}
|
|
301
275
|
|
|
302
276
|
&::after {
|
|
@@ -308,7 +282,7 @@
|
|
|
308
282
|
0 6px 13px rgb(0 0 0 / 12%);
|
|
309
283
|
content: '';
|
|
310
284
|
inset: 0;
|
|
311
|
-
transition-duration: var(--glass-
|
|
285
|
+
transition-duration: var(--glass-ui-lens-duration);
|
|
312
286
|
transition-property: transform, background-color, box-shadow;
|
|
313
287
|
}
|
|
314
288
|
|
|
@@ -335,10 +309,10 @@
|
|
|
335
309
|
&::after {
|
|
336
310
|
background-color: transparent;
|
|
337
311
|
box-shadow:
|
|
338
|
-
var(--glass-
|
|
312
|
+
var(--glass-ui-lens-shadow),
|
|
339
313
|
0 0.5px 4px rgb(0 0 0 / 12%),
|
|
340
314
|
0 6px 13px rgb(0 0 0 / 12%);
|
|
341
|
-
transform: scale(var(--glass-
|
|
315
|
+
transform: scale(var(--glass-ui-lens-scale));
|
|
342
316
|
}
|
|
343
317
|
}
|
|
344
318
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
import { NumberField as BaseNumberField } from '@base-ui/react/number-field';
|
|
3
2
|
import type { HalfProps } from './props.js';
|
|
4
3
|
export declare const Stepper: {
|
|
5
|
-
Group: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/number-field").NumberFieldGroupProps, "ref"
|
|
6
|
-
/** Props of the hidden input (e.g. `aria-label`). */
|
|
7
|
-
inputProps?: Omit<BaseNumberField.Input.Props, "ref">;
|
|
8
|
-
}> & {
|
|
4
|
+
Group: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/number-field").NumberFieldGroupProps, "ref">> & {
|
|
9
5
|
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
10
6
|
}>;
|
|
7
|
+
Input: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/number-field").NumberFieldInputProps, "ref">> & {
|
|
8
|
+
ref?: import("preact").Ref<HTMLInputElement> | undefined;
|
|
9
|
+
}>;
|
|
11
10
|
Decrement: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/number-field").NumberFieldDecrementProps, "ref"> & HalfProps> & {
|
|
12
11
|
ref?: import("preact").Ref<HTMLButtonElement> | undefined;
|
|
13
12
|
}>;
|
|
@@ -15,7 +14,6 @@ export declare const Stepper: {
|
|
|
15
14
|
ref?: import("preact").Ref<HTMLButtonElement> | undefined;
|
|
16
15
|
}>;
|
|
17
16
|
Root: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/number-field").NumberFieldRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
-
Input: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/number-field").NumberFieldInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
17
|
ScrubArea: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/number-field").NumberFieldScrubAreaProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
20
18
|
ScrubAreaCursor: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/number-field").NumberFieldScrubAreaCursorProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
21
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/stepper/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAYrB,OAAO,KAAK,EAAgB,SAAS,EAAE,MAAM,YAAY,CAAC;AAwH1D,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAMnB,CAAC"}
|
|
@@ -1,32 +1,30 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import './style.css';
|
|
3
3
|
import { NumberField as BaseNumberField } from '@base-ui/react/number-field';
|
|
4
4
|
import { forwardRef, } from 'react';
|
|
5
5
|
import { cn } from '../utils/main.js';
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// colors mapped to UIKit semantic colors: the halves `quaternarySystemFill`,
|
|
6
|
+
// A stepper's halves (default, pressed, disabled), light and dark, in the
|
|
7
|
+
// semantic colors: the halves `quaternarySystemFill`,
|
|
9
8
|
// the separator and disabled symbols `tertiaryLabel`, symbols `label`.
|
|
10
9
|
//
|
|
11
|
-
// A Base UI number field
|
|
12
|
-
// `
|
|
13
|
-
// held by
|
|
14
|
-
// keys step) and assistive technology reads (a spin button).
|
|
10
|
+
// A Base UI number field: `Group` is the capsule, with `Decrement` and
|
|
11
|
+
// `Increment` halves; the value isn't shown, but
|
|
12
|
+
// held by the field's `Input`, visually hidden in the group, which keyboards
|
|
13
|
+
// focus (arrow keys step) and assistive technology reads (a spin button).
|
|
15
14
|
//
|
|
16
|
-
//
|
|
15
|
+
// Also:
|
|
17
16
|
// - The halves' size (46×32) is a minimum, not a fixed size.
|
|
18
|
-
// - The symbols (
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
// given in light mode only).
|
|
17
|
+
// - The symbols (“−” and “+”) are SVG strokes, 14px wide, at 2px.
|
|
18
|
+
// - Pressed, the halves darken by 8% black (light mode) or lighten by 8%
|
|
19
|
+
// white (dark mode).
|
|
22
20
|
// - Focused by keyboard, the capsule has a 2px ring in the tint, 2px around
|
|
23
|
-
// it (
|
|
21
|
+
// it (as `Slider`'s knob).
|
|
24
22
|
/**
|
|
25
|
-
* The stepper's capsule; it holds the field's
|
|
26
|
-
*
|
|
27
|
-
*
|
|
23
|
+
* The stepper's capsule; it holds the field's `Input`. Pressed, it's marked
|
|
24
|
+
* as focused by a pointer (no focus ring) until a key is pressed or focus
|
|
25
|
+
* leaves it.
|
|
28
26
|
*/
|
|
29
|
-
const Group = forwardRef(({ className,
|
|
27
|
+
const Group = forwardRef(({ className, onBlur, onKeyDown, onPointerDown, ...props }, ref) => (_jsx(BaseNumberField.Group, { ref: ref, ...props, className: cn('uikit-stepper-group', className), "data-stepper-part": "group", onBlur: (event) => {
|
|
30
28
|
onBlur?.(event);
|
|
31
29
|
const { currentTarget, relatedTarget } = event;
|
|
32
30
|
if (relatedTarget instanceof Node &&
|
|
@@ -40,16 +38,22 @@ const Group = forwardRef(({ className, children, inputProps, onBlur, onKeyDown,
|
|
|
40
38
|
}, onPointerDown: (event) => {
|
|
41
39
|
onPointerDown?.(event);
|
|
42
40
|
event.currentTarget.dataset.pointerFocus = '';
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
41
|
+
} })));
|
|
42
|
+
/**
|
|
43
|
+
* The field's input, in the group: visually hidden (no value is shown),
|
|
44
|
+
* the focus target and spin button; name it (`aria-label`).
|
|
45
|
+
*/
|
|
46
|
+
const Input = forwardRef(({ className, ...props }, ref) => (_jsx(BaseNumberField.Input, { ref: ref, ...props, className: cn('uikit-stepper-input', className), "data-stepper-part": "input" })));
|
|
47
|
+
// 14px wide, 2px strokes (Headline at 590).
|
|
48
|
+
const Sign = ({ isPlus }) => (_jsx("svg", { "aria-hidden": "true", fill: "none", height: "14", stroke: "currentcolor", strokeLinecap: "round", strokeWidth: "2", viewBox: "0 0 14 14", width: "14", children: _jsx("path", { d: isPlus ? 'M1 7h12M7 1v12' : 'M1 7h12' }) }));
|
|
49
|
+
/** The leading half, “−”. */
|
|
50
|
+
const Decrement = forwardRef(({ className, children, ...props }, ref) => (_jsx(BaseNumberField.Decrement, { ref: ref, ...props, className: cn('uikit-stepper-half uikit-stepper-decrement', className), "data-stepper-part": "half", children: children ?? _jsx(Sign, { isPlus: false }) })));
|
|
51
|
+
/** The trailing half, “+”. */
|
|
52
|
+
const Increment = forwardRef(({ className, children, ...props }, ref) => (_jsx(BaseNumberField.Increment, { ref: ref, ...props, className: cn('uikit-stepper-half uikit-stepper-increment', className), "data-stepper-part": "half", children: children ?? _jsx(Sign, { isPlus: true }) })));
|
|
50
53
|
export const Stepper = {
|
|
51
54
|
...BaseNumberField,
|
|
52
55
|
Group,
|
|
56
|
+
Input,
|
|
53
57
|
Decrement,
|
|
54
58
|
Increment,
|
|
55
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/stepper/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAEL,UAAU,GAIX,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAGtC,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/stepper/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAEL,UAAU,GAIX,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAGtC,0EAA0E;AAC1E,sDAAsD;AACtD,uEAAuE;AACvE,EAAE;AACF,uEAAuE;AACvE,iDAAiD;AACjD,6EAA6E;AAC7E,0EAA0E;AAC1E,EAAE;AACF,QAAQ;AACR,6DAA6D;AAC7D,kEAAkE;AAClE,yEAAyE;AACzE,uBAAuB;AACvB,4EAA4E;AAC5E,6BAA6B;AAE7B;;;;GAIG;AACH,MAAM,KAAK,GAAG,UAAU,CAGtB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAGpE,KAAC,eAAe,CAAC,KAAK,IACpB,GAAG,EAAE,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(50% - 0.5px);
|
|
28
28
|
width: 1px;
|
|
29
29
|
border-radius: 8px;
|
|
30
|
-
background-color: var(--color-
|
|
30
|
+
background-color: var(--color-ui-tertiary-label);
|
|
31
31
|
content: '';
|
|
32
32
|
pointer-events: none;
|
|
33
33
|
}
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
/* Focused by keyboard only: a text input is always :focus-visible,
|
|
36
36
|
also when pressing a half focuses it (see Group). */
|
|
37
37
|
&:not([data-pointer-focus]):has(input:focus-visible) {
|
|
38
|
-
outline: 2px solid var(--color-
|
|
38
|
+
outline: 2px solid var(--color-ui-primary);
|
|
39
39
|
outline-offset: 2px;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/*
|
|
43
|
+
/* The halves: 46×32px, the symbol in Headline;
|
|
44
44
|
pressed, 8% darker; disabled, the symbol in `tertiaryLabel`. */
|
|
45
45
|
.uikit-stepper-half {
|
|
46
46
|
display: grid;
|
|
@@ -50,23 +50,19 @@
|
|
|
50
50
|
border: 0;
|
|
51
51
|
margin: 0;
|
|
52
52
|
appearance: none;
|
|
53
|
-
background-color: var(--color-
|
|
54
|
-
color: var(--color-
|
|
53
|
+
background-color: var(--color-ui-quaternary-system-fill);
|
|
54
|
+
color: var(--color-ui-label);
|
|
55
55
|
font-family: inherit;
|
|
56
|
-
font-size: var(--font-
|
|
56
|
+
font-size: var(--font-ui-headline-size);
|
|
57
57
|
font-variation-settings: 'wght' 590;
|
|
58
58
|
font-weight: round(down, 590, 100);
|
|
59
|
-
line-height: var(--font-
|
|
59
|
+
line-height: var(--font-ui-headline-line-height);
|
|
60
60
|
place-items: center;
|
|
61
|
-
stroke: currentcolor;
|
|
62
|
-
stroke-linejoin: round;
|
|
63
|
-
stroke-width: max(0px, (590 - 400) / 326 * 1px);
|
|
64
61
|
-webkit-tap-highlight-color: transparent;
|
|
65
62
|
touch-action: manipulation;
|
|
63
|
+
-webkit-user-select: none;
|
|
66
64
|
user-select: none;
|
|
67
65
|
|
|
68
|
-
--uikit-symbol-thinning: max(0px, (400 - 590) / 326 * 1px);
|
|
69
|
-
|
|
70
66
|
/* As `Button`: a `cursor` prop, or the fallback. */
|
|
71
67
|
--uikit-utils-cursor: attr(cursor type(<custom-ident>), pointer);
|
|
72
68
|
|
|
@@ -84,11 +80,11 @@
|
|
|
84
80
|
);
|
|
85
81
|
}
|
|
86
82
|
|
|
87
|
-
&:where(
|
|
83
|
+
&:where([data-color-scheme='light'], [data-color-scheme='light'] *) {
|
|
88
84
|
background-image: linear-gradient(rgb(0 0 0 / 8%), rgb(0 0 0 / 8%));
|
|
89
85
|
}
|
|
90
86
|
|
|
91
|
-
&:where(
|
|
87
|
+
&:where([data-color-scheme='dark'], [data-color-scheme='dark'] *) {
|
|
92
88
|
background-image: linear-gradient(
|
|
93
89
|
rgb(255 255 255 / 8%),
|
|
94
90
|
rgb(255 255 255 / 8%)
|
|
@@ -99,7 +95,7 @@
|
|
|
99
95
|
&[data-disabled] {
|
|
100
96
|
--uikit-utils-cursor: attr(cursor type(<custom-ident>), not-allowed);
|
|
101
97
|
|
|
102
|
-
color: var(--color-
|
|
98
|
+
color: var(--color-ui-tertiary-label);
|
|
103
99
|
}
|
|
104
100
|
}
|
|
105
101
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/switch/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAGrB,OAAO,EAIL,GAAG,EAIJ,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAQ,eAAe,EAAE,MAAM,YAAY,CAAC;AAExD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/switch/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAGrB,OAAO,EAIL,GAAG,EAIJ,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAQ,eAAe,EAAE,MAAM,YAAY,CAAC;AAExD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAuPlD,eAAO,MAAM,MAAM;;;;;;;CAIlB,CAAC"}
|
|
@@ -3,16 +3,14 @@ import '../glass/style.css';
|
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { Switch as BaseSwitch } from '@base-ui/react/switch';
|
|
5
5
|
import { forwardRef, useCallback, useLayoutEffect, useRef, } from 'react';
|
|
6
|
-
import { cn, usePointerDrag, withStyle } from '../utils/main.js';
|
|
7
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// Framework7 `components/toggle/toggle.less`, `toggle-ios.less` (iOS values,
|
|
13
|
-
// `.toggle-active-state`): transitions, pressed scales, glow, glass shadow.
|
|
6
|
+
import { cn, delayLens, usePointerDrag, withStyle } from '../utils/main.js';
|
|
7
|
+
// The switch, light and dark, in the semantic colors: on `systemGreen` (or
|
|
8
|
+
// `tint`), off `systemFill`; the knob (`#fff`) has no semantic equivalent.
|
|
9
|
+
// The pressed glass effect comes from Framework7
|
|
10
|
+
// `components/toggle/toggle.less`, `toggle-ios.less` (its iOS theme's
|
|
11
|
+
// values, `.toggle-active-state`): transitions, pressed scales, glow, glass shadow.
|
|
14
12
|
//
|
|
15
|
-
//
|
|
13
|
+
// Also:
|
|
16
14
|
// - The track's end cap (Framework7 `.toggle::after`) is omitted, as it shows
|
|
17
15
|
// as a separate circle while the pressed track shrinks.
|
|
18
16
|
// - Track size (64×28) is a minimum, not a fixed size; the knob is positioned
|
|
@@ -27,25 +25,26 @@ import { cn, usePointerDrag, withStyle } from '../utils/main.js';
|
|
|
27
25
|
// not flip the state act as a tap (toggling), unless they flick towards the
|
|
28
26
|
// current side (Framework7: swipes within 300ms toggle).
|
|
29
27
|
// - The browser's default focus ring is kept.
|
|
30
|
-
// - Indeterminate (as a checkbox, which the platform's switches are
|
|
31
|
-
//
|
|
28
|
+
// - Indeterminate (as a checkbox, which the platform's switches are): the
|
|
29
|
+
// knob in the middle, on the off color; checked, the on color
|
|
30
|
+
// from the start up to the knob, fading out (so checked and unchecked
|
|
31
|
+
// differ), faded in and out as the state changes.
|
|
32
32
|
//
|
|
33
|
-
// On/off labels (
|
|
34
|
-
// Apple's illustration): a 9px “I” bar (white) and a 9px “O” ring (tertiary
|
|
33
|
+
// On/off labels (an accessibility setting): a 9px “I” bar (white) and a 9px “O” ring (tertiary
|
|
35
34
|
// label), 1px strokes, each centered in the track beside the knob on its
|
|
36
35
|
// side; the knob covers the other (both hidden while indeterminate, and
|
|
37
36
|
// while pressed, as the knob is a lens).
|
|
38
37
|
// Base UI's root, the props that only style it as attributes and properties.
|
|
39
38
|
const BaseRoot = forwardRef(({ indeterminate, style, tint, ...props }, ref) => (_jsx(BaseSwitch.Root, { ref: ref, "data-indeterminate": indeterminate ? '' : undefined, style: withStyle({ '--uikit-switch-on-color': tint }, style), ...props })));
|
|
40
|
-
// The pressed state is set here
|
|
41
|
-
//
|
|
39
|
+
// The pressed state is set here (not by `:active`: lost when the state flips
|
|
40
|
+
// during a drag; and a quick tap shows no lens, see `delayLens`).
|
|
42
41
|
const dragProperties = [
|
|
43
42
|
'--uikit-switch-knob-move-duration',
|
|
44
43
|
'--uikit-switch-knob-start',
|
|
45
44
|
'--uikit-switch-pressed',
|
|
46
45
|
];
|
|
47
46
|
const isChecked = (root) => Object.hasOwn(root.dataset, 'checked');
|
|
48
|
-
const Root = forwardRef(({ className, onClickCapture, onLostPointerCapture, onPointerCancel, onPointerDown, onPointerMove, onPointerUp, children, indeterminate = false, inputRef, onOffLabels = false, ...props }, ref) => {
|
|
47
|
+
const Root = forwardRef(({ className, onClickCapture, onLostPointerCapture, onPointerCancel, onPointerDown, onPointerMove, onPointerUp, onTouchMove, children, indeterminate = false, inputRef, onOffLabels = false, ...props }, ref) => {
|
|
49
48
|
const suppressClickRef = useRef(false);
|
|
50
49
|
// The hidden input is indeterminate, too (as a checkbox's).
|
|
51
50
|
const ownInputRef = useRef(null);
|
|
@@ -64,30 +63,40 @@ const Root = forwardRef(({ className, onClickCapture, onLostPointerCapture, onPo
|
|
|
64
63
|
input.indeterminate = indeterminate;
|
|
65
64
|
});
|
|
66
65
|
const handlers = usePointerDrag({
|
|
67
|
-
end: (root, drag,
|
|
66
|
+
end: (root, drag, isCancelled) => {
|
|
67
|
+
drag.lens.cancel();
|
|
68
68
|
for (const property of dragProperties) {
|
|
69
69
|
root.style.removeProperty(property);
|
|
70
70
|
}
|
|
71
|
-
if (
|
|
71
|
+
if (isCancelled)
|
|
72
72
|
return;
|
|
73
|
-
const
|
|
74
|
-
const
|
|
73
|
+
const isQuick = performance.now() - drag.startTime < 300;
|
|
74
|
+
const isTowardsCurrent = drag.isChecked
|
|
75
|
+
? drag.moved > 0
|
|
76
|
+
: drag.moved < 0;
|
|
75
77
|
// The native click following this release toggles; suppress it
|
|
76
78
|
// unless the release acts as a tap.
|
|
77
|
-
suppressClickRef.current =
|
|
79
|
+
suppressClickRef.current =
|
|
80
|
+
drag.isFlipped || !isQuick || isTowardsCurrent;
|
|
78
81
|
setTimeout(() => {
|
|
79
82
|
suppressClickRef.current = false;
|
|
80
83
|
});
|
|
81
84
|
},
|
|
85
|
+
// Held (its lens shown), the touch doesn't scroll.
|
|
86
|
+
isHolding: ({ lens }, position) => {
|
|
87
|
+
lens.move(position);
|
|
88
|
+
return lens.isShown();
|
|
89
|
+
},
|
|
82
90
|
move: (root, drag, event) => {
|
|
91
|
+
drag.lens.move(event);
|
|
83
92
|
drag.moved = (event.clientX - drag.startX) * drag.direction;
|
|
84
93
|
const start = Math.max(drag.min, Math.min(drag.start + drag.moved, drag.max));
|
|
85
94
|
root.style.setProperty('--uikit-switch-knob-move-duration', '0s');
|
|
86
95
|
root.style.setProperty('--uikit-switch-knob-start', `${start}px`);
|
|
87
|
-
const
|
|
88
|
-
if (
|
|
96
|
+
const willBeChecked = (start - drag.min) / (drag.max - drag.min) > 0.5;
|
|
97
|
+
if (willBeChecked === isChecked(root))
|
|
89
98
|
return;
|
|
90
|
-
drag.
|
|
99
|
+
drag.isFlipped = true;
|
|
91
100
|
root.click();
|
|
92
101
|
},
|
|
93
102
|
start: (root, event) => {
|
|
@@ -102,11 +111,13 @@ const Root = forwardRef(({ className, onClickCapture, onLostPointerCapture, onPo
|
|
|
102
111
|
const thumbRect = thumb.getBoundingClientRect();
|
|
103
112
|
const direction = getComputedStyle(root).direction === 'rtl' ? -1 : 1;
|
|
104
113
|
const min = Number.parseFloat(getComputedStyle(thumb).top);
|
|
105
|
-
|
|
114
|
+
// (A quick tap only toggles: no lens, see `delayLens`.)
|
|
115
|
+
const lens = delayLens(event, () => root.style.setProperty('--uikit-switch-pressed', '1'));
|
|
106
116
|
return {
|
|
107
|
-
|
|
117
|
+
isChecked: isChecked(root),
|
|
108
118
|
direction,
|
|
109
|
-
|
|
119
|
+
isFlipped: false,
|
|
120
|
+
lens,
|
|
110
121
|
max: rootRect.width - thumbRect.width - min,
|
|
111
122
|
min,
|
|
112
123
|
moved: 0,
|
|
@@ -123,6 +134,7 @@ const Root = forwardRef(({ className, onClickCapture, onLostPointerCapture, onPo
|
|
|
123
134
|
onPointerDown,
|
|
124
135
|
onPointerMove,
|
|
125
136
|
onPointerUp,
|
|
137
|
+
onTouchMove,
|
|
126
138
|
});
|
|
127
139
|
const handleClickCapture = useCallback((event) => {
|
|
128
140
|
onClickCapture?.(event);
|
|
@@ -132,7 +144,7 @@ const Root = forwardRef(({ className, onClickCapture, onLostPointerCapture, onPo
|
|
|
132
144
|
event.preventDefault();
|
|
133
145
|
event.stopImmediatePropagation();
|
|
134
146
|
}, [onClickCapture]);
|
|
135
|
-
return (_jsxs(BaseRoot, { ref: ref, indeterminate: indeterminate, inputRef: handleInputRef, ...props, ...handlers, className: cn('uikit-switch-root', className), "data-switch-part": "root", onClickCapture: handleClickCapture, children: [children, onOffLabels ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", className: "uikit-switch-on-label", "data-switch-part": "label" }), _jsx("span", { "aria-hidden": "true", className: "uikit-switch-off-label", "data-switch-part": "label" })] })) : null] }));
|
|
147
|
+
return (_jsxs(BaseRoot, { ref: ref, indeterminate: indeterminate, inputRef: handleInputRef, ...props, ...handlers, className: cn('uikit-switch-root', className), "data-base-ui-swipe-ignore": "", "data-switch-part": "root", onClickCapture: handleClickCapture, children: [children, onOffLabels ? (_jsxs(_Fragment, { children: [_jsx("span", { "aria-hidden": "true", className: "uikit-switch-on-label", "data-switch-part": "label" }), _jsx("span", { "aria-hidden": "true", className: "uikit-switch-off-label", "data-switch-part": "label" })] })) : null] }));
|
|
136
148
|
});
|
|
137
149
|
const Thumb = forwardRef(({ className, ...props }, ref) => (_jsx(BaseSwitch.Thumb, { ref: ref, className: cn('uikit-switch-thumb', className), "data-switch-part": "thumb", ...props })));
|
|
138
150
|
export const Switch = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/switch/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAEL,UAAU,EAGV,WAAW,EACX,eAAe,EACf,MAAM,GACP,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/switch/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAEL,UAAU,EAGV,WAAW,EACX,eAAe,EACf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AAC;AAEF,MAAM,KAAK,GAAG,UAAU,CAGtB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAClC,KAAC,UAAU,CAAC,KAAK,IACf,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,sBAC7B,OAAO,KACpB,KAAK,GACT,CACH,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,UAAU;IACb,IAAI;IACJ,KAAK;CACN,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Switch as BaseSwitch } from '@base-ui/react/switch';
|
|
2
2
|
import type { Properties } from 'csstype';
|
|
3
|
+
import type { DelayedLens } from '../utils/main.js';
|
|
3
4
|
export type SwitchRootProps = BaseSwitch.Root.Props & {
|
|
4
5
|
/**
|
|
5
6
|
* The cursor (where the pointer hovers).
|
|
@@ -11,19 +12,20 @@ export type SwitchRootProps = BaseSwitch.Root.Props & {
|
|
|
11
12
|
* input): the knob in the middle. Toggling still flips `checked`.
|
|
12
13
|
*/
|
|
13
14
|
indeterminate?: boolean;
|
|
14
|
-
/** Shows “I” and “O” on the track (
|
|
15
|
+
/** Shows “I” and “O” on the track (on/off labels). */
|
|
15
16
|
onOffLabels?: boolean;
|
|
16
17
|
/**
|
|
17
|
-
* The track's color while on, and the pressed knob's glow
|
|
18
|
-
* `onTintColor`).
|
|
18
|
+
* The track's color while on, and the pressed knob's glow.
|
|
19
19
|
* @default `systemGreen`
|
|
20
20
|
*/
|
|
21
21
|
tint?: string;
|
|
22
22
|
};
|
|
23
23
|
export type Drag = {
|
|
24
|
-
checked: boolean;
|
|
25
24
|
direction: 1 | -1;
|
|
26
|
-
|
|
25
|
+
isChecked: boolean;
|
|
26
|
+
isFlipped: boolean;
|
|
27
|
+
/** Its knob's lens, shown a moment into the press (see `delayLens`). */
|
|
28
|
+
lens: DelayedLens;
|
|
27
29
|
max: number;
|
|
28
30
|
min: number;
|
|
29
31
|
moved: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/switch/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG;IACpD;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/switch/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG;IACpD;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sDAAsD;IACtD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,SAAS,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAClB,SAAS,EAAE,OAAO,CAAC;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,wEAAwE;IACxE,IAAI,EAAE,WAAW,CAAC;IAClB,GAAG,EAAE,MAA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