@krapwoo/ds-viewer 0.4.7 → 0.4.9
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/README.md +21 -6
- package/dist/cli/dev.js +66 -37
- package/dist/cli/doctor.js +4 -2
- package/dist/cli/endpoint.js +33 -0
- package/dist/cli/init.js +5 -8
- package/dist/native/catalog/comparison.js +17 -8
- package/native/catalog/CatalogShell.tsx +5 -1
- package/native/catalog/ComparisonGrid.tsx +5 -1
- package/native/catalog/ComparisonGroups.tsx +7 -1
- package/native/catalog/ComparisonList.tsx +7 -1
- package/native/catalog/PhoneFrame.tsx +108 -24
- package/native/catalog/ReferenceDetails.tsx +8 -0
- package/native/catalog/SectionBlock.tsx +10 -4
- package/native/catalog/SpecimenAddress.tsx +15 -0
- package/native/catalog/SpecimenSurface.tsx +66 -4
- package/native/catalog/UpdatePanel.tsx +114 -103
- package/native/catalog/comparison.ts +21 -8
- package/native/catalog/deviceFrame.ts +14 -0
- package/native/catalog/overlayViewport.ts +4 -2
- package/native/catalog/specimenSurfaceStyle.ts +54 -0
- package/native/catalog/updatePanelState.ts +68 -1
- package/package.json +5 -4
- package/starter-kit/components/AnimatedChevron/AnimatedChevron.catalog.tsx +1 -1
- package/starter-kit/components/Avatar/Avatar.catalog.tsx +1 -1
- package/starter-kit/components/Badge/Badge.catalog.tsx +1 -1
- package/starter-kit/components/Banner/Banner.catalog.tsx +2 -1
- package/starter-kit/components/BottomSheet/BottomSheet.catalog.tsx +5 -1
- package/starter-kit/components/Button/Button.catalog.tsx +1 -1
- package/starter-kit/components/ButtonGroup/ButtonGroup.catalog.tsx +8 -1
- package/starter-kit/components/Card/Card.catalog.tsx +2 -1
- package/starter-kit/components/Checkbox/Checkbox.catalog.tsx +2 -2
- package/starter-kit/components/Dialog/Dialog.catalog.tsx +1 -1
- package/starter-kit/components/Divider/Divider.catalog.tsx +2 -1
- package/starter-kit/components/Dock/Dock.catalog.tsx +4 -1
- package/starter-kit/components/Dropdown/Dropdown.catalog.tsx +1 -1
- package/starter-kit/components/EmptyState/EmptyState.catalog.tsx +2 -1
- package/starter-kit/components/FieldContainer/FieldContainer.catalog.tsx +5 -1
- package/starter-kit/components/InputClearButton/InputClearButton.catalog.tsx +1 -1
- package/starter-kit/components/InputField/InputField.catalog.tsx +3 -1
- package/starter-kit/components/List/List.catalog.tsx +2 -1
- package/starter-kit/components/ListItem/ListItem.catalog.tsx +7 -1
- package/starter-kit/components/Loading/Loading.catalog.tsx +2 -1
- package/starter-kit/components/Pill/Pill.catalog.tsx +1 -1
- package/starter-kit/components/PillRow/PillRow.catalog.tsx +1 -1
- package/starter-kit/components/ProgressDots/ProgressDots.catalog.tsx +1 -1
- package/starter-kit/components/Radio/Radio.catalog.tsx +2 -2
- package/starter-kit/components/SearchField/SearchField.catalog.tsx +2 -1
- package/starter-kit/components/SectionHeader/SectionHeader.catalog.tsx +2 -1
- package/starter-kit/components/SegmentedToggle/SegmentedToggle.catalog.tsx +1 -3
- package/starter-kit/components/Shimmer/Breathing.catalog.tsx +2 -1
- package/starter-kit/components/Shimmer/Shimmer.catalog.tsx +2 -1
- package/starter-kit/components/Shimmer/SkeletonGroup.catalog.tsx +5 -1
- package/starter-kit/components/Surface/Surface.catalog.tsx +2 -1
- package/starter-kit/components/Switch/Switch.catalog.tsx +2 -2
- package/starter-kit/components/TextArea/TextArea.catalog.tsx +2 -1
- package/starter-kit/components/Toast/Toast.catalog.tsx +2 -1
- package/starter-kit/components/Tooltip/Tooltip.catalog.tsx +2 -1
- package/starter-kit/components/TopNav/TopNav.catalog.tsx +4 -1
- package/starter-kit/components/UnderlineTabs/UnderlineTabs.catalog.tsx +1 -3
- package/starter-kit/pages/ReportIssue.catalog.tsx +18 -1
- package/starter-kit/pages/SavedTrips.catalog.tsx +27 -6
- package/starter-kit/pages/TripPlannerForm.catalog.tsx +7 -1
|
@@ -27,10 +27,11 @@ const styles = StyleSheet.create({
|
|
|
27
27
|
// fixed TopNav header and Dock footer around a scrollable middle, the same fixed-header/
|
|
28
28
|
// scrollable-body/fixed-footer shape a real screen would use.
|
|
29
29
|
savedTripsScreen: { flex: 1, alignSelf: 'stretch' },
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
// Takes the space between the TopNav and the Dock and scrolls (`minHeight: 0` lets a flex child
|
|
31
|
+
// shrink below its content on the web).
|
|
32
|
+
savedTripsScroll: { flex: 1, minHeight: 0 },
|
|
33
|
+
// The muted area between TopNav and Dock takes the remaining height, so the list scrolls there.
|
|
34
|
+
savedTripsBody: { flex: 1, minHeight: 0 },
|
|
34
35
|
savedTripsScrollContent: { padding: DS_SPACING[800], gap: DS_SPACING[600] },
|
|
35
36
|
// Shared by SavedTrips' small inline rows — the "Updating arrival times…" loading row and each
|
|
36
37
|
// list row's trailing badge+button cluster (identical layout, one key).
|
|
@@ -127,7 +128,7 @@ function SavedTripsDemo() {
|
|
|
127
128
|
</Tooltip>
|
|
128
129
|
}
|
|
129
130
|
/>
|
|
130
|
-
<Surface tone="muted">
|
|
131
|
+
<Surface tone="muted" style={styles.savedTripsBody}>
|
|
131
132
|
<ScrollView style={styles.savedTripsScroll} contentContainerStyle={styles.savedTripsScrollContent}>
|
|
132
133
|
<SearchField value={query} onChangeText={setQuery} placeholder="Search stations" />
|
|
133
134
|
<SegmentedToggle
|
|
@@ -239,7 +240,27 @@ function SavedTripsDemo() {
|
|
|
239
240
|
}
|
|
240
241
|
|
|
241
242
|
export default defineCatalogPage({
|
|
242
|
-
group: '
|
|
243
|
+
group: 'Patterns',
|
|
244
|
+
composedOf: [
|
|
245
|
+
{ component: 'TopNav', role: "The screen header, titled Saved trips, with a Filters button.", relationship: 'built-in' },
|
|
246
|
+
{ component: 'Tooltip', role: "The Filter by mode hint on the Filters button.", relationship: 'built-in' },
|
|
247
|
+
{ component: 'Surface', role: "The muted background behind the search, toggles and list.", relationship: 'built-in' },
|
|
248
|
+
{ component: 'SearchField', role: "Searches stations.", relationship: 'built-in' },
|
|
249
|
+
{ component: 'SegmentedToggle', role: "Switches between List and Map views.", relationship: 'built-in' },
|
|
250
|
+
{ component: 'UnderlineTabs', role: "The All, Nearby and Favorites tabs.", relationship: 'built-in' },
|
|
251
|
+
{ component: 'PillRow', role: "Mode filter pills.", relationship: 'built-in' },
|
|
252
|
+
{ component: 'Loading', role: "The small spinner beside Updating arrival times.", relationship: 'built-in' },
|
|
253
|
+
{ component: 'Dropdown', role: "The Sort by picker.", relationship: 'built-in' },
|
|
254
|
+
{ component: 'SectionHeader', role: "The Nearby stations heading.", relationship: 'built-in' },
|
|
255
|
+
{ component: 'List', role: "Holds the saved-trip rows with dividers.", relationship: 'built-in' },
|
|
256
|
+
{ component: 'ListItem', role: "Each saved trip row.", relationship: 'built-in' },
|
|
257
|
+
{ component: 'Avatar', role: "Each row's mode icon.", relationship: 'built-in' },
|
|
258
|
+
{ component: 'Badge', role: "Each row's status, e.g. delays.", relationship: 'built-in' },
|
|
259
|
+
{ component: 'Button', role: "The Filters button, each row's remove button, and Plan a new trip.", relationship: 'built-in' },
|
|
260
|
+
{ component: 'EmptyState', role: "Shown instead of the list on an empty tab (Favorites, or after removing every row).", relationship: 'built-in' },
|
|
261
|
+
{ component: 'Toast', role: "Confirms a removed trip, with Undo.", relationship: 'built-in' },
|
|
262
|
+
{ component: 'Dock', role: "The bottom bar holding Plan a new trip.", relationship: 'built-in' },
|
|
263
|
+
],
|
|
243
264
|
description: 'A composed real screen — a saved-trips list with a search bar, tab switcher, mode filter pills, a sort Dropdown, and a bottom action bar. Switch to the "Favorites" tab (or remove every row) to see the EmptyState alternative to the list; tap the header icon to see its Tooltip; tap a row\'s trailing × to see the Toast, which only appears after that real action and auto-dismisses (or Undo) — remove two rows back-to-back and each removal gets its own stacked toast on its own clock.',
|
|
244
265
|
tokenGallery: true,
|
|
245
266
|
fullWidthLabel: 'Preview',
|
|
@@ -40,7 +40,13 @@ function TripPlannerFormDemo() {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export default defineCatalogPage({
|
|
43
|
-
group: '
|
|
43
|
+
group: 'Patterns',
|
|
44
|
+
composedOf: [
|
|
45
|
+
{ component: 'Card', role: "Frames the whole form.", relationship: 'built-in' },
|
|
46
|
+
{ component: 'InputField', role: "The From and To fields.", relationship: 'built-in' },
|
|
47
|
+
{ component: 'Divider', role: "Separates the fields from the actions.", relationship: 'built-in' },
|
|
48
|
+
{ component: 'Button', role: "Add stop (tertiary) and Continue (primary, disabled until To is filled).", relationship: 'built-in' },
|
|
49
|
+
],
|
|
44
50
|
description: 'A composed real screen — not one component in isolation — showing how Card, InputField, Divider, and Button actually fit together: a From/To trip form with a secondary "Add stop" action and a primary "Continue" that\'s disabled until a destination is entered.',
|
|
45
51
|
tokenGallery: true,
|
|
46
52
|
fullWidthLabel: 'Preview',
|