@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
|
@@ -3,35 +3,64 @@ import '../glass/style.css';
|
|
|
3
3
|
import '../typography/style.css';
|
|
4
4
|
import './style.css';
|
|
5
5
|
import { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
6
|
-
import { forwardRef } from 'react';
|
|
7
|
-
import { cn, positionerSide, useForwardedRef } from '../utils/main.js';
|
|
8
|
-
//
|
|
9
|
-
// 4px corners)
|
|
6
|
+
import { createContext, forwardRef, useContext, useState, } from 'react';
|
|
7
|
+
import { cn, positionerSide, useCollision, useForwardedRef, usePortalContainer, } from '../utils/main.js';
|
|
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).
|
|
20
|
-
|
|
21
|
-
const
|
|
20
|
+
// Whether its trigger is in a `Provider` (its delay the provider's).
|
|
21
|
+
const ProvidedContext = createContext(false);
|
|
22
|
+
/** Base UI's provider: its tooltips' delays shared (see `Trigger`). */
|
|
23
|
+
const Provider = (props) => (_jsx(ProvidedContext.Provider, { value: true, children: _jsx(BaseTooltip.Provider, { ...props }) }));
|
|
24
|
+
/**
|
|
25
|
+
* Its trigger, opening it after 300ms (Base UI: 600ms) of hovering; in a
|
|
26
|
+
* `Provider`, after the provider's delay.
|
|
27
|
+
*/
|
|
28
|
+
const Trigger = forwardRef(({ delay, ...props }, ref) => {
|
|
29
|
+
const isProvided = useContext(ProvidedContext);
|
|
22
30
|
const triggerRef = useForwardedRef(ref);
|
|
23
|
-
return (_jsx(BaseTooltip.Trigger, { ref: triggerRef, delay: delay, ...props }));
|
|
31
|
+
return (_jsx(BaseTooltip.Trigger, { ref: triggerRef, delay: delay ?? (isProvided ? undefined : 300), ...props }));
|
|
24
32
|
});
|
|
25
|
-
const Positioner = forwardRef(({
|
|
33
|
+
const Positioner = forwardRef(({ className, collisionBoundary, collisionPadding, side, sideOffset = 8, ...props }, ref) => (_jsx(BaseTooltip.Positioner, { ref: ref, ...useCollision({ collisionBoundary, collisionPadding }), side: positionerSide(side), sideOffset: sideOffset, ...props, className: cn('uikit-tooltip-positioner', className) })));
|
|
26
34
|
const Popup = forwardRef(({ className, ...props }, ref) => (_jsx(BaseTooltip.Popup, { ref: ref, "data-tooltip-part": "popup", className: cn('uikit-tooltip-popup uikit-tooltip-surface uikit-glass-medium uikit-popup-transition', className), ...props })));
|
|
27
35
|
/**
|
|
28
|
-
* A
|
|
36
|
+
* A handle linking a tooltip to its triggers outside it, and opening or
|
|
37
|
+
* closing it imperatively (Base UI's `Tooltip.createHandle`): pass it to
|
|
38
|
+
* the root's and the triggers' `handle` (in a component, see
|
|
39
|
+
* `useCreateTooltipHandle`).
|
|
40
|
+
*/
|
|
41
|
+
const createHandle = () => BaseTooltip.createHandle();
|
|
42
|
+
/** `Tooltip.createHandle`, in a component: made once, for its lifetime. */
|
|
43
|
+
export const useCreateTooltipHandle = () => {
|
|
44
|
+
const [handle] = useState(() => createHandle());
|
|
45
|
+
return handle;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* A tooltip (Base UI's `Tooltip`): a short label in a
|
|
29
49
|
* glass capsule at its trigger, on hover and focus, or held open.
|
|
30
50
|
*/
|
|
51
|
+
/**
|
|
52
|
+
* Its portal (Base UI's): no box of its own (`display: contents`), so
|
|
53
|
+
* rendered into a container (e.g. a screen laid out as a flex column) it
|
|
54
|
+
* doesn't shift its content.
|
|
55
|
+
*/
|
|
56
|
+
const Portal = forwardRef(({ className, container, ...props }, ref) => (_jsx(BaseTooltip.Portal, { ref: ref, container: usePortalContainer(container), ...props, className: cn('uikit-tooltip-portal', className) })));
|
|
31
57
|
export const Tooltip = {
|
|
32
58
|
...BaseTooltip,
|
|
59
|
+
Provider,
|
|
60
|
+
Portal,
|
|
33
61
|
Trigger,
|
|
34
62
|
Positioner,
|
|
35
63
|
Popup,
|
|
64
|
+
createHandle,
|
|
36
65
|
};
|
|
37
66
|
//# sourceMappingURL=main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","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,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/tooltip/main.tsx"],"names":[],"mappings":"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"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';
|
|
2
2
|
import type { LogicalSide } from '../utils/main.js';
|
|
3
3
|
export type TooltipTriggerProps = Omit<BaseTooltip.Trigger.Props, 'ref'>;
|
|
4
|
+
/** A handle linking a tooltip to its triggers outside it. */
|
|
5
|
+
export type TooltipHandle<Payload = unknown> = BaseTooltip.Handle<Payload>;
|
|
4
6
|
export type TooltipPositionerProps = Omit<BaseTooltip.Positioner.Props, 'ref' | 'side'> & {
|
|
5
7
|
/**
|
|
6
8
|
* Its side of its anchor (logical).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAEzE,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,WAAW,CAAC,UAAU,CAAC,KAAK,EAC5B,KAAK,GAAG,MAAM,CACf,GAAG;IACF;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/tooltip/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAEzE,6DAA6D;AAC7D,MAAM,MAAM,aAAa,CAAC,OAAO,GAAG,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAE3E,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,WAAW,CAAC,UAAU,CAAC,KAAK,EAC5B,KAAK,GAAG,MAAM,CACf,GAAG;IACF;;;OAGG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,CAAC"}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
/* Tooltip (see main.tsx). */
|
|
2
2
|
@layer uikit-ish {
|
|
3
|
+
/* Its portal (see Portal): no box of its own. */
|
|
4
|
+
.uikit-tooltip-portal {
|
|
5
|
+
display: contents;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.uikit-tooltip-positioner {
|
|
9
|
+
/* An overlay: above the page's layers (e.g. Viewport's bars), overlays
|
|
10
|
+
among themselves in the order they open (see Menu). */
|
|
11
|
+
z-index: 100;
|
|
12
|
+
}
|
|
13
|
+
|
|
3
14
|
/* (Shared: page-control, progress, slider.) */
|
|
4
15
|
.uikit-tooltip-surface {
|
|
5
16
|
max-width: min(320px, calc(100vw - 16px));
|
|
@@ -7,23 +18,12 @@
|
|
|
7
18
|
padding: 6px 12px;
|
|
8
19
|
border-radius: 16px;
|
|
9
20
|
color: var(--uikit-glass-content);
|
|
10
|
-
font-size: var(--font-
|
|
21
|
+
font-size: var(--font-ui-subheadline-size);
|
|
11
22
|
font-style: normal;
|
|
12
|
-
font-variation-settings: 'wght' var(--font-
|
|
13
|
-
font-weight: round(down, var(--font-
|
|
14
|
-
letter-spacing: var(--font-
|
|
15
|
-
line-height: var(--font-
|
|
23
|
+
font-variation-settings: 'wght' var(--font-ui-subheadline-weight);
|
|
24
|
+
font-weight: round(down, var(--font-ui-subheadline-weight), 100);
|
|
25
|
+
letter-spacing: var(--font-ui-subheadline-tracking);
|
|
26
|
+
line-height: var(--font-ui-subheadline-line-height);
|
|
16
27
|
pointer-events: none;
|
|
17
|
-
stroke: currentcolor;
|
|
18
|
-
stroke-linejoin: round;
|
|
19
|
-
stroke-width: max(
|
|
20
|
-
0px,
|
|
21
|
-
(var(--font-ios-subheadline-weight) - 400) / 326 * 1px
|
|
22
|
-
);
|
|
23
|
-
|
|
24
|
-
--uikit-symbol-thinning: max(
|
|
25
|
-
0px,
|
|
26
|
-
(400 - var(--font-ios-subheadline-weight)) / 326 * 1px
|
|
27
|
-
);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './style.css';
|
|
2
2
|
import type { TypographyProps } from './props.js';
|
|
3
|
-
export type {
|
|
4
|
-
/** Text in one of the text styles
|
|
3
|
+
export type { TextSize, TextColor, TextStyle, TypographyProps, } from './props.js';
|
|
4
|
+
/** Text in one of the text styles. */
|
|
5
5
|
export declare const Typography: import("preact").FunctionalComponent<import("react").PropsWithoutRef<TypographyProps> & {
|
|
6
6
|
ref?: import("preact").Ref<HTMLElement> | undefined;
|
|
7
7
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/typography/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/typography/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAMrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EACV,QAAQ,EACR,SAAS,EACT,SAAS,EACT,eAAe,GAChB,MAAM,YAAY,CAAC;AAYpB,sCAAsC;AACtC,eAAO,MAAM,UAAU;;EA4BtB,CAAC"}
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
import './style.css';
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render';
|
|
3
3
|
import { forwardRef } from 'react';
|
|
4
|
-
import { cn
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// (Typography). The text styles' tokens (`--font-ios-*`) are declared in
|
|
4
|
+
import { cn } from '../utils/main.js';
|
|
5
|
+
// Text styles in the label colors, at each text size (the accessibility
|
|
6
|
+
// sizes too). The text styles' tokens (`--font-ui-*`) are declared in
|
|
8
7
|
// `styles.css` for the default size (Large), and per size in style.css.
|
|
9
8
|
//
|
|
10
|
-
//
|
|
11
|
-
// - Caption 1's emphasized italic is 510
|
|
12
|
-
// - Accessibility sizes have no tracking
|
|
13
|
-
// -
|
|
14
|
-
// Title
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
9
|
+
// Also:
|
|
10
|
+
// - Caption 1's emphasized italic is 510, as its emphasized.
|
|
11
|
+
// - Accessibility sizes have no tracking.
|
|
12
|
+
// - Title 2 at AX2 is 43/51 (as Title 1), Title 3 at AX4 43/51 (as at AX3),
|
|
13
|
+
// Title 2 at Medium 21/28.
|
|
14
|
+
/** Text in one of the text styles. */
|
|
15
|
+
export const Typography = forwardRef(({ className, color, textSize: size, emphasized, italic, render, textStyle, ...props }, ref) => useRender({
|
|
16
|
+
defaultTagName: 'span',
|
|
17
|
+
props: {
|
|
18
|
+
...props,
|
|
19
|
+
className: cn('uikit-typography', className),
|
|
20
|
+
'data-color': color,
|
|
21
|
+
'data-text-size': size,
|
|
22
|
+
'data-emphasized': emphasized ? '' : undefined,
|
|
23
|
+
'data-italic': italic ? '' : undefined,
|
|
24
|
+
'data-text-style': textStyle,
|
|
25
|
+
},
|
|
26
|
+
ref,
|
|
27
|
+
render,
|
|
28
|
+
}));
|
|
21
29
|
//# sourceMappingURL=main.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/typography/main.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/typography/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAUtC,wEAAwE;AACxE,sEAAsE;AACtE,wEAAwE;AACxE,EAAE;AACF,QAAQ;AACR,6DAA6D;AAC7D,0CAA0C;AAC1C,4EAA4E;AAC5E,6BAA6B;AAE7B,sCAAsC;AACtC,MAAM,CAAC,MAAM,UAAU,GAAG,UAAU,CAClC,CACE,EACE,SAAS,EACT,KAAK,EACL,QAAQ,EAAE,IAAI,EACd,UAAU,EACV,MAAM,EACN,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EACD,GAAG,EACH,EAAE,CACF,SAAS,CAAC;IACR,cAAc,EAAE,MAAM;IACtB,KAAK,EAAE;QACL,GAAG,KAAK;QACR,SAAS,EAAE,EAAE,CAAC,kBAAkB,EAAE,SAAS,CAAC;QAC5C,YAAY,EAAE,KAAK;QACnB,gBAAgB,EAAE,IAAI;QACtB,iBAAiB,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;QAC9C,aAAa,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS;QACtC,iBAAiB,EAAE,SAAS;KAC7B;IACD,GAAG;IACH,MAAM;CACP,CAAC,CACL,CAAC"}
|
|
@@ -1,35 +1,28 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
/** UIKit `UIFont.TextStyle`. */
|
|
1
|
+
import type { useRender } from '@base-ui/react/use-render';
|
|
2
|
+
/** A text style. */
|
|
4
3
|
export type TextStyle = 'body' | 'callout' | 'caption1' | 'caption2' | 'footnote' | 'headline' | 'largeTitle' | 'subheadline' | 'title1' | 'title2' | 'title3';
|
|
5
|
-
/**
|
|
6
|
-
export type
|
|
7
|
-
/** Label colors of the text styles (
|
|
4
|
+
/** A text size (the accessibility sizes too), `large` by default. */
|
|
5
|
+
export type TextSize = 'ax1' | 'ax2' | 'ax3' | 'ax4' | 'ax5' | 'large' | 'medium' | 'small' | 'xLarge' | 'xSmall' | 'xxLarge' | 'xxxLarge';
|
|
6
|
+
/** Label colors of the text styles (the four label colors). */
|
|
8
7
|
export type TextColor = 'primary' | 'quaternary' | 'secondary' | 'tertiary';
|
|
9
|
-
export type TypographyProps = ComponentProps<'span'> & {
|
|
10
|
-
/**
|
|
11
|
-
* The element to render.
|
|
12
|
-
* @default 'span'
|
|
13
|
-
*/
|
|
14
|
-
as?: keyof JSX.IntrinsicElements;
|
|
8
|
+
export type TypographyProps = useRender.ComponentProps<'span'> & {
|
|
15
9
|
/**
|
|
16
10
|
* Label color.
|
|
17
11
|
* @default inherited
|
|
18
12
|
*/
|
|
19
13
|
color?: TextColor;
|
|
14
|
+
/** The style's bold weight (emphasized). */
|
|
15
|
+
emphasized?: boolean;
|
|
16
|
+
italic?: boolean;
|
|
20
17
|
/**
|
|
21
|
-
*
|
|
18
|
+
* Text size of the text and its content.
|
|
22
19
|
* @default inherited
|
|
23
20
|
*/
|
|
24
|
-
|
|
25
|
-
/** The style's bold weight (Figma “Emphasized”). */
|
|
26
|
-
emphasized?: boolean;
|
|
27
|
-
italic?: boolean;
|
|
21
|
+
textSize?: TextSize;
|
|
28
22
|
/**
|
|
29
23
|
* The text style.
|
|
30
24
|
* @default 'body'
|
|
31
25
|
*/
|
|
32
26
|
textStyle?: TextStyle;
|
|
33
|
-
textWrap?: Properties['textWrap'];
|
|
34
27
|
};
|
|
35
28
|
//# sourceMappingURL=props.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/typography/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/typography/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,oBAAoB;AACpB,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,SAAS,GACT,UAAU,GACV,UAAU,GACV,UAAU,GACV,UAAU,GACV,YAAY,GACZ,aAAa,GACb,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb,qEAAqE;AACrE,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,OAAO,GACP,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,UAAU,CAAC;AAEf,+DAA+D;AAC/D,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,YAAY,GAAG,WAAW,GAAG,UAAU,CAAC;AAE5E,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG;IAC/D;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB,CAAC"}
|