@oxy.so/bloom 2.11.0 → 2.12.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/docs/app-shell.mdx +90 -4
- package/docs/content-panel.mdx +65 -19
- package/docs/date-picker.mdx +80 -2
- package/docs/listing-card.mdx +54 -0
- package/docs/rating.mdx +52 -2
- package/docs/stay-search.mdx +38 -0
- package/lib/commonjs/app-shell/AppShell.js +121 -5
- package/lib/commonjs/app-shell/AppShell.js.map +1 -1
- package/lib/commonjs/app-shell/layout.js +10 -5
- package/lib/commonjs/app-shell/layout.js.map +1 -1
- package/lib/commonjs/content-panel/ContentPanel.js +8 -2
- package/lib/commonjs/content-panel/ContentPanel.js.map +1 -1
- package/lib/commonjs/content-panel/ContentPanel.web.js +38 -25
- package/lib/commonjs/content-panel/ContentPanel.web.js.map +1 -1
- package/lib/commonjs/date-picker/TimeField.js +175 -0
- package/lib/commonjs/date-picker/TimeField.js.map +1 -0
- package/lib/commonjs/date-picker/index.js +7 -0
- package/lib/commonjs/date-picker/index.js.map +1 -1
- package/lib/commonjs/date-picker/time.js +160 -0
- package/lib/commonjs/date-picker/time.js.map +1 -0
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.web.js +7 -0
- package/lib/commonjs/index.web.js.map +1 -1
- package/lib/commonjs/listing-card/ListingCard.js +34 -1
- package/lib/commonjs/listing-card/ListingCard.js.map +1 -1
- package/lib/commonjs/listing-card/WishlistCard.js +50 -8
- package/lib/commonjs/listing-card/WishlistCard.js.map +1 -1
- package/lib/commonjs/listing-card/shared.js +23 -1
- package/lib/commonjs/listing-card/shared.js.map +1 -1
- package/lib/commonjs/rating/RatingInput.js +218 -0
- package/lib/commonjs/rating/RatingInput.js.map +1 -0
- package/lib/commonjs/rating/index.js +7 -0
- package/lib/commonjs/rating/index.js.map +1 -1
- package/lib/commonjs/stay-search/DestinationSuggestions.js +46 -9
- package/lib/commonjs/stay-search/DestinationSuggestions.js.map +1 -1
- package/lib/commonjs/stay-search/GuestPicker.js +9 -0
- package/lib/commonjs/stay-search/GuestPicker.js.map +1 -1
- package/lib/commonjs/track-list/parts.js +0 -13
- package/lib/commonjs/track-list/parts.js.map +1 -1
- package/lib/module/app-shell/AppShell.js +121 -5
- package/lib/module/app-shell/AppShell.js.map +1 -1
- package/lib/module/app-shell/layout.js +10 -5
- package/lib/module/app-shell/layout.js.map +1 -1
- package/lib/module/content-panel/ContentPanel.js +8 -2
- package/lib/module/content-panel/ContentPanel.js.map +1 -1
- package/lib/module/content-panel/ContentPanel.web.js +38 -25
- package/lib/module/content-panel/ContentPanel.web.js.map +1 -1
- package/lib/module/date-picker/TimeField.js +170 -0
- package/lib/module/date-picker/TimeField.js.map +1 -0
- package/lib/module/date-picker/index.js +3 -0
- package/lib/module/date-picker/index.js.map +1 -1
- package/lib/module/date-picker/time.js +151 -0
- package/lib/module/date-picker/time.js.map +1 -0
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.web.js +1 -1
- package/lib/module/index.web.js.map +1 -1
- package/lib/module/listing-card/ListingCard.js +34 -1
- package/lib/module/listing-card/ListingCard.js.map +1 -1
- package/lib/module/listing-card/WishlistCard.js +50 -8
- package/lib/module/listing-card/WishlistCard.js.map +1 -1
- package/lib/module/listing-card/shared.js +22 -0
- package/lib/module/listing-card/shared.js.map +1 -1
- package/lib/module/rating/RatingInput.js +212 -0
- package/lib/module/rating/RatingInput.js.map +1 -0
- package/lib/module/rating/index.js +1 -0
- package/lib/module/rating/index.js.map +1 -1
- package/lib/module/stay-search/DestinationSuggestions.js +45 -9
- package/lib/module/stay-search/DestinationSuggestions.js.map +1 -1
- package/lib/module/stay-search/GuestPicker.js +9 -0
- package/lib/module/stay-search/GuestPicker.js.map +1 -1
- package/lib/module/track-list/parts.js +1 -14
- package/lib/module/track-list/parts.js.map +1 -1
- package/lib/typescript/commonjs/app-shell/AppShell.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/layout.d.ts +5 -4
- package/lib/typescript/commonjs/app-shell/layout.d.ts.map +1 -1
- package/lib/typescript/commonjs/app-shell/types.d.ts +12 -2
- package/lib/typescript/commonjs/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/content-panel/ContentPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/content-panel/ContentPanel.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/content-panel/types.d.ts +53 -42
- package/lib/typescript/commonjs/content-panel/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/TimeField.d.ts +6 -0
- package/lib/typescript/commonjs/date-picker/TimeField.d.ts.map +1 -0
- package/lib/typescript/commonjs/date-picker/index.d.ts +2 -1
- package/lib/typescript/commonjs/date-picker/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/date-picker/time.d.ts +56 -0
- package/lib/typescript/commonjs/date-picker/time.d.ts.map +1 -0
- package/lib/typescript/commonjs/date-picker/types.d.ts +49 -3
- package/lib/typescript/commonjs/date-picker/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.web.d.ts +2 -2
- package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-card/ListingCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-card/WishlistCard.d.ts +1 -1
- package/lib/typescript/commonjs/listing-card/WishlistCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-card/shared.d.ts +8 -1
- package/lib/typescript/commonjs/listing-card/shared.d.ts.map +1 -1
- package/lib/typescript/commonjs/listing-card/types.d.ts +37 -0
- package/lib/typescript/commonjs/listing-card/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/rating/RatingInput.d.ts +8 -0
- package/lib/typescript/commonjs/rating/RatingInput.d.ts.map +1 -0
- package/lib/typescript/commonjs/rating/index.d.ts +2 -1
- package/lib/typescript/commonjs/rating/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/rating/types.d.ts +31 -0
- package/lib/typescript/commonjs/rating/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-search/DestinationSuggestions.d.ts +8 -0
- package/lib/typescript/commonjs/stay-search/DestinationSuggestions.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts +6 -1
- package/lib/typescript/commonjs/stay-search/GuestPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/stay-search/types.d.ts +20 -0
- package/lib/typescript/commonjs/stay-search/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/track-list/parts.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/AppShell.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/layout.d.ts +5 -4
- package/lib/typescript/module/app-shell/layout.d.ts.map +1 -1
- package/lib/typescript/module/app-shell/types.d.ts +12 -2
- package/lib/typescript/module/app-shell/types.d.ts.map +1 -1
- package/lib/typescript/module/content-panel/ContentPanel.d.ts.map +1 -1
- package/lib/typescript/module/content-panel/ContentPanel.web.d.ts.map +1 -1
- package/lib/typescript/module/content-panel/types.d.ts +53 -42
- package/lib/typescript/module/content-panel/types.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/TimeField.d.ts +6 -0
- package/lib/typescript/module/date-picker/TimeField.d.ts.map +1 -0
- package/lib/typescript/module/date-picker/index.d.ts +2 -1
- package/lib/typescript/module/date-picker/index.d.ts.map +1 -1
- package/lib/typescript/module/date-picker/time.d.ts +56 -0
- package/lib/typescript/module/date-picker/time.d.ts.map +1 -0
- package/lib/typescript/module/date-picker/types.d.ts +49 -3
- package/lib/typescript/module/date-picker/types.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/index.web.d.ts +2 -2
- package/lib/typescript/module/index.web.d.ts.map +1 -1
- package/lib/typescript/module/listing-card/ListingCard.d.ts.map +1 -1
- package/lib/typescript/module/listing-card/WishlistCard.d.ts +1 -1
- package/lib/typescript/module/listing-card/WishlistCard.d.ts.map +1 -1
- package/lib/typescript/module/listing-card/shared.d.ts +8 -1
- package/lib/typescript/module/listing-card/shared.d.ts.map +1 -1
- package/lib/typescript/module/listing-card/types.d.ts +37 -0
- package/lib/typescript/module/listing-card/types.d.ts.map +1 -1
- package/lib/typescript/module/rating/RatingInput.d.ts +8 -0
- package/lib/typescript/module/rating/RatingInput.d.ts.map +1 -0
- package/lib/typescript/module/rating/index.d.ts +2 -1
- package/lib/typescript/module/rating/index.d.ts.map +1 -1
- package/lib/typescript/module/rating/types.d.ts +31 -0
- package/lib/typescript/module/rating/types.d.ts.map +1 -1
- package/lib/typescript/module/stay-search/DestinationSuggestions.d.ts +8 -0
- package/lib/typescript/module/stay-search/DestinationSuggestions.d.ts.map +1 -1
- package/lib/typescript/module/stay-search/GuestPicker.d.ts +6 -1
- package/lib/typescript/module/stay-search/GuestPicker.d.ts.map +1 -1
- package/lib/typescript/module/stay-search/types.d.ts +20 -0
- package/lib/typescript/module/stay-search/types.d.ts.map +1 -1
- package/lib/typescript/module/track-list/parts.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/app-shell/AppShell.tsx +91 -4
- package/src/app-shell/layout.ts +10 -5
- package/src/app-shell/types.ts +12 -2
- package/src/content-panel/ContentPanel.tsx +8 -2
- package/src/content-panel/ContentPanel.web.tsx +39 -25
- package/src/content-panel/types.ts +50 -42
- package/src/date-picker/TimeField.tsx +162 -0
- package/src/date-picker/index.ts +6 -0
- package/src/date-picker/time.ts +158 -0
- package/src/date-picker/types.ts +52 -3
- package/src/index.ts +9 -2
- package/src/index.web.ts +9 -2
- package/src/listing-card/ListingCard.tsx +34 -1
- package/src/listing-card/WishlistCard.tsx +42 -6
- package/src/listing-card/shared.ts +22 -0
- package/src/listing-card/types.ts +37 -0
- package/src/rating/RatingInput.tsx +214 -0
- package/src/rating/index.ts +9 -1
- package/src/rating/types.ts +33 -0
- package/src/stay-search/DestinationSuggestions.tsx +48 -9
- package/src/stay-search/GuestPicker.tsx +9 -0
- package/src/stay-search/types.ts +20 -0
- package/src/track-list/parts.tsx +1 -20
|
@@ -5,6 +5,7 @@ import { Platform, Pressable, View } from 'react-native';
|
|
|
5
5
|
import { resolveButtonRamps } from "../button/shared.js";
|
|
6
6
|
import { RiMapPinLine } from "../icons/remix/RiMapPinLine.js";
|
|
7
7
|
import { adoptStyleSheet } from "../styles/adopt-style-sheet.js";
|
|
8
|
+
import { DISABLED_OPACITY } from "../styles/tokens.js";
|
|
8
9
|
import { webDataSet } from "../styles/web-data.js";
|
|
9
10
|
import { useTheme } from "../theme/use-theme.js";
|
|
10
11
|
import { Text } from "../typography/index.js";
|
|
@@ -19,6 +20,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
19
20
|
*
|
|
20
21
|
* A `listbox` of `option`s. The list takes focus (web) and owns the arrow
|
|
21
22
|
* keys; the rows stay out of the tab order.
|
|
23
|
+
*
|
|
24
|
+
* A row can be `disabled` — "Use my location" while location permission is
|
|
25
|
+
* off. It stays in the list rather than disappearing, because a row that
|
|
26
|
+
* vanishes teaches nothing: it dims to `DISABLED_OPACITY`, carries
|
|
27
|
+
* `aria-disabled`, answers no press or Enter, is never highlighted by hover, and
|
|
28
|
+
* the arrow keys step OVER it. `disabledReason` replaces its description and is
|
|
29
|
+
* read after the title, so the row says why.
|
|
22
30
|
*/
|
|
23
31
|
|
|
24
32
|
const IS_WEB = Platform.OS === 'web';
|
|
@@ -33,6 +41,24 @@ const CSS = `
|
|
|
33
41
|
box-shadow: inset 0 0 0 2px var(--bloom-destination-ring, currentColor);
|
|
34
42
|
}
|
|
35
43
|
`;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The next row the arrow keys land on, stepping OVER every disabled one and
|
|
47
|
+
* wrapping once. `-1` when every row is disabled — the highlight then stays
|
|
48
|
+
* where it is rather than landing on a row that answers nothing. Pure.
|
|
49
|
+
*/
|
|
50
|
+
export function nextSelectable(items, from, step) {
|
|
51
|
+
const count = items.length;
|
|
52
|
+
if (count === 0) return -1;
|
|
53
|
+
// From "nothing highlighted", ArrowDown starts at the top and ArrowUp at the
|
|
54
|
+
// bottom, which is what the list did before any row could be disabled.
|
|
55
|
+
const start = from < 0 ? step === 1 ? 0 : count - 1 : (from + step + count) % count;
|
|
56
|
+
for (let i = 0; i < count; i++) {
|
|
57
|
+
const index = (start + step * i + count * count) % count;
|
|
58
|
+
if (!items[index]?.disabled) return index;
|
|
59
|
+
}
|
|
60
|
+
return -1;
|
|
61
|
+
}
|
|
36
62
|
function DestinationSuggestionsComponent({
|
|
37
63
|
items,
|
|
38
64
|
onSelect,
|
|
@@ -61,13 +87,16 @@ function DestinationSuggestionsComponent({
|
|
|
61
87
|
if (items.length === 0) return;
|
|
62
88
|
if (e.key === 'ArrowDown') {
|
|
63
89
|
e.preventDefault();
|
|
64
|
-
|
|
90
|
+
const next = nextSelectable(items, current, 1);
|
|
91
|
+
if (next >= 0) highlight(next);
|
|
65
92
|
} else if (e.key === 'ArrowUp') {
|
|
66
93
|
e.preventDefault();
|
|
67
|
-
|
|
94
|
+
const next = nextSelectable(items, current, -1);
|
|
95
|
+
if (next >= 0) highlight(next);
|
|
68
96
|
} else if (e.key === 'Enter' && current >= 0 && current < items.length) {
|
|
69
97
|
e.preventDefault();
|
|
70
|
-
|
|
98
|
+
const item = items[current];
|
|
99
|
+
if (!item.disabled) onSelect(item);
|
|
71
100
|
}
|
|
72
101
|
};
|
|
73
102
|
|
|
@@ -104,17 +133,23 @@ function DestinationSuggestionsComponent({
|
|
|
104
133
|
style: listStyle,
|
|
105
134
|
children: items.map((item, index) => {
|
|
106
135
|
const Icon = item.icon ?? RiMapPinLine;
|
|
107
|
-
const
|
|
136
|
+
const disabled = item.disabled === true;
|
|
137
|
+
const selected = index === current && !disabled;
|
|
138
|
+
const secondLine = disabled ? item.disabledReason ?? item.description : item.description;
|
|
108
139
|
return /*#__PURE__*/_jsxs(Pressable, {
|
|
109
140
|
role: "option",
|
|
110
|
-
accessibilityLabel:
|
|
141
|
+
accessibilityLabel: secondLine ? `${item.title}, ${secondLine}` : item.title,
|
|
111
142
|
"aria-selected": selected,
|
|
112
143
|
accessibilityState: {
|
|
113
|
-
selected
|
|
144
|
+
selected,
|
|
145
|
+
disabled
|
|
114
146
|
},
|
|
147
|
+
disabled: disabled,
|
|
115
148
|
focusable: false,
|
|
116
149
|
onPress: () => onSelect(item),
|
|
117
|
-
onHoverIn: () =>
|
|
150
|
+
onHoverIn: () => {
|
|
151
|
+
if (!disabled) highlight(index);
|
|
152
|
+
},
|
|
118
153
|
testID: testID ? `${testID}-${index}` : undefined,
|
|
119
154
|
style: {
|
|
120
155
|
flexDirection: 'row',
|
|
@@ -125,6 +160,7 @@ function DestinationSuggestionsComponent({
|
|
|
125
160
|
paddingLeft: 12,
|
|
126
161
|
paddingRight: 12,
|
|
127
162
|
borderRadius: 16,
|
|
163
|
+
opacity: disabled ? DISABLED_OPACITY : 1,
|
|
128
164
|
backgroundColor: selected ? palette.rowHighlight : 'transparent'
|
|
129
165
|
},
|
|
130
166
|
children: [/*#__PURE__*/_jsx(View, {
|
|
@@ -154,13 +190,13 @@ function DestinationSuggestionsComponent({
|
|
|
154
190
|
color: palette.text
|
|
155
191
|
},
|
|
156
192
|
children: item.title
|
|
157
|
-
}),
|
|
193
|
+
}), secondLine ? /*#__PURE__*/_jsx(Text, {
|
|
158
194
|
variant: "body-2-regular",
|
|
159
195
|
numberOfLines: 1,
|
|
160
196
|
style: {
|
|
161
197
|
color: palette.textSecondary
|
|
162
198
|
},
|
|
163
|
-
children:
|
|
199
|
+
children: secondLine
|
|
164
200
|
}) : null]
|
|
165
201
|
})]
|
|
166
202
|
}, item.id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","useCallback","useEffect","useMemo","useState","Platform","Pressable","View","resolveButtonRamps","RiMapPinLine","adoptStyleSheet","webDataSet","useTheme","Text","STAY_SEARCH_TILE_RADIUS","STAY_SEARCH_TILE_SIZE","useStaySearchPalette","jsx","_jsx","jsxs","_jsxs","IS_WEB","OS","ICON_SIZE","STYLE_ID","CSS","
|
|
1
|
+
{"version":3,"names":["React","memo","useCallback","useEffect","useMemo","useState","Platform","Pressable","View","resolveButtonRamps","RiMapPinLine","adoptStyleSheet","DISABLED_OPACITY","webDataSet","useTheme","Text","STAY_SEARCH_TILE_RADIUS","STAY_SEARCH_TILE_SIZE","useStaySearchPalette","jsx","_jsx","jsxs","_jsxs","IS_WEB","OS","ICON_SIZE","STYLE_ID","CSS","nextSelectable","items","from","step","count","length","start","i","index","disabled","DestinationSuggestionsComponent","onSelect","heading","highlightedIndex","onHighlightedIndexChange","accessibilityLabel","style","testID","theme","palette","accent","internal","setInternal","current","highlight","undefined","onKeyDown","e","key","preventDefault","next","item","webListProps","role","tabIndex","listStyle","gap","listName","children","variant","color","textSecondary","paddingLeft","paddingTop","paddingBottom","bloomDestinationList","map","Icon","icon","selected","secondLine","disabledReason","description","title","accessibilityState","focusable","onPress","onHoverIn","flexDirection","alignItems","paddingRight","borderRadius","opacity","backgroundColor","rowHighlight","width","height","tile","justifyContent","fill","text","flex","minWidth","numberOfLines","id","DestinationSuggestions","displayName"],"sourceRoot":"../../../src","sources":["stay-search/DestinationSuggestions.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC9E,SAASC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAExD,SAASC,kBAAkB,QAAQ,qBAAkB;AACrD,SAASC,YAAY,QAAQ,gCAA6B;AAC1D,SAASC,eAAe,QAAQ,gCAA6B;AAC7D,SAASC,gBAAgB,QAAQ,qBAAkB;AAEnD,SAASC,UAAU,QAAQ,uBAAoB;AAC/C,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,IAAI,QA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|
@@ -19,6 +19,11 @@ const COUNTED = ['adults', 'children'];
|
|
|
19
19
|
* them — the one guests picker, used by the search bar's "Who" panel and the
|
|
20
20
|
* booking card's guests popover alike. Then an optional note and "Close".
|
|
21
21
|
*
|
|
22
|
+
* The stepper button names travel too: `decrementLabel` / `incrementLabel`
|
|
23
|
+
* reach every row, so the two words a screen reader reads on the eight buttons
|
|
24
|
+
* are translatable like everything else the family draws. Their default is
|
|
25
|
+
* `Stepper`'s own English pair.
|
|
26
|
+
*
|
|
22
27
|
* Two rules:
|
|
23
28
|
* - while any child, infant or pet is counted, adults cannot go below 1 (the
|
|
24
29
|
* adults `−` disables there), and adding one of them with no adults sets
|
|
@@ -35,6 +40,8 @@ function GuestPickerComponent({
|
|
|
35
40
|
kinds = GUEST_KINDS,
|
|
36
41
|
labels,
|
|
37
42
|
descriptions,
|
|
43
|
+
decrementLabel,
|
|
44
|
+
incrementLabel,
|
|
38
45
|
note,
|
|
39
46
|
onClose,
|
|
40
47
|
closeLabel = 'Close',
|
|
@@ -69,6 +76,8 @@ function GuestPickerComponent({
|
|
|
69
76
|
min: kind === 'adults' ? minimumAdults(value) : 0,
|
|
70
77
|
max: maxFor(kind),
|
|
71
78
|
size: size,
|
|
79
|
+
decrementLabel: decrementLabel,
|
|
80
|
+
incrementLabel: incrementLabel,
|
|
72
81
|
onValueChange: n => onChange(applyGuestCount(value, kind, n)),
|
|
73
82
|
divider: index < kinds.length - 1,
|
|
74
83
|
testID: testID ? `${testID}-${kind}` : undefined
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","memo","View","Button","resolveButtonRamps","StepperRow","useTheme","Text","DEFAULT_GUEST_DESCRIPTIONS","DEFAULT_GUEST_LABELS","GUEST_KINDS","useGuestPickerClose","applyGuestCount","minimumAdults","jsx","_jsx","jsxs","_jsxs","COUNTED","GuestPickerComponent","value","onChange","max","maxGuests","kinds","labels","descriptions","note","onClose","closeLabel","size","style","testID","theme","neutral","contextClose","close","counted","reduce","sum","kind","maxFor","cap","includes","room","Math","min","children","map","index","description","title","undefined","onValueChange","n","divider","length","variant","color","paddingTop","alignItems","onPress","GuestPicker","displayName"],"sourceRoot":"../../../src","sources":["stay-search/GuestPicker.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,kBAAkB,QAAQ,qBAAkB;AACrD,SAASC,UAAU,QAAQ,qBAAY;AACvC,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,0BAA0B,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,gBAAa;AAC3F,SAASC,mBAAmB,QAAQ,cAAW;AAC/C,SAASC,eAAe,EAAEC,aAAa,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG1D;AACA,MAAMC,OAA6B,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAC;EAC5BC,KAAK;EACLC,QAAQ;EACRC,GAAG;EACHC,SAAS;EACTC,KAAK,GAAGd,WAAW;EACnBe,MAAM;EACNC,YAAY;EACZC,IAAI;EACJC,OAAO;EACPC,UAAU,GAAG,OAAO;EACpBC,IAAI,GAAG,QAAQ;EACfC,KAAK;EACLC;AACgB,CAAC,EAAE;EACnB,MAAMC,KAAK,
|
|
1
|
+
{"version":3,"names":["React","memo","View","Button","resolveButtonRamps","StepperRow","useTheme","Text","DEFAULT_GUEST_DESCRIPTIONS","DEFAULT_GUEST_LABELS","GUEST_KINDS","useGuestPickerClose","applyGuestCount","minimumAdults","jsx","_jsx","jsxs","_jsxs","COUNTED","GuestPickerComponent","value","onChange","max","maxGuests","kinds","labels","descriptions","decrementLabel","incrementLabel","note","onClose","closeLabel","size","style","testID","theme","neutral","contextClose","close","counted","reduce","sum","kind","maxFor","cap","includes","room","Math","min","children","map","index","description","title","undefined","onValueChange","n","divider","length","variant","color","paddingTop","alignItems","onPress","GuestPicker","displayName"],"sourceRoot":"../../../src","sources":["stay-search/GuestPicker.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,IAAI,QAAQ,OAAO;AACnC,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,kBAAkB,QAAQ,qBAAkB;AACrD,SAASC,UAAU,QAAQ,qBAAY;AACvC,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,IAAI,QAAQ,wBAAe;AACpC,SAASC,0BAA0B,EAAEC,oBAAoB,EAAEC,WAAW,QAAQ,gBAAa;AAC3F,SAASC,mBAAmB,QAAQ,cAAW;AAC/C,SAASC,eAAe,EAAEC,aAAa,QAAQ,aAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG1D;AACA,MAAMC,OAA6B,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC;;AAE5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,oBAAoBA,CAAC;EAC5BC,KAAK;EACLC,QAAQ;EACRC,GAAG;EACHC,SAAS;EACTC,KAAK,GAAGd,WAAW;EACnBe,MAAM;EACNC,YAAY;EACZC,cAAc;EACdC,cAAc;EACdC,IAAI;EACJC,OAAO;EACPC,UAAU,GAAG,OAAO;EACpBC,IAAI,GAAG,QAAQ;EACfC,KAAK;EACLC;AACgB,CAAC,EAAE;EACnB,MAAMC,KAAK,GAAG7B,QAAQ,CAAC,CAAC;EACxB,MAAM;IAAE8B;EAAQ,CAAC,GAAGhC,kBAAkB,CAAC+B,KAAK,CAAC;EAC7C,MAAME,YAAY,GAAG1B,mBAAmB,CAAC,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":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import React, { Fragment, memo, useMemo
|
|
3
|
+
import React, { Fragment, memo, useMemo } from 'react';
|
|
4
4
|
import { Image, View } from 'react-native';
|
|
5
5
|
import { GlyphButton } from '../button';
|
|
6
6
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuTrigger } from '../dropdown-menu';
|
|
@@ -8,7 +8,6 @@ import { RiMore2Fill } from "../icons/remix/RiMore2Fill.js";
|
|
|
8
8
|
import { RiMusic2Line } from "../icons/remix/RiMusic2Line.js";
|
|
9
9
|
import { resolvePhoto } from "../listing-card/shared.js";
|
|
10
10
|
import { useImageResolver } from "../image-resolver/context.js";
|
|
11
|
-
import { DISABLED_OPACITY, borderRadius } from "../styles/tokens.js";
|
|
12
11
|
import { useTheme } from "../theme/use-theme.js";
|
|
13
12
|
import { IS_WEB, resolveTrackListPaint } from "./shared.js";
|
|
14
13
|
|
|
@@ -36,18 +35,6 @@ export function TrackIconButton({
|
|
|
36
35
|
}) {
|
|
37
36
|
const theme = useTheme();
|
|
38
37
|
const paint = useMemo(() => resolveTrackListPaint(theme), [theme]);
|
|
39
|
-
const [hovered, setHovered] = useState(false);
|
|
40
|
-
const color = pressed && activeColor ? activeColor : hovered && !disabled ? paint.text : paint.textMuted;
|
|
41
|
-
const rootStyle = {
|
|
42
|
-
width: 32,
|
|
43
|
-
height: 32,
|
|
44
|
-
borderRadius: borderRadius.full,
|
|
45
|
-
alignItems: 'center',
|
|
46
|
-
justifyContent: 'center',
|
|
47
|
-
opacity: disabled ? DISABLED_OPACITY : 1,
|
|
48
|
-
'--bloom-track-ring': paint.ring
|
|
49
|
-
};
|
|
50
|
-
const toggle = pressed !== undefined;
|
|
51
38
|
return /*#__PURE__*/_jsx(GlyphButton, {
|
|
52
39
|
...aria,
|
|
53
40
|
icon: Icon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Fragment","memo","useMemo","
|
|
1
|
+
{"version":3,"names":["React","Fragment","memo","useMemo","Image","View","GlyphButton","DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuSeparator","DropdownMenuTrigger","RiMore2Fill","RiMusic2Line","resolvePhoto","useImageResolver","useTheme","IS_WEB","resolveTrackListPaint","jsx","_jsx","jsxs","_jsxs","TrackIconButton","icon","Icon","accessibilityLabel","onPress","disabled","pressed","activeColor","glyph","testID","accessibilityRole","_role","aria","theme","paint","size","glyphSize","color","textMuted","hoverColor","text","activeHoverColor","fill","hoverFill","ring","disabledOpacity","event","stopPropagation","TrackCover","cover","radius","dimmed","resolver","uri","undefined","style","width","height","borderRadius","overflow","backgroundColor","coverPlaceholder","alignItems","justifyContent","flexShrink","opacity","children","source","accessibilityIgnoresInvertColors","resizeMode","TrackMenu","items","label","open","onOpenChange","asChild","align","minWidth","map","item","i","variant","destructive","leading","key"],"sourceRoot":"../../../src","sources":["track-list/parts.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACtD,SAASC,KAAK,EAAEC,IAAI,QAAoC,cAAc;AAEtE,SAASC,WAAW,QAAQ,WAAW;AACvC,SACEC,YAAY,EACZC,mBAAmB,EACnBC,gBAAgB,EAChBC,qBAAqB,EACrBC,mBAAmB,QACd,kBAAkB;AACzB,SAASC,WAAW,QAAQ,+BAA4B;AACxD,SAASC,YAAY,QAAQ,gCAA6B;AAC1D,SAASC,YAAY,QAAQ,2BAAwB;AACrD,SAASC,gBAAgB,QAAQ,8BAA2B;AAE5D,SAASC,QAAQ,QAAQ,uBAAoB;AAC7C,SAASC,MAAM,EAAEC,qBAAqB,QAAQ,aAAU;;AAGxD;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAgBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAA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"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../../src/app-shell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAyB1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"AppShell.d.ts","sourceRoot":"","sources":["../../../../src/app-shell/AppShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAyB1E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAktB7C,eAAO,MAAM,QAAQ,2CAA0B,CAAC"}
|
|
@@ -5,10 +5,11 @@ export type ScrollMode = 'document' | 'container' | 'fixed';
|
|
|
5
5
|
* Which frame a shell actually gets.
|
|
6
6
|
*
|
|
7
7
|
* Native has no document, so `document` falls back to `container` there.
|
|
8
|
-
* `split`
|
|
9
|
-
* only expressible inside a bounded box
|
|
10
|
-
* one pane growing the page and the others pinned to
|
|
11
|
-
*
|
|
8
|
+
* `split` and `canvas` are the other reductions: a split's panes each own their
|
|
9
|
+
* scrolling, which is only expressible inside a bounded box (a document-
|
|
10
|
+
* scrolling split would have one pane growing the page and the others pinned to
|
|
11
|
+
* nothing), and a canvas is the viewport itself. Both resolve `document` to
|
|
12
|
+
* `fixed` (one screen) and honour `container` as-is.
|
|
12
13
|
*/
|
|
13
14
|
export declare function resolveScrollMode(variant: AppShellVariant, scroll: AppShellScroll): ScrollMode;
|
|
14
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/app-shell/layout.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5D
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/app-shell/layout.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,WAAW,EACjB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/D,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,OAAO,CAAC;AAE5D;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,cAAc,GAAG,UAAU,CAQ9F;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,WAA6D,CAAC;AAEzF,sDAAsD;AACtD,eAAO,MAAM,aAAa,EAAE,WAA6D,CAAC;AAE1F;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,WAG6B,CAAC;AAEtD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,WAAW,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAQrD"}
|
|
@@ -29,8 +29,14 @@ export type AppShellDrawer = 'overlay' | 'reveal';
|
|
|
29
29
|
* - `focus` — a single centred column of `contentWidth` and NO nav: sign-in,
|
|
30
30
|
* onboarding, a reader. It keeps the header, `topBar`, `bottomBar` and
|
|
31
31
|
* `floatingAction` slots, so a sign-up flow still gets its footer CTA.
|
|
32
|
+
* - `canvas` — the content is the SCREEN: one edge-to-edge area with no reading
|
|
33
|
+
* column, no max width and no padding, exactly one viewport tall, and the
|
|
34
|
+
* chrome floats over it. A map, a board, an editor, a photo viewer. Each
|
|
35
|
+
* region keeps its own inset (the nav is still a card with a gutter around
|
|
36
|
+
* it) so only the canvas runs to the edge. Like `split`, it never scrolls the
|
|
37
|
+
* document — the canvas owns its own panning and zooming.
|
|
32
38
|
*/
|
|
33
|
-
export type AppShellVariant = 'dashboard' | 'feed' | 'split' | 'focus';
|
|
39
|
+
export type AppShellVariant = 'dashboard' | 'feed' | 'split' | 'focus' | 'canvas';
|
|
34
40
|
/** Which single pane a `split` shell shows below `splitFrom`. */
|
|
35
41
|
export type AppShellPane = 'list' | 'detail' | 'info';
|
|
36
42
|
/** A tier from `BREAKPOINTS`, the one source of truth for widths. */
|
|
@@ -100,7 +106,11 @@ export interface AppShellProps {
|
|
|
100
106
|
asideWidth?: number;
|
|
101
107
|
/** The breakpoint the aside sits beside the content from. Defaults to `xl` (1280). */
|
|
102
108
|
asideFrom?: AppShellBreakpoint;
|
|
103
|
-
/**
|
|
109
|
+
/**
|
|
110
|
+
* Below `asideFrom`: `stack` (default) renders it after the content, `hidden`
|
|
111
|
+
* drops it. `canvas` always drops it — the screen is the canvas, so there is
|
|
112
|
+
* no column underneath to stack into.
|
|
113
|
+
*/
|
|
104
114
|
asideCollapse?: 'stack' | 'hidden';
|
|
105
115
|
children?: ReactNode;
|
|
106
116
|
/** The content column's max width. Defaults to 1300. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/app-shell/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;GAMG;AACH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,QAAQ,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/app-shell/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,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jB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPanel.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/ContentPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AAWpC,OAAO,KAAK,EAAgC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentPanel.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/ContentPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AAWpC,OAAO,KAAK,EAAgC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,wDAAwD;AACxD,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAwFpC,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPanel.web.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/ContentPanel.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AAapC,OAAO,KAAK,EAAgC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/E,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,6DAA6D;AAC7D,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentPanel.web.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/ContentPanel.web.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,OAAO,KAAe,MAAM,OAAO,CAAC;AAapC,OAAO,KAAK,EAAgC,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE/E,+DAA+D;AAC/D,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,6DAA6D;AAC7D,eAAO,MAAM,eAAe,IAAI,CAAC;AACjC,2DAA2D;AAC3D,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAsNpC,eAAO,MAAM,YAAY,+CAA8B,CAAC"}
|
|
@@ -49,6 +49,28 @@ export interface ContentPanelProps {
|
|
|
49
49
|
* For an app that wants its own elevation without giving up the hairline.
|
|
50
50
|
*/
|
|
51
51
|
shadow?: string;
|
|
52
|
+
/**
|
|
53
|
+
* The panel is the HEIGHT OF THE SPACE IT IS GIVEN, and its content scrolls
|
|
54
|
+
* inside it — instead of the panel growing with its content while the page
|
|
55
|
+
* scrolls underneath.
|
|
56
|
+
*
|
|
57
|
+
* This is what makes a framed column read as a panel: it reaches the bottom
|
|
58
|
+
* of the screen and closes there, the way the rail beside it does. Without
|
|
59
|
+
* it, a feed taller than the window gives a panel whose top edge you see and
|
|
60
|
+
* whose bottom edge is somewhere past the fold — an open-ended column, not a
|
|
61
|
+
* surface.
|
|
62
|
+
*
|
|
63
|
+
* It needs a parent that BOUNDS it (a flex column with a real height): an
|
|
64
|
+
* `AppShell` with `scroll="fixed"` or `scroll="container"`, or any screen
|
|
65
|
+
* that is `flex: 1`. In a document-scrolled page there is no height to fill
|
|
66
|
+
* and the panel keeps growing with its content — that page wants
|
|
67
|
+
* `scroll="document"`, not this prop.
|
|
68
|
+
*
|
|
69
|
+
* On web the content wrapper becomes the scroller. On native the panel and
|
|
70
|
+
* its content are already `flex: 1`, so a `FlatList`/`ScrollView` inside
|
|
71
|
+
* fills the panel and scrolls within it.
|
|
72
|
+
*/
|
|
73
|
+
fill?: boolean;
|
|
52
74
|
/** Override the surface background utility (defaults to `bg-card`). */
|
|
53
75
|
surfaceClassName?: string;
|
|
54
76
|
surfaceStyle?: StyleProp<ViewStyle>;
|
|
@@ -86,53 +108,42 @@ export interface ContentPanelProps {
|
|
|
86
108
|
*/
|
|
87
109
|
maskColor?: string;
|
|
88
110
|
/**
|
|
89
|
-
* How the WEB overlays (bleed-mask
|
|
90
|
-
* native (there are no overlays to size).
|
|
91
|
-
* - `'viewport'` (DEFAULT) — sized to the dynamic viewport height (`100dvh`)
|
|
92
|
-
* and `position: sticky`-pinned, so they read as a constant frame around
|
|
93
|
-
* the visible slice of a panel whose own DOM height can exceed one screen
|
|
94
|
-
* — the document-scroll case (e.g. a feed whose page grows with content).
|
|
95
|
-
* Requires the panel to sit in a document that actually scrolls; see
|
|
96
|
-
* `ContentPanel.web.tsx`'s doc comment.
|
|
97
|
-
* - `'panel'` — sized to the panel's own real box via CSS Grid layer-
|
|
98
|
-
* stacking (the overlays and the content wrapper all occupy the same
|
|
99
|
-
* grid cell) instead of viewport math. The right mode for a consumer
|
|
100
|
-
* whose own shell already bounds the panel's height (no document
|
|
101
|
-
* scroll — a fixed app shell with its own internal scroll containers),
|
|
102
|
-
* where anything the consumer places outside the panel (e.g. a header
|
|
103
|
-
* above it) must never be overlapped by an overlay sized to the whole
|
|
104
|
-
* viewport.
|
|
105
|
-
*/
|
|
106
|
-
/**
|
|
107
|
-
* DEFAULT `'panel'`. The edge describes the panel's OWN box, so it scrolls
|
|
108
|
-
* with the content like any other border: on a page taller than the screen
|
|
109
|
-
* you see the two side edges while scrolling and the rounded corners at the
|
|
110
|
-
* ends, which is what a long framed column looks like.
|
|
111
|
+
* How the WEB overlays (the bleed-mask and the border frame) size themselves.
|
|
112
|
+
* No-op on native (there are no overlays to size).
|
|
111
113
|
*
|
|
112
|
-
* `'viewport'`
|
|
113
|
-
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
114
|
+
* - `'viewport'` (DEFAULT) — the frame is a SCREEN-TALL sticky rectangle:
|
|
115
|
+
* `100dvh` minus the insets, pinned at `overlayInset`. The panel's own box
|
|
116
|
+
* grows with its content and the document scrolls it, while the edge stays
|
|
117
|
+
* where the screen is — so the panel reads as a surface that occupies the
|
|
118
|
+
* window from top to bottom and the content moves inside it. This is the
|
|
119
|
+
* mode for a page that scrolls the document.
|
|
120
|
+
* - `'panel'` — the overlays are the panel's OWN box, through CSS Grid
|
|
121
|
+
* layer-stacking (the overlays and the content wrapper share one grid
|
|
122
|
+
* cell). The right mode when the panel's box already IS the visible area
|
|
123
|
+
* (`fill`, inside a shell that bounds it) or when something the consumer
|
|
124
|
+
* placed outside the panel — a header above it — must never be painted
|
|
125
|
+
* over by an overlay sized to the whole viewport.
|
|
118
126
|
*/
|
|
119
127
|
overlaySizing?: 'viewport' | 'panel';
|
|
120
128
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
129
|
+
* The gap between the VIEWPORT's edge and the sticky frame, in `'viewport'`
|
|
130
|
+
* mode. Default 8.
|
|
131
|
+
*
|
|
132
|
+
* **It must equal the distance from the top of the screen to the panel's own
|
|
133
|
+
* top edge.** Sticky positioning leaves an element at its static position
|
|
134
|
+
* until scrolling would push it past the inset — so a panel that starts 16px
|
|
135
|
+
* down the page with an 8px inset draws its frame at 16, then SNAPS it to 8
|
|
136
|
+
* on the first scroll. That 8px jump is the whole bug, and it reads as the
|
|
137
|
+
* panel breathing. A shell passes its own gutter here.
|
|
126
138
|
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
130
|
-
*
|
|
131
|
-
* where the panel visually starts without moving the panel's own DOM
|
|
132
|
-
* position, so the overlays would still read from viewport 0 and paint
|
|
133
|
-
* over that chrome. This shifts their `top` down and shrinks their height
|
|
134
|
-
* by the same amount, so they begin exactly where the panel visually does.
|
|
139
|
+
* Takes a pair when the top and the bottom differ — persistent chrome above
|
|
140
|
+
* the panel (a sticky header the consumer keeps outside it) shifts where the
|
|
141
|
+
* panel visually starts without moving its DOM position, so the frame has to
|
|
142
|
+
* start lower without also ending higher.
|
|
135
143
|
*/
|
|
136
|
-
|
|
144
|
+
overlayInset?: number | {
|
|
145
|
+
top: number;
|
|
146
|
+
bottom: number;
|
|
147
|
+
};
|
|
137
148
|
}
|
|
138
149
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/content-panel/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9D;;;;;;;;GAQG;AACH,MAAM,MAAM,4BAA4B,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC;AAElE,kDAAkD;AAClD,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEhE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,4BAA4B,CAAC;IAC1C;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE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;;;;;;;;;;;;;OAkBG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qDAAqD;IACrD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACpC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;;;;;;;;;;OAgBG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACrC;;;;;;;;;;;;;;;OAeG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACzD"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TimeFieldProps } from './types';
|
|
3
|
+
declare function TimeFieldComponent({ value, onChange, min, max, step, hourFormat, size, disabled, accessibilityLabel, placeholder, width, style, testID, }: TimeFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
export declare const TimeField: React.MemoExoticComponent<typeof TimeFieldComponent>;
|
|
5
|
+
export {};
|
|
6
|
+
//# sourceMappingURL=TimeField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TimeField.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/TimeField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAUlE,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,SAAS,CAAC;AA6C7D,iBAAS,kBAAkB,CAAC,EAC1B,KAAK,EACL,QAAQ,EACR,GAAG,EACH,GAAG,EACH,IAAQ,EACR,UAAkB,EAClB,IAAe,EACf,QAAgB,EAChB,kBAAkB,EAClB,WAAW,EACX,KAAK,EACL,KAAK,EACL,MAAM,GACP,EAAE,cAAc,2CAyFhB;AAED,eAAO,MAAM,SAAS,sDAA2B,CAAC"}
|
|
@@ -2,5 +2,6 @@ export { Calendar, RangeCalendar } from './Calendar';
|
|
|
2
2
|
export { DatePicker } from './DatePicker';
|
|
3
3
|
export { DateRangePicker } from './DateRangePicker';
|
|
4
4
|
export { MeetingScheduler } from './MeetingScheduler';
|
|
5
|
-
export
|
|
5
|
+
export { TimeField } from './TimeField';
|
|
6
|
+
export type { CalendarConstraintProps, CalendarProps, DatePickerProps, DateRange, DateRangePickerProps, HourFormat, MeetingSchedulerDetails, MeetingSchedulerHost, MeetingSchedulerHourFormat, MeetingSchedulerLabels, MeetingSchedulerProps, MeetingSchedulerValue, RangeCalendarProps, TimeFieldProps, TimeFieldSize, WeekStart, } from './types';
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,YAAY,EACV,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,SAAS,EACT,oBAAoB,EACpB,UAAU,EACV,uBAAuB,EACvB,oBAAoB,EACpB,0BAA0B,EAC1B,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,EAClB,cAAc,EACd,aAAa,EACb,SAAS,GACV,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { HourFormat } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Time of day as the family already spells it: a 24-hour `"HH:mm"` string.
|
|
4
|
+
* `MeetingScheduler`'s `timeSlots` and `MeetingSchedulerValue.time` are the same
|
|
5
|
+
* shape, so a `TimeField` value drops straight into one.
|
|
6
|
+
*
|
|
7
|
+
* Everything here is pure, exported, and where the parsing rules live — a field
|
|
8
|
+
* that keeps its own draft cannot be tested through the DOM for every spelling
|
|
9
|
+
* somebody might type.
|
|
10
|
+
*/
|
|
11
|
+
/** Minutes since midnight, `0..1439`. */
|
|
12
|
+
export type Minutes = number;
|
|
13
|
+
/** `"14:30"` → 870. `null` for anything that is not a 24h `HH:mm`. */
|
|
14
|
+
export declare function toMinutes(value: string): Minutes | null;
|
|
15
|
+
/** 870 → `"14:30"`. Wraps within the day, so 1440 is `"00:00"`. */
|
|
16
|
+
export declare function fromMinutes(minutes: Minutes): string;
|
|
17
|
+
/** `"14:30"` → `"14:30"` (24h) or `"2:30 PM"` (12h). */
|
|
18
|
+
export declare function formatTime(value: string, hourFormat: HourFormat): string;
|
|
19
|
+
/**
|
|
20
|
+
* What somebody typed → `"HH:mm"`, or `null` when it is not a time.
|
|
21
|
+
*
|
|
22
|
+
* Deliberately forgiving, because a field that only accepts what it printed is
|
|
23
|
+
* a field people fight: `9`, `930`, `9.30`, `9:3`, `0930`, `9 30`, `9pm`,
|
|
24
|
+
* `9:30 p.m.` and `21:30` all parse. A bare number under 24 is an HOUR (`9` is
|
|
25
|
+
* 09:00), four digits are `HHMM` (`0930`); `AM`/`PM` decides the half of the
|
|
26
|
+
* day whatever `hourFormat` says, because somebody who typed `pm` means pm.
|
|
27
|
+
* Without a marker, 24h reads the hour as given and 12h keeps `1..12` in the
|
|
28
|
+
* morning — the value is still `"HH:mm"`, so a caller never has to know which.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseTime(text: string, hourFormat?: HourFormat): string | null;
|
|
31
|
+
/**
|
|
32
|
+
* The nearest multiple of `step` minutes (or the next one up/down, per
|
|
33
|
+
* `round`), at or after `min` and at or before `max`. `step` counts from
|
|
34
|
+
* MIDNIGHT, so 15 gives :00 :15 :30 :45 whatever the bounds are — a step
|
|
35
|
+
* measured from `min` would put the round times off the grid the moment a shop
|
|
36
|
+
* opened at 09:10. Never crosses the end of the day: 23:59 rounded up to a
|
|
37
|
+
* 30-minute grid stays inside it rather than wrapping to the other end.
|
|
38
|
+
*/
|
|
39
|
+
export declare function snapTime(value: string, { step, min, max, round, }?: {
|
|
40
|
+
step?: number;
|
|
41
|
+
min?: string;
|
|
42
|
+
max?: string;
|
|
43
|
+
round?: 'nearest' | 'up' | 'down';
|
|
44
|
+
}): string | null;
|
|
45
|
+
/**
|
|
46
|
+
* One arrow press: `direction * step` minutes from `value`, or the first time
|
|
47
|
+
* inside the bounds when there is no value yet. Clamps at the bounds rather
|
|
48
|
+
* than wrapping — a wrap past `max` back to `min` reads as the field refusing
|
|
49
|
+
* the key.
|
|
50
|
+
*/
|
|
51
|
+
export declare function stepTime(value: string | null, direction: 1 | -1, { step, min, max }?: {
|
|
52
|
+
step?: number;
|
|
53
|
+
min?: string;
|
|
54
|
+
max?: string;
|
|
55
|
+
}): string | null;
|
|
56
|
+
//# sourceMappingURL=time.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"time.d.ts","sourceRoot":"","sources":["../../../../src/date-picker/time.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C;;;;;;;;GAQG;AAEH,yCAAyC;AACzC,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAI7B,sEAAsE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