@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
|
@@ -1,95 +1,182 @@
|
|
|
1
1
|
/* Sheet (see main.tsx). */
|
|
2
2
|
@layer uikit-ish {
|
|
3
|
+
.uikit-sheet-portal {
|
|
4
|
+
display: contents;
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
.uikit-sheet-backdrop {
|
|
4
8
|
--uikit-sheet-dim: light-dark(rgb(0 0 0 / 20%), rgb(0 0 0 / 48%));
|
|
5
9
|
|
|
6
10
|
position: fixed;
|
|
11
|
+
|
|
12
|
+
/* An overlay: above the page's layers (e.g. Viewport's bars), overlays
|
|
13
|
+
among themselves in the order they open (see Menu). */
|
|
14
|
+
z-index: 100;
|
|
7
15
|
background-color: var(--uikit-sheet-dim);
|
|
8
16
|
inset: 0;
|
|
9
|
-
|
|
17
|
+
|
|
18
|
+
/* Lighter as the sheet is swiped down. */
|
|
19
|
+
opacity: calc(1 - var(--drawer-swipe-progress, 0));
|
|
20
|
+
transition: opacity 500ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
10
21
|
|
|
11
22
|
&[data-starting-style],
|
|
12
23
|
&[data-ending-style] {
|
|
13
24
|
opacity: 0;
|
|
14
25
|
}
|
|
26
|
+
|
|
27
|
+
&[data-swiping] {
|
|
28
|
+
transition: none;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[data-ending-style] {
|
|
32
|
+
transition-duration: calc(var(--drawer-swipe-strength, 1) * 500ms);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* Where the sheet moves (filling the window, or its container), passing
|
|
37
|
+
presses through to what's outside the sheet. */
|
|
38
|
+
.uikit-sheet-viewport {
|
|
39
|
+
position: fixed;
|
|
40
|
+
z-index: 100;
|
|
41
|
+
inset: 0;
|
|
42
|
+
pointer-events: none;
|
|
15
43
|
}
|
|
16
44
|
|
|
17
45
|
.uikit-sheet-popup {
|
|
46
|
+
/* An elevated level (a modal presentation's): in dark mode, the
|
|
47
|
+
backgrounds a step lighter, for everything in it (its lists, pages,
|
|
48
|
+
a navigation's). */
|
|
49
|
+
--color-ui-system-background: light-dark(rgb(255 255 255), rgb(28 28 30));
|
|
50
|
+
--color-ui-secondary-system-background: light-dark(
|
|
51
|
+
rgb(242 242 247),
|
|
52
|
+
rgb(44 44 46)
|
|
53
|
+
);
|
|
54
|
+
--color-ui-tertiary-system-background: light-dark(
|
|
55
|
+
rgb(255 255 255),
|
|
56
|
+
rgb(58 58 60)
|
|
57
|
+
);
|
|
58
|
+
--color-ui-system-grouped-background: light-dark(
|
|
59
|
+
rgb(242 242 247),
|
|
60
|
+
rgb(28 28 30)
|
|
61
|
+
);
|
|
62
|
+
--color-ui-secondary-system-grouped-background: light-dark(
|
|
63
|
+
rgb(255 255 255),
|
|
64
|
+
rgb(44 44 46)
|
|
65
|
+
);
|
|
66
|
+
--color-ui-tertiary-system-grouped-background: light-dark(
|
|
67
|
+
rgb(242 242 247),
|
|
68
|
+
rgb(58 58 60)
|
|
69
|
+
);
|
|
70
|
+
|
|
18
71
|
position: fixed;
|
|
72
|
+
z-index: 100;
|
|
19
73
|
display: flex;
|
|
20
74
|
overflow: hidden;
|
|
21
75
|
box-sizing: border-box;
|
|
22
76
|
flex-direction: column;
|
|
23
|
-
color: var(--color-
|
|
77
|
+
color: var(--color-ui-label);
|
|
24
78
|
outline: none;
|
|
25
|
-
|
|
26
|
-
|
|
79
|
+
pointer-events: auto;
|
|
80
|
+
|
|
81
|
+
/* A critically damped spring; swiped,
|
|
82
|
+
following the finger (a transform: Base UI's own while it's swiped,
|
|
83
|
+
overriding this one). */
|
|
84
|
+
transform: translateY(
|
|
85
|
+
calc(
|
|
86
|
+
var(--drawer-snap-point-offset, 0px) +
|
|
87
|
+
var(--drawer-swipe-movement-y, 0px)
|
|
88
|
+
)
|
|
89
|
+
);
|
|
90
|
+
transition: transform 500ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
27
91
|
|
|
28
92
|
&[data-starting-style],
|
|
29
93
|
&[data-ending-style] {
|
|
30
|
-
|
|
94
|
+
transform: translateY(100%);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* Let go (swiped): as fast as it was flung. */
|
|
98
|
+
&[data-ending-style] {
|
|
99
|
+
transition-duration: calc(var(--drawer-swipe-strength, 1) * 500ms);
|
|
31
100
|
}
|
|
32
101
|
|
|
33
|
-
&[data-
|
|
102
|
+
&[data-swiping] {
|
|
34
103
|
transition: none;
|
|
35
104
|
}
|
|
36
105
|
|
|
106
|
+
/* Below the top inset (large), above the bottom one (medium), or clear
|
|
107
|
+
of both (a form sheet): none left for its content but a large one's
|
|
108
|
+
bottom (its end scrolling clear of the home indicator). */
|
|
109
|
+
& > * {
|
|
110
|
+
--uikit-safe-area-inset-top: 0px;
|
|
111
|
+
--uikit-safe-area-inset-right: 0px;
|
|
112
|
+
--uikit-safe-area-inset-left: 0px;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* The screen's bottom inset, for its content (see below). */
|
|
116
|
+
--uikit-sheet-inset-bottom: var(--uikit-safe-area-inset-bottom, 0px);
|
|
117
|
+
|
|
118
|
+
/* Medium (6px from the bottom edge, over the home indicator):
|
|
119
|
+
what's left of it; a form sheet: none. */
|
|
120
|
+
&[data-detent='medium'] > * {
|
|
121
|
+
--uikit-safe-area-inset-bottom: max(
|
|
122
|
+
0px,
|
|
123
|
+
var(--uikit-sheet-inset-bottom) - 6px
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&:not([data-compact]) > * {
|
|
128
|
+
--uikit-safe-area-inset-bottom: 0px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* What's in its content (e.g. a page): none left (see the content). */
|
|
132
|
+
& .uikit-sheet-content > * {
|
|
133
|
+
--uikit-safe-area-inset-bottom: 0px;
|
|
134
|
+
}
|
|
135
|
+
|
|
37
136
|
&[data-detent='large'] {
|
|
38
137
|
border-radius: 38px 38px 0 0;
|
|
39
|
-
background-color:
|
|
40
|
-
var(--color-ios-system-background),
|
|
41
|
-
var(--color-ios-secondary-system-background)
|
|
42
|
-
);
|
|
138
|
+
background-color: var(--color-ui-system-background);
|
|
43
139
|
box-shadow: 0 15px 75px rgb(0 0 0 / 18%);
|
|
44
|
-
inset: calc(10px +
|
|
140
|
+
inset: calc(10px + var(--uikit-safe-area-inset-top, 0px)) 0 0;
|
|
45
141
|
}
|
|
46
142
|
|
|
47
|
-
|
|
143
|
+
/* Grouped (`background`): on the grouped background, a list in it
|
|
144
|
+
without its own (which would end with it, the sheet's around it). */
|
|
145
|
+
&[data-detent='large'][data-background='grouped'] {
|
|
48
146
|
--uikit-list-container-background: transparent;
|
|
49
|
-
--uikit-list-container-group-background: var(
|
|
50
|
-
--color-ios-tertiary-system-background
|
|
51
|
-
);
|
|
52
147
|
|
|
53
|
-
background-color: var(--color-
|
|
148
|
+
background-color: var(--color-ui-system-grouped-background);
|
|
54
149
|
}
|
|
55
150
|
|
|
56
151
|
&[data-detent='medium'] {
|
|
57
152
|
right: 6px;
|
|
58
|
-
bottom:
|
|
153
|
+
bottom: 6px;
|
|
59
154
|
left: 6px;
|
|
60
155
|
max-height: calc(100% - 64px);
|
|
61
156
|
border-radius: 34px;
|
|
62
157
|
color: var(--uikit-glass-content);
|
|
63
158
|
}
|
|
64
159
|
|
|
65
|
-
/* A form sheet (regular width). */
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
box-shadow: 0 15px 75px rgb(0 0 0 / 18%);
|
|
76
|
-
color: var(--color-ios-label);
|
|
77
|
-
inset: 50% auto auto 50%;
|
|
78
|
-
translate: -50% calc(-50% + var(--uikit-sheet-drag, 0px));
|
|
79
|
-
}
|
|
160
|
+
/* A form sheet (not compact: a regular width, see main.tsx). */
|
|
161
|
+
&&:not([data-compact]) {
|
|
162
|
+
width: min(936px, calc(100% - 64px));
|
|
163
|
+
height: min(852px, calc(100% - 64px));
|
|
164
|
+
border-radius: 38px;
|
|
165
|
+
background-color: var(--color-ui-system-background);
|
|
166
|
+
box-shadow: 0 15px 75px rgb(0 0 0 / 18%);
|
|
167
|
+
color: var(--color-ui-label);
|
|
168
|
+
inset: 50% auto auto 50%;
|
|
169
|
+
translate: -50% -50%;
|
|
80
170
|
|
|
81
|
-
|
|
171
|
+
&[data-background='grouped'] {
|
|
82
172
|
--uikit-list-container-background: transparent;
|
|
83
|
-
--uikit-list-container-group-background: var(
|
|
84
|
-
--color-ios-tertiary-system-background
|
|
85
|
-
);
|
|
86
173
|
|
|
87
|
-
background-color: var(--color-
|
|
174
|
+
background-color: var(--color-ui-system-grouped-background);
|
|
88
175
|
}
|
|
89
176
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
177
|
+
&[data-starting-style],
|
|
178
|
+
&[data-ending-style] {
|
|
179
|
+
transform: translateY(100vh);
|
|
93
180
|
}
|
|
94
181
|
}
|
|
95
182
|
}
|
|
@@ -99,20 +186,55 @@
|
|
|
99
186
|
flex: none;
|
|
100
187
|
flex-direction: column;
|
|
101
188
|
align-items: stretch;
|
|
102
|
-
cursor: grab;
|
|
103
189
|
padding-block-end: 10px;
|
|
104
|
-
|
|
190
|
+
-webkit-user-select: none;
|
|
105
191
|
user-select: none;
|
|
106
192
|
|
|
193
|
+
/* Without a grabber: its content where it'd be with one (16px down). */
|
|
194
|
+
&:not(:has(> .uikit-sheet-grabber)) {
|
|
195
|
+
padding-block-start: 16px;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Only a grabber: over the content (its own bars below it). Composited
|
|
199
|
+
itself: the content scrolls (iOS composites it), and Safari otherwise
|
|
200
|
+
relies on its overlap testing to draw the header after it, which
|
|
201
|
+
misses it far down a scrolled document (e.g. an inline demo), leaving
|
|
202
|
+
the grabber hidden (until something recomposites, e.g. a button's
|
|
203
|
+
press). */
|
|
204
|
+
&:has(> .uikit-sheet-grabber:only-child) {
|
|
205
|
+
position: absolute;
|
|
206
|
+
z-index: 1;
|
|
207
|
+
inset: 0 0 auto;
|
|
208
|
+
padding-block-end: 0;
|
|
209
|
+
will-change: transform;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* The grabber, its cursor's area around it (12px wide, 5px and 6px
|
|
214
|
+
high). */
|
|
215
|
+
.uikit-sheet-grabber {
|
|
216
|
+
--uikit-utils-cursor: attr(cursor type(<custom-ident>), grab);
|
|
217
|
+
|
|
218
|
+
display: flex;
|
|
219
|
+
flex: none;
|
|
220
|
+
align-self: center;
|
|
221
|
+
padding: 5px 12px 6px;
|
|
222
|
+
|
|
223
|
+
/* The bar (its padding the cursor's area around it). */
|
|
107
224
|
&::before {
|
|
108
225
|
width: 36px;
|
|
109
226
|
height: 5px;
|
|
110
|
-
flex: none;
|
|
111
|
-
align-self: center;
|
|
112
227
|
border-radius: 100px;
|
|
113
228
|
background-color: #cfcfcf;
|
|
114
229
|
content: '';
|
|
115
|
-
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@media (hover: hover) {
|
|
233
|
+
cursor: var(--uikit-utils-cursor);
|
|
234
|
+
|
|
235
|
+
.uikit-sheet-popup[data-swiping] &:not([cursor]) {
|
|
236
|
+
cursor: grabbing;
|
|
237
|
+
}
|
|
116
238
|
}
|
|
117
239
|
}
|
|
118
240
|
|
|
@@ -121,5 +243,21 @@
|
|
|
121
243
|
min-height: 0;
|
|
122
244
|
flex: 1 1 auto;
|
|
123
245
|
overscroll-behavior: contain;
|
|
246
|
+
|
|
247
|
+
/* Its end clear of the home indicator (its background to the edge;
|
|
248
|
+
none left for what's in it, see the popup); the gap to its content
|
|
249
|
+
is its `Viewport.Padding`'s (a list's ends are its container's, see
|
|
250
|
+
List). */
|
|
251
|
+
padding-block-end: var(--uikit-safe-area-inset-bottom, 0);
|
|
252
|
+
|
|
253
|
+
/* Its header only a grabber (its content's own bars, e.g. a
|
|
254
|
+
navigation's): over the content, which starts at the sheet's top
|
|
255
|
+
(nothing of those bars clipped), its bars below the grabber. */
|
|
256
|
+
.uikit-sheet-popup:has(
|
|
257
|
+
> .uikit-sheet-header > .uikit-sheet-grabber:only-child
|
|
258
|
+
)
|
|
259
|
+
> & {
|
|
260
|
+
--uikit-safe-area-inset-top: 16px;
|
|
261
|
+
}
|
|
124
262
|
}
|
|
125
263
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAWrB,YAAY,EACV,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAWrB,YAAY,EACV,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AA4DpB,eAAO,MAAM,OAAO;;;;;;;;;;CAInB,CAAC"}
|
|
@@ -3,10 +3,9 @@ import '../glass/style.css';
|
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { cn } from '../utils/main.js';
|
|
6
|
-
//
|
|
7
|
-
// panel of glass (Figma “Liquid Glass - Large”), its corners 20px, 11px from
|
|
6
|
+
// A sidebar: a floating panel of glass, its corners 20px, 11px from
|
|
8
7
|
// its top, 16px from its sides, 10px from its bottom; its content e.g. a
|
|
9
|
-
// toolbar (
|
|
8
|
+
// toolbar (borderless buttons, Body, symbols 510, the
|
|
10
9
|
// trailing ones 24px apart; 20px above what follows), a search field
|
|
11
10
|
// (`TextField.Search`: 44px high, on the secondary fill) and a list
|
|
12
11
|
// (`List.Root` of style `sidebar`: capsule rows, sections without a shape of
|
|
@@ -14,25 +13,22 @@ import { cn } from '../utils/main.js';
|
|
|
14
13
|
// over the other columns; compact: a drawer, swiped in), which places and sizes
|
|
15
14
|
// it.
|
|
16
15
|
//
|
|
17
|
-
//
|
|
18
|
-
// - The glass is the menus' (`glassMedium`:
|
|
19
|
-
//
|
|
20
|
-
// the sidebar alone); in dark mode, a light rim and a glow outside it (the
|
|
16
|
+
// Also:
|
|
17
|
+
// - The glass is the menus' (`glassMedium`: a fill and a soft glow, without
|
|
18
|
+
// blend modes), 8px from the column's edges; in dark mode, a light rim and a glow outside it (the
|
|
21
19
|
// glass' inner shadow would look inset).
|
|
22
20
|
/**
|
|
23
|
-
* A sidebar
|
|
21
|
+
* A sidebar: a floating glass panel, its
|
|
24
22
|
* content (e.g. a `TextField.Search`, a `List.Root` of style `sidebar`)
|
|
25
23
|
* scrolling inside it; in a `Layout` column (see there).
|
|
26
24
|
*/
|
|
27
25
|
const Root = forwardRef(({ className, ...props }, ref) => (_jsx("nav", { ref: ref, "data-sidebar-part": "root", ...props, className: cn('uikit-sidebar-root uikit-glass-medium', className) })));
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
// top to what follows (Figma: 11px, a 23px row, 20px). Its buttons' shapes
|
|
26
|
+
// Its toolbar: its parts at its ends, their content at the sidebar's (16px
|
|
27
|
+
// in); 54px from the panel's top to what follows. Its buttons' shapes
|
|
31
28
|
// (highlights) evenly 8px from the panel's top and sides, as nested shapes
|
|
32
29
|
// are (text buttons 8px in, symbols as circles).
|
|
33
30
|
const Toolbar = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('uikit-sidebar-toolbar', className), "data-sidebar-part": "toolbar", ...props })));
|
|
34
|
-
// Its buttons at one end
|
|
35
|
-
// apart; here, 34px circles 18px apart).
|
|
31
|
+
// Its buttons at one end: 34px circles 18px apart.
|
|
36
32
|
const ToolbarGroup = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('uikit-sidebar-toolbar-group', className), "data-sidebar-part": "toolbar-group", ...props })));
|
|
37
33
|
export const Sidebar = {
|
|
38
34
|
Root,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAatC,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/sidebar/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAatC,oEAAoE;AACpE,yEAAyE;AACzE,sDAAsD;AACtD,qEAAqE;AACrE,oEAAoE;AACpE,6EAA6E;AAC7E,4EAA4E;AAC5E,gFAAgF;AAChF,MAAM;AACN,EAAE;AACF,QAAQ;AACR,4EAA4E;AAC5E,oGAAoG;AACpG,2CAA2C;AAE3C;;;;GAIG;AACH,MAAM,IAAI,GAAG,UAAU,CACrB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,uBACU,MAAM,KACpB,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,uCAAuC,EAAE,SAAS,CAAC,GACjE,CACH,CACF,CAAC;AAEF,2EAA2E;AAC3E,sEAAsE;AACtE,2EAA2E;AAC3E,iDAAiD;AACjD,MAAM,OAAO,GAAG,UAAU,CACxB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,uBAC/B,SAAS,KACvB,KAAK,GACT,CACH,CACF,CAAC;AAEF,mDAAmD;AACnD,MAAM,YAAY,GAAG,UAAU,CAC7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,cACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,6BAA6B,EAAE,SAAS,CAAC,uBACrC,eAAe,KAC7B,KAAK,GACT,CACH,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI;IACJ,OAAO;IACP,YAAY;CACb,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* Sidebar (see main.tsx). */
|
|
2
2
|
@layer uikit-ish {
|
|
3
3
|
.uikit-sidebar-toolbar {
|
|
4
|
-
--uikit-button-plain-size: var(--font-
|
|
5
|
-
--uikit-button-plain-line-height: var(--font-
|
|
6
|
-
--uikit-button-plain-tracking: var(--font-
|
|
4
|
+
--uikit-button-plain-size: var(--font-ui-body-size);
|
|
5
|
+
--uikit-button-plain-line-height: var(--font-ui-body-line-height);
|
|
6
|
+
--uikit-button-plain-tracking: var(--font-ui-body-tracking);
|
|
7
7
|
--uikit-button-plain-symbol-weight: 510;
|
|
8
8
|
--uikit-button-plain-padding-inline: 8px;
|
|
9
9
|
--uikit-button-plain-background-pressed: var(--uikit-sidebar-selection);
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
|
|
27
27
|
.uikit-sidebar-root {
|
|
28
28
|
/* Its selection's fill (selected and pressed rows, pressed toolbar
|
|
29
|
-
buttons
|
|
29
|
+
buttons). Dark: floating (a light rim, a
|
|
30
30
|
glow outside; the glass' dark inner bands would make the large panel
|
|
31
|
-
look inset
|
|
31
|
+
look inset). */
|
|
32
32
|
--uikit-sidebar-selection: light-dark(
|
|
33
33
|
rgb(0 0 0 / 7%),
|
|
34
34
|
rgb(255 255 255 / 12%)
|
|
@@ -44,17 +44,17 @@
|
|
|
44
44
|
0 0 25px rgb(0 0 0 / 30%);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
&:where(
|
|
47
|
+
&:where([data-color-scheme='light'], [data-color-scheme='light'] *) {
|
|
48
48
|
box-shadow: var(--uikit-glass-shadow);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
&:where(
|
|
51
|
+
&:where([data-color-scheme='dark'], [data-color-scheme='dark'] *) {
|
|
52
52
|
box-shadow:
|
|
53
53
|
inset 0 0 0 1px rgb(255 255 255 / 15%),
|
|
54
54
|
0 0 25px rgb(0 0 0 / 30%);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
/* Its search field (see TextField.Search):
|
|
57
|
+
/* Its search field (see TextField.Search): a fill blended with the
|
|
58
58
|
glass (plus-darker, plus-lighter in dark mode) as a flat color; its
|
|
59
59
|
symbol and placeholder in the glass' secondary content color (#999). */
|
|
60
60
|
--uikit-text-field-search-height: 44px;
|
|
@@ -70,13 +70,19 @@
|
|
|
70
70
|
padding: 11px 16px 10px;
|
|
71
71
|
border-radius: 20px;
|
|
72
72
|
margin: var(--uikit-sidebar-margin, 8px);
|
|
73
|
-
color: var(--color-
|
|
74
|
-
overscroll-behavior: contain;
|
|
75
|
-
scrollbar-width: none;
|
|
73
|
+
color: var(--color-ui-label);
|
|
76
74
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
75
|
+
/* Clear of the safe area insets (in a regular layout, e.g. a tablet's
|
|
76
|
+
status bar). */
|
|
77
|
+
margin-block: max(
|
|
78
|
+
var(--uikit-sidebar-margin, 8px),
|
|
79
|
+
var(--uikit-safe-area-inset-top, 0px)
|
|
80
|
+
)
|
|
81
|
+
max(
|
|
82
|
+
var(--uikit-sidebar-margin, 8px),
|
|
83
|
+
var(--uikit-safe-area-inset-bottom, 0px)
|
|
84
|
+
);
|
|
85
|
+
overscroll-behavior: contain;
|
|
80
86
|
|
|
81
87
|
& [data-text-field-part='search'] {
|
|
82
88
|
color: var(--uikit-glass-content-secondary);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/slider/main.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAiBrB,OAAO,KAAK,EAEV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/slider/main.tsx"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAiBrB,OAAO,KAAK,EAEV,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAiVpB,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWlB,CAAC"}
|
|
@@ -4,35 +4,35 @@ import '../glass/style.css';
|
|
|
4
4
|
import './style.css';
|
|
5
5
|
import { Slider as BaseSlider } from '@base-ui/react/slider';
|
|
6
6
|
import { createContext, forwardRef, useCallback, useContext, useLayoutEffect, useMemo, useState, } from 'react';
|
|
7
|
-
import { cn, Reserve, withStyle } from '../utils/main.js';
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
// tint (`tint`; default: the app's, `--color-
|
|
7
|
+
import { cn, Reserve, useTouchHold, withStyle } from '../utils/main.js';
|
|
8
|
+
// Sliders, light and dark, in the semantic colors: track `systemFill`, fill
|
|
9
|
+
// the
|
|
10
|
+
// tint (`tint`; default: the app's, `--color-ui-primary`), ticks
|
|
11
11
|
// `quaternaryLabel`, symbols `secondaryLabel`; the knob (`#fff`) has no
|
|
12
12
|
// semantic equivalent. The knob shadow matches Konsta UI `styles/base.css`
|
|
13
13
|
// (`--shadow-ios-thumb`).
|
|
14
|
-
// The pressed glass effect
|
|
15
|
-
//
|
|
14
|
+
// The pressed glass effect comes from Framework7
|
|
15
|
+
// `components/range/range.less`, `range-ios.less` (its iOS theme's values,
|
|
16
16
|
// `.range-knob-active-state`): control size, transitions, pressed scale, glow.
|
|
17
17
|
//
|
|
18
|
-
//
|
|
18
|
+
// Also:
|
|
19
19
|
// - The track does not clip (`overflow: hidden`), as Base UI renders the
|
|
20
20
|
// thumb inside it; the indicator inherits the track's radius instead.
|
|
21
21
|
// - The knob surface and glass effect are drawn by the thumb's `::after`,
|
|
22
22
|
// which alone scales while dragging (Base UI measures the thumb's box for
|
|
23
23
|
// positioning); only its `transform`, `background-color` and `box-shadow`
|
|
24
24
|
// transition (Konsta UI `--transition-ios-range-thumb`).
|
|
25
|
-
// - The control's length
|
|
25
|
+
// - The control's length grows to fill the root, at least 120px (so it fits
|
|
26
|
+
// a list row between symbols on a phone).
|
|
26
27
|
// - The pressed state is driven by Base UI's `data-dragging`.
|
|
27
28
|
// - Vertical sliders put the minimum symbol at the bottom.
|
|
28
29
|
// - The fill is derived from the value (Base UI couples it to the thumb's
|
|
29
30
|
// center), so it spans the whole track at the maximum.
|
|
30
31
|
// - Focused by keyboard, the knob has a 2px ring in the tint, 2px around
|
|
31
|
-
// it (
|
|
32
|
-
//
|
|
33
|
-
// - `Slider.Value` (not in UIKit or Figma) is in the Body text style (the
|
|
32
|
+
// it (Base UI focuses a visually hidden input, which shows no ring).
|
|
33
|
+
// - `Slider.Value` is in the Body text style (the
|
|
34
34
|
// symbols: Body, emphasized), with tabular numerals, and reserves the width
|
|
35
|
-
// of its widest value. `Slider.Label`
|
|
35
|
+
// of its widest value. `Slider.Label` is in Body, in the label
|
|
36
36
|
// color. Both are where they are among the parts, or by `placement`:
|
|
37
37
|
// before or after them all, or on a line above or below (the label at its
|
|
38
38
|
// start, the value at its end); the value also in a tooltip (see
|
|
@@ -40,11 +40,13 @@ import { cn, Reserve, withStyle } from '../utils/main.js';
|
|
|
40
40
|
// Base UI's root context isn't public; `Slider.Value` needs the range and
|
|
41
41
|
// format to find its widest values.
|
|
42
42
|
const RootContext = createContext({});
|
|
43
|
-
const Root = forwardRef(({ className, style, thumbAlignment = 'edge', tint, ...props }, ref) => {
|
|
44
|
-
const { format, locale, max, min, step } = props;
|
|
43
|
+
const Root = forwardRef(({ className, onPointerCancel, onPointerDown, onPointerUp, onTouchMove, style, thumbAlignment = 'edge', tint, ...props }, ref) => {
|
|
44
|
+
const { format, locale, max, min, orientation, step } = props;
|
|
45
|
+
// Held, its touch doesn't scroll (see `useTouchHold`).
|
|
46
|
+
const holdHandlers = useTouchHold(orientation === 'vertical' ? 'y' : 'x', { onPointerCancel, onPointerDown, onPointerUp, onTouchMove });
|
|
45
47
|
const [valueTooltip, setValueTooltip] = useState(undefined);
|
|
46
48
|
const context = useMemo(() => ({ format, locale, max, min, setValueTooltip, step, valueTooltip }), [format, locale, max, min, step, valueTooltip]);
|
|
47
|
-
return (_jsx(RootContext.Provider, { value: context, children: _jsx(BaseSlider.Root, { ref: ref, "data-slider-part": "root", "data-thumb-alignment": thumbAlignment, style: withStyle({ '--uikit-slider-tint': tint }, style), thumbAlignment: thumbAlignment, ...props, className: cn('uikit-slider-root', className) }) }));
|
|
49
|
+
return (_jsx(RootContext.Provider, { value: context, children: _jsx(BaseSlider.Root, { ref: ref, "data-base-ui-swipe-ignore": "", "data-slider-part": "root", "data-thumb-alignment": thumbAlignment, style: withStyle({ '--uikit-slider-tint': tint }, style), thumbAlignment: thumbAlignment, ...holdHandlers, ...props, className: cn('uikit-slider-root', className) }) }));
|
|
48
50
|
});
|
|
49
51
|
const Control = forwardRef(({ className, ...props }, ref) => (_jsx(BaseSlider.Control, { ref: ref, className: cn('uikit-slider-control', className), "data-slider-part": "control", ...props })));
|
|
50
52
|
const Track = forwardRef(({ className, ...props }, ref) => (_jsx(BaseSlider.Track, { ref: ref, className: cn('uikit-slider-track', className), "data-slider-part": "track", ...props })));
|
|
@@ -54,8 +56,8 @@ const toPercent = (value, min, max) => max === min ? 0 : ((value - min) / (max -
|
|
|
54
56
|
// value instead, so it spans the whole track at the maximum.
|
|
55
57
|
const Indicator = forwardRef(({ className, style, ...props }, ref) => (_jsx(BaseSlider.Indicator, { ref: ref, className: cn('uikit-slider-indicator', className), "data-slider-part": "indicator", style: (state) => {
|
|
56
58
|
const { max, min, orientation, values } = state;
|
|
57
|
-
const
|
|
58
|
-
const start =
|
|
59
|
+
const isRange = values.length > 1;
|
|
60
|
+
const start = isRange ? toPercent(values[0] ?? min, min, max) : 0;
|
|
59
61
|
const end = toPercent(values.at(-1) ?? min, min, max);
|
|
60
62
|
const geometry = orientation === 'vertical'
|
|
61
63
|
? { bottom: `${start}%`, height: `${end - start}%` }
|
|
@@ -69,13 +71,12 @@ const Thumb = forwardRef(({ className, children, index, ...props }, ref) => {
|
|
|
69
71
|
const { valueTooltip } = useContext(RootContext);
|
|
70
72
|
return (_jsxs(BaseSlider.Thumb, { ref: ref, index: index, ...props, className: cn('uikit-slider-thumb', className), "data-slider-part": "thumb", children: [children, valueTooltip ? (_jsx("span", { "aria-hidden": "true", className: "uikit-slider-value-bubble uikit-tooltip-surface uikit-glass-medium", "data-momentary": valueTooltip === 'momentary' ? '' : undefined, "data-slider-part": "value-bubble", children: _jsx(BaseSlider.Value, { children: (formattedValues) => formattedValues[index ?? 0] }) })) : null] }));
|
|
71
73
|
});
|
|
72
|
-
/** Tick marks
|
|
74
|
+
/** Tick marks, to be rendered inside `Slider.Track`. */
|
|
73
75
|
const Ticks = forwardRef(({ className, count, ...props }, ref) => (_jsx("div", { ref: ref, "aria-hidden": "true", ...props, className: cn('uikit-slider-ticks', className), "data-slider-part": "ticks", children: Array.from({ length: Math.max(0, count - 2) }, (_, index) => (_jsx("span", { style: {
|
|
74
76
|
'--uikit-slider-tick': `${String(((index + 1) / (count - 1)) * 100)}%`,
|
|
75
77
|
} }, index))) })));
|
|
76
78
|
/**
|
|
77
|
-
* Minimum/maximum value symbol
|
|
78
|
-
* `maximumValueImage`), to be rendered inside `Slider.Root`.
|
|
79
|
+
* Minimum/maximum value symbol, to be rendered inside `Slider.Root`.
|
|
79
80
|
*/
|
|
80
81
|
const ValueSymbol = forwardRef(({ className, edge, onClick, ...props }, ref) => {
|
|
81
82
|
// Base UI has no API to set an uncontrolled value from outside, so this
|
|
@@ -90,13 +91,13 @@ const ValueSymbol = forwardRef(({ className, edge, onClick, ...props }, ref) =>
|
|
|
90
91
|
const input = edge === 'min' ? inputs[0] : inputs.at(-1);
|
|
91
92
|
if (!(input instanceof HTMLInputElement) || input.disabled)
|
|
92
93
|
return;
|
|
93
|
-
const
|
|
94
|
+
const isFocused = input.ownerDocument.activeElement === input;
|
|
94
95
|
input.dispatchEvent(new KeyboardEvent('keydown', {
|
|
95
96
|
bubbles: true,
|
|
96
97
|
cancelable: true,
|
|
97
98
|
key: edge === 'min' ? 'Home' : 'End',
|
|
98
99
|
}));
|
|
99
|
-
if (!
|
|
100
|
+
if (!isFocused)
|
|
100
101
|
input.blur();
|
|
101
102
|
}, [edge]);
|
|
102
103
|
return (_jsx("span", { ref: ref, ...props, className: cn('uikit-slider-symbol', className), "data-slider-part": "symbol", onClick: onClick ?? moveThumb }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/slider/main.tsx"],"names":[],"mappings":";AAAA,OAAO,sB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{
|
|
|
8
8
|
*/
|
|
9
9
|
cursor?: Properties['cursor'];
|
|
10
10
|
/**
|
|
11
|
-
* The fill's color, and the pressed knob's glow
|
|
12
|
-
* `minimumTrackTintColor`).
|
|
11
|
+
* The fill's color, and the pressed knob's glow.
|
|
13
12
|
* @default the app's tint
|
|
14
13
|
*/
|
|
15
14
|
tint?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/slider/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG;IACpD;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9B
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/slider/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,GAAG;IACpD;;;OAGG;IACH,MAAM,CAAC,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC9B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,UAAU,CAAC,IAAI,CAAC,KAAK,EACrB,QAAQ,GAAG,QAAQ,G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