@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 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/components/alert/props.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/* Alert (see main.tsx). */
|
|
2
|
+
@layer uikit-ish {
|
|
3
|
+
/* (Shared: action-sheet.) */
|
|
4
|
+
.uikit-alert-panel {
|
|
5
|
+
display: flex;
|
|
6
|
+
width: 300px;
|
|
7
|
+
max-width: calc(100vw - 32px);
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
padding: 14px;
|
|
11
|
+
border-radius: 34px;
|
|
12
|
+
color: var(--color-ios-label);
|
|
13
|
+
gap: 10px;
|
|
14
|
+
outline: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* (Shared: action-sheet.) */
|
|
18
|
+
.uikit-alert-backdrop {
|
|
19
|
+
--uikit-alert-dim: light-dark(rgb(0 0 0 / 20%), rgb(0 0 0 / 40%));
|
|
20
|
+
|
|
21
|
+
position: fixed;
|
|
22
|
+
background-color: var(--uikit-alert-dim);
|
|
23
|
+
inset: 0;
|
|
24
|
+
transition: opacity 300ms;
|
|
25
|
+
|
|
26
|
+
&[data-starting-style],
|
|
27
|
+
&[data-ending-style] {
|
|
28
|
+
opacity: 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* (Shared: action-sheet.) */
|
|
33
|
+
.uikit-alert-centered {
|
|
34
|
+
position: fixed;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 50%;
|
|
37
|
+
transition-duration: 300ms;
|
|
38
|
+
transition-property: opacity, scale;
|
|
39
|
+
transition-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1);
|
|
40
|
+
translate: -50% -50%;
|
|
41
|
+
|
|
42
|
+
&[data-starting-style] {
|
|
43
|
+
opacity: 0;
|
|
44
|
+
scale: 1.1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[data-ending-style] {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transition-duration: 200ms;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* (Shared: action-sheet.) */
|
|
54
|
+
.uikit-alert-title {
|
|
55
|
+
margin: 0;
|
|
56
|
+
font-size: var(--font-ios-headline-size);
|
|
57
|
+
font-style: normal;
|
|
58
|
+
font-variation-settings: 'wght' var(--font-ios-headline-weight);
|
|
59
|
+
font-weight: round(down, var(--font-ios-headline-weight), 100);
|
|
60
|
+
letter-spacing: var(--font-ios-headline-tracking);
|
|
61
|
+
line-height: var(--font-ios-headline-line-height);
|
|
62
|
+
stroke: currentcolor;
|
|
63
|
+
stroke-linejoin: round;
|
|
64
|
+
stroke-width: max(0px, (var(--font-ios-headline-weight) - 400) / 326 * 1px);
|
|
65
|
+
|
|
66
|
+
--uikit-symbol-thinning: max(
|
|
67
|
+
0px,
|
|
68
|
+
(400 - var(--font-ios-headline-weight)) / 326 * 1px
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* (Shared: action-sheet.) */
|
|
73
|
+
.uikit-alert-description {
|
|
74
|
+
margin: 0;
|
|
75
|
+
font-size: var(--font-ios-body-size);
|
|
76
|
+
font-style: normal;
|
|
77
|
+
font-variation-settings: 'wght' var(--font-ios-body-weight);
|
|
78
|
+
font-weight: round(down, var(--font-ios-body-weight), 100);
|
|
79
|
+
letter-spacing: var(--font-ios-body-tracking);
|
|
80
|
+
line-height: var(--font-ios-body-line-height);
|
|
81
|
+
stroke: currentcolor;
|
|
82
|
+
stroke-linejoin: round;
|
|
83
|
+
stroke-width: max(0px, (var(--font-ios-body-weight) - 400) / 326 * 1px);
|
|
84
|
+
|
|
85
|
+
--uikit-symbol-thinning: max(
|
|
86
|
+
0px,
|
|
87
|
+
(400 - var(--font-ios-body-weight)) / 326 * 1px
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* (Shared: action-sheet.) */
|
|
92
|
+
.uikit-alert-action {
|
|
93
|
+
display: flex;
|
|
94
|
+
min-width: 0;
|
|
95
|
+
min-height: 48px;
|
|
96
|
+
box-sizing: border-box;
|
|
97
|
+
flex: 1 1 0;
|
|
98
|
+
align-items: center;
|
|
99
|
+
justify-content: center;
|
|
100
|
+
padding: 13px 16px;
|
|
101
|
+
border: 0;
|
|
102
|
+
border-radius: 100px;
|
|
103
|
+
margin: 0;
|
|
104
|
+
background-color: var(--color-ios-secondary-system-fill);
|
|
105
|
+
color: var(--color-ios-label);
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
font-family: inherit;
|
|
108
|
+
font-size: var(--font-ios-body-size);
|
|
109
|
+
font-style: normal;
|
|
110
|
+
font-variation-settings: 'wght' 510;
|
|
111
|
+
font-weight: round(down, 510, 100);
|
|
112
|
+
letter-spacing: var(--font-ios-body-tracking);
|
|
113
|
+
line-height: var(--font-ios-body-line-height);
|
|
114
|
+
outline-offset: 2px;
|
|
115
|
+
stroke: currentcolor;
|
|
116
|
+
stroke-linejoin: round;
|
|
117
|
+
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
118
|
+
text-align: center;
|
|
119
|
+
transition: filter 150ms;
|
|
120
|
+
|
|
121
|
+
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
122
|
+
|
|
123
|
+
&[data-variant='destructive'] {
|
|
124
|
+
color: var(--color-ios-system-red);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&[data-variant='primary'] {
|
|
128
|
+
background-color: var(--color-ios-primary);
|
|
129
|
+
color: #fff;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:active {
|
|
133
|
+
filter: brightness(0.85);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:disabled {
|
|
137
|
+
color: var(--color-ios-tertiary-label);
|
|
138
|
+
cursor: default;
|
|
139
|
+
filter: none;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.uikit-alert-header {
|
|
144
|
+
display: flex;
|
|
145
|
+
flex-direction: column;
|
|
146
|
+
padding: 8px 8px 24px;
|
|
147
|
+
gap: 10px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.uikit-alert-fields {
|
|
151
|
+
display: flex;
|
|
152
|
+
flex-direction: column;
|
|
153
|
+
border-radius: 26px;
|
|
154
|
+
background-color: var(--color-ios-secondary-system-fill);
|
|
155
|
+
margin-block-end: 9px;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.uikit-alert-field {
|
|
159
|
+
min-width: 0;
|
|
160
|
+
height: 52px;
|
|
161
|
+
box-sizing: border-box;
|
|
162
|
+
padding: 0 16px;
|
|
163
|
+
border: 0;
|
|
164
|
+
margin: 0;
|
|
165
|
+
background: linear-gradient(
|
|
166
|
+
var(--uikit-glass-separator),
|
|
167
|
+
var(--uikit-glass-separator)
|
|
168
|
+
)
|
|
169
|
+
center bottom / calc(100% - 32px) 1px no-repeat;
|
|
170
|
+
color: inherit;
|
|
171
|
+
font-family: inherit;
|
|
172
|
+
font-size: var(--font-ios-body-size);
|
|
173
|
+
font-style: normal;
|
|
174
|
+
font-variation-settings: 'wght' 510;
|
|
175
|
+
font-weight: round(down, 510, 100);
|
|
176
|
+
letter-spacing: var(--font-ios-body-tracking);
|
|
177
|
+
line-height: 20px;
|
|
178
|
+
outline: none;
|
|
179
|
+
stroke: currentcolor;
|
|
180
|
+
stroke-linejoin: round;
|
|
181
|
+
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
182
|
+
|
|
183
|
+
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
184
|
+
|
|
185
|
+
&:last-child {
|
|
186
|
+
background: none;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&::placeholder {
|
|
190
|
+
color: var(--color-ios-tertiary-label);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.uikit-alert-actions {
|
|
195
|
+
display: flex;
|
|
196
|
+
gap: 16px;
|
|
197
|
+
|
|
198
|
+
/* Stacked, or three or more actions. */
|
|
199
|
+
&[data-stacked],
|
|
200
|
+
&:has(> [data-alert-part] + [data-alert-part] + [data-alert-part]) {
|
|
201
|
+
flex-direction: column;
|
|
202
|
+
gap: 10px;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import './style.css';
|
|
2
|
+
import type { AvatarFallbackProps, AvatarGroupProps, AvatarRootProps } from './props.js';
|
|
3
|
+
export type { AvatarFallbackProps, AvatarGroupProps, AvatarRootProps, } from './props.js';
|
|
4
|
+
/**
|
|
5
|
+
* An avatar (Base UI's `Avatar`): a person's photo, or their initials; or
|
|
6
|
+
* several people (`Avatar.Group`).
|
|
7
|
+
*/
|
|
8
|
+
export declare const Avatar: {
|
|
9
|
+
Root: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AvatarRootProps> & {
|
|
10
|
+
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
Fallback: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AvatarFallbackProps> & {
|
|
13
|
+
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
Group: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AvatarGroupProps> & {
|
|
16
|
+
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
Image: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/avatar").AvatarImageProps, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +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,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,GAChB,MAAM,YAAY,CAAC;AA0EpB;;;GAGG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;CAKlB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './style.css';
|
|
3
|
+
import { Avatar as BaseAvatar } from '@base-ui/react/avatar';
|
|
4
|
+
import { forwardRef } from 'react';
|
|
5
|
+
import { cn, withStyle } from '../utils/main.js';
|
|
6
|
+
// Source: Apple iOS 26 Figma (“Activity Views”: “Contact”): a person's
|
|
7
|
+
// photo in a circle (70px); several people (“Group”) in one circle on the
|
|
8
|
+
// system fill: the first 37px (of 70px) from 9px in, the second 22px, at
|
|
9
|
+
// the opposite corner. Base UI's `Avatar`: its image once loaded, otherwise
|
|
10
|
+
// its fallback.
|
|
11
|
+
//
|
|
12
|
+
// Deviations:
|
|
13
|
+
// - The fallback (e.g. the person's initials, the app's) on iOS contacts'
|
|
14
|
+
// gray gradient (Figma: photos only), its text 40% of the avatar,
|
|
15
|
+
// semibold, white.
|
|
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 (Figma: an app's
|
|
18
|
+
// icon at its bottom end, which isn't built).
|
|
19
|
+
/** A person's avatar (Base UI's `Avatar.Root`). */
|
|
20
|
+
const Root = forwardRef(({ className, size, style, ...props }, ref) => (_jsx(BaseAvatar.Root, { ref: ref, "data-avatar-part": "root", style: withStyle({
|
|
21
|
+
'--uikit-avatar-size': size === undefined ? undefined : `${String(size)}px`,
|
|
22
|
+
}, style), ...props, className: cn('uikit-avatar-root', className) })));
|
|
23
|
+
/** Shown without an image: e.g. the person's initials (the app's). */
|
|
24
|
+
const Fallback = forwardRef(({ className, ...props }, ref) => (_jsx(BaseAvatar.Fallback, { ref: ref, "data-avatar-part": "fallback", ...props, className: cn('uikit-avatar-fallback', className) })));
|
|
25
|
+
/**
|
|
26
|
+
* Several people in one circle (Figma “Group”): their `Avatar.Root`s (up to
|
|
27
|
+
* three shown); badges (`Badge`) on its corner.
|
|
28
|
+
*/
|
|
29
|
+
const Group = forwardRef(({ className, size, style, ...props }, ref) => (_jsx("span", { ref: ref, role: "group", style: withStyle({
|
|
30
|
+
'--uikit-avatar-size': size === undefined ? undefined : `${String(size)}px`,
|
|
31
|
+
}, style), ...props, className: cn('uikit-avatar-group', className), "data-avatar-part": "group" })));
|
|
32
|
+
/**
|
|
33
|
+
* An avatar (Base UI's `Avatar`): a person's photo, or their initials; or
|
|
34
|
+
* several people (`Avatar.Group`).
|
|
35
|
+
*/
|
|
36
|
+
export const Avatar = {
|
|
37
|
+
...BaseAvatar,
|
|
38
|
+
Root,
|
|
39
|
+
Fallback,
|
|
40
|
+
Group,
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/avatar/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAajD,uEAAuE;AACvE,0EAA0E;AAC1E,yEAAyE;AACzE,4EAA4E;AAC5E,gBAAgB;AAChB,EAAE;AACF,cAAc;AACd,0EAA0E;AAC1E,oEAAoE;AACpE,qBAAqB;AACrB,0DAA0D;AAC1D,yEAAyE;AACzE,gDAAgD;AAEhD,mDAAmD;AACnD,MAAM,IAAI,GAAG,UAAU,CACrB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAE7C,KAAC,UAAU,CAAC,IAAI,IACd,GAAG,EAAE,GAAG,sBACS,MAAM,EACvB,KAAK,EAAE,SAAS,CACd;QACE,qBAAqB,EACnB,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI;KACvD,EACD,KAAK,CACN,KACG,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,mBAAmB,EAAE,SAAS,CAAC,GAC7C,CACH,CACF,CAAC;AAEF,sEAAsE;AACtE,MAAM,QAAQ,GAAG,UAAU,CACzB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,KAAC,UAAU,CAAC,QAAQ,IAClB,GAAG,EAAE,GAAG,sBACS,UAAU,KACvB,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,uBAAuB,EAAE,SAAS,CAAC,GACjD,CACH,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,KAAK,GAAG,UAAU,CACtB,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAI7C,eACE,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,SAAS,CACd;QACE,qBAAqB,EACnB,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI;KACvD,EACD,KAAK,CACN,KACG,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,SAAS,CAAC,sBAC7B,OAAO,GACxB,CACH,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,GAAG,UAAU;IACb,IAAI;IACJ,QAAQ;IACR,KAAK;CACN,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Avatar as BaseAvatar } from '@base-ui/react/avatar';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
export type AvatarRootProps = Omit<BaseAvatar.Root.Props, 'ref'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Its diameter (px).
|
|
6
|
+
* @default 70
|
|
7
|
+
*/
|
|
8
|
+
size?: number;
|
|
9
|
+
};
|
|
10
|
+
export type AvatarFallbackProps = Omit<BaseAvatar.Fallback.Props, 'ref'>;
|
|
11
|
+
export type AvatarGroupProps = ComponentProps<'span'> & {
|
|
12
|
+
/**
|
|
13
|
+
* Its diameter (px).
|
|
14
|
+
* @default 70
|
|
15
|
+
*/
|
|
16
|
+
size?: number;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACjE;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;AAEzE,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IACtD;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/components/avatar/props.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/* Avatar (see main.tsx). */
|
|
2
|
+
@layer uikit-ish {
|
|
3
|
+
.uikit-avatar-root {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-grid;
|
|
6
|
+
width: var(--uikit-avatar-size, 70px);
|
|
7
|
+
height: var(--uikit-avatar-size, 70px);
|
|
8
|
+
flex: none;
|
|
9
|
+
vertical-align: middle;
|
|
10
|
+
|
|
11
|
+
& > img,
|
|
12
|
+
& > [data-avatar-part='fallback'] {
|
|
13
|
+
width: 100%;
|
|
14
|
+
height: 100%;
|
|
15
|
+
border-radius: 50%;
|
|
16
|
+
grid-area: 1 / 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
& > img {
|
|
20
|
+
object-fit: cover;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.uikit-avatar-fallback {
|
|
25
|
+
display: grid;
|
|
26
|
+
background: linear-gradient(#a5abb8, #858994);
|
|
27
|
+
color: #fff;
|
|
28
|
+
font-size: calc(var(--uikit-avatar-size, 70px) * 0.4);
|
|
29
|
+
font-variation-settings: 'wght' 590;
|
|
30
|
+
font-weight: round(down, 590, 100);
|
|
31
|
+
letter-spacing: 0;
|
|
32
|
+
line-height: 1;
|
|
33
|
+
place-items: center;
|
|
34
|
+
stroke: currentcolor;
|
|
35
|
+
stroke-linejoin: round;
|
|
36
|
+
stroke-width: max(0px, (590 - 400) / 326 * 1px);
|
|
37
|
+
user-select: none;
|
|
38
|
+
|
|
39
|
+
--uikit-symbol-thinning: max(0px, (400 - 590) / 326 * 1px);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.uikit-avatar-group {
|
|
43
|
+
--uikit-avatar-group-size: var(--uikit-avatar-size, 70px);
|
|
44
|
+
|
|
45
|
+
position: relative;
|
|
46
|
+
display: inline-block;
|
|
47
|
+
width: var(--uikit-avatar-group-size);
|
|
48
|
+
height: var(--uikit-avatar-group-size);
|
|
49
|
+
flex: none;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
background-color: var(--color-ios-system-fill);
|
|
52
|
+
vertical-align: middle;
|
|
53
|
+
|
|
54
|
+
& > :nth-child(-n + 3 of [data-avatar-part='root']) {
|
|
55
|
+
position: absolute;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
& > :nth-child(1 of [data-avatar-part='root']) {
|
|
59
|
+
--uikit-avatar-size: calc(var(--uikit-avatar-group-size) * 0.533);
|
|
60
|
+
|
|
61
|
+
top: calc(var(--uikit-avatar-group-size) * 0.129);
|
|
62
|
+
left: calc(var(--uikit-avatar-group-size) * 0.129);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& > :nth-child(2 of [data-avatar-part='root']) {
|
|
66
|
+
--uikit-avatar-size: calc(var(--uikit-avatar-group-size) * 0.314);
|
|
67
|
+
|
|
68
|
+
right: calc(var(--uikit-avatar-group-size) * 0.14);
|
|
69
|
+
bottom: calc(var(--uikit-avatar-group-size) * 0.14);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
& > :nth-child(3 of [data-avatar-part='root']) {
|
|
73
|
+
--uikit-avatar-size: calc(var(--uikit-avatar-group-size) * 0.257);
|
|
74
|
+
|
|
75
|
+
top: calc(var(--uikit-avatar-group-size) * 0.16);
|
|
76
|
+
right: calc(var(--uikit-avatar-group-size) * 0.12);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
& > :nth-child(n + 4 of [data-avatar-part='root']) {
|
|
80
|
+
display: none;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import './style.css';
|
|
2
|
+
import type { BadgeProps } from './props.js';
|
|
3
|
+
export type { BadgeProps } from './props.js';
|
|
4
|
+
/**
|
|
5
|
+
* A badge (UIKit `badgeValue`): a count (or short text) in a capsule, or,
|
|
6
|
+
* without content, a dot; on a `Symbol` (its child), an element's corner,
|
|
7
|
+
* or inline.
|
|
8
|
+
*/
|
|
9
|
+
export declare const Badge: import("preact").FunctionalComponent<import("react").PropsWithoutRef<BadgeProps> & {
|
|
10
|
+
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/badge/main.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAKrB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAsB7C;;;;GAIG;AACH,eAAO,MAAM,KAAK;;EAmBjB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './style.css';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { cn, withStyle } from '../utils/main.js';
|
|
5
|
+
// Source: Apple iOS 26 Figma (app icons, “_Badge”): a capsule 24px high, at
|
|
6
|
+
// least 24px wide (a circle for a digit), 7px from its ends, in system red,
|
|
7
|
+
// its text white, 16px/19px regular. Placed after Framework7's badge: on a
|
|
8
|
+
// symbol (a child of a `Symbol`, e.g. in a `Button.Icon` or `TabBar.Icon`),
|
|
9
|
+
// in Framework7's size there (16px, its text 10px semibold, 2px from its
|
|
10
|
+
// ends); otherwise on its element's top end corner (e.g. an `Avatar`'s); or
|
|
11
|
+
// inline (e.g. a list row's detail); any tint.
|
|
12
|
+
//
|
|
13
|
+
// Deviations:
|
|
14
|
+
// - Without content, a dot (10px; Figma, Framework7 have none; e.g. an
|
|
15
|
+
// unread indicator): on a symbol, centered on its top end corner; inline,
|
|
16
|
+
// centered with the text (by its cap height).
|
|
17
|
+
// - On a symbol, it starts 5px before its end, 4px above it (Framework7:
|
|
18
|
+
// 10px, 2px, for its larger icons: covering less of a symbol).
|
|
19
|
+
// - On an element's corner, it starts 14px before its end, 6px above it (a
|
|
20
|
+
// dot: inside the corner, 2px from its edges).
|
|
21
|
+
// - On a symbol, it's neither blended nor scaled with it (e.g. a glass
|
|
22
|
+
// button's vibrant content, see `Symbol`).
|
|
23
|
+
// - On a tab collapsing away, it fades with its symbol: no special case.
|
|
24
|
+
/**
|
|
25
|
+
* A badge (UIKit `badgeValue`): a count (or short text) in a capsule, or,
|
|
26
|
+
* without content, a dot; on a `Symbol` (its child), an element's corner,
|
|
27
|
+
* or inline.
|
|
28
|
+
*/
|
|
29
|
+
export const Badge = forwardRef(({ className, placement = 'corner', style, textColor, tint, ...props }, ref) => (_jsx("span", { ref: ref, "data-badge": placement, style: withStyle({
|
|
30
|
+
'--uikit-badge-text-color': textColor,
|
|
31
|
+
'--uikit-badge-tint': tint,
|
|
32
|
+
}, style), ...props, className: cn('uikit-badge', className) })));
|
|
33
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/badge/main.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAKjD,4EAA4E;AAC5E,4EAA4E;AAC5E,2EAA2E;AAC3E,4EAA4E;AAC5E,yEAAyE;AACzE,4EAA4E;AAC5E,+CAA+C;AAC/C,EAAE;AACF,cAAc;AACd,uEAAuE;AACvE,4EAA4E;AAC5E,gDAAgD;AAChD,yEAAyE;AACzE,iEAAiE;AACjE,2EAA2E;AAC3E,iDAAiD;AACjD,uEAAuE;AACvE,6CAA6C;AAC7C,yEAAyE;AAEzE;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAC7B,CACE,EAAE,SAAS,EAAE,SAAS,GAAG,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EACrE,GAAG,EACH,EAAE,CAAC,CACH,eACE,GAAG,EAAE,GAAG,gBACI,SAAS,EACrB,KAAK,EAAE,SAAS,CACd;QACE,0BAA0B,EAAE,SAAS;QACrC,oBAAoB,EAAE,IAAI;KAC3B,EACD,KAAK,CACN,KACG,KAAK,EACT,SAAS,EAAE,EAAE,CAAC,aAAa,EAAE,SAAS,CAAC,GACvC,CACH,CACF,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
export type BadgeProps = ComponentProps<'span'> & {
|
|
3
|
+
/**
|
|
4
|
+
* On its element's top end corner (in a `Symbol`: on the symbol; its
|
|
5
|
+
* element positioned, e.g. an `Avatar`), or inline.
|
|
6
|
+
* @default 'corner'
|
|
7
|
+
*/
|
|
8
|
+
placement?: 'corner' | 'inline';
|
|
9
|
+
/**
|
|
10
|
+
* Its text color (e.g. for a light `tint`).
|
|
11
|
+
* @default white
|
|
12
|
+
*/
|
|
13
|
+
textColor?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Its color.
|
|
16
|
+
* @default system red
|
|
17
|
+
*/
|
|
18
|
+
tint?: string;
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/badge/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG;IAChD;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"props.js","sourceRoot":"","sources":["../../../src/components/badge/props.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* Badge (see main.tsx). */
|
|
2
|
+
@layer uikit-ish {
|
|
3
|
+
.uikit-badge {
|
|
4
|
+
/* On a corner: how far above its element, and from its end; on a symbol:
|
|
5
|
+
how far above it, and before its end. */
|
|
6
|
+
--uikit-badge-overhang: 6px;
|
|
7
|
+
--uikit-badge-inset: 14px;
|
|
8
|
+
--uikit-badge-symbol-x: 5px;
|
|
9
|
+
--uikit-badge-symbol-y: 4px;
|
|
10
|
+
|
|
11
|
+
display: inline-flex;
|
|
12
|
+
min-width: var(--uikit-badge-height, 24px);
|
|
13
|
+
height: var(--uikit-badge-height, 24px);
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
flex: none;
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
padding: var(--uikit-badge-padding, 2.5px 7px);
|
|
19
|
+
border-radius: 100px;
|
|
20
|
+
background-color: var(--uikit-badge-tint, var(--color-ios-system-red));
|
|
21
|
+
color: var(--uikit-badge-text-color, #fff);
|
|
22
|
+
font-size: var(--uikit-badge-font-size, 16px);
|
|
23
|
+
font-variant-numeric: tabular-nums;
|
|
24
|
+
font-weight: var(--uikit-badge-weight, 400);
|
|
25
|
+
letter-spacing: 0;
|
|
26
|
+
line-height: var(--uikit-badge-line-height, 19px);
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
white-space: nowrap;
|
|
29
|
+
|
|
30
|
+
&:empty {
|
|
31
|
+
--uikit-badge-overhang: -2px;
|
|
32
|
+
--uikit-badge-inset: 12px;
|
|
33
|
+
--uikit-badge-symbol-x: 5px;
|
|
34
|
+
--uikit-badge-symbol-y: 5px;
|
|
35
|
+
|
|
36
|
+
width: 10px;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
height: 10px;
|
|
39
|
+
padding: 0;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&[data-badge='corner'] {
|
|
43
|
+
position: absolute;
|
|
44
|
+
z-index: 1;
|
|
45
|
+
inset-block-start: calc(-1 * var(--uikit-badge-overhang));
|
|
46
|
+
inset-inline-start: calc(100% - var(--uikit-badge-inset));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-badge='inline'] {
|
|
50
|
+
vertical-align: middle;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* An inline dot (its baseline its bottom): its center half the cap height
|
|
54
|
+
above the baseline, as the text's. */
|
|
55
|
+
&[data-badge='inline']:empty {
|
|
56
|
+
vertical-align: calc(0.5cap - 5px);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* On a symbol (in a `Symbol`): in Framework7's size there, starting
|
|
61
|
+
before its end, above it (see main.tsx). */
|
|
62
|
+
.uikit-symbol > .uikit-badge[data-badge='corner'] {
|
|
63
|
+
--uikit-badge-height: 16px;
|
|
64
|
+
--uikit-badge-font-size: 10px;
|
|
65
|
+
--uikit-badge-line-height: 12px;
|
|
66
|
+
--uikit-badge-weight: 590;
|
|
67
|
+
--uikit-badge-padding: 0 2px;
|
|
68
|
+
--uikit-badge-overhang: var(--uikit-badge-symbol-y);
|
|
69
|
+
--uikit-badge-inset: var(--uikit-badge-symbol-x);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import '../glass/style.css';
|
|
2
|
+
import './style.css';
|
|
3
|
+
import type { ButtonRootProps } from './props.js';
|
|
4
|
+
export type { ButtonRootProps } from './props.js';
|
|
5
|
+
export declare const Button: {
|
|
6
|
+
Root: import("preact").FunctionalComponent<import("react").PropsWithoutRef<Omit<ButtonRootProps, "ref">> & {
|
|
7
|
+
ref?: import("preact").Ref<HTMLElement> | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
Icon: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("preact").HTMLAttributes<HTMLSpanElement>> & {
|
|
10
|
+
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
11
|
+
}>;
|
|
12
|
+
Label: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("preact").HTMLAttributes<HTMLSpanElement>> & {
|
|
13
|
+
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=main.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../src/components/button/main.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAC;AAYrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,YAAY,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAwIlD,eAAO,MAAM,MAAM;;;;;;;;;;CAIlB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import '../glass/style.css';
|
|
3
|
+
import './style.css';
|
|
4
|
+
import { Button as BaseButton } from '@base-ui/react/button';
|
|
5
|
+
import { forwardRef } from 'react';
|
|
6
|
+
import { GlassBackground, useGlassContext } from '../glass/main.js';
|
|
7
|
+
import { cn, useForwardedRef, useSecondaryClick, withStyle, } from '../utils/main.js';
|
|
8
|
+
const isGlass = (variant) => variant === 'glass' || variant === 'glass-prominent';
|
|
9
|
+
// Source: Apple iOS 26 Figma (Button: Size, Style, Label Type, Enabled,
|
|
10
|
+
// Destructive; Button - Liquid Glass: Tinted, BG Context).
|
|
11
|
+
// Labels and symbols are in the Subheadline (small, medium) and Body
|
|
12
|
+
// (large) text styles; glass buttons' labels (17/20px, no tracking) are in
|
|
13
|
+
// none.
|
|
14
|
+
//
|
|
15
|
+
// The padding and line height give the Figma heights (small 28px, medium
|
|
16
|
+
// 34px, large 50px), which are also the minimum sizes; glass buttons are
|
|
17
|
+
// 48px high (Figma: 6px padding around a 36px “Text” frame).
|
|
18
|
+
//
|
|
19
|
+
// HIG (Buttons): a hit region of at least 44×44pt, and always a press state.
|
|
20
|
+
// Figma has no press state: classic buttons follow Framework7
|
|
21
|
+
// (`button-ios.less`: the tint at 15% behind the label, a lighter fill for
|
|
22
|
+
// filled buttons); glass buttons turn into a glass lens like the slider thumb
|
|
23
|
+
// (scaled up, a tinted glow behind, the fill cleared, the lens' edge), and
|
|
24
|
+
// their content scales up less than the lens.
|
|
25
|
+
// Its props as attributes and properties (see style.css). Without a click
|
|
26
|
+
// handler (nor a secondary one), disabled, unless it submits or resets its
|
|
27
|
+
// form.
|
|
28
|
+
const Root = forwardRef(({ children, className, context: contextProp, destructive, fill, shape, size, style, textColor, tint, variant = 'borderless', ...props }, forwardedRef) => {
|
|
29
|
+
const ref = useForwardedRef(forwardedRef);
|
|
30
|
+
const glass = isGlass(variant);
|
|
31
|
+
const context = useGlassContext(ref, glass ? contextProp : undefined);
|
|
32
|
+
const pressable = Boolean(props.onClick ?? props.onSecondaryClick) ||
|
|
33
|
+
props.type === 'submit' ||
|
|
34
|
+
props.type === 'reset';
|
|
35
|
+
const rootProps = useSecondaryClick({
|
|
36
|
+
...props,
|
|
37
|
+
...(!pressable && props.disabled === undefined && { disabled: true }),
|
|
38
|
+
});
|
|
39
|
+
return (_jsx(BaseButton, { ref: ref, "data-destructive": destructive ? '' : undefined, "data-fill": fill ? '' : undefined, "data-glass-context": glass ? (context ?? 'auto') : undefined, "data-shape": shape, "data-size": size, "data-variant": variant, style: withStyle({
|
|
40
|
+
// (`destructive` wins.)
|
|
41
|
+
...((destructive ?? tint) && {
|
|
42
|
+
'--uikit-button-tint': destructive
|
|
43
|
+
? 'var(--color-ios-system-red)'
|
|
44
|
+
: tint,
|
|
45
|
+
'--uikit-glass-tint': destructive
|
|
46
|
+
? 'var(--color-ios-system-red)'
|
|
47
|
+
: tint,
|
|
48
|
+
}),
|
|
49
|
+
// (Over the variants'.)
|
|
50
|
+
...(textColor && {
|
|
51
|
+
'--uikit-button-blend': 'normal',
|
|
52
|
+
'--uikit-button-color': textColor,
|
|
53
|
+
}),
|
|
54
|
+
}, style), ...rootProps, className: cn('uikit-button-root', className), "data-button-part": "root", children: glass ? (_jsxs(_Fragment, { children: [_jsx(GlassBackground, { kind: "button", tinted: variant === 'glass-prominent' }), _jsx("span", { className: "uikit-button-content", "data-button-part": "content", children: children })] })) : (children) }));
|
|
55
|
+
});
|
|
56
|
+
// (Marked, e.g. for fading a bar's content, see `Header`.)
|
|
57
|
+
const Icon = forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, "data-button-part": "icon", ...props, className: cn('uikit-button-icon', className) })));
|
|
58
|
+
const Label = forwardRef(({ className, ...props }, ref) => (_jsx("span", { ref: ref, "data-button-part": "label", ...props, className: cn('uikit-button-label', className) })));
|
|
59
|
+
export const Button = {
|
|
60
|
+
Root,
|
|
61
|
+
Icon,
|
|
62
|
+
Label,
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../../../src/components/button/main.tsx"],"names":[],"mappings":"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"}
|