@mrpelz/uikit-ish 7.8.0 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/main.d.ts +12 -0
- package/dist/components/accordion/main.d.ts.map +1 -0
- package/dist/components/accordion/main.js +20 -0
- package/dist/components/accordion/main.js.map +1 -0
- package/dist/components/accordion/style.css +23 -0
- package/dist/components/action-sheet/main.d.ts +22 -16
- package/dist/components/action-sheet/main.d.ts.map +1 -1
- package/dist/components/action-sheet/main.js +89 -19
- package/dist/components/action-sheet/main.js.map +1 -1
- package/dist/components/action-sheet/props.d.ts +17 -5
- package/dist/components/action-sheet/props.d.ts.map +1 -1
- package/dist/components/action-sheet/style.css +24 -0
- package/dist/components/activity-view/main.d.ts +15 -4
- package/dist/components/activity-view/main.d.ts.map +1 -1
- package/dist/components/activity-view/main.js +27 -14
- package/dist/components/activity-view/main.js.map +1 -1
- package/dist/components/activity-view/props.d.ts +2 -10
- package/dist/components/activity-view/props.d.ts.map +1 -1
- package/dist/components/activity-view/style.css +29 -67
- package/dist/components/alert/main.d.ts +8 -7
- package/dist/components/alert/main.d.ts.map +1 -1
- package/dist/components/alert/main.js +32 -19
- package/dist/components/alert/main.js.map +1 -1
- package/dist/components/alert/props.d.ts +13 -2
- package/dist/components/alert/props.d.ts.map +1 -1
- package/dist/components/alert/style.css +36 -50
- package/dist/components/avatar/main.d.ts +5 -3
- package/dist/components/avatar/main.d.ts.map +1 -1
- package/dist/components/avatar/main.js +10 -8
- package/dist/components/avatar/main.js.map +1 -1
- package/dist/components/avatar/props.d.ts +4 -0
- package/dist/components/avatar/props.d.ts.map +1 -1
- package/dist/components/avatar/style.css +1 -7
- package/dist/components/badge/main.d.ts +3 -3
- package/dist/components/badge/main.d.ts.map +1 -1
- package/dist/components/badge/main.js +9 -9
- package/dist/components/badge/main.js.map +1 -1
- package/dist/components/badge/props.d.ts +4 -3
- package/dist/components/badge/props.d.ts.map +1 -1
- package/dist/components/badge/style.css +10 -4
- package/dist/components/button/main.d.ts.map +1 -1
- package/dist/components/button/main.js +15 -15
- package/dist/components/button/main.js.map +1 -1
- package/dist/components/button/props.d.ts +8 -8
- package/dist/components/button/props.d.ts.map +1 -1
- package/dist/components/button/style.css +37 -55
- package/dist/components/checkbox/main.d.ts.map +1 -1
- package/dist/components/checkbox/main.js +5 -7
- package/dist/components/checkbox/main.js.map +1 -1
- package/dist/components/checkbox/style.css +5 -8
- package/dist/components/collapsible/main.d.ts +9 -0
- package/dist/components/collapsible/main.d.ts.map +1 -0
- package/dist/components/collapsible/main.js +19 -0
- package/dist/components/collapsible/main.js.map +1 -0
- package/dist/components/collapsible/style.css +23 -0
- package/dist/components/color-picker/main.d.ts +27 -4
- package/dist/components/color-picker/main.d.ts.map +1 -1
- package/dist/components/color-picker/main.js +292 -110
- package/dist/components/color-picker/main.js.map +1 -1
- package/dist/components/color-picker/props.d.ts +64 -15
- package/dist/components/color-picker/props.d.ts.map +1 -1
- package/dist/components/color-picker/style.css +133 -65
- package/dist/components/contextual-menu/main.d.ts +11 -7
- package/dist/components/contextual-menu/main.d.ts.map +1 -1
- package/dist/components/contextual-menu/main.js +207 -202
- package/dist/components/contextual-menu/main.js.map +1 -1
- package/dist/components/contextual-menu/props.d.ts +21 -34
- package/dist/components/contextual-menu/props.d.ts.map +1 -1
- package/dist/components/contextual-menu/style.css +63 -34
- package/dist/components/date-picker/handle.d.ts +41 -0
- package/dist/components/date-picker/handle.d.ts.map +1 -0
- package/dist/components/date-picker/handle.js +47 -0
- package/dist/components/date-picker/handle.js.map +1 -0
- package/dist/components/date-picker/main.d.ts +31 -49
- package/dist/components/date-picker/main.d.ts.map +1 -1
- package/dist/components/date-picker/main.js +373 -178
- package/dist/components/date-picker/main.js.map +1 -1
- package/dist/components/date-picker/pager.d.ts +24 -0
- package/dist/components/date-picker/pager.d.ts.map +1 -0
- package/dist/components/date-picker/pager.js +307 -0
- package/dist/components/date-picker/pager.js.map +1 -0
- package/dist/components/date-picker/props.d.ts +98 -27
- package/dist/components/date-picker/props.d.ts.map +1 -1
- package/dist/components/date-picker/style.css +110 -118
- package/dist/components/drawer/main.d.ts +31 -0
- package/dist/components/drawer/main.d.ts.map +1 -0
- package/dist/components/drawer/main.js +119 -0
- package/dist/components/drawer/main.js.map +1 -0
- package/dist/components/drawer/props.d.ts +39 -0
- package/dist/components/drawer/props.d.ts.map +1 -0
- package/dist/components/drawer/props.js +2 -0
- package/dist/components/drawer/props.js.map +1 -0
- package/dist/components/drawer/style.css +135 -0
- package/dist/components/edit-menu/main.d.ts +7 -7
- package/dist/components/edit-menu/main.d.ts.map +1 -1
- package/dist/components/edit-menu/main.js +57 -40
- package/dist/components/edit-menu/main.js.map +1 -1
- package/dist/components/edit-menu/props.d.ts +14 -1
- package/dist/components/edit-menu/props.d.ts.map +1 -1
- package/dist/components/edit-menu/style.css +15 -8
- package/dist/components/form/main.d.ts +8 -0
- package/dist/components/form/main.d.ts.map +1 -1
- package/dist/components/form/main.js +18 -5
- package/dist/components/form/main.js.map +1 -1
- package/dist/components/form/props.d.ts +1 -2
- package/dist/components/form/props.d.ts.map +1 -1
- package/dist/components/glass/main.d.ts +1 -1
- package/dist/components/glass/main.js +4 -4
- package/dist/components/glass/main.js.map +1 -1
- package/dist/components/glass/props.d.ts +5 -5
- package/dist/components/glass/props.d.ts.map +1 -1
- package/dist/components/glass/style.css +176 -161
- package/dist/components/header/main.d.ts +5 -4
- package/dist/components/header/main.d.ts.map +1 -1
- package/dist/components/header/main.js +64 -34
- package/dist/components/header/main.js.map +1 -1
- package/dist/components/header/props.d.ts +2 -3
- package/dist/components/header/props.d.ts.map +1 -1
- package/dist/components/header/style.css +46 -65
- package/dist/components/index.d.ts +27 -23
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +17 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/main.d.ts +2 -2
- package/dist/components/layout/main.d.ts.map +1 -1
- package/dist/components/layout/main.js +63 -167
- package/dist/components/layout/main.js.map +1 -1
- package/dist/components/layout/props.d.ts +2 -20
- package/dist/components/layout/props.d.ts.map +1 -1
- package/dist/components/layout/style.css +20 -91
- package/dist/components/list/main.d.ts +58 -10
- package/dist/components/list/main.d.ts.map +1 -1
- package/dist/components/list/main.js +1022 -465
- package/dist/components/list/main.js.map +1 -1
- package/dist/components/list/props.d.ts +211 -21
- package/dist/components/list/props.d.ts.map +1 -1
- package/dist/components/list/reorder.d.ts +146 -0
- package/dist/components/list/reorder.d.ts.map +1 -0
- package/dist/components/list/reorder.js +819 -0
- package/dist/components/list/reorder.js.map +1 -0
- package/dist/components/list/select.d.ts +6 -0
- package/dist/components/list/select.d.ts.map +1 -0
- package/dist/components/list/select.js +141 -0
- package/dist/components/list/select.js.map +1 -0
- package/dist/components/list/style.css +492 -507
- package/dist/components/list/swipe-actions-handle.d.ts +40 -0
- package/dist/components/list/swipe-actions-handle.d.ts.map +1 -0
- package/dist/components/list/swipe-actions-handle.js +51 -0
- package/dist/components/list/swipe-actions-handle.js.map +1 -0
- package/dist/components/menu/main.d.ts +102 -32
- package/dist/components/menu/main.d.ts.map +1 -1
- package/dist/components/menu/main.js +510 -99
- package/dist/components/menu/main.js.map +1 -1
- package/dist/components/menu/props.d.ts +5 -5
- package/dist/components/menu/props.d.ts.map +1 -1
- package/dist/components/menu/style.css +35 -43
- package/dist/components/navigation/main.d.ts +14 -2
- package/dist/components/navigation/main.d.ts.map +1 -1
- package/dist/components/navigation/main.js +437 -119
- package/dist/components/navigation/main.js.map +1 -1
- package/dist/components/navigation/props.d.ts +53 -3
- package/dist/components/navigation/props.d.ts.map +1 -1
- package/dist/components/navigation/style.css +56 -9
- package/dist/components/page/main.d.ts.map +1 -1
- package/dist/components/page/main.js +13 -8
- package/dist/components/page/main.js.map +1 -1
- package/dist/components/page/props.d.ts +8 -0
- package/dist/components/page/props.d.ts.map +1 -1
- package/dist/components/page/style.css +39 -4
- package/dist/components/page-control/main.d.ts +2 -2
- package/dist/components/page-control/main.d.ts.map +1 -1
- package/dist/components/page-control/main.js +66 -32
- package/dist/components/page-control/main.js.map +1 -1
- package/dist/components/page-control/props.d.ts +10 -2
- package/dist/components/page-control/props.d.ts.map +1 -1
- package/dist/components/page-control/style.css +7 -2
- package/dist/components/popover/main.d.ts +11 -6
- package/dist/components/popover/main.d.ts.map +1 -1
- package/dist/components/popover/main.js +63 -38
- package/dist/components/popover/main.js.map +1 -1
- package/dist/components/popover/props.d.ts +7 -6
- package/dist/components/popover/props.d.ts.map +1 -1
- package/dist/components/popover/style.css +54 -4
- package/dist/components/progress/main.d.ts +2 -3
- package/dist/components/progress/main.d.ts.map +1 -1
- package/dist/components/progress/main.js +148 -29
- package/dist/components/progress/main.js.map +1 -1
- package/dist/components/progress/props.d.ts +43 -9
- package/dist/components/progress/props.d.ts.map +1 -1
- package/dist/components/progress/style.css +82 -50
- package/dist/components/roll/main.d.ts +1 -1
- package/dist/components/roll/main.d.ts.map +1 -1
- package/dist/components/roll/main.js +90 -34
- package/dist/components/roll/main.js.map +1 -1
- package/dist/components/roll/props.d.ts +25 -8
- package/dist/components/roll/props.d.ts.map +1 -1
- package/dist/components/roll/style.css +12 -24
- package/dist/components/segmented/main.d.ts.map +1 -1
- package/dist/components/segmented/main.js +47 -30
- package/dist/components/segmented/main.js.map +1 -1
- package/dist/components/segmented/style.css +16 -23
- package/dist/components/sheet/main.d.ts +25 -15
- package/dist/components/sheet/main.d.ts.map +1 -1
- package/dist/components/sheet/main.js +66 -78
- package/dist/components/sheet/main.js.map +1 -1
- package/dist/components/sheet/props.d.ts +37 -3
- package/dist/components/sheet/props.d.ts.map +1 -1
- package/dist/components/sheet/style.css +183 -45
- package/dist/components/sidebar/main.d.ts.map +1 -1
- package/dist/components/sidebar/main.js +9 -13
- package/dist/components/sidebar/main.js.map +1 -1
- package/dist/components/sidebar/style.css +20 -14
- package/dist/components/slider/main.d.ts.map +1 -1
- package/dist/components/slider/main.js +23 -22
- package/dist/components/slider/main.js.map +1 -1
- package/dist/components/slider/props.d.ts +1 -2
- package/dist/components/slider/props.d.ts.map +1 -1
- package/dist/components/slider/style.css +27 -53
- package/dist/components/stepper/main.d.ts +4 -6
- package/dist/components/stepper/main.d.ts.map +1 -1
- package/dist/components/stepper/main.js +29 -25
- package/dist/components/stepper/main.js.map +1 -1
- package/dist/components/stepper/style.css +12 -16
- package/dist/components/switch/main.d.ts.map +1 -1
- package/dist/components/switch/main.js +40 -28
- package/dist/components/switch/main.js.map +1 -1
- package/dist/components/switch/props.d.ts +7 -5
- package/dist/components/switch/props.d.ts.map +1 -1
- package/dist/components/switch/style.css +40 -17
- package/dist/components/symbol/main.d.ts +2 -2
- package/dist/components/symbol/main.d.ts.map +1 -1
- package/dist/components/symbol/main.js +36 -28
- package/dist/components/symbol/main.js.map +1 -1
- package/dist/components/symbol/props.d.ts +39 -4
- package/dist/components/symbol/props.d.ts.map +1 -1
- package/dist/components/symbol/style.css +26 -5
- package/dist/components/tab-bar/main.d.ts +2 -2
- package/dist/components/tab-bar/main.d.ts.map +1 -1
- package/dist/components/tab-bar/main.js +133 -101
- package/dist/components/tab-bar/main.js.map +1 -1
- package/dist/components/tab-bar/props.d.ts +6 -6
- package/dist/components/tab-bar/props.d.ts.map +1 -1
- package/dist/components/tab-bar/style.css +113 -99
- package/dist/components/text-field/main.d.ts +3 -2
- package/dist/components/text-field/main.d.ts.map +1 -1
- package/dist/components/text-field/main.js +29 -30
- package/dist/components/text-field/main.js.map +1 -1
- package/dist/components/text-field/props.d.ts +23 -1
- package/dist/components/text-field/props.d.ts.map +1 -1
- package/dist/components/text-field/style.css +122 -82
- package/dist/components/toolbar/main.js +27 -27
- package/dist/components/toolbar/main.js.map +1 -1
- package/dist/components/toolbar/props.d.ts +10 -4
- package/dist/components/toolbar/props.d.ts.map +1 -1
- package/dist/components/toolbar/style.css +39 -33
- package/dist/components/tooltip/main.d.ts +10 -9
- package/dist/components/tooltip/main.d.ts.map +1 -1
- package/dist/components/tooltip/main.js +39 -10
- package/dist/components/tooltip/main.js.map +1 -1
- package/dist/components/tooltip/props.d.ts +2 -0
- package/dist/components/tooltip/props.d.ts.map +1 -1
- package/dist/components/tooltip/style.css +16 -16
- package/dist/components/typography/main.d.ts +2 -2
- package/dist/components/typography/main.d.ts.map +1 -1
- package/dist/components/typography/main.js +24 -16
- package/dist/components/typography/main.js.map +1 -1
- package/dist/components/typography/props.d.ts +11 -18
- package/dist/components/typography/props.d.ts.map +1 -1
- package/dist/components/typography/style.css +503 -623
- package/dist/components/utils/main.d.ts +78 -8
- package/dist/components/utils/main.d.ts.map +1 -1
- package/dist/components/utils/main.js +235 -16
- package/dist/components/utils/main.js.map +1 -1
- package/dist/components/utils/props.d.ts +27 -4
- package/dist/components/utils/props.d.ts.map +1 -1
- package/dist/components/utils/style.css +31 -18
- package/dist/components/viewport/edge-effect.d.ts +10 -0
- package/dist/components/viewport/edge-effect.d.ts.map +1 -0
- package/dist/components/viewport/edge-effect.js +100 -0
- package/dist/components/viewport/edge-effect.js.map +1 -0
- package/dist/components/viewport/edge.d.ts +39 -0
- package/dist/components/viewport/edge.d.ts.map +1 -0
- package/dist/components/viewport/edge.js +151 -0
- package/dist/components/viewport/edge.js.map +1 -0
- package/dist/components/viewport/input.d.ts +39 -0
- package/dist/components/viewport/input.d.ts.map +1 -0
- package/dist/components/viewport/input.js +280 -0
- package/dist/components/viewport/input.js.map +1 -0
- package/dist/components/viewport/main.d.ts +47 -9
- package/dist/components/viewport/main.d.ts.map +1 -1
- package/dist/components/viewport/main.js +745 -86
- package/dist/components/viewport/main.js.map +1 -1
- package/dist/components/viewport/padding.d.ts +78 -0
- package/dist/components/viewport/padding.d.ts.map +1 -0
- package/dist/components/viewport/padding.js +321 -0
- package/dist/components/viewport/padding.js.map +1 -0
- package/dist/components/viewport/props.d.ts +220 -11
- package/dist/components/viewport/props.d.ts.map +1 -1
- package/dist/components/viewport/style.css +377 -6
- package/dist/main.d.ts +0 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/styles.css +318 -302
- package/dist/styles.d.ts +2 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +2 -1
- package/dist/styles.js.map +1 -1
- package/package.json +8 -16
|
@@ -7,47 +7,50 @@
|
|
|
7
7
|
gap: 4px;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
/*
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
&:
|
|
14
|
-
|
|
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;
|
|
15
19
|
}
|
|
16
20
|
|
|
17
|
-
/*
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
/* The clear button, only while filled, and by its mode (`data-mode`):
|
|
22
|
+
while focused, while not, or either way; in a list row (in its
|
|
23
|
+
content), taking no room until then, so a value aligned to the end
|
|
24
|
+
reaches it (the value moves over for the button). Its own
|
|
25
|
+
field's state, also in a search field's capsule (see Search). */
|
|
26
|
+
&:not([data-filled]),
|
|
27
|
+
&:not([data-focused]):has(> * [data-mode='whileEditing']),
|
|
28
|
+
&[data-focused]:has(> * [data-mode='unlessEditing']),
|
|
29
|
+
&:not([data-focused]):has(> [data-mode='whileEditing']),
|
|
30
|
+
&[data-focused]:has(> [data-mode='unlessEditing']) {
|
|
31
|
+
& > [data-text-field-part='clear'],
|
|
32
|
+
& > [data-text-field-part='search'] > [data-text-field-part='clear'] {
|
|
33
|
+
visibility: hidden;
|
|
34
|
+
}
|
|
23
35
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
&[data-list-part]
|
|
37
|
+
> *
|
|
38
|
+
> [data-list-part='row']
|
|
39
|
+
> [data-list-part='trailing']
|
|
40
|
+
> [data-text-field-part='clear'] {
|
|
41
|
+
display: none;
|
|
42
|
+
}
|
|
29
43
|
}
|
|
30
44
|
}
|
|
31
45
|
|
|
32
46
|
.uikit-text-field-label {
|
|
33
|
-
color: var(--color-
|
|
34
|
-
font-size: var(--font-
|
|
47
|
+
color: var(--color-ui-secondary-label);
|
|
48
|
+
font-size: var(--font-ui-subheadline-size);
|
|
35
49
|
font-style: normal;
|
|
36
|
-
font-variation-settings: 'wght' var(--font-
|
|
37
|
-
font-weight: round(down, var(--font-
|
|
38
|
-
letter-spacing: var(--font-
|
|
39
|
-
line-height: var(--font-
|
|
40
|
-
stroke: currentcolor;
|
|
41
|
-
stroke-linejoin: round;
|
|
42
|
-
stroke-width: max(
|
|
43
|
-
0px,
|
|
44
|
-
(var(--font-ios-subheadline-weight) - 400) / 326 * 1px
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
--uikit-symbol-thinning: max(
|
|
48
|
-
0px,
|
|
49
|
-
(400 - var(--font-ios-subheadline-weight)) / 326 * 1px
|
|
50
|
-
);
|
|
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);
|
|
51
54
|
|
|
52
55
|
&[data-disabled] {
|
|
53
56
|
opacity: 0.55;
|
|
@@ -63,23 +66,18 @@
|
|
|
63
66
|
margin: 0;
|
|
64
67
|
appearance: none;
|
|
65
68
|
background: none;
|
|
66
|
-
caret-color: var(--color-
|
|
67
|
-
color: var(--color-
|
|
69
|
+
caret-color: var(--color-ui-primary);
|
|
70
|
+
color: var(--color-ui-label);
|
|
68
71
|
font-family: inherit;
|
|
69
|
-
font-size: var(--font-
|
|
72
|
+
font-size: var(--font-ui-body-size);
|
|
70
73
|
font-variation-settings: 'wght' 510;
|
|
71
74
|
font-weight: round(down, 510, 100);
|
|
72
|
-
letter-spacing: var(--font-
|
|
75
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
73
76
|
line-height: 20px;
|
|
74
77
|
outline: none;
|
|
75
|
-
stroke: currentcolor;
|
|
76
|
-
stroke-linejoin: round;
|
|
77
|
-
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
78
|
-
|
|
79
|
-
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
80
78
|
|
|
81
79
|
&::placeholder {
|
|
82
|
-
color: var(--color-
|
|
80
|
+
color: var(--color-ui-placeholder-text);
|
|
83
81
|
opacity: 1;
|
|
84
82
|
}
|
|
85
83
|
|
|
@@ -111,7 +109,7 @@
|
|
|
111
109
|
/* Autofilled: as typed, on the row (no browser fill, which is
|
|
112
110
|
`!important`: its color never transitions in). */
|
|
113
111
|
&:autofill {
|
|
114
|
-
-webkit-text-fill-color: var(--color-
|
|
112
|
+
-webkit-text-fill-color: var(--color-ui-label);
|
|
115
113
|
transition: background-color 0s 86400s;
|
|
116
114
|
}
|
|
117
115
|
|
|
@@ -123,7 +121,7 @@
|
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
&[data-invalid] {
|
|
126
|
-
color: var(--color-
|
|
124
|
+
color: var(--color-ui-system-red);
|
|
127
125
|
}
|
|
128
126
|
|
|
129
127
|
&[data-disabled] {
|
|
@@ -133,40 +131,24 @@
|
|
|
133
131
|
|
|
134
132
|
.uikit-text-field-description {
|
|
135
133
|
margin: 0;
|
|
136
|
-
color: var(--color-
|
|
137
|
-
font-size: var(--font-
|
|
134
|
+
color: var(--color-ui-secondary-label);
|
|
135
|
+
font-size: var(--font-ui-caption1-size);
|
|
138
136
|
font-style: normal;
|
|
139
|
-
font-variation-settings: 'wght' var(--font-
|
|
140
|
-
font-weight: round(down, var(--font-
|
|
141
|
-
letter-spacing: var(--font-
|
|
142
|
-
line-height: var(--font-
|
|
143
|
-
stroke: currentcolor;
|
|
144
|
-
stroke-linejoin: round;
|
|
145
|
-
stroke-width: max(0px, (var(--font-ios-caption1-weight) - 400) / 326 * 1px);
|
|
146
|
-
|
|
147
|
-
--uikit-symbol-thinning: max(
|
|
148
|
-
0px,
|
|
149
|
-
(400 - var(--font-ios-caption1-weight)) / 326 * 1px
|
|
150
|
-
);
|
|
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);
|
|
151
141
|
}
|
|
152
142
|
|
|
153
143
|
.uikit-text-field-error {
|
|
154
144
|
margin: 0;
|
|
155
|
-
color: var(--color-
|
|
156
|
-
font-size: var(--font-
|
|
145
|
+
color: var(--color-ui-system-red);
|
|
146
|
+
font-size: var(--font-ui-caption1-size);
|
|
157
147
|
font-style: normal;
|
|
158
|
-
font-variation-settings: 'wght' var(--font-
|
|
159
|
-
font-weight: round(down, var(--font-
|
|
160
|
-
letter-spacing: var(--font-
|
|
161
|
-
line-height: var(--font-
|
|
162
|
-
stroke: currentcolor;
|
|
163
|
-
stroke-linejoin: round;
|
|
164
|
-
stroke-width: max(0px, (var(--font-ios-caption1-weight) - 400) / 326 * 1px);
|
|
165
|
-
|
|
166
|
-
--uikit-symbol-thinning: max(
|
|
167
|
-
0px,
|
|
168
|
-
(400 - var(--font-ios-caption1-weight)) / 326 * 1px
|
|
169
|
-
);
|
|
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);
|
|
170
152
|
}
|
|
171
153
|
|
|
172
154
|
.uikit-text-field-clear {
|
|
@@ -177,7 +159,7 @@
|
|
|
177
159
|
margin: 0;
|
|
178
160
|
appearance: none;
|
|
179
161
|
background: none;
|
|
180
|
-
color: var(--color-
|
|
162
|
+
color: var(--color-ui-tertiary-label);
|
|
181
163
|
cursor: pointer;
|
|
182
164
|
place-items: center;
|
|
183
165
|
-webkit-tap-highlight-color: transparent;
|
|
@@ -202,28 +184,86 @@
|
|
|
202
184
|
border-radius: 100px;
|
|
203
185
|
background-color: var(
|
|
204
186
|
--uikit-text-field-search-fill,
|
|
205
|
-
var(--color-
|
|
187
|
+
var(--color-ui-tertiary-system-fill)
|
|
206
188
|
);
|
|
207
|
-
color: var(--color-
|
|
189
|
+
color: var(--color-ui-secondary-label);
|
|
208
190
|
cursor: text;
|
|
209
|
-
font-size: var(--font-
|
|
191
|
+
font-size: var(--font-ui-body-size);
|
|
210
192
|
gap: var(--uikit-text-field-search-gap, 6px);
|
|
211
193
|
|
|
212
194
|
& > input {
|
|
213
195
|
flex: 1 1 auto;
|
|
214
196
|
font-variation-settings: 'wght' 400;
|
|
215
197
|
font-weight: round(down, 400, 100);
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
198
|
+
}
|
|
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;
|
|
219
218
|
|
|
220
|
-
--uikit-
|
|
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;
|
|
221
261
|
}
|
|
222
262
|
|
|
223
263
|
/* Focused by keyboard only (a text field matches :focus-visible however
|
|
224
264
|
it's focused; see Search). */
|
|
225
265
|
&[data-keyboard-focus] {
|
|
226
|
-
outline: 2px solid var(--color-
|
|
266
|
+
outline: 2px solid var(--color-ui-primary);
|
|
227
267
|
outline-offset: 2px;
|
|
228
268
|
}
|
|
229
269
|
}
|
|
@@ -9,39 +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
|
-
//
|
|
36
|
-
//
|
|
37
|
-
// free space) takes all of it instead.
|
|
31
|
+
// Also:
|
|
32
|
+
// - The bar's middle is centered in it while the sides fit: the sides share the free
|
|
33
|
+
// space equally (a missing side is held by an empty one, so a title
|
|
34
|
+
// without `Leading` stays centered); a title aligned to the start (or
|
|
35
|
+
// anything taking the free space) takes all of it instead.
|
|
38
36
|
// - Pressed, a capsule of several buttons turns into a glass lens as the tab
|
|
39
|
-
// bar's groups do (scaled up by 1.05,
|
|
40
|
-
//
|
|
41
|
-
// - The bottom bar's padding is
|
|
42
|
-
//
|
|
43
|
-
//
|
|
44
|
-
//
|
|
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
|
|
41
|
+
// `Viewport.BlockEnd`, a sheet's), so it sits right above it.
|
|
42
|
+
// - With a subtitle, the title stays in 17px (not smaller than the rows'
|
|
43
|
+
// text).
|
|
45
44
|
/** The bar (its glass context also for glass inside it). */
|
|
46
45
|
const Root = forwardRef(({ className, context: contextProp, placement = 'block-end', ...props }, forwardedRef) => {
|
|
47
46
|
const ref = useForwardedRef(forwardedRef);
|
|
@@ -75,19 +74,20 @@ const Spacer = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref:
|
|
|
75
74
|
// Whether a button is in a capsule of several (see `ToolbarButton`).
|
|
76
75
|
const GroupContext = createContext(false);
|
|
77
76
|
/**
|
|
78
|
-
* A glass capsule of several buttons
|
|
77
|
+
* A glass capsule of several buttons; a single
|
|
79
78
|
* button is a glass `Button` of its own (see `ToolbarButton`).
|
|
80
79
|
*/
|
|
81
|
-
const Group = forwardRef(({ className, children, prominent, style, textColor, tint, ...props }, ref) => {
|
|
82
|
-
const
|
|
80
|
+
const Group = forwardRef(({ className, children, gap, prominent, style, textColor, tint, ...props }, ref) => {
|
|
81
|
+
const isTinted = prominent ?? tint !== undefined;
|
|
83
82
|
// With its own tint: the glass context's variables made of it (their
|
|
84
83
|
// tint resolved here, not at the toolbar's).
|
|
85
84
|
const context = useContext(InheritedGlassContext);
|
|
86
|
-
return (_jsxs(BaseToolbar.Group, { ref: ref, "data-prominent":
|
|
85
|
+
return (_jsxs(BaseToolbar.Group, { ref: ref, "data-prominent": isTinted ? '' : undefined, "data-glass-context": tint === undefined ? undefined : (context ?? 'auto'), style: withStyle({
|
|
87
86
|
'--uikit-glass-tint': tint,
|
|
87
|
+
'--uikit-toolbar-group-gap': typeof gap === 'number' ? `${String(gap)}px` : gap,
|
|
88
88
|
'--uikit-toolbar-content': textColor,
|
|
89
89
|
'--uikit-toolbar-content-blend': textColor === undefined ? undefined : 'normal',
|
|
90
|
-
}, style), ...props, className: cn('uikit-toolbar-group', className), "data-toolbar-part": "group", children: [_jsx(GlassBackground, { kind: "button", tinted:
|
|
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 })] }));
|
|
91
91
|
});
|
|
92
92
|
const isClassic = (variant) => variant !== undefined && variant !== 'glass' && variant !== 'glass-prominent';
|
|
93
93
|
/**
|
|
@@ -98,12 +98,12 @@ const isClassic = (variant) => variant !== undefined && variant !== 'glass' && v
|
|
|
98
98
|
* otherwise a `Button` of its own (by default, glass).
|
|
99
99
|
*/
|
|
100
100
|
const ToolbarButton = forwardRef(({ context, cursor, destructive, fill, onSecondaryClick, prominent, render, shape, size, tint, variant, ...props }, ref) => {
|
|
101
|
-
const
|
|
101
|
+
const isInGroup = useContext(GroupContext);
|
|
102
102
|
// (Alone: the bar's glass context, unless its own.)
|
|
103
103
|
const inherited = useContext(InheritedGlassContext);
|
|
104
104
|
const shared = { cursor, destructive, onSecondaryClick, tint };
|
|
105
105
|
return (_jsx(BaseToolbar.Button, { ref: ref, "data-toolbar-part": "button", ...props, render: render ??
|
|
106
|
-
(
|
|
106
|
+
(isInGroup ? (_jsx(Button.Root, { ...shared, className: "uikit-toolbar-button", "data-toolbar-classic": isClassic(variant) ? '' : undefined, fill: fill, shape: shape, variant: isClassic(variant) ? variant : undefined, "data-toolbar-tinted": (destructive ?? tint) && !isClassic(variant) ? '' : undefined })) : (_jsx(Button.Root, { ...shared, className: "uikit-toolbar-glass-button", context: context ?? inherited, fill: fill, shape: shape, size: size, variant: variant ?? (prominent ? 'glass-prominent' : 'glass') }))) }));
|
|
107
107
|
});
|
|
108
108
|
/** The bar's title; takes the free space when aligned to the start. */
|
|
109
109
|
const Title = forwardRef(({ alignStart, className, render, ...props }, ref) => useRender({
|
|
@@ -117,7 +117,7 @@ const Title = forwardRef(({ alignStart, className, render, ...props }, ref) => u
|
|
|
117
117
|
ref,
|
|
118
118
|
render,
|
|
119
119
|
}));
|
|
120
|
-
/** A title's subtitle
|
|
120
|
+
/** A title's subtitle, inside `Title`. */
|
|
121
121
|
const Subtitle = forwardRef(({ className, render, ...props }, ref) => useRender({
|
|
122
122
|
defaultTagName: 'span',
|
|
123
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,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAkB,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OA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AClD,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,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,G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;
|
|
28
28
|
font-variation-settings: 'wght' 510;
|
|
29
29
|
font-weight: round(down, 510, 100);
|
|
30
30
|
letter-spacing: 0;
|
|
31
31
|
line-height: 14px;
|
|
32
|
-
stroke: currentcolor;
|
|
33
|
-
stroke-linejoin: round;
|
|
34
|
-
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
35
|
-
|
|
36
|
-
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
37
32
|
}
|
|
38
33
|
|
|
39
34
|
.uikit-toolbar-root {
|
|
@@ -42,13 +37,22 @@
|
|
|
42
37
|
align-items: center;
|
|
43
38
|
gap: var(--uikit-toolbar-gap);
|
|
44
39
|
|
|
40
|
+
/* A text field in it (e.g. a search or message field): the free space
|
|
41
|
+
between its buttons. */
|
|
42
|
+
& > [data-text-field-part='root'] {
|
|
43
|
+
min-width: 0;
|
|
44
|
+
flex: 1 1 0;
|
|
45
|
+
}
|
|
46
|
+
|
|
45
47
|
&[data-placement='block-end'] {
|
|
46
48
|
--uikit-toolbar-group-height: 48px;
|
|
47
49
|
--uikit-toolbar-group-padding: 6px;
|
|
48
50
|
--uikit-toolbar-gap: 12px;
|
|
49
51
|
--uikit-toolbar-text-padding: 6px;
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
/* (The safe area kept clear by its anchor, see Viewport; 2px of its
|
|
54
|
+
own.) */
|
|
55
|
+
padding: 4px 16px 2px;
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
&[data-placement='block-start'] {
|
|
@@ -60,6 +64,24 @@
|
|
|
60
64
|
min-height: 54px;
|
|
61
65
|
padding: 0 16px 10px;
|
|
62
66
|
}
|
|
67
|
+
|
|
68
|
+
/* A centered title stays centered without a side: an empty one stands
|
|
69
|
+
in (the other side would take all the free space); without either,
|
|
70
|
+
its own margins center it. (Only `::after`: a header's bar has its
|
|
71
|
+
backdrop in `::before`.) */
|
|
72
|
+
&:has(> .uikit-toolbar-title:not([data-align-start])) {
|
|
73
|
+
&:has(> .uikit-toolbar-leading):not(:has(> .uikit-toolbar-trailing)),
|
|
74
|
+
&:has(> .uikit-toolbar-trailing):not(:has(> .uikit-toolbar-leading)) {
|
|
75
|
+
&::after {
|
|
76
|
+
flex: 1 1 0;
|
|
77
|
+
content: '';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&:not(:has(> .uikit-toolbar-leading))::after {
|
|
82
|
+
order: -1;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
63
85
|
}
|
|
64
86
|
|
|
65
87
|
.uikit-toolbar-group {
|
|
@@ -78,7 +100,7 @@
|
|
|
78
100
|
justify-content: center;
|
|
79
101
|
padding: 0 var(--uikit-toolbar-group-padding);
|
|
80
102
|
border-radius: 100px;
|
|
81
|
-
gap: 12px;
|
|
103
|
+
gap: var(--uikit-toolbar-group-gap, 12px);
|
|
82
104
|
|
|
83
105
|
&[data-prominent] {
|
|
84
106
|
--uikit-toolbar-content: var(--uikit-glass-content-prominent);
|
|
@@ -111,13 +133,8 @@
|
|
|
111
133
|
letter-spacing: 0;
|
|
112
134
|
line-height: 20px;
|
|
113
135
|
scale: var(--uikit-toolbar-content-scale, none);
|
|
114
|
-
|
|
115
|
-
stroke-linejoin: round;
|
|
116
|
-
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
117
|
-
transition-duration: var(--glass-ios-lens-duration);
|
|
136
|
+
transition-duration: var(--glass-ui-lens-duration);
|
|
118
137
|
transition-property: background-color, scale;
|
|
119
|
-
|
|
120
|
-
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
121
138
|
}
|
|
122
139
|
|
|
123
140
|
/* Not of a classic variant: the capsule's content colors, the selection
|
|
@@ -164,38 +181,27 @@
|
|
|
164
181
|
flex: 0 1 auto;
|
|
165
182
|
flex-direction: column;
|
|
166
183
|
align-items: center;
|
|
167
|
-
color: var(--color-
|
|
168
|
-
font-size: var(--font-
|
|
184
|
+
color: var(--color-ui-label);
|
|
185
|
+
font-size: var(--font-ui-body-size);
|
|
169
186
|
font-style: normal;
|
|
170
|
-
font-variation-settings: 'wght' var(--font-
|
|
171
|
-
font-weight: round(down, var(--font-
|
|
172
|
-
letter-spacing: var(--font-
|
|
173
|
-
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);
|
|
174
191
|
|
|
175
192
|
/* Centered without sides, too (they take the free space otherwise). */
|
|
176
193
|
margin-inline: auto;
|
|
177
|
-
stroke: currentcolor;
|
|
178
|
-
stroke-linejoin: round;
|
|
179
|
-
stroke-width: max(
|
|
180
|
-
0px,
|
|
181
|
-
(var(--font-ios-body-weight-emphasized) - 400) / 326 * 1px
|
|
182
|
-
);
|
|
183
194
|
text-align: center;
|
|
184
195
|
white-space: nowrap;
|
|
185
196
|
|
|
186
|
-
--uikit-symbol-thinning: max(
|
|
187
|
-
0px,
|
|
188
|
-
(400 - var(--font-ios-body-weight-emphasized)) / 326 * 1px
|
|
189
|
-
);
|
|
190
|
-
|
|
191
197
|
& > * {
|
|
192
198
|
overflow: hidden;
|
|
193
199
|
max-width: 100%;
|
|
194
200
|
text-overflow: ellipsis;
|
|
195
201
|
}
|
|
196
202
|
|
|
197
|
-
/* Title and
|
|
198
|
-
|
|
203
|
+
/* Title and subtitle (its title in 17px, never smaller than the rows'
|
|
204
|
+
text). */
|
|
199
205
|
&:has(> [data-toolbar-part='subtitle']) {
|
|
200
206
|
padding-top: 4px;
|
|
201
207
|
line-height: 20px;
|
|
@@ -2,13 +2,16 @@ import '../glass/style.css';
|
|
|
2
2
|
import '../typography/style.css';
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
5
|
+
import { ReactElement } from 'react';
|
|
6
|
+
import type { TooltipHandle, TooltipPositionerProps, TooltipTriggerProps } from './props.js';
|
|
7
|
+
export type { TooltipHandle, TooltipPositionerProps, TooltipTriggerProps, } from './props.js';
|
|
8
|
+
/** `Tooltip.createHandle`, in a component: made once, for its lifetime. */
|
|
9
|
+
export declare const useCreateTooltipHandle: <Payload = unknown>() => TooltipHandle<Payload>;
|
|
11
10
|
export declare const Tooltip: {
|
|
11
|
+
Provider: (props: BaseTooltip.Provider.Props) => ReactElement;
|
|
12
|
+
Portal: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<import("@base-ui/react/tooltip").TooltipPortalProps, "ref">> & {
|
|
13
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
14
|
+
}>;
|
|
12
15
|
Trigger: import("preact").FunctionalComponent<import("react").PropsWithoutRef<TooltipTriggerProps> & {
|
|
13
16
|
ref?: import("preact").Ref<HTMLButtonElement> | undefined;
|
|
14
17
|
}>;
|
|
@@ -18,12 +21,10 @@ export declare const Tooltip: {
|
|
|
18
21
|
Popup: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<Omit<import("@base-ui/react/tooltip").TooltipPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref">> & {
|
|
19
22
|
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
20
23
|
}>;
|
|
24
|
+
createHandle: <Payload = unknown>() => TooltipHandle<Payload>;
|
|
21
25
|
Root: <Payload>(props: BaseTooltip.Root.Props<Payload>) => import("react").JSX.Element;
|
|
22
|
-
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/tooltip").TooltipPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
23
26
|
Arrow: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/tooltip").TooltipArrowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
24
|
-
Provider: import("preact").FunctionComponent<import("@base-ui/react/tooltip").TooltipProviderProps>;
|
|
25
27
|
Viewport: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/tooltip").TooltipViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
-
createHandle: typeof BaseTooltip.createHandle;
|
|
27
28
|
Handle: typeof BaseTooltip.Handle;
|
|
28
29
|
};
|
|
29
30
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAIL,YAAY,EAGb,MAAM,OAAO,CAAC;AASf,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,aAAa,EACb,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AA2FpB,2EAA2E;AAC3E,eAAO,MAAM,sBAAsB,GACjC,OAAO,GAAG,OAAO,OACd,aAAa,CAAC,OAAO,CAGzB,CAAC;AAuBF,eAAO,MAAM,OAAO;sBArGK,WAAW,CAAC,QAAQ,CAAC,KAAK,KAAG,YAAY;;;;;;;;;;;;;mBAqE5C,OAAO,iBAAgB,aAAa,CAAC,OAAO,CAAC;;;;;CAwClE,CAAC"}
|