@reddb-io/ui-kit 0.3.3 → 0.3.5
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/package.json +11 -13
- package/src/lib/Badge.svelte +7 -27
- package/src/lib/Button.svelte +10 -33
- package/src/lib/Card.svelte +5 -20
- package/src/lib/EmptyState.svelte +5 -26
- package/src/lib/ListRow.svelte +14 -49
- package/src/lib/NodeBadge.svelte +6 -14
- package/src/lib/Pill.svelte +7 -25
- package/src/lib/SectionHeading.svelte +7 -20
- package/src/lib/index.ts +7 -18
- package/src/lib/tone.ts +11 -0
- package/src/tokens/index.ts +40 -17
- package/src/tokens/styles.css +4 -0
- package/src/tokens/tokens.css +68 -89
- package/vendor/ds/assets/fonts/jetbrains-mono-variable.woff2 +0 -0
- package/vendor/ds/assets/fonts/space-grotesk-variable.woff2 +0 -0
- package/vendor/ds/assets/fonts.css +38 -0
- package/vendor/ds/design-system.receipt.json +871 -0
- package/vendor/ds/kits/app/README.md +601 -0
- package/vendor/ds/kits/app/interaction-allowlist.json +35 -0
- package/vendor/ds/kits/app/kit.json +5 -0
- package/vendor/ds/kits/app/src/composites/ActionPanel.svelte +66 -0
- package/vendor/ds/kits/app/src/composites/ActivityFeed.svelte +29 -0
- package/vendor/ds/kits/app/src/composites/ApplicationShell.svelte +99 -0
- package/vendor/ds/kits/app/src/composites/BottomNavigation.svelte +68 -0
- package/vendor/ds/kits/app/src/composites/CardHeading.svelte +44 -0
- package/vendor/ds/kits/app/src/composites/CategoryFilter.svelte +83 -0
- package/vendor/ds/kits/app/src/composites/CategoryPreview.svelte +45 -0
- package/vendor/ds/kits/app/src/composites/ChatMessage.svelte +53 -0
- package/vendor/ds/kits/app/src/composites/CheckoutForm.svelte +91 -0
- package/vendor/ds/kits/app/src/composites/CommandPalette.svelte +80 -0
- package/vendor/ds/kits/app/src/composites/ContextMenu.svelte +138 -0
- package/vendor/ds/kits/app/src/composites/Diff.svelte +146 -0
- package/vendor/ds/kits/app/src/composites/EntityInspector.svelte +40 -0
- package/vendor/ds/kits/app/src/composites/EntityJourney.svelte +60 -0
- package/vendor/ds/kits/app/src/composites/Filter.svelte +42 -0
- package/vendor/ds/kits/app/src/composites/Incentive.svelte +61 -0
- package/vendor/ds/kits/app/src/composites/Menubar.svelte +121 -0
- package/vendor/ds/kits/app/src/composites/MultiColumnLayout.svelte +51 -0
- package/vendor/ds/kits/app/src/composites/OrderHistory.svelte +70 -0
- package/vendor/ds/kits/app/src/composites/OrderSummary.svelte +60 -0
- package/vendor/ds/kits/app/src/composites/PageHeading.svelte +46 -0
- package/vendor/ds/kits/app/src/composites/PhaseSummary.svelte +38 -0
- package/vendor/ds/kits/app/src/composites/PlaybackControls.svelte +62 -0
- package/vendor/ds/kits/app/src/composites/ProductFeature.svelte +71 -0
- package/vendor/ds/kits/app/src/composites/ProductList.svelte +74 -0
- package/vendor/ds/kits/app/src/composites/ProductOverview.svelte +77 -0
- package/vendor/ds/kits/app/src/composites/ProductQuickview.svelte +62 -0
- package/vendor/ds/kits/app/src/composites/PropertyPanel.svelte +42 -0
- package/vendor/ds/kits/app/src/composites/Review.svelte +68 -0
- package/vendor/ds/kits/app/src/composites/SettingsRow.svelte +38 -0
- package/vendor/ds/kits/app/src/composites/ShoppingCart.svelte +136 -0
- package/vendor/ds/kits/app/src/composites/SidebarLayout.svelte +349 -0
- package/vendor/ds/kits/app/src/composites/SidebarNavigation.svelte +74 -0
- package/vendor/ds/kits/app/src/composites/SidebarPanel.svelte +50 -0
- package/vendor/ds/kits/app/src/composites/SidebarRail.svelte +162 -0
- package/vendor/ds/kits/app/src/composites/SpeedDial.svelte +67 -0
- package/vendor/ds/kits/app/src/composites/StoreNavigation.svelte +53 -0
- package/vendor/ds/kits/app/src/composites/TaskCard.svelte +71 -0
- package/vendor/ds/kits/app/src/composites/TaskList.svelte +52 -0
- package/vendor/ds/kits/app/src/composites/TelemetryRow.svelte +41 -0
- package/vendor/ds/kits/app/src/composites/Toolbar.svelte +67 -0
- package/vendor/ds/kits/app/src/composites/action-panel.variants.ts +12 -0
- package/vendor/ds/kits/app/src/composites/activity-feed.variants.ts +10 -0
- package/vendor/ds/kits/app/src/composites/application-shell.behavior.ts +25 -0
- package/vendor/ds/kits/app/src/composites/application-shell.variants.ts +35 -0
- package/vendor/ds/kits/app/src/composites/bottom-navigation.variants.ts +20 -0
- package/vendor/ds/kits/app/src/composites/card-heading.variants.ts +7 -0
- package/vendor/ds/kits/app/src/composites/category-filter.variants.ts +22 -0
- package/vendor/ds/kits/app/src/composites/category-preview.variants.ts +21 -0
- package/vendor/ds/kits/app/src/composites/chat-message.variants.ts +16 -0
- package/vendor/ds/kits/app/src/composites/checkout-form.appearance.ts +19 -0
- package/vendor/ds/kits/app/src/composites/checkout-form.variants.ts +7 -0
- package/vendor/ds/kits/app/src/composites/command-palette.behavior.ts +11 -0
- package/vendor/ds/kits/app/src/composites/command-palette.variants.ts +15 -0
- package/vendor/ds/kits/app/src/composites/command-surfaces.behavior.ts +24 -0
- package/vendor/ds/kits/app/src/composites/context-menu.variants.ts +19 -0
- package/vendor/ds/kits/app/src/composites/diff.variants.ts +31 -0
- package/vendor/ds/kits/app/src/composites/filter.variants.ts +21 -0
- package/vendor/ds/kits/app/src/composites/incentive.variants.ts +18 -0
- package/vendor/ds/kits/app/src/composites/main-landmark.ts +23 -0
- package/vendor/ds/kits/app/src/composites/menubar.variants.ts +18 -0
- package/vendor/ds/kits/app/src/composites/multi-column-layout.variants.ts +39 -0
- package/vendor/ds/kits/app/src/composites/navigation.behavior.ts +84 -0
- package/vendor/ds/kits/app/src/composites/order-history.variants.ts +38 -0
- package/vendor/ds/kits/app/src/composites/order-summary.variants.ts +23 -0
- package/vendor/ds/kits/app/src/composites/page-heading.variants.ts +22 -0
- package/vendor/ds/kits/app/src/composites/product-feature.variants.ts +37 -0
- package/vendor/ds/kits/app/src/composites/product-list.behavior.ts +4 -0
- package/vendor/ds/kits/app/src/composites/product-list.variants.ts +35 -0
- package/vendor/ds/kits/app/src/composites/product-overview.variants.ts +23 -0
- package/vendor/ds/kits/app/src/composites/product-quickview.variants.ts +21 -0
- package/vendor/ds/kits/app/src/composites/review.variants.ts +17 -0
- package/vendor/ds/kits/app/src/composites/settings-row.variants.ts +17 -0
- package/vendor/ds/kits/app/src/composites/shopping-cart.appearance.ts +32 -0
- package/vendor/ds/kits/app/src/composites/shopping-cart.variants.ts +5 -0
- package/vendor/ds/kits/app/src/composites/sidebar-layout.variants.ts +211 -0
- package/vendor/ds/kits/app/src/composites/sidebar-navigation.variants.ts +12 -0
- package/vendor/ds/kits/app/src/composites/sidebar-panel.variants.ts +13 -0
- package/vendor/ds/kits/app/src/composites/sidebar-rail.variants.ts +58 -0
- package/vendor/ds/kits/app/src/composites/speed-dial.variants.ts +22 -0
- package/vendor/ds/kits/app/src/composites/store-navigation.variants.ts +15 -0
- package/vendor/ds/kits/app/src/composites/task-list.behavior.ts +51 -0
- package/vendor/ds/kits/app/src/composites/task-list.variants.ts +18 -0
- package/vendor/ds/kits/app/src/composites/toolbar.variants.ts +27 -0
- package/vendor/ds/kits/app/src/core/category-filter.ts +4 -0
- package/vendor/ds/kits/app/src/core/checkout-form.ts +22 -0
- package/vendor/ds/kits/app/src/core/contracts/actionpanel.ts +24 -0
- package/vendor/ds/kits/app/src/core/contracts/activityfeed.ts +10 -0
- package/vendor/ds/kits/app/src/core/contracts/applicationshell.ts +17 -0
- package/vendor/ds/kits/app/src/core/contracts/bottomnavigation.ts +20 -0
- package/vendor/ds/kits/app/src/core/contracts/cardheading.ts +15 -0
- package/vendor/ds/kits/app/src/core/contracts/categoryfilter.ts +21 -0
- package/vendor/ds/kits/app/src/core/contracts/categorypreview.ts +18 -0
- package/vendor/ds/kits/app/src/core/contracts/chatmessage.ts +18 -0
- package/vendor/ds/kits/app/src/core/contracts/checkoutform.ts +18 -0
- package/vendor/ds/kits/app/src/core/contracts/commandpalette.ts +24 -0
- package/vendor/ds/kits/app/src/core/contracts/contextmenu.ts +30 -0
- package/vendor/ds/kits/app/src/core/contracts/diff.ts +18 -0
- package/vendor/ds/kits/app/src/core/contracts/entityinspector.ts +25 -0
- package/vendor/ds/kits/app/src/core/contracts/entityjourney.ts +14 -0
- package/vendor/ds/kits/app/src/core/contracts/filter.ts +22 -0
- package/vendor/ds/kits/app/src/core/contracts/incentive.ts +11 -0
- package/vendor/ds/kits/app/src/core/contracts/listrow.ts +15 -0
- package/vendor/ds/kits/app/src/core/contracts/menubar.ts +28 -0
- package/vendor/ds/kits/app/src/core/contracts/multicolumnlayout.ts +7 -0
- package/vendor/ds/kits/app/src/core/contracts/navitem.ts +17 -0
- package/vendor/ds/kits/app/src/core/contracts/nodebadge.ts +11 -0
- package/vendor/ds/kits/app/src/core/contracts/orderhistory.ts +25 -0
- package/vendor/ds/kits/app/src/core/contracts/ordersummary.ts +19 -0
- package/vendor/ds/kits/app/src/core/contracts/pageheading.ts +9 -0
- package/vendor/ds/kits/app/src/core/contracts/phasesummary.ts +9 -0
- package/vendor/ds/kits/app/src/core/contracts/pill.ts +17 -0
- package/vendor/ds/kits/app/src/core/contracts/playbackcontrols.ts +20 -0
- package/vendor/ds/kits/app/src/core/contracts/productfeature.ts +14 -0
- package/vendor/ds/kits/app/src/core/contracts/productlist.ts +17 -0
- package/vendor/ds/kits/app/src/core/contracts/productoverview.ts +20 -0
- package/vendor/ds/kits/app/src/core/contracts/productquickview.ts +16 -0
- package/vendor/ds/kits/app/src/core/contracts/propertypanel.ts +9 -0
- package/vendor/ds/kits/app/src/core/contracts/review.ts +22 -0
- package/vendor/ds/kits/app/src/core/contracts/settingsrow.ts +13 -0
- package/vendor/ds/kits/app/src/core/contracts/shoppingcart.ts +29 -0
- package/vendor/ds/kits/app/src/core/contracts/sidebarlayout.ts +40 -0
- package/vendor/ds/kits/app/src/core/contracts/sidebarnavigation.ts +16 -0
- package/vendor/ds/kits/app/src/core/contracts/sidebarpanel.ts +22 -0
- package/vendor/ds/kits/app/src/core/contracts/sidebarrail.ts +13 -0
- package/vendor/ds/kits/app/src/core/contracts/speeddial.ts +32 -0
- package/vendor/ds/kits/app/src/core/contracts/splitview.ts +15 -0
- package/vendor/ds/kits/app/src/core/contracts/storenavigation.ts +20 -0
- package/vendor/ds/kits/app/src/core/contracts/taskcard.ts +7 -0
- package/vendor/ds/kits/app/src/core/contracts/tasklist.ts +13 -0
- package/vendor/ds/kits/app/src/core/contracts/telemetryrow.ts +17 -0
- package/vendor/ds/kits/app/src/core/contracts/toolbar.ts +25 -0
- package/vendor/ds/kits/app/src/core/diff.ts +7 -0
- package/vendor/ds/kits/app/src/core/entity-inspector.ts +26 -0
- package/vendor/ds/kits/app/src/core/entity-journey.ts +52 -0
- package/vendor/ds/kits/app/src/core/measure.ts +7 -0
- package/vendor/ds/kits/app/src/core/operational.ts +42 -0
- package/vendor/ds/kits/app/src/core/product-list.ts +16 -0
- package/vendor/ds/kits/app/src/core/settings-row.ts +9 -0
- package/vendor/ds/kits/app/src/core/shopping-cart.ts +17 -0
- package/vendor/ds/kits/app/src/core/sidebar-rail.ts +58 -0
- package/vendor/ds/kits/app/src/entity-inspector.variants.ts +14 -0
- package/vendor/ds/kits/app/src/entity-journey.variants.ts +38 -0
- package/vendor/ds/kits/app/src/index.ts +429 -0
- package/vendor/ds/kits/app/src/operational.variants.ts +20 -0
- package/vendor/ds/kits/app/src/primitives/ListRow.svelte +95 -0
- package/vendor/ds/kits/app/src/primitives/NavItem.svelte +87 -0
- package/vendor/ds/kits/app/src/primitives/NodeBadge.svelte +47 -0
- package/vendor/ds/kits/app/src/primitives/Pill.svelte +81 -0
- package/vendor/ds/kits/app/src/primitives/SplitView.svelte +148 -0
- package/vendor/ds/kits/app/src/primitives/list-row.variants.ts +82 -0
- package/vendor/ds/kits/app/src/primitives/nav-item.variants.ts +56 -0
- package/vendor/ds/kits/app/src/primitives/node-badge.variants.ts +73 -0
- package/vendor/ds/kits/app/src/primitives/pill.variants.ts +117 -0
- package/vendor/ds/kits/app/src/primitives/split-view.behavior.ts +113 -0
- package/vendor/ds/kits/app/src/primitives/split-view.variants.ts +60 -0
- package/vendor/ds/kits/app/src/recipes.ts +44 -0
- package/vendor/ds/kits/app/svelte.config.js +6 -0
- package/vendor/ds/kits/app/test/action-panel.test.ts +63 -0
- package/vendor/ds/kits/app/test/activity-feed.test.ts +74 -0
- package/vendor/ds/kits/app/test/application-shell.test.ts +147 -0
- package/vendor/ds/kits/app/test/base-contraction.test.ts +60 -0
- package/vendor/ds/kits/app/test/button-migration.test.ts +134 -0
- package/vendor/ds/kits/app/test/card-heading.test.ts +53 -0
- package/vendor/ds/kits/app/test/category-filter.test.ts +84 -0
- package/vendor/ds/kits/app/test/category-preview.test.ts +75 -0
- package/vendor/ds/kits/app/test/chat-message.test.ts +70 -0
- package/vendor/ds/kits/app/test/checkout-form.test.ts +134 -0
- package/vendor/ds/kits/app/test/coherence.test.ts +193 -0
- package/vendor/ds/kits/app/test/command-palette.test.ts +177 -0
- package/vendor/ds/kits/app/test/command-surface-failures.test.ts +28 -0
- package/vendor/ds/kits/app/test/commerce-readiness.ts +54 -0
- package/vendor/ds/kits/app/test/consumer-check.test.ts +61 -0
- package/vendor/ds/kits/app/test/context-menu.test.ts +96 -0
- package/vendor/ds/kits/app/test/density.test.ts +487 -0
- package/vendor/ds/kits/app/test/diff.test.ts +121 -0
- package/vendor/ds/kits/app/test/elevation.test.ts +77 -0
- package/vendor/ds/kits/app/test/entity-inspector.test.ts +97 -0
- package/vendor/ds/kits/app/test/entity-journey.test.ts +100 -0
- package/vendor/ds/kits/app/test/event-dialect.test.ts +183 -0
- package/vendor/ds/kits/app/test/filter.test.ts +161 -0
- package/vendor/ds/kits/app/test/fixtures/ApplicationLayoutsConsumer.svelte +26 -0
- package/vendor/ds/kits/app/test/fixtures/ApplicationLayoutsContractFailures.svelte +19 -0
- package/vendor/ds/kits/app/test/fixtures/CommandPaletteConsumer.svelte +22 -0
- package/vendor/ds/kits/app/test/fixtures/CommandPaletteContractFailures.svelte +20 -0
- package/vendor/ds/kits/app/test/fixtures/CommandSurfaceContractFailures.svelte +24 -0
- package/vendor/ds/kits/app/test/fixtures/CommerceContractFailures.svelte +17 -0
- package/vendor/ds/kits/app/test/fixtures/CommerceSurfacesConsumer.svelte +30 -0
- package/vendor/ds/kits/app/test/fixtures/DiffConsumer.svelte +18 -0
- package/vendor/ds/kits/app/test/fixtures/DiffContractFailures.svelte +5 -0
- package/vendor/ds/kits/app/test/fixtures/EntityInspector.svelte +7 -0
- package/vendor/ds/kits/app/test/fixtures/EntityJourney.svelte +11 -0
- package/vendor/ds/kits/app/test/fixtures/FilterContractFailures.svelte +16 -0
- package/vendor/ds/kits/app/test/fixtures/FilterSurfacesConsumer.svelte +24 -0
- package/vendor/ds/kits/app/test/fixtures/FrameworkApp.svelte +28 -0
- package/vendor/ds/kits/app/test/fixtures/HeadingContractFailures.svelte +10 -0
- package/vendor/ds/kits/app/test/fixtures/MainOwnershipConsumer.svelte +35 -0
- package/vendor/ds/kits/app/test/fixtures/MerchandisingContractFailures.svelte +3 -0
- package/vendor/ds/kits/app/test/fixtures/MerchandisingSurfacesConsumer.svelte +28 -0
- package/vendor/ds/kits/app/test/fixtures/NavigationContractFailures.svelte +22 -0
- package/vendor/ds/kits/app/test/fixtures/NavigationSurfacesConsumer.svelte +23 -0
- package/vendor/ds/kits/app/test/fixtures/NestedSplitViewConsumer.svelte +20 -0
- package/vendor/ds/kits/app/test/fixtures/Operational.svelte +34 -0
- package/vendor/ds/kits/app/test/fixtures/ProductCatalogueConsumer.svelte +58 -0
- package/vendor/ds/kits/app/test/fixtures/ProductCatalogueContractFailures.svelte +29 -0
- package/vendor/ds/kits/app/test/fixtures/SettingsRows.svelte +10 -0
- package/vendor/ds/kits/app/test/fixtures/ShellBrandComposition.svelte +52 -0
- package/vendor/ds/kits/app/test/fixtures/SocialContractFailures.svelte +20 -0
- package/vendor/ds/kits/app/test/fixtures/SocialSurfacesConsumer.svelte +43 -0
- package/vendor/ds/kits/app/test/fixtures/TestGlyph.svelte +9 -0
- package/vendor/ds/kits/app/test/fixtures/TitlingSurfacesConsumer.svelte +21 -0
- package/vendor/ds/kits/app/test/fixtures/command-surfaces-consumer.ts +14 -0
- package/vendor/ds/kits/app/test/fixtures/consumer-check/Unfixed.svelte +50 -0
- package/vendor/ds/kits/app/test/fixtures/consumer-check/tsconfig.json +4 -0
- package/vendor/ds/kits/app/test/fixtures/markers/fixture-badge.variants.ts +12 -0
- package/vendor/ds/kits/app/test/fixtures/markers/fixture-chip.variants.ts +8 -0
- package/vendor/ds/kits/app/test/fixtures/tree-shaking/button-only.ts +7 -0
- package/vendor/ds/kits/app/test/fixtures/tree-shaking/menu-only.ts +9 -0
- package/vendor/ds/kits/app/test/fixtures/tree-shaking/number-field-only.ts +1 -0
- package/vendor/ds/kits/app/test/fixtures/tree-shaking/task-list-only.ts +1 -0
- package/vendor/ds/kits/app/test/framework-app.test.ts +140 -0
- package/vendor/ds/kits/app/test/framework-operational.test.ts +97 -0
- package/vendor/ds/kits/app/test/heading-level.test.ts +38 -0
- package/vendor/ds/kits/app/test/incentive.test.ts +60 -0
- package/vendor/ds/kits/app/test/label-in-name.ts +43 -0
- package/vendor/ds/kits/app/test/layout-readiness.ts +49 -0
- package/vendor/ds/kits/app/test/lint.test.ts +54 -0
- package/vendor/ds/kits/app/test/list-row.test.ts +117 -0
- package/vendor/ds/kits/app/test/main-ownership.test.ts +56 -0
- package/vendor/ds/kits/app/test/markers.test.ts +94 -0
- package/vendor/ds/kits/app/test/markers.ts +94 -0
- package/vendor/ds/kits/app/test/menubar.test.ts +93 -0
- package/vendor/ds/kits/app/test/mount.ts +86 -0
- package/vendor/ds/kits/app/test/multi-column-layout.test.ts +106 -0
- package/vendor/ds/kits/app/test/nav-item.test.ts +125 -0
- package/vendor/ds/kits/app/test/navigation-markers.test.ts +31 -0
- package/vendor/ds/kits/app/test/node-badge.test.ts +81 -0
- package/vendor/ds/kits/app/test/order-history.test.ts +78 -0
- package/vendor/ds/kits/app/test/order-summary.test.ts +77 -0
- package/vendor/ds/kits/app/test/page-heading.test.ts +90 -0
- package/vendor/ds/kits/app/test/pill.test.ts +63 -0
- package/vendor/ds/kits/app/test/product-feature.test.ts +76 -0
- package/vendor/ds/kits/app/test/product-list.test.ts +95 -0
- package/vendor/ds/kits/app/test/product-overview.test.ts +92 -0
- package/vendor/ds/kits/app/test/product-quickview.test.ts +116 -0
- package/vendor/ds/kits/app/test/react-consumer.tsx +36 -0
- package/vendor/ds/kits/app/test/review.test.ts +84 -0
- package/vendor/ds/kits/app/test/settings-row.test.ts +34 -0
- package/vendor/ds/kits/app/test/shell-brand.test.ts +22 -0
- package/vendor/ds/kits/app/test/shopping-cart.test.ts +172 -0
- package/vendor/ds/kits/app/test/sidebar-layout.test.ts +133 -0
- package/vendor/ds/kits/app/test/sidebar-navigation-bottom-navigation-store-navigation.test.ts +245 -0
- package/vendor/ds/kits/app/test/sidebar-panel.test.ts +29 -0
- package/vendor/ds/kits/app/test/sidebar-rail.test.ts +320 -0
- package/vendor/ds/kits/app/test/speed-dial.test.ts +53 -0
- package/vendor/ds/kits/app/test/split-view.behavior.test.ts +137 -0
- package/vendor/ds/kits/app/test/split-view.dense-tooling.test.ts +66 -0
- package/vendor/ds/kits/app/test/split-view.test.ts +210 -0
- package/vendor/ds/kits/app/test/task-list.test.ts +26 -0
- package/vendor/ds/kits/app/test/taxonomy.test.ts +149 -0
- package/vendor/ds/kits/app/test/toolbar.test.ts +42 -0
- package/vendor/ds/kits/app/test/tree-shaking.test.ts +381 -0
- package/vendor/ds/kits/app/test/vocabulary.test.ts +182 -0
- package/vendor/ds/kits/app/tools/build-cli.ts +34 -0
- package/vendor/ds/kits/app/tools/check-cli.ts +33 -0
- package/vendor/ds/kits/app/tools/consumer-check.ts +117 -0
- package/vendor/ds/kits/app/tools/lint-cli.ts +19 -0
- package/vendor/ds/kits/app/tools/paths.ts +47 -0
- package/vendor/ds/kits/app/tsconfig.consumer.json +30 -0
- package/vendor/ds/kits/app/tsconfig.json +26 -0
- package/vendor/ds/kits/app/type-ledger.json +4 -0
- package/vendor/ds/kits/app/vite.config.ts +28 -0
- package/vendor/ds/kits/base/README.md +1482 -0
- package/vendor/ds/kits/base/interaction-allowlist.json +106 -0
- package/vendor/ds/kits/base/kit.json +4 -0
- package/vendor/ds/kits/base/src/Accordion.svelte +113 -0
- package/vendor/ds/kits/base/src/Alert.svelte +51 -0
- package/vendor/ds/kits/base/src/AlertDialog.svelte +77 -0
- package/vendor/ds/kits/base/src/AppearanceSwitch.svelte +73 -0
- package/vendor/ds/kits/base/src/AspectRatio.svelte +32 -0
- package/vendor/ds/kits/base/src/Avatar.svelte +75 -0
- package/vendor/ds/kits/base/src/Badge.svelte +63 -0
- package/vendor/ds/kits/base/src/Breadcrumbs.svelte +57 -0
- package/vendor/ds/kits/base/src/BrowserMockup.svelte +53 -0
- package/vendor/ds/kits/base/src/BulletsSlide.svelte +60 -0
- package/vendor/ds/kits/base/src/Button.svelte +123 -0
- package/vendor/ds/kits/base/src/Calendar.svelte +156 -0
- package/vendor/ds/kits/base/src/Card.svelte +213 -0
- package/vendor/ds/kits/base/src/Carousel.svelte +172 -0
- package/vendor/ds/kits/base/src/Checkbox.svelte +99 -0
- package/vendor/ds/kits/base/src/CodeBlock.svelte +113 -0
- package/vendor/ds/kits/base/src/Combobox.svelte +124 -0
- package/vendor/ds/kits/base/src/Container.svelte +29 -0
- package/vendor/ds/kits/base/src/ContentMask.svelte +32 -0
- package/vendor/ds/kits/base/src/ControlGroup.svelte +42 -0
- package/vendor/ds/kits/base/src/Countdown.svelte +55 -0
- package/vendor/ds/kits/base/src/DateField.svelte +157 -0
- package/vendor/ds/kits/base/src/DatePicker.svelte +112 -0
- package/vendor/ds/kits/base/src/DateRangeField.svelte +81 -0
- package/vendor/ds/kits/base/src/DateRangePicker.svelte +137 -0
- package/vendor/ds/kits/base/src/Deck.svelte +24 -0
- package/vendor/ds/kits/base/src/DescriptionList.svelte +40 -0
- package/vendor/ds/kits/base/src/Dialog.svelte +143 -0
- package/vendor/ds/kits/base/src/Disclosure.svelte +85 -0
- package/vendor/ds/kits/base/src/Divider.svelte +22 -0
- package/vendor/ds/kits/base/src/Drawer.svelte +17 -0
- package/vendor/ds/kits/base/src/DropdownMenu.svelte +192 -0
- package/vendor/ds/kits/base/src/EmptyState.svelte +54 -0
- package/vendor/ds/kits/base/src/Eyebrow.svelte +21 -0
- package/vendor/ds/kits/base/src/Field.svelte +75 -0
- package/vendor/ds/kits/base/src/Fieldset.svelte +70 -0
- package/vendor/ds/kits/base/src/FigureSlide.svelte +70 -0
- package/vendor/ds/kits/base/src/FileInput.svelte +104 -0
- package/vendor/ds/kits/base/src/Form.svelte +21 -0
- package/vendor/ds/kits/base/src/GridList.svelte +51 -0
- package/vendor/ds/kits/base/src/Heading.svelte +41 -0
- package/vendor/ds/kits/base/src/Icon.svelte +75 -0
- package/vendor/ds/kits/base/src/Image.svelte +133 -0
- package/vendor/ds/kits/base/src/Indicator.svelte +35 -0
- package/vendor/ds/kits/base/src/InlineEdit.svelte +86 -0
- package/vendor/ds/kits/base/src/Input.svelte +84 -0
- package/vendor/ds/kits/base/src/Kbd.svelte +41 -0
- package/vendor/ds/kits/base/src/Label.svelte +21 -0
- package/vendor/ds/kits/base/src/Link.svelte +21 -0
- package/vendor/ds/kits/base/src/LinkPreview.svelte +95 -0
- package/vendor/ds/kits/base/src/List.svelte +28 -0
- package/vendor/ds/kits/base/src/ListContainer.svelte +51 -0
- package/vendor/ds/kits/base/src/LoadingIndicator.svelte +48 -0
- package/vendor/ds/kits/base/src/Logo.svelte +183 -0
- package/vendor/ds/kits/base/src/MediaObject.svelte +46 -0
- package/vendor/ds/kits/base/src/Meter.svelte +130 -0
- package/vendor/ds/kits/base/src/Navbar.svelte +176 -0
- package/vendor/ds/kits/base/src/NavigationMenu.svelte +124 -0
- package/vendor/ds/kits/base/src/NavigationScope.svelte +57 -0
- package/vendor/ds/kits/base/src/Notification.svelte +74 -0
- package/vendor/ds/kits/base/src/NumberField.svelte +104 -0
- package/vendor/ds/kits/base/src/OneTimeCodeInput.svelte +176 -0
- package/vendor/ds/kits/base/src/Pagination.svelte +40 -0
- package/vendor/ds/kits/base/src/PhoneInput.svelte +96 -0
- package/vendor/ds/kits/base/src/PhoneMockup.svelte +42 -0
- package/vendor/ds/kits/base/src/Popover.svelte +116 -0
- package/vendor/ds/kits/base/src/Progress.svelte +115 -0
- package/vendor/ds/kits/base/src/Prose.svelte +40 -0
- package/vendor/ds/kits/base/src/QuoteSlide.svelte +60 -0
- package/vendor/ds/kits/base/src/RadialProgress.svelte +85 -0
- package/vendor/ds/kits/base/src/RadioGroup.svelte +117 -0
- package/vendor/ds/kits/base/src/RangeCalendar.svelte +171 -0
- package/vendor/ds/kits/base/src/Rating.svelte +126 -0
- package/vendor/ds/kits/base/src/Reveal.svelte +36 -0
- package/vendor/ds/kits/base/src/ScrollArea.svelte +40 -0
- package/vendor/ds/kits/base/src/SearchSelect.svelte +203 -0
- package/vendor/ds/kits/base/src/SectionHeading.svelte +59 -0
- package/vendor/ds/kits/base/src/SectionSlide.svelte +56 -0
- package/vendor/ds/kits/base/src/Select.svelte +95 -0
- package/vendor/ds/kits/base/src/Skeleton.svelte +35 -0
- package/vendor/ds/kits/base/src/SkipLink.svelte +39 -0
- package/vendor/ds/kits/base/src/SlideFrame.svelte +63 -0
- package/vendor/ds/kits/base/src/Slider.svelte +107 -0
- package/vendor/ds/kits/base/src/Stack.svelte +57 -0
- package/vendor/ds/kits/base/src/Statistic.svelte +74 -0
- package/vendor/ds/kits/base/src/StatusIndicator.svelte +52 -0
- package/vendor/ds/kits/base/src/Steps.svelte +51 -0
- package/vendor/ds/kits/base/src/Swap.svelte +85 -0
- package/vendor/ds/kits/base/src/Switch.svelte +91 -0
- package/vendor/ds/kits/base/src/Table.svelte +96 -0
- package/vendor/ds/kits/base/src/Tabs.svelte +131 -0
- package/vendor/ds/kits/base/src/Text.svelte +45 -0
- package/vendor/ds/kits/base/src/Textarea.svelte +63 -0
- package/vendor/ds/kits/base/src/TimeField.svelte +118 -0
- package/vendor/ds/kits/base/src/TimeRangeField.svelte +81 -0
- package/vendor/ds/kits/base/src/Timeline.svelte +49 -0
- package/vendor/ds/kits/base/src/TitleSlide.svelte +63 -0
- package/vendor/ds/kits/base/src/ToggleButton.svelte +78 -0
- package/vendor/ds/kits/base/src/ToggleGroup.svelte +79 -0
- package/vendor/ds/kits/base/src/Tooltip.svelte +109 -0
- package/vendor/ds/kits/base/src/Transfer.svelte +31 -0
- package/vendor/ds/kits/base/src/TwoColumnSlide.svelte +63 -0
- package/vendor/ds/kits/base/src/WindowMockup.svelte +51 -0
- package/vendor/ds/kits/base/src/a11y.ts +21 -0
- package/vendor/ds/kits/base/src/accordion.variants.ts +26 -0
- package/vendor/ds/kits/base/src/alert-dialog.variants.ts +17 -0
- package/vendor/ds/kits/base/src/alert.variants.ts +36 -0
- package/vendor/ds/kits/base/src/appearance-switch.behavior.ts +29 -0
- package/vendor/ds/kits/base/src/aspect-ratio.variants.ts +14 -0
- package/vendor/ds/kits/base/src/avatar.variants.ts +29 -0
- package/vendor/ds/kits/base/src/badge.variants.ts +89 -0
- package/vendor/ds/kits/base/src/breadcrumbs.variants.ts +15 -0
- package/vendor/ds/kits/base/src/browser-mockup.variants.ts +18 -0
- package/vendor/ds/kits/base/src/button.variants.ts +186 -0
- package/vendor/ds/kits/base/src/calendar.variants.ts +35 -0
- package/vendor/ds/kits/base/src/card.variants.ts +293 -0
- package/vendor/ds/kits/base/src/carousel.variants.ts +19 -0
- package/vendor/ds/kits/base/src/checkbox.variants.ts +64 -0
- package/vendor/ds/kits/base/src/code-block.variants.ts +58 -0
- package/vendor/ds/kits/base/src/collapsible.style.ts +15 -0
- package/vendor/ds/kits/base/src/combobox.variants.ts +62 -0
- package/vendor/ds/kits/base/src/container.variants.ts +27 -0
- package/vendor/ds/kits/base/src/content-mask.variants.ts +57 -0
- package/vendor/ds/kits/base/src/control-group.variants.ts +22 -0
- package/vendor/ds/kits/base/src/core/a11y.ts +106 -0
- package/vendor/ds/kits/base/src/core/appearance-switch.ts +39 -0
- package/vendor/ds/kits/base/src/core/avatar.ts +27 -0
- package/vendor/ds/kits/base/src/core/breadcrumbs.ts +11 -0
- package/vendor/ds/kits/base/src/core/calendar.ts +95 -0
- package/vendor/ds/kits/base/src/core/carousel.ts +8 -0
- package/vendor/ds/kits/base/src/core/choices.ts +29 -0
- package/vendor/ds/kits/base/src/core/code-block.ts +23 -0
- package/vendor/ds/kits/base/src/core/confirmation.ts +24 -0
- package/vendor/ds/kits/base/src/core/contracts/accordion.ts +28 -0
- package/vendor/ds/kits/base/src/core/contracts/carousel.ts +23 -0
- package/vendor/ds/kits/base/src/core/contracts/combobox.ts +35 -0
- package/vendor/ds/kits/base/src/core/contracts/datefield.ts +23 -0
- package/vendor/ds/kits/base/src/core/contracts/datepicker.ts +62 -0
- package/vendor/ds/kits/base/src/core/contracts/daterangefield.ts +33 -0
- package/vendor/ds/kits/base/src/core/contracts/daterangepicker.ts +88 -0
- package/vendor/ds/kits/base/src/core/contracts/dialog.ts +24 -0
- package/vendor/ds/kits/base/src/core/contracts/disclosure.ts +15 -0
- package/vendor/ds/kits/base/src/core/contracts/linkpreview.ts +29 -0
- package/vendor/ds/kits/base/src/core/contracts/navbar.ts +30 -0
- package/vendor/ds/kits/base/src/core/contracts/navigationmenu.ts +35 -0
- package/vendor/ds/kits/base/src/core/contracts/phoneinput.ts +55 -0
- package/vendor/ds/kits/base/src/core/contracts/popover.ts +29 -0
- package/vendor/ds/kits/base/src/core/contracts/searchselect.ts +38 -0
- package/vendor/ds/kits/base/src/core/contracts/tabs.ts +26 -0
- package/vendor/ds/kits/base/src/core/contracts/timefield.ts +23 -0
- package/vendor/ds/kits/base/src/core/contracts/timerangefield.ts +33 -0
- package/vendor/ds/kits/base/src/core/contracts/tooltip.ts +12 -0
- package/vendor/ds/kits/base/src/core/contracts/transfer.ts +13 -0
- package/vendor/ds/kits/base/src/core/date-segments.ts +18 -0
- package/vendor/ds/kits/base/src/core/description-list.ts +5 -0
- package/vendor/ds/kits/base/src/core/dropdown-menu.ts +55 -0
- package/vendor/ds/kits/base/src/core/feedback.ts +5 -0
- package/vendor/ds/kits/base/src/core/field.ts +57 -0
- package/vendor/ds/kits/base/src/core/fieldset.ts +10 -0
- package/vendor/ds/kits/base/src/core/focus-scope.ts +27 -0
- package/vendor/ds/kits/base/src/core/icon.ts +15 -0
- package/vendor/ds/kits/base/src/core/index.ts +2 -0
- package/vendor/ds/kits/base/src/core/inline-edit.ts +86 -0
- package/vendor/ds/kits/base/src/core/input.ts +9 -0
- package/vendor/ds/kits/base/src/core/modal.ts +73 -0
- package/vendor/ds/kits/base/src/core/native-controls.ts +43 -0
- package/vendor/ds/kits/base/src/core/navbar.ts +16 -0
- package/vendor/ds/kits/base/src/core/navigation-disclosures.ts +10 -0
- package/vendor/ds/kits/base/src/core/navigation.ts +48 -0
- package/vendor/ds/kits/base/src/core/number-field.ts +8 -0
- package/vendor/ds/kits/base/src/core/one-time-code.ts +17 -0
- package/vendor/ds/kits/base/src/core/operational-motion.ts +174 -0
- package/vendor/ds/kits/base/src/core/pagination.ts +8 -0
- package/vendor/ds/kits/base/src/core/phone-input.ts +106 -0
- package/vendor/ds/kits/base/src/core/portal-appearance.ts +15 -0
- package/vendor/ds/kits/base/src/core/reveal.ts +60 -0
- package/vendor/ds/kits/base/src/core/segments.ts +28 -0
- package/vendor/ds/kits/base/src/core/skip-link.ts +7 -0
- package/vendor/ds/kits/base/src/core/slider.ts +23 -0
- package/vendor/ds/kits/base/src/core/steps.ts +12 -0
- package/vendor/ds/kits/base/src/core/table.ts +21 -0
- package/vendor/ds/kits/base/src/core/timeline.ts +14 -0
- package/vendor/ds/kits/base/src/core/toggle-group.ts +41 -0
- package/vendor/ds/kits/base/src/countdown.behavior.ts +26 -0
- package/vendor/ds/kits/base/src/countdown.variants.ts +11 -0
- package/vendor/ds/kits/base/src/date-field.variants.ts +24 -0
- package/vendor/ds/kits/base/src/date-picker.variants.ts +16 -0
- package/vendor/ds/kits/base/src/date-range-field.variants.ts +21 -0
- package/vendor/ds/kits/base/src/date-range-picker.variants.ts +15 -0
- package/vendor/ds/kits/base/src/deck.variants.ts +10 -0
- package/vendor/ds/kits/base/src/deprecation.ts +24 -0
- package/vendor/ds/kits/base/src/description-list.appearance.ts +32 -0
- package/vendor/ds/kits/base/src/description-list.variants.ts +6 -0
- package/vendor/ds/kits/base/src/dialog.variants.ts +30 -0
- package/vendor/ds/kits/base/src/disclosure.variants.ts +14 -0
- package/vendor/ds/kits/base/src/divider.variants.ts +17 -0
- package/vendor/ds/kits/base/src/drawer.variants.ts +48 -0
- package/vendor/ds/kits/base/src/dropdown-menu.behavior.ts +6 -0
- package/vendor/ds/kits/base/src/dropdown-menu.variants.ts +38 -0
- package/vendor/ds/kits/base/src/empty-state.variants.ts +41 -0
- package/vendor/ds/kits/base/src/eyebrow.variants.ts +14 -0
- package/vendor/ds/kits/base/src/field.variants.ts +54 -0
- package/vendor/ds/kits/base/src/fieldset.variants.ts +29 -0
- package/vendor/ds/kits/base/src/file-input.variants.ts +18 -0
- package/vendor/ds/kits/base/src/form.variants.ts +13 -0
- package/vendor/ds/kits/base/src/grid-list.variants.ts +38 -0
- package/vendor/ds/kits/base/src/heading.variants.ts +35 -0
- package/vendor/ds/kits/base/src/image.variants.ts +121 -0
- package/vendor/ds/kits/base/src/index.ts +1039 -0
- package/vendor/ds/kits/base/src/indicator.variants.ts +35 -0
- package/vendor/ds/kits/base/src/inline-edit.variants.ts +33 -0
- package/vendor/ds/kits/base/src/input.variants.ts +33 -0
- package/vendor/ds/kits/base/src/interaction.ts +3 -0
- package/vendor/ds/kits/base/src/kbd.variants.ts +25 -0
- package/vendor/ds/kits/base/src/label.variants.ts +8 -0
- package/vendor/ds/kits/base/src/link-preview.variants.ts +10 -0
- package/vendor/ds/kits/base/src/link.variants.ts +20 -0
- package/vendor/ds/kits/base/src/list.variants.ts +17 -0
- package/vendor/ds/kits/base/src/loading-indicator.variants.ts +31 -0
- package/vendor/ds/kits/base/src/logo.box.ts +128 -0
- package/vendor/ds/kits/base/src/logo.marks.ts +248 -0
- package/vendor/ds/kits/base/src/logo.surface.ts +45 -0
- package/vendor/ds/kits/base/src/logo.variants.ts +53 -0
- package/vendor/ds/kits/base/src/marks/reddb-horizontal-color.svg +14 -0
- package/vendor/ds/kits/base/src/marks/reddb-horizontal-inverse.svg +14 -0
- package/vendor/ds/kits/base/src/marks/reddb-icon-color.svg +5 -0
- package/vendor/ds/kits/base/src/marks/reddb-stacked-color.svg +16 -0
- package/vendor/ds/kits/base/src/marks/reddb-stacked-inverse.svg +16 -0
- package/vendor/ds/kits/base/src/marks/reddb-symbol-black.svg +5 -0
- package/vendor/ds/kits/base/src/marks/reddb-symbol-color.svg +5 -0
- package/vendor/ds/kits/base/src/marks/reddb-symbol-knockout.svg +4 -0
- package/vendor/ds/kits/base/src/marks/reddb-symbol-white.svg +5 -0
- package/vendor/ds/kits/base/src/marks/reddb-wordmark-black.svg +10 -0
- package/vendor/ds/kits/base/src/marks/reddb-wordmark-white.svg +10 -0
- package/vendor/ds/kits/base/src/media-object.variants.ts +29 -0
- package/vendor/ds/kits/base/src/meter.variants.ts +55 -0
- package/vendor/ds/kits/base/src/navbar.variants.ts +78 -0
- package/vendor/ds/kits/base/src/navigation-menu.behavior.ts +24 -0
- package/vendor/ds/kits/base/src/navigation-menu.variants.ts +39 -0
- package/vendor/ds/kits/base/src/navigation.ts +45 -0
- package/vendor/ds/kits/base/src/notification.variants.ts +14 -0
- package/vendor/ds/kits/base/src/number-field.variants.ts +10 -0
- package/vendor/ds/kits/base/src/one-time-code-input.variants.ts +23 -0
- package/vendor/ds/kits/base/src/pagination.variants.ts +19 -0
- package/vendor/ds/kits/base/src/phone-input.variants.ts +17 -0
- package/vendor/ds/kits/base/src/phone-mockup.variants.ts +16 -0
- package/vendor/ds/kits/base/src/popover.variants.ts +12 -0
- package/vendor/ds/kits/base/src/portal-appearance.svelte.ts +12 -0
- package/vendor/ds/kits/base/src/progress.behavior.ts +37 -0
- package/vendor/ds/kits/base/src/progress.variants.ts +31 -0
- package/vendor/ds/kits/base/src/prose.variants.ts +231 -0
- package/vendor/ds/kits/base/src/quiet-control.variants.ts +90 -0
- package/vendor/ds/kits/base/src/radial-progress.variants.ts +47 -0
- package/vendor/ds/kits/base/src/radio-group.variants.ts +59 -0
- package/vendor/ds/kits/base/src/rating.variants.ts +22 -0
- package/vendor/ds/kits/base/src/recipes.ts +100 -0
- package/vendor/ds/kits/base/src/reduced-motion.svelte.ts +40 -0
- package/vendor/ds/kits/base/src/reveal.variants.ts +43 -0
- package/vendor/ds/kits/base/src/scroll-area.variants.ts +29 -0
- package/vendor/ds/kits/base/src/search-select.variants.ts +39 -0
- package/vendor/ds/kits/base/src/section-heading.variants.ts +41 -0
- package/vendor/ds/kits/base/src/segments.variants.ts +8 -0
- package/vendor/ds/kits/base/src/select.variants.ts +30 -0
- package/vendor/ds/kits/base/src/skeleton.variants.ts +17 -0
- package/vendor/ds/kits/base/src/skip-link.variants.ts +17 -0
- package/vendor/ds/kits/base/src/slide-frame.variants.ts +94 -0
- package/vendor/ds/kits/base/src/slide-layout.variants.ts +43 -0
- package/vendor/ds/kits/base/src/slider.variants.ts +16 -0
- package/vendor/ds/kits/base/src/stack.variants.ts +65 -0
- package/vendor/ds/kits/base/src/statistic.variants.ts +12 -0
- package/vendor/ds/kits/base/src/status-indicator.variants.ts +52 -0
- package/vendor/ds/kits/base/src/steps.variants.ts +18 -0
- package/vendor/ds/kits/base/src/structured-data.ts +94 -0
- package/vendor/ds/kits/base/src/swap.variants.ts +13 -0
- package/vendor/ds/kits/base/src/switch.variants.ts +20 -0
- package/vendor/ds/kits/base/src/table.variants.ts +31 -0
- package/vendor/ds/kits/base/src/tabs.variants.ts +32 -0
- package/vendor/ds/kits/base/src/text.variants.ts +51 -0
- package/vendor/ds/kits/base/src/textarea.variants.ts +19 -0
- package/vendor/ds/kits/base/src/time-field.variants.ts +21 -0
- package/vendor/ds/kits/base/src/time-range-field.variants.ts +21 -0
- package/vendor/ds/kits/base/src/timeline.variants.ts +22 -0
- package/vendor/ds/kits/base/src/toggle-button.variants.ts +26 -0
- package/vendor/ds/kits/base/src/toggle-group.variants.ts +38 -0
- package/vendor/ds/kits/base/src/tone.ts +24 -0
- package/vendor/ds/kits/base/src/tooltip.variants.ts +14 -0
- package/vendor/ds/kits/base/src/transfer.variants.ts +5 -0
- package/vendor/ds/kits/base/src/type-roles.ts +22 -0
- package/vendor/ds/kits/base/src/window-mockup.variants.ts +18 -0
- package/vendor/ds/kits/base/svelte.config.js +6 -0
- package/vendor/ds/kits/base/test/accessible-name.test.ts +66 -0
- package/vendor/ds/kits/base/test/accordion.test.ts +81 -0
- package/vendor/ds/kits/base/test/alert-dialog.test.ts +81 -0
- package/vendor/ds/kits/base/test/alert.test.ts +75 -0
- package/vendor/ds/kits/base/test/appearance-switch.test.ts +124 -0
- package/vendor/ds/kits/base/test/avatar-media-object-carousel-failures.test.ts +25 -0
- package/vendor/ds/kits/base/test/avatar.test.ts +75 -0
- package/vendor/ds/kits/base/test/badge.test.ts +99 -0
- package/vendor/ds/kits/base/test/breadcrumbs.test.ts +45 -0
- package/vendor/ds/kits/base/test/browser-mockup.test.ts +57 -0
- package/vendor/ds/kits/base/test/browser-phone-window-mockup.test.ts +58 -0
- package/vendor/ds/kits/base/test/button.test.ts +340 -0
- package/vendor/ds/kits/base/test/calendar.test.ts +86 -0
- package/vendor/ds/kits/base/test/card-busy.test.ts +25 -0
- package/vendor/ds/kits/base/test/card-divider-aspect-ratio-failures.test.ts +29 -0
- package/vendor/ds/kits/base/test/card-divider-aspect-ratio.test.ts +201 -0
- package/vendor/ds/kits/base/test/card-media.test.ts +113 -0
- package/vendor/ds/kits/base/test/card-tone-api.test.ts +12 -0
- package/vendor/ds/kits/base/test/card-tone-contrast.test.ts +120 -0
- package/vendor/ds/kits/base/test/card-tone.test.ts +103 -0
- package/vendor/ds/kits/base/test/carousel.test.ts +63 -0
- package/vendor/ds/kits/base/test/checkbox.test.ts +165 -0
- package/vendor/ds/kits/base/test/code-block.test.ts +148 -0
- package/vendor/ds/kits/base/test/coherence.test.ts +124 -0
- package/vendor/ds/kits/base/test/combobox.test.ts +172 -0
- package/vendor/ds/kits/base/test/components.test.ts +113 -0
- package/vendor/ds/kits/base/test/consumer-check.test.ts +42 -0
- package/vendor/ds/kits/base/test/container-stack-skip-link-failures.test.ts +31 -0
- package/vendor/ds/kits/base/test/container.test.ts +41 -0
- package/vendor/ds/kits/base/test/content-mask-failures.test.ts +24 -0
- package/vendor/ds/kits/base/test/content-mask.test.ts +134 -0
- package/vendor/ds/kits/base/test/control-group.test.ts +51 -0
- package/vendor/ds/kits/base/test/control-size.test.ts +60 -0
- package/vendor/ds/kits/base/test/countdown.test.ts +70 -0
- package/vendor/ds/kits/base/test/date-field.test.ts +126 -0
- package/vendor/ds/kits/base/test/date-picker.test.ts +122 -0
- package/vendor/ds/kits/base/test/date-range-field.test.ts +96 -0
- package/vendor/ds/kits/base/test/date-range-picker.test.ts +104 -0
- package/vendor/ds/kits/base/test/description-list.test.ts +84 -0
- package/vendor/ds/kits/base/test/dialog-tooltip-failures.test.ts +52 -0
- package/vendor/ds/kits/base/test/dialog.test.ts +122 -0
- package/vendor/ds/kits/base/test/disclosure.test.ts +51 -0
- package/vendor/ds/kits/base/test/drawer-alert-dialog-appearance.test.ts +25 -0
- package/vendor/ds/kits/base/test/drawer-alert-dialog-failures.test.ts +36 -0
- package/vendor/ds/kits/base/test/drawer.test.ts +49 -0
- package/vendor/ds/kits/base/test/dropdown-menu.test.ts +344 -0
- package/vendor/ds/kits/base/test/dropdown-navigation-menu-failures.test.ts +29 -0
- package/vendor/ds/kits/base/test/elevation.test.ts +81 -0
- package/vendor/ds/kits/base/test/empty-state.test.ts +126 -0
- package/vendor/ds/kits/base/test/event-dialect.test.ts +239 -0
- package/vendor/ds/kits/base/test/field.test.ts +106 -0
- package/vendor/ds/kits/base/test/fieldset.test.ts +95 -0
- package/vendor/ds/kits/base/test/file-input.test.ts +99 -0
- package/vendor/ds/kits/base/test/fixtures/AccessibleNameConsumer.svelte +65 -0
- package/vendor/ds/kits/base/test/fixtures/BinaryChoiceConsumer.svelte +63 -0
- package/vendor/ds/kits/base/test/fixtures/BinaryChoiceContractFailures.svelte +17 -0
- package/vendor/ds/kits/base/test/fixtures/BindingConsumer.svelte +19 -0
- package/vendor/ds/kits/base/test/fixtures/CalendarConsumer.svelte +9 -0
- package/vendor/ds/kits/base/test/fixtures/CalendarContractFailures.svelte +27 -0
- package/vendor/ds/kits/base/test/fixtures/CardActionsConsumer.svelte +12 -0
- package/vendor/ds/kits/base/test/fixtures/CardHorizontalConsumer.svelte +15 -0
- package/vendor/ds/kits/base/test/fixtures/CollectionStructureConsumer.svelte +37 -0
- package/vendor/ds/kits/base/test/fixtures/CollectionStructureContractFailures.svelte +16 -0
- package/vendor/ds/kits/base/test/fixtures/ComboboxConsumer.svelte +43 -0
- package/vendor/ds/kits/base/test/fixtures/ComboboxContractFailures.svelte +27 -0
- package/vendor/ds/kits/base/test/fixtures/ContainerStackSkipLinkFailures.svelte +16 -0
- package/vendor/ds/kits/base/test/fixtures/ContentMaskConsumer.svelte +25 -0
- package/vendor/ds/kits/base/test/fixtures/ContentMaskContractFailures.svelte +19 -0
- package/vendor/ds/kits/base/test/fixtures/ControlledDialogConsumer.svelte +29 -0
- package/vendor/ds/kits/base/test/fixtures/DateEntryConsumer.svelte +45 -0
- package/vendor/ds/kits/base/test/fixtures/DateEntryContractFailures.svelte +31 -0
- package/vendor/ds/kits/base/test/fixtures/DatePickerConsumer.svelte +34 -0
- package/vendor/ds/kits/base/test/fixtures/DatePickerContractFailures.svelte +29 -0
- package/vendor/ds/kits/base/test/fixtures/DialogTooltipBehaviorFailures.svelte +33 -0
- package/vendor/ds/kits/base/test/fixtures/DisclosureFamilyConsumer.svelte +68 -0
- package/vendor/ds/kits/base/test/fixtures/DisclosureFamilyContractFailures.svelte +21 -0
- package/vendor/ds/kits/base/test/fixtures/DrawerAlertDialogBehaviorFailures.svelte +30 -0
- package/vendor/ds/kits/base/test/fixtures/DrawerAlertDialogConsumer.svelte +18 -0
- package/vendor/ds/kits/base/test/fixtures/FieldInputAccessibilityFailures.svelte +29 -0
- package/vendor/ds/kits/base/test/fixtures/FieldInputConsumer.svelte +33 -0
- package/vendor/ds/kits/base/test/fixtures/FormScaffoldingConsumer.svelte +55 -0
- package/vendor/ds/kits/base/test/fixtures/FormScaffoldingFailures.svelte +20 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkBase.svelte +52 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkChoices.svelte +20 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkCodeActions.svelte +15 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkComposition.svelte +36 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkEditReveal.svelte +11 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkField.svelte +10 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkIdentityControls.svelte +11 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkInput.svelte +8 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkManaged.svelte +43 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkMedia.svelte +20 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkNativeControls.svelte +11 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkNumericEntry.svelte +12 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkPrimitive.svelte +17 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkReadings.svelte +23 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkSlides.svelte +31 -0
- package/vendor/ds/kits/base/test/fixtures/FrameworkTextarea.svelte +8 -0
- package/vendor/ds/kits/base/test/fixtures/InlineTextConsumer.svelte +15 -0
- package/vendor/ds/kits/base/test/fixtures/InlineTextContractFailures.svelte +20 -0
- package/vendor/ds/kits/base/test/fixtures/LayoutConsumer.svelte +17 -0
- package/vendor/ds/kits/base/test/fixtures/MediaPresentationConsumer.svelte +41 -0
- package/vendor/ds/kits/base/test/fixtures/MediaPresentationContractFailures.svelte +23 -0
- package/vendor/ds/kits/base/test/fixtures/MenuBehaviorFailures.svelte +19 -0
- package/vendor/ds/kits/base/test/fixtures/MockupConsumer.svelte +34 -0
- package/vendor/ds/kits/base/test/fixtures/MockupContractFailures.svelte +23 -0
- package/vendor/ds/kits/base/test/fixtures/NavbarMasthead.svelte +55 -0
- package/vendor/ds/kits/base/test/fixtures/NavigationScopeConsumer.svelte +40 -0
- package/vendor/ds/kits/base/test/fixtures/NotificationEmptyStateConsumer.svelte +28 -0
- package/vendor/ds/kits/base/test/fixtures/NotificationEmptyStateContractFailures.svelte +21 -0
- package/vendor/ds/kits/base/test/fixtures/NumberFieldConsumer.svelte +9 -0
- package/vendor/ds/kits/base/test/fixtures/NumericChronologyConsumer.svelte +34 -0
- package/vendor/ds/kits/base/test/fixtures/NumericChronologyContractFailures.svelte +17 -0
- package/vendor/ds/kits/base/test/fixtures/Operational.svelte +20 -0
- package/vendor/ds/kits/base/test/fixtures/PopoverLinkPreviewFailures.svelte +38 -0
- package/vendor/ds/kits/base/test/fixtures/ProgressFeedbackConsumer.svelte +26 -0
- package/vendor/ds/kits/base/test/fixtures/ProgressLoadingContractFailures.svelte +17 -0
- package/vendor/ds/kits/base/test/fixtures/RangePressedConsumer.svelte +67 -0
- package/vendor/ds/kits/base/test/fixtures/RangePressedContractFailures.svelte +20 -0
- package/vendor/ds/kits/base/test/fixtures/RevealAppearanceConsumer.svelte +17 -0
- package/vendor/ds/kits/base/test/fixtures/SpecializedEntryConsumer.svelte +56 -0
- package/vendor/ds/kits/base/test/fixtures/SpecializedEntryContractFailures.svelte +26 -0
- package/vendor/ds/kits/base/test/fixtures/StatusVocabularyConsumer.svelte +19 -0
- package/vendor/ds/kits/base/test/fixtures/StatusVocabularyContractFailures.svelte +5 -0
- package/vendor/ds/kits/base/test/fixtures/SurfaceControlsConsumer.svelte +35 -0
- package/vendor/ds/kits/base/test/fixtures/SurfaceControlsContractFailures.svelte +30 -0
- package/vendor/ds/kits/base/test/fixtures/SurfaceSeparationConsumer.svelte +20 -0
- package/vendor/ds/kits/base/test/fixtures/SurfaceSeparationContractFailures.svelte +15 -0
- package/vendor/ds/kits/base/test/fixtures/TableConsumer.svelte +25 -0
- package/vendor/ds/kits/base/test/fixtures/TableContractFailures.svelte +22 -0
- package/vendor/ds/kits/base/test/fixtures/TabsFragmentConsumer.svelte +18 -0
- package/vendor/ds/kits/base/test/fixtures/TestGlyph.svelte +22 -0
- package/vendor/ds/kits/base/test/fixtures/TextareaSelectConsumer.svelte +30 -0
- package/vendor/ds/kits/base/test/fixtures/TextareaSelectContractFailures.svelte +19 -0
- package/vendor/ds/kits/base/test/fixtures/TimeEntryConsumer.svelte +45 -0
- package/vendor/ds/kits/base/test/fixtures/TimeEntryContractFailures.svelte +29 -0
- package/vendor/ds/kits/base/test/fixtures/TooltipChildConsumer.svelte +10 -0
- package/vendor/ds/kits/base/test/fixtures/UncontrolledFieldConsumer.svelte +16 -0
- package/vendor/ds/kits/base/test/fixtures/WayfindingConsumer.svelte +26 -0
- package/vendor/ds/kits/base/test/fixtures/WayfindingContractFailures.svelte +17 -0
- package/vendor/ds/kits/base/test/fixtures/alert-consumer.ts +11 -0
- package/vendor/ds/kits/base/test/fixtures/binary-choice-consumer.ts +15 -0
- package/vendor/ds/kits/base/test/fixtures/button-consumer.ts +16 -0
- package/vendor/ds/kits/base/test/fixtures/calendar-consumer.ts +7 -0
- package/vendor/ds/kits/base/test/fixtures/collection-structure-consumer.ts +17 -0
- package/vendor/ds/kits/base/test/fixtures/combobox-consumer.ts +9 -0
- package/vendor/ds/kits/base/test/fixtures/content-mask-consumer.ts +10 -0
- package/vendor/ds/kits/base/test/fixtures/date-entry-consumer.ts +11 -0
- package/vendor/ds/kits/base/test/fixtures/date-picker-consumer.ts +11 -0
- package/vendor/ds/kits/base/test/fixtures/dialog-tooltip-consumer.ts +9 -0
- package/vendor/ds/kits/base/test/fixtures/disclosure-family-consumer.ts +14 -0
- package/vendor/ds/kits/base/test/fixtures/drawer-alert-dialog-consumer.ts +13 -0
- package/vendor/ds/kits/base/test/fixtures/field-input-consumer.ts +15 -0
- package/vendor/ds/kits/base/test/fixtures/form-scaffolding-consumer.ts +13 -0
- package/vendor/ds/kits/base/test/fixtures/layout-consumer.ts +16 -0
- package/vendor/ds/kits/base/test/fixtures/media-presentation-consumer.ts +9 -0
- package/vendor/ds/kits/base/test/fixtures/menu-consumer.ts +20 -0
- package/vendor/ds/kits/base/test/fixtures/mockup-consumer.ts +14 -0
- package/vendor/ds/kits/base/test/fixtures/notification-empty-state-consumer.ts +12 -0
- package/vendor/ds/kits/base/test/fixtures/numeric-chronology-consumer.ts +11 -0
- package/vendor/ds/kits/base/test/fixtures/popover-link-preview-consumer.ts +9 -0
- package/vendor/ds/kits/base/test/fixtures/progress-feedback-consumer.ts +21 -0
- package/vendor/ds/kits/base/test/fixtures/range-pressed-consumer.ts +16 -0
- package/vendor/ds/kits/base/test/fixtures/specialized-entry-consumer.ts +15 -0
- package/vendor/ds/kits/base/test/fixtures/status-vocabulary-consumer.ts +22 -0
- package/vendor/ds/kits/base/test/fixtures/surface-controls-consumer.ts +22 -0
- package/vendor/ds/kits/base/test/fixtures/surface-separation-consumer.ts +31 -0
- package/vendor/ds/kits/base/test/fixtures/textarea-select-consumer.ts +13 -0
- package/vendor/ds/kits/base/test/fixtures/time-entry-consumer.ts +11 -0
- package/vendor/ds/kits/base/test/form.test.ts +72 -0
- package/vendor/ds/kits/base/test/framework-appearance.test.ts +53 -0
- package/vendor/ds/kits/base/test/framework-base.test.ts +128 -0
- package/vendor/ds/kits/base/test/framework-choices.test.ts +137 -0
- package/vendor/ds/kits/base/test/framework-code-actions.test.ts +123 -0
- package/vendor/ds/kits/base/test/framework-composition.test.ts +91 -0
- package/vendor/ds/kits/base/test/framework-contracts.test.ts +126 -0
- package/vendor/ds/kits/base/test/framework-edit-reveal.test.ts +183 -0
- package/vendor/ds/kits/base/test/framework-identity-controls.test.ts +162 -0
- package/vendor/ds/kits/base/test/framework-managed.test.ts +256 -0
- package/vendor/ds/kits/base/test/framework-media.test.ts +96 -0
- package/vendor/ds/kits/base/test/framework-native-controls.test.ts +156 -0
- package/vendor/ds/kits/base/test/framework-numeric-entry.test.ts +146 -0
- package/vendor/ds/kits/base/test/framework-operational.test.ts +162 -0
- package/vendor/ds/kits/base/test/framework-readings.test.ts +110 -0
- package/vendor/ds/kits/base/test/framework-slides.test.ts +100 -0
- package/vendor/ds/kits/base/test/grid-list.test.ts +64 -0
- package/vendor/ds/kits/base/test/icon.test.ts +59 -0
- package/vendor/ds/kits/base/test/image.test.ts +120 -0
- package/vendor/ds/kits/base/test/indicator.test.ts +68 -0
- package/vendor/ds/kits/base/test/inline-edit.test.ts +56 -0
- package/vendor/ds/kits/base/test/input.test.ts +82 -0
- package/vendor/ds/kits/base/test/kbd.test.ts +32 -0
- package/vendor/ds/kits/base/test/label-in-name.ts +43 -0
- package/vendor/ds/kits/base/test/label.test.ts +68 -0
- package/vendor/ds/kits/base/test/link-kbd-code-block-appearance.test.ts +31 -0
- package/vendor/ds/kits/base/test/link-preview.test.ts +80 -0
- package/vendor/ds/kits/base/test/link.test.ts +63 -0
- package/vendor/ds/kits/base/test/lint.test.ts +60 -0
- package/vendor/ds/kits/base/test/list-container.test.ts +45 -0
- package/vendor/ds/kits/base/test/list.test.ts +60 -0
- package/vendor/ds/kits/base/test/loading-indicator.test.ts +57 -0
- package/vendor/ds/kits/base/test/logo.test.ts +484 -0
- package/vendor/ds/kits/base/test/marks.test.ts +140 -0
- package/vendor/ds/kits/base/test/media-object.test.ts +58 -0
- package/vendor/ds/kits/base/test/meter.test.ts +79 -0
- package/vendor/ds/kits/base/test/mount.ts +79 -0
- package/vendor/ds/kits/base/test/navbar.test.ts +419 -0
- package/vendor/ds/kits/base/test/navigation-menu.test.ts +118 -0
- package/vendor/ds/kits/base/test/navigation-scope.test.ts +62 -0
- package/vendor/ds/kits/base/test/notification.test.ts +94 -0
- package/vendor/ds/kits/base/test/number-field.test.ts +38 -0
- package/vendor/ds/kits/base/test/one-time-code-input.test.ts +123 -0
- package/vendor/ds/kits/base/test/pagination.test.ts +50 -0
- package/vendor/ds/kits/base/test/phone-input.test.ts +95 -0
- package/vendor/ds/kits/base/test/phone-mockup.test.ts +51 -0
- package/vendor/ds/kits/base/test/popover-link-preview-failures.test.ts +43 -0
- package/vendor/ds/kits/base/test/popover.test.ts +79 -0
- package/vendor/ds/kits/base/test/progress-loading-failures.test.ts +27 -0
- package/vendor/ds/kits/base/test/progress.test.ts +70 -0
- package/vendor/ds/kits/base/test/prose.test.ts +138 -0
- package/vendor/ds/kits/base/test/quiet-control.test.ts +89 -0
- package/vendor/ds/kits/base/test/radial-progress.test.ts +52 -0
- package/vendor/ds/kits/base/test/radio-cards.test.ts +21 -0
- package/vendor/ds/kits/base/test/radio-group.test.ts +180 -0
- package/vendor/ds/kits/base/test/range-calendar.test.ts +102 -0
- package/vendor/ds/kits/base/test/rating.test.ts +98 -0
- package/vendor/ds/kits/base/test/react-accessible-name.test.ts +44 -0
- package/vendor/ds/kits/base/test/react-consumer.tsx +283 -0
- package/vendor/ds/kits/base/test/react.test.ts +110 -0
- package/vendor/ds/kits/base/test/reveal.test.ts +148 -0
- package/vendor/ds/kits/base/test/scroll-area.test.ts +58 -0
- package/vendor/ds/kits/base/test/search-select.test.ts +40 -0
- package/vendor/ds/kits/base/test/section-heading.test.ts +59 -0
- package/vendor/ds/kits/base/test/select.test.ts +125 -0
- package/vendor/ds/kits/base/test/setup-storage.ts +14 -0
- package/vendor/ds/kits/base/test/skeleton.test.ts +56 -0
- package/vendor/ds/kits/base/test/skip-link.test.ts +49 -0
- package/vendor/ds/kits/base/test/slider.test.ts +89 -0
- package/vendor/ds/kits/base/test/slides.test.ts +207 -0
- package/vendor/ds/kits/base/test/stack.test.ts +87 -0
- package/vendor/ds/kits/base/test/statistic.test.ts +37 -0
- package/vendor/ds/kits/base/test/status-indicator.test.ts +102 -0
- package/vendor/ds/kits/base/test/steps.test.ts +38 -0
- package/vendor/ds/kits/base/test/structured-data.test.ts +88 -0
- package/vendor/ds/kits/base/test/swap.test.ts +70 -0
- package/vendor/ds/kits/base/test/switch.test.ts +89 -0
- package/vendor/ds/kits/base/test/table.test.ts +108 -0
- package/vendor/ds/kits/base/test/tabs.test.ts +130 -0
- package/vendor/ds/kits/base/test/taxonomy.test.ts +41 -0
- package/vendor/ds/kits/base/test/textarea.test.ts +106 -0
- package/vendor/ds/kits/base/test/time-field.test.ts +108 -0
- package/vendor/ds/kits/base/test/time-range-field.test.ts +91 -0
- package/vendor/ds/kits/base/test/timeline.test.ts +75 -0
- package/vendor/ds/kits/base/test/toggle-button.test.ts +70 -0
- package/vendor/ds/kits/base/test/toggle-group.test.ts +177 -0
- package/vendor/ds/kits/base/test/tooltip.test.ts +61 -0
- package/vendor/ds/kits/base/test/type-primitives.test.ts +191 -0
- package/vendor/ds/kits/base/test/vocabulary-contrast.test.ts +258 -0
- package/vendor/ds/kits/base/test/wave2-bindings-overlays.test.ts +174 -0
- package/vendor/ds/kits/base/test/window-mockup.test.ts +49 -0
- package/vendor/ds/kits/base/tools/build-cli.ts +29 -0
- package/vendor/ds/kits/base/tools/lint-cli.ts +18 -0
- package/vendor/ds/kits/base/tools/paths.ts +46 -0
- package/vendor/ds/kits/base/tsconfig.consumer.json +19 -0
- package/vendor/ds/kits/base/tsconfig.json +26 -0
- package/vendor/ds/kits/base/type-ledger.json +4 -0
- package/vendor/ds/kits/base/types/marks.d.ts +20 -0
- package/vendor/ds/kits/base/vite.config.ts +29 -0
- package/vendor/ds/package.json +51 -0
- package/vendor/ds/styles/all.css +12 -0
- package/vendor/ds/styles/application.css +12 -0
- package/vendor/ds/styles/base.css +11 -0
- package/vendor/ds/theme/print.css +65 -0
- package/vendor/ds/theme/scheme-dark.css +77 -0
- package/vendor/ds/theme/scheme-light.css +78 -0
- package/vendor/ds/theme/theme-application.css +29 -0
- package/vendor/ds/theme/theme-base.css +180 -0
- package/vendor/ds/theme/theme.css +283 -0
- package/vendor/ds/tokens/density-comfortable.css +51 -0
- package/vendor/ds/tokens/density-compact.css +49 -0
- package/vendor/ds/tokens/density-spacious.css +49 -0
- package/vendor/ds/tokens/density-tiny.css +49 -0
- package/vendor/ds/tokens/tokens.css +182 -0
- package/src/lib/Kbd.svelte +0 -8
- package/src/lib/LoadingState.svelte +0 -20
- package/src/lib/NavItem.svelte +0 -53
- package/src/lib/SplitView.svelte +0 -145
|
@@ -0,0 +1,1482 @@
|
|
|
1
|
+
# Base Kit
|
|
2
|
+
|
|
3
|
+
## Numeric entry and rich choices
|
|
4
|
+
|
|
5
|
+
`NumberField` composes Field, Input and Button. Supply a visible `label`, bind
|
|
6
|
+
`value` (`number | null`), and optionally choose finite `min`, `max` and positive
|
|
7
|
+
`step` constraints. Native numeric entry owns keyboard stepping, decimal alignment,
|
|
8
|
+
validation and form submission. Invalid typed values stay visible. Both stepping
|
|
9
|
+
buttons share Input's `controlSize`; readonly and disabled fields cannot step.
|
|
10
|
+
`help`, `error` and `required` use Field's canonical accessible relationships.
|
|
11
|
+
Native form resets update the binding and call `onvaluechange` once. An external
|
|
12
|
+
null clears the field. Applications own persistence, quotas and validation copy.
|
|
13
|
+
|
|
14
|
+
`RadioGroup` retains its default list and native radio behavior. Set
|
|
15
|
+
`variant="cards"` for responsive bordered choices. Options accept `description`
|
|
16
|
+
for context or an unavailable reason; `optionMedia(option)` supplies noninteractive
|
|
17
|
+
media or metadata beside the canonical label. Do not nest links or buttons inside
|
|
18
|
+
a radio label. Labels name the choice; descriptions are associated separately.
|
|
19
|
+
The application still owns selection, business rules and form submission.
|
|
20
|
+
|
|
21
|
+
Dialog and Drawer accept `header`, a snippet receiving `{ close }`. It
|
|
22
|
+
replaces the visible title and standard close control; the required `title`
|
|
23
|
+
remains their accessible name. A custom header keeps the body in one scrolling
|
|
24
|
+
region. The Drawer showcase demonstrates summaries, member search,
|
|
25
|
+
shared-content tabs, previews, return navigation and a persistent footer.
|
|
26
|
+
|
|
27
|
+
The parent Kit every other Kit inherits, routed to every consumer (ADR 0004).
|
|
28
|
+
Its `kit.json` declares `audience: "*"` and no `parents` — it is the root of
|
|
29
|
+
the Kit graph, and every other Kit in `kits/` declares it as a parent.
|
|
30
|
+
|
|
31
|
+
## Why it exists
|
|
32
|
+
|
|
33
|
+
A component that every application needs — the Logo first — should not oblige
|
|
34
|
+
an application to pull a sibling Kit to reach it. So the Base Kit is delivered
|
|
35
|
+
by inheritance: `ds-sync` resolves a declared Kit's parents transitively, so a
|
|
36
|
+
consumer that declares **any** Kit receives this one too, and a consumer that
|
|
37
|
+
needs nothing else may declare `base` alone.
|
|
38
|
+
|
|
39
|
+
Nothing in the Sync knows the name `base`. "Routed to every consumer" holds
|
|
40
|
+
because every Kit declares the parent, which is checked on the DS side by
|
|
41
|
+
`scripts/producer/test/kits.test.ts` — a Kit added without that declaration
|
|
42
|
+
fails there instead of quietly reaching only the consumers that name it.
|
|
43
|
+
|
|
44
|
+
## What is in it
|
|
45
|
+
|
|
46
|
+
The universal **Alert**, **Notification**, **EmptyState**, **AspectRatio**, **ContentMask**, **Button**, **Card**, **CodeBlock**, **Container**, **ControlGroup**, **Divider**, **Kbd**, **Link**, **Stack**, **SkipLink**, **Dialog**, **Drawer**,
|
|
47
|
+
**AlertDialog**, **Tooltip**, **Label**, **Field**, **Fieldset**, **Form**, **Input**, **Textarea**,
|
|
48
|
+
**FileInput**, **OneTimeCodeInput**, **Select**, **Checkbox**, **RadioGroup**, **Switch**, **Slider**,
|
|
49
|
+
**Rating**, **ToggleButton**, **ToggleGroup**, **Progress**, **RadialProgress**, **Meter**,
|
|
50
|
+
**LoadingIndicator**, **Skeleton**, **Statistic**, **Countdown**, **Timeline**, **Calendar**, and
|
|
51
|
+
**RangeCalendar**, **DateField**, and **DateRangeField** contracts, and the **Logo** with the Marks it places.
|
|
52
|
+
`src/index.ts` carries the
|
|
53
|
+
`BASE_COMPONENTS` list, pinned against the files on disk by
|
|
54
|
+
`test/components.test.ts`, so a component added here cannot go unexported.
|
|
55
|
+
|
|
56
|
+
The bar for entry is higher than the application Kit's, not lower: a component
|
|
57
|
+
here reaches every audience, so it must be cross-audience by nature.
|
|
58
|
+
|
|
59
|
+
## The Button
|
|
60
|
+
|
|
61
|
+
Button preserves the platform instead of wrapping it in a smaller API. With no
|
|
62
|
+
`href` it renders a native `<button>` and passes native attributes and handlers
|
|
63
|
+
through; with `href` it renders a native `<a>`. Disabled and loading buttons use
|
|
64
|
+
the platform's disabled state. Because anchors have no equivalent, an inert
|
|
65
|
+
anchor withholds its destination and tab stop and exposes `aria-disabled`.
|
|
66
|
+
Loading also exposes `aria-busy` and keeps the label beside a decorative
|
|
67
|
+
spinner.
|
|
68
|
+
|
|
69
|
+
The public `variant`, `size`, and `block` axes are enumerated by
|
|
70
|
+
`BUTTON_VARIANTS` and `BUTTON_SIZES`. The exported `button` and `buttonSpinner`
|
|
71
|
+
variant functions are Extension Seams: a Product Application can compose the
|
|
72
|
+
canonical classes onto its own element or build an explicitly named local
|
|
73
|
+
specialization without copying Button's behavior. The seams are optional;
|
|
74
|
+
vendored source remains application-owned and may still be changed directly.
|
|
75
|
+
|
|
76
|
+
Base is Button's only canonical source and public export. A Product Application
|
|
77
|
+
that declares the Application Kit receives Base through the Kit's `parents`
|
|
78
|
+
edge and imports Button from the explicit Base subpath; the child Kit neither
|
|
79
|
+
shadows the name nor replaces its behavior.
|
|
80
|
+
|
|
81
|
+
## Link, Kbd, and CodeBlock
|
|
82
|
+
|
|
83
|
+
Link is always a native `<a>`. Its persistent underline distinguishes it from
|
|
84
|
+
surrounding prose without relying on colour, while its focus ring makes the
|
|
85
|
+
platform keyboard stop visible. Native destinations, relationships, download
|
|
86
|
+
behavior, and caller attributes pass through unchanged.
|
|
87
|
+
|
|
88
|
+
Kbd renders the platform's `<kbd>` semantics. A chord accepts its keys as a
|
|
89
|
+
list, renders one cap per key, and keeps the visual separator out of the
|
|
90
|
+
assistive-technology reading. Cap size follows the typography it sits in;
|
|
91
|
+
only the gap between caps follows the nearest Density scope.
|
|
92
|
+
|
|
93
|
+
CodeBlock preserves the caller's source exactly in native `<pre><code>`
|
|
94
|
+
semantics. Its keyboard-focusable copy affordance composes the canonical Base
|
|
95
|
+
Button and copies that exact source rather than reading normalized markup.
|
|
96
|
+
Language labels and source remain caller content; page layout stays outside
|
|
97
|
+
the component.
|
|
98
|
+
|
|
99
|
+
```svelte
|
|
100
|
+
<script lang="ts">
|
|
101
|
+
import { CodeBlock, Kbd, Link } from "@reddb-io/design-system/base";
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
Read the <Link href="/guide">guide</Link>, then press <Kbd keys={["Ctrl", "K"]} />.
|
|
105
|
+
|
|
106
|
+
<CodeBlock language="TypeScript" code={'const ready = true;'} />
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Alert and Feedback Roles
|
|
110
|
+
|
|
111
|
+
Alert requires one DS-owned `feedback` meaning: `info`, `success`, `warning`, or
|
|
112
|
+
`danger`. Success and warning updates use the polite `status` role; danger is
|
|
113
|
+
an assertive `alert`, so errors reach assistive technology without relying on a
|
|
114
|
+
visual-only convention. Callers may provide a visible `title`, arbitrary
|
|
115
|
+
message content, native `<div>` attributes, and additional classes.
|
|
116
|
+
|
|
117
|
+
The exported `alert` function is the optional appearance Extension Seam. Its
|
|
118
|
+
classes name only `--reddb-color-feedback-*` semantics. Theme owns the current
|
|
119
|
+
Brand-material mapping behind those meanings, so a Brand Sync can replace a
|
|
120
|
+
temporary material without changing Alert's public API or behavioral tests.
|
|
121
|
+
|
|
122
|
+
```svelte
|
|
123
|
+
<script lang="ts">
|
|
124
|
+
import { Alert } from "@reddb-io/design-system/base";
|
|
125
|
+
</script>
|
|
126
|
+
|
|
127
|
+
<Alert feedback="danger" title="Deployment failed">
|
|
128
|
+
The previous release is still serving traffic.
|
|
129
|
+
</Alert>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Notification and EmptyState
|
|
133
|
+
|
|
134
|
+
Notification composes Alert's polite/assertive Feedback Role semantics with a
|
|
135
|
+
canonical Button dismissal control. Its required title is always inside the
|
|
136
|
+
live announcement, the optional detail remains caller content, and dismissal
|
|
137
|
+
removes the transient surface and calls `ondismiss`. Placement, stacking, and
|
|
138
|
+
the decision to create or expire a notification remain consumer arrangement.
|
|
139
|
+
|
|
140
|
+
EmptyState is the canonical zero-data surface inherited by every Kit. Its
|
|
141
|
+
required title says what is empty; optional description, decorative media,
|
|
142
|
+
literal hint, and action snippets let the consumer explain why and supply its
|
|
143
|
+
own way out without turning page-specific business content into DS content.
|
|
144
|
+
|
|
145
|
+
```svelte
|
|
146
|
+
<script lang="ts">
|
|
147
|
+
import { Button, EmptyState, Notification } from "@reddb-io/design-system/base";
|
|
148
|
+
</script>
|
|
149
|
+
|
|
150
|
+
<Notification feedback="success" title="Deployment complete">
|
|
151
|
+
The new release is serving traffic.
|
|
152
|
+
</Notification>
|
|
153
|
+
|
|
154
|
+
<EmptyState title="No nodes yet" description="A node appears here as soon as one joins.">
|
|
155
|
+
{#snippet actions()}<Button>Add a node</Button>{/snippet}
|
|
156
|
+
</EmptyState>
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Their exported `notification` and `emptyState` functions are optional
|
|
160
|
+
appearance Extension Seams. Spatial values use Density roles, Feedback Role
|
|
161
|
+
colour stays Theme-owned through Alert, and neither component selects Theme,
|
|
162
|
+
Color Scheme, or Density for its caller.
|
|
163
|
+
|
|
164
|
+
## ScrollArea, Swap, AppearanceSwitch, and SectionHeading
|
|
165
|
+
|
|
166
|
+
ScrollArea is a named native overflow region with a guaranteed keyboard stop.
|
|
167
|
+
The caller owns its size constraint and content; the component owns overflow
|
|
168
|
+
direction, visible focus, and the Density-backed inset that makes contained
|
|
169
|
+
content readable at every local stop.
|
|
170
|
+
|
|
171
|
+
Swap composes ToggleButton rather than creating another pressed-state model.
|
|
172
|
+
Its stable `label` names the control while caller-owned `off` and `on` snippets
|
|
173
|
+
replace one another. The `swapped` state is bindable and the `onchange`
|
|
174
|
+
callback reports each native activation.
|
|
175
|
+
|
|
176
|
+
AppearanceSwitch composes Field and Select for one independent `theme`,
|
|
177
|
+
`color-scheme`, or `density` axis. Options remain caller-owned, the selected
|
|
178
|
+
value is applied to exactly one `data-*` attribute, and one storage key per
|
|
179
|
+
axis restores a valid value on mount. `root` and `storage` are injectable so a
|
|
180
|
+
consumer may target an appearance scope or persistence adapter without
|
|
181
|
+
coupling Base to an application store.
|
|
182
|
+
|
|
183
|
+
SectionHeading is the cross-audience section title. `level` selects native
|
|
184
|
+
outline depth from `h2` through `h6`; `size` selects visual weight separately.
|
|
185
|
+
Optional supporting copy, rule, and caller-owned actions do not make it a page
|
|
186
|
+
heading or a business-content assembly.
|
|
187
|
+
|
|
188
|
+
```svelte
|
|
189
|
+
<script lang="ts">
|
|
190
|
+
import {
|
|
191
|
+
AppearanceSwitch,
|
|
192
|
+
ScrollArea,
|
|
193
|
+
SectionHeading,
|
|
194
|
+
Swap,
|
|
195
|
+
} from "@reddb-io/design-system/base";
|
|
196
|
+
|
|
197
|
+
const themes = [
|
|
198
|
+
{ value: "application", label: "Application" },
|
|
199
|
+
{ value: "marketing", label: "Marketing" },
|
|
200
|
+
];
|
|
201
|
+
</script>
|
|
202
|
+
|
|
203
|
+
<SectionHeading title="Deployments" level={3} size="lg" />
|
|
204
|
+
<ScrollArea label="Recent deployments" class="max-h-64">…</ScrollArea>
|
|
205
|
+
<Swap label="Show deployment detail">
|
|
206
|
+
{#snippet off()}Summary{/snippet}
|
|
207
|
+
{#snippet on()}Detail{/snippet}
|
|
208
|
+
</Swap>
|
|
209
|
+
<AppearanceSwitch label="Theme" axis="theme" options={themes} />
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Badge, Indicator, and StatusIndicator
|
|
213
|
+
|
|
214
|
+
Badge is a short text status marker that can sit inside running text. Its
|
|
215
|
+
`neutral`, `primary`, and `outline` variants are emphasis only: caller-owned
|
|
216
|
+
text is required and always rendered, so a background or border can never be
|
|
217
|
+
the whole message. Badge remains a non-interactive `<span>`; linked or pressed
|
|
218
|
+
behavior belongs to the corresponding native control wearing the exported
|
|
219
|
+
`badge` classes.
|
|
220
|
+
|
|
221
|
+
Indicator owns only logical marker placement. Its required `marker` snippet may
|
|
222
|
+
contain Badge, StatusIndicator, or consumer content at one of eight start/end
|
|
223
|
+
anchors. The anchored child keeps its native element, keyboard behavior, and
|
|
224
|
+
focus; Indicator adds no control or business status of its own.
|
|
225
|
+
|
|
226
|
+
StatusIndicator pairs a decorative mark with required status text. `showLabel`
|
|
227
|
+
may visually hide that text, but it remains screen-reader content and the mark
|
|
228
|
+
is always hidden from assistive technology. Its stable meanings are `neutral`
|
|
229
|
+
plus Alert's canonical `success`, `warning`, and `danger` Feedback Roles, so
|
|
230
|
+
the Theme mapping is composed rather than redefined.
|
|
231
|
+
|
|
232
|
+
```svelte
|
|
233
|
+
<script lang="ts">
|
|
234
|
+
import { Badge, Button, Indicator, StatusIndicator } from "@reddb-io/design-system/base";
|
|
235
|
+
</script>
|
|
236
|
+
|
|
237
|
+
<p>The release is <Badge variant="primary">stable</Badge>.</p>
|
|
238
|
+
|
|
239
|
+
<StatusIndicator label="Available" status="success" />
|
|
240
|
+
|
|
241
|
+
<Indicator position="top-end">
|
|
242
|
+
{#snippet marker()}
|
|
243
|
+
<StatusIndicator label="3 warnings" status="warning" showLabel={false} />
|
|
244
|
+
{/snippet}
|
|
245
|
+
<Button>Review deployment</Button>
|
|
246
|
+
</Indicator>
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
The exported `badge`, `indicator`, and `statusIndicator` functions are optional
|
|
250
|
+
appearance Extension Seams. Their spatial roles resolve through the active
|
|
251
|
+
Density scope, and none selects Theme, Color Scheme, or Density for a consumer.
|
|
252
|
+
|
|
253
|
+
## Switch and neutral surfaces
|
|
254
|
+
|
|
255
|
+
Neutral Card now uses the raised surface with its quiet border and no default
|
|
256
|
+
shadow, separating a card from the canvas in the dark Color Scheme. Explicit
|
|
257
|
+
`raised` adds the complete border/shadow treatment. Feedback tones keep their
|
|
258
|
+
paired surfaces and copy. A continuous surface can explicitly use `bg-background`.
|
|
259
|
+
|
|
260
|
+
Switch separates its painted track and centred thumb from the native input's
|
|
261
|
+
hit area. Density controls their proportions, while a coarse pointer still
|
|
262
|
+
receives a target of at least 44px without enlarging the visual switch. Native
|
|
263
|
+
form semantics, label association, keyboard handling, validation, disabled and
|
|
264
|
+
reduced-motion behavior remain intact.
|
|
265
|
+
|
|
266
|
+
## Dialog, Drawer, AlertDialog, and Tooltip
|
|
267
|
+
|
|
268
|
+
Dialog also accepts `size="xl"`, using the DS wide container for expanded
|
|
269
|
+
charts and detail tables. Its existing sizes remain unchanged.
|
|
270
|
+
|
|
271
|
+
Dialog owns the complete modal lifecycle behind one Base API. Its visible
|
|
272
|
+
`title` labels the native dialog, an optional `description` is associated with
|
|
273
|
+
it, focus enters the modal and cannot Tab outside it, Escape and the visible
|
|
274
|
+
close control dismiss it, and focus returns to the invoking trigger. The
|
|
275
|
+
trigger's `triggerLabel` remains its accessible name when custom trigger
|
|
276
|
+
content is rendered. Dialog uses the platform's modal top layer (ADR 0017)
|
|
277
|
+
while keeping these observable behaviors in the DS contract.
|
|
278
|
+
|
|
279
|
+
`open` is bindable and `onopenchange` reports every open and close, whatever
|
|
280
|
+
caused it. Omit `triggerLabel` to render no trigger at all and open the Dialog
|
|
281
|
+
from a menu item, a command or a route with `bind:open`. A click outside the
|
|
282
|
+
surface dismisses it unless `dismissible={false}`; page scroll is locked while
|
|
283
|
+
any modal is open; `size` (`sm`, `md`, `lg`) sets its measure; and title and
|
|
284
|
+
description ids come from `$props.id()`, so they match between server and
|
|
285
|
+
client.
|
|
286
|
+
|
|
287
|
+
Drawer composes that lifecycle and anchors the same modal contract to the
|
|
288
|
+
`top`, `right`, `bottom`, or `left` edge. Its edge is structural; its inset,
|
|
289
|
+
colour, and motion remain token-backed, so Theme, Color Scheme, and nested
|
|
290
|
+
Density scopes stay caller-owned.
|
|
291
|
+
|
|
292
|
+
AlertDialog composes Dialog and Button for one destructive decision. It uses
|
|
293
|
+
the `alertdialog` role, focuses the safe action first, ignores outside clicks,
|
|
294
|
+
and restores invoking focus after cancel, confirmation, or Escape. The
|
|
295
|
+
confirmation wears the `danger` intent, never the Brand accent. Callers own the
|
|
296
|
+
consequence through `onconfirm` and all explanatory content; when `onconfirm`
|
|
297
|
+
returns a promise the confirmation shows its busy state and the dialog closes
|
|
298
|
+
only once the promise fulfils, staying open on rejection so the caller can
|
|
299
|
+
report why.
|
|
300
|
+
|
|
301
|
+
Tooltip is supplemental by construction. Its required `label` is the trigger's
|
|
302
|
+
complete accessible name; `content` supplies additional description and is
|
|
303
|
+
never the only carrier of what the control does. Keyboard focus and pointer
|
|
304
|
+
hover expose the same `role="tooltip"` content, blur and pointer exit close it,
|
|
305
|
+
and Escape dismisses it without moving focus. To describe an element you
|
|
306
|
+
already render — an icon Button, a link — pass a `child` snippet and spread
|
|
307
|
+
its `props` onto that element; it then owns its accessible name and `label` is
|
|
308
|
+
not needed.
|
|
309
|
+
|
|
310
|
+
All four capabilities expose token-only appearance seams. Drawer additionally
|
|
311
|
+
exports `DRAWER_SIDES`; AlertDialog exports its action-layout seam.
|
|
312
|
+
Their motion transitions include an explicit reduced-motion path and their
|
|
313
|
+
public showcase routes render across every Theme × Color Scheme × Density cell.
|
|
314
|
+
|
|
315
|
+
```svelte
|
|
316
|
+
<script lang="ts">
|
|
317
|
+
import { AlertDialog, Dialog, Drawer, Tooltip } from "@reddb-io/design-system/base";
|
|
318
|
+
</script>
|
|
319
|
+
|
|
320
|
+
<Dialog triggerLabel="Edit deployment" title="Edit deployment">
|
|
321
|
+
{#snippet trigger()}Edit{/snippet}
|
|
322
|
+
<p>Caller-owned modal content.</p>
|
|
323
|
+
</Dialog>
|
|
324
|
+
|
|
325
|
+
<Drawer triggerLabel="Open filters" title="Filters" side="right">
|
|
326
|
+
<p>Caller-owned filter controls.</p>
|
|
327
|
+
</Drawer>
|
|
328
|
+
|
|
329
|
+
<AlertDialog
|
|
330
|
+
triggerLabel="Delete deployment"
|
|
331
|
+
title="Delete deployment?"
|
|
332
|
+
confirmLabel="Delete"
|
|
333
|
+
onconfirm={deleteDeployment}
|
|
334
|
+
>
|
|
335
|
+
<p>This cannot be undone.</p>
|
|
336
|
+
</AlertDialog>
|
|
337
|
+
|
|
338
|
+
<Tooltip label="Copy connection string" content="Copies the value to your clipboard">
|
|
339
|
+
Copy
|
|
340
|
+
</Tooltip>
|
|
341
|
+
|
|
342
|
+
<!-- Controlled: no DS trigger, opened from anywhere. -->
|
|
343
|
+
<Dialog title="Rename collection" bind:open={renaming} size="sm">
|
|
344
|
+
<Input aria-label="Name" bind:value={name} />
|
|
345
|
+
</Dialog>
|
|
346
|
+
|
|
347
|
+
<Tooltip content="Copies the value to your clipboard">
|
|
348
|
+
{#snippet child({ props })}
|
|
349
|
+
<Button {...props} variant="ghost" aria-label="Copy">…</Button>
|
|
350
|
+
{/snippet}
|
|
351
|
+
</Tooltip>
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
## Popover and LinkPreview
|
|
355
|
+
|
|
356
|
+
Popover is the canonical interactive anchored overlay. It composes the Base
|
|
357
|
+
Button with Bits UI's non-modal dialog behavior: collision detection keeps the
|
|
358
|
+
surface inside the viewport, focus enters caller-owned content, Escape and an
|
|
359
|
+
outside interaction dismiss it, and focus returns to the trigger. Required
|
|
360
|
+
`triggerLabel` and `contentLabel` names keep both ends of the relationship
|
|
361
|
+
explicit; side and alignment are preferences that may flip to avoid a viewport
|
|
362
|
+
edge.
|
|
363
|
+
|
|
364
|
+
LinkPreview keeps its trigger a native link. Keyboard focus and pointer hover
|
|
365
|
+
open the same collision-aware preview, focus remains on the link, Escape closes
|
|
366
|
+
the preview, and navigation still works when preview behavior is unavailable.
|
|
367
|
+
Its content supplies context rather than actions, so it never introduces a
|
|
368
|
+
focus trap.
|
|
369
|
+
|
|
370
|
+
The exported `popover` appearance seam contains the shared token-only anchored
|
|
371
|
+
surface. `linkPreview` extends it instead of restating the surface contract.
|
|
372
|
+
Both keep Theme, Color Scheme, Contrast, and Density selection outside their
|
|
373
|
+
APIs; spatial values remain live Density roles in nested scopes.
|
|
374
|
+
|
|
375
|
+
```svelte
|
|
376
|
+
<script lang="ts">
|
|
377
|
+
import { LinkPreview, Popover } from "@reddb-io/design-system/base";
|
|
378
|
+
</script>
|
|
379
|
+
|
|
380
|
+
<Popover triggerLabel="Open filters" contentLabel="Deployment filters">
|
|
381
|
+
<button type="button">Apply filters</button>
|
|
382
|
+
</Popover>
|
|
383
|
+
|
|
384
|
+
<LinkPreview href="/clusters/primary" label="Primary cluster" previewLabel="Primary cluster preview">
|
|
385
|
+
Healthy in sa-east-1
|
|
386
|
+
</LinkPreview>
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
## DropdownMenu and NavigationMenu
|
|
390
|
+
|
|
391
|
+
DropdownMenu is the canonical command menu over a Base Button. Its items may
|
|
392
|
+
be a flat list or named groups; Bits UI supplies the roving focus, typeahead,
|
|
393
|
+
selection, collision handling, Escape dismissal, and focus return. Link rows
|
|
394
|
+
remain native anchors, disabled rows stay perceivable and are skipped, and the
|
|
395
|
+
surface composes the exported `popover` appearance rather than restating an
|
|
396
|
+
anchored overlay.
|
|
397
|
+
|
|
398
|
+
NavigationMenu is the canonical list of destinations. Direct entries remain
|
|
399
|
+
native links while a section opens a Popover-composed surface of related links.
|
|
400
|
+
The top level roves in either horizontal or vertical orientation, current-page
|
|
401
|
+
state is carried by `aria-current`, and Escape dismisses an open section without
|
|
402
|
+
leaving focus behind.
|
|
403
|
+
|
|
404
|
+
Both capabilities expose only token-backed size and orientation seams. Theme,
|
|
405
|
+
Color Scheme, Contrast, and Density stay in the surrounding cascade, including
|
|
406
|
+
when either menu is mounted inside a nested appearance scope.
|
|
407
|
+
|
|
408
|
+
## Navbar, Breadcrumbs, Pagination, and Steps
|
|
409
|
+
|
|
410
|
+
The four wayfinding contracts keep current position in native semantics rather
|
|
411
|
+
than in colour. Navbar composes Base Link and Button into brand, links, and
|
|
412
|
+
actions regions; its responsive arrangement is selected in CSS, while its
|
|
413
|
+
collapsed disclosure restores focus on Escape. Breadcrumbs announces exactly
|
|
414
|
+
the caller-designated current page. Pagination gives every numeric destination
|
|
415
|
+
an explicit page label and marks the current page. Steps uses an ordered trail,
|
|
416
|
+
`aria-current="step"`, a visible completion check, and completion text.
|
|
417
|
+
|
|
418
|
+
Callers own destinations, labels, brand/action content, and page arrangement.
|
|
419
|
+
The exported `navbar`, `breadcrumbs`, `pagination`, and `steps` appearance seams
|
|
420
|
+
use live semantic colour and spatial roles without selecting Theme, Color
|
|
421
|
+
Scheme, Contrast, or Density.
|
|
422
|
+
|
|
423
|
+
```svelte
|
|
424
|
+
<script lang="ts">
|
|
425
|
+
import { Breadcrumbs, Navbar, Pagination, Steps } from "@reddb-io/design-system/base";
|
|
426
|
+
</script>
|
|
427
|
+
|
|
428
|
+
<Navbar links={[{ id: "home", label: "Home", href: "/", current: true }]} />
|
|
429
|
+
<Breadcrumbs items={[{ id: "home", label: "Home", current: true }]} />
|
|
430
|
+
<Pagination pages={[{ page: 1, href: "?page=1", current: true }]} />
|
|
431
|
+
<Steps items={[{ id: "review", label: "Review", state: "current" }]} />
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
```svelte
|
|
435
|
+
<script lang="ts">
|
|
436
|
+
import { DropdownMenu, NavigationMenu } from "@reddb-io/design-system/base";
|
|
437
|
+
</script>
|
|
438
|
+
|
|
439
|
+
<DropdownMenu
|
|
440
|
+
triggerLabel="Actions"
|
|
441
|
+
contentLabel="Deployment actions"
|
|
442
|
+
items={[{ id: "restart", label: "Restart", onselect: restart }]}
|
|
443
|
+
/>
|
|
444
|
+
|
|
445
|
+
<NavigationMenu
|
|
446
|
+
label="Primary"
|
|
447
|
+
items={[
|
|
448
|
+
{ id: "overview", label: "Overview", href: "/overview", active: true },
|
|
449
|
+
{
|
|
450
|
+
id: "learn",
|
|
451
|
+
label: "Learn",
|
|
452
|
+
links: [{ id: "docs", label: "Documentation", href: "/docs" }],
|
|
453
|
+
},
|
|
454
|
+
]}
|
|
455
|
+
/>
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
## Container, Stack, and SkipLink
|
|
459
|
+
|
|
460
|
+
Container is the Base content boundary: full width until a canonical maximum,
|
|
461
|
+
centered, with an inline inset that names the Density axis's `inset-md` role.
|
|
462
|
+
Its width is structural and does not change by Density; its inset remains a CSS
|
|
463
|
+
variable reference, so a nested Density scope re-resolves it without changing
|
|
464
|
+
markup or selecting an axis in the component.
|
|
465
|
+
|
|
466
|
+
Stack puts its children in vertical flow and exposes exactly the `sm`, `md`,
|
|
467
|
+
and `lg` gap roles the Density axis ships. The `STACK_GAPS` enumeration and
|
|
468
|
+
exported `stack` appearance seam let a showcase or local specialization use the
|
|
469
|
+
same closed vocabulary without copying it.
|
|
470
|
+
|
|
471
|
+
SkipLink defaults to `#main-content` and the complete label “Skip to main
|
|
472
|
+
content”. It is visually hidden until keyboard focus, then becomes a token-
|
|
473
|
+
painted fixed control. Activating an in-page destination moves focus to it; the
|
|
474
|
+
document's real `<main id="main-content" tabindex="-1">` provides that target
|
|
475
|
+
without a router-specific URL. Native anchor attributes, a custom in-page
|
|
476
|
+
`href`, and caller-owned wording remain available.
|
|
477
|
+
|
|
478
|
+
```svelte
|
|
479
|
+
<script lang="ts">
|
|
480
|
+
import { Container, SkipLink, Stack } from "@reddb-io/design-system/base";
|
|
481
|
+
</script>
|
|
482
|
+
|
|
483
|
+
<SkipLink />
|
|
484
|
+
<main id="main-content" tabindex="-1">
|
|
485
|
+
<Container>
|
|
486
|
+
<Stack gap="lg">
|
|
487
|
+
<h1>Deployment</h1>
|
|
488
|
+
<p>Bounded content in token-backed vertical flow.</p>
|
|
489
|
+
</Stack>
|
|
490
|
+
</Container>
|
|
491
|
+
</main>
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
## List, ListContainer, DescriptionList, and GridList
|
|
495
|
+
|
|
496
|
+
List owns native unordered or ordered collection semantics while its `sm`,
|
|
497
|
+
`md`, and `lg` gaps remain live Density roles. Items and their content stay
|
|
498
|
+
with the consumer, so native links and controls keep document focus order.
|
|
499
|
+
|
|
500
|
+
ListContainer composes the canonical Card contract around caller-owned list
|
|
501
|
+
content. It forwards Card's header, edge, and inset choices rather than
|
|
502
|
+
creating a second surface vocabulary. GridList similarly composes List, adding
|
|
503
|
+
only a one-to-four-column responsive arrangement; it never replaces the
|
|
504
|
+
underlying `<ul>` semantics.
|
|
505
|
+
|
|
506
|
+
DescriptionList accepts term/detail entries and renders one valid `<dt>` and
|
|
507
|
+
`<dd>` pair for each. Terms and details can be strings or caller-owned snippets,
|
|
508
|
+
so business content stays local while pairing cannot drift. All four
|
|
509
|
+
structures select no Theme, Color Scheme, Contrast, or active Density value.
|
|
510
|
+
|
|
511
|
+
```svelte
|
|
512
|
+
<script lang="ts">
|
|
513
|
+
import {
|
|
514
|
+
DescriptionList,
|
|
515
|
+
GridList,
|
|
516
|
+
List,
|
|
517
|
+
ListContainer,
|
|
518
|
+
} from "@reddb-io/design-system/base";
|
|
519
|
+
|
|
520
|
+
const details = [
|
|
521
|
+
{ term: "Region", detail: "South America" },
|
|
522
|
+
{ term: "Owner", detail: "Platform team" },
|
|
523
|
+
];
|
|
524
|
+
</script>
|
|
525
|
+
|
|
526
|
+
<ListContainer title="Deployments">
|
|
527
|
+
<List aria-label="Recent deployments"><li>Production</li></List>
|
|
528
|
+
</ListContainer>
|
|
529
|
+
<DescriptionList aria-label="Service details" items={details} />
|
|
530
|
+
<GridList columns={2} aria-label="Projects"><li>Design system</li></GridList>
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
## Calendar and RangeCalendar
|
|
534
|
+
|
|
535
|
+
Calendar is the canonical single-date grid used by later date fields and
|
|
536
|
+
pickers. RangeCalendar is its inclusive-range counterpart. Both compose Bits
|
|
537
|
+
UI's localized month model, roving date focus, arrow-key navigation, disabled
|
|
538
|
+
date handling, and polite selection announcements with canonical Base Button
|
|
539
|
+
month controls and one exported `calendar` appearance seam.
|
|
540
|
+
|
|
541
|
+
Selected dates expose `aria-selected` in addition to their visible treatment.
|
|
542
|
+
Range starts, middles, and ends also have distinct geometry, while the complete
|
|
543
|
+
range is announced in words. All geometry uses live Density roles; neither
|
|
544
|
+
component selects Theme, Color Scheme, or Density. Callers own locale, date
|
|
545
|
+
constraints, selected values, page arrangement, and business content.
|
|
546
|
+
|
|
547
|
+
```svelte
|
|
548
|
+
<script lang="ts">
|
|
549
|
+
import { Calendar, RangeCalendar } from "@reddb-io/design-system/base";
|
|
550
|
+
</script>
|
|
551
|
+
|
|
552
|
+
<Calendar label="Deployment date" bind:value={deploymentDate} />
|
|
553
|
+
<RangeCalendar label="Deployment window" bind:value={deploymentWindow} minDays={2} />
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
## Card, Divider, and AspectRatio
|
|
557
|
+
|
|
558
|
+
Card is the universal bounded surface. Its optional header, body, and footer
|
|
559
|
+
share one `variant` and one `padding` selection, so their edges and insets
|
|
560
|
+
cannot drift apart. The `sm` and `md` paddings name live Density roles in every
|
|
561
|
+
section; nested scopes re-resolve them without a Card prop or attribute naming
|
|
562
|
+
the active stop. Header and footer markup is omitted when its content is absent.
|
|
563
|
+
The optional `busy` contract retains current content, publishes `aria-busy`,
|
|
564
|
+
and adds the canonical LoadingIndicator with caller-owned waiting language.
|
|
565
|
+
|
|
566
|
+
Divider renders the separator role together with its horizontal or vertical
|
|
567
|
+
`aria-orientation`. It is not a keyboard stop: callers get a perceivable
|
|
568
|
+
structural boundary without introducing an inert tab target. Its muted rule is
|
|
569
|
+
painted by the surrounding Theme and Color Scheme.
|
|
570
|
+
|
|
571
|
+
AspectRatio accepts any numeric width-to-height ratio, defaulting to 16:9. It
|
|
572
|
+
sets only the structural `aspect-ratio` property and lets caller-owned media,
|
|
573
|
+
links, and controls keep their native content and focus behavior. It selects no
|
|
574
|
+
Theme, Color Scheme, Contrast, or Density value.
|
|
575
|
+
|
|
576
|
+
```svelte
|
|
577
|
+
<script lang="ts">
|
|
578
|
+
import { AspectRatio, Card, Divider } from "@reddb-io/design-system/base";
|
|
579
|
+
</script>
|
|
580
|
+
|
|
581
|
+
<Card title="Deployment" description="Healthy in sa-east-1">
|
|
582
|
+
<AspectRatio ratio={4 / 3}>
|
|
583
|
+
<img src={preview} alt="Deployment topology" />
|
|
584
|
+
</AspectRatio>
|
|
585
|
+
<Divider />
|
|
586
|
+
<a href="/deployments/primary">Open deployment</a>
|
|
587
|
+
</Card>
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
## BrowserMockup, PhoneMockup, and WindowMockup
|
|
591
|
+
|
|
592
|
+
The three mockups are presentation containers for caller-owned content.
|
|
593
|
+
BrowserMockup adds a display-only address bar, PhoneMockup adds a decorative
|
|
594
|
+
phone body, and WindowMockup adds a display-only title bar. Each composes the
|
|
595
|
+
canonical AspectRatio boundary, exposes an overridable viewport ratio, and
|
|
596
|
+
leaves screenshots, live embeds, code samples, links, controls, accessible
|
|
597
|
+
names, and business language with the consumer.
|
|
598
|
+
|
|
599
|
+
Only the chrome is `aria-hidden`. The frame itself is presentational rather
|
|
600
|
+
than a landmark, control, or link, so content inside keeps its native role,
|
|
601
|
+
name, document order, and keyboard behavior. Fake addresses and titles are
|
|
602
|
+
plain text inside hidden chrome and can never be mistaken for real controls.
|
|
603
|
+
|
|
604
|
+
Their exported `browserMockup`, `phoneMockup`, and `windowMockup` appearance
|
|
605
|
+
seams use semantic colours and live Density roles. None selects Theme, Color
|
|
606
|
+
Scheme, Contrast, or Density, including inside a nested appearance scope.
|
|
607
|
+
|
|
608
|
+
```svelte
|
|
609
|
+
<script lang="ts">
|
|
610
|
+
import { BrowserMockup, PhoneMockup, WindowMockup } from "@reddb-io/design-system/base";
|
|
611
|
+
</script>
|
|
612
|
+
|
|
613
|
+
<BrowserMockup address="https://example.test/deployments">
|
|
614
|
+
<article aria-label="Deployment preview">...</article>
|
|
615
|
+
</BrowserMockup>
|
|
616
|
+
|
|
617
|
+
<PhoneMockup>
|
|
618
|
+
<nav aria-label="Deployment queue">...</nav>
|
|
619
|
+
</PhoneMockup>
|
|
620
|
+
|
|
621
|
+
<WindowMockup title="Build output">
|
|
622
|
+
<pre><code>pnpm test</code></pre>
|
|
623
|
+
</WindowMockup>
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
## ContentMask
|
|
627
|
+
|
|
628
|
+
ContentMask clips arbitrary caller-owned content to one named shape while
|
|
629
|
+
leaving that content's semantics, accessible name, native attributes, and
|
|
630
|
+
interaction intact. The neutral wrapper adds no role, accessible name, keyboard
|
|
631
|
+
stop, colour, radius, or Density selection. A masked image therefore keeps its
|
|
632
|
+
own alternative text, while a masked Button remains focusable and operable
|
|
633
|
+
inside the hit region established by the clip.
|
|
634
|
+
|
|
635
|
+
The complete `CONTENT_MASK_SHAPES` contract is `squircle`, `heart`, `hexagon`,
|
|
636
|
+
`hexagon-2`, `decagon`, `pentagon`, `diamond`, `square`, `circle`, `star`,
|
|
637
|
+
`star-2`, `triangle`, `triangle-2`, `triangle-3`, `triangle-4`, `half-1`, and
|
|
638
|
+
`half-2`. The last two expose the daisyUI half-mask modifiers as first- and
|
|
639
|
+
second-half clips. `CONTENT_MASK_CLIP_PATHS` publishes the corresponding
|
|
640
|
+
structural geometry, and `contentMask` is the optional class Extension Seam.
|
|
641
|
+
Page arrangement, dimensions, content, and every appearance axis remain local
|
|
642
|
+
to the consumer.
|
|
643
|
+
|
|
644
|
+
```svelte
|
|
645
|
+
<script lang="ts">
|
|
646
|
+
import { Button, ContentMask } from "@reddb-io/design-system/base";
|
|
647
|
+
</script>
|
|
648
|
+
|
|
649
|
+
<ContentMask shape="circle" class="size-32">
|
|
650
|
+
<img src={portrait} alt="Ada Lovelace" />
|
|
651
|
+
</ContentMask>
|
|
652
|
+
|
|
653
|
+
<ContentMask shape="diamond" class="size-32">
|
|
654
|
+
<Button class="size-full">Open profile</Button>
|
|
655
|
+
</ContentMask>
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
## Label, Fieldset, Form, and controls
|
|
659
|
+
|
|
660
|
+
Label is the native naming primitive. Its `for` association and caller-owned
|
|
661
|
+
content reach a real `<label>`, so activating the label focuses or activates
|
|
662
|
+
the bound control. Field composes this same Label contract while adding help,
|
|
663
|
+
error, and required associations around one control.
|
|
664
|
+
|
|
665
|
+
Fieldset renders a real `<fieldset>` with a required visible `<legend>`. The
|
|
666
|
+
platform therefore keeps related controls exposed as one named group and
|
|
667
|
+
forwards the native disabled state to the group. Form is the native submission
|
|
668
|
+
boundary: action, method, validation, events, `FormData`, and imperative access
|
|
669
|
+
remain browser contracts. Fields, actions, business content, and page-specific
|
|
670
|
+
arrangement remain caller-owned.
|
|
671
|
+
|
|
672
|
+
```svelte
|
|
673
|
+
<Form action="/preferences" method="post">
|
|
674
|
+
<Label for="display-name">Display name</Label>
|
|
675
|
+
<Input id="display-name" name="displayName" />
|
|
676
|
+
|
|
677
|
+
<Fieldset legend="Contact preferences">
|
|
678
|
+
<Label><input name="notices" type="checkbox" value="email" /> Email notices</Label>
|
|
679
|
+
</Fieldset>
|
|
680
|
+
</Form>
|
|
681
|
+
```
|
|
682
|
+
|
|
683
|
+
## Field, Input, Textarea, and Select
|
|
684
|
+
|
|
685
|
+
Field owns the accessible relationship around one control. It renders the
|
|
686
|
+
visible label, optional help and error text, a visible required marker, and
|
|
687
|
+
passes one typed `FieldControlProps` object to its child snippet. That object
|
|
688
|
+
contains the control id, native `required`, and the complete
|
|
689
|
+
`aria-describedby`, `aria-invalid`, and `aria-errormessage` associations. Help
|
|
690
|
+
and error remain associated together rather than one replacing the other.
|
|
691
|
+
|
|
692
|
+
Input is deliberately a native `<input>`, not a reduced facsimile. Identity,
|
|
693
|
+
type, autofill, value, native `size`, constraints, validity, events, and focus
|
|
694
|
+
behavior pass through. `value` is bindable, so `bind:value` works exactly as
|
|
695
|
+
it does on the element; checkbox, radio and file types keep their state where
|
|
696
|
+
the platform does (`bind:checked` on Checkbox and Switch, `bind:files` on
|
|
697
|
+
FileInput). A bindable `ref` is available when a consumer genuinely needs
|
|
698
|
+
imperative focus or selection. Field and Input are separate so the same
|
|
699
|
+
Field contract can wrap a consumer-owned control through the snippet seam, and
|
|
700
|
+
Input can stand alone when another accessible naming mechanism is appropriate.
|
|
701
|
+
|
|
702
|
+
Textarea extends the same native contract, including `bind:value`, to multiline entry. Its `rows`,
|
|
703
|
+
`cols`, wrapping, length constraints, validity, resize behavior, events, form
|
|
704
|
+
value, and focus remain the browser's. Select likewise remains a native
|
|
705
|
+
`<select>`: callers own its option and optgroup content, and the platform owns
|
|
706
|
+
the popup, arrow-key interaction, focus management, single or multiple
|
|
707
|
+
selection, validation, and submitted value. Neither component exposes an
|
|
708
|
+
external catalogue's vocabulary as public API.
|
|
709
|
+
|
|
710
|
+
```svelte
|
|
711
|
+
<script lang="ts">
|
|
712
|
+
import { Field, Select, Textarea } from "@reddb-io/design-system/base";
|
|
713
|
+
</script>
|
|
714
|
+
|
|
715
|
+
<Field
|
|
716
|
+
label="Deployment notes"
|
|
717
|
+
help="Include the rollout and rollback plan."
|
|
718
|
+
error={notesError}
|
|
719
|
+
required
|
|
720
|
+
>
|
|
721
|
+
{#snippet children(control)}
|
|
722
|
+
<Textarea {...control} name="notes" rows={5} />
|
|
723
|
+
{/snippet}
|
|
724
|
+
</Field>
|
|
725
|
+
|
|
726
|
+
<Field label="Region" required>
|
|
727
|
+
{#snippet children(control)}
|
|
728
|
+
<Select {...control} name="region">
|
|
729
|
+
<option value="">Choose a region</option>
|
|
730
|
+
<option value="sa-east-1">South America</option>
|
|
731
|
+
</Select>
|
|
732
|
+
{/snippet}
|
|
733
|
+
</Field>
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
The exported `label`, `field`, `fieldset`, `form`, `input`, `textarea`, and `select` variant functions are
|
|
737
|
+
the optional appearance Extension Seams. Their classes resolve through Theme,
|
|
738
|
+
Color Scheme, and Density roles, so the same markup renders throughout the
|
|
739
|
+
showcase's full appearance product without selecting an axis itself.
|
|
740
|
+
|
|
741
|
+
## SearchSelect
|
|
742
|
+
|
|
743
|
+
A closed selection control with search inside its Popover. Use it for choosing
|
|
744
|
+
from a long list; the existing Combobox remains the editable typeahead.
|
|
745
|
+
`multiple` changes the selected `value` from a string to a string array and
|
|
746
|
+
shows removable chips. The public types keep those two contracts distinct.
|
|
747
|
+
|
|
748
|
+
```svelte
|
|
749
|
+
<script lang="ts">
|
|
750
|
+
import { SearchSelect, type SearchSelectOption } from "@reddb-io/design-system/base";
|
|
751
|
+
const regions: readonly SearchSelectOption[] = [
|
|
752
|
+
{ value: "gru", label: "São Paulo", description: "Brazil", keywords: ["sa-east-1"] },
|
|
753
|
+
{ value: "fra", label: "Frankfurt", description: "Germany", keywords: ["eu-central-1"] },
|
|
754
|
+
];
|
|
755
|
+
let region = $state("");
|
|
756
|
+
let replicas = $state<string[]>([]);
|
|
757
|
+
</script>
|
|
758
|
+
|
|
759
|
+
<SearchSelect label="Primary region" options={regions} name="region" bind:value={region} required />
|
|
760
|
+
<SearchSelect multiple label="Replica regions" options={regions} name="replicas" bind:value={replicas} />
|
|
761
|
+
```
|
|
762
|
+
|
|
763
|
+
Search matches labels, descriptions and explicit keywords without accents or
|
|
764
|
+
case sensitivity; all query terms must match. Disabled choices stay visible.
|
|
765
|
+
Reopening starts with the complete list, and multiple selection retains earlier
|
|
766
|
+
choices across searches. `searchPlaceholder`, `emptyText`, `requiredMessage`
|
|
767
|
+
and the collapsed `placeholder` are caller-owned copy seams.
|
|
768
|
+
|
|
769
|
+
Native select controls preserve form submission, required validation, disabled
|
|
770
|
+
exclusion and reset even while the search popup is closed. Multiple values use
|
|
771
|
+
repeated form entries under the same `name`. Selection and Escape restore the
|
|
772
|
+
trigger's focus; Tab continues out of the picker. Clear and chip removal retain
|
|
773
|
+
focus on the trigger and announce the remaining selection. Field carries help
|
|
774
|
+
and validation relationships. `controlSize` follows Input and Button, while
|
|
775
|
+
Theme, Color Scheme and Density remain inherited.
|
|
776
|
+
|
|
777
|
+
## Combobox
|
|
778
|
+
|
|
779
|
+
Combobox composes the same Field association used by native inputs with Bits
|
|
780
|
+
UI's active-descendant listbox behavior and the canonical Popover surface
|
|
781
|
+
appearance. The input retains keyboard focus while arrow keys highlight
|
|
782
|
+
options through `aria-activedescendant`; typing narrows caller-owned option
|
|
783
|
+
labels without discarding the typed text. Choosing an option replaces that
|
|
784
|
+
text with its visible label and submits its value through the caller's form.
|
|
785
|
+
|
|
786
|
+
The component owns no business catalogue: callers pass `{ value, label,
|
|
787
|
+
disabled? }` options. Its visible label, help, error, required state, selected
|
|
788
|
+
value, current input text, and open state remain controllable. Selection is
|
|
789
|
+
announced in text as well as color. Collision handling comes from the anchored
|
|
790
|
+
overlay behavior, while `combobox`, `input`, and `popover` remain optional
|
|
791
|
+
appearance Extension Seams. Theme, Color Scheme, Contrast, and Density stay
|
|
792
|
+
outside the component API and continue to resolve from the nearest scope.
|
|
793
|
+
|
|
794
|
+
```svelte
|
|
795
|
+
<script lang="ts">
|
|
796
|
+
import { Combobox } from "@reddb-io/design-system/base";
|
|
797
|
+
|
|
798
|
+
const regions = [
|
|
799
|
+
{ value: "us-east-1", label: "North America" },
|
|
800
|
+
{ value: "sa-east-1", label: "South America" },
|
|
801
|
+
];
|
|
802
|
+
</script>
|
|
803
|
+
|
|
804
|
+
<Combobox
|
|
805
|
+
label="Region"
|
|
806
|
+
help="Type to narrow the available regions."
|
|
807
|
+
name="region"
|
|
808
|
+
options={regions}
|
|
809
|
+
required
|
|
810
|
+
/>
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
## Checkbox, RadioGroup, and Switch
|
|
814
|
+
|
|
815
|
+
Checkbox and Switch compose the same canonical Field contract used by text
|
|
816
|
+
entry. Their required `label` is visible and targets a native checkbox, while
|
|
817
|
+
help, error, required, identity, form values, events, and imperative access
|
|
818
|
+
keep Field's associations and the browser's behavior. Switch fixes the native
|
|
819
|
+
control's role to `switch`; its moving thumb conveys checked state by position
|
|
820
|
+
as well as color.
|
|
821
|
+
|
|
822
|
+
RadioGroup composes the canonical Fieldset and Label contracts. A required
|
|
823
|
+
`legend` names the native fieldset, and one required `name` reaches every radio,
|
|
824
|
+
so the browser supplies exclusive selection, arrow-key behavior, validation,
|
|
825
|
+
and one submitted value. Callers own the option labels and values, including
|
|
826
|
+
whether an individual option is disabled, but cannot accidentally split the
|
|
827
|
+
group across different names.
|
|
828
|
+
|
|
829
|
+
```svelte
|
|
830
|
+
<Checkbox label="Share diagnostics" name="diagnostics" value="allowed" />
|
|
831
|
+
|
|
832
|
+
<RadioGroup
|
|
833
|
+
legend="Release channel"
|
|
834
|
+
name="channel"
|
|
835
|
+
options={[
|
|
836
|
+
{ value: "stable", label: "Stable" },
|
|
837
|
+
{ value: "preview", label: "Preview" },
|
|
838
|
+
]}
|
|
839
|
+
value="stable"
|
|
840
|
+
/>
|
|
841
|
+
|
|
842
|
+
<Switch label="Automatic updates" name="updates" value="automatic" />
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
The exported `checkbox`, `radioGroup`, and `switchControl` functions are their
|
|
846
|
+
optional token-only appearance seams. Density remains a live CSS-variable
|
|
847
|
+
lookup in nested scopes; none of the three controls selects Theme, Color
|
|
848
|
+
Scheme, or Density itself.
|
|
849
|
+
|
|
850
|
+
## Slider, Rating, ToggleButton, and ToggleGroup
|
|
851
|
+
|
|
852
|
+
Slider composes Field around a native range input. The browser retains its
|
|
853
|
+
numeric value, minimum, maximum, step, focus, arrow-key behavior, and submitted
|
|
854
|
+
form value. A visible output mirrors the current value; `formatValue` gives the
|
|
855
|
+
same wording to assistive technology through `aria-valuetext` when units or
|
|
856
|
+
domain wording matter.
|
|
857
|
+
|
|
858
|
+
Rating composes Fieldset and Label around one native radio name. Its visible
|
|
859
|
+
filled and empty marks make the selected count distinguishable without colour,
|
|
860
|
+
while the radios retain exclusive selection, focus, validation, and form
|
|
861
|
+
semantics. Page-specific rating meaning remains caller-owned.
|
|
862
|
+
|
|
863
|
+
ToggleButton composes the canonical Button and adds `aria-pressed`, a stable
|
|
864
|
+
`data-state`, and a bindable pressed value. ToggleGroup composes those buttons
|
|
865
|
+
inside a named Fieldset, preserves exactly one pressed option, submits the
|
|
866
|
+
selected value when named, and uses roving focus with arrow, Home, and End keys.
|
|
867
|
+
Its option labels and values belong to the consumer.
|
|
868
|
+
|
|
869
|
+
```svelte
|
|
870
|
+
<Slider label="Deployment capacity" name="capacity" value={40} formatValue={(value) => `${value}%`} />
|
|
871
|
+
<Rating legend="Release confidence" name="confidence" value={3} />
|
|
872
|
+
<ToggleButton label="Pin deployment" bind:pressed={pinned} />
|
|
873
|
+
<ToggleGroup legend="Alignment" name="alignment" options={alignments} bind:value={alignment} />
|
|
874
|
+
```
|
|
875
|
+
|
|
876
|
+
The exported `slider`, `rating`, `toggleButton`, and `toggleGroup` functions are
|
|
877
|
+
optional appearance Extension Seams. Their spatial roles remain live under
|
|
878
|
+
nested Density scopes, and none of the four selects Theme, Color Scheme, or
|
|
879
|
+
Density for its consumer.
|
|
880
|
+
|
|
881
|
+
## FileInput, OneTimeCodeInput, and ControlGroup
|
|
882
|
+
|
|
883
|
+
FileInput composes Field and Input rather than defining a second naming or
|
|
884
|
+
entry contract. The browser still owns file selection, accepted types,
|
|
885
|
+
multiple selection, validation, focus, and change events. FileInput adds the
|
|
886
|
+
capability-specific guarantee the native control's browser-dependent chrome
|
|
887
|
+
cannot make consistently: selected filenames remain visible in the document
|
|
888
|
+
and are announced through a polite live region. Empty single and multiple
|
|
889
|
+
states remain explicit as “No file selected” and “No files selected”.
|
|
890
|
+
|
|
891
|
+
OneTimeCodeInput composes Fieldset and Input into a visibly named group of
|
|
892
|
+
one-character native entries. Typing advances focus; Backspace on an empty
|
|
893
|
+
segment, arrows, Home, and End move predictably; and a pasted alphanumeric code
|
|
894
|
+
is distributed from the active segment instead of being discarded. One hidden
|
|
895
|
+
native input carries the complete value into FormData, while every visible
|
|
896
|
+
segment retains its own required, invalid, help, and error associations.
|
|
897
|
+
|
|
898
|
+
ControlGroup owns only related-control arrangement. Its required label names a
|
|
899
|
+
native `role="group"`; its horizontal or vertical orientation never changes
|
|
900
|
+
the order or focus behavior of caller-owned children. Page-specific actions,
|
|
901
|
+
business labels, and compositions remain local to the consumer.
|
|
902
|
+
|
|
903
|
+
```svelte
|
|
904
|
+
<FileInput label="Upload evidence" name="evidence" accept=".pdf,image/*" />
|
|
905
|
+
|
|
906
|
+
<OneTimeCodeInput
|
|
907
|
+
label="Verification code"
|
|
908
|
+
name="verificationCode"
|
|
909
|
+
length={6}
|
|
910
|
+
/>
|
|
911
|
+
|
|
912
|
+
<ControlGroup label="Record actions">
|
|
913
|
+
<Button type="submit">Save</Button>
|
|
914
|
+
<Button type="button" variant="secondary">Cancel</Button>
|
|
915
|
+
</ControlGroup>
|
|
916
|
+
```
|
|
917
|
+
|
|
918
|
+
The exported `fileInput`, `oneTimeCodeInput`, and `controlGroup` functions are
|
|
919
|
+
their optional appearance Extension Seams. Every spatial value resolves from
|
|
920
|
+
the active Density scope, and none of the components select Theme, Color
|
|
921
|
+
Scheme, or Density for the consumer.
|
|
922
|
+
|
|
923
|
+
## DateField and DateRangeField
|
|
924
|
+
|
|
925
|
+
DateField composes the canonical Field and Input contracts into year, month,
|
|
926
|
+
and day segments. Values use complete ISO `YYYY-MM-DD` form; impossible or
|
|
927
|
+
incomplete calendar dates never reach the named hidden form control. Complete
|
|
928
|
+
segment entry advances focus, and Left and Right arrows move predictably
|
|
929
|
+
between segments. The caller continues to own the visible label, help, error,
|
|
930
|
+
requirement, and form name while every segment inherits its Field associations.
|
|
931
|
+
|
|
932
|
+
DateRangeField composes two DateFields inside the canonical native Fieldset.
|
|
933
|
+
Its caller owns the group legend, both bound labels, help text, and inverted
|
|
934
|
+
range message. An end before its start is announced on the group and is not
|
|
935
|
+
published under the end form name; correcting the bound restores the normal
|
|
936
|
+
ordered pair. Calendar selection, page arrangement, and scheduling policy stay
|
|
937
|
+
outside this entry contract.
|
|
938
|
+
|
|
939
|
+
```svelte
|
|
940
|
+
<DateField label="Deployment date" name="deploymentDate" value="2026-08-20" required />
|
|
941
|
+
|
|
942
|
+
<DateRangeField
|
|
943
|
+
label="Deployment window"
|
|
944
|
+
startLabel="Starts"
|
|
945
|
+
endLabel="Ends"
|
|
946
|
+
startName="deploymentStart"
|
|
947
|
+
endName="deploymentEnd"
|
|
948
|
+
startValue="2026-08-10"
|
|
949
|
+
endValue="2026-08-20"
|
|
950
|
+
/>
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
The exported `dateField` and `dateRangeField` functions are optional appearance
|
|
954
|
+
Extension Seams. They compose Field, Input, and Fieldset token roles, remain
|
|
955
|
+
Density-responsive, and select no appearance axis themselves.
|
|
956
|
+
|
|
957
|
+
## DatePicker and DateRangePicker
|
|
958
|
+
|
|
959
|
+
DatePicker composes the canonical DateField, Calendar, and Popover contracts
|
|
960
|
+
without creating a second date model. Typing a complete possible ISO date
|
|
961
|
+
selects the same day in the calendar; choosing a calendar day updates the
|
|
962
|
+
segmented field and its named form value before the Popover closes. The caller
|
|
963
|
+
owns labels, validation copy, availability rules, form naming, and initial
|
|
964
|
+
value.
|
|
965
|
+
|
|
966
|
+
DateRangePicker applies the same composition to DateRangeField and
|
|
967
|
+
RangeCalendar. A first calendar click publishes only a start and leaves the
|
|
968
|
+
Popover open; the complete ordered range closes it and publishes both bound
|
|
969
|
+
form values. The RangeCalendar continues to own roving focus and range
|
|
970
|
+
announcements, while Popover continues to own collision handling, Escape, and
|
|
971
|
+
focus return.
|
|
972
|
+
|
|
973
|
+
```svelte
|
|
974
|
+
<DatePicker
|
|
975
|
+
label="Deployment date"
|
|
976
|
+
calendarLabel="Deployment date calendar"
|
|
977
|
+
name="deploymentDate"
|
|
978
|
+
value="2026-08-20"
|
|
979
|
+
/>
|
|
980
|
+
|
|
981
|
+
<DateRangePicker
|
|
982
|
+
label="Deployment window"
|
|
983
|
+
startLabel="Starts"
|
|
984
|
+
endLabel="Ends"
|
|
985
|
+
calendarLabel="Deployment window calendar"
|
|
986
|
+
startName="deploymentStart"
|
|
987
|
+
endName="deploymentEnd"
|
|
988
|
+
startValue="2026-08-20"
|
|
989
|
+
endValue="2026-08-24"
|
|
990
|
+
/>
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
The optional `datePicker` and `dateRangePicker` appearance seams own only the
|
|
994
|
+
relationship between the composed contracts. Their geometry resolves through
|
|
995
|
+
Density tokens, and neither picker selects Theme, Color Scheme, or Density.
|
|
996
|
+
|
|
997
|
+
## TimeField and TimeRangeField
|
|
998
|
+
|
|
999
|
+
TimeField composes the canonical Field and Input contracts into hour and
|
|
1000
|
+
minute segments. Values use complete 24-hour `HH:mm` form; impossible or
|
|
1001
|
+
incomplete values never reach the named hidden form control. Two-digit entry
|
|
1002
|
+
advances focus, and Left and Right arrows move predictably between segments.
|
|
1003
|
+
The caller continues to own the visible label, help, error, requirement, and
|
|
1004
|
+
form name while both segments inherit their Field associations.
|
|
1005
|
+
|
|
1006
|
+
TimeRangeField composes two TimeFields inside the canonical native Fieldset.
|
|
1007
|
+
Its caller owns the group legend, both bound labels, help text, and inverted
|
|
1008
|
+
range message. An end before its start is announced on the group and is not
|
|
1009
|
+
published under the end form name; correcting the bound restores the normal
|
|
1010
|
+
ordered pair. The component owns no scheduling policy or page arrangement.
|
|
1011
|
+
|
|
1012
|
+
```svelte
|
|
1013
|
+
<TimeField label="Meeting time" name="meetingTime" value="09:45" required />
|
|
1014
|
+
|
|
1015
|
+
<TimeRangeField
|
|
1016
|
+
label="Support window"
|
|
1017
|
+
startLabel="Starts"
|
|
1018
|
+
endLabel="Ends"
|
|
1019
|
+
startName="supportStart"
|
|
1020
|
+
endName="supportEnd"
|
|
1021
|
+
startValue="09:00"
|
|
1022
|
+
endValue="17:00"
|
|
1023
|
+
/>
|
|
1024
|
+
```
|
|
1025
|
+
|
|
1026
|
+
The exported `timeField` and `timeRangeField` functions are optional
|
|
1027
|
+
appearance Extension Seams. They compose Field, Input, and Fieldset token
|
|
1028
|
+
roles, remain Density-responsive, and select no appearance axis themselves.
|
|
1029
|
+
|
|
1030
|
+
## Disclosure family
|
|
1031
|
+
|
|
1032
|
+
`Tabs`, `Accordion`, and `Disclosure` compose the canonical Base `Button`
|
|
1033
|
+
with Bits UI's focus and expanded-state contracts. They own only the reusable
|
|
1034
|
+
interaction: the consumer supplies stable item values, visible labels, and
|
|
1035
|
+
snippet content, while page arrangement and business language remain local.
|
|
1036
|
+
|
|
1037
|
+
```svelte
|
|
1038
|
+
<Tabs label="Deployment view" items={tabs} bind:value>
|
|
1039
|
+
{#snippet children({ value })}
|
|
1040
|
+
<DeploymentPanel panel={value} />
|
|
1041
|
+
{/snippet}
|
|
1042
|
+
</Tabs>
|
|
1043
|
+
|
|
1044
|
+
<Accordion label="Release questions" items={questions} bind:expanded>
|
|
1045
|
+
{#snippet children({ value })}
|
|
1046
|
+
<Answer question={value} />
|
|
1047
|
+
{/snippet}
|
|
1048
|
+
</Accordion>
|
|
1049
|
+
|
|
1050
|
+
<Disclosure label="Advanced details">
|
|
1051
|
+
<DeploymentDetails />
|
|
1052
|
+
</Disclosure>
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
Tabs use automatic activation with roving focus: horizontal arrows, Home, and
|
|
1056
|
+
End move both focus and selection, skipping disabled tabs. Accordion triggers
|
|
1057
|
+
publish `aria-expanded` and their controlled region relationship; single mode
|
|
1058
|
+
is the default and `multiple` opts into independent sections. Disclosure is
|
|
1059
|
+
the one-section form of the same contract. The exported `tabs`, `accordion`,
|
|
1060
|
+
and `disclosure` functions are the optional token-only appearance seams. None
|
|
1061
|
+
of the three selects Theme, Color Scheme, or Density.
|
|
1062
|
+
With `followHash`, Tabs also selects the panel containing a same-page fragment,
|
|
1063
|
+
including nested tab sets, then focuses the exact linked target. Product links
|
|
1064
|
+
remain ordinary anchors rather than page-local tab-control scripts.
|
|
1065
|
+
|
|
1066
|
+
## Avatar, MediaObject, and Carousel
|
|
1067
|
+
|
|
1068
|
+
Avatar is a named image boundary with a required visible text fallback. The
|
|
1069
|
+
image is optional; when it is absent or fails, the fallback is already in the
|
|
1070
|
+
same box. `sm`, `md`, and `lg` name Density-responsive control-height roles,
|
|
1071
|
+
not fixed dimensions. The component supplies no Theme, Color Scheme, or
|
|
1072
|
+
Density scope of its own.
|
|
1073
|
+
|
|
1074
|
+
MediaObject keeps caller-owned leading media and content in one generic
|
|
1075
|
+
relationship. Its `media` snippet commonly composes Avatar, while headings,
|
|
1076
|
+
metadata, actions, business language, and page arrangement remain local to the
|
|
1077
|
+
consumer. Alignment and gap are independent, and every gap names a live
|
|
1078
|
+
Density role.
|
|
1079
|
+
|
|
1080
|
+
Carousel is a labeled region of caller-owned slides. Previous and next are the
|
|
1081
|
+
canonical Base Button, each slide exposes its position and label, and inactive
|
|
1082
|
+
slides leave both the visual and keyboard flow. Automatic rotation is opt-in;
|
|
1083
|
+
when enabled it always adds a pause/resume Button, uses a quiet live region
|
|
1084
|
+
while moving, and stops when focus or hover enters caller content.
|
|
1085
|
+
|
|
1086
|
+
```svelte
|
|
1087
|
+
<script lang="ts">
|
|
1088
|
+
import { Avatar, MediaObject } from "@reddb-io/design-system/base";
|
|
1089
|
+
</script>
|
|
1090
|
+
|
|
1091
|
+
{#snippet portrait()}
|
|
1092
|
+
<Avatar name="Ada Lovelace" fallback="AL" />
|
|
1093
|
+
{/snippet}
|
|
1094
|
+
|
|
1095
|
+
<MediaObject media={portrait}>
|
|
1096
|
+
<strong>Ada Lovelace</strong>
|
|
1097
|
+
<p>Caller-owned biography and actions.</p>
|
|
1098
|
+
</MediaObject>
|
|
1099
|
+
```
|
|
1100
|
+
|
|
1101
|
+
## Table
|
|
1102
|
+
|
|
1103
|
+
Table turns caller-owned column labels and row values into one native table.
|
|
1104
|
+
Its visible caption names both the table and its responsive scroll region;
|
|
1105
|
+
every column heading carries `scope="col"`, and the `rowHeader` column carries
|
|
1106
|
+
`scope="row"`. The first column is the row header by default. Wide content
|
|
1107
|
+
scrolls horizontally inside a focusable region, so overflow is reachable from
|
|
1108
|
+
the keyboard instead of being clipped or silently extending the page.
|
|
1109
|
+
|
|
1110
|
+
The optional `cell` snippet keeps links, controls, formatting, and business
|
|
1111
|
+
content local to the consumer while Table retains the native header
|
|
1112
|
+
relationships. All spacing names Density roles and the component declares no
|
|
1113
|
+
Theme, Color Scheme, or Density of its own.
|
|
1114
|
+
|
|
1115
|
+
```svelte
|
|
1116
|
+
<script lang="ts">
|
|
1117
|
+
import { Table } from "@reddb-io/design-system/base";
|
|
1118
|
+
|
|
1119
|
+
const columns = [
|
|
1120
|
+
{ key: "node", header: "Node" },
|
|
1121
|
+
{ key: "region", header: "Region" },
|
|
1122
|
+
{ key: "latency", header: "Latency" },
|
|
1123
|
+
];
|
|
1124
|
+
const rows = [
|
|
1125
|
+
{ node: "db-01", region: "South America", latency: "24 ms" },
|
|
1126
|
+
];
|
|
1127
|
+
</script>
|
|
1128
|
+
|
|
1129
|
+
<Table caption="Cluster replicas" {columns} {rows} rowHeader="node" />
|
|
1130
|
+
```
|
|
1131
|
+
|
|
1132
|
+
## Statistic, Countdown, and Timeline
|
|
1133
|
+
|
|
1134
|
+
Statistic composes the canonical DescriptionList term/detail relationship: its required label is
|
|
1135
|
+
the term, and its `<data>` detail keeps the caller's scalar machine-readable even when
|
|
1136
|
+
`formatValue` supplies a localized visible rendering. Optional supporting context remains caller
|
|
1137
|
+
content. Statistic owns no dashboard grid, comparison period, trend meaning, or business metric.
|
|
1138
|
+
|
|
1139
|
+
Countdown is controlled through `remaining` whole seconds, so scheduling and the source of time
|
|
1140
|
+
stay with the consumer. While running it uses the quiet timer role and a native `<time>` duration;
|
|
1141
|
+
at zero it becomes one polite, atomic status containing the visible label and completion sentence.
|
|
1142
|
+
Negative and non-finite inputs normalize to completion. `formatDuration` and
|
|
1143
|
+
`normalizeRemaining` are exported as the shared behavior seam.
|
|
1144
|
+
|
|
1145
|
+
Timeline owns native ordered-list chronology and native machine-readable event times. Event titles
|
|
1146
|
+
with destinations compose the canonical Link, while plain events add no keyboard stop. The caller
|
|
1147
|
+
owns event wording, timestamps, destinations, and page arrangement.
|
|
1148
|
+
|
|
1149
|
+
```svelte
|
|
1150
|
+
<script lang="ts">
|
|
1151
|
+
import { Countdown, Statistic, Timeline } from "@reddb-io/design-system/base";
|
|
1152
|
+
</script>
|
|
1153
|
+
|
|
1154
|
+
<Statistic label="Queries" value={12840} description="Last 24 hours" />
|
|
1155
|
+
<Countdown label="Deployment window" remaining={65} />
|
|
1156
|
+
<Timeline
|
|
1157
|
+
label="Deployment history"
|
|
1158
|
+
items={[
|
|
1159
|
+
{ id: "queued", title: "Queued", datetime: "2026-08-08T19:00:00Z", time: "19:00" },
|
|
1160
|
+
]}
|
|
1161
|
+
/>
|
|
1162
|
+
```
|
|
1163
|
+
|
|
1164
|
+
## Progress, RadialProgress, Meter, LoadingIndicator, and Skeleton
|
|
1165
|
+
|
|
1166
|
+
Progress and RadialProgress share one exported range-normalization contract.
|
|
1167
|
+
A finite value produces matching visual length, `aria-valuenow`, and value
|
|
1168
|
+
text; omitting it produces an indeterminate progressbar with no invented
|
|
1169
|
+
current value. RadialProgress adds a visible number to its arc, so current
|
|
1170
|
+
state is never carried by color alone. `Progress` can opt into a visible
|
|
1171
|
+
`summary` that repeats its accessible label and normalized value beside the
|
|
1172
|
+
track without creating a second accessibility owner.
|
|
1173
|
+
|
|
1174
|
+
Meter represents a bounded scalar rather than work in flight. It exposes the
|
|
1175
|
+
meter role and normalized range while drawing both a textual value and a fill
|
|
1176
|
+
length. Its label and value language remain caller-owned.
|
|
1177
|
+
|
|
1178
|
+
LoadingIndicator is the canonical standalone waiting status. Its sentence is
|
|
1179
|
+
always in the accessibility tree, its spinner is decorative, and the region
|
|
1180
|
+
announces a polite busy state. Rotation is gated by the platform motion
|
|
1181
|
+
preference. The Application Kit's former `LoadingState` duplicate has been
|
|
1182
|
+
retired; every consumer receives this Base contract instead.
|
|
1183
|
+
|
|
1184
|
+
Skeleton offers text, rectangle, and circle placeholders while leaving their
|
|
1185
|
+
arrangement and final dimensions to the consumer. It is decorative by default;
|
|
1186
|
+
a caller may give it a label when the placeholder itself owns the polite busy
|
|
1187
|
+
announcement. Its pulse is motion-safe and its rectangle height remains a live
|
|
1188
|
+
Density role.
|
|
1189
|
+
|
|
1190
|
+
```svelte
|
|
1191
|
+
<script lang="ts">
|
|
1192
|
+
import {
|
|
1193
|
+
LoadingIndicator,
|
|
1194
|
+
Meter,
|
|
1195
|
+
Progress,
|
|
1196
|
+
RadialProgress,
|
|
1197
|
+
Skeleton,
|
|
1198
|
+
} from "@reddb-io/design-system/base";
|
|
1199
|
+
</script>
|
|
1200
|
+
|
|
1201
|
+
<Progress value={72} label="Deployment progress" summary />
|
|
1202
|
+
<RadialProgress value={64} label="Indexing progress" />
|
|
1203
|
+
<Meter value={3} max={5} label="Cluster capacity" />
|
|
1204
|
+
<LoadingIndicator label="Loading nodes…" />
|
|
1205
|
+
<Skeleton shape="rectangle" label="Loading node summary" />
|
|
1206
|
+
```
|
|
1207
|
+
|
|
1208
|
+
## The Logo
|
|
1209
|
+
|
|
1210
|
+
The Brand owns the Mark; the DS owns the component that places it (ADR 0004).
|
|
1211
|
+
So the Logo does four things and improvises at none of them.
|
|
1212
|
+
|
|
1213
|
+
**It selects.** `layout` is `horizontal`, `stacked` or `icon`; `on` is `light`
|
|
1214
|
+
or `dark` and names the **surface behind the Mark**, not the Theme — a dark
|
|
1215
|
+
hero on a light marketing page is `on="dark"`. Unset, `on` defaults from the
|
|
1216
|
+
active Color Scheme, read off `data-color-scheme`. It reacts when that root
|
|
1217
|
+
attribute changes, so persistent navigation swaps between the approved color
|
|
1218
|
+
and inverse Marks without coupling contrast to the directional Theme. With no
|
|
1219
|
+
document — a server render — it reads as `light`. A local surface that differs
|
|
1220
|
+
from the document still says so explicitly with `on`.
|
|
1221
|
+
|
|
1222
|
+
**It refuses.** When the pinned Assets release ships no Mark for the pair asked
|
|
1223
|
+
for — today the icon on dark — the Logo throws, naming the gap and the release.
|
|
1224
|
+
It never falls back to the other surface's drawing and never recolors one:
|
|
1225
|
+
both are licence violations, so neither has a code path. The message is the
|
|
1226
|
+
first draft of the Brand proposal that fixes it.
|
|
1227
|
+
|
|
1228
|
+
**It holds the clearspace.** 25% of the symbol's height, inside the component's
|
|
1229
|
+
own box, with no opt-out prop. `size` is the symbol's height in CSS pixels —
|
|
1230
|
+
the symbol is the same drawing in every layout, so one number means the same
|
|
1231
|
+
thing across all three — and the rendered box is larger by the clearspace on
|
|
1232
|
+
every side. Below `MINIMUM_SYMBOL_PX` is an error, not a smaller Logo.
|
|
1233
|
+
|
|
1234
|
+
**It links, when asked.** With an `href` it becomes a real `<a>` carrying an
|
|
1235
|
+
`aria-label`, and the focus ring is drawn on the box — which already includes
|
|
1236
|
+
the clearspace, so the ring falls outside it by construction. Without one it is
|
|
1237
|
+
the pure Mark: a footer, a chatbot avatar.
|
|
1238
|
+
|
|
1239
|
+
When `on` is omitted, the Logo observes the root Color Scheme attribute. An
|
|
1240
|
+
explicit `on` remains static and needs no observation.
|
|
1241
|
+
|
|
1242
|
+
### The Marks
|
|
1243
|
+
|
|
1244
|
+
`src/marks/*.svg` are the pinned release's bytes, vendored **inside** `src`
|
|
1245
|
+
because that is the whole of what a consumer receives. They are copies of
|
|
1246
|
+
`vendor/brand/marks/`, and `test/marks.test.ts` re-hashes them against the same
|
|
1247
|
+
`brand.lock.json` digests `scripts/producer` checks — one pinned release, two
|
|
1248
|
+
places it has to hold, never two pins. The Logo reaches a Mark by importing the
|
|
1249
|
+
file, so the drawing stays opaque bytes the whole way through and "reproduced
|
|
1250
|
+
unaltered" is a property of how the component works rather than a rule someone
|
|
1251
|
+
has to follow.
|
|
1252
|
+
|
|
1253
|
+
## The anti-hardcode lint
|
|
1254
|
+
|
|
1255
|
+
Every colour and radius a Kit wears must name a token the Themes reassign, and
|
|
1256
|
+
every spatial value the Density axis ships a role for must name that role. The
|
|
1257
|
+
rule arrived here the way this README said it would: by **extracting** the
|
|
1258
|
+
application Kit's linter into `@reddb-io/kit-lint`, which both Kits now run.
|
|
1259
|
+
What is this Kit's own is `tools/lint-cli.ts` and the files it hands over —
|
|
1260
|
+
which are its `.svelte` and `.ts` source, and never a Mark, whose colours are
|
|
1261
|
+
the Brand's drawing rather than a Kit hardcoding one.
|
|
1262
|
+
|
|
1263
|
+
```
|
|
1264
|
+
pnpm --filter kit-base lint
|
|
1265
|
+
```
|
|
1266
|
+
|
|
1267
|
+
## Consuming it
|
|
1268
|
+
|
|
1269
|
+
For native React, see the [React implementation](react/README.md). Its initial
|
|
1270
|
+
coverage is twelve components; Svelte remains the default Sync framework.
|
|
1271
|
+
|
|
1272
|
+
Same as any Kit: `ds-sync` lands it as vendorable Svelte 5 source at a pinned
|
|
1273
|
+
DS release (ADR 0002), inside the one package it assembles
|
|
1274
|
+
(`scripts/producer/README.md`), where this Kit is the `./base` subpath:
|
|
1275
|
+
|
|
1276
|
+
```ts
|
|
1277
|
+
import {
|
|
1278
|
+
Accordion,
|
|
1279
|
+
Alert,
|
|
1280
|
+
AlertDialog,
|
|
1281
|
+
Button,
|
|
1282
|
+
ControlGroup,
|
|
1283
|
+
DateField,
|
|
1284
|
+
DateRangeField,
|
|
1285
|
+
Dialog,
|
|
1286
|
+
Disclosure,
|
|
1287
|
+
Drawer,
|
|
1288
|
+
Field,
|
|
1289
|
+
Fieldset,
|
|
1290
|
+
FileInput,
|
|
1291
|
+
Form,
|
|
1292
|
+
Input,
|
|
1293
|
+
Label,
|
|
1294
|
+
Logo,
|
|
1295
|
+
OneTimeCodeInput,
|
|
1296
|
+
Select,
|
|
1297
|
+
Tabs,
|
|
1298
|
+
Textarea,
|
|
1299
|
+
TimeField,
|
|
1300
|
+
TimeRangeField,
|
|
1301
|
+
Tooltip,
|
|
1302
|
+
alert,
|
|
1303
|
+
accordion,
|
|
1304
|
+
alertDialog,
|
|
1305
|
+
alertDialogActions,
|
|
1306
|
+
button,
|
|
1307
|
+
controlGroup,
|
|
1308
|
+
dateField,
|
|
1309
|
+
dateRangeField,
|
|
1310
|
+
dialog,
|
|
1311
|
+
disclosure,
|
|
1312
|
+
drawer,
|
|
1313
|
+
field,
|
|
1314
|
+
fieldset,
|
|
1315
|
+
fileInput,
|
|
1316
|
+
form,
|
|
1317
|
+
input,
|
|
1318
|
+
label,
|
|
1319
|
+
oneTimeCodeInput,
|
|
1320
|
+
select,
|
|
1321
|
+
tabs,
|
|
1322
|
+
textarea,
|
|
1323
|
+
timeField,
|
|
1324
|
+
timeRangeField,
|
|
1325
|
+
tooltip,
|
|
1326
|
+
type AlertFeedbackRole,
|
|
1327
|
+
type ButtonVariant,
|
|
1328
|
+
type ControlGroupOrientation,
|
|
1329
|
+
type FieldControlProps,
|
|
1330
|
+
} from "@reddb-io/design-system/base";
|
|
1331
|
+
```
|
|
1332
|
+
|
|
1333
|
+
The difference is only that no consumer has to ask for it.
|
|
1334
|
+
|
|
1335
|
+
## Commands
|
|
1336
|
+
|
|
1337
|
+
```
|
|
1338
|
+
pnpm --filter kit-base test # public behavior, accessibility, routing, Marks, and consumer checks
|
|
1339
|
+
pnpm --filter kit-base check # consumer svelte-check over the Kit's source, strict tsconfig
|
|
1340
|
+
pnpm --filter kit-base lint # every colour and radius names a token the Themes reassign
|
|
1341
|
+
pnpm --filter kit-base build # stage the vendorable source into dist/ for the release bundle
|
|
1342
|
+
```
|
|
1343
|
+
|
|
1344
|
+
### The consumer check
|
|
1345
|
+
|
|
1346
|
+
A Kit ships as source, so the compiler that judges it is the consumer's, and
|
|
1347
|
+
`tsconfig.consumer.json` is that compiler with no DS config behind it. It adds
|
|
1348
|
+
one thing the application Kit's does not — `types: ["vite/client"]` — and that
|
|
1349
|
+
is the point: the Logo imports its Mark, and a consumer's own bundler is what
|
|
1350
|
+
declares `*.svg`. This Kit ships no such declaration (`types/marks.d.ts` stays
|
|
1351
|
+
outside `src/`), because a wildcard ambient module can only be declared once in
|
|
1352
|
+
a program and a second copy would fail a consumer's build in a file they never
|
|
1353
|
+
wrote. `test/consumer-check.test.ts` runs the check on every `test`, so that
|
|
1354
|
+
cannot regress unnoticed.
|
|
1355
|
+
|
|
1356
|
+
## Minimum configuration
|
|
1357
|
+
|
|
1358
|
+
Button defaults to secondary emphasis; the leading action selects `variant="primary"`. Stack spaces blocks with `layout-md` by default; use a component gap for small internal groups and `gap="none"` for contiguous content. Card owns the layout-sm rhythm between body blocks. These defaults inherit the selected Theme, Color Scheme and Density. Controls consume pointer-aware editable text, so touch entry is at least 16px without per-component touch overrides. See ADR 0029 and the first specimens in the showcase.
|
|
1359
|
+
|
|
1360
|
+
### Inline measurements
|
|
1361
|
+
|
|
1362
|
+
`Meter layout="inline" labelHidden` places its track beside the reading for table cells. The label remains its accessible name; the caller supplies the metric and threshold tone. The default stacked layout is unchanged.
|
|
1363
|
+
|
|
1364
|
+
`ScrollArea variant="plain"` embeds a named, keyboard-scrollable region in an existing panel without adding another frame or inset. The default `outline` remains appropriate for standalone regions.
|
|
1365
|
+
|
|
1366
|
+
### Inline editing
|
|
1367
|
+
|
|
1368
|
+
`InlineEdit` composes canonical Input and Button around a visible field label.
|
|
1369
|
+
`bind:value` is the committed text; keystrokes stay in an independent draft until
|
|
1370
|
+
Save or Enter succeeds. Escape or Cancel discards the draft and returns focus to
|
|
1371
|
+
the edit action. An externally updated value does not overwrite an open draft.
|
|
1372
|
+
|
|
1373
|
+
```svelte
|
|
1374
|
+
<InlineEdit label="Project name" bind:value={name}
|
|
1375
|
+
validate={value => value.trim().length < 3 ? "Use at least three characters." : undefined}
|
|
1376
|
+
onconfirm={value => persistName(value)} />
|
|
1377
|
+
```
|
|
1378
|
+
|
|
1379
|
+
The application owns validation and persistence. A rejected `onconfirm` retains the
|
|
1380
|
+
draft with an announced `saveErrorMessage`, and a pending save prevents duplicate
|
|
1381
|
+
submission. `onvaluechange` follows successful persistence. `editing` is bindable;
|
|
1382
|
+
its paired callback is `oneditingchange`. Data fetching and router interception
|
|
1383
|
+
remain outside this component. The native form and input need no popup focus
|
|
1384
|
+
manager. See `/kit/inline-edit` for validation, retry and disabled examples.
|
|
1385
|
+
|
|
1386
|
+
## Carousel rendering seam
|
|
1387
|
+
|
|
1388
|
+
`viewport` is an optional `Snippet<[CarouselViewportContext]>` that replaces only
|
|
1389
|
+
slide drawing. It receives `slides`, the clamped `active` index, `playing` and
|
|
1390
|
+
`firstIndex`. Base retains previous/next controls, position, rotation and pausing
|
|
1391
|
+
on focus or pointer interaction. The custom renderer must provide named slide
|
|
1392
|
+
groups, exclude inactive content from focus and accessibility, honor Image
|
|
1393
|
+
priority and carry its own reduced-motion presentation. Marketing's
|
|
1394
|
+
`PerspectiveCarousel` is the canonical example of this seam.
|
|
1395
|
+
|
|
1396
|
+
## Operational presentation
|
|
1397
|
+
|
|
1398
|
+
`Progress` and `Meter` accept optional `segments` and `segmentColumns`. Divisions
|
|
1399
|
+
are decorative and capped at 128 rendered cells; exact range/value semantics and
|
|
1400
|
+
fractional fill remain intact. Omit segments for the continuous default.
|
|
1401
|
+
Indeterminate Progress retains its normal representation.
|
|
1402
|
+
|
|
1403
|
+
`Statistic animate` gives paint-only update feedback; it does not interpolate the
|
|
1404
|
+
semantic value or announce intermediate numbers. `Transfer` takes `fromId`,
|
|
1405
|
+
`toId` and a changing `trigger` after the application has committed state. Both
|
|
1406
|
+
anchors remain application-owned; the decorative clone is inert, interruptible
|
|
1407
|
+
and removed under reduced motion, navigation, cancellation or unmount.
|
|
1408
|
+
|
|
1409
|
+
### Saved values and explicit editing
|
|
1410
|
+
|
|
1411
|
+
Use `InlineEdit` with `presentation="input"` for a committed value loaded from
|
|
1412
|
+
an API, file or other application-owned source. The read view is selectable HTML text, without a textbox, border or input focus stop.
|
|
1413
|
+
Only activating Edit mounts the native input. `sourceLabel` describes
|
|
1414
|
+
provenance; `savedLabel` defaults to `Saved`. Neither infers network state.
|
|
1415
|
+
|
|
1416
|
+
`editVisibility="hover"` is optional: focus also reveals Edit, and touch always
|
|
1417
|
+
shows it. Save validates and awaits `onconfirm` (Svelte) or `onConfirm` (React)
|
|
1418
|
+
before committing. A rejected save retains the draft and announces the error;
|
|
1419
|
+
Escape or Cancel restores the committed value and returns focus to Edit.
|
|
1420
|
+
Pass an optional `icon` glyph (for example Phone) and `inputType="tel"` for a saved
|
|
1421
|
+
telephone number. The glyph stays decorative in both states; passwords remain
|
|
1422
|
+
masked in the read view.
|
|
1423
|
+
InlineEdit owns its edit form; do not nest it inside another form.
|
|
1424
|
+
|
|
1425
|
+
```svelte
|
|
1426
|
+
<InlineEdit label="Project name" presentation="input" sourceLabel="Configuration API"
|
|
1427
|
+
bind:value={projectName} onconfirm={saveProjectName} />
|
|
1428
|
+
```
|
|
1429
|
+
|
|
1430
|
+
```tsx
|
|
1431
|
+
<InlineEdit label="Project name" presentation="input" sourceLabel="Configuration API"
|
|
1432
|
+
value={projectName} onValueChange={setProjectName} onConfirm={saveProjectName} />
|
|
1433
|
+
```
|
|
1434
|
+
|
|
1435
|
+
### Renderer-free extension seams
|
|
1436
|
+
|
|
1437
|
+
Import visual recipes from `@reddb-io/design-system/base/recipes`, never from a
|
|
1438
|
+
component barrel when implementing portable styling. This seam has no React,
|
|
1439
|
+
Svelte, behavior adapter or chart-engine dependency. Each other Kit exposes its
|
|
1440
|
+
own `/recipes` seam as well; Sync preserves it in source and compiled delivery.
|
|
1441
|
+
|
|
1442
|
+
A host shell that handles Escape must yield events from a modal:
|
|
1443
|
+
|
|
1444
|
+
```ts
|
|
1445
|
+
import { isEventFromModal } from "@reddb-io/design-system/base/interaction";
|
|
1446
|
+
function onKeyDown(event: KeyboardEvent) {
|
|
1447
|
+
if (event.defaultPrevented || isEventFromModal(event)) return;
|
|
1448
|
+
if (event.key === "Escape") closeHost();
|
|
1449
|
+
}
|
|
1450
|
+
```
|
|
1451
|
+
|
|
1452
|
+
Pass `event.nativeEvent` from a React event handler. This permits managed popups
|
|
1453
|
+
to consume Escape before the Dialog, and the Dialog before the host. The modal
|
|
1454
|
+
retains native focus containment and restores its trigger on close.
|
|
1455
|
+
|
|
1456
|
+
## International phone entry
|
|
1457
|
+
|
|
1458
|
+
`PhoneInput` uses country metadata to format national numbers while editing.
|
|
1459
|
+
The country picker shows flags and calling codes, and searches localized names,
|
|
1460
|
+
English names, ISO codes and DDIs. `locale` controls country names; it never
|
|
1461
|
+
infers location. Set `defaultCountry` explicitly (the fallback is `US`) and
|
|
1462
|
+
optionally restrict `countries`. International paste infers the actual country;
|
|
1463
|
+
a pasted number outside the allowlist is retained but blocks submission.
|
|
1464
|
+
|
|
1465
|
+
`value`, `defaultValue`, `onvaluechange` (Svelte), `onValueChange` (React) and
|
|
1466
|
+
the single named `FormData` entry use an **unmasked international string**,
|
|
1467
|
+
for example `+5511999991234`. The plus sign is retained; spaces, parentheses,
|
|
1468
|
+
hyphens and national trunk prefixes are removed. Draft values can be incomplete;
|
|
1469
|
+
native form validation blocks incomplete/unsupported numbers, and `required`
|
|
1470
|
+
blocks empty values. Length/structure checks do not verify number ownership.
|
|
1471
|
+
`help`, `error`, `disabled`, `form`, reset and `controlSize` retain native field
|
|
1472
|
+
semantics. Disabled values are omitted.
|
|
1473
|
+
|
|
1474
|
+
Use `presentation="text"` and optional `sourceLabel` for selectable saved HTML
|
|
1475
|
+
text. The application owns Edit/Save/Cancel and persistence, switching to
|
|
1476
|
+
`presentation="input"` for a draft. See `/kit/phone-input` and
|
|
1477
|
+
`/examples/phone-forms` for both flavors and actual form payloads.
|
|
1478
|
+
|
|
1479
|
+
Import `PhoneInput` from the canonical Base Kit. Its pinned
|
|
1480
|
+
`libphonenumber-js/min` engine and metadata are component-scoped; unrelated
|
|
1481
|
+
components retain their tree-shaking boundary. Flags need no image bundle or
|
|
1482
|
+
external requests. Sync selects `framework: "react"` or `"svelte"`.
|