@mrpelz/uikit-ish 7.8.0 → 7.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/accordion/main.d.ts +12 -0
- package/dist/components/accordion/main.d.ts.map +1 -0
- package/dist/components/accordion/main.js +20 -0
- package/dist/components/accordion/main.js.map +1 -0
- package/dist/components/accordion/style.css +23 -0
- package/dist/components/action-sheet/main.d.ts +22 -16
- package/dist/components/action-sheet/main.d.ts.map +1 -1
- package/dist/components/action-sheet/main.js +89 -19
- package/dist/components/action-sheet/main.js.map +1 -1
- package/dist/components/action-sheet/props.d.ts +17 -5
- package/dist/components/action-sheet/props.d.ts.map +1 -1
- package/dist/components/action-sheet/style.css +24 -0
- package/dist/components/activity-view/main.d.ts +15 -4
- package/dist/components/activity-view/main.d.ts.map +1 -1
- package/dist/components/activity-view/main.js +27 -14
- package/dist/components/activity-view/main.js.map +1 -1
- package/dist/components/activity-view/props.d.ts +2 -10
- package/dist/components/activity-view/props.d.ts.map +1 -1
- package/dist/components/activity-view/style.css +29 -67
- package/dist/components/alert/main.d.ts +8 -7
- package/dist/components/alert/main.d.ts.map +1 -1
- package/dist/components/alert/main.js +32 -19
- package/dist/components/alert/main.js.map +1 -1
- package/dist/components/alert/props.d.ts +13 -2
- package/dist/components/alert/props.d.ts.map +1 -1
- package/dist/components/alert/style.css +36 -50
- package/dist/components/avatar/main.d.ts +5 -3
- package/dist/components/avatar/main.d.ts.map +1 -1
- package/dist/components/avatar/main.js +10 -8
- package/dist/components/avatar/main.js.map +1 -1
- package/dist/components/avatar/props.d.ts +4 -0
- package/dist/components/avatar/props.d.ts.map +1 -1
- package/dist/components/avatar/style.css +1 -7
- package/dist/components/badge/main.d.ts +3 -3
- package/dist/components/badge/main.d.ts.map +1 -1
- package/dist/components/badge/main.js +9 -9
- package/dist/components/badge/main.js.map +1 -1
- package/dist/components/badge/props.d.ts +4 -3
- package/dist/components/badge/props.d.ts.map +1 -1
- package/dist/components/badge/style.css +10 -4
- package/dist/components/button/main.d.ts.map +1 -1
- package/dist/components/button/main.js +15 -15
- package/dist/components/button/main.js.map +1 -1
- package/dist/components/button/props.d.ts +8 -8
- package/dist/components/button/props.d.ts.map +1 -1
- package/dist/components/button/style.css +37 -55
- package/dist/components/checkbox/main.d.ts.map +1 -1
- package/dist/components/checkbox/main.js +5 -7
- package/dist/components/checkbox/main.js.map +1 -1
- package/dist/components/checkbox/style.css +5 -8
- package/dist/components/collapsible/main.d.ts +9 -0
- package/dist/components/collapsible/main.d.ts.map +1 -0
- package/dist/components/collapsible/main.js +19 -0
- package/dist/components/collapsible/main.js.map +1 -0
- package/dist/components/collapsible/style.css +23 -0
- package/dist/components/color-picker/main.d.ts +27 -4
- package/dist/components/color-picker/main.d.ts.map +1 -1
- package/dist/components/color-picker/main.js +292 -110
- package/dist/components/color-picker/main.js.map +1 -1
- package/dist/components/color-picker/props.d.ts +64 -15
- package/dist/components/color-picker/props.d.ts.map +1 -1
- package/dist/components/color-picker/style.css +133 -65
- package/dist/components/contextual-menu/main.d.ts +11 -7
- package/dist/components/contextual-menu/main.d.ts.map +1 -1
- package/dist/components/contextual-menu/main.js +207 -202
- package/dist/components/contextual-menu/main.js.map +1 -1
- package/dist/components/contextual-menu/props.d.ts +21 -34
- package/dist/components/contextual-menu/props.d.ts.map +1 -1
- package/dist/components/contextual-menu/style.css +63 -34
- package/dist/components/date-picker/handle.d.ts +41 -0
- package/dist/components/date-picker/handle.d.ts.map +1 -0
- package/dist/components/date-picker/handle.js +47 -0
- package/dist/components/date-picker/handle.js.map +1 -0
- package/dist/components/date-picker/main.d.ts +31 -49
- package/dist/components/date-picker/main.d.ts.map +1 -1
- package/dist/components/date-picker/main.js +373 -178
- package/dist/components/date-picker/main.js.map +1 -1
- package/dist/components/date-picker/pager.d.ts +24 -0
- package/dist/components/date-picker/pager.d.ts.map +1 -0
- package/dist/components/date-picker/pager.js +307 -0
- package/dist/components/date-picker/pager.js.map +1 -0
- package/dist/components/date-picker/props.d.ts +98 -27
- package/dist/components/date-picker/props.d.ts.map +1 -1
- package/dist/components/date-picker/style.css +110 -118
- package/dist/components/drawer/main.d.ts +31 -0
- package/dist/components/drawer/main.d.ts.map +1 -0
- package/dist/components/drawer/main.js +119 -0
- package/dist/components/drawer/main.js.map +1 -0
- package/dist/components/drawer/props.d.ts +39 -0
- package/dist/components/drawer/props.d.ts.map +1 -0
- package/dist/components/drawer/props.js +2 -0
- package/dist/components/drawer/props.js.map +1 -0
- package/dist/components/drawer/style.css +135 -0
- package/dist/components/edit-menu/main.d.ts +7 -7
- package/dist/components/edit-menu/main.d.ts.map +1 -1
- package/dist/components/edit-menu/main.js +57 -40
- package/dist/components/edit-menu/main.js.map +1 -1
- package/dist/components/edit-menu/props.d.ts +14 -1
- package/dist/components/edit-menu/props.d.ts.map +1 -1
- package/dist/components/edit-menu/style.css +15 -8
- package/dist/components/form/main.d.ts +8 -0
- package/dist/components/form/main.d.ts.map +1 -1
- package/dist/components/form/main.js +18 -5
- package/dist/components/form/main.js.map +1 -1
- package/dist/components/form/props.d.ts +1 -2
- package/dist/components/form/props.d.ts.map +1 -1
- package/dist/components/glass/main.d.ts +1 -1
- package/dist/components/glass/main.js +4 -4
- package/dist/components/glass/main.js.map +1 -1
- package/dist/components/glass/props.d.ts +5 -5
- package/dist/components/glass/props.d.ts.map +1 -1
- package/dist/components/glass/style.css +176 -161
- package/dist/components/header/main.d.ts +5 -4
- package/dist/components/header/main.d.ts.map +1 -1
- package/dist/components/header/main.js +64 -34
- package/dist/components/header/main.js.map +1 -1
- package/dist/components/header/props.d.ts +2 -3
- package/dist/components/header/props.d.ts.map +1 -1
- package/dist/components/header/style.css +46 -65
- package/dist/components/index.d.ts +27 -23
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +17 -13
- package/dist/components/index.js.map +1 -1
- package/dist/components/layout/main.d.ts +2 -2
- package/dist/components/layout/main.d.ts.map +1 -1
- package/dist/components/layout/main.js +63 -167
- package/dist/components/layout/main.js.map +1 -1
- package/dist/components/layout/props.d.ts +2 -20
- package/dist/components/layout/props.d.ts.map +1 -1
- package/dist/components/layout/style.css +20 -91
- package/dist/components/list/main.d.ts +58 -10
- package/dist/components/list/main.d.ts.map +1 -1
- package/dist/components/list/main.js +1022 -465
- package/dist/components/list/main.js.map +1 -1
- package/dist/components/list/props.d.ts +211 -21
- package/dist/components/list/props.d.ts.map +1 -1
- package/dist/components/list/reorder.d.ts +146 -0
- package/dist/components/list/reorder.d.ts.map +1 -0
- package/dist/components/list/reorder.js +819 -0
- package/dist/components/list/reorder.js.map +1 -0
- package/dist/components/list/select.d.ts +6 -0
- package/dist/components/list/select.d.ts.map +1 -0
- package/dist/components/list/select.js +141 -0
- package/dist/components/list/select.js.map +1 -0
- package/dist/components/list/style.css +492 -507
- package/dist/components/list/swipe-actions-handle.d.ts +40 -0
- package/dist/components/list/swipe-actions-handle.d.ts.map +1 -0
- package/dist/components/list/swipe-actions-handle.js +51 -0
- package/dist/components/list/swipe-actions-handle.js.map +1 -0
- package/dist/components/menu/main.d.ts +102 -32
- package/dist/components/menu/main.d.ts.map +1 -1
- package/dist/components/menu/main.js +510 -99
- package/dist/components/menu/main.js.map +1 -1
- package/dist/components/menu/props.d.ts +5 -5
- package/dist/components/menu/props.d.ts.map +1 -1
- package/dist/components/menu/style.css +35 -43
- package/dist/components/navigation/main.d.ts +14 -2
- package/dist/components/navigation/main.d.ts.map +1 -1
- package/dist/components/navigation/main.js +437 -119
- package/dist/components/navigation/main.js.map +1 -1
- package/dist/components/navigation/props.d.ts +53 -3
- package/dist/components/navigation/props.d.ts.map +1 -1
- package/dist/components/navigation/style.css +56 -9
- package/dist/components/page/main.d.ts.map +1 -1
- package/dist/components/page/main.js +13 -8
- package/dist/components/page/main.js.map +1 -1
- package/dist/components/page/props.d.ts +8 -0
- package/dist/components/page/props.d.ts.map +1 -1
- package/dist/components/page/style.css +39 -4
- package/dist/components/page-control/main.d.ts +2 -2
- package/dist/components/page-control/main.d.ts.map +1 -1
- package/dist/components/page-control/main.js +66 -32
- package/dist/components/page-control/main.js.map +1 -1
- package/dist/components/page-control/props.d.ts +10 -2
- package/dist/components/page-control/props.d.ts.map +1 -1
- package/dist/components/page-control/style.css +7 -2
- package/dist/components/popover/main.d.ts +11 -6
- package/dist/components/popover/main.d.ts.map +1 -1
- package/dist/components/popover/main.js +63 -38
- package/dist/components/popover/main.js.map +1 -1
- package/dist/components/popover/props.d.ts +7 -6
- package/dist/components/popover/props.d.ts.map +1 -1
- package/dist/components/popover/style.css +54 -4
- package/dist/components/progress/main.d.ts +2 -3
- package/dist/components/progress/main.d.ts.map +1 -1
- package/dist/components/progress/main.js +148 -29
- package/dist/components/progress/main.js.map +1 -1
- package/dist/components/progress/props.d.ts +43 -9
- package/dist/components/progress/props.d.ts.map +1 -1
- package/dist/components/progress/style.css +82 -50
- package/dist/components/roll/main.d.ts +1 -1
- package/dist/components/roll/main.d.ts.map +1 -1
- package/dist/components/roll/main.js +90 -34
- package/dist/components/roll/main.js.map +1 -1
- package/dist/components/roll/props.d.ts +25 -8
- package/dist/components/roll/props.d.ts.map +1 -1
- package/dist/components/roll/style.css +12 -24
- package/dist/components/segmented/main.d.ts.map +1 -1
- package/dist/components/segmented/main.js +47 -30
- package/dist/components/segmented/main.js.map +1 -1
- package/dist/components/segmented/style.css +16 -23
- package/dist/components/sheet/main.d.ts +25 -15
- package/dist/components/sheet/main.d.ts.map +1 -1
- package/dist/components/sheet/main.js +66 -78
- package/dist/components/sheet/main.js.map +1 -1
- package/dist/components/sheet/props.d.ts +37 -3
- package/dist/components/sheet/props.d.ts.map +1 -1
- package/dist/components/sheet/style.css +183 -45
- package/dist/components/sidebar/main.d.ts.map +1 -1
- package/dist/components/sidebar/main.js +9 -13
- package/dist/components/sidebar/main.js.map +1 -1
- package/dist/components/sidebar/style.css +20 -14
- package/dist/components/slider/main.d.ts.map +1 -1
- package/dist/components/slider/main.js +23 -22
- package/dist/components/slider/main.js.map +1 -1
- package/dist/components/slider/props.d.ts +1 -2
- package/dist/components/slider/props.d.ts.map +1 -1
- package/dist/components/slider/style.css +27 -53
- package/dist/components/stepper/main.d.ts +4 -6
- package/dist/components/stepper/main.d.ts.map +1 -1
- package/dist/components/stepper/main.js +29 -25
- package/dist/components/stepper/main.js.map +1 -1
- package/dist/components/stepper/style.css +12 -16
- package/dist/components/switch/main.d.ts.map +1 -1
- package/dist/components/switch/main.js +40 -28
- package/dist/components/switch/main.js.map +1 -1
- package/dist/components/switch/props.d.ts +7 -5
- package/dist/components/switch/props.d.ts.map +1 -1
- package/dist/components/switch/style.css +40 -17
- package/dist/components/symbol/main.d.ts +2 -2
- package/dist/components/symbol/main.d.ts.map +1 -1
- package/dist/components/symbol/main.js +36 -28
- package/dist/components/symbol/main.js.map +1 -1
- package/dist/components/symbol/props.d.ts +39 -4
- package/dist/components/symbol/props.d.ts.map +1 -1
- package/dist/components/symbol/style.css +26 -5
- package/dist/components/tab-bar/main.d.ts +2 -2
- package/dist/components/tab-bar/main.d.ts.map +1 -1
- package/dist/components/tab-bar/main.js +133 -101
- package/dist/components/tab-bar/main.js.map +1 -1
- package/dist/components/tab-bar/props.d.ts +6 -6
- package/dist/components/tab-bar/props.d.ts.map +1 -1
- package/dist/components/tab-bar/style.css +113 -99
- package/dist/components/text-field/main.d.ts +3 -2
- package/dist/components/text-field/main.d.ts.map +1 -1
- package/dist/components/text-field/main.js +29 -30
- package/dist/components/text-field/main.js.map +1 -1
- package/dist/components/text-field/props.d.ts +23 -1
- package/dist/components/text-field/props.d.ts.map +1 -1
- package/dist/components/text-field/style.css +122 -82
- package/dist/components/toolbar/main.js +27 -27
- package/dist/components/toolbar/main.js.map +1 -1
- package/dist/components/toolbar/props.d.ts +10 -4
- package/dist/components/toolbar/props.d.ts.map +1 -1
- package/dist/components/toolbar/style.css +39 -33
- package/dist/components/tooltip/main.d.ts +10 -9
- package/dist/components/tooltip/main.d.ts.map +1 -1
- package/dist/components/tooltip/main.js +39 -10
- package/dist/components/tooltip/main.js.map +1 -1
- package/dist/components/tooltip/props.d.ts +2 -0
- package/dist/components/tooltip/props.d.ts.map +1 -1
- package/dist/components/tooltip/style.css +16 -16
- package/dist/components/typography/main.d.ts +2 -2
- package/dist/components/typography/main.d.ts.map +1 -1
- package/dist/components/typography/main.js +24 -16
- package/dist/components/typography/main.js.map +1 -1
- package/dist/components/typography/props.d.ts +11 -18
- package/dist/components/typography/props.d.ts.map +1 -1
- package/dist/components/typography/style.css +503 -623
- package/dist/components/utils/main.d.ts +78 -8
- package/dist/components/utils/main.d.ts.map +1 -1
- package/dist/components/utils/main.js +235 -16
- package/dist/components/utils/main.js.map +1 -1
- package/dist/components/utils/props.d.ts +27 -4
- package/dist/components/utils/props.d.ts.map +1 -1
- package/dist/components/utils/style.css +31 -18
- package/dist/components/viewport/edge-effect.d.ts +10 -0
- package/dist/components/viewport/edge-effect.d.ts.map +1 -0
- package/dist/components/viewport/edge-effect.js +100 -0
- package/dist/components/viewport/edge-effect.js.map +1 -0
- package/dist/components/viewport/edge.d.ts +39 -0
- package/dist/components/viewport/edge.d.ts.map +1 -0
- package/dist/components/viewport/edge.js +151 -0
- package/dist/components/viewport/edge.js.map +1 -0
- package/dist/components/viewport/input.d.ts +39 -0
- package/dist/components/viewport/input.d.ts.map +1 -0
- package/dist/components/viewport/input.js +280 -0
- package/dist/components/viewport/input.js.map +1 -0
- package/dist/components/viewport/main.d.ts +47 -9
- package/dist/components/viewport/main.d.ts.map +1 -1
- package/dist/components/viewport/main.js +745 -86
- package/dist/components/viewport/main.js.map +1 -1
- package/dist/components/viewport/padding.d.ts +78 -0
- package/dist/components/viewport/padding.d.ts.map +1 -0
- package/dist/components/viewport/padding.js +321 -0
- package/dist/components/viewport/padding.js.map +1 -0
- package/dist/components/viewport/props.d.ts +220 -11
- package/dist/components/viewport/props.d.ts.map +1 -1
- package/dist/components/viewport/style.css +377 -6
- package/dist/main.d.ts +0 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js.map +1 -1
- package/dist/styles.css +318 -302
- package/dist/styles.d.ts +2 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +2 -1
- package/dist/styles.js.map +1 -1
- package/package.json +8 -16
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
align-items: flex-start;
|
|
6
6
|
padding: 16px;
|
|
7
7
|
gap: 16px;
|
|
8
|
+
|
|
9
|
+
/* Below a sheet's grabber (over it, see Sheet). */
|
|
10
|
+
padding-block-start: calc(16px + var(--uikit-safe-area-inset-top, 0px));
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
.uikit-activity-view-thumbnail {
|
|
@@ -35,17 +38,12 @@
|
|
|
35
38
|
}
|
|
36
39
|
|
|
37
40
|
.uikit-activity-view-title {
|
|
38
|
-
color: var(--color-
|
|
41
|
+
color: var(--color-ui-label);
|
|
39
42
|
font-size: 15px;
|
|
40
43
|
font-variation-settings: 'wght' 510;
|
|
41
44
|
font-weight: round(down, 510, 100);
|
|
42
45
|
letter-spacing: -0.23px;
|
|
43
46
|
line-height: 20px;
|
|
44
|
-
stroke: currentcolor;
|
|
45
|
-
stroke-linejoin: round;
|
|
46
|
-
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
47
|
-
|
|
48
|
-
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
49
47
|
|
|
50
48
|
& + [data-activity-view-part='subtitle'] {
|
|
51
49
|
margin-block-start: -11px;
|
|
@@ -53,39 +51,23 @@
|
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
.uikit-activity-view-subtitle {
|
|
56
|
-
color: var(--color-
|
|
57
|
-
font-size: var(--font-
|
|
54
|
+
color: var(--color-ui-secondary-label);
|
|
55
|
+
font-size: var(--font-ui-footnote-size);
|
|
58
56
|
font-style: normal;
|
|
59
|
-
font-variation-settings: 'wght' var(--font-
|
|
60
|
-
font-weight: round(down, var(--font-
|
|
61
|
-
letter-spacing: var(--font-
|
|
62
|
-
line-height: var(--font-
|
|
63
|
-
stroke: currentcolor;
|
|
64
|
-
stroke-linejoin: round;
|
|
65
|
-
stroke-width: max(0px, (var(--font-ios-footnote-weight) - 400) / 326 * 1px);
|
|
66
|
-
|
|
67
|
-
--uikit-symbol-thinning: max(
|
|
68
|
-
0px,
|
|
69
|
-
(400 - var(--font-ios-footnote-weight)) / 326 * 1px
|
|
70
|
-
);
|
|
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);
|
|
71
61
|
}
|
|
72
62
|
|
|
73
63
|
.uikit-activity-view-message {
|
|
74
|
-
color: var(--color-
|
|
75
|
-
font-size: var(--font-
|
|
64
|
+
color: var(--color-ui-secondary-label);
|
|
65
|
+
font-size: var(--font-ui-footnote-size);
|
|
76
66
|
font-style: normal;
|
|
77
|
-
font-variation-settings: 'wght' var(--font-
|
|
78
|
-
font-weight: round(down, var(--font-
|
|
79
|
-
letter-spacing: var(--font-
|
|
80
|
-
line-height: var(--font-
|
|
81
|
-
stroke: currentcolor;
|
|
82
|
-
stroke-linejoin: round;
|
|
83
|
-
stroke-width: max(0px, (var(--font-ios-footnote-weight) - 400) / 326 * 1px);
|
|
84
|
-
|
|
85
|
-
--uikit-symbol-thinning: max(
|
|
86
|
-
0px,
|
|
87
|
-
(400 - var(--font-ios-footnote-weight)) / 326 * 1px
|
|
88
|
-
);
|
|
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);
|
|
89
71
|
}
|
|
90
72
|
|
|
91
73
|
.uikit-activity-view-row {
|
|
@@ -94,11 +76,6 @@
|
|
|
94
76
|
padding: 14px 24px 20px;
|
|
95
77
|
gap: 14px;
|
|
96
78
|
overscroll-behavior-inline: contain;
|
|
97
|
-
scrollbar-width: none;
|
|
98
|
-
|
|
99
|
-
&::-webkit-scrollbar {
|
|
100
|
-
display: none;
|
|
101
|
-
}
|
|
102
79
|
}
|
|
103
80
|
|
|
104
81
|
.uikit-activity-view-name {
|
|
@@ -111,7 +88,8 @@
|
|
|
111
88
|
line-height: 15px;
|
|
112
89
|
|
|
113
90
|
/* With a count (a group's): on one line, truncated. */
|
|
114
|
-
|
|
91
|
+
[data-activity-view-part='item']:has(> [data-activity-view-part='count'])
|
|
92
|
+
> & {
|
|
115
93
|
display: block;
|
|
116
94
|
max-width: 100%;
|
|
117
95
|
text-overflow: ellipsis;
|
|
@@ -120,7 +98,7 @@
|
|
|
120
98
|
}
|
|
121
99
|
|
|
122
100
|
.uikit-activity-view-count {
|
|
123
|
-
color: var(--color-
|
|
101
|
+
color: var(--color-ui-secondary-label);
|
|
124
102
|
font-size: 12px;
|
|
125
103
|
letter-spacing: 0.06px;
|
|
126
104
|
line-height: 15px;
|
|
@@ -131,7 +109,7 @@
|
|
|
131
109
|
height: 0;
|
|
132
110
|
border: 0;
|
|
133
111
|
margin: 0 16px;
|
|
134
|
-
border-block-start: 0.5px solid var(--color-
|
|
112
|
+
border-block-start: 0.5px solid var(--color-ui-separator);
|
|
135
113
|
}
|
|
136
114
|
|
|
137
115
|
/* A list item: only its button laid out (in the row). */
|
|
@@ -150,7 +128,7 @@
|
|
|
150
128
|
border: 0;
|
|
151
129
|
margin: 0;
|
|
152
130
|
background: none;
|
|
153
|
-
color: var(--color-
|
|
131
|
+
color: var(--color-ui-label);
|
|
154
132
|
cursor: pointer;
|
|
155
133
|
font-family: inherit;
|
|
156
134
|
gap: 5px;
|
|
@@ -161,49 +139,33 @@
|
|
|
161
139
|
.uikit-activity-view-action {
|
|
162
140
|
gap: 7px;
|
|
163
141
|
|
|
164
|
-
& > [data-activity-view-part='
|
|
142
|
+
& > [data-activity-view-part='symbol'] {
|
|
165
143
|
display: grid;
|
|
166
144
|
width: 70px;
|
|
167
145
|
height: 70px;
|
|
168
146
|
border-radius: 50%;
|
|
169
|
-
background-color: var(--color-
|
|
147
|
+
background-color: var(--color-ui-tertiary-system-fill);
|
|
170
148
|
font-size: 25px;
|
|
171
149
|
font-variation-settings: 'wght' 300;
|
|
172
150
|
font-weight: round(down, 300, 100);
|
|
173
151
|
place-items: center;
|
|
174
|
-
stroke: currentcolor;
|
|
175
|
-
stroke-linejoin: round;
|
|
176
|
-
stroke-width: max(0px, (300 - 400) / 326 * 1px);
|
|
177
|
-
|
|
178
|
-
--uikit-symbol-thinning: max(0px, (400 - 300) / 326 * 1px);
|
|
179
152
|
}
|
|
180
153
|
|
|
181
|
-
&:active > [data-activity-view-part='
|
|
154
|
+
&:active > [data-activity-view-part='symbol'] {
|
|
182
155
|
filter: brightness(0.9);
|
|
183
156
|
}
|
|
184
157
|
|
|
185
|
-
& >
|
|
158
|
+
& > [data-activity-view-part='label'] {
|
|
186
159
|
display: -webkit-box;
|
|
187
160
|
overflow: hidden;
|
|
188
161
|
-webkit-box-orient: vertical;
|
|
189
|
-
font-size: var(--font-
|
|
162
|
+
font-size: var(--font-ui-footnote-size);
|
|
190
163
|
font-style: normal;
|
|
191
|
-
font-variation-settings: 'wght' var(--font-
|
|
192
|
-
font-weight: round(down, var(--font-
|
|
193
|
-
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);
|
|
194
167
|
-webkit-line-clamp: 2;
|
|
195
168
|
line-height: 15px;
|
|
196
|
-
stroke: currentcolor;
|
|
197
|
-
stroke-linejoin: round;
|
|
198
|
-
stroke-width: max(
|
|
199
|
-
0px,
|
|
200
|
-
(var(--font-ios-footnote-weight) - 400) / 326 * 1px
|
|
201
|
-
);
|
|
202
|
-
|
|
203
|
-
--uikit-symbol-thinning: max(
|
|
204
|
-
0px,
|
|
205
|
-
(400 - var(--font-ios-footnote-weight)) / 326 * 1px
|
|
206
|
-
);
|
|
207
169
|
}
|
|
208
170
|
}
|
|
209
171
|
}
|
|
@@ -2,22 +2,23 @@ import '../glass/style.css';
|
|
|
2
2
|
import '../typography/style.css';
|
|
3
3
|
import './style.css';
|
|
4
4
|
import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
5
|
-
import type { AlertActionProps, AlertActionsProps } from './props.js';
|
|
6
|
-
export type { AlertActionProps, AlertActionVariant, AlertActionsProps, } from './props.js';
|
|
7
|
-
/** Its title and description
|
|
5
|
+
import type { AlertActionProps, AlertActionsProps, AlertHandle, AlertPopupProps } from './props.js';
|
|
6
|
+
export type { AlertActionProps, AlertActionVariant, AlertActionsProps, AlertHandle, AlertPopupProps, } from './props.js';
|
|
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
|
}>;
|
|
11
11
|
export declare const AlertActions: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AlertActionsProps> & {
|
|
12
12
|
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
13
13
|
}>;
|
|
14
|
+
/** `Alert.createHandle`, in a component: made once, for its lifetime. */
|
|
15
|
+
export declare const useCreateAlertHandle: <Payload = unknown>() => AlertHandle<Payload>;
|
|
14
16
|
/**
|
|
15
|
-
* An alert (
|
|
16
|
-
* `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
|
|
17
18
|
* text fields, and its buttons.
|
|
18
19
|
*/
|
|
19
20
|
export declare const Alert: {
|
|
20
|
-
Popup: import("preact").FunctionalComponent<import("react").PropsWithoutRef<
|
|
21
|
+
Popup: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AlertPopupProps> & {
|
|
21
22
|
ref?: import("preact").Ref<HTMLDivElement> | undefined;
|
|
22
23
|
}>;
|
|
23
24
|
Header: import("preact").FunctionalComponent<import("react").PropsWithoutRef<import("preact").HTMLAttributes<HTMLDivElement>> & {
|
|
@@ -41,6 +42,7 @@ export declare const Alert: {
|
|
|
41
42
|
Action: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AlertActionProps> & {
|
|
42
43
|
ref?: import("preact").Ref<HTMLButtonElement> | undefined;
|
|
43
44
|
}>;
|
|
45
|
+
createHandle: <Payload = unknown>() => AlertHandle<Payload>;
|
|
44
46
|
Root: typeof BaseAlertDialog.Root;
|
|
45
47
|
Backdrop: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/alert-dialog").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
48
|
Close: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/alert-dialog").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -48,6 +50,5 @@ export declare const Alert: {
|
|
|
48
50
|
Trigger: BaseAlertDialog.Trigger;
|
|
49
51
|
Viewport: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/alert-dialog").AlertDialogViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
52
|
Handle: typeof BaseAlertDialog.Handle;
|
|
51
|
-
createHandle: typeof BaseAlertDialog.createHandle;
|
|
52
53
|
};
|
|
53
54
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -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,
|
|
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"}
|
|
@@ -4,43 +4,55 @@ import '../typography/style.css';
|
|
|
4
4
|
import './style.css';
|
|
5
5
|
import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
6
6
|
import { Input as BaseInput } from '@base-ui/react/input';
|
|
7
|
-
import { forwardRef } from 'react';
|
|
8
|
-
import { cn } from '../utils/main.js';
|
|
9
|
-
//
|
|
10
|
-
//
|
|
7
|
+
import { forwardRef, useState } from 'react';
|
|
8
|
+
import { cn, usePortalContainer } from '../utils/main.js';
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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.
|
|
25
|
+
/**
|
|
26
|
+
* The alert at the viewport's center (or its `container`'s, if that's a
|
|
27
|
+
* containing block), the page dimmed behind it, in its portal.
|
|
28
|
+
*/
|
|
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) })] })));
|
|
30
|
+
/** Its title and description. */
|
|
30
31
|
export const AlertHeader = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, "data-alert-part": "header", ...props, className: cn('uikit-alert-header', className) })));
|
|
31
32
|
const Title = forwardRef(({ className, ...props }, ref) => (_jsx(BaseAlertDialog.Title, { ref: ref, className: cn('uikit-alert-title', className), "data-alert-part": "title", ...props })));
|
|
32
33
|
const Description = forwardRef(({ className, ...props }, ref) => (_jsx(BaseAlertDialog.Description, { ref: ref, className: cn('uikit-alert-description', className), "data-alert-part": "description", ...props })));
|
|
33
34
|
// Its text fields: on a gray fill, between separators, 19px above the
|
|
34
35
|
// buttons.
|
|
35
36
|
const Fields = forwardRef(({ className, ...props }, ref) => (_jsx("div", { ref: ref, className: cn('uikit-alert-fields', className), "data-alert-part": "fields", ...props })));
|
|
36
|
-
/** A text field (
|
|
37
|
+
/** A text field (Base UI's `Input`), in `Alert.Fields`. */
|
|
37
38
|
const Field = forwardRef(({ className, ...props }, ref) => (_jsx(BaseInput, { ref: ref, "data-alert-part": "field", ...props, className: cn('uikit-alert-field', className) })));
|
|
38
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) })));
|
|
39
40
|
/** A button, closing the alert. */
|
|
40
41
|
const Action = forwardRef(({ className, variant = 'secondary', ...props }, ref) => (_jsx(BaseAlertDialog.Close, { ref: ref, "data-alert-part": "action", "data-variant": variant, ...props, className: cn('uikit-alert-action', className) })));
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
-
* `AlertDialog`):
|
|
43
|
+
* A handle linking an alert to its triggers outside it, and opening or
|
|
44
|
+
* closing it imperatively (Base UI's `AlertDialog.createHandle`): pass it to
|
|
45
|
+
* the root's and the triggers' `handle` (in a component, see
|
|
46
|
+
* `useCreateAlertHandle`).
|
|
47
|
+
*/
|
|
48
|
+
const createHandle = () => BaseAlertDialog.createHandle();
|
|
49
|
+
/** `Alert.createHandle`, in a component: made once, for its lifetime. */
|
|
50
|
+
export const useCreateAlertHandle = () => {
|
|
51
|
+
const [handle] = useState(() => createHandle());
|
|
52
|
+
return handle;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* An alert (Base UI's `AlertDialog`): a modal panel with a title and description, optionally
|
|
44
56
|
* text fields, and its buttons.
|
|
45
57
|
*/
|
|
46
58
|
export const Alert = {
|
|
@@ -53,5 +65,6 @@ export const Alert = {
|
|
|
53
65
|
Field,
|
|
54
66
|
Actions: AlertActions,
|
|
55
67
|
Action,
|
|
68
|
+
createHandle,
|
|
56
69
|
};
|
|
57
70
|
//# sourceMappingURL=main.js.map
|
|
@@ -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,MAAM,OAAO,CAAC;
|
|
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,mEAAmE;AACnE,qDAAqD;AACrD,mEAAmE;AACnE,0EAA0E;AAC1E,2EAA2E;AAC3E,qEAAqE;AACrE,wEAAwE;AACxE,8EAA8E;AAC9E,2EAA2E;AAC3E,sBAAsB;AACt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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"}
|
|
@@ -1,8 +1,19 @@
|
|
|
1
1
|
import type { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
|
+
export type AlertPopupProps = Omit<BaseAlertDialog.Popup.Props, 'ref'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Where its portal renders it (Base UI's `AlertDialog.Portal`), e.g. a
|
|
6
|
+
* frame of the app's, centered in it if it's a containing block.
|
|
7
|
+
* @default document.body
|
|
8
|
+
*/
|
|
9
|
+
container?: BaseAlertDialog.Portal.Props['container'];
|
|
10
|
+
};
|
|
11
|
+
/** A handle linking an alert to its triggers outside it. */
|
|
12
|
+
export type AlertHandle<Payload = unknown> = BaseAlertDialog.Handle<Payload>;
|
|
3
13
|
export type AlertActionsProps = ComponentProps<'div'> & {
|
|
4
14
|
/**
|
|
5
|
-
* Stacked.
|
|
15
|
+
* Stacked (e.g. two long labels; more than two buttons stack by
|
|
16
|
+
* themselves).
|
|
6
17
|
* @default with more than two buttons, otherwise side by side
|
|
7
18
|
*/
|
|
8
19
|
stacked?: boolean;
|
|
@@ -10,7 +21,7 @@ export type AlertActionsProps = ComponentProps<'div'> & {
|
|
|
10
21
|
export type AlertActionVariant = 'destructive' | 'primary' | 'secondary';
|
|
11
22
|
export type AlertActionProps = Omit<BaseAlertDialog.Close.Props, 'ref'> & {
|
|
12
23
|
/**
|
|
13
|
-
*
|
|
24
|
+
* Its kind: primary (in the tint), secondary or destructive.
|
|
14
25
|
* @default 'secondary'
|
|
15
26
|
*/
|
|
16
27
|
variant?: AlertActionVariant;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/alert/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACtD
|
|
1
|
+
{"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/components/alert/props.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACvE;;;;OAIG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;CACvD,CAAC;AAEF,4DAA4D;AAC5D,MAAM,MAAM,WAAW,CAAC,OAAO,GAAG,OAAO,IAAI,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAE7E,MAAM,MAAM,iBAAiB,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG;IACtD;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG,SAAS,GAAG,WAAW,CAAC;AAEzE,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,GAAG;IACxE;;;OAGG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B,CAAC"}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
/* Alert (see main.tsx). */
|
|
2
2
|
@layer uikit-ish {
|
|
3
|
+
/* Its portal: no box of its own (its container's layout unchanged). */
|
|
4
|
+
.uikit-alert-portal {
|
|
5
|
+
display: contents;
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
/* (Shared: action-sheet.) */
|
|
4
9
|
.uikit-alert-panel {
|
|
5
10
|
display: flex;
|
|
6
11
|
width: 300px;
|
|
7
|
-
|
|
12
|
+
|
|
13
|
+
/* (Of its containing block: the viewport, or a container's.) */
|
|
14
|
+
max-width: calc(100% - 32px);
|
|
8
15
|
box-sizing: border-box;
|
|
9
16
|
flex-direction: column;
|
|
10
17
|
padding: 14px;
|
|
11
18
|
border-radius: 34px;
|
|
12
|
-
color: var(--color-
|
|
19
|
+
color: var(--color-ui-label);
|
|
13
20
|
gap: 10px;
|
|
14
21
|
outline: none;
|
|
15
22
|
}
|
|
@@ -19,6 +26,10 @@
|
|
|
19
26
|
--uikit-alert-dim: light-dark(rgb(0 0 0 / 20%), rgb(0 0 0 / 40%));
|
|
20
27
|
|
|
21
28
|
position: fixed;
|
|
29
|
+
|
|
30
|
+
/* An overlay: above the page's layers (e.g. Viewport's bars), overlays
|
|
31
|
+
among themselves in the order they open (see Menu). */
|
|
32
|
+
z-index: 100;
|
|
22
33
|
background-color: var(--uikit-alert-dim);
|
|
23
34
|
inset: 0;
|
|
24
35
|
transition: opacity 300ms;
|
|
@@ -32,6 +43,7 @@
|
|
|
32
43
|
/* (Shared: action-sheet.) */
|
|
33
44
|
.uikit-alert-centered {
|
|
34
45
|
position: fixed;
|
|
46
|
+
z-index: 100;
|
|
35
47
|
top: 50%;
|
|
36
48
|
left: 50%;
|
|
37
49
|
transition-duration: 300ms;
|
|
@@ -53,39 +65,23 @@
|
|
|
53
65
|
/* (Shared: action-sheet.) */
|
|
54
66
|
.uikit-alert-title {
|
|
55
67
|
margin: 0;
|
|
56
|
-
font-size: var(--font-
|
|
68
|
+
font-size: var(--font-ui-headline-size);
|
|
57
69
|
font-style: normal;
|
|
58
|
-
font-variation-settings: 'wght' var(--font-
|
|
59
|
-
font-weight: round(down, var(--font-
|
|
60
|
-
letter-spacing: var(--font-
|
|
61
|
-
line-height: var(--font-
|
|
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
|
+
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);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
/* (Shared: action-sheet.) */
|
|
73
77
|
.uikit-alert-description {
|
|
74
78
|
margin: 0;
|
|
75
|
-
font-size: var(--font-
|
|
79
|
+
font-size: var(--font-ui-body-size);
|
|
76
80
|
font-style: normal;
|
|
77
|
-
font-variation-settings: 'wght' var(--font-
|
|
78
|
-
font-weight: round(down, var(--font-
|
|
79
|
-
letter-spacing: var(--font-
|
|
80
|
-
line-height: var(--font-
|
|
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
|
-
);
|
|
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);
|
|
89
85
|
}
|
|
90
86
|
|
|
91
87
|
/* (Shared: action-sheet.) */
|
|
@@ -101,31 +97,26 @@
|
|
|
101
97
|
border: 0;
|
|
102
98
|
border-radius: 100px;
|
|
103
99
|
margin: 0;
|
|
104
|
-
background-color: var(--color-
|
|
105
|
-
color: var(--color-
|
|
100
|
+
background-color: var(--color-ui-secondary-system-fill);
|
|
101
|
+
color: var(--color-ui-label);
|
|
106
102
|
cursor: pointer;
|
|
107
103
|
font-family: inherit;
|
|
108
|
-
font-size: var(--font-
|
|
104
|
+
font-size: var(--font-ui-body-size);
|
|
109
105
|
font-style: normal;
|
|
110
106
|
font-variation-settings: 'wght' 510;
|
|
111
107
|
font-weight: round(down, 510, 100);
|
|
112
|
-
letter-spacing: var(--font-
|
|
113
|
-
line-height: var(--font-
|
|
108
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
109
|
+
line-height: var(--font-ui-body-line-height);
|
|
114
110
|
outline-offset: 2px;
|
|
115
|
-
stroke: currentcolor;
|
|
116
|
-
stroke-linejoin: round;
|
|
117
|
-
stroke-width: max(0px, (510 - 400) / 326 * 1px);
|
|
118
111
|
text-align: center;
|
|
119
112
|
transition: filter 150ms;
|
|
120
113
|
|
|
121
|
-
--uikit-symbol-thinning: max(0px, (400 - 510) / 326 * 1px);
|
|
122
|
-
|
|
123
114
|
&[data-variant='destructive'] {
|
|
124
|
-
color: var(--color-
|
|
115
|
+
color: var(--color-ui-system-red);
|
|
125
116
|
}
|
|
126
117
|
|
|
127
118
|
&[data-variant='primary'] {
|
|
128
|
-
background-color: var(--color-
|
|
119
|
+
background-color: var(--color-ui-primary);
|
|
129
120
|
color: #fff;
|
|
130
121
|
}
|
|
131
122
|
|
|
@@ -134,7 +125,7 @@
|
|
|
134
125
|
}
|
|
135
126
|
|
|
136
127
|
&:disabled {
|
|
137
|
-
color: var(--color-
|
|
128
|
+
color: var(--color-ui-tertiary-label);
|
|
138
129
|
cursor: default;
|
|
139
130
|
filter: none;
|
|
140
131
|
}
|
|
@@ -151,7 +142,7 @@
|
|
|
151
142
|
display: flex;
|
|
152
143
|
flex-direction: column;
|
|
153
144
|
border-radius: 26px;
|
|
154
|
-
background-color: var(--color-
|
|
145
|
+
background-color: var(--color-ui-secondary-system-fill);
|
|
155
146
|
margin-block-end: 9px;
|
|
156
147
|
}
|
|
157
148
|
|
|
@@ -169,25 +160,20 @@
|
|
|
169
160
|
center bottom / calc(100% - 32px) 1px no-repeat;
|
|
170
161
|
color: inherit;
|
|
171
162
|
font-family: inherit;
|
|
172
|
-
font-size: var(--font-
|
|
163
|
+
font-size: var(--font-ui-body-size);
|
|
173
164
|
font-style: normal;
|
|
174
165
|
font-variation-settings: 'wght' 510;
|
|
175
166
|
font-weight: round(down, 510, 100);
|
|
176
|
-
letter-spacing: var(--font-
|
|
167
|
+
letter-spacing: var(--font-ui-body-tracking);
|
|
177
168
|
line-height: 20px;
|
|
178
169
|
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
170
|
|
|
185
171
|
&:last-child {
|
|
186
172
|
background: none;
|
|
187
173
|
}
|
|
188
174
|
|
|
189
175
|
&::placeholder {
|
|
190
|
-
color: var(--color-
|
|
176
|
+
color: var(--color-ui-tertiary-label);
|
|
191
177
|
}
|
|
192
178
|
}
|
|
193
179
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './style.css';
|
|
2
|
-
import type { AvatarFallbackProps, AvatarGroupProps, AvatarRootProps } from './props.js';
|
|
3
|
-
export type { AvatarFallbackProps, AvatarGroupProps, AvatarRootProps, } from './props.js';
|
|
2
|
+
import type { AvatarFallbackProps, AvatarGroupProps, AvatarImageProps, AvatarRootProps } from './props.js';
|
|
3
|
+
export type { AvatarFallbackProps, AvatarGroupProps, AvatarImageProps, AvatarRootProps, } from './props.js';
|
|
4
4
|
/**
|
|
5
5
|
* An avatar (Base UI's `Avatar`): a person's photo, or their initials; or
|
|
6
6
|
* several people (`Avatar.Group`).
|
|
@@ -9,12 +9,14 @@ export declare const Avatar: {
|
|
|
9
9
|
Root: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AvatarRootProps> & {
|
|
10
10
|
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
11
11
|
}>;
|
|
12
|
+
Image: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AvatarImageProps> & {
|
|
13
|
+
ref?: import("preact").Ref<HTMLImageElement> | undefined;
|
|
14
|
+
}>;
|
|
12
15
|
Fallback: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AvatarFallbackProps> & {
|
|
13
16
|
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
14
17
|
}>;
|
|
15
18
|
Group: import("preact").FunctionalComponent<import("react").PropsWithoutRef<AvatarGroupProps> & {
|
|
16
19
|
ref?: import("preact").Ref<HTMLSpanElement> | undefined;
|
|
17
20
|
}>;
|
|
18
|
-
Image: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react/avatar").AvatarImageProps, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
|
|
19
21
|
};
|
|
20
22
|
//# sourceMappingURL=main.d.ts.map
|
|
@@ -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,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,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,27 +3,28 @@ 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`,
|
|
22
21
|
}, style), ...props, className: cn('uikit-avatar-root', className) })));
|
|
22
|
+
/** The person's photo, shown once it has loaded. */
|
|
23
|
+
const Image = forwardRef((props, ref) => (_jsx(BaseAvatar.Image, { ref: ref, "data-avatar-part": "image", ...props })));
|
|
23
24
|
/** Shown without an image: e.g. the person's initials (the app's). */
|
|
24
25
|
const Fallback = forwardRef(({ className, ...props }, ref) => (_jsx(BaseAvatar.Fallback, { ref: ref, "data-avatar-part": "fallback", ...props, className: cn('uikit-avatar-fallback', className) })));
|
|
25
26
|
/**
|
|
26
|
-
* Several people in one circle (
|
|
27
|
+
* Several people in one circle (a group): their `Avatar.Root`s (up to
|
|
27
28
|
* three shown); badges (`Badge`) on its corner.
|
|
28
29
|
*/
|
|
29
30
|
const Group = forwardRef(({ className, size, style, ...props }, ref) => (_jsx("span", { ref: ref, role: "group", style: withStyle({
|
|
@@ -36,6 +37,7 @@ const Group = forwardRef(({ className, size, style, ...props }, ref) => (_jsx("s
|
|
|
36
37
|
export const Avatar = {
|
|
37
38
|
...BaseAvatar,
|
|
38
39
|
Root,
|
|
40
|
+
Image,
|
|
39
41
|
Fallback,
|
|
40
42
|
Group,
|
|
41
43
|
};
|
|
@@ -1 +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,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