@spatika/react 1.0.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/README.md +72 -0
- package/dist/composites/ActionBar.d.ts +7 -0
- package/dist/composites/ActionBar.d.ts.map +1 -0
- package/dist/composites/ActionBar.js +5 -0
- package/dist/composites/AmountInput.d.ts +10 -0
- package/dist/composites/AmountInput.d.ts.map +1 -0
- package/dist/composites/AmountInput.js +7 -0
- package/dist/composites/AppHeader.d.ts +25 -0
- package/dist/composites/AppHeader.d.ts.map +1 -0
- package/dist/composites/AppHeader.js +13 -0
- package/dist/composites/AppSidebar.d.ts +30 -0
- package/dist/composites/AppSidebar.d.ts.map +1 -0
- package/dist/composites/AppSidebar.js +15 -0
- package/dist/composites/BottomSheet.d.ts +36 -0
- package/dist/composites/BottomSheet.d.ts.map +1 -0
- package/dist/composites/BottomSheet.js +37 -0
- package/dist/composites/Breadcrumb.d.ts +10 -0
- package/dist/composites/Breadcrumb.d.ts.map +1 -0
- package/dist/composites/Breadcrumb.js +10 -0
- package/dist/composites/Callout.d.ts +8 -0
- package/dist/composites/Callout.d.ts.map +1 -0
- package/dist/composites/Callout.js +5 -0
- package/dist/composites/Card.d.ts +31 -0
- package/dist/composites/Card.d.ts.map +1 -0
- package/dist/composites/Card.js +33 -0
- package/dist/composites/Chip.d.ts +13 -0
- package/dist/composites/Chip.d.ts.map +1 -0
- package/dist/composites/Chip.js +59 -0
- package/dist/composites/ChipGroup.d.ts +23 -0
- package/dist/composites/ChipGroup.d.ts.map +1 -0
- package/dist/composites/ChipGroup.js +27 -0
- package/dist/composites/CommandSearchField.d.ts +27 -0
- package/dist/composites/CommandSearchField.d.ts.map +1 -0
- package/dist/composites/CommandSearchField.js +17 -0
- package/dist/composites/CoverHero.d.ts +51 -0
- package/dist/composites/CoverHero.d.ts.map +1 -0
- package/dist/composites/CoverHero.js +71 -0
- package/dist/composites/CoverPattern.d.ts +12 -0
- package/dist/composites/CoverPattern.d.ts.map +1 -0
- package/dist/composites/CoverPattern.js +14 -0
- package/dist/composites/DataTableToolbar.d.ts +13 -0
- package/dist/composites/DataTableToolbar.d.ts.map +1 -0
- package/dist/composites/DataTableToolbar.js +7 -0
- package/dist/composites/DividerLabel.d.ts +5 -0
- package/dist/composites/DividerLabel.d.ts.map +1 -0
- package/dist/composites/DividerLabel.js +5 -0
- package/dist/composites/EmptyState.d.ts +16 -0
- package/dist/composites/EmptyState.d.ts.map +1 -0
- package/dist/composites/EmptyState.js +10 -0
- package/dist/composites/EntityCard.d.ts +31 -0
- package/dist/composites/EntityCard.d.ts.map +1 -0
- package/dist/composites/EntityCard.js +21 -0
- package/dist/composites/EntityMediaCard.d.ts +25 -0
- package/dist/composites/EntityMediaCard.d.ts.map +1 -0
- package/dist/composites/EntityMediaCard.js +17 -0
- package/dist/composites/FilterSheet.d.ts +34 -0
- package/dist/composites/FilterSheet.d.ts.map +1 -0
- package/dist/composites/FilterSheet.js +36 -0
- package/dist/composites/FloatingPageChrome.d.ts +90 -0
- package/dist/composites/FloatingPageChrome.d.ts.map +1 -0
- package/dist/composites/FloatingPageChrome.js +67 -0
- package/dist/composites/FormField.d.ts +15 -0
- package/dist/composites/FormField.d.ts.map +1 -0
- package/dist/composites/FormField.js +9 -0
- package/dist/composites/GlassCard.d.ts +13 -0
- package/dist/composites/GlassCard.d.ts.map +1 -0
- package/dist/composites/GlassCard.js +32 -0
- package/dist/composites/HeaderIconButton.d.ts +13 -0
- package/dist/composites/HeaderIconButton.d.ts.map +1 -0
- package/dist/composites/HeaderIconButton.js +12 -0
- package/dist/composites/ListRow.d.ts +9 -0
- package/dist/composites/ListRow.d.ts.map +1 -0
- package/dist/composites/ListRow.js +6 -0
- package/dist/composites/MediaEntryCard.d.ts +25 -0
- package/dist/composites/MediaEntryCard.d.ts.map +1 -0
- package/dist/composites/MediaEntryCard.js +10 -0
- package/dist/composites/MobileTabBar.d.ts +33 -0
- package/dist/composites/MobileTabBar.d.ts.map +1 -0
- package/dist/composites/MobileTabBar.js +19 -0
- package/dist/composites/NotificationBell.d.ts +28 -0
- package/dist/composites/NotificationBell.d.ts.map +1 -0
- package/dist/composites/NotificationBell.js +25 -0
- package/dist/composites/PageHeader.d.ts +11 -0
- package/dist/composites/PageHeader.d.ts.map +1 -0
- package/dist/composites/PageHeader.js +6 -0
- package/dist/composites/PageShell.d.ts +12 -0
- package/dist/composites/PageShell.d.ts.map +1 -0
- package/dist/composites/PageShell.js +8 -0
- package/dist/composites/PageStickyHeader.d.ts +33 -0
- package/dist/composites/PageStickyHeader.d.ts.map +1 -0
- package/dist/composites/PageStickyHeader.js +19 -0
- package/dist/composites/Pagination.d.ts +7 -0
- package/dist/composites/Pagination.d.ts.map +1 -0
- package/dist/composites/Pagination.js +6 -0
- package/dist/composites/PhotoViewer.d.ts +18 -0
- package/dist/composites/PhotoViewer.d.ts.map +1 -0
- package/dist/composites/PhotoViewer.js +37 -0
- package/dist/composites/PinPad.d.ts +29 -0
- package/dist/composites/PinPad.d.ts.map +1 -0
- package/dist/composites/PinPad.js +58 -0
- package/dist/composites/ProfileHero.d.ts +34 -0
- package/dist/composites/ProfileHero.d.ts.map +1 -0
- package/dist/composites/ProfileHero.js +21 -0
- package/dist/composites/QuickFilterRail.d.ts +25 -0
- package/dist/composites/QuickFilterRail.d.ts.map +1 -0
- package/dist/composites/QuickFilterRail.js +18 -0
- package/dist/composites/QuickSettings.d.ts +27 -0
- package/dist/composites/QuickSettings.d.ts.map +1 -0
- package/dist/composites/QuickSettings.js +18 -0
- package/dist/composites/RichTextEditor.d.ts +13 -0
- package/dist/composites/RichTextEditor.d.ts.map +1 -0
- package/dist/composites/RichTextEditor.js +23 -0
- package/dist/composites/SearchField.d.ts +8 -0
- package/dist/composites/SearchField.d.ts.map +1 -0
- package/dist/composites/SearchField.js +8 -0
- package/dist/composites/SectionPanel.d.ts +16 -0
- package/dist/composites/SectionPanel.d.ts.map +1 -0
- package/dist/composites/SectionPanel.js +8 -0
- package/dist/composites/SegmentedControl.d.ts +17 -0
- package/dist/composites/SegmentedControl.d.ts.map +1 -0
- package/dist/composites/SegmentedControl.js +11 -0
- package/dist/composites/StatCard.d.ts +11 -0
- package/dist/composites/StatCard.d.ts.map +1 -0
- package/dist/composites/StatCard.js +6 -0
- package/dist/composites/StatusDot.d.ts +11 -0
- package/dist/composites/StatusDot.d.ts.map +1 -0
- package/dist/composites/StatusDot.js +23 -0
- package/dist/composites/SurfaceCard.d.ts +12 -0
- package/dist/composites/SurfaceCard.d.ts.map +1 -0
- package/dist/composites/SurfaceCard.js +24 -0
- package/dist/composites/Timeline.d.ts +19 -0
- package/dist/composites/Timeline.d.ts.map +1 -0
- package/dist/composites/Timeline.js +12 -0
- package/dist/composites/Toast.d.ts +26 -0
- package/dist/composites/Toast.d.ts.map +1 -0
- package/dist/composites/Toast.js +49 -0
- package/dist/composites/Toolbar.d.ts +6 -0
- package/dist/composites/Toolbar.d.ts.map +1 -0
- package/dist/composites/Toolbar.js +5 -0
- package/dist/composites/ViewFiltersPanel.d.ts +21 -0
- package/dist/composites/ViewFiltersPanel.d.ts.map +1 -0
- package/dist/composites/ViewFiltersPanel.js +11 -0
- package/dist/index.d.ts +96 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +95 -0
- package/dist/lib/animations.d.ts +62 -0
- package/dist/lib/animations.d.ts.map +1 -0
- package/dist/lib/animations.js +37 -0
- package/dist/lib/avatar-utils.d.ts +10 -0
- package/dist/lib/avatar-utils.d.ts.map +1 -0
- package/dist/lib/avatar-utils.js +49 -0
- package/dist/lib/chips.d.ts +10 -0
- package/dist/lib/chips.d.ts.map +1 -0
- package/dist/lib/chips.js +30 -0
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +6 -0
- package/dist/lib/compose-refs.d.ts +6 -0
- package/dist/lib/compose-refs.d.ts.map +1 -0
- package/dist/lib/compose-refs.js +17 -0
- package/dist/lib/cover-chrome.d.ts +9 -0
- package/dist/lib/cover-chrome.d.ts.map +1 -0
- package/dist/lib/cover-chrome.js +23 -0
- package/dist/lib/cover-pattern.d.ts +75 -0
- package/dist/lib/cover-pattern.d.ts.map +1 -0
- package/dist/lib/cover-pattern.js +135 -0
- package/dist/lib/overlay-stack.d.ts +23 -0
- package/dist/lib/overlay-stack.d.ts.map +1 -0
- package/dist/lib/overlay-stack.js +37 -0
- package/dist/lib/portal.d.ts +12 -0
- package/dist/lib/portal.d.ts.map +1 -0
- package/dist/lib/portal.js +12 -0
- package/dist/lib/slot.d.ts +12 -0
- package/dist/lib/slot.d.ts.map +1 -0
- package/dist/lib/slot.js +55 -0
- package/dist/lib/surfaces.d.ts +14 -0
- package/dist/lib/surfaces.d.ts.map +1 -0
- package/dist/lib/surfaces.js +18 -0
- package/dist/lib/themes.d.ts +16 -0
- package/dist/lib/themes.d.ts.map +1 -0
- package/dist/lib/themes.js +53 -0
- package/dist/lib/typography.d.ts +17 -0
- package/dist/lib/typography.d.ts.map +1 -0
- package/dist/lib/typography.js +16 -0
- package/dist/lib/use-controllable-state.d.ts +12 -0
- package/dist/lib/use-controllable-state.d.ts.map +1 -0
- package/dist/lib/use-controllable-state.js +20 -0
- package/dist/lib/use-cover-chrome-bleed.d.ts +9 -0
- package/dist/lib/use-cover-chrome-bleed.d.ts.map +1 -0
- package/dist/lib/use-cover-chrome-bleed.js +28 -0
- package/dist/lib/use-dismissable.d.ts +13 -0
- package/dist/lib/use-dismissable.d.ts.map +1 -0
- package/dist/lib/use-dismissable.js +33 -0
- package/dist/lib/use-floating-position.d.ts +27 -0
- package/dist/lib/use-floating-position.d.ts.map +1 -0
- package/dist/lib/use-floating-position.js +115 -0
- package/dist/lib/use-focus-trap.d.ts +7 -0
- package/dist/lib/use-focus-trap.d.ts.map +1 -0
- package/dist/lib/use-focus-trap.js +61 -0
- package/dist/lib/use-media-query.d.ts +5 -0
- package/dist/lib/use-media-query.d.ts.map +1 -0
- package/dist/lib/use-media-query.js +19 -0
- package/dist/primitives/Accordion.d.ts +24 -0
- package/dist/primitives/Accordion.d.ts.map +1 -0
- package/dist/primitives/Accordion.js +37 -0
- package/dist/primitives/Alert.d.ts +10 -0
- package/dist/primitives/Alert.d.ts.map +1 -0
- package/dist/primitives/Alert.js +25 -0
- package/dist/primitives/AlertDialog.d.ts +33 -0
- package/dist/primitives/AlertDialog.d.ts.map +1 -0
- package/dist/primitives/AlertDialog.js +96 -0
- package/dist/primitives/Avatar.d.ts +15 -0
- package/dist/primitives/Avatar.d.ts.map +1 -0
- package/dist/primitives/Avatar.js +52 -0
- package/dist/primitives/Badge.d.ts +12 -0
- package/dist/primitives/Badge.d.ts.map +1 -0
- package/dist/primitives/Badge.js +27 -0
- package/dist/primitives/Button.d.ts +14 -0
- package/dist/primitives/Button.d.ts.map +1 -0
- package/dist/primitives/Button.js +37 -0
- package/dist/primitives/Checkbox.d.ts +9 -0
- package/dist/primitives/Checkbox.d.ts.map +1 -0
- package/dist/primitives/Checkbox.js +22 -0
- package/dist/primitives/Command.d.ts +17 -0
- package/dist/primitives/Command.d.ts.map +1 -0
- package/dist/primitives/Command.js +33 -0
- package/dist/primitives/Dialog.d.ts +34 -0
- package/dist/primitives/Dialog.d.ts.map +1 -0
- package/dist/primitives/Dialog.js +96 -0
- package/dist/primitives/DropdownMenu.d.ts +65 -0
- package/dist/primitives/DropdownMenu.d.ts.map +1 -0
- package/dist/primitives/DropdownMenu.js +196 -0
- package/dist/primitives/Input.d.ts +4 -0
- package/dist/primitives/Input.d.ts.map +1 -0
- package/dist/primitives/Input.js +6 -0
- package/dist/primitives/Kbd.d.ts +4 -0
- package/dist/primitives/Kbd.d.ts.map +1 -0
- package/dist/primitives/Kbd.js +6 -0
- package/dist/primitives/Label.d.ts +4 -0
- package/dist/primitives/Label.d.ts.map +1 -0
- package/dist/primitives/Label.js +6 -0
- package/dist/primitives/NativeSelect.d.ts +7 -0
- package/dist/primitives/NativeSelect.d.ts.map +1 -0
- package/dist/primitives/NativeSelect.js +10 -0
- package/dist/primitives/Popover.d.ts +29 -0
- package/dist/primitives/Popover.d.ts.map +1 -0
- package/dist/primitives/Popover.js +95 -0
- package/dist/primitives/Progress.d.ts +8 -0
- package/dist/primitives/Progress.d.ts.map +1 -0
- package/dist/primitives/Progress.js +7 -0
- package/dist/primitives/RadioGroup.d.ts +13 -0
- package/dist/primitives/RadioGroup.d.ts.map +1 -0
- package/dist/primitives/RadioGroup.js +33 -0
- package/dist/primitives/Select.d.ts +33 -0
- package/dist/primitives/Select.d.ts.map +1 -0
- package/dist/primitives/Select.js +178 -0
- package/dist/primitives/Separator.d.ts +7 -0
- package/dist/primitives/Separator.d.ts.map +1 -0
- package/dist/primitives/Separator.js +6 -0
- package/dist/primitives/Sheet.d.ts +28 -0
- package/dist/primitives/Sheet.d.ts.map +1 -0
- package/dist/primitives/Sheet.js +96 -0
- package/dist/primitives/Skeleton.d.ts +4 -0
- package/dist/primitives/Skeleton.d.ts.map +1 -0
- package/dist/primitives/Skeleton.js +6 -0
- package/dist/primitives/Slider.d.ts +12 -0
- package/dist/primitives/Slider.d.ts.map +1 -0
- package/dist/primitives/Slider.js +23 -0
- package/dist/primitives/Spinner.d.ts +6 -0
- package/dist/primitives/Spinner.d.ts.map +1 -0
- package/dist/primitives/Spinner.js +7 -0
- package/dist/primitives/StarRating.d.ts +10 -0
- package/dist/primitives/StarRating.d.ts.map +1 -0
- package/dist/primitives/StarRating.js +11 -0
- package/dist/primitives/Switch.d.ts +8 -0
- package/dist/primitives/Switch.d.ts.map +1 -0
- package/dist/primitives/Switch.js +20 -0
- package/dist/primitives/Table.d.ts +13 -0
- package/dist/primitives/Table.d.ts.map +1 -0
- package/dist/primitives/Table.js +20 -0
- package/dist/primitives/Tabs.d.ts +17 -0
- package/dist/primitives/Tabs.d.ts.map +1 -0
- package/dist/primitives/Tabs.js +30 -0
- package/dist/primitives/Textarea.d.ts +4 -0
- package/dist/primitives/Textarea.d.ts.map +1 -0
- package/dist/primitives/Textarea.js +6 -0
- package/dist/primitives/Tooltip.d.ts +31 -0
- package/dist/primitives/Tooltip.d.ts.map +1 -0
- package/dist/primitives/Tooltip.js +94 -0
- package/dist/theme/OriginThemeProvider.d.ts +31 -0
- package/dist/theme/OriginThemeProvider.d.ts.map +1 -0
- package/dist/theme/OriginThemeProvider.js +37 -0
- package/dist/theme/SpatikaThemeProvider.d.ts +36 -0
- package/dist/theme/SpatikaThemeProvider.d.ts.map +1 -0
- package/dist/theme/SpatikaThemeProvider.js +38 -0
- package/package.json +58 -0
- package/src/composites/ActionBar.tsx +25 -0
- package/src/composites/AmountInput.tsx +40 -0
- package/src/composites/AppHeader.tsx +88 -0
- package/src/composites/AppSidebar.tsx +120 -0
- package/src/composites/BottomSheet.tsx +179 -0
- package/src/composites/Breadcrumb.tsx +42 -0
- package/src/composites/Callout.tsx +22 -0
- package/src/composites/Card.tsx +119 -0
- package/src/composites/Chip.tsx +87 -0
- package/src/composites/ChipGroup.component.test.tsx +31 -0
- package/src/composites/ChipGroup.test.ts +16 -0
- package/src/composites/ChipGroup.tsx +86 -0
- package/src/composites/CommandSearchField.tsx +124 -0
- package/src/composites/CoverHero.tsx +359 -0
- package/src/composites/CoverPattern.tsx +90 -0
- package/src/composites/DataTableToolbar.tsx +48 -0
- package/src/composites/DividerLabel.tsx +22 -0
- package/src/composites/EmptyState.tsx +55 -0
- package/src/composites/EntityCard.tsx +100 -0
- package/src/composites/EntityMediaCard.tsx +118 -0
- package/src/composites/FilterSheet.tsx +178 -0
- package/src/composites/FloatingPageChrome.tsx +294 -0
- package/src/composites/FormField.tsx +44 -0
- package/src/composites/GlassCard.tsx +47 -0
- package/src/composites/HeaderIconButton.tsx +49 -0
- package/src/composites/ListRow.tsx +29 -0
- package/src/composites/MediaEntryCard.tsx +95 -0
- package/src/composites/MobileTabBar.tsx +130 -0
- package/src/composites/NotificationBell.tsx +164 -0
- package/src/composites/PageHeader.tsx +27 -0
- package/src/composites/PageShell.tsx +20 -0
- package/src/composites/PageStickyHeader.tsx +157 -0
- package/src/composites/Pagination.tsx +41 -0
- package/src/composites/PhotoViewer.tsx +142 -0
- package/src/composites/PinPad.tsx +163 -0
- package/src/composites/ProfileHero.tsx +163 -0
- package/src/composites/QuickFilterRail.tsx +92 -0
- package/src/composites/QuickSettings.tsx +120 -0
- package/src/composites/RichTextEditor.tsx +103 -0
- package/src/composites/SearchField.tsx +38 -0
- package/src/composites/SectionPanel.tsx +59 -0
- package/src/composites/SegmentedControl.tsx +62 -0
- package/src/composites/StatCard.tsx +26 -0
- package/src/composites/StatusDot.tsx +40 -0
- package/src/composites/SurfaceCard.tsx +44 -0
- package/src/composites/Timeline.tsx +70 -0
- package/src/composites/Toast.tsx +135 -0
- package/src/composites/Toolbar.tsx +19 -0
- package/src/composites/ViewFiltersPanel.tsx +82 -0
- package/src/composites/chrome.test.tsx +170 -0
- package/src/composites/smoke.test.tsx +49 -0
- package/src/index.ts +355 -0
- package/src/lib/animations.ts +47 -0
- package/src/lib/avatar-utils.ts +52 -0
- package/src/lib/chips.ts +58 -0
- package/src/lib/cn.test.ts +16 -0
- package/src/lib/cn.ts +7 -0
- package/src/lib/compose-refs.ts +21 -0
- package/src/lib/cover-chrome.ts +31 -0
- package/src/lib/cover-pattern.ts +242 -0
- package/src/lib/overlay-stack.ts +44 -0
- package/src/lib/portal.tsx +21 -0
- package/src/lib/slot.tsx +69 -0
- package/src/lib/surfaces.ts +57 -0
- package/src/lib/themes.test.ts +73 -0
- package/src/lib/themes.ts +59 -0
- package/src/lib/tokens.test.ts +52 -0
- package/src/lib/typography.ts +27 -0
- package/src/lib/use-controllable-state.ts +38 -0
- package/src/lib/use-cover-chrome-bleed.ts +33 -0
- package/src/lib/use-dismissable.ts +49 -0
- package/src/lib/use-floating-position.ts +168 -0
- package/src/lib/use-focus-trap.ts +73 -0
- package/src/lib/use-media-query.ts +22 -0
- package/src/primitives/Accordion.tsx +114 -0
- package/src/primitives/Alert.tsx +57 -0
- package/src/primitives/AlertDialog.tsx +270 -0
- package/src/primitives/Avatar.tsx +140 -0
- package/src/primitives/Badge.test.tsx +15 -0
- package/src/primitives/Badge.tsx +43 -0
- package/src/primitives/Button.test.tsx +37 -0
- package/src/primitives/Button.tsx +58 -0
- package/src/primitives/Checkbox.tsx +75 -0
- package/src/primitives/Command.tsx +175 -0
- package/src/primitives/Dialog.tsx +241 -0
- package/src/primitives/DropdownMenu.tsx +552 -0
- package/src/primitives/Input.test.tsx +22 -0
- package/src/primitives/Input.tsx +22 -0
- package/src/primitives/Kbd.tsx +17 -0
- package/src/primitives/Label.tsx +20 -0
- package/src/primitives/NativeSelect.tsx +22 -0
- package/src/primitives/Popover.tsx +209 -0
- package/src/primitives/Progress.tsx +31 -0
- package/src/primitives/RadioGroup.tsx +116 -0
- package/src/primitives/Select.tsx +409 -0
- package/src/primitives/Separator.tsx +30 -0
- package/src/primitives/Sheet.tsx +265 -0
- package/src/primitives/Skeleton.tsx +16 -0
- package/src/primitives/Slider.tsx +97 -0
- package/src/primitives/Spinner.tsx +21 -0
- package/src/primitives/StarRating.tsx +53 -0
- package/src/primitives/Switch.tsx +68 -0
- package/src/primitives/Table.tsx +134 -0
- package/src/primitives/Tabs.tsx +97 -0
- package/src/primitives/Textarea.tsx +20 -0
- package/src/primitives/Tooltip.tsx +193 -0
- package/src/primitives/smoke.test.tsx +34 -0
- package/src/test/setup.ts +1 -0
- package/src/theme/SpatikaThemeProvider.test.tsx +82 -0
- package/src/theme/SpatikaThemeProvider.tsx +112 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type PinPadProps = {
|
|
3
|
+
onComplete: (pin: string) => void;
|
|
4
|
+
title?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
length?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Numeric PIN pad with dot indicators. Length, copy, and styles are customizable.
|
|
12
|
+
*/
|
|
13
|
+
export declare function PinPad({ onComplete, title, error, loading, length, className, }: PinPadProps): import("react").JSX.Element;
|
|
14
|
+
export type LockOverlayProps = {
|
|
15
|
+
open: boolean;
|
|
16
|
+
title?: string;
|
|
17
|
+
error?: string;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
onComplete: (pin: string) => void;
|
|
20
|
+
branding?: ReactNode;
|
|
21
|
+
secondaryAction?: ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
length?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Full-screen lock overlay wrapping PinPad.
|
|
27
|
+
*/
|
|
28
|
+
export declare function LockOverlay({ open, title, error, loading, onComplete, branding, secondaryAction, className, length, }: LockOverlayProps): import("react").JSX.Element | null;
|
|
29
|
+
//# sourceMappingURL=PinPad.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PinPad.d.ts","sourceRoot":"","sources":["../../src/composites/PinPad.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5D,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,wBAAgB,MAAM,CAAC,EACrB,UAAU,EACV,KAAmB,EACnB,KAAK,EACL,OAAO,EACP,MAAU,EACV,SAAS,GACV,EAAE,WAAW,+BAiGb;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAgB,EAChB,KAAK,EACL,OAAO,EACP,UAAU,EACV,QAAQ,EACR,eAAe,EACf,SAAS,EACT,MAAM,GACP,EAAE,gBAAgB,sCAelB"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { Delete, X } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
/**
|
|
6
|
+
* Numeric PIN pad with dot indicators. Length, copy, and styles are customizable.
|
|
7
|
+
*/
|
|
8
|
+
export function PinPad({ onComplete, title = "Enter PIN", error, loading, length = 6, className, }) {
|
|
9
|
+
const [pin, setPin] = useState([]);
|
|
10
|
+
const handleNumber = (n) => {
|
|
11
|
+
if (loading || pin.length >= length)
|
|
12
|
+
return;
|
|
13
|
+
const next = [...pin, n];
|
|
14
|
+
setPin(next);
|
|
15
|
+
if (next.length === length)
|
|
16
|
+
onComplete(next.join(""));
|
|
17
|
+
};
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
if (error) {
|
|
20
|
+
const t = setTimeout(() => setPin([]), 400);
|
|
21
|
+
return () => clearTimeout(t);
|
|
22
|
+
}
|
|
23
|
+
}, [error]);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
const onKey = (e) => {
|
|
26
|
+
if (loading)
|
|
27
|
+
return;
|
|
28
|
+
if (e.key >= "0" && e.key <= "9")
|
|
29
|
+
handleNumber(e.key);
|
|
30
|
+
if (e.key === "Backspace")
|
|
31
|
+
setPin((p) => p.slice(0, -1));
|
|
32
|
+
if (e.key === "Escape")
|
|
33
|
+
setPin([]);
|
|
34
|
+
};
|
|
35
|
+
window.addEventListener("keydown", onKey);
|
|
36
|
+
return () => window.removeEventListener("keydown", onKey);
|
|
37
|
+
});
|
|
38
|
+
const keys = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "clear", "0", "del"];
|
|
39
|
+
return (_jsxs("div", { "data-slot": "pin-pad", className: cn("flex w-full max-w-xs flex-col items-center gap-8", className), children: [_jsxs("div", { className: "space-y-2 text-center", children: [_jsx("h2", { className: "text-2xl font-black uppercase tracking-tighter text-foreground", children: title }), error ? _jsx("p", { className: "text-sm font-bold text-destructive", children: error }) : null] }), _jsx("div", { className: "flex gap-3", children: Array.from({ length }, (_, i) => (_jsx("span", { className: cn("size-4 rounded-full border-2 transition-all", i < pin.length
|
|
40
|
+
? "border-primary bg-primary shadow-[0_0_15px_color-mix(in_srgb,var(--primary)_50%,transparent)]"
|
|
41
|
+
: "border-border/60 bg-transparent") }, i))) }), _jsx("div", { className: "grid grid-cols-3 gap-4", children: keys.map((key) => {
|
|
42
|
+
if (key === "clear") {
|
|
43
|
+
return (_jsx("button", { type: "button", disabled: loading, "aria-label": "Clear", className: "flex size-16 items-center justify-center rounded-full text-destructive active:scale-95", onClick: () => setPin([]), children: _jsx(X, { className: "size-6" }) }, key));
|
|
44
|
+
}
|
|
45
|
+
if (key === "del") {
|
|
46
|
+
return (_jsx("button", { type: "button", disabled: loading, "aria-label": "Delete", className: "flex size-16 items-center justify-center rounded-full text-muted-foreground active:scale-95", onClick: () => setPin((p) => p.slice(0, -1)), children: _jsx(Delete, { className: "size-6" }) }, key));
|
|
47
|
+
}
|
|
48
|
+
return (_jsx("button", { type: "button", disabled: loading, className: "flex size-16 items-center justify-center rounded-full text-2xl font-black text-foreground transition-colors hover:bg-muted/40 active:scale-95 active:bg-primary/20", onClick: () => handleNumber(key), children: key }, key));
|
|
49
|
+
}) })] }));
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Full-screen lock overlay wrapping PinPad.
|
|
53
|
+
*/
|
|
54
|
+
export function LockOverlay({ open, title = "Unlock", error, loading, onComplete, branding, secondaryAction, className, length, }) {
|
|
55
|
+
if (!open)
|
|
56
|
+
return null;
|
|
57
|
+
return (_jsxs("div", { "data-slot": "lock-overlay", className: cn("fixed inset-0 z-[200] flex flex-col items-center justify-center gap-8 bg-background/80 px-6 backdrop-blur-xl", className), children: [branding, _jsx(PinPad, { title: title, error: error, loading: loading, onComplete: onComplete, length: length }), secondaryAction] }));
|
|
58
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type CoverPatternKind } from "../lib/cover-pattern";
|
|
3
|
+
export type ProfileHeroProps = {
|
|
4
|
+
name: string;
|
|
5
|
+
alias?: string;
|
|
6
|
+
coverUrl?: string;
|
|
7
|
+
avatarUrl?: string;
|
|
8
|
+
hideImages?: boolean;
|
|
9
|
+
statusBadges?: ReactNode;
|
|
10
|
+
metaLines?: ReactNode;
|
|
11
|
+
stats?: ReactNode;
|
|
12
|
+
tags?: ReactNode;
|
|
13
|
+
topLeading?: ReactNode;
|
|
14
|
+
topActions?: ReactNode;
|
|
15
|
+
avatarAccessory?: ReactNode;
|
|
16
|
+
onAvatarClick?: () => void;
|
|
17
|
+
className?: string;
|
|
18
|
+
coverClassName?: string;
|
|
19
|
+
identityClassName?: string;
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/** Seed for the generated cover when no photo is set. */
|
|
22
|
+
coverSeed?: string;
|
|
23
|
+
coverHue?: number;
|
|
24
|
+
coverKind?: CoverPatternKind | null;
|
|
25
|
+
dark?: boolean;
|
|
26
|
+
warm?: boolean;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Profile / entity hero: cover bleeds into app chrome, overlapping avatar
|
|
30
|
+
* notches the frosted identity plate. Stacked in a narrow column; left-notched
|
|
31
|
+
* once the plate is wide enough (container query, not viewport).
|
|
32
|
+
*/
|
|
33
|
+
export declare function ProfileHero({ name, alias, coverUrl, avatarUrl, hideImages, statusBadges, metaLines, stats, tags, topLeading, topActions, avatarAccessory, onAvatarClick, className, coverClassName, identityClassName, children, coverSeed, coverHue, coverKind, dark, warm, }: ProfileHeroProps): import("react").JSX.Element;
|
|
34
|
+
//# sourceMappingURL=ProfileHero.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProfileHero.d.ts","sourceRoot":"","sources":["../../src/composites/ProfileHero.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,EAAmB,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAG9E,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,eAAe,CAAC,EAAE,SAAS,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IACpC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,SAAS,EACT,UAAU,EACV,YAAY,EACZ,SAAS,EACT,KAAK,EACL,IAAI,EACJ,UAAU,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,SAAS,EACT,cAAc,EACd,iBAAiB,EACjB,QAAQ,EACR,SAAS,EACT,QAAc,EACd,SAAS,EACT,IAAI,EACJ,IAAI,GACL,EAAE,gBAAgB,+BAiGlB"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
import { getInitials } from "../lib/avatar-utils";
|
|
4
|
+
import { coverMutedClass, coverPlateClass, coverTitleClass, } from "../lib/cover-chrome";
|
|
5
|
+
import { getCoverPattern } from "../lib/cover-pattern";
|
|
6
|
+
import { CoverPattern } from "./CoverPattern";
|
|
7
|
+
/**
|
|
8
|
+
* Profile / entity hero: cover bleeds into app chrome, overlapping avatar
|
|
9
|
+
* notches the frosted identity plate. Stacked in a narrow column; left-notched
|
|
10
|
+
* once the plate is wide enough (container query, not viewport).
|
|
11
|
+
*/
|
|
12
|
+
export function ProfileHero({ name, alias, coverUrl, avatarUrl, hideImages, statusBadges, metaLines, stats, tags, topLeading, topActions, avatarAccessory, onAvatarClick, className, coverClassName, identityClassName, children, coverSeed, coverHue = 210, coverKind, dark, warm, }) {
|
|
13
|
+
const initials = getInitials(name);
|
|
14
|
+
const seed = coverSeed ?? name;
|
|
15
|
+
const scene = getCoverPattern({ seed, hue: coverHue, dark, warm, kind: coverKind });
|
|
16
|
+
const ink = scene.headerInk;
|
|
17
|
+
return (_jsxs("div", { "data-slot": "profile-hero", className: cn("relative overflow-visible", className), children: [_jsxs("div", { className: cn("relative min-h-[9rem] overflow-hidden sm:min-h-[12rem] lg:min-h-[13rem]", coverClassName), children: [_jsxs("div", { className: "cover-media cover-media--profile sm:rounded-b-[2rem]", "aria-hidden": true, children: [!hideImages && coverUrl ? (_jsx("img", { src: coverUrl, alt: "", className: "absolute inset-0 size-full object-cover" })) : (_jsx(CoverPattern, { seed: seed, hue: coverHue, dark: dark, warm: warm, kind: coverKind })), _jsx("div", { className: "absolute inset-x-0 top-0 h-8 bg-gradient-to-b from-black/[0.04] to-transparent dark:from-black/12" }), _jsx("div", { className: "absolute inset-x-0 bottom-0 h-[22%] bg-gradient-to-t from-black/[0.03] via-transparent to-transparent dark:from-black/10" })] }), _jsxs("div", { className: "relative z-10 flex min-h-[9rem] items-start justify-between gap-2 p-3 sm:min-h-[12rem] sm:p-4 lg:min-h-[13rem]", children: [_jsx("div", { children: topLeading }), topActions ? (_jsx("div", { "data-cover-ink": ink, className: "cover-floating-shell flex items-center gap-1 p-1", children: topActions })) : null] })] }), _jsx("div", { className: "relative z-10 px-3 pb-4 sm:px-4 sm:pb-5 lg:px-8", children: _jsxs("div", { className: cn("profile-identity", identityClassName), children: [_jsx("div", { "aria-hidden": true, className: cn("pointer-events-none absolute inset-0 rounded-[1.35rem] profile-identity__plate", coverPlateClass(ink)) }), _jsxs("div", { className: "profile-identity__body", children: [_jsxs("button", { type: "button", disabled: !onAvatarClick, onClick: onAvatarClick, "aria-label": name, className: "profile-identity__avatar", children: [_jsx("span", { className: "flex items-center justify-center overflow-hidden rounded-full border-[3px] border-white bg-muted text-lg font-black leading-none text-primary shadow-[0_16px_40px_rgba(0,0,0,0.38)] dark:border-white/30", style: {
|
|
18
|
+
width: "var(--profile-avatar-size)",
|
|
19
|
+
height: "var(--profile-avatar-size)",
|
|
20
|
+
}, children: !hideImages && avatarUrl ? (_jsx("img", { src: avatarUrl, alt: "", className: "size-full object-cover" })) : (initials) }), avatarAccessory] }), _jsxs("div", { className: "profile-identity__copy", children: [_jsxs("div", { className: "profile-identity__heading", children: [_jsx("h1", { className: cn("truncate text-[1.15rem] font-black leading-tight tracking-tight sm:text-2xl", coverTitleClass(ink)), children: name }), statusBadges] }), alias ? (_jsx("p", { className: cn("mt-0.5 truncate text-sm font-medium", coverMutedClass(ink)), children: alias })) : null, metaLines ? (_jsx("div", { className: cn("mt-2 space-y-1 text-sm", coverMutedClass(ink)), children: metaLines })) : null, stats ? _jsx("div", { className: "mt-3", children: stats }) : null, tags ? _jsx("div", { className: "profile-identity__tags", children: tags }) : null] })] }), children ? _jsx("div", { className: "relative z-10 px-3 pb-3 sm:px-6", children: children }) : null] }) })] }));
|
|
21
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type QuickFilterItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
count?: number;
|
|
7
|
+
};
|
|
8
|
+
export type QuickFilterGroup = {
|
|
9
|
+
id?: string;
|
|
10
|
+
label?: string;
|
|
11
|
+
items: QuickFilterItem[];
|
|
12
|
+
};
|
|
13
|
+
export type QuickFilterRailProps = {
|
|
14
|
+
groups: QuickFilterGroup[];
|
|
15
|
+
value?: string | string[];
|
|
16
|
+
onChange?: (id: string) => void;
|
|
17
|
+
/** solid = filled primary when active (directory style); soft = tinted (default chip) */
|
|
18
|
+
activeStyle?: "solid" | "soft";
|
|
19
|
+
className?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Horizontal scroll filter rail with optional grouped sections.
|
|
23
|
+
*/
|
|
24
|
+
export declare function QuickFilterRail({ groups, value, onChange, activeStyle, className, }: QuickFilterRailProps): import("react").JSX.Element;
|
|
25
|
+
//# sourceMappingURL=QuickFilterRail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickFilterRail.d.ts","sourceRoot":"","sources":["../../src/composites/QuickFilterRail.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,yFAAyF;IACzF,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC/B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,KAAK,EACL,QAAQ,EACR,WAAoB,EACpB,SAAS,GACV,EAAE,oBAAoB,+BAwDtB"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
import { Chip } from "./Chip";
|
|
4
|
+
/**
|
|
5
|
+
* Horizontal scroll filter rail with optional grouped sections.
|
|
6
|
+
*/
|
|
7
|
+
export function QuickFilterRail({ groups, value, onChange, activeStyle = "soft", className, }) {
|
|
8
|
+
const selected = Array.isArray(value) ? value : value ? [value] : [];
|
|
9
|
+
return (_jsx("div", { "data-slot": "quick-filter-rail", className: cn("flex gap-2 overflow-x-auto pb-1 [-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden", className), children: groups.map((group, gi) => (_jsxs("div", { className: "flex shrink-0 items-center gap-2", children: [gi > 0 ? _jsx("div", { className: "h-6 w-px shrink-0 bg-border/50" }) : null, group.label ? (_jsx("span", { className: "shrink-0 text-[10px] font-black uppercase tracking-widest text-muted-foreground/70", children: group.label })) : null, group.items.map((item) => {
|
|
10
|
+
const active = selected.includes(item.id);
|
|
11
|
+
return (_jsxs(Chip, { variant: "filter", active: activeStyle === "soft" ? active : false, onClick: () => onChange?.(item.id), className: cn("shrink-0 gap-1.5", activeStyle === "solid" &&
|
|
12
|
+
(active
|
|
13
|
+
? "border-primary/60 bg-primary text-primary-foreground hover:bg-primary"
|
|
14
|
+
: "border-border/40 bg-card/40")), children: [item.icon, item.label, typeof item.count === "number" ? (_jsx("span", { className: cn("ml-0.5 inline-flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[9px] font-black", active && activeStyle === "solid"
|
|
15
|
+
? "bg-primary-foreground/20 text-primary-foreground"
|
|
16
|
+
: "bg-primary/15 text-primary"), children: item.count })) : null] }, item.id));
|
|
17
|
+
})] }, group.id ?? group.label ?? gi))) }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type QuickSettingsProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
title?: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** side sheet from right (default) or bottom drawer-like panel */
|
|
9
|
+
side?: "right" | "left";
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Sliding quick-settings panel — appearance, density, toggles, etc.
|
|
14
|
+
*/
|
|
15
|
+
export declare function QuickSettings({ open, onOpenChange, title, description, children, side, className, }: QuickSettingsProps): import("react").JSX.Element | null;
|
|
16
|
+
export declare function QuickSettingsGroup({ title, children, className, }: {
|
|
17
|
+
title: string;
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
21
|
+
export declare function QuickSettingsRow({ label, description, control, className, }: {
|
|
22
|
+
label: string;
|
|
23
|
+
description?: string;
|
|
24
|
+
control: ReactNode;
|
|
25
|
+
className?: string;
|
|
26
|
+
}): import("react").JSX.Element;
|
|
27
|
+
//# sourceMappingURL=QuickSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QuickSettings.d.ts","sourceRoot":"","sources":["../../src/composites/QuickSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,kEAAkE;IAClE,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,YAAY,EACZ,KAAwB,EACxB,WAAW,EACX,QAAQ,EACR,IAAc,EACd,SAAS,GACV,EAAE,kBAAkB,sCA2CpB;AAED,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,QAAQ,EACR,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BASA;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,WAAW,EACX,OAAO,EACP,SAAS,GACV,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAkBA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { X } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/cn";
|
|
4
|
+
import { Button } from "../primitives/Button";
|
|
5
|
+
/**
|
|
6
|
+
* Sliding quick-settings panel — appearance, density, toggles, etc.
|
|
7
|
+
*/
|
|
8
|
+
export function QuickSettings({ open, onOpenChange, title = "Quick settings", description, children, side = "right", className, }) {
|
|
9
|
+
if (!open)
|
|
10
|
+
return null;
|
|
11
|
+
return (_jsxs("div", { "data-slot": "quick-settings", className: "fixed inset-0 z-50", children: [_jsx("button", { type: "button", "aria-label": "Close settings", className: "absolute inset-0 bg-[var(--modal-overlay-bg)] backdrop-blur-[var(--modal-overlay-blur)]", onClick: () => onOpenChange(false) }), _jsxs("aside", { role: "dialog", "aria-modal": "true", "aria-label": title, className: cn("glass-menu absolute top-0 flex h-full w-full max-w-sm flex-col shadow-2xl", side === "right" ? "right-0 border-l" : "left-0 border-r", "border-border/40", className), children: [_jsxs("div", { className: "flex items-start justify-between gap-3 border-b border-border/40 px-4 py-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-base font-black tracking-tight", children: title }), description ? (_jsx("p", { className: "mt-0.5 text-xs font-medium text-muted-foreground", children: description })) : null] }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": "Close", onClick: () => onOpenChange(false), children: _jsx(X, { className: "size-4" }) })] }), _jsx("div", { className: "flex-1 space-y-5 overflow-y-auto px-4 py-4", children: children })] })] }));
|
|
12
|
+
}
|
|
13
|
+
export function QuickSettingsGroup({ title, children, className, }) {
|
|
14
|
+
return (_jsxs("div", { "data-slot": "quick-settings-group", className: cn("space-y-3", className), children: [_jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-muted-foreground/70", children: title }), _jsx("div", { className: "space-y-2", children: children })] }));
|
|
15
|
+
}
|
|
16
|
+
export function QuickSettingsRow({ label, description, control, className, }) {
|
|
17
|
+
return (_jsxs("div", { "data-slot": "quick-settings-row", className: cn("flex items-center justify-between gap-3 rounded-xl border border-border/40 bg-background/30 px-3 py-2.5", className), children: [_jsxs("div", { className: "min-w-0", children: [_jsx("p", { className: "text-sm font-bold", children: label }), description ? (_jsx("p", { className: "text-xs text-muted-foreground", children: description })) : null] }), _jsx("div", { className: "shrink-0", children: control })] }));
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type RichTextEditorProps = {
|
|
2
|
+
value?: string;
|
|
3
|
+
onChange?: (html: string) => void;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
minHeightClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Lightweight rich-text surface (contenteditable) for notes and captions.
|
|
10
|
+
* Pair with TipTap or another full editor in your app when you need tables or advanced media.
|
|
11
|
+
*/
|
|
12
|
+
export declare function RichTextEditor({ value, onChange, placeholder, className, minHeightClassName, }: RichTextEditorProps): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=RichTextEditor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../src/composites/RichTextEditor.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,cAAc,CAAC,EAC7B,KAAU,EACV,QAAQ,EACR,WAAgC,EAChC,SAAS,EACT,kBAA+B,GAChC,EAAE,mBAAmB,+BAyErB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useRef } from "react";
|
|
3
|
+
import { Bold, Italic, List, ListOrdered, Underline as UnderlineIcon, } from "lucide-react";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
import { Button } from "../primitives/Button";
|
|
6
|
+
/**
|
|
7
|
+
* Lightweight rich-text surface (contenteditable) for notes and captions.
|
|
8
|
+
* Pair with TipTap or another full editor in your app when you need tables or advanced media.
|
|
9
|
+
*/
|
|
10
|
+
export function RichTextEditor({ value = "", onChange, placeholder = "Write something…", className, minHeightClassName = "min-h-40", }) {
|
|
11
|
+
const ref = useRef(null);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (ref.current && value !== ref.current.innerHTML) {
|
|
14
|
+
ref.current.innerHTML = value;
|
|
15
|
+
}
|
|
16
|
+
}, [value]);
|
|
17
|
+
const exec = (command) => {
|
|
18
|
+
document.execCommand(command);
|
|
19
|
+
onChange?.(ref.current?.innerHTML ?? "");
|
|
20
|
+
ref.current?.focus();
|
|
21
|
+
};
|
|
22
|
+
return (_jsxs("div", { "data-slot": "rich-text-editor", className: cn("overflow-hidden rounded-[var(--radius-card)] border border-border/50 bg-input-background", className), children: [_jsxs("div", { className: "flex flex-wrap gap-1 border-b border-border/40 bg-muted/30 p-1.5", children: [_jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": "Bold", onClick: () => exec("bold"), children: _jsx(Bold, { className: "size-4" }) }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": "Italic", onClick: () => exec("italic"), children: _jsx(Italic, { className: "size-4" }) }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": "Underline", onClick: () => exec("underline"), children: _jsx(UnderlineIcon, { className: "size-4" }) }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": "Bullet list", onClick: () => exec("insertUnorderedList"), children: _jsx(List, { className: "size-4" }) }), _jsx(Button, { type: "button", variant: "ghost", size: "icon", "aria-label": "Numbered list", onClick: () => exec("insertOrderedList"), children: _jsx(ListOrdered, { className: "size-4" }) })] }), _jsx("div", { ref: ref, role: "textbox", "aria-multiline": "true", contentEditable: true, suppressContentEditableWarning: true, "data-placeholder": placeholder, className: cn("px-3 py-2 text-sm outline-none empty:before:text-muted-foreground empty:before:content-[attr(data-placeholder)]", minHeightClassName), onInput: () => onChange?.(ref.current?.innerHTML ?? "") })] }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
+
export type SearchFieldProps = ComponentProps<"input"> & {
|
|
3
|
+
containerClassName?: string;
|
|
4
|
+
leading?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
/** Search input with leading icon — mobile-friendly min height. */
|
|
7
|
+
export declare function SearchField({ className, containerClassName, leading, ...props }: SearchFieldProps): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=SearchField.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../src/composites/SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IACvD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,mEAAmE;AACnE,wBAAgB,WAAW,CAAC,EAC1B,SAAS,EACT,kBAAkB,EAClB,OAAO,EACP,GAAG,KAAK,EACT,EAAE,gBAAgB,+BAqBlB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Search } from "lucide-react";
|
|
3
|
+
import { cn } from "../lib/cn";
|
|
4
|
+
import { Input } from "../primitives/Input";
|
|
5
|
+
/** Search input with leading icon — mobile-friendly min height. */
|
|
6
|
+
export function SearchField({ className, containerClassName, leading, ...props }) {
|
|
7
|
+
return (_jsxs("div", { "data-slot": "search-field", className: cn("relative w-full", containerClassName), children: [_jsx("span", { className: "pointer-events-none absolute inset-y-0 left-0 z-10 flex items-center pl-3 text-muted-foreground", children: leading ?? _jsx(Search, { className: "h-4 w-4 shrink-0", "aria-hidden": true }) }), _jsx(Input, { className: cn("h-11 py-0 pl-9 leading-none", "[&::-webkit-search-decoration]:appearance-none [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-results-button]:appearance-none [&::-webkit-search-results-decoration]:appearance-none", className), type: "search", ...props })] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { LucideIcon } from "lucide-react";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type SectionPanelProps = {
|
|
4
|
+
icon: LucideIcon;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
className?: string;
|
|
9
|
+
fullWidth?: boolean;
|
|
10
|
+
trailing?: ReactNode;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Glassmorphic settings / admin section with icon tile and uppercase subtitle.
|
|
14
|
+
*/
|
|
15
|
+
export declare function SectionPanel({ icon: Icon, title, subtitle, children, className, fullWidth, trailing, }: SectionPanelProps): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=SectionPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionPanel.d.ts","sourceRoot":"","sources":["../../src/composites/SectionPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,EAAE,UAAU,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EAAE,IAAI,EACV,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAiB,EACjB,QAAQ,GACT,EAAE,iBAAiB,+BAiCnB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
/**
|
|
4
|
+
* Glassmorphic settings / admin section with icon tile and uppercase subtitle.
|
|
5
|
+
*/
|
|
6
|
+
export function SectionPanel({ icon: Icon, title, subtitle, children, className, fullWidth = false, trailing, }) {
|
|
7
|
+
return (_jsxs("section", { "data-slot": "section-panel", className: cn("group relative flex flex-col gap-5 overflow-hidden border border-border/30 bg-card/60 p-5 shadow-2xl backdrop-blur-md sm:gap-6 sm:p-6", "rounded-[var(--radius-card)]", fullWidth && "md:col-span-2", className), children: [_jsx("div", { className: "pointer-events-none absolute -right-12 -top-12 h-48 w-48 rounded-full bg-primary/5 blur-3xl transition-colors duration-700 group-hover:bg-primary/10" }), _jsxs("div", { className: "relative flex items-start justify-between gap-3", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [_jsx("div", { className: "shrink-0 rounded-xl border border-primary/20 bg-primary/10 p-2 shadow-inner", children: _jsx(Icon, { className: "h-4 w-4 text-primary" }) }), _jsxs("div", { className: "min-w-0", children: [_jsx("h2", { className: "text-lg font-black tracking-tight text-foreground", children: title }), subtitle ? (_jsx("p", { className: "mt-0.5 text-[10px] font-black uppercase tracking-widest text-muted-foreground/60", children: subtitle })) : null] })] }), trailing ? _jsx("div", { className: "relative shrink-0", children: trailing }) : null] }), _jsx("div", { className: "relative", children: children })] }));
|
|
8
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type SegmentedControlOption<T extends string = string> = {
|
|
3
|
+
value: T;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type SegmentedControlProps<T extends string = string> = {
|
|
8
|
+
options: SegmentedControlOption<T>[];
|
|
9
|
+
value: T;
|
|
10
|
+
onChange: (value: T) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
size?: "sm" | "md";
|
|
13
|
+
"aria-label"?: string;
|
|
14
|
+
};
|
|
15
|
+
/** Single-select segmented toggle (income/expense, period, etc.). */
|
|
16
|
+
export declare function SegmentedControl<T extends string = string>({ options, value, onChange, className, size, "aria-label": ariaLabel, }: SegmentedControlProps<T>): import("react").JSX.Element;
|
|
17
|
+
//# sourceMappingURL=SegmentedControl.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SegmentedControl.d.ts","sourceRoot":"","sources":["../../src/composites/SegmentedControl.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IAC9D,KAAK,EAAE,CAAC,CAAC;IACT,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI;IAC7D,OAAO,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC;IACrC,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAC1D,OAAO,EACP,KAAK,EACL,QAAQ,EACR,SAAS,EACT,IAAW,EACX,YAAY,EAAE,SAAS,GACxB,EAAE,qBAAqB,CAAC,CAAC,CAAC,+BAmC1B"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
/** Single-select segmented toggle (income/expense, period, etc.). */
|
|
4
|
+
export function SegmentedControl({ options, value, onChange, className, size = "md", "aria-label": ariaLabel, }) {
|
|
5
|
+
return (_jsx("div", { "data-slot": "segmented-control", role: "radiogroup", "aria-label": ariaLabel, className: cn("inline-flex items-center rounded-xl border border-border/50 bg-muted/25 p-1", className), children: options.map((opt) => {
|
|
6
|
+
const active = opt.value === value;
|
|
7
|
+
return (_jsx("button", { type: "button", role: "radio", "aria-checked": active, disabled: opt.disabled, onClick: () => onChange(opt.value), className: cn("rounded-lg font-bold transition-colors disabled:pointer-events-none disabled:opacity-40", size === "sm" ? "px-2.5 py-1 text-xs" : "px-3.5 py-1.5 text-sm", active
|
|
8
|
+
? "bg-background text-foreground shadow-sm"
|
|
9
|
+
: "text-muted-foreground hover:text-foreground"), children: opt.label }, opt.value));
|
|
10
|
+
}) }));
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type StatCardProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
hint?: string;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
/** Compact metric tile using elevated app-card surface. */
|
|
10
|
+
export declare function StatCard({ label, value, hint, icon, className }: StatCardProps): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=StatCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatCard.d.ts","sourceRoot":"","sources":["../../src/composites/StatCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,2DAA2D;AAC3D,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,aAAa,+BAa9E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
/** Compact metric tile using elevated app-card surface. */
|
|
4
|
+
export function StatCard({ label, value, hint, icon, className }) {
|
|
5
|
+
return (_jsxs("div", { "data-slot": "stat-card", className: cn("app-stat-card p-4 sm:p-5", className), children: [_jsxs("div", { className: "flex items-start justify-between gap-3", children: [_jsx("p", { className: "text-[10px] font-black uppercase tracking-widest text-muted-foreground", children: label }), icon ? _jsx("div", { className: "text-primary", children: icon }) : null] }), _jsx("p", { className: "mt-2 text-2xl font-black tracking-tight text-foreground", children: value }), hint ? _jsx("p", { className: "mt-1 text-xs font-medium text-muted-foreground", children: hint }) : null] }));
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type VariantProps } from "class-variance-authority";
|
|
2
|
+
declare const statusDotVariants: (props?: ({
|
|
3
|
+
tone?: "danger" | "primary" | "neutral" | "success" | "warning" | null | undefined;
|
|
4
|
+
pulse?: boolean | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export declare function StatusDot({ className, tone, pulse, label, }: VariantProps<typeof statusDotVariants> & {
|
|
7
|
+
className?: string;
|
|
8
|
+
label?: string;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export { statusDotVariants };
|
|
11
|
+
//# sourceMappingURL=StatusDot.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusDot.d.ts","sourceRoot":"","sources":["../../src/composites/StatusDot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,QAAA,MAAM,iBAAiB;;;8EAerB,CAAC;AAEH,wBAAgB,SAAS,CAAC,EACxB,SAAS,EACT,IAAI,EACJ,KAAK,EACL,KAAK,GACN,EAAE,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,+BASA;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { cva } from "class-variance-authority";
|
|
3
|
+
import { cn } from "../lib/cn";
|
|
4
|
+
const statusDotVariants = cva("inline-block size-2 shrink-0 rounded-full", {
|
|
5
|
+
variants: {
|
|
6
|
+
tone: {
|
|
7
|
+
neutral: "bg-muted-foreground/50",
|
|
8
|
+
success: "bg-[var(--accent-info)]",
|
|
9
|
+
warning: "bg-[var(--accent-warm)]",
|
|
10
|
+
danger: "bg-destructive",
|
|
11
|
+
primary: "bg-primary",
|
|
12
|
+
},
|
|
13
|
+
pulse: {
|
|
14
|
+
true: "animate-pulse",
|
|
15
|
+
false: "",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: { tone: "neutral", pulse: false },
|
|
19
|
+
});
|
|
20
|
+
export function StatusDot({ className, tone, pulse, label, }) {
|
|
21
|
+
return (_jsx("span", { "data-slot": "status-dot", role: label ? "img" : undefined, "aria-label": label, className: cn(statusDotVariants({ tone, pulse }), className) }));
|
|
22
|
+
}
|
|
23
|
+
export { statusDotVariants };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const surfaceCardVariants: (props?: ({
|
|
4
|
+
tone?: "secondary" | "primary" | "detail" | "tertiary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
export type SurfaceCardProps = React.ComponentProps<"div"> & VariantProps<typeof surfaceCardVariants>;
|
|
7
|
+
/**
|
|
8
|
+
* Profile / hierarchy surface card (primary → tertiary visual weight).
|
|
9
|
+
*/
|
|
10
|
+
declare const SurfaceCard: React.ForwardRefExoticComponent<Omit<SurfaceCardProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { SurfaceCard, surfaceCardVariants };
|
|
12
|
+
//# sourceMappingURL=SurfaceCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SurfaceCard.d.ts","sourceRoot":"","sources":["../../src/composites/SurfaceCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASlE,QAAA,MAAM,mBAAmB;;8EAYvB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GACxD,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAE3C;;GAEG;AACH,QAAA,MAAM,WAAW,sGAUhB,CAAC;AAGF,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cva } from "class-variance-authority";
|
|
4
|
+
import { cn } from "../lib/cn";
|
|
5
|
+
import { surfaceDetailClass, surfacePrimaryClass, surfaceSecondaryClass, surfaceTertiaryClass, } from "../lib/surfaces";
|
|
6
|
+
const surfaceCardVariants = cva("", {
|
|
7
|
+
variants: {
|
|
8
|
+
tone: {
|
|
9
|
+
primary: surfacePrimaryClass,
|
|
10
|
+
secondary: surfaceSecondaryClass,
|
|
11
|
+
detail: surfaceDetailClass,
|
|
12
|
+
tertiary: surfaceTertiaryClass,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
tone: "primary",
|
|
17
|
+
},
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Profile / hierarchy surface card (primary → tertiary visual weight).
|
|
21
|
+
*/
|
|
22
|
+
const SurfaceCard = React.forwardRef(({ className, tone, ...props }, ref) => (_jsx("div", { ref: ref, "data-slot": "surface-card", "data-tone": tone ?? "primary", className: cn(surfaceCardVariants({ tone }), className), ...props })));
|
|
23
|
+
SurfaceCard.displayName = "SurfaceCard";
|
|
24
|
+
export { SurfaceCard, surfaceCardVariants };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export type TimelineItemProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
meta?: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
icon?: ReactNode;
|
|
7
|
+
trailing?: ReactNode;
|
|
8
|
+
active?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
/** Single activity / journal row inside a Timeline. */
|
|
12
|
+
export declare function TimelineItem({ title, meta, description, icon, trailing, active, className, }: TimelineItemProps): import("react").JSX.Element;
|
|
13
|
+
export type TimelineProps = {
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
/** Vertical activity / journal feed. */
|
|
18
|
+
export declare function Timeline({ children, className }: TimelineProps): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=Timeline.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Timeline.d.ts","sourceRoot":"","sources":["../../src/composites/Timeline.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE,iBAAiB,+BAiCnB;AAED,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,wCAAwC;AACxC,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,aAAa,+BAM9D"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../lib/cn";
|
|
3
|
+
/** Single activity / journal row inside a Timeline. */
|
|
4
|
+
export function TimelineItem({ title, meta, description, icon, trailing, active, className, }) {
|
|
5
|
+
return (_jsxs("li", { "data-slot": "timeline-item", className: cn("relative flex gap-3 pb-5 last:pb-0", className), children: [_jsxs("div", { className: "flex w-8 shrink-0 flex-col items-center", children: [_jsx("div", { className: cn("flex h-8 w-8 items-center justify-center rounded-xl border text-muted-foreground", active
|
|
6
|
+
? "border-primary/35 bg-primary/10 text-primary"
|
|
7
|
+
: "border-border/50 bg-muted/20"), children: icon ?? _jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-current" }) }), _jsx("div", { className: "mt-1 w-px flex-1 bg-border/50", "aria-hidden": true })] }), _jsxs("div", { className: "min-w-0 flex-1 pt-0.5", children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsx("p", { className: "text-sm font-bold text-foreground", children: title }), meta ? _jsx("div", { className: "mt-0.5 text-xs text-muted-foreground", children: meta }) : null] }), trailing ? _jsx("div", { className: "shrink-0", children: trailing }) : null] }), description ? (_jsx("div", { className: "mt-1.5 text-sm text-muted-foreground", children: description })) : null] })] }));
|
|
8
|
+
}
|
|
9
|
+
/** Vertical activity / journal feed. */
|
|
10
|
+
export function Timeline({ children, className }) {
|
|
11
|
+
return (_jsx("ul", { "data-slot": "timeline", className: cn("space-y-0", className), children: children }));
|
|
12
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export type ToastTone = "default" | "success" | "warn" | "danger";
|
|
3
|
+
export type ToastItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
tone?: ToastTone;
|
|
8
|
+
durationMs?: number;
|
|
9
|
+
};
|
|
10
|
+
type ToastContextValue = {
|
|
11
|
+
toasts: ToastItem[];
|
|
12
|
+
toast: (item: Omit<ToastItem, "id"> & {
|
|
13
|
+
id?: string;
|
|
14
|
+
}) => string;
|
|
15
|
+
dismiss: (id: string) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare function useToast(): ToastContextValue;
|
|
18
|
+
export type ToasterProps = {
|
|
19
|
+
children?: ReactNode;
|
|
20
|
+
className?: string;
|
|
21
|
+
position?: "top-right" | "bottom-right" | "top-center" | "bottom-center";
|
|
22
|
+
};
|
|
23
|
+
/** App-level toast host + provider. Wrap the app once and call useToast(). */
|
|
24
|
+
export declare function Toaster({ children, className, position, }: ToasterProps): import("react").JSX.Element;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=Toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../src/composites/Toast.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;AAElE,MAAM,MAAM,SAAS,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACjE,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,CAAC;AAMF,wBAAgB,QAAQ,sBAIvB;AASD,MAAM,MAAM,YAAY,GAAG;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,WAAW,GAAG,cAAc,GAAG,YAAY,GAAG,eAAe,CAAC;CAC1E,CAAC;AAEF,8EAA8E;AAC9E,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EACR,SAAS,EACT,QAAyB,GAC1B,EAAE,YAAY,+BA+Ed"}
|