@mrpelz/uikit-ish 0.0.0-stage → 7.8.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 +39 -0
- package/dist/components/action-sheet/main.d.ts.map +1 -0
- package/dist/components/action-sheet/main.js +35 -0
- package/dist/components/action-sheet/main.js.map +1 -0
- package/dist/components/action-sheet/props.d.ts +10 -0
- package/dist/components/action-sheet/props.d.ts.map +1 -0
- package/dist/components/action-sheet/props.js +2 -0
- package/dist/components/action-sheet/props.js.map +1 -0
- package/dist/components/action-sheet/style.css +8 -0
- package/dist/components/activity-view/main.d.ts +45 -0
- package/dist/components/activity-view/main.d.ts.map +1 -0
- package/dist/components/activity-view/main.js +64 -0
- package/dist/components/activity-view/main.js.map +1 -0
- package/dist/components/activity-view/props.d.ts +12 -0
- package/dist/components/activity-view/props.d.ts.map +1 -0
- package/dist/components/activity-view/props.js +2 -0
- package/dist/components/activity-view/props.js.map +1 -0
- package/dist/components/activity-view/style.css +209 -0
- package/dist/components/alert/main.d.ts +53 -0
- package/dist/components/alert/main.d.ts.map +1 -0
- package/dist/components/alert/main.js +57 -0
- package/dist/components/alert/main.js.map +1 -0
- package/dist/components/alert/props.d.ts +18 -0
- package/dist/components/alert/props.d.ts.map +1 -0
- package/dist/components/alert/props.js +2 -0
- package/dist/components/alert/props.js.map +1 -0
- package/dist/components/alert/style.css +205 -0
- package/dist/components/avatar/main.d.ts +20 -0
- package/dist/components/avatar/main.d.ts.map +1 -0
- package/dist/components/avatar/main.js +42 -0
- package/dist/components/avatar/main.js.map +1 -0
- package/dist/components/avatar/props.d.ts +18 -0
- package/dist/components/avatar/props.d.ts.map +1 -0
- package/dist/components/avatar/props.js +2 -0
- package/dist/components/avatar/props.js.map +1 -0
- package/dist/components/avatar/style.css +83 -0
- package/dist/components/badge/main.d.ts +12 -0
- package/dist/components/badge/main.d.ts.map +1 -0
- package/dist/components/badge/main.js +33 -0
- package/dist/components/badge/main.js.map +1 -0
- package/dist/components/badge/props.d.ts +20 -0
- package/dist/components/badge/props.d.ts.map +1 -0
- package/dist/components/badge/props.js +2 -0
- package/dist/components/badge/props.js.map +1 -0
- package/dist/components/badge/style.css +71 -0
- package/dist/components/button/main.d.ts +16 -0
- package/dist/components/button/main.d.ts.map +1 -0
- package/dist/components/button/main.js +64 -0
- package/dist/components/button/main.js.map +1 -0
- package/dist/components/button/props.d.ts +45 -0
- package/dist/components/button/props.d.ts.map +1 -0
- package/dist/components/button/props.js +2 -0
- package/dist/components/button/props.js.map +1 -0
- package/dist/components/button/style.css +338 -0
- package/dist/components/checkbox/main.d.ts +23 -0
- package/dist/components/checkbox/main.d.ts.map +1 -0
- package/dist/components/checkbox/main.js +43 -0
- package/dist/components/checkbox/main.js.map +1 -0
- package/dist/components/checkbox/props.d.ts +14 -0
- package/dist/components/checkbox/props.d.ts.map +1 -0
- package/dist/components/checkbox/props.js +2 -0
- package/dist/components/checkbox/props.js.map +1 -0
- package/dist/components/checkbox/style.css +73 -0
- package/dist/components/color-picker/main.d.ts +31 -0
- package/dist/components/color-picker/main.d.ts.map +1 -0
- package/dist/components/color-picker/main.js +356 -0
- package/dist/components/color-picker/main.js.map +1 -0
- package/dist/components/color-picker/props.d.ts +61 -0
- package/dist/components/color-picker/props.d.ts.map +1 -0
- package/dist/components/color-picker/props.js +2 -0
- package/dist/components/color-picker/props.js.map +1 -0
- package/dist/components/color-picker/style.css +374 -0
- package/dist/components/contextual-menu/main.d.ts +84 -0
- package/dist/components/contextual-menu/main.d.ts.map +1 -0
- package/dist/components/contextual-menu/main.js +255 -0
- package/dist/components/contextual-menu/main.js.map +1 -0
- package/dist/components/contextual-menu/props.d.ts +44 -0
- package/dist/components/contextual-menu/props.d.ts.map +1 -0
- package/dist/components/contextual-menu/props.js +2 -0
- package/dist/components/contextual-menu/props.js.map +1 -0
- package/dist/components/contextual-menu/style.css +80 -0
- package/dist/components/date-picker/main.d.ts +57 -0
- package/dist/components/date-picker/main.d.ts.map +1 -0
- package/dist/components/date-picker/main.js +770 -0
- package/dist/components/date-picker/main.js.map +1 -0
- package/dist/components/date-picker/props.d.ts +220 -0
- package/dist/components/date-picker/props.d.ts.map +1 -0
- package/dist/components/date-picker/props.js +2 -0
- package/dist/components/date-picker/props.js.map +1 -0
- package/dist/components/date-picker/style.css +446 -0
- package/dist/components/edit-menu/main.d.ts +71 -0
- package/dist/components/edit-menu/main.d.ts.map +1 -0
- package/dist/components/edit-menu/main.js +317 -0
- package/dist/components/edit-menu/main.js.map +1 -0
- package/dist/components/edit-menu/props.d.ts +21 -0
- package/dist/components/edit-menu/props.d.ts.map +1 -0
- package/dist/components/edit-menu/props.js +2 -0
- package/dist/components/edit-menu/props.js.map +1 -0
- package/dist/components/edit-menu/style.css +189 -0
- package/dist/components/form/main.d.ts +21 -0
- package/dist/components/form/main.d.ts.map +1 -0
- package/dist/components/form/main.js +32 -0
- package/dist/components/form/main.js.map +1 -0
- package/dist/components/form/props.d.ts +4 -0
- package/dist/components/form/props.d.ts.map +1 -0
- package/dist/components/form/props.js +2 -0
- package/dist/components/form/props.js.map +1 -0
- package/dist/components/form/style.css +9 -0
- package/dist/components/glass/main.d.ts +34 -0
- package/dist/components/glass/main.d.ts.map +1 -0
- package/dist/components/glass/main.js +157 -0
- package/dist/components/glass/main.js.map +1 -0
- package/dist/components/glass/props.d.ts +22 -0
- package/dist/components/glass/props.d.ts.map +1 -0
- package/dist/components/glass/props.js +2 -0
- package/dist/components/glass/props.js.map +1 -0
- package/dist/components/glass/style.css +488 -0
- package/dist/components/header/main.d.ts +15 -0
- package/dist/components/header/main.d.ts.map +1 -0
- package/dist/components/header/main.js +78 -0
- package/dist/components/header/main.js.map +1 -0
- package/dist/components/header/props.d.ts +16 -0
- package/dist/components/header/props.d.ts.map +1 -0
- package/dist/components/header/props.js +2 -0
- package/dist/components/header/props.js.map +1 -0
- package/dist/components/header/style.css +119 -0
- package/dist/components/index.d.ts +38 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +45 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/layout/main.d.ts +15 -0
- package/dist/components/layout/main.d.ts.map +1 -0
- package/dist/components/layout/main.js +241 -0
- package/dist/components/layout/main.js.map +1 -0
- package/dist/components/layout/props.d.ts +52 -0
- package/dist/components/layout/props.d.ts.map +1 -0
- package/dist/components/layout/props.js +2 -0
- package/dist/components/layout/props.js.map +1 -0
- package/dist/components/layout/style.css +208 -0
- package/dist/components/list/main.d.ts +104 -0
- package/dist/components/list/main.d.ts.map +1 -0
- package/dist/components/list/main.js +1553 -0
- package/dist/components/list/main.js.map +1 -0
- package/dist/components/list/props.d.ts +178 -0
- package/dist/components/list/props.d.ts.map +1 -0
- package/dist/components/list/props.js +2 -0
- package/dist/components/list/props.js.map +1 -0
- package/dist/components/list/style.css +1689 -0
- package/dist/components/menu/main.d.ts +119 -0
- package/dist/components/menu/main.d.ts.map +1 -0
- package/dist/components/menu/main.js +487 -0
- package/dist/components/menu/main.js.map +1 -0
- package/dist/components/menu/props.d.ts +54 -0
- package/dist/components/menu/props.d.ts.map +1 -0
- package/dist/components/menu/props.js +2 -0
- package/dist/components/menu/props.js.map +1 -0
- package/dist/components/menu/style.css +446 -0
- package/dist/components/navigation/main.d.ts +9 -0
- package/dist/components/navigation/main.d.ts.map +1 -0
- package/dist/components/navigation/main.js +201 -0
- package/dist/components/navigation/main.js.map +1 -0
- package/dist/components/navigation/props.d.ts +16 -0
- package/dist/components/navigation/props.d.ts.map +1 -0
- package/dist/components/navigation/props.js +2 -0
- package/dist/components/navigation/props.js.map +1 -0
- package/dist/components/navigation/style.css +83 -0
- package/dist/components/page/main.d.ts +9 -0
- package/dist/components/page/main.d.ts.map +1 -0
- package/dist/components/page/main.js +20 -0
- package/dist/components/page/main.js.map +1 -0
- package/dist/components/page/props.d.ts +10 -0
- package/dist/components/page/props.d.ts.map +1 -0
- package/dist/components/page/props.js +2 -0
- package/dist/components/page/props.js.map +1 -0
- package/dist/components/page/style.css +19 -0
- package/dist/components/page-control/main.d.ts +13 -0
- package/dist/components/page-control/main.d.ts.map +1 -0
- package/dist/components/page-control/main.js +138 -0
- package/dist/components/page-control/main.js.map +1 -0
- package/dist/components/page-control/props.d.ts +36 -0
- package/dist/components/page-control/props.d.ts.map +1 -0
- package/dist/components/page-control/props.js +2 -0
- package/dist/components/page-control/props.js.map +1 -0
- package/dist/components/page-control/style.css +111 -0
- package/dist/components/popover/main.d.ts +34 -0
- package/dist/components/popover/main.d.ts.map +1 -0
- package/dist/components/popover/main.js +232 -0
- package/dist/components/popover/main.js.map +1 -0
- package/dist/components/popover/props.d.ts +23 -0
- package/dist/components/popover/props.d.ts.map +1 -0
- package/dist/components/popover/props.js +2 -0
- package/dist/components/popover/props.js.map +1 -0
- package/dist/components/popover/style.css +160 -0
- package/dist/components/progress/main.d.ts +31 -0
- package/dist/components/progress/main.d.ts.map +1 -0
- package/dist/components/progress/main.js +77 -0
- package/dist/components/progress/main.js.map +1 -0
- package/dist/components/progress/props.d.ts +56 -0
- package/dist/components/progress/props.d.ts.map +1 -0
- package/dist/components/progress/props.js +2 -0
- package/dist/components/progress/props.js.map +1 -0
- package/dist/components/progress/style.css +264 -0
- package/dist/components/roll/main.d.ts +18 -0
- package/dist/components/roll/main.d.ts.map +1 -0
- package/dist/components/roll/main.js +463 -0
- package/dist/components/roll/main.js.map +1 -0
- package/dist/components/roll/props.d.ts +58 -0
- package/dist/components/roll/props.d.ts.map +1 -0
- package/dist/components/roll/props.js +2 -0
- package/dist/components/roll/props.js.map +1 -0
- package/dist/components/roll/style.css +173 -0
- package/dist/components/segmented/main.d.ts +17 -0
- package/dist/components/segmented/main.d.ts.map +1 -0
- package/dist/components/segmented/main.js +151 -0
- package/dist/components/segmented/main.js.map +1 -0
- package/dist/components/segmented/props.d.ts +16 -0
- package/dist/components/segmented/props.d.ts.map +1 -0
- package/dist/components/segmented/props.js +2 -0
- package/dist/components/segmented/props.js.map +1 -0
- package/dist/components/segmented/style.css +428 -0
- package/dist/components/sheet/main.d.ts +32 -0
- package/dist/components/sheet/main.d.ts.map +1 -0
- package/dist/components/sheet/main.js +101 -0
- package/dist/components/sheet/main.js.map +1 -0
- package/dist/components/sheet/props.d.ts +11 -0
- package/dist/components/sheet/props.d.ts.map +1 -0
- package/dist/components/sheet/props.js +2 -0
- package/dist/components/sheet/props.js.map +1 -0
- package/dist/components/sheet/style.css +125 -0
- package/dist/components/sidebar/main.d.ts +15 -0
- package/dist/components/sidebar/main.d.ts.map +1 -0
- package/dist/components/sidebar/main.js +42 -0
- package/dist/components/sidebar/main.js.map +1 -0
- package/dist/components/sidebar/props.d.ts +5 -0
- package/dist/components/sidebar/props.d.ts.map +1 -0
- package/dist/components/sidebar/props.js +2 -0
- package/dist/components/sidebar/props.js.map +1 -0
- package/dist/components/sidebar/style.css +94 -0
- package/dist/components/slider/main.d.ts +35 -0
- package/dist/components/slider/main.d.ts.map +1 -0
- package/dist/components/slider/main.js +153 -0
- package/dist/components/slider/main.js.map +1 -0
- package/dist/components/slider/props.d.ts +56 -0
- package/dist/components/slider/props.d.ts.map +1 -0
- package/dist/components/slider/props.js +2 -0
- package/dist/components/slider/props.js.map +1 -0
- package/dist/components/slider/style.css +345 -0
- package/dist/components/stepper/main.d.ts +22 -0
- package/dist/components/stepper/main.d.ts.map +1 -0
- package/dist/components/stepper/main.js +56 -0
- package/dist/components/stepper/main.js.map +1 -0
- package/dist/components/stepper/props.d.ts +10 -0
- package/dist/components/stepper/props.d.ts.map +1 -0
- package/dist/components/stepper/props.js +2 -0
- package/dist/components/stepper/props.js.map +1 -0
- package/dist/components/stepper/style.css +115 -0
- package/dist/components/switch/main.d.ts +14 -0
- package/dist/components/switch/main.d.ts.map +1 -0
- package/dist/components/switch/main.js +143 -0
- package/dist/components/switch/main.js.map +1 -0
- package/dist/components/switch/props.d.ts +34 -0
- package/dist/components/switch/props.d.ts.map +1 -0
- package/dist/components/switch/props.js +2 -0
- package/dist/components/switch/props.js.map +1 -0
- package/dist/components/switch/style.css +168 -0
- package/dist/components/symbol/main.d.ts +8 -0
- package/dist/components/symbol/main.d.ts.map +1 -0
- package/dist/components/symbol/main.js +32 -0
- package/dist/components/symbol/main.js.map +1 -0
- package/dist/components/symbol/props.d.ts +10 -0
- package/dist/components/symbol/props.d.ts.map +1 -0
- package/dist/components/symbol/props.js +2 -0
- package/dist/components/symbol/props.js.map +1 -0
- package/dist/components/symbol/style.css +26 -0
- package/dist/components/tab-bar/main.d.ts +39 -0
- package/dist/components/tab-bar/main.d.ts.map +1 -0
- package/dist/components/tab-bar/main.js +1133 -0
- package/dist/components/tab-bar/main.js.map +1 -0
- package/dist/components/tab-bar/props.d.ts +152 -0
- package/dist/components/tab-bar/props.d.ts.map +1 -0
- package/dist/components/tab-bar/props.js +2 -0
- package/dist/components/tab-bar/props.js.map +1 -0
- package/dist/components/tab-bar/style.css +936 -0
- package/dist/components/text-field/main.d.ts +28 -0
- package/dist/components/text-field/main.d.ts.map +1 -0
- package/dist/components/text-field/main.js +105 -0
- package/dist/components/text-field/main.js.map +1 -0
- package/dist/components/text-field/props.d.ts +3 -0
- package/dist/components/text-field/props.d.ts.map +1 -0
- package/dist/components/text-field/props.js +2 -0
- package/dist/components/text-field/props.js.map +1 -0
- package/dist/components/text-field/style.css +230 -0
- package/dist/components/toolbar/main.d.ts +37 -0
- package/dist/components/toolbar/main.d.ts.map +1 -0
- package/dist/components/toolbar/main.js +142 -0
- package/dist/components/toolbar/main.js.map +1 -0
- package/dist/components/toolbar/props.d.ts +46 -0
- package/dist/components/toolbar/props.d.ts.map +1 -0
- package/dist/components/toolbar/props.js +2 -0
- package/dist/components/toolbar/props.js.map +1 -0
- package/dist/components/toolbar/style.css +210 -0
- package/dist/components/tooltip/main.d.ts +29 -0
- package/dist/components/tooltip/main.d.ts.map +1 -0
- package/dist/components/tooltip/main.js +37 -0
- package/dist/components/tooltip/main.js.map +1 -0
- package/dist/components/tooltip/props.d.ts +11 -0
- package/dist/components/tooltip/props.d.ts.map +1 -0
- package/dist/components/tooltip/props.js +2 -0
- package/dist/components/tooltip/props.js.map +1 -0
- package/dist/components/tooltip/style.css +29 -0
- package/dist/components/typography/main.d.ts +8 -0
- package/dist/components/typography/main.d.ts.map +1 -0
- package/dist/components/typography/main.js +21 -0
- package/dist/components/typography/main.js.map +1 -0
- package/dist/components/typography/props.d.ts +35 -0
- package/dist/components/typography/props.d.ts.map +1 -0
- package/dist/components/typography/props.js +2 -0
- package/dist/components/typography/props.js.map +1 -0
- package/dist/components/typography/style.css +719 -0
- package/dist/components/utils/main.d.ts +114 -0
- package/dist/components/utils/main.d.ts.map +1 -0
- package/dist/components/utils/main.js +431 -0
- package/dist/components/utils/main.js.map +1 -0
- package/dist/components/utils/props.d.ts +52 -0
- package/dist/components/utils/props.d.ts.map +1 -0
- package/dist/components/utils/props.js +2 -0
- package/dist/components/utils/props.js.map +1 -0
- package/dist/components/utils/style.css +77 -0
- package/dist/components/viewport/main.d.ts +32 -0
- package/dist/components/viewport/main.d.ts.map +1 -0
- package/dist/components/viewport/main.js +197 -0
- package/dist/components/viewport/main.js.map +1 -0
- package/dist/components/viewport/props.d.ts +71 -0
- package/dist/components/viewport/props.d.ts.map +1 -0
- package/dist/components/viewport/props.js +2 -0
- package/dist/components/viewport/props.js.map +1 -0
- package/dist/components/viewport/style.css +112 -0
- package/dist/main.d.ts +4 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +3 -0
- package/dist/main.js.map +1 -0
- package/dist/styles.css +567 -0
- package/dist/styles.d.ts +25 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +39 -0
- package/dist/styles.js.map +1 -0
- package/package.json +55 -4
- package/README.md +0 -3
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import '../tooltip/style.css';
|
|
3
|
+
import '../glass/style.css';
|
|
4
|
+
import './style.css';
|
|
5
|
+
import { Progress as BaseProgress } from '@base-ui/react/progress';
|
|
6
|
+
import { createContext, forwardRef, useContext, useLayoutEffect, useState, } from 'react';
|
|
7
|
+
import { cn, withStyle } from '../utils/main.js';
|
|
8
|
+
// Source: Apple iOS 26 Figma (“Progress Indicators”):
|
|
9
|
+
// - Progress bar (UIKit `UIProgressView`): a track 6px high, rounded, in
|
|
10
|
+
// the system fill, filled from its start in the tint (system blue); at 0%
|
|
11
|
+
// a 6px dot (Figma's fills between are hand-placed, near linear: linear).
|
|
12
|
+
// - Progress indicator (UIKit `UIActivityIndicatorView`): 8 spokes around
|
|
13
|
+
// its center (Regular: 30px, spokes 4×10px; Small: 22px, 3×7px),
|
|
14
|
+
// rounded, in the secondary label color, at 100% at its top, then
|
|
15
|
+
// counterclockwise at 87%, 75%, 63%, 51%, 39%, 27% and 15%, spinning
|
|
16
|
+
// clockwise a spoke at a time (once a second; also smoothly, or its
|
|
17
|
+
// spokes in place, fading in turn: `movement`); optionally with a Body
|
|
18
|
+
// label in the secondary label color, 8px after it (Small: 4px).
|
|
19
|
+
//
|
|
20
|
+
// Deviations:
|
|
21
|
+
// - The bar fills its container, at least 280px long (as a slider's
|
|
22
|
+
// control; Figma: 370px in a 402px frame).
|
|
23
|
+
// - The bar's label and value (Base UI's; Figma has none), in Subheadline,
|
|
24
|
+
// in the secondary label color: above its track (by default, at its start
|
|
25
|
+
// and end), below it, before or after it (`placement`); the value also in
|
|
26
|
+
// a tooltip (see `Tooltip`) centered on the fill's end: always, or while
|
|
27
|
+
// the bar is hovered or focused by keyboard (it's focusable then).
|
|
28
|
+
// - Indeterminate (Base UI's `value` null), a bar's fill slides along its
|
|
29
|
+
// track (UIKit has none: use an `ActivityIndicator`).
|
|
30
|
+
// Registers a momentary tooltip (see `Value`), which makes the bar
|
|
31
|
+
// focusable.
|
|
32
|
+
const RootContext = createContext(undefined);
|
|
33
|
+
/** A progress bar (UIKit `UIProgressView`), its parts Base UI's. */
|
|
34
|
+
const Root = forwardRef(({ className, style, tabIndex, tint, ...props }, ref) => {
|
|
35
|
+
const [momentary, setMomentary] = useState(false);
|
|
36
|
+
return (_jsx(RootContext.Provider, { value: setMomentary, children: _jsx(BaseProgress.Root, { ref: ref, style: withStyle({ '--uikit-progress-tint': tint }, style), tabIndex: tabIndex ?? (momentary ? 0 : undefined), ...props, className: cn('uikit-progress-root', className), "data-progress-part": "root" }) }));
|
|
37
|
+
});
|
|
38
|
+
const Track = forwardRef(({ className, ...props }, ref) => (_jsx(BaseProgress.Track, { ref: ref, "data-progress-part": "track", ...props, className: cn('uikit-progress-track', className) })));
|
|
39
|
+
const Indicator = forwardRef(({ className, ...props }, ref) => (_jsx(BaseProgress.Indicator, { ref: ref, className: cn('uikit-progress-indicator', className), "data-progress-part": "indicator", ...props })));
|
|
40
|
+
const Label = forwardRef(({ className, placement = 'block-start', ...props }, ref) => (_jsx(BaseProgress.Label, { ref: ref, "data-progress-placement": placement, ...props, className: cn('uikit-progress-label', className), "data-progress-part": "label" })));
|
|
41
|
+
const Value = forwardRef(({ className, placement = 'block-start', ...props }, ref) => {
|
|
42
|
+
const setMomentary = useContext(RootContext);
|
|
43
|
+
const momentary = placement === 'momentary-tooltip';
|
|
44
|
+
useLayoutEffect(() => {
|
|
45
|
+
if (!momentary)
|
|
46
|
+
return undefined;
|
|
47
|
+
setMomentary?.(true);
|
|
48
|
+
return () => setMomentary?.(false);
|
|
49
|
+
}, [momentary, setMomentary]);
|
|
50
|
+
return (_jsx(BaseProgress.Value, { ref: ref, "data-progress-part": "value", "data-progress-placement": placement, className: cn('uikit-progress-value', placement === 'tooltip' || momentary
|
|
51
|
+
? cn('uikit-tooltip-surface uikit-glass-medium', className)
|
|
52
|
+
: className), ...props }));
|
|
53
|
+
});
|
|
54
|
+
export const Progress = {
|
|
55
|
+
...BaseProgress,
|
|
56
|
+
Root,
|
|
57
|
+
Track,
|
|
58
|
+
Indicator,
|
|
59
|
+
Label,
|
|
60
|
+
Value,
|
|
61
|
+
};
|
|
62
|
+
// The spokes' opacities, clockwise from the top.
|
|
63
|
+
const spokes = [1, 0.15, 0.27, 0.39, 0.51, 0.63, 0.75, 0.87];
|
|
64
|
+
/**
|
|
65
|
+
* An activity indicator (UIKit `UIActivityIndicatorView`, Figma “Progress
|
|
66
|
+
* indicator”): spinning spokes, for progress of unknown length (an
|
|
67
|
+
* indeterminate Base UI `Progress.Root`); optionally labeled.
|
|
68
|
+
*/
|
|
69
|
+
export const ActivityIndicator = forwardRef(({ className, animating = true, children, color, duration, movement = 'stepped', size = 'regular', style, ...props }, ref) => (_jsxs(BaseProgress.Root, { ref: ref, "data-movement": movement, "data-size": size, "data-stopped": animating ? undefined : '', value: null, style: withStyle({
|
|
70
|
+
'--uikit-progress-activity-color': color,
|
|
71
|
+
'--uikit-progress-activity-duration': duration === undefined ? undefined : `${String(duration)}s`,
|
|
72
|
+
}, style), ...props, className: cn('uikit-progress-activity-indicator', className), "data-progress-part": "activity-indicator", children: [_jsx("span", { "aria-hidden": "true", className: "uikit-progress-spinner", "data-progress-part": "spinner", children: spokes.map((opacity, index) => (_jsx("span", { style: {
|
|
73
|
+
'--uikit-progress-activity-phase': String(((spokes.length - index) % spokes.length) / spokes.length),
|
|
74
|
+
opacity,
|
|
75
|
+
rotate: `${String(index * 45)}deg`,
|
|
76
|
+
} }, index))) }), children === undefined ? null : (_jsx(BaseProgress.Label, { children: children }))] })));
|
|
77
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/progress/main.tsx"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAEL,aAAa,EAEb,UAAU,EACV,UAAU,EACV,eAAe,EACf,QAAQ,GACT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,EAAE,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AAM,EAClB,SAAS,EAAC,wBAAwB,wBACf,SAAS,YAE3B,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,CAC9B,eAEE,KAAK,EACH;oBACE,iCAAiC,EAAE,MAAM,CACvC,CAAC,CAAC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAC1D;oBACD,OAAO;oBACP,MAAM,EAAE,GAAG,MAAM,CAAC,KAAK,GAAG,EAAE,CAAC,KAAK;iBAClB,IARf,KAAK,CAUV,CACH,CAAC,GACG,EACN,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/B,KAAC,YAAY,CAAC,KAAK,cAAE,QAAQ,GAAsB,CACpD,IACiB,CACrB,CACF,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Progress as BaseProgress } from '@base-ui/react/progress';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type ProgressRootProps = Omit<BaseProgress.Root.Props, 'ref'> & {
|
|
4
|
+
/**
|
|
5
|
+
* The fill's color.
|
|
6
|
+
* @default system blue
|
|
7
|
+
*/
|
|
8
|
+
tint?: string;
|
|
9
|
+
};
|
|
10
|
+
/** Where a label or value is (see `Root`). */
|
|
11
|
+
export type ProgressPlacement = 'block-end' | 'block-start' | 'inline-end' | 'inline-start';
|
|
12
|
+
export type ProgressLabelProps = Omit<BaseProgress.Label.Props, 'ref'> & {
|
|
13
|
+
/** @default 'block-start' */
|
|
14
|
+
placement?: ProgressPlacement;
|
|
15
|
+
};
|
|
16
|
+
export type ProgressValueProps = Omit<BaseProgress.Value.Props, 'ref'> & {
|
|
17
|
+
/**
|
|
18
|
+
* Placed (see `ProgressPlacement`), or in a tooltip at the fill's end:
|
|
19
|
+
* always, or momentary (while the bar is hovered or focused by keyboard;
|
|
20
|
+
* it's focusable then).
|
|
21
|
+
* @default 'block-start'
|
|
22
|
+
*/
|
|
23
|
+
placement?: ProgressPlacement | 'momentary-tooltip' | 'tooltip';
|
|
24
|
+
};
|
|
25
|
+
export type ActivityIndicatorMovement = 'fade' | 'rotate' | 'stepped';
|
|
26
|
+
export type ActivityIndicatorProps = Omit<BaseProgress.Root.Props, 'children' | 'ref' | 'value'> & {
|
|
27
|
+
/**
|
|
28
|
+
* Spinning (UIKit `startAnimating`, `stopAnimating`); stopped, it rests.
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
animating?: boolean;
|
|
32
|
+
/** A label after it (Figma “Label”). */
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* The spokes' color (UIKit `color`).
|
|
36
|
+
* @default the secondary label color
|
|
37
|
+
*/
|
|
38
|
+
color?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Seconds a turn takes (its speed).
|
|
41
|
+
* @default 1
|
|
42
|
+
*/
|
|
43
|
+
duration?: number;
|
|
44
|
+
/**
|
|
45
|
+
* How it spins: a spoke at a time (as UIKit), smoothly, or its spokes
|
|
46
|
+
* staying in place, fading in turn.
|
|
47
|
+
* @default 'stepped'
|
|
48
|
+
*/
|
|
49
|
+
movement?: ActivityIndicatorMovement;
|
|
50
|
+
/**
|
|
51
|
+
* Figma “Size” (Regular: 30px, Small: 22px).
|
|
52
|
+
* @default 'regular'
|
|
53
|
+
*/
|
|
54
|
+
size?: 'regular' | 'small';
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/progress/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,iBAAiB,GAAG,IAAI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
|
|
1
|
+
/* Progress (see main.tsx). */
|
|
2
|
+
@layer uikit-ish {
|
|
3
|
+
.uikit-progress-root {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
width: 100%;
|
|
7
|
+
min-width: 0;
|
|
8
|
+
flex-wrap: wrap;
|
|
9
|
+
align-items: center;
|
|
10
|
+
anchor-scope: --uikit-progress-fill;
|
|
11
|
+
color: var(--color-ios-secondary-label);
|
|
12
|
+
font-size: var(--font-ios-subheadline-size);
|
|
13
|
+
font-style: normal;
|
|
14
|
+
font-variation-settings: 'wght' var(--font-ios-subheadline-weight);
|
|
15
|
+
font-weight: round(down, var(--font-ios-subheadline-weight), 100);
|
|
16
|
+
gap: 6px 8px;
|
|
17
|
+
letter-spacing: var(--font-ios-subheadline-tracking);
|
|
18
|
+
line-height: var(--font-ios-subheadline-line-height);
|
|
19
|
+
stroke: currentcolor;
|
|
20
|
+
stroke-linejoin: round;
|
|
21
|
+
stroke-width: max(
|
|
22
|
+
0px,
|
|
23
|
+
(var(--font-ios-subheadline-weight) - 400) / 326 * 1px
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
--uikit-symbol-thinning: max(
|
|
27
|
+
0px,
|
|
28
|
+
(400 - var(--font-ios-subheadline-weight)) / 326 * 1px
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
/* Its label and value (see Label, Value): above the track (by default;
|
|
32
|
+
on a line of their own, the label at its start, the value at its end),
|
|
33
|
+
below it, or before or after it. */
|
|
34
|
+
& > [data-progress-placement='block-start'] {
|
|
35
|
+
order: -3;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
& > [data-progress-placement='inline-start'] {
|
|
39
|
+
order: -1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& > [data-progress-placement='inline-end'] {
|
|
43
|
+
order: 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
& > [data-progress-placement='block-end'] {
|
|
47
|
+
order: 3;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&
|
|
51
|
+
> [data-progress-placement='block-start']
|
|
52
|
+
+ [data-progress-placement='block-start'],
|
|
53
|
+
&
|
|
54
|
+
> [data-progress-placement='block-end']
|
|
55
|
+
+ [data-progress-placement='block-end'] {
|
|
56
|
+
margin-inline-start: auto;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:has(> [data-progress-placement='block-start'])::before {
|
|
60
|
+
flex-basis: 100%;
|
|
61
|
+
order: -2;
|
|
62
|
+
content: '';
|
|
63
|
+
margin-block-end: -6px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* Focused by keyboard (with a momentary tooltip, see Value): a ring in
|
|
67
|
+
the tint around the track, its tooltip shown. */
|
|
68
|
+
&:focus-visible {
|
|
69
|
+
outline: none;
|
|
70
|
+
|
|
71
|
+
& > [data-progress-placement='momentary-tooltip'] {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
scale: 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
& > [data-progress-part='track'] {
|
|
77
|
+
outline: 2px solid
|
|
78
|
+
var(--uikit-progress-tint, var(--color-ios-system-blue));
|
|
79
|
+
outline-offset: 2px;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:has(> [data-progress-placement='block-end']) {
|
|
84
|
+
&::after {
|
|
85
|
+
flex-basis: 100%;
|
|
86
|
+
order: 2;
|
|
87
|
+
content: '';
|
|
88
|
+
margin-block-end: -6px;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.uikit-progress-track {
|
|
94
|
+
position: relative;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
min-width: var(--uikit-progress-min-length, 280px);
|
|
97
|
+
height: 6px;
|
|
98
|
+
flex: 1 1 0;
|
|
99
|
+
border-radius: 3px;
|
|
100
|
+
background-color: var(--color-ios-system-fill);
|
|
101
|
+
container-type: inline-size;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.uikit-progress-label {
|
|
105
|
+
min-width: 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.uikit-progress-value {
|
|
109
|
+
font-variant-numeric: tabular-nums;
|
|
110
|
+
text-align: end;
|
|
111
|
+
|
|
112
|
+
/* In a tooltip (see Tooltip) centered on the fill's end, 8px above it. */
|
|
113
|
+
&[data-progress-placement='tooltip'],
|
|
114
|
+
&[data-progress-placement='momentary-tooltip'] {
|
|
115
|
+
position: absolute;
|
|
116
|
+
z-index: 1;
|
|
117
|
+
bottom: calc(anchor(top) + 8px);
|
|
118
|
+
left: anchor(right);
|
|
119
|
+
position-anchor: --uikit-progress-fill;
|
|
120
|
+
translate: -50% 0;
|
|
121
|
+
white-space: nowrap;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Momentary: shown while the bar is hovered (or focused by keyboard, see
|
|
125
|
+
Root). */
|
|
126
|
+
&[data-progress-placement='momentary-tooltip'] {
|
|
127
|
+
opacity: 0;
|
|
128
|
+
scale: 0.85;
|
|
129
|
+
transition-duration: 150ms;
|
|
130
|
+
transition-property: opacity, scale;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[role='progressbar']:hover
|
|
134
|
+
> &[data-progress-placement='momentary-tooltip'] {
|
|
135
|
+
opacity: 1;
|
|
136
|
+
scale: 1;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.uikit-progress-activity-indicator {
|
|
141
|
+
--uikit-progress-activity-size: 30px;
|
|
142
|
+
--uikit-progress-activity-spoke-width: 4px;
|
|
143
|
+
--uikit-progress-activity-spoke-length: 10px;
|
|
144
|
+
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
color: var(--color-ios-secondary-label);
|
|
148
|
+
font-size: var(--font-ios-body-size);
|
|
149
|
+
font-style: normal;
|
|
150
|
+
font-variation-settings: 'wght' var(--font-ios-body-weight);
|
|
151
|
+
font-weight: round(down, var(--font-ios-body-weight), 100);
|
|
152
|
+
gap: 8px;
|
|
153
|
+
letter-spacing: var(--font-ios-body-tracking);
|
|
154
|
+
line-height: var(--font-ios-body-line-height);
|
|
155
|
+
stroke: currentcolor;
|
|
156
|
+
stroke-linejoin: round;
|
|
157
|
+
stroke-width: max(0px, (var(--font-ios-body-weight) - 400) / 326 * 1px);
|
|
158
|
+
vertical-align: middle;
|
|
159
|
+
|
|
160
|
+
--uikit-symbol-thinning: max(
|
|
161
|
+
0px,
|
|
162
|
+
(400 - var(--font-ios-body-weight)) / 326 * 1px
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
&[data-size='small'] {
|
|
166
|
+
--uikit-progress-activity-size: 22px;
|
|
167
|
+
--uikit-progress-activity-spoke-width: 3px;
|
|
168
|
+
--uikit-progress-activity-spoke-length: 7px;
|
|
169
|
+
|
|
170
|
+
gap: 4px;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@keyframes uikit-progress-slide {
|
|
175
|
+
from {
|
|
176
|
+
translate: -100% 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
to {
|
|
180
|
+
translate: 100cqw 0;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* A spoke at a time, clockwise. */
|
|
185
|
+
@keyframes uikit-progress-spin {
|
|
186
|
+
to {
|
|
187
|
+
rotate: 1turn;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/* Fading: each spoke from the brightest to the faintest, a turn long. */
|
|
192
|
+
@keyframes uikit-progress-fade {
|
|
193
|
+
from {
|
|
194
|
+
opacity: 1;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
to {
|
|
198
|
+
opacity: 0.15;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.uikit-progress-indicator {
|
|
203
|
+
display: block;
|
|
204
|
+
min-width: 6px;
|
|
205
|
+
height: 100%;
|
|
206
|
+
border-radius: 3px;
|
|
207
|
+
anchor-name: --uikit-progress-fill;
|
|
208
|
+
background-color: var(--uikit-progress-tint, var(--color-ios-system-blue));
|
|
209
|
+
transition: width 200ms;
|
|
210
|
+
|
|
211
|
+
[data-indeterminate] > & {
|
|
212
|
+
width: 30%;
|
|
213
|
+
animation: uikit-progress-slide 1.2s ease-in-out infinite;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
@media (prefers-reduced-motion: reduce) {
|
|
217
|
+
transition: none;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.uikit-progress-spinner {
|
|
222
|
+
position: relative;
|
|
223
|
+
width: var(--uikit-progress-activity-size);
|
|
224
|
+
height: var(--uikit-progress-activity-size);
|
|
225
|
+
flex: none;
|
|
226
|
+
animation: uikit-progress-spin var(--uikit-progress-activity-duration, 1s)
|
|
227
|
+
steps(8) infinite;
|
|
228
|
+
|
|
229
|
+
& > span {
|
|
230
|
+
position: absolute;
|
|
231
|
+
top: 0;
|
|
232
|
+
left: calc(50% - var(--uikit-progress-activity-spoke-width) / 2);
|
|
233
|
+
width: var(--uikit-progress-activity-spoke-width);
|
|
234
|
+
height: var(--uikit-progress-activity-spoke-length);
|
|
235
|
+
border-radius: calc(var(--uikit-progress-activity-spoke-width) / 2);
|
|
236
|
+
background-color: var(--uikit-progress-activity-color, currentcolor);
|
|
237
|
+
transform-origin: 50% calc(var(--uikit-progress-activity-size) / 2);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
[data-movement='rotate'] > & {
|
|
241
|
+
animation-timing-function: linear;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/* Fading: the spokes in place, each as far into its fade as its opacity
|
|
245
|
+
(its phase: a share of a turn behind the brightest). */
|
|
246
|
+
[data-movement='fade'] > & {
|
|
247
|
+
animation: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
[data-movement='fade'] > & > span {
|
|
251
|
+
animation: uikit-progress-fade var(--uikit-progress-activity-duration, 1s)
|
|
252
|
+
linear infinite;
|
|
253
|
+
animation-delay: calc(
|
|
254
|
+
var(--uikit-progress-activity-duration, 1s) *
|
|
255
|
+
var(--uikit-progress-activity-phase) * -1
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
[data-stopped] > &,
|
|
260
|
+
[data-stopped] > & > span {
|
|
261
|
+
animation-play-state: paused;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import './style.css';
|
|
2
|
+
import type { RollColumnProps, RollItemProps } from './props.js';
|
|
3
|
+
export type { RollColumnProps, RollItemProps, RollValue } from './props.js';
|
|
4
|
+
export declare const Roll: {
|
|
5
|
+
Root: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("preact").HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
Column: import("preact").FunctionalComponent<import("react").PropsWithoutRef<RollColumnProps> & {
|
|
9
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
Item: import("preact").FunctionalComponent<import("react").PropsWithoutRef<RollItemProps> & {
|
|
12
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
Separator: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("preact").HTMLAttributes<HTMLDivElement>> & {
|
|
15
|
+
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/roll/main.tsx"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AAwBrB,OAAO,KAAK,EAIV,eAAe,EACf,aAAa,EAEd,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAuoB5E,eAAO,MAAM,IAAI;;;;;;;;;;;;;CAKhB,CAAC"}
|