@mrpelz/uikit-ish 7.9.0 → 7.11.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/color.d.ts +23 -0
- package/dist/components/color-picker/color.d.ts.map +1 -0
- package/dist/components/color-picker/color.js +150 -0
- package/dist/components/color-picker/color.js.map +1 -0
- package/dist/components/color-picker/main.d.ts +41 -5
- package/dist/components/color-picker/main.d.ts.map +1 -1
- package/dist/components/color-picker/main.js +633 -99
- package/dist/components/color-picker/main.js.map +1 -1
- package/dist/components/color-picker/named-colors.d.ts +3 -0
- package/dist/components/color-picker/named-colors.d.ts.map +1 -0
- package/dist/components/color-picker/named-colors.js +152 -0
- package/dist/components/color-picker/named-colors.js.map +1 -0
- package/dist/components/color-picker/props.d.ts +97 -14
- package/dist/components/color-picker/props.d.ts.map +1 -1
- package/dist/components/color-picker/style.css +316 -50
- 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 +41 -30
- 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 +27 -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 +6 -6
- 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 +81 -30
- package/dist/components/menu/main.d.ts.map +1 -1
- package/dist/components/menu/main.js +568 -93
- 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 +30 -12
- 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 +1 -1
- package/dist/components/popover/main.d.ts.map +1 -1
- package/dist/components/popover/main.js +41 -17
- 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 +183 -31
- package/dist/components/segmented/main.js.map +1 -1
- package/dist/components/segmented/props.d.ts +7 -0
- package/dist/components/segmented/props.d.ts.map +1 -1
- package/dist/components/segmented/style.css +148 -14
- package/dist/components/sheet/main.d.ts +6 -5
- package/dist/components/sheet/main.d.ts.map +1 -1
- package/dist/components/sheet/main.js +53 -27
- package/dist/components/sheet/main.js.map +1 -1
- package/dist/components/sheet/props.d.ts +29 -1
- package/dist/components/sheet/props.d.ts.map +1 -1
- package/dist/components/sheet/style.css +138 -33
- 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 +52 -6
- package/dist/components/utils/main.d.ts.map +1 -1
- package/dist/components/utils/main.js +163 -6
- 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 +10 -5
- package/dist/components/viewport/main.d.ts.map +1 -1
- package/dist/components/viewport/main.js +327 -90
- 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 +116 -17
- 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 +230 -6
- package/dist/styles.css +285 -302
- package/package.json +4 -4
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import '../glass/style.css';
|
|
2
3
|
import './style.css';
|
|
3
4
|
import { Field as BaseField } from '@base-ui/react/field';
|
|
4
|
-
import { forwardRef, useId,
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
//
|
|
5
|
+
import { forwardRef, useId, useState, } from 'react';
|
|
6
|
+
import { GlassBackground } from '../glass/main.js';
|
|
7
|
+
import { cn, isKeyboardFocus } from '../utils/main.js';
|
|
8
|
+
// Text fields, light and dark, in the semantic colors: 52px rows (padding
|
|
9
|
+
// 0 16px),
|
|
8
10
|
// the value in 17px at 510 (20px line height, Body's tracking) in `label`,
|
|
9
11
|
// the placeholder in `placeholderText`, a 2px caret in the tint, the clear
|
|
10
|
-
// button (
|
|
11
|
-
//
|
|
12
|
+
// button (17px) in `tertiaryLabel` while focused and filled. Messages
|
|
13
|
+
// follow Framework7 (`components/input/input.less`,
|
|
12
14
|
// `input-ios.less`, `input-vars.less`): info (`Description`) and error
|
|
13
15
|
// messages in 12px below, invalid text in `systemRed`, disabled at 55%.
|
|
14
16
|
//
|
|
15
|
-
// A Base UI field
|
|
17
|
+
// A Base UI field: in a list row (`Root` rendering a
|
|
16
18
|
// `List.Item`), the label is the row's title and the control fills the rest
|
|
17
19
|
// of the row, the description and error below (see `List`); elsewhere, the
|
|
18
20
|
// parts stack. A textarea renders through `Control`'s `render`.
|
|
19
21
|
//
|
|
20
|
-
//
|
|
22
|
+
// Also:
|
|
21
23
|
// - No outlined style (Framework7 `.input-outline`).
|
|
22
|
-
// - Labels
|
|
23
|
-
//
|
|
24
|
+
// - Labels are inline in rows, in Body (Framework7's iOS theme: 12px labels
|
|
25
|
+
// above the input, `.item-label`); standalone,
|
|
24
26
|
// they're above, in Subheadline.
|
|
25
27
|
// - Info and errors are in Caption 1 (12/16px, Framework7: 12px, 1.4).
|
|
26
|
-
// - The caret is the browser's
|
|
27
|
-
// - The clear button is
|
|
28
|
-
//
|
|
28
|
+
// - The caret is the browser's.
|
|
29
|
+
// - The clear button is a circled cross, cut out of the circle, with a 44px
|
|
30
|
+
// hit area.
|
|
29
31
|
/** A field (Base UI); rendering a `List.Item`, a list row. */
|
|
30
32
|
const Root = forwardRef(({ className, ...props }, ref) => (_jsx(BaseField.Root, { ref: ref, "data-text-field-part": "root", ...props, className: cn('uikit-text-field-root', className) })));
|
|
31
33
|
const Label = forwardRef(({ className, ...props }, ref) => (_jsx(BaseField.Label, { ref: ref, "data-text-field-part": "label", ...props, className: cn('uikit-text-field-label', className) })));
|
|
@@ -45,8 +47,8 @@ const setValue = (control) => {
|
|
|
45
47
|
};
|
|
46
48
|
/**
|
|
47
49
|
* Empties the field's control (as typing would, so its change handlers run),
|
|
48
|
-
* focusing it; shown while it's filled, and (`mode
|
|
49
|
-
*
|
|
50
|
+
* focusing it; shown while it's filled, and (`mode`) while
|
|
51
|
+
* it's focused, while it isn't, or always.
|
|
50
52
|
*/
|
|
51
53
|
const Clear = forwardRef(({ className, children, mode = 'whileEditing', onClick, onPointerDown, ...props }, ref) => {
|
|
52
54
|
const mask = useId();
|
|
@@ -70,28 +72,24 @@ const Clear = forwardRef(({ className, children, mode = 'whileEditing', onClick,
|
|
|
70
72
|
}, children: children ?? (_jsxs("svg", { "aria-hidden": "true", height: "17", viewBox: "0 0 17 17", width: "17", children: [_jsxs("mask", { id: mask, children: [_jsx("rect", { fill: "#fff", height: "17", width: "17" }), _jsx("path", { d: "M5.5 5.5l6 6M11.5 5.5l-6 6", stroke: "#000", strokeLinecap: "round", strokeWidth: "1.6" })] }), _jsx("circle", { cx: "8.5", cy: "8.5", fill: "currentcolor", mask: `url(#${typeof CSS === 'object' ? CSS.escape(mask) : mask})`, r: "8.5" })] })) }));
|
|
71
73
|
});
|
|
72
74
|
/**
|
|
73
|
-
* A search field's capsule
|
|
75
|
+
* A search field's capsule: its symbol, a
|
|
74
76
|
* `TextField.Control` (e.g. `type="search"`), and its buttons.
|
|
75
77
|
*/
|
|
76
|
-
const Search = forwardRef(({ className, onBlur, onFocus,
|
|
77
|
-
// Focused by a pointer (pressed
|
|
78
|
-
|
|
79
|
-
const [
|
|
80
|
-
return (
|
|
78
|
+
const Search = forwardRef(({ children, className, onBlur, onFocus, variant = 'fill', ...props }, ref) => {
|
|
79
|
+
// Focused by keyboard, or by a pointer (pressed anywhere: also beside
|
|
80
|
+
// it, see `preventFocusShift`).
|
|
81
|
+
const [isKeyboard, setIsKeyboard] = useState(false);
|
|
82
|
+
return (_jsxs("label", { ref: ref, "data-keyboard-focus": isKeyboard ? '' : undefined, "data-text-field-part": "search", "data-variant": variant, onBlur: (event) => {
|
|
81
83
|
onBlur?.(event);
|
|
82
84
|
const { relatedTarget } = event;
|
|
83
85
|
if (!(relatedTarget instanceof Node) ||
|
|
84
86
|
!event.currentTarget.contains(relatedTarget)) {
|
|
85
|
-
|
|
87
|
+
setIsKeyboard(false);
|
|
86
88
|
}
|
|
87
89
|
}, onFocus: (event) => {
|
|
88
90
|
onFocus?.(event);
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}, onPointerDown: (event) => {
|
|
92
|
-
onPointerDown?.(event);
|
|
93
|
-
pressed.current = true;
|
|
94
|
-
}, ...props, className: cn('uikit-text-field-search', className) }));
|
|
91
|
+
setIsKeyboard(isKeyboardFocus());
|
|
92
|
+
}, ...props, className: cn('uikit-text-field-search', className), children: [variant === 'tab-bar' || variant === 'toolbar' ? (_jsx(GlassBackground, { kind: variant === 'toolbar' ? 'button' : 'bar' })) : null, children] }));
|
|
95
93
|
});
|
|
96
94
|
export const TextField = {
|
|
97
95
|
...BaseField,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/text-field/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/text-field/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EACL,UAAU,EAIV,KAAK,EACL,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGvD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,QAAQ,IACH,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,GAAG,SAAS;IACZ,MAAM;IACN,IAAI;IACJ,KAAK;IACL,OAAO;IACP,WAAW;IACX,KAAK,EAAE,YAAY;IACnB,KAAK;CACN,CAAC"}
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import type { ComponentProps } from 'react';
|
|
2
2
|
export type ClearProps = Omit<ComponentProps<'button'>, 'ref'> & {
|
|
3
3
|
/**
|
|
4
|
-
* When it's shown
|
|
4
|
+
* When it's shown, always only while the field
|
|
5
5
|
* is filled: while it's focused, while it isn't, or either way.
|
|
6
6
|
* @default 'whileEditing'
|
|
7
7
|
*/
|
|
8
8
|
mode?: 'always' | 'unlessEditing' | 'whileEditing';
|
|
9
9
|
};
|
|
10
|
+
/** A search field's look (see `SearchProps`). */
|
|
11
|
+
export type SearchVariant = 'fill' | 'row' | 'tab-bar' | 'tab-bar-collapsed' | 'toolbar';
|
|
12
|
+
export type SearchProps = Omit<ComponentProps<'label'>, 'ref'> & {
|
|
13
|
+
/**
|
|
14
|
+
* Its look: a capsule on the tertiary fill; a list row's look (inset
|
|
15
|
+
* grouped: its background, height and corners; not a row); a tab bar
|
|
16
|
+
* group's glass capsule, as high as its tabs (e.g. beside a
|
|
17
|
+
* `TabBar.Group`); or the collapsed tab bar's, no capsule of its own, on
|
|
18
|
+
* the glass it's in (e.g. a `TabBar.Accessory`'s, filling it); or a
|
|
19
|
+
* toolbar group's glass capsule, as high as its buttons (e.g. between a
|
|
20
|
+
* `Toolbar`'s buttons).
|
|
21
|
+
* @default 'fill'
|
|
22
|
+
*/
|
|
23
|
+
variant?: SearchVariant;
|
|
24
|
+
};
|
|
10
25
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG;IAC/D;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,cAAc,CAAC;CACpD,CAAC"}
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/text-field/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,KAAK,CAAC,GAAG;IAC/D;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,cAAc,CAAC;CACpD,CAAC;AAEF,iDAAiD;AACjD,MAAM,MAAM,aAAa,GACvB,MAAM,GAAG,KAAK,GAAG,SAAS,GAAG,mBAAmB,GAAG,SAAS,CAAC;AAE/D,MAAM,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,KAAK,CAAC,GAAG;IAC/D;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,CAAC"}
|
|
@@ -7,10 +7,21 @@
|
|
|
7
7
|
gap: 4px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
/* Its search field beside tabs, or filling the glass it's in (see
|
|
11
|
+
Search's `variant`): taking the free space, as high as its container. */
|
|
12
|
+
&:has(> [data-variant='tab-bar']),
|
|
13
|
+
&:has(> [data-variant='tab-bar-collapsed']),
|
|
14
|
+
&:has(> [data-variant='toolbar']) {
|
|
15
|
+
min-width: 0;
|
|
16
|
+
flex: 1 1 0;
|
|
17
|
+
align-self: stretch;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
}
|
|
20
|
+
|
|
10
21
|
/* The clear button, only while filled, and by its mode (`data-mode`):
|
|
11
22
|
while focused, while not, or either way; in a list row (in its
|
|
12
23
|
content), taking no room until then, so a value aligned to the end
|
|
13
|
-
reaches it (
|
|
24
|
+
reaches it (the value moves over for the button). Its own
|
|
14
25
|
field's state, also in a search field's capsule (see Search). */
|
|
15
26
|
&:not([data-filled]),
|
|
16
27
|
&:not([data-focused]):has(> * [data-mode='whileEditing']),
|
|
@@ -33,13 +44,13 @@
|
|
|
33
44
|
}
|
|
34
45
|
|
|
35
46
|
.uikit-text-field-label {
|
|
36
|
-
color: var(--color-
|
|
37
|
-
font-size: var(--font-
|
|
47
|
+
color: var(--color-ui-secondary-label);
|
|
48
|
+
font-size: var(--font-ui-subheadline-size);
|
|
38
49
|
font-style: normal;
|
|
39
|
-
font-variation-settings: 'wght' var(--font-
|
|
40
|
-
font-weight: round(down, var(--font-
|
|
41
|
-
letter-spacing: var(--font-
|
|
42
|
-
line-height: var(--font-
|
|
50
|
+
font-variation-settings: 'wght' var(--font-ui-subheadline-weight);
|
|
51
|
+
font-weight: round(down, var(--font-ui-subheadline-weight), 100);
|
|
52
|
+
letter-spacing: var(--font-ui-subheadline-tracking);
|
|
53
|
+
line-height: var(--font-ui-subheadline-line-height);
|
|
43
54
|
|
|
44
55
|
&[data-disabled] {
|
|
45
56
|
opacity: 0.55;
|
|
@@ -55,18 +66,18 @@
|
|
|
55
66
|
margin: 0;
|
|
56
67
|
appearance: none;
|
|
57
68
|
background: none;
|
|
58
|
-
caret-color: var(--color-
|
|
59
|
-
color: var(--color-
|
|
69
|
+
caret-color: var(--color-ui-primary);
|
|
70
|
+
color: var(--color-ui-label);
|
|
60
71
|
font-family: inherit;
|
|
61
|
-
font-size: var(--font-
|
|
72
|
+
font-size: var(--font-ui-body-size);
|
|
62
73
|
font-variation-settings: 'wght' 510;
|
|
63
74
|
font-weight: round(down, 510, 100);
|
|
64
|
-
letter-spacing: var(--font-
|
|
75
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
65
76
|
line-height: 20px;
|
|
66
77
|
outline: none;
|
|
67
78
|
|
|
68
79
|
&::placeholder {
|
|
69
|
-
color: var(--color-
|
|
80
|
+
color: var(--color-ui-placeholder-text);
|
|
70
81
|
opacity: 1;
|
|
71
82
|
}
|
|
72
83
|
|
|
@@ -98,7 +109,7 @@
|
|
|
98
109
|
/* Autofilled: as typed, on the row (no browser fill, which is
|
|
99
110
|
`!important`: its color never transitions in). */
|
|
100
111
|
&:autofill {
|
|
101
|
-
-webkit-text-fill-color: var(--color-
|
|
112
|
+
-webkit-text-fill-color: var(--color-ui-label);
|
|
102
113
|
transition: background-color 0s 86400s;
|
|
103
114
|
}
|
|
104
115
|
|
|
@@ -110,7 +121,7 @@
|
|
|
110
121
|
}
|
|
111
122
|
|
|
112
123
|
&[data-invalid] {
|
|
113
|
-
color: var(--color-
|
|
124
|
+
color: var(--color-ui-system-red);
|
|
114
125
|
}
|
|
115
126
|
|
|
116
127
|
&[data-disabled] {
|
|
@@ -120,24 +131,24 @@
|
|
|
120
131
|
|
|
121
132
|
.uikit-text-field-description {
|
|
122
133
|
margin: 0;
|
|
123
|
-
color: var(--color-
|
|
124
|
-
font-size: var(--font-
|
|
134
|
+
color: var(--color-ui-secondary-label);
|
|
135
|
+
font-size: var(--font-ui-caption1-size);
|
|
125
136
|
font-style: normal;
|
|
126
|
-
font-variation-settings: 'wght' var(--font-
|
|
127
|
-
font-weight: round(down, var(--font-
|
|
128
|
-
letter-spacing: var(--font-
|
|
129
|
-
line-height: var(--font-
|
|
137
|
+
font-variation-settings: 'wght' var(--font-ui-caption1-weight);
|
|
138
|
+
font-weight: round(down, var(--font-ui-caption1-weight), 100);
|
|
139
|
+
letter-spacing: var(--font-ui-caption1-tracking);
|
|
140
|
+
line-height: var(--font-ui-caption1-line-height);
|
|
130
141
|
}
|
|
131
142
|
|
|
132
143
|
.uikit-text-field-error {
|
|
133
144
|
margin: 0;
|
|
134
|
-
color: var(--color-
|
|
135
|
-
font-size: var(--font-
|
|
145
|
+
color: var(--color-ui-system-red);
|
|
146
|
+
font-size: var(--font-ui-caption1-size);
|
|
136
147
|
font-style: normal;
|
|
137
|
-
font-variation-settings: 'wght' var(--font-
|
|
138
|
-
font-weight: round(down, var(--font-
|
|
139
|
-
letter-spacing: var(--font-
|
|
140
|
-
line-height: var(--font-
|
|
148
|
+
font-variation-settings: 'wght' var(--font-ui-caption1-weight);
|
|
149
|
+
font-weight: round(down, var(--font-ui-caption1-weight), 100);
|
|
150
|
+
letter-spacing: var(--font-ui-caption1-tracking);
|
|
151
|
+
line-height: var(--font-ui-caption1-line-height);
|
|
141
152
|
}
|
|
142
153
|
|
|
143
154
|
.uikit-text-field-clear {
|
|
@@ -148,7 +159,7 @@
|
|
|
148
159
|
margin: 0;
|
|
149
160
|
appearance: none;
|
|
150
161
|
background: none;
|
|
151
|
-
color: var(--color-
|
|
162
|
+
color: var(--color-ui-tertiary-label);
|
|
152
163
|
cursor: pointer;
|
|
153
164
|
place-items: center;
|
|
154
165
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -173,11 +184,11 @@
|
|
|
173
184
|
border-radius: 100px;
|
|
174
185
|
background-color: var(
|
|
175
186
|
--uikit-text-field-search-fill,
|
|
176
|
-
var(--color-
|
|
187
|
+
var(--color-ui-tertiary-system-fill)
|
|
177
188
|
);
|
|
178
|
-
color: var(--color-
|
|
189
|
+
color: var(--color-ui-secondary-label);
|
|
179
190
|
cursor: text;
|
|
180
|
-
font-size: var(--font-
|
|
191
|
+
font-size: var(--font-ui-body-size);
|
|
181
192
|
gap: var(--uikit-text-field-search-gap, 6px);
|
|
182
193
|
|
|
183
194
|
& > input {
|
|
@@ -186,10 +197,73 @@
|
|
|
186
197
|
font-weight: round(down, 400, 100);
|
|
187
198
|
}
|
|
188
199
|
|
|
200
|
+
/* As a list row (inset grouped, see List): its background, height,
|
|
201
|
+
insets and corners. */
|
|
202
|
+
&[data-variant='row'] {
|
|
203
|
+
--uikit-text-field-search-height: 52px;
|
|
204
|
+
--uikit-text-field-search-padding: 16px;
|
|
205
|
+
--uikit-text-field-search-fill: var(
|
|
206
|
+
--color-ui-secondary-system-grouped-background
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
border-radius: var(--uikit-list-radius, 24px);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/* As a tab bar's (see TabBar) or a toolbar's (see Toolbar): on its
|
|
213
|
+
glass, in its content color. */
|
|
214
|
+
&[data-variant='tab-bar'],
|
|
215
|
+
&[data-variant='tab-bar-collapsed'],
|
|
216
|
+
&[data-variant='toolbar'] {
|
|
217
|
+
--uikit-text-field-search-fill: transparent;
|
|
218
|
+
|
|
219
|
+
color: var(--uikit-glass-content);
|
|
220
|
+
|
|
221
|
+
& > input::placeholder {
|
|
222
|
+
color: var(--uikit-glass-content);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/* A group's glass capsule (see GlassBackground), as high as its tabs
|
|
227
|
+
(collapsed too), or a toolbar group's, as its buttons; its content
|
|
228
|
+
above the glass. */
|
|
229
|
+
&[data-variant='tab-bar'],
|
|
230
|
+
&[data-variant='toolbar'] {
|
|
231
|
+
--uikit-text-field-search-padding: 16px;
|
|
232
|
+
|
|
233
|
+
position: relative;
|
|
234
|
+
flex: 1 1 0;
|
|
235
|
+
|
|
236
|
+
& > :not([data-glass-part]) {
|
|
237
|
+
position: relative;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&[data-variant='tab-bar'] {
|
|
242
|
+
--uikit-text-field-search-height: var(--uikit-tab-bar-tab-height, 54px);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
/* (Its glass flush with its box, as the buttons'; a tab bar group's
|
|
246
|
+
extends beyond, as the groups'.) */
|
|
247
|
+
&[data-variant='toolbar'] {
|
|
248
|
+
--uikit-glass-outset: 0px;
|
|
249
|
+
--uikit-text-field-search-height: var(
|
|
250
|
+
--uikit-toolbar-group-height,
|
|
251
|
+
48px
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
/* Collapsed: on the glass it's in (e.g. an accessory's), filling it, no
|
|
256
|
+
insets of its own (the accessory's). */
|
|
257
|
+
&[data-variant='tab-bar-collapsed'] {
|
|
258
|
+
--uikit-text-field-search-padding: 0px;
|
|
259
|
+
|
|
260
|
+
flex: 1 1 auto;
|
|
261
|
+
}
|
|
262
|
+
|
|
189
263
|
/* Focused by keyboard only (a text field matches :focus-visible however
|
|
190
264
|
it's focused; see Search). */
|
|
191
265
|
&[data-keyboard-focus] {
|
|
192
|
-
outline: 2px solid var(--color-
|
|
266
|
+
outline: 2px solid var(--color-ui-primary);
|
|
193
267
|
outline-offset: 2px;
|
|
194
268
|
}
|
|
195
269
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAUtD,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAUtD,OAAO,KAAK,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAqQpB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUnB,CAAC"}
|
|
@@ -9,41 +9,38 @@ import { createContext, forwardRef, useContext } from 'react';
|
|
|
9
9
|
import { Button } from '../button/main.js';
|
|
10
10
|
import { GlassBackground, InheritedGlassContext, useGlassContext, } from '../glass/main.js';
|
|
11
11
|
import { cn, useForwardedRef, withStyle } from '../utils/main.js';
|
|
12
|
-
//
|
|
13
|
-
// iPhone”, “_Buttons - Top”, “_Button - Bottom”, BG Context Dim/Bright), with
|
|
12
|
+
// Toolbars (bottom and top, their buttons) in dim and bright contexts, with
|
|
14
13
|
// the glass materials and vibrant content colors as tokens in `styles.css`,
|
|
15
|
-
// used via `glass/main.tsx`, and the titles
|
|
16
|
-
//
|
|
14
|
+
// used via `glass/main.tsx`, and the titles in the label colors (`label`,
|
|
15
|
+
// `secondaryLabel`).
|
|
17
16
|
//
|
|
18
17
|
// A toolbar holds glass capsules (`Group`) of buttons (`Button`): at the
|
|
19
18
|
// bottom (default) 48px high, their buttons 36px, 6px from the capsule's
|
|
20
|
-
// ends and 12px apart; at the top (`placement`, a navigation bar) 44px high,
|
|
19
|
+
// ends and 12px apart (`gap`); at the top (`placement`, a navigation bar) 44px high,
|
|
21
20
|
// 4px from the ends. Capsules sit at the bar's start (`Leading`) and end
|
|
22
21
|
// (`Trailing`), 12px (top: 10px) apart, anything else (a `Title`, a page
|
|
23
22
|
// control, a field) between them. A button of its own is a glass `Button`
|
|
24
23
|
// (a circle for a symbol); several share a capsule (`Group`). Symbols and
|
|
25
24
|
// labels are 17px (510, SF Pro's `ss16` alternates), in the glass' vibrant
|
|
26
|
-
// content color; glass can be tinted (`prominent
|
|
27
|
-
// “Symbol Primary”), its content white.
|
|
25
|
+
// content color; glass can be tinted (`prominent`), its content white.
|
|
28
26
|
//
|
|
29
|
-
// Titles (
|
|
27
|
+
// Titles (with or without a subtitle): Body Emphasized, centered
|
|
30
28
|
// in the bar; with a subtitle, over 12px (510) in the secondary label
|
|
31
29
|
// color. Large titles sit below a top bar (see `Header`).
|
|
32
30
|
//
|
|
33
|
-
//
|
|
34
|
-
// - The bar's middle is centered in it while the sides fit
|
|
35
|
-
// titles; Figma: the title absolutely centered): the sides share the free
|
|
31
|
+
// Also:
|
|
32
|
+
// - The bar's middle is centered in it while the sides fit: the sides share the free
|
|
36
33
|
// space equally (a missing side is held by an empty one, so a title
|
|
37
34
|
// without `Leading` stays centered); a title aligned to the start (or
|
|
38
35
|
// anything taking the free space) takes all of it instead.
|
|
39
36
|
// - Pressed, a capsule of several buttons turns into a glass lens as the tab
|
|
40
|
-
// bar's groups do (scaled up by 1.05,
|
|
41
|
-
//
|
|
42
|
-
// - The bottom bar's padding is
|
|
43
|
-
//
|
|
37
|
+
// bar's groups do (scaled up by 1.05), the pressed button showing the
|
|
38
|
+
// selection.
|
|
39
|
+
// - The bottom bar's padding is 4px 16px 2px, without the home indicator's
|
|
40
|
+
// 34px in it: the safe area is its anchor's (a
|
|
44
41
|
// `Viewport.BlockEnd`, a sheet's), so it sits right above it.
|
|
45
|
-
// - With a subtitle, the title stays in 17px (
|
|
46
|
-
//
|
|
42
|
+
// - With a subtitle, the title stays in 17px (not smaller than the rows'
|
|
43
|
+
// text).
|
|
47
44
|
/** The bar (its glass context also for glass inside it). */
|
|
48
45
|
const Root = forwardRef(({ className, context: contextProp, placement = 'block-end', ...props }, forwardedRef) => {
|
|
49
46
|
const ref = useForwardedRef(forwardedRef);
|
|
@@ -77,16 +74,17 @@ const Spacer = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref:
|
|
|
77
74
|
// Whether a button is in a capsule of several (see `ToolbarButton`).
|
|
78
75
|
const GroupContext = createContext(false);
|
|
79
76
|
/**
|
|
80
|
-
* A glass capsule of several buttons
|
|
77
|
+
* A glass capsule of several buttons; a single
|
|
81
78
|
* button is a glass `Button` of its own (see `ToolbarButton`).
|
|
82
79
|
*/
|
|
83
|
-
const Group = forwardRef(({ className, children, prominent, style, textColor, tint, ...props }, ref) => {
|
|
80
|
+
const Group = forwardRef(({ className, children, gap, prominent, style, textColor, tint, ...props }, ref) => {
|
|
84
81
|
const isTinted = prominent ?? tint !== undefined;
|
|
85
82
|
// With its own tint: the glass context's variables made of it (their
|
|
86
83
|
// tint resolved here, not at the toolbar's).
|
|
87
84
|
const context = useContext(InheritedGlassContext);
|
|
88
85
|
return (_jsxs(BaseToolbar.Group, { ref: ref, "data-prominent": isTinted ? '' : undefined, "data-glass-context": tint === undefined ? undefined : (context ?? 'auto'), style: withStyle({
|
|
89
86
|
'--uikit-glass-tint': tint,
|
|
87
|
+
'--uikit-toolbar-group-gap': typeof gap === 'number' ? `${String(gap)}px` : gap,
|
|
90
88
|
'--uikit-toolbar-content': textColor,
|
|
91
89
|
'--uikit-toolbar-content-blend': textColor === undefined ? undefined : 'normal',
|
|
92
90
|
}, style), ...props, className: cn('uikit-toolbar-group', className), "data-toolbar-part": "group", children: [_jsx(GlassBackground, { kind: "button", tinted: isTinted }), _jsx(GroupContext.Provider, { value: true, children: children })] }));
|
|
@@ -119,7 +117,7 @@ const Title = forwardRef(({ alignStart, className, render, ...props }, ref) => u
|
|
|
119
117
|
ref,
|
|
120
118
|
render,
|
|
121
119
|
}));
|
|
122
|
-
/** A title's subtitle
|
|
120
|
+
/** A title's subtitle, inside `Title`. */
|
|
123
121
|
const Subtitle = forwardRef(({ className, render, ...props }, ref) => useRender({
|
|
124
122
|
defaultTagName: 'span',
|
|
125
123
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/toolbar/main.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO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AQ,GAAG,UAAU,CACzB,CAAC,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CACvC,SAAS,CAAC;IACR,cAAc,EAAE,MAAM;IACtB,KAAK,EAAE;QACL,mBAAmB,EAAE,UAAU;QAC/B,SAAS,EAAE,EAAE,CAAC,wBAAwB,EAAE,SAAS,CAAC;QAClD,GAAG,KAAK;KACT;IACD,GAAG;IACH,MAAM;CACP,CAAC,CACL,CAAC;AAEF,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,GAAG,WAAW;IACd,IAAI;IACJ,OAAO;IACP,QAAQ;IACR,MAAM;IACN,KAAK;IACL,MAAM,EAAE,aAAa;IACrB,KAAK;IACL,QAAQ;CACT,CAAC"}
|
|
@@ -18,7 +18,13 @@ export type ToolbarRootProps = Omit<BaseToolbar.Root.Props, 'ref'> & {
|
|
|
18
18
|
};
|
|
19
19
|
export type ToolbarSideProps = useRender.ComponentProps<'div'>;
|
|
20
20
|
export type ToolbarGroupProps = Omit<BaseToolbar.Group.Props, 'ref'> & {
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* The space between its buttons (a length; a number: px), not at its
|
|
23
|
+
* ends (`--uikit-toolbar-group-gap`).
|
|
24
|
+
* @default 12
|
|
25
|
+
*/
|
|
26
|
+
gap?: number | string;
|
|
27
|
+
/** A tinted capsule. */
|
|
22
28
|
prominent?: boolean;
|
|
23
29
|
/**
|
|
24
30
|
* Its content's color (e.g. for a light `tint`; unblended).
|
|
@@ -34,13 +40,13 @@ export type ToolbarGroupProps = Omit<BaseToolbar.Group.Props, 'ref'> & {
|
|
|
34
40
|
};
|
|
35
41
|
export type ToolbarButtonProps = Omit<BaseToolbar.Button.Props, 'ref'> & Pick<ButtonRootProps, 'context' | 'cursor' | 'destructive' | 'fill' | 'onSecondaryClick' | 'shape' | 'size' | 'tint' | 'variant'> & {
|
|
36
42
|
/**
|
|
37
|
-
* Of its own (not in a `Group`): tinted glass
|
|
38
|
-
*
|
|
43
|
+
* Of its own (not in a `Group`): tinted glass
|
|
44
|
+
* (`variant="glass-prominent"`).
|
|
39
45
|
*/
|
|
40
46
|
prominent?: boolean;
|
|
41
47
|
};
|
|
42
48
|
export type ToolbarTitleProps = useRender.ComponentProps<'div'> & {
|
|
43
|
-
/** Aligned to the bar's start
|
|
49
|
+
/** Aligned to the bar's start. */
|
|
44
50
|
alignStart?: boolean;
|
|
45
51
|
};
|
|
46
52
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAEpD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACnE;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACrE,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/toolbar/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,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C,KAAK,CAAC,GAAG;IAChE,kCAAkC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC"}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
.uikit-toolbar-subtitle {
|
|
26
|
-
color: var(--color-
|
|
26
|
+
color: var(--color-ui-secondary-label);
|
|
27
27
|
font-size: 12px;
|
|
28
28
|
font-variation-settings: 'wght' 510;
|
|
29
29
|
font-weight: round(down, 510, 100);
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
--uikit-toolbar-gap: 12px;
|
|
51
51
|
--uikit-toolbar-text-padding: 6px;
|
|
52
52
|
|
|
53
|
-
/* (
|
|
54
|
-
|
|
53
|
+
/* (The safe area kept clear by its anchor, see Viewport; 2px of its
|
|
54
|
+
own.) */
|
|
55
55
|
padding: 4px 16px 2px;
|
|
56
56
|
}
|
|
57
57
|
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
justify-content: center;
|
|
101
101
|
padding: 0 var(--uikit-toolbar-group-padding);
|
|
102
102
|
border-radius: 100px;
|
|
103
|
-
gap: 12px;
|
|
103
|
+
gap: var(--uikit-toolbar-group-gap, 12px);
|
|
104
104
|
|
|
105
105
|
&[data-prominent] {
|
|
106
106
|
--uikit-toolbar-content: var(--uikit-glass-content-prominent);
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
letter-spacing: 0;
|
|
134
134
|
line-height: 20px;
|
|
135
135
|
scale: var(--uikit-toolbar-content-scale, none);
|
|
136
|
-
transition-duration: var(--glass-
|
|
136
|
+
transition-duration: var(--glass-ui-lens-duration);
|
|
137
137
|
transition-property: background-color, scale;
|
|
138
138
|
}
|
|
139
139
|
|
|
@@ -181,13 +181,13 @@
|
|
|
181
181
|
flex: 0 1 auto;
|
|
182
182
|
flex-direction: column;
|
|
183
183
|
align-items: center;
|
|
184
|
-
color: var(--color-
|
|
185
|
-
font-size: var(--font-
|
|
184
|
+
color: var(--color-ui-label);
|
|
185
|
+
font-size: var(--font-ui-body-size);
|
|
186
186
|
font-style: normal;
|
|
187
|
-
font-variation-settings: 'wght' var(--font-
|
|
188
|
-
font-weight: round(down, var(--font-
|
|
189
|
-
letter-spacing: var(--font-
|
|
190
|
-
line-height: var(--font-
|
|
187
|
+
font-variation-settings: 'wght' var(--font-ui-body-weight-emphasized);
|
|
188
|
+
font-weight: round(down, var(--font-ui-body-weight-emphasized), 100);
|
|
189
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
190
|
+
line-height: var(--font-ui-body-line-height);
|
|
191
191
|
|
|
192
192
|
/* Centered without sides, too (they take the free space otherwise). */
|
|
193
193
|
margin-inline: auto;
|
|
@@ -200,8 +200,8 @@
|
|
|
200
200
|
text-overflow: ellipsis;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
/* Title and
|
|
204
|
-
|
|
203
|
+
/* Title and subtitle (its title in 17px, never smaller than the rows'
|
|
204
|
+
text). */
|
|
205
205
|
&:has(> [data-toolbar-part='subtitle']) {
|
|
206
206
|
padding-top: 4px;
|
|
207
207
|
line-height: 20px;
|
|
@@ -5,15 +5,15 @@ import './style.css';
|
|
|
5
5
|
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
6
6
|
import { createContext, forwardRef, useContext, useState, } from 'react';
|
|
7
7
|
import { cn, positionerSide, useCollision, useForwardedRef, usePortalContainer, } from '../utils/main.js';
|
|
8
|
-
//
|
|
9
|
-
// 4px corners)
|
|
8
|
+
// A capsule of the menus' glass (Framework7's: a dark panel, white text,
|
|
9
|
+
// 4px corners) (see
|
|
10
10
|
// `Menu`), its text Subheadline in the glass' content color, 6px by 12px
|
|
11
11
|
// in (one line: 32px high, its ends round; more: 16px corners); 8px from
|
|
12
12
|
// its trigger, above it (by default), scaling in from it (as menus).
|
|
13
13
|
//
|
|
14
14
|
// Base UI's `Tooltip`: shown on hover (after 300ms, at once between
|
|
15
15
|
// tooltips in a `Tooltip.Provider`) and keyboard focus, not on touch (no
|
|
16
|
-
// hover there:
|
|
16
|
+
// hover there: what it says should also be found otherwise, e.g.
|
|
17
17
|
// in a popover). Held open (`open`), anchored to any element (`anchor`), it
|
|
18
18
|
// labels something for good, on touch too (e.g. a slider's thumb, a
|
|
19
19
|
// progress bar's fill).
|
|
@@ -45,7 +45,7 @@ export const useCreateTooltipHandle = () => {
|
|
|
45
45
|
return handle;
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
|
-
* A tooltip (Base UI's `Tooltip
|
|
48
|
+
* A tooltip (Base UI's `Tooltip`): a short label in a
|
|
49
49
|
* glass capsule at its trigger, on hover and focus, or held open.
|
|
50
50
|
*/
|
|
51
51
|
/**
|