@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
|
@@ -9,8 +9,7 @@ export type { ActionSheetActionProps, ActionSheetActionVariant, ActionSheetHandl
|
|
|
9
9
|
/** `ActionSheet.createHandle`, in a component: made once, for its lifetime. */
|
|
10
10
|
export declare const useCreateActionSheetHandle: <Payload = unknown>() => ActionSheetHandle<Payload>;
|
|
11
11
|
/**
|
|
12
|
-
* An action sheet (
|
|
13
|
-
* UI's `Popover`, modal): choices for an action, at the control that
|
|
12
|
+
* An action sheet (Base UI's `Popover`, modal): choices for an action, at the control that
|
|
14
13
|
* presented it.
|
|
15
14
|
*/
|
|
16
15
|
export declare const ActionSheet: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/action-sheet/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAIL,YAAY,EAKb,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/action-sheet/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAIL,YAAY,EAKb,MAAM,OAAO,CAAC;AAUf,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,sBAAsB,EACtB,wBAAwB,EACxB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAqMpB,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B,GACrC,OAAO,GAAG,OAAO,OACd,iBAAiB,CAAC,OAAO,CAG7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,WAAW;WAjMV,OAAO,2DAKlB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAG,YAAY;;;;;;;;;;;;;;;;;;;mBA6K3B,OAAO,iBAAgB,iBAAiB,CAAC,OAAO,CAAC;;;;;;;;;CAyBtE,CAAC"}
|
|
@@ -5,18 +5,17 @@ import '../alert/style.css';
|
|
|
5
5
|
import './style.css';
|
|
6
6
|
import { Popover as BasePopover } from '@base-ui/react/popover';
|
|
7
7
|
import { createContext, forwardRef, useContext, useMemo, useState, } from 'react';
|
|
8
|
-
import { cn, useCollision, useForwardedRef, useInitialFocus, usePortalContainer, } from '../utils/main.js';
|
|
9
|
-
//
|
|
10
|
-
//
|
|
11
|
-
//
|
|
12
|
-
// 26's: at the control that presented it (below it, above it if there's no
|
|
8
|
+
import { cn, useCollision, useForwardedRef, useGrowAvoidance, useInitialFocus, usePortalContainer, } from '../utils/main.js';
|
|
9
|
+
// An alert's panel (see `Alert`) of a title and description and its
|
|
10
|
+
// actions, stacked (secondary and destructive: on a gray fill, the label's
|
|
11
|
+
// color, red), at the control that presented it (below it, above it if there's no
|
|
13
12
|
// room; Base UI's `Popover`, positioned as a popover without an arrow,
|
|
14
13
|
// scaling in from it as menus); presented without one (e.g. by `open`), at
|
|
15
14
|
// its container's bottom, above its safe area. Modal: the page dimmed
|
|
16
|
-
// behind it
|
|
15
|
+
// behind it, dismissed by a press outside it.
|
|
17
16
|
//
|
|
18
|
-
//
|
|
19
|
-
// (see `Popover`).
|
|
17
|
+
// In a regular width, a popover (with an arrow) may suit better: the app's
|
|
18
|
+
// choice (see `Popover`).
|
|
20
19
|
// The trigger it opened from (its change's), if any (see `Popup`).
|
|
21
20
|
const ActionSheetContext = createContext(null);
|
|
22
21
|
const Root = ({ modal = true, onOpenChange, onOpenChangeComplete, ...props }) => {
|
|
@@ -63,9 +62,11 @@ const Popup = forwardRef(({ className, container: containerProp, initialFocus, .
|
|
|
63
62
|
const popupRef = useForwardedRef(ref);
|
|
64
63
|
const focus = useInitialFocus(popupRef);
|
|
65
64
|
const bottom = useMemo(() => bottomAnchor(container), [container]);
|
|
66
|
-
// Within its container (e.g. the views' frames), clear of its safe area
|
|
65
|
+
// Within its container (e.g. the views' frames), clear of its safe area;
|
|
66
|
+
// growing rather than scrolling (see `useGrowAvoidance`).
|
|
67
67
|
const collision = useCollision({});
|
|
68
|
-
|
|
68
|
+
const [grow, growRef] = useGrowAvoidance();
|
|
69
|
+
return (_jsxs(BasePopover.Portal, { className: "uikit-alert-portal", container: container, children: [_jsx(BasePopover.Backdrop, { className: "uikit-action-sheet-backdrop uikit-alert-backdrop", "data-action-sheet-part": "backdrop" }), _jsx(BasePopover.Positioner, { ref: growRef, anchor: trigger ? undefined : bottom, className: "uikit-action-sheet-positioner", ...collision, collisionAvoidance: grow, side: trigger ? 'bottom' : 'top', sideOffset: 8, children: _jsx(BasePopover.Popup, { ref: popupRef, initialFocus: initialFocus ?? focus, ...props, "data-action-sheet-part": "popup", className: cn('uikit-action-sheet-popup uikit-alert-panel uikit-glass-medium uikit-popup-transition', className) }) })] }));
|
|
69
70
|
});
|
|
70
71
|
/** Its title and description (as an alert's, see `Alert.Header`). */
|
|
71
72
|
const Header = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "data-action-sheet-part": "header", ...props, className: cn('uikit-action-sheet-header uikit-alert-header', className) })));
|
|
@@ -87,8 +88,7 @@ export const useCreateActionSheetHandle = () => {
|
|
|
87
88
|
return handle;
|
|
88
89
|
};
|
|
89
90
|
/**
|
|
90
|
-
* An action sheet (
|
|
91
|
-
* UI's `Popover`, modal): choices for an action, at the control that
|
|
91
|
+
* An action sheet (Base UI's `Popover`, modal): choices for an action, at the control that
|
|
92
92
|
* presented it.
|
|
93
93
|
*/
|
|
94
94
|
export const ActionSheet = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/action-sheet/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAEL,aAAa,EACb,UAAU,EAGV,UAAU,EACV,OAAO,EACP,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,EAAE,EACF,YAAY,EACZ,eAAe,EACf,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AK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvD,KAAC,WAAW,CAAC,KAAK,IAChB,GAAG,EAAE,GAAG,4BACe,QAAQ,kBACjB,OAAO,KACjB,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,8CAA8C,EAAE,SAAS,CAAC,GACxE,CACH,CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,YAAY,GAAG,GAAmD,EAAE,CACxE,WAAW,CAAC,YAAY,EAAW,CAAC;AAEtC,+EAA+E;AAC/E,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAEV,EAAE;IAChC,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,EAAW,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,WAAW;IACd,IAAI;IACJ,KAAK;IACL,MAAM;IACN,KAAK;IACL,WAAW;IACX,OAAO;IACP,MAAM;IACN,YAAY;CACb,CAAC"}
|
|
@@ -10,11 +10,11 @@ export type ActionSheetPopupProps = Omit<BasePopover.Popup.Props, 'ref'> & {
|
|
|
10
10
|
};
|
|
11
11
|
/** A handle linking an action sheet to its triggers outside it. */
|
|
12
12
|
export type ActionSheetHandle<Payload = unknown> = BasePopover.Handle<Payload>;
|
|
13
|
-
/**
|
|
13
|
+
/** An action's kind (no primary: an action sheet has no preferred action). */
|
|
14
14
|
export type ActionSheetActionVariant = 'destructive' | 'secondary';
|
|
15
15
|
export type ActionSheetActionProps = Omit<BasePopover.Close.Props, 'ref'> & {
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Its kind: secondary (the label's color), destructive (red).
|
|
18
18
|
* @default 'secondary'
|
|
19
19
|
*/
|
|
20
20
|
variant?: ActionSheetActionVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/action-sheet/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACzE;;;;;OAKG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;CACnD,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,iBAAiB,CAAC,OAAO,GAAG,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAE/E,
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/action-sheet/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACzE;;;;;OAKG;IACH,SAAS,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;CACnD,CAAC;AAEF,mEAAmE;AACnE,MAAM,MAAM,iBAAiB,CAAC,OAAO,GAAG,OAAO,IAAI,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAE/E,8EAA8E;AAC9E,MAAM,MAAM,wBAAwB,GAAG,aAAa,GAAG,WAAW,CAAC;AAEnE,MAAM,MAAM,sBAAsB,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IAC1E;;;OAGG;IACH,OAAO,CAAC,EAAE,wBAAwB,CAAC;CACpC,CAAC"}
|
|
@@ -4,10 +4,19 @@
|
|
|
4
4
|
/* An overlay: above the page's layers (e.g. Viewport's bars), overlays
|
|
5
5
|
among themselves in the order they open (see Menu). */
|
|
6
6
|
z-index: 100;
|
|
7
|
+
|
|
8
|
+
/* Pressed only on its popup: a press beside it (in the positioner's
|
|
9
|
+
box, but not the popup's) is outside it (Base UI's: inside the
|
|
10
|
+
positioner), closing it. */
|
|
11
|
+
pointer-events: none;
|
|
12
|
+
|
|
13
|
+
& > * {
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
}
|
|
7
16
|
}
|
|
8
17
|
|
|
9
18
|
/* Its panel: within the room for it (not its positioner's width), its
|
|
10
|
-
actions scrolling when they don't fit
|
|
19
|
+
actions scrolling when they don't fit. */
|
|
11
20
|
.uikit-action-sheet-popup.uikit-alert-panel {
|
|
12
21
|
max-width: var(--available-width);
|
|
13
22
|
max-height: var(--available-height);
|
|
@@ -2,7 +2,7 @@ import '../typography/style.css';
|
|
|
2
2
|
import './style.css';
|
|
3
3
|
export type { ActivityViewActionProps, ActivityViewPersonProps, } from './props.js';
|
|
4
4
|
/**
|
|
5
|
-
* An activity view (
|
|
5
|
+
* An activity view (a share sheet): what's
|
|
6
6
|
* shared (`Header`), people and actions (`People`, `Actions`), and more
|
|
7
7
|
* actions (a `List`), in the app's sheet or popover.
|
|
8
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/activity-view/main.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAUrB,YAAY,EACV,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/activity-view/main.tsx"],"names":[],"mappings":"AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAUrB,YAAY,EACV,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,YAAY,CAAC;AAgOpB;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBxB,CAAC"}
|
|
@@ -3,9 +3,8 @@ import '../typography/style.css';
|
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { cn } from '../utils/main.js';
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// or popover (iPad), as parts:
|
|
6
|
+
// An activity view (a share sheet), in the app's sheet (compact) or popover
|
|
7
|
+
// (a regular width), as parts:
|
|
9
8
|
// - a header (16px in, its parts 16px apart): a thumbnail (64px, its
|
|
10
9
|
// corners 16px, a 0.5px border), its title (15px, medium) and subtitle
|
|
11
10
|
// (13px, the secondary label color) 1px apart, then (12px below) e.g. a
|
|
@@ -17,12 +16,11 @@ import { cn } from '../utils/main.js';
|
|
|
17
16
|
// - separators between them (0.5px, 16px in);
|
|
18
17
|
// - its actions as a list (a `List`).
|
|
19
18
|
//
|
|
20
|
-
//
|
|
21
|
-
// - A group's name (with a count) takes one line, truncated
|
|
22
|
-
//
|
|
23
|
-
// -
|
|
24
|
-
//
|
|
25
|
-
// avatar takes a `Badge` instead.
|
|
19
|
+
// Also:
|
|
20
|
+
// - A group's name (with a count) takes one line, truncated.
|
|
21
|
+
// - The actions' symbols are light.
|
|
22
|
+
// - Apps (an app icon row, people's app badges) aren't built: an avatar
|
|
23
|
+
// takes a `Badge` instead.
|
|
26
24
|
/** Its header: a thumbnail, and its heading (title, subtitle, more). */
|
|
27
25
|
const Header = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "data-activity-view-part": "header", ...props, className: cn('uikit-activity-view-header', className) })));
|
|
28
26
|
/** What's shared (64px, its corners 16px): an image, or content. */
|
|
@@ -46,7 +44,7 @@ const Name = forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: r
|
|
|
46
44
|
* line then).
|
|
47
45
|
*/
|
|
48
46
|
const Count = forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, ...props, className: cn('uikit-activity-view-count', className), "data-activity-view-part": "count" })));
|
|
49
|
-
/** An action
|
|
47
|
+
/** An action: its `Symbol` above its `Label`. */
|
|
50
48
|
const Action = forwardRef(({ className, ...props }, ref) => (_jsx("div", { className: "uikit-activity-view-list-item", "data-activity-view-part": "list-item", role: "listitem", children: _jsx("button", { ref: ref, type: "button", ...props, "data-activity-view-part": "item", className: cn('uikit-activity-view-item uikit-activity-view-action', className) }) })));
|
|
51
49
|
/** An action's symbol (e.g. a `Symbol`) in a 70px circle on a fill. */
|
|
52
50
|
const ActionSymbol = forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, "aria-hidden": "true", ...props, className: cn('uikit-activity-view-symbol', className), "data-activity-view-part": "symbol" })));
|
|
@@ -55,7 +53,7 @@ const Label = forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref:
|
|
|
55
53
|
/** Between its sections (0.5px, 16px in). */
|
|
56
54
|
const Separator = forwardRef(({ className, ...props }, ref) => (_jsx("hr", { ref: ref, className: cn('uikit-activity-view-separator', className), "data-activity-view-part": "separator", ...props })));
|
|
57
55
|
/**
|
|
58
|
-
* An activity view (
|
|
56
|
+
* An activity view (a share sheet): what's
|
|
59
57
|
* shared (`Header`), people and actions (`People`, `Actions`), and more
|
|
60
58
|
* actions (a `List`), in the app's sheet or popover.
|
|
61
59
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/activity-view/main.tsx"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAkB,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAC;AAWtC,
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/activity-view/main.tsx"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAkB,UAAU,EAAE,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AAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,eACE,GAAG,EAAE,GAAG,iBACI,MAAM,KACd,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,4BAA4B,EAAE,SAAS,CAAC,6BAC9B,QAAQ,GAChC,CACH,CACF,CAAC;AAEF,iEAAiE;AACjE,MAAM,KAAK,GAAG,UAAU,CACtB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,eACE,GAAG,EAAE,GAAG,KACJ,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,2BAA2B,EAAE,SAAS,CAAC,6BAC7B,OAAO,GAC/B,CACH,CACF,CAAC;AAEF,6CAA6C;AAC7C,MAAM,SAAS,GAAG,UAAU,CAC1B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,aACE,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,6BACjC,WAAW,KAC/B,KAAK,GACT,CACH,CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,MAAM;IACN,SAAS;IACT,OAAO;IACP,KAAK;IACL,QAAQ;IACR,OAAO;IACP,MAAM;IACN,MAAM;IACN,IAAI;IACJ,KAAK;IACL,OAAO;IACP,MAAM;IACN,MAAM,EAAE,YAAY;IACpB,KAAK;IACL,SAAS;CACV,CAAC"}
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
.uikit-activity-view-title {
|
|
41
|
-
color: var(--color-
|
|
41
|
+
color: var(--color-ui-label);
|
|
42
42
|
font-size: 15px;
|
|
43
43
|
font-variation-settings: 'wght' 510;
|
|
44
44
|
font-weight: round(down, 510, 100);
|
|
@@ -51,23 +51,23 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.uikit-activity-view-subtitle {
|
|
54
|
-
color: var(--color-
|
|
55
|
-
font-size: var(--font-
|
|
54
|
+
color: var(--color-ui-secondary-label);
|
|
55
|
+
font-size: var(--font-ui-footnote-size);
|
|
56
56
|
font-style: normal;
|
|
57
|
-
font-variation-settings: 'wght' var(--font-
|
|
58
|
-
font-weight: round(down, var(--font-
|
|
59
|
-
letter-spacing: var(--font-
|
|
60
|
-
line-height: var(--font-
|
|
57
|
+
font-variation-settings: 'wght' var(--font-ui-footnote-weight);
|
|
58
|
+
font-weight: round(down, var(--font-ui-footnote-weight), 100);
|
|
59
|
+
letter-spacing: var(--font-ui-footnote-tracking);
|
|
60
|
+
line-height: var(--font-ui-footnote-line-height);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
63
|
.uikit-activity-view-message {
|
|
64
|
-
color: var(--color-
|
|
65
|
-
font-size: var(--font-
|
|
64
|
+
color: var(--color-ui-secondary-label);
|
|
65
|
+
font-size: var(--font-ui-footnote-size);
|
|
66
66
|
font-style: normal;
|
|
67
|
-
font-variation-settings: 'wght' var(--font-
|
|
68
|
-
font-weight: round(down, var(--font-
|
|
69
|
-
letter-spacing: var(--font-
|
|
70
|
-
line-height: var(--font-
|
|
67
|
+
font-variation-settings: 'wght' var(--font-ui-footnote-weight);
|
|
68
|
+
font-weight: round(down, var(--font-ui-footnote-weight), 100);
|
|
69
|
+
letter-spacing: var(--font-ui-footnote-tracking);
|
|
70
|
+
line-height: var(--font-ui-footnote-line-height);
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.uikit-activity-view-row {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
.uikit-activity-view-count {
|
|
101
|
-
color: var(--color-
|
|
101
|
+
color: var(--color-ui-secondary-label);
|
|
102
102
|
font-size: 12px;
|
|
103
103
|
letter-spacing: 0.06px;
|
|
104
104
|
line-height: 15px;
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
height: 0;
|
|
110
110
|
border: 0;
|
|
111
111
|
margin: 0 16px;
|
|
112
|
-
border-block-start: 0.5px solid var(--color-
|
|
112
|
+
border-block-start: 0.5px solid var(--color-ui-separator);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
/* A list item: only its button laid out (in the row). */
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
border: 0;
|
|
129
129
|
margin: 0;
|
|
130
130
|
background: none;
|
|
131
|
-
color: var(--color-
|
|
131
|
+
color: var(--color-ui-label);
|
|
132
132
|
cursor: pointer;
|
|
133
133
|
font-family: inherit;
|
|
134
134
|
gap: 5px;
|
|
@@ -144,7 +144,7 @@
|
|
|
144
144
|
width: 70px;
|
|
145
145
|
height: 70px;
|
|
146
146
|
border-radius: 50%;
|
|
147
|
-
background-color: var(--color-
|
|
147
|
+
background-color: var(--color-ui-tertiary-system-fill);
|
|
148
148
|
font-size: 25px;
|
|
149
149
|
font-variation-settings: 'wght' 300;
|
|
150
150
|
font-weight: round(down, 300, 100);
|
|
@@ -159,11 +159,11 @@
|
|
|
159
159
|
display: -webkit-box;
|
|
160
160
|
overflow: hidden;
|
|
161
161
|
-webkit-box-orient: vertical;
|
|
162
|
-
font-size: var(--font-
|
|
162
|
+
font-size: var(--font-ui-footnote-size);
|
|
163
163
|
font-style: normal;
|
|
164
|
-
font-variation-settings: 'wght' var(--font-
|
|
165
|
-
font-weight: round(down, var(--font-
|
|
166
|
-
letter-spacing: var(--font-
|
|
164
|
+
font-variation-settings: 'wght' var(--font-ui-footnote-weight);
|
|
165
|
+
font-weight: round(down, var(--font-ui-footnote-weight), 100);
|
|
166
|
+
letter-spacing: var(--font-ui-footnote-tracking);
|
|
167
167
|
-webkit-line-clamp: 2;
|
|
168
168
|
line-height: 15px;
|
|
169
169
|
}
|
|
@@ -4,7 +4,7 @@ import './style.css';
|
|
|
4
4
|
import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
5
5
|
import type { AlertActionProps, AlertActionsProps, AlertHandle, AlertPopupProps } from './props.js';
|
|
6
6
|
export type { AlertActionProps, AlertActionVariant, AlertActionsProps, AlertHandle, AlertPopupProps, } from './props.js';
|
|
7
|
-
/** Its title and description
|
|
7
|
+
/** Its title and description. */
|
|
8
8
|
export declare const AlertHeader: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("preact").HTMLAttributes<HTMLDivElement>> & {
|
|
9
9
|
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
10
10
|
}>;
|
|
@@ -14,8 +14,7 @@ export declare const AlertActions: import("preact").FunctionalComponent<import("
|
|
|
14
14
|
/** `Alert.createHandle`, in a component: made once, for its lifetime. */
|
|
15
15
|
export declare const useCreateAlertHandle: <Payload = unknown>() => AlertHandle<Payload>;
|
|
16
16
|
/**
|
|
17
|
-
* An alert (
|
|
18
|
-
* `AlertDialog`): a modal panel with a title and description, optionally
|
|
17
|
+
* An alert (Base UI's `AlertDialog`): a modal panel with a title and description, optionally
|
|
19
18
|
* text fields, and its buttons.
|
|
20
19
|
*/
|
|
21
20
|
export declare const Alert: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/alert/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAK7E,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,eAAe,GAChB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/alert/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAK7E,OAAO,KAAK,EACV,gBAAgB,EAChB,iBAAiB,EACjB,WAAW,EACX,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,WAAW,EACX,eAAe,GAChB,MAAM,YAAY,CAAC;AA8CpB,iCAAiC;AACjC,eAAO,MAAM,WAAW;;EAUvB,CAAC;AAmDF,eAAO,MAAM,YAAY;;EAWxB,CAAC;AAwBF,yEAAyE;AACzE,eAAO,MAAM,oBAAoB,GAC/B,OAAO,GAAG,OAAO,OACd,WAAW,CAAC,OAAO,CAGvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;mBAfI,OAAO,iBAAgB,WAAW,CAAC,OAAO,CAAC;;;;;;;;CA0BhE,CAAC"}
|
|
@@ -6,37 +6,35 @@ import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
|
6
6
|
import { Input as BaseInput } from '@base-ui/react/input';
|
|
7
7
|
import { forwardRef, useState } from 'react';
|
|
8
8
|
import { cn, usePortalContainer } from '../utils/main.js';
|
|
9
|
-
//
|
|
10
|
-
//
|
|
9
|
+
// Alerts (buttons side by side or stacked; also action sheets, see
|
|
10
|
+
// `ActionSheet`): a glass panel 300px wide, 14px in,
|
|
11
11
|
// its corners 34px, its parts 10px apart: its title (Headline) and
|
|
12
12
|
// description (Body), 8px in, 24px above what follows; text fields (Body,
|
|
13
13
|
// medium, 52px high, 16px in, between separators, on a gray fill with 26px
|
|
14
14
|
// corners, 19px above the buttons); capsule buttons 48px high (Body,
|
|
15
|
-
// medium):
|
|
16
|
-
//
|
|
15
|
+
// medium): secondary and destructive on a gray fill (the label's color,
|
|
16
|
+
// red), primary in the tint (white); side by side 16px apart, or stacked 10px
|
|
17
17
|
// apart (more than two, or `stacked`). Base UI's `AlertDialog`: modal, its
|
|
18
18
|
// buttons closing it.
|
|
19
19
|
//
|
|
20
|
-
//
|
|
21
|
-
// - The panel is the menus' glass (`glassMedium`, see `Menu
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// - Behind it, the page dims (black, 20%; 40% in dark mode; Figma has
|
|
26
|
-
// none); it scales in from 110% as it fades in.
|
|
20
|
+
// Also:
|
|
21
|
+
// - The panel is the menus' glass (`glassMedium`, see `Menu`: not blended
|
|
22
|
+
// with what's behind, which a popup, positioned by a transform and
|
|
23
|
+
// animated, can't be); its fills unblended, as the system fills.
|
|
24
|
+
// - Behind it, the page dims (black, 20%; 40% in dark mode); it scales in from 110% as it fades in.
|
|
27
25
|
/**
|
|
28
26
|
* The alert at the viewport's center (or its `container`'s, if that's a
|
|
29
27
|
* containing block), the page dimmed behind it, in its portal.
|
|
30
28
|
*/
|
|
31
29
|
const Popup = forwardRef(({ className, container, ...props }, ref) => (_jsxs(BaseAlertDialog.Portal, { className: "uikit-alert-portal", container: usePortalContainer(container), children: [_jsx(BaseAlertDialog.Backdrop, { className: "uikit-alert-backdrop", "data-alert-part": "backdrop" }), _jsx(BaseAlertDialog.Popup, { ref: ref, ...props, "data-alert-part": "popup", className: cn('uikit-alert-popup uikit-alert-panel uikit-glass-medium uikit-alert-centered', className) })] })));
|
|
32
|
-
/** Its title and description
|
|
30
|
+
/** Its title and description. */
|
|
33
31
|
export const AlertHeader = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "data-alert-part": "header", ...props, className: cn('uikit-alert-header', className) })));
|
|
34
32
|
const Title = forwardRef(({ className, ...props }, ref) => (_jsx(BaseAlertDialog.Title, { ref: ref, className: cn('uikit-alert-title', className), "data-alert-part": "title", ...props })));
|
|
35
33
|
const Description = forwardRef(({ className, ...props }, ref) => (_jsx(BaseAlertDialog.Description, { ref: ref, className: cn('uikit-alert-description', className), "data-alert-part": "description", ...props })));
|
|
36
34
|
// Its text fields: on a gray fill, between separators, 19px above the
|
|
37
35
|
// buttons.
|
|
38
36
|
const Fields = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('uikit-alert-fields', className), "data-alert-part": "fields", ...props })));
|
|
39
|
-
/** A text field (
|
|
37
|
+
/** A text field (Base UI's `Input`), in `Alert.Fields`. */
|
|
40
38
|
const Field = forwardRef(({ className, ...props }, ref) => (_jsx(BaseInput, { ref: ref, "data-alert-part": "field", ...props, className: cn('uikit-alert-field', className) })));
|
|
41
39
|
export const AlertActions = forwardRef(({ className, stacked, ...props }, ref) => (_jsx("div", { ref: ref, "data-alert-part": "actions", "data-stacked": stacked ? '' : undefined, ...props, className: cn('uikit-alert-actions', className) })));
|
|
42
40
|
/** A button, closing the alert. */
|
|
@@ -54,8 +52,7 @@ export const useCreateAlertHandle = () => {
|
|
|
54
52
|
return handle;
|
|
55
53
|
};
|
|
56
54
|
/**
|
|
57
|
-
* An alert (
|
|
58
|
-
* `AlertDialog`): a modal panel with a title and description, optionally
|
|
55
|
+
* An alert (Base UI's `AlertDialog`): a modal panel with a title and description, optionally
|
|
59
56
|
* text fields, and its buttons.
|
|
60
57
|
*/
|
|
61
58
|
export const Alert = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/alert/main.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,yBAAyB,CAAC;AACjC,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAkB,UAAU,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,EAAE,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAgB1D,
|
|
1
|
+
{"version":3,"file":"main.js","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AAG,UAAU,CACpC,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAEzC,cACE,GAAG,EAAE,GAAG,qBACQ,SAAS,kBACX,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,KAClC,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,GAC/C,CACH,CACF,CAAC;AAEF,mCAAmC;AACnC,MAAM,MAAM,GAAG,UAAU,CACvB,CAAC,EAAE,SAAS,EAAE,OAAO,GAAG,WAAW,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACvD,KAAC,eAAe,CAAC,KAAK,IACpB,GAAG,EAAE,GAAG,qBACQ,QAAQ,kBACV,OAAO,KACjB,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,GAC9C,CACH,CACF,CAAC;AAEF;;;;;GAKG;AACH,MAAM,YAAY,GAAG,GAA6C,EAAE,CAClE,eAAe,CAAC,YAAY,EAAW,CAAC;AAE1C,yEAAyE;AACzE,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAEV,EAAE;IAC1B,MAAM,CAAC,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,YAAY,EAAW,CAAC,CAAC;IACzD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,GAAG,eAAe;IAClB,KAAK;IACL,MAAM,EAAE,WAAW;IACnB,KAAK;IACL,WAAW;IACX,MAAM;IACN,KAAK;IACL,OAAO,EAAE,YAAY;IACrB,MAAM;IACN,YAAY;CACb,CAAC"}
|
|
@@ -12,8 +12,8 @@ export type AlertPopupProps = Omit<BaseAlertDialog.Popup.Props, 'ref'> & {
|
|
|
12
12
|
export type AlertHandle<Payload = unknown> = BaseAlertDialog.Handle<Payload>;
|
|
13
13
|
export type AlertActionsProps = ComponentProps<'div'> & {
|
|
14
14
|
/**
|
|
15
|
-
* Stacked (e.g. two long labels;
|
|
16
|
-
*
|
|
15
|
+
* Stacked (e.g. two long labels; more than two buttons stack by
|
|
16
|
+
* themselves).
|
|
17
17
|
* @default with more than two buttons, otherwise side by side
|
|
18
18
|
*/
|
|
19
19
|
stacked?: boolean;
|
|
@@ -21,7 +21,7 @@ export type AlertActionsProps = ComponentProps<'div'> & {
|
|
|
21
21
|
export type AlertActionVariant = 'destructive' | 'primary' | 'secondary';
|
|
22
22
|
export type AlertActionProps = Omit<BaseAlertDialog.Close.Props, 'ref'> & {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Its kind: primary (in the tint), secondary or destructive.
|
|
25
25
|
* @default 'secondary'
|
|
26
26
|
*/
|
|
27
27
|
variant?: AlertActionVariant;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
flex-direction: column;
|
|
17
17
|
padding: 14px;
|
|
18
18
|
border-radius: 34px;
|
|
19
|
-
color: var(--color-
|
|
19
|
+
color: var(--color-ui-label);
|
|
20
20
|
gap: 10px;
|
|
21
21
|
outline: none;
|
|
22
22
|
}
|
|
@@ -65,23 +65,23 @@
|
|
|
65
65
|
/* (Shared: action-sheet.) */
|
|
66
66
|
.uikit-alert-title {
|
|
67
67
|
margin: 0;
|
|
68
|
-
font-size: var(--font-
|
|
68
|
+
font-size: var(--font-ui-headline-size);
|
|
69
69
|
font-style: normal;
|
|
70
|
-
font-variation-settings: 'wght' var(--font-
|
|
71
|
-
font-weight: round(down, var(--font-
|
|
72
|
-
letter-spacing: var(--font-
|
|
73
|
-
line-height: var(--font-
|
|
70
|
+
font-variation-settings: 'wght' var(--font-ui-headline-weight);
|
|
71
|
+
font-weight: round(down, var(--font-ui-headline-weight), 100);
|
|
72
|
+
letter-spacing: var(--font-ui-headline-tracking);
|
|
73
|
+
line-height: var(--font-ui-headline-line-height);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/* (Shared: action-sheet.) */
|
|
77
77
|
.uikit-alert-description {
|
|
78
78
|
margin: 0;
|
|
79
|
-
font-size: var(--font-
|
|
79
|
+
font-size: var(--font-ui-body-size);
|
|
80
80
|
font-style: normal;
|
|
81
|
-
font-variation-settings: 'wght' var(--font-
|
|
82
|
-
font-weight: round(down, var(--font-
|
|
83
|
-
letter-spacing: var(--font-
|
|
84
|
-
line-height: var(--font-
|
|
81
|
+
font-variation-settings: 'wght' var(--font-ui-body-weight);
|
|
82
|
+
font-weight: round(down, var(--font-ui-body-weight), 100);
|
|
83
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
84
|
+
line-height: var(--font-ui-body-line-height);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/* (Shared: action-sheet.) */
|
|
@@ -97,26 +97,26 @@
|
|
|
97
97
|
border: 0;
|
|
98
98
|
border-radius: 100px;
|
|
99
99
|
margin: 0;
|
|
100
|
-
background-color: var(--color-
|
|
101
|
-
color: var(--color-
|
|
100
|
+
background-color: var(--color-ui-secondary-system-fill);
|
|
101
|
+
color: var(--color-ui-label);
|
|
102
102
|
cursor: pointer;
|
|
103
103
|
font-family: inherit;
|
|
104
|
-
font-size: var(--font-
|
|
104
|
+
font-size: var(--font-ui-body-size);
|
|
105
105
|
font-style: normal;
|
|
106
106
|
font-variation-settings: 'wght' 510;
|
|
107
107
|
font-weight: round(down, 510, 100);
|
|
108
|
-
letter-spacing: var(--font-
|
|
109
|
-
line-height: var(--font-
|
|
108
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
109
|
+
line-height: var(--font-ui-body-line-height);
|
|
110
110
|
outline-offset: 2px;
|
|
111
111
|
text-align: center;
|
|
112
112
|
transition: filter 150ms;
|
|
113
113
|
|
|
114
114
|
&[data-variant='destructive'] {
|
|
115
|
-
color: var(--color-
|
|
115
|
+
color: var(--color-ui-system-red);
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
&[data-variant='primary'] {
|
|
119
|
-
background-color: var(--color-
|
|
119
|
+
background-color: var(--color-ui-primary);
|
|
120
120
|
color: #fff;
|
|
121
121
|
}
|
|
122
122
|
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
&:disabled {
|
|
128
|
-
color: var(--color-
|
|
128
|
+
color: var(--color-ui-tertiary-label);
|
|
129
129
|
cursor: default;
|
|
130
130
|
filter: none;
|
|
131
131
|
}
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
display: flex;
|
|
143
143
|
flex-direction: column;
|
|
144
144
|
border-radius: 26px;
|
|
145
|
-
background-color: var(--color-
|
|
145
|
+
background-color: var(--color-ui-secondary-system-fill);
|
|
146
146
|
margin-block-end: 9px;
|
|
147
147
|
}
|
|
148
148
|
|
|
@@ -160,11 +160,11 @@
|
|
|
160
160
|
center bottom / calc(100% - 32px) 1px no-repeat;
|
|
161
161
|
color: inherit;
|
|
162
162
|
font-family: inherit;
|
|
163
|
-
font-size: var(--font-
|
|
163
|
+
font-size: var(--font-ui-body-size);
|
|
164
164
|
font-style: normal;
|
|
165
165
|
font-variation-settings: 'wght' 510;
|
|
166
166
|
font-weight: round(down, 510, 100);
|
|
167
|
-
letter-spacing: var(--font-
|
|
167
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
168
168
|
line-height: 20px;
|
|
169
169
|
outline: none;
|
|
170
170
|
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
}
|
|
174
174
|
|
|
175
175
|
&::placeholder {
|
|
176
|
-
color: var(--color-
|
|
176
|
+
color: var(--color-ui-tertiary-label);
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAMrB,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAMrB,OAAO,KAAK,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC;AAkFpB;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAMlB,CAAC"}
|
|
@@ -3,19 +3,18 @@ import './style.css';
|
|
|
3
3
|
import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
5
|
import { cn, withStyle } from '../utils/main.js';
|
|
6
|
-
//
|
|
7
|
-
//
|
|
6
|
+
// A person's photo in a circle (70px); several people (a group) in one
|
|
7
|
+
// circle on the
|
|
8
8
|
// system fill: the first 37px (of 70px) from 9px in, the second 22px, at
|
|
9
9
|
// the opposite corner. Base UI's `Avatar`: its image once loaded, otherwise
|
|
10
10
|
// its fallback.
|
|
11
11
|
//
|
|
12
|
-
//
|
|
13
|
-
// - The fallback (e.g. the person's initials, the app's) on
|
|
14
|
-
//
|
|
12
|
+
// Also:
|
|
13
|
+
// - The fallback (e.g. the person's initials, the app's) on a gray
|
|
14
|
+
// gradient, its text 40% of the avatar,
|
|
15
15
|
// semibold, white.
|
|
16
16
|
// - A third person in a group: 26% of it, at the top end.
|
|
17
|
-
// - Badges (`Badge`, a child) sit on its top end corner
|
|
18
|
-
// icon at its bottom end, which isn't built).
|
|
17
|
+
// - Badges (`Badge`, a child) sit on its top end corner.
|
|
19
18
|
/** A person's avatar (Base UI's `Avatar.Root`). */
|
|
20
19
|
const Root = forwardRef(({ className, size, style, ...props }, ref) => (_jsx(BaseAvatar.Root, { ref: ref, "data-avatar-part": "root", style: withStyle({
|
|
21
20
|
'--uikit-avatar-size': size === undefined ? undefined : `${String(size)}px`,
|
|
@@ -25,7 +24,7 @@ const Image = forwardRef((props, ref) => (_jsx(BaseAvatar.Image, { ref: ref, "da
|
|
|
25
24
|
/** Shown without an image: e.g. the person's initials (the app's). */
|
|
26
25
|
const Fallback = forwardRef(({ className, ...props }, ref) => (_jsx(BaseAvatar.Fallback, { ref: ref, "data-avatar-part": "fallback", ...props, className: cn('uikit-avatar-fallback', className) })));
|
|
27
26
|
/**
|
|
28
|
-
* Several people in one circle (
|
|
27
|
+
* Several people in one circle (a group): their `Avatar.Root`s (up to
|
|
29
28
|
* three shown); badges (`Badge`) on its corner.
|
|
30
29
|
*/
|
|
31
30
|
const Group = forwardRef(({ className, size, style, ...props }, ref) => (_jsx("span", { ref: ref, role: "group", style: withStyle({
|