@mrpelz/uikit-ish 7.9.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/action-sheet/main.d.ts +1 -2
- package/dist/components/action-sheet/main.d.ts.map +1 -1
- package/dist/components/action-sheet/main.js +12 -12
- package/dist/components/action-sheet/main.js.map +1 -1
- package/dist/components/action-sheet/props.d.ts +2 -2
- package/dist/components/action-sheet/props.d.ts.map +1 -1
- package/dist/components/action-sheet/style.css +10 -1
- package/dist/components/activity-view/main.d.ts +1 -1
- package/dist/components/activity-view/main.d.ts.map +1 -1
- package/dist/components/activity-view/main.js +9 -11
- package/dist/components/activity-view/main.js.map +1 -1
- package/dist/components/activity-view/style.css +21 -21
- package/dist/components/alert/main.d.ts +2 -3
- package/dist/components/alert/main.d.ts.map +1 -1
- package/dist/components/alert/main.js +12 -15
- package/dist/components/alert/main.js.map +1 -1
- package/dist/components/alert/props.d.ts +3 -3
- package/dist/components/alert/style.css +23 -23
- package/dist/components/avatar/main.d.ts.map +1 -1
- package/dist/components/avatar/main.js +7 -8
- package/dist/components/avatar/main.js.map +1 -1
- package/dist/components/avatar/style.css +1 -1
- package/dist/components/badge/main.d.ts +1 -1
- package/dist/components/badge/main.js +4 -4
- package/dist/components/badge/main.js.map +1 -1
- package/dist/components/badge/style.css +7 -2
- package/dist/components/button/main.d.ts.map +1 -1
- package/dist/components/button/main.js +9 -9
- 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 +27 -29
- 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 +3 -3
- 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 +265 -90
- package/dist/components/color-picker/main.js.map +1 -1
- package/dist/components/color-picker/props.d.ts +45 -10
- package/dist/components/color-picker/props.d.ts.map +1 -1
- package/dist/components/color-picker/style.css +124 -38
- package/dist/components/contextual-menu/main.d.ts.map +1 -1
- package/dist/components/contextual-menu/main.js +189 -236
- package/dist/components/contextual-menu/main.js.map +1 -1
- package/dist/components/contextual-menu/props.d.ts +10 -33
- package/dist/components/contextual-menu/props.d.ts.map +1 -1
- package/dist/components/contextual-menu/style.css +60 -34
- package/dist/components/date-picker/main.d.ts.map +1 -1
- package/dist/components/date-picker/main.js +100 -66
- package/dist/components/date-picker/main.js.map +1 -1
- package/dist/components/date-picker/props.d.ts +10 -10
- package/dist/components/date-picker/props.d.ts.map +1 -1
- package/dist/components/date-picker/style.css +51 -47
- package/dist/components/drawer/main.d.ts.map +1 -1
- package/dist/components/drawer/main.js +52 -7
- package/dist/components/drawer/main.js.map +1 -1
- package/dist/components/drawer/style.css +1 -1
- package/dist/components/edit-menu/main.d.ts.map +1 -1
- package/dist/components/edit-menu/main.js +31 -22
- package/dist/components/edit-menu/main.js.map +1 -1
- package/dist/components/edit-menu/props.d.ts +4 -4
- package/dist/components/edit-menu/props.d.ts.map +1 -1
- package/dist/components/edit-menu/style.css +10 -1
- package/dist/components/form/main.js +3 -3
- package/dist/components/form/main.js.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 +157 -157
- package/dist/components/header/main.d.ts.map +1 -1
- package/dist/components/header/main.js +27 -26
- package/dist/components/header/main.js.map +1 -1
- package/dist/components/header/style.css +13 -52
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/main.js +5 -5
- package/dist/components/layout/main.js.map +1 -1
- package/dist/components/layout/style.css +2 -2
- package/dist/components/list/main.d.ts +11 -3
- package/dist/components/list/main.d.ts.map +1 -1
- package/dist/components/list/main.js +296 -300
- package/dist/components/list/main.js.map +1 -1
- package/dist/components/list/props.d.ts +49 -16
- 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 +206 -158
- package/dist/components/menu/main.d.ts +77 -30
- package/dist/components/menu/main.d.ts.map +1 -1
- package/dist/components/menu/main.js +364 -89
- package/dist/components/menu/main.js.map +1 -1
- package/dist/components/menu/props.d.ts +3 -4
- package/dist/components/menu/props.d.ts.map +1 -1
- package/dist/components/menu/style.css +25 -11
- package/dist/components/navigation/main.d.ts +5 -2
- package/dist/components/navigation/main.d.ts.map +1 -1
- package/dist/components/navigation/main.js +287 -57
- package/dist/components/navigation/main.js.map +1 -1
- package/dist/components/navigation/props.d.ts +37 -4
- package/dist/components/navigation/props.d.ts.map +1 -1
- package/dist/components/navigation/style.css +32 -2
- package/dist/components/page/main.d.ts.map +1 -1
- package/dist/components/page/main.js +12 -7
- package/dist/components/page/main.js.map +1 -1
- package/dist/components/page/props.d.ts +1 -1
- package/dist/components/page/style.css +3 -6
- package/dist/components/page-control/main.d.ts +1 -1
- package/dist/components/page-control/main.js +9 -9
- package/dist/components/page-control/main.js.map +1 -1
- package/dist/components/page-control/style.css +2 -2
- package/dist/components/popover/main.d.ts.map +1 -1
- package/dist/components/popover/main.js +17 -14
- package/dist/components/popover/main.js.map +1 -1
- package/dist/components/popover/props.d.ts +2 -2
- package/dist/components/popover/style.css +10 -1
- package/dist/components/progress/main.d.ts +1 -2
- package/dist/components/progress/main.d.ts.map +1 -1
- package/dist/components/progress/main.js +45 -19
- package/dist/components/progress/main.js.map +1 -1
- package/dist/components/progress/props.d.ts +22 -8
- package/dist/components/progress/props.d.ts.map +1 -1
- package/dist/components/progress/style.css +15 -15
- package/dist/components/roll/main.js +10 -10
- package/dist/components/roll/main.js.map +1 -1
- package/dist/components/roll/props.d.ts +1 -1
- package/dist/components/roll/style.css +11 -11
- package/dist/components/segmented/main.d.ts.map +1 -1
- package/dist/components/segmented/main.js +44 -27
- package/dist/components/segmented/main.js.map +1 -1
- package/dist/components/segmented/style.css +14 -9
- package/dist/components/sheet/main.d.ts +1 -1
- package/dist/components/sheet/main.d.ts.map +1 -1
- package/dist/components/sheet/main.js +22 -18
- package/dist/components/sheet/main.js.map +1 -1
- package/dist/components/sheet/props.d.ts +1 -1
- package/dist/components/sheet/style.css +22 -16
- 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 +8 -8
- package/dist/components/slider/main.d.ts.map +1 -1
- package/dist/components/slider/main.js +19 -19
- 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 +25 -25
- package/dist/components/stepper/main.d.ts.map +1 -1
- package/dist/components/stepper/main.js +13 -15
- package/dist/components/stepper/main.js.map +1 -1
- package/dist/components/stepper/style.css +8 -8
- package/dist/components/switch/main.d.ts.map +1 -1
- package/dist/components/switch/main.js +25 -18
- package/dist/components/switch/main.js.map +1 -1
- package/dist/components/switch/props.d.ts +5 -3
- package/dist/components/switch/props.d.ts.map +1 -1
- package/dist/components/switch/style.css +13 -17
- package/dist/components/symbol/main.d.ts +1 -1
- package/dist/components/symbol/main.d.ts.map +1 -1
- package/dist/components/symbol/main.js +6 -5
- package/dist/components/symbol/main.js.map +1 -1
- package/dist/components/symbol/props.d.ts +3 -3
- package/dist/components/symbol/style.css +1 -1
- 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 +78 -59
- package/dist/components/tab-bar/main.js.map +1 -1
- package/dist/components/tab-bar/props.d.ts +3 -3
- package/dist/components/tab-bar/style.css +92 -56
- 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 +26 -28
- package/dist/components/text-field/main.js.map +1 -1
- package/dist/components/text-field/props.d.ts +16 -1
- package/dist/components/text-field/props.d.ts.map +1 -1
- package/dist/components/text-field/style.css +105 -31
- package/dist/components/toolbar/main.d.ts.map +1 -1
- package/dist/components/toolbar/main.js +18 -20
- 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 +13 -13
- package/dist/components/tooltip/main.js +4 -4
- package/dist/components/tooltip/main.js.map +1 -1
- package/dist/components/tooltip/style.css +5 -5
- 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 +10 -12
- package/dist/components/typography/main.js.map +1 -1
- package/dist/components/typography/props.d.ts +9 -9
- package/dist/components/typography/props.d.ts.map +1 -1
- package/dist/components/typography/style.css +503 -503
- package/dist/components/utils/main.d.ts +47 -6
- package/dist/components/utils/main.d.ts.map +1 -1
- package/dist/components/utils/main.js +155 -5
- package/dist/components/utils/main.js.map +1 -1
- package/dist/components/utils/props.d.ts +24 -3
- package/dist/components/utils/props.d.ts.map +1 -1
- package/dist/components/utils/style.css +4 -4
- 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 +19 -3
- package/dist/components/viewport/input.d.ts.map +1 -1
- package/dist/components/viewport/input.js +197 -12
- package/dist/components/viewport/input.js.map +1 -1
- package/dist/components/viewport/main.d.ts +9 -4
- package/dist/components/viewport/main.d.ts.map +1 -1
- package/dist/components/viewport/main.js +326 -89
- package/dist/components/viewport/main.js.map +1 -1
- package/dist/components/viewport/padding.d.ts +31 -3
- package/dist/components/viewport/padding.d.ts.map +1 -1
- package/dist/components/viewport/padding.js +111 -16
- package/dist/components/viewport/padding.js.map +1 -1
- package/dist/components/viewport/props.d.ts +69 -8
- package/dist/components/viewport/props.d.ts.map +1 -1
- package/dist/components/viewport/style.css +211 -6
- package/dist/styles.css +285 -302
- package/package.json +3 -4
|
@@ -6,7 +6,7 @@ export type { SheetContentProps, SheetDetent, SheetGrabberProps, SheetHandle, Sh
|
|
|
6
6
|
/** `Sheet.createHandle`, in a component: made once, for its lifetime. */
|
|
7
7
|
export declare const useCreateSheetHandle: <Payload = unknown>() => SheetHandle<Payload>;
|
|
8
8
|
/**
|
|
9
|
-
* A sheet (
|
|
9
|
+
* A sheet (Base UI's `Drawer`): a
|
|
10
10
|
* modal panel for a scoped task, from the bottom (large or medium), or a
|
|
11
11
|
* form sheet in a regular width.
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/sheet/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/sheet/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAU7D,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,WAAW,EACX,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,eAAe,GAChB,MAAM,YAAY,CAAC;AAsJpB,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,GAC/B,OAAO,GAAG,OAAO,OACd,WAAW,CAAC,OAAO,CAIvB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;mBAjBI,OAAO,iBAAgB,WAAW,CAAC,OAAO,CAAC;;;;;;;;;;;;;;;CAwBhE,CAAC"}
|
|
@@ -3,33 +3,32 @@ import '../glass/style.css';
|
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { Drawer as BaseDrawer } from '@base-ui/react/drawer';
|
|
5
5
|
import { forwardRef, useState } from 'react';
|
|
6
|
-
import { cn, usePortalContainer } from '../utils/main.js';
|
|
7
|
-
import { useSizeClass, ViewportScopeContext } from '../viewport/main.js';
|
|
8
|
-
//
|
|
9
|
-
//
|
|
10
|
-
// - large (Figma “Full Screen - iPhone”): opaque (elevated background:
|
|
6
|
+
import { cn, useForwardedRef, usePortalContainer } from '../utils/main.js';
|
|
7
|
+
import { EdgeEffects, useScrollerRegistration, useSizeClass, ViewportScopeContext, } from '../viewport/main.js';
|
|
8
|
+
// Sheets, over the page dimmed (black, 20%; dark: 48%):
|
|
9
|
+
// - large: opaque (elevated background:
|
|
11
10
|
// white; dark: #1c1c1e), from 10px below the top to the bottom, its top
|
|
12
11
|
// corners 38px, its shadow 0 15px 75px at 18%;
|
|
13
|
-
// - medium
|
|
12
|
+
// - medium: glass, 6px from the sides and the
|
|
14
13
|
// bottom, as high as its content, its corners 34px;
|
|
15
|
-
// - in a regular width (
|
|
16
|
-
//
|
|
14
|
+
// - in a regular width (the window from 768px, or not `compact`), a form
|
|
15
|
+
// sheet: opaque, centered, up to 936px by 852px, its
|
|
17
16
|
// corners 38px.
|
|
18
|
-
// Its header
|
|
19
|
-
// the top, #cfcfcf; optional) above the app's content (e.g. a `Toolbar`:
|
|
20
|
-
//
|
|
17
|
+
// Its header: a grabber (`Grabber`, 36px by 5px, 5px from
|
|
18
|
+
// the top, #cfcfcf; optional) above the app's content (e.g. a `Toolbar`: a 44px title and
|
|
19
|
+
// controls). Base UI's `Drawer` (a `Dialog` with gestures): modal,
|
|
21
20
|
// dismissed by a press outside it (or Escape); swiped down (anywhere, its
|
|
22
21
|
// content scrolled to its top), far enough or flung, too, otherwise
|
|
23
22
|
// springing back.
|
|
24
23
|
//
|
|
25
|
-
//
|
|
24
|
+
// Also:
|
|
26
25
|
// - The glass is the menus' (see `Menu`).
|
|
27
26
|
// - Detents don't change by dragging (`detent` is the app's), and the page
|
|
28
|
-
// behind a large sheet doesn't shrink back (
|
|
27
|
+
// behind a large sheet doesn't shrink back (no stacked look).
|
|
29
28
|
// Opaque, grouped (`background`, for grouped lists, as a page's): on the
|
|
30
29
|
// grouped background, a list in it without its own (which would end with
|
|
31
30
|
// it, the sheet's around it). In it,
|
|
32
|
-
//
|
|
31
|
+
// the elevated backgrounds (dark mode: #1c1c1e, groups #2c2c2e), as
|
|
33
32
|
// tokens for all its content (e.g. a navigation's pages).
|
|
34
33
|
/** The sheet, the page dimmed behind it. */
|
|
35
34
|
const Popup = forwardRef(({ background = 'plain', className, compact: compactProp, container, detent = 'large', ...props }, ref) => {
|
|
@@ -48,15 +47,20 @@ const Popup = forwardRef(({ background = 'plain', className, compact: compactPro
|
|
|
48
47
|
*/
|
|
49
48
|
const Header = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "data-sheet-part": "header", ...props, className: cn('uikit-sheet-header', className) })));
|
|
50
49
|
/**
|
|
51
|
-
* Its grabber (
|
|
50
|
+
* Its grabber (36px by 5px, 5px from the top): showing the sheet
|
|
52
51
|
* can be swiped (it can be anywhere); left out, a cleaner top.
|
|
53
52
|
*/
|
|
54
53
|
const Grabber = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "aria-hidden": "true", "data-sheet-part": "grabber", ...props, className: cn('uikit-sheet-grabber', className) })));
|
|
55
54
|
/**
|
|
56
55
|
* Its content, scrolling (Base UI's `Drawer.Content`: its text selectable by
|
|
57
|
-
* a mouse without swiping the sheet)
|
|
56
|
+
* a mouse without swiping the sheet); a scroller (registered), drawing its
|
|
57
|
+
* bars' edge effects (see `Viewport`).
|
|
58
58
|
*/
|
|
59
|
-
const Content = forwardRef(({ className, ...props },
|
|
59
|
+
const Content = forwardRef(({ children, className, ...props }, forwardedRef) => {
|
|
60
|
+
const ref = useForwardedRef(forwardedRef);
|
|
61
|
+
useScrollerRegistration(ref);
|
|
62
|
+
return (_jsxs(BaseDrawer.Content, { ref: ref, className: cn('uikit-sheet-content', className), "data-sheet-part": "content", "data-viewport-scroller": "", ...props, children: [children, _jsx(EdgeEffects, { scroller: ref })] }));
|
|
63
|
+
});
|
|
60
64
|
/**
|
|
61
65
|
* A handle linking a sheet (its `handle`) to its triggers outside it, and
|
|
62
66
|
* opening or closing it imperatively (Base UI's `Drawer.createHandle`):
|
|
@@ -70,7 +74,7 @@ export const useCreateSheetHandle = () => {
|
|
|
70
74
|
return handle;
|
|
71
75
|
};
|
|
72
76
|
/**
|
|
73
|
-
* A sheet (
|
|
77
|
+
* A sheet (Base UI's `Drawer`): a
|
|
74
78
|
* modal panel for a scoped task, from the bottom (large or medium), or a
|
|
75
79
|
* form sheet in a regular width.
|
|
76
80
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/sheet/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAkB,UAAU,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../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EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE;IAClD,MAAM,GAAG,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC;IAC1C,uBAAuB,CAAC,GAAG,CAAC,CAAC;IAE7B,OAAO,CACL,MAAC,UAAU,CAAC,OAAO,IACjB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,qBAC/B,SAAS,4BACF,EAAE,KACrB,KAAK,aAER,QAAqB,EACtB,KAAC,WAAW,IAAC,QAAQ,EAAE,GAAG,GAAI,IACX,CACtB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,YAAY,GAAG,GAA6C,EAAE,CAClE,UAAU,CAAC,YAAY,EAAW,CAAC;AAErC,yEAAyE;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAEV,EAAE;IAC1B,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,EAAW,CAAC,CAAC;IAEzD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,GAAG,UAAU;IACb,KAAK;IACL,MAAM;IACN,OAAO;IACP,OAAO;IACP,YAAY;CACb,CAAC"}
|
|
@@ -25,7 +25,7 @@ export type SheetPopupProps = Omit<BaseDrawer.Popup.Props, 'ref'> & {
|
|
|
25
25
|
*/
|
|
26
26
|
container?: BaseDrawer.Portal.Props['container'];
|
|
27
27
|
/**
|
|
28
|
-
* Its height
|
|
28
|
+
* Its height in a compact width (a phone's): the whole screen, or its
|
|
29
29
|
* content's (a floating glass panel).
|
|
30
30
|
* @default 'large'
|
|
31
31
|
*/
|
|
@@ -43,27 +43,27 @@
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.uikit-sheet-popup {
|
|
46
|
-
/*
|
|
46
|
+
/* An elevated level (a modal presentation's): in dark mode, the
|
|
47
47
|
backgrounds a step lighter, for everything in it (its lists, pages,
|
|
48
48
|
a navigation's). */
|
|
49
|
-
--color-
|
|
50
|
-
--color-
|
|
49
|
+
--color-ui-system-background: light-dark(rgb(255 255 255), rgb(28 28 30));
|
|
50
|
+
--color-ui-secondary-system-background: light-dark(
|
|
51
51
|
rgb(242 242 247),
|
|
52
52
|
rgb(44 44 46)
|
|
53
53
|
);
|
|
54
|
-
--color-
|
|
54
|
+
--color-ui-tertiary-system-background: light-dark(
|
|
55
55
|
rgb(255 255 255),
|
|
56
56
|
rgb(58 58 60)
|
|
57
57
|
);
|
|
58
|
-
--color-
|
|
58
|
+
--color-ui-system-grouped-background: light-dark(
|
|
59
59
|
rgb(242 242 247),
|
|
60
60
|
rgb(28 28 30)
|
|
61
61
|
);
|
|
62
|
-
--color-
|
|
62
|
+
--color-ui-secondary-system-grouped-background: light-dark(
|
|
63
63
|
rgb(255 255 255),
|
|
64
64
|
rgb(44 44 46)
|
|
65
65
|
);
|
|
66
|
-
--color-
|
|
66
|
+
--color-ui-tertiary-system-grouped-background: light-dark(
|
|
67
67
|
rgb(242 242 247),
|
|
68
68
|
rgb(58 58 60)
|
|
69
69
|
);
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
overflow: hidden;
|
|
75
75
|
box-sizing: border-box;
|
|
76
76
|
flex-direction: column;
|
|
77
|
-
color: var(--color-
|
|
77
|
+
color: var(--color-ui-label);
|
|
78
78
|
outline: none;
|
|
79
79
|
pointer-events: auto;
|
|
80
80
|
|
|
81
|
-
/*
|
|
81
|
+
/* A critically damped spring; swiped,
|
|
82
82
|
following the finger (a transform: Base UI's own while it's swiped,
|
|
83
83
|
overriding this one). */
|
|
84
84
|
transform: translateY(
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
/* The screen's bottom inset, for its content (see below). */
|
|
116
116
|
--uikit-sheet-inset-bottom: var(--uikit-safe-area-inset-bottom, 0px);
|
|
117
117
|
|
|
118
|
-
/* Medium (6px from the bottom edge, over the home indicator
|
|
118
|
+
/* Medium (6px from the bottom edge, over the home indicator):
|
|
119
119
|
what's left of it; a form sheet: none. */
|
|
120
120
|
&[data-detent='medium'] > * {
|
|
121
121
|
--uikit-safe-area-inset-bottom: max(
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
|
|
136
136
|
&[data-detent='large'] {
|
|
137
137
|
border-radius: 38px 38px 0 0;
|
|
138
|
-
background-color: var(--color-
|
|
138
|
+
background-color: var(--color-ui-system-background);
|
|
139
139
|
box-shadow: 0 15px 75px rgb(0 0 0 / 18%);
|
|
140
140
|
inset: calc(10px + var(--uikit-safe-area-inset-top, 0px)) 0 0;
|
|
141
141
|
}
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
&[data-detent='large'][data-background='grouped'] {
|
|
146
146
|
--uikit-list-container-background: transparent;
|
|
147
147
|
|
|
148
|
-
background-color: var(--color-
|
|
148
|
+
background-color: var(--color-ui-system-grouped-background);
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
&[data-detent='medium'] {
|
|
@@ -162,16 +162,16 @@
|
|
|
162
162
|
width: min(936px, calc(100% - 64px));
|
|
163
163
|
height: min(852px, calc(100% - 64px));
|
|
164
164
|
border-radius: 38px;
|
|
165
|
-
background-color: var(--color-
|
|
165
|
+
background-color: var(--color-ui-system-background);
|
|
166
166
|
box-shadow: 0 15px 75px rgb(0 0 0 / 18%);
|
|
167
|
-
color: var(--color-
|
|
167
|
+
color: var(--color-ui-label);
|
|
168
168
|
inset: 50% auto auto 50%;
|
|
169
169
|
translate: -50% -50%;
|
|
170
170
|
|
|
171
171
|
&[data-background='grouped'] {
|
|
172
172
|
--uikit-list-container-background: transparent;
|
|
173
173
|
|
|
174
|
-
background-color: var(--color-
|
|
174
|
+
background-color: var(--color-ui-system-grouped-background);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
&[data-starting-style],
|
|
@@ -195,12 +195,18 @@
|
|
|
195
195
|
padding-block-start: 16px;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
-
/* Only a grabber: over the content (its own bars below it).
|
|
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). */
|
|
199
204
|
&:has(> .uikit-sheet-grabber:only-child) {
|
|
200
205
|
position: absolute;
|
|
201
206
|
z-index: 1;
|
|
202
207
|
inset: 0 0 auto;
|
|
203
208
|
padding-block-end: 0;
|
|
209
|
+
will-change: transform;
|
|
204
210
|
}
|
|
205
211
|
}
|
|
206
212
|
|
|
@@ -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%)
|
|
@@ -54,7 +54,7 @@
|
|
|
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,9 +70,9 @@
|
|
|
70
70
|
padding: 11px 16px 10px;
|
|
71
71
|
border-radius: 20px;
|
|
72
72
|
margin: var(--uikit-sidebar-margin, 8px);
|
|
73
|
-
color: var(--color-
|
|
73
|
+
color: var(--color-ui-label);
|
|
74
74
|
|
|
75
|
-
/* Clear of the safe area insets (in a regular layout, e.g.
|
|
75
|
+
/* Clear of the safe area insets (in a regular layout, e.g. a tablet's
|
|
76
76
|
status bar). */
|
|
77
77
|
margin-block: max(
|
|
78
78
|
var(--uikit-sidebar-margin, 8px),
|
|
@@ -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,36 +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 grows to fill the root (
|
|
26
|
-
//
|
|
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).
|
|
27
27
|
// - The pressed state is driven by Base UI's `data-dragging`.
|
|
28
28
|
// - Vertical sliders put the minimum symbol at the bottom.
|
|
29
29
|
// - The fill is derived from the value (Base UI couples it to the thumb's
|
|
30
30
|
// center), so it spans the whole track at the maximum.
|
|
31
31
|
// - Focused by keyboard, the knob has a 2px ring in the tint, 2px around
|
|
32
|
-
// it (
|
|
33
|
-
//
|
|
34
|
-
// - `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
|
|
35
34
|
// symbols: Body, emphasized), with tabular numerals, and reserves the width
|
|
36
|
-
// of its widest value. `Slider.Label`
|
|
35
|
+
// of its widest value. `Slider.Label` is in Body, in the label
|
|
37
36
|
// color. Both are where they are among the parts, or by `placement`:
|
|
38
37
|
// before or after them all, or on a line above or below (the label at its
|
|
39
38
|
// start, the value at its end); the value also in a tooltip (see
|
|
@@ -41,11 +40,13 @@ import { cn, Reserve, withStyle } from '../utils/main.js';
|
|
|
41
40
|
// Base UI's root context isn't public; `Slider.Value` needs the range and
|
|
42
41
|
// format to find its widest values.
|
|
43
42
|
const RootContext = createContext({});
|
|
44
|
-
const Root = forwardRef(({ className, style, thumbAlignment = 'edge', tint, ...props }, ref) => {
|
|
45
|
-
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 });
|
|
46
47
|
const [valueTooltip, setValueTooltip] = useState(undefined);
|
|
47
48
|
const context = useMemo(() => ({ format, locale, max, min, setValueTooltip, step, valueTooltip }), [format, locale, max, min, step, valueTooltip]);
|
|
48
|
-
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) }) }));
|
|
49
50
|
});
|
|
50
51
|
const Control = forwardRef(({ className, ...props }, ref) => (_jsx(BaseSlider.Control, { ref: ref, className: cn('uikit-slider-control', className), "data-slider-part": "control", ...props })));
|
|
51
52
|
const Track = forwardRef(({ className, ...props }, ref) => (_jsx(BaseSlider.Track, { ref: ref, className: cn('uikit-slider-track', className), "data-slider-part": "track", ...props })));
|
|
@@ -70,13 +71,12 @@ const Thumb = forwardRef(({ className, children, index, ...props }, ref) => {
|
|
|
70
71
|
const { valueTooltip } = useContext(RootContext);
|
|
71
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] }));
|
|
72
73
|
});
|
|
73
|
-
/** Tick marks
|
|
74
|
+
/** Tick marks, to be rendered inside `Slider.Track`. */
|
|
74
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: {
|
|
75
76
|
'--uikit-slider-tick': `${String(((index + 1) / (count - 1)) * 100)}%`,
|
|
76
77
|
} }, index))) })));
|
|
77
78
|
/**
|
|
78
|
-
* Minimum/maximum value symbol
|
|
79
|
-
* `maximumValueImage`), to be rendered inside `Slider.Root`.
|
|
79
|
+
* Minimum/maximum value symbol, to be rendered inside `Slider.Root`.
|
|
80
80
|
*/
|
|
81
81
|
const ValueSymbol = forwardRef(({ className, edge, onClick, ...props }, ref) => {
|
|
82
82
|
// Base UI has no API to set an uncontrolled value from outside, so this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/slider/main.tsx"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAEL,aAAa,EAEb,UAAU,EAEV,WAAW,EACX,UAAU,EACV,eAAe,EACf,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/slider/main.tsx"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAEL,aAAa,EAEb,UAAU,EAEV,WAAW,EACX,UAAU,EACV,eAAe,EACf,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqBxE,4EAA4E;AAC5E,MAAM;AACN,iEAAiE;AACjE,wEAAwE;AACxE,2EAA2E;AAC3E,0BAA0B;AAC1B,iDAAiD;AACjD,2EAA2E;AAC3E,+EAA+E;AAC/E,EAAE;AACF,QAAQ;AACR,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,4EAA4E;AAC5E,4EAA4E;AAC5E,2DAA2D;AAC3D,4EAA4E;AAC5E,4CAA4C;AAC5C,8DAA8D;AAC9D,2DAA2D;AAC3D,0EAA0E;AAC1E,yDAAyD;AACzD,yEAAyE;AACzE,uEAAuE;AACvE,kDAAkD;AAClD,8EAA8E;AAC9E,iEAAiE;AACjE,uEAAuE;AACvE,4EAA4E;AAC5E,mEAAmE;AACnE,wEAAwE;AAExE,0EAA0E;AAC1E,oCAAoC;AACpC,MAAM,WAAW,GAAG,aAAa,CAAmB,EAAE,CAAC,CAAC;AAExD,MAAM,IAAI,GAAG,UAAU,CACrB,CACE,EACE,SAAS,EACT,eAAe,EACf,aAAa,EACb,WAAW,EACX,WAAW,EACX,KAAK,EACL,cAAc,GAAG,MAAM,EACvB,IAAI,EACJ,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE;IACF,MAAM,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,CACxC,CAAC;QAEF,OAAO,CACL,KAAC,OAAO,IACN,OAAO,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE;gBAChC,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;gBAChD,OAAO,MAAM,CACX,aAAa,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EACrD,aAAa,CACd,CAAC;YACJ,CAAC,CAAC,YAED,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,GACxB,CACX,CAAC;IACJ,CAAC,EACD,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CACzC,CAAC;IAEF,OAAO,CACL,KAAC,UAAU,CAAC,KAAK,IACf,GAAG,EAAE,GAAG,2BACe,SAAS,KAC5B,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,sBAC7B,OAAO,YAEvB,iBAAiB,GACD,CACpB,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,UAAU;IACb,IAAI;IACJ,KAAK;IACL,KAAK;IACL,OAAO;IACP,KAAK;IACL,SAAS;IACT,KAAK;IACL,KAAK;IACL,MAAM,EAAE,WAAW;CACpB,CAAC"}
|
|
@@ -8,8 +8,7 @@ export type SliderRootProps = BaseSlider.Root.Props & {
|
|
|
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,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAC7C,GAAG;IAGF,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAChD,YAAY,CAAC,EAAE,YAAY,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACrD;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IACvD;;;;;OAKG;IACH,IAAI,EAAE,KAAK,GAAG,KAAK,CAAC;CACrB,CAAC;AAEF,iCAAiC;AACjC,MAAM,MAAM,eAAe,GACzB,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,cAAc,CAAC;AAE9D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACnE;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACnE;;;;OAIG;IACH,SAAS,CAAC,EAAE,eAAe,GAAG,mBAAmB,GAAG,SAAS,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,CAC1B,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,MAAM,EAAE,SAAS,MAAM,EAAE,KACtB,SAAS,CAAC"}
|
|
@@ -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,28 +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-
|
|
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);
|
|
126
126
|
text-align: center;
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.uikit-slider-value {
|
|
130
130
|
display: grid;
|
|
131
131
|
flex: none;
|
|
132
|
-
color: var(--color-
|
|
133
|
-
font-size: var(--font-
|
|
132
|
+
color: var(--color-ui-secondary-label);
|
|
133
|
+
font-size: var(--font-ui-body-size);
|
|
134
134
|
font-style: normal;
|
|
135
135
|
font-variant-numeric: tabular-nums;
|
|
136
|
-
font-variation-settings: 'wght' var(--font-
|
|
137
|
-
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);
|
|
138
138
|
justify-items: end;
|
|
139
|
-
letter-spacing: var(--font-
|
|
140
|
-
line-height: var(--font-
|
|
139
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
140
|
+
line-height: var(--font-ui-body-line-height);
|
|
141
141
|
|
|
142
142
|
/* In tooltips (see Thumb): for assistive technology only. */
|
|
143
143
|
&[data-slider-placement='tooltip'],
|
|
@@ -153,13 +153,13 @@
|
|
|
153
153
|
|
|
154
154
|
.uikit-slider-label {
|
|
155
155
|
flex: none;
|
|
156
|
-
color: var(--color-
|
|
157
|
-
font-size: var(--font-
|
|
156
|
+
color: var(--color-ui-label);
|
|
157
|
+
font-size: var(--font-ui-body-size);
|
|
158
158
|
font-style: normal;
|
|
159
|
-
font-variation-settings: 'wght' var(--font-
|
|
160
|
-
font-weight: round(down, var(--font-
|
|
161
|
-
letter-spacing: var(--font-
|
|
162
|
-
line-height: var(--font-
|
|
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);
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
.uikit-slider-root {
|
|
@@ -169,7 +169,7 @@
|
|
|
169
169
|
--uikit-slider-knob-width: 38px;
|
|
170
170
|
--uikit-slider-knob-height: 24px;
|
|
171
171
|
--uikit-slider-min-length: 120px;
|
|
172
|
-
--uikit-slider-tint: var(--color-
|
|
172
|
+
--uikit-slider-tint: var(--color-ui-primary);
|
|
173
173
|
|
|
174
174
|
position: relative;
|
|
175
175
|
display: flex;
|
|
@@ -270,7 +270,7 @@
|
|
|
270
270
|
color-mix(in srgb, var(--uikit-slider-tint) 75%, transparent);
|
|
271
271
|
content: '';
|
|
272
272
|
opacity: 0;
|
|
273
|
-
transition-duration: var(--glass-
|
|
273
|
+
transition-duration: var(--glass-ui-lens-duration);
|
|
274
274
|
}
|
|
275
275
|
|
|
276
276
|
&::after {
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
0 6px 13px rgb(0 0 0 / 12%);
|
|
283
283
|
content: '';
|
|
284
284
|
inset: 0;
|
|
285
|
-
transition-duration: var(--glass-
|
|
285
|
+
transition-duration: var(--glass-ui-lens-duration);
|
|
286
286
|
transition-property: transform, background-color, box-shadow;
|
|
287
287
|
}
|
|
288
288
|
|
|
@@ -309,10 +309,10 @@
|
|
|
309
309
|
&::after {
|
|
310
310
|
background-color: transparent;
|
|
311
311
|
box-shadow:
|
|
312
|
-
var(--glass-
|
|
312
|
+
var(--glass-ui-lens-shadow),
|
|
313
313
|
0 0.5px 4px rgb(0 0 0 / 12%),
|
|
314
314
|
0 6px 13px rgb(0 0 0 / 12%);
|
|
315
|
-
transform: scale(var(--glass-
|
|
315
|
+
transform: scale(var(--glass-ui-lens-scale));
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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"}
|