@nikkory/vibe-engine 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/PUBLISH-GUIDE.md +250 -0
- package/README.md +1267 -0
- package/bin/vibe.js +22 -0
- package/dist/adapters/index.d.ts +19 -0
- package/dist/browser.d.ts +25 -0
- package/dist/browser.js +15083 -0
- package/dist/browser.mjs +15000 -0
- package/dist/cli/batch-command.d.ts +142 -0
- package/dist/cli/generate-command.d.ts +119 -0
- package/dist/cli/index.d.ts +34 -0
- package/dist/constants/ComponentTypes.d.ts +65 -0
- package/dist/constants/DesignSystems.d.ts +64 -0
- package/dist/constants/Frameworks.d.ts +71 -0
- package/dist/constants/Tiers.d.ts +72 -0
- package/dist/constants/index.d.ts +10 -0
- package/dist/converters/index.d.ts +12 -0
- package/dist/converters/section-converter.d.ts +176 -0
- package/dist/index.d.ts +58 -0
- package/dist/index.js +19819 -0
- package/dist/index.mjs +19496 -0
- package/dist/resolution/basic/groups-basic.d.ts +80 -0
- package/dist/resolution/basic/index.d.ts +21 -0
- package/dist/resolution/basic/intents-basic.d.ts +195 -0
- package/dist/resolution/basic/presets-basic.d.ts +96 -0
- package/dist/resolution/basic/resolver-basic.d.ts +127 -0
- package/dist/resolution/basic/shorthands-basic.d.ts +88 -0
- package/dist/resolution/core/groups-core.d.ts +160 -0
- package/dist/resolution/core/index.d.ts +21 -0
- package/dist/resolution/core/intents-core.d.ts +355 -0
- package/dist/resolution/core/presets-core.d.ts +160 -0
- package/dist/resolution/core/resolver-core.d.ts +207 -0
- package/dist/resolution/core/shorthands-core.d.ts +144 -0
- package/dist/resolution/core/types-core.d.ts +167 -0
- package/dist/resolution/debugger.d.ts +183 -0
- package/dist/resolution/demo.d.ts +57 -0
- package/dist/resolution/enterprise/index.d.ts +22 -0
- package/dist/resolution/enterprise/metrics.d.ts +152 -0
- package/dist/resolution/enterprise/resolver-enterprise.d.ts +108 -0
- package/dist/resolution/examples.d.ts +486 -0
- package/dist/resolution/groups/experience-group.d.ts +197 -0
- package/dist/resolution/groups/index.d.ts +196 -0
- package/dist/resolution/groups/layout-group.d.ts +192 -0
- package/dist/resolution/groups/motion-group.d.ts +127 -0
- package/dist/resolution/groups/visual-group.d.ts +146 -0
- package/dist/resolution/index.d.ts +41 -0
- package/dist/resolution/intents/button-intents.d.ts +231 -0
- package/dist/resolution/intents/card-intents.d.ts +177 -0
- package/dist/resolution/intents/feedback-intents.d.ts +222 -0
- package/dist/resolution/intents/index.d.ts +189 -0
- package/dist/resolution/intents/input-intents.d.ts +231 -0
- package/dist/resolution/intents/mood-modifiers.d.ts +154 -0
- package/dist/resolution/performance.d.ts +264 -0
- package/dist/resolution/presets/button-presets.d.ts +243 -0
- package/dist/resolution/presets/card-presets.d.ts +216 -0
- package/dist/resolution/presets/data-display-presets.d.ts +290 -0
- package/dist/resolution/presets/feedback-presets.d.ts +335 -0
- package/dist/resolution/presets/form-presets.d.ts +308 -0
- package/dist/resolution/presets/index.d.ts +22 -0
- package/dist/resolution/presets/input-presets.d.ts +207 -0
- package/dist/resolution/presets/nav-presets.d.ts +235 -0
- package/dist/resolution/presets/overlay-presets.d.ts +216 -0
- package/dist/resolution/presets/preset-registry.d.ts +212 -0
- package/dist/resolution/resolveProps.d.ts +235 -0
- package/dist/resolution/shorthand/feel-mappings.d.ts +140 -0
- package/dist/resolution/shorthand/index.d.ts +172 -0
- package/dist/resolution/shorthand/look-mappings.d.ts +107 -0
- package/dist/resolution/shorthand/spacing-mappings.d.ts +164 -0
- package/dist/resolution/shorthand/surface-mappings.d.ts +139 -0
- package/dist/resolution/standard/groups-standard.d.ts +98 -0
- package/dist/resolution/standard/index.d.ts +28 -0
- package/dist/resolution/standard/intents-standard.d.ts +232 -0
- package/dist/resolution/standard/presets-standard.d.ts +123 -0
- package/dist/resolution/standard/resolver-standard.d.ts +204 -0
- package/dist/resolution/standard/shorthands-standard.d.ts +98 -0
- package/dist/resolution/standard/validators.d.ts +141 -0
- package/dist/resolution/types.d.ts +461 -0
- package/dist/resolution/validators/factor24-validator.d.ts +418 -0
- package/dist/resolution/validators/index.d.ts +14 -0
- package/dist/scripts/generate-react-library.d.ts +15 -0
- package/dist/scripts/write-react-library.d.ts +18 -0
- package/dist/storage/cloud-sync.d.ts +182 -0
- package/dist/storage/index.d.ts +69 -0
- package/dist/storage/local-storage.d.ts +131 -0
- package/dist/storage/section-storage.d.ts +191 -0
- package/dist/styling/StyleGenerator.d.ts +76 -0
- package/dist/styling/TokenStyleResolver.d.ts +163 -0
- package/dist/styling/factor-migration.d.ts +192 -0
- package/dist/styling/factor-validators.d.ts +327 -0
- package/dist/styling/factors-1-6.d.ts +674 -0
- package/dist/styling/factors-12-16.d.ts +700 -0
- package/dist/styling/factors-17-24.d.ts +668 -0
- package/dist/styling/factors-all.d.ts +348 -0
- package/dist/styling/factors.d.ts +291 -0
- package/dist/styling/index.d.ts +31 -0
- package/dist/styling/types.d.ts +400 -0
- package/dist/tokens/schema.d.ts +486 -0
- package/dist/types/Option.d.ts +178 -0
- package/dist/types/Result.d.ts +148 -0
- package/dist/types/algorithm-engine.types.d.ts +298 -0
- package/dist/types/granularity/base.types.d.ts +268 -0
- package/dist/types/granularity/config.types.d.ts +177 -0
- package/dist/types/granularity/factors.types.d.ts +194 -0
- package/dist/types/granularity/index.d.ts +57 -0
- package/dist/types/granularity/slot.types.d.ts +128 -0
- package/dist/types/granularity/template.types.d.ts +179 -0
- package/dist/types/granularity-levels/atom.config.d.ts +151 -0
- package/dist/types/granularity-levels/component.config.d.ts +175 -0
- package/dist/types/granularity-levels/index.d.ts +47 -0
- package/dist/types/granularity-levels/layout.config.d.ts +278 -0
- package/dist/types/granularity-levels/page.config.d.ts +210 -0
- package/dist/types/granularity-levels/section.config.d.ts +188 -0
- package/dist/types/granularity-levels/template.config.d.ts +340 -0
- package/dist/types/index.d.ts +152 -0
- package/dist/types/section-slot.types.d.ts +169 -0
- package/dist/types/section-storage.types.d.ts +298 -0
- package/dist/types/section-template.types.d.ts +170 -0
- package/dist/types/section.types.d.ts +326 -0
- package/dist/ui-studio/ComponentGenerator.d.ts +219 -0
- package/dist/ui-studio/composition/FactorPropagator.d.ts +268 -0
- package/dist/ui-studio/composition/PageGenerator.d.ts +176 -0
- package/dist/ui-studio/composition/SectionGenerator.d.ts +312 -0
- package/dist/ui-studio/composition/SlotResolver.d.ts +295 -0
- package/dist/ui-studio/composition/section-orchestrator.d.ts +306 -0
- package/dist/ui-studio/granularity/FactorCascade.d.ts +328 -0
- package/dist/ui-studio/granularity/GranularityGenerator.d.ts +266 -0
- package/dist/ui-studio/granularity/RecursiveGenerator.d.ts +328 -0
- package/dist/ui-studio/index.d.ts +94 -0
- package/dist/ui-studio/matrix/ClassMapper.d.ts +128 -0
- package/dist/ui-studio/matrix/MatrixResolver.d.ts +203 -0
- package/dist/ui-studio/matrix/types.d.ts +96 -0
- package/dist/ui-studio/presets/IndustryDetector.d.ts +183 -0
- package/dist/ui-studio/presets/component-registry.d.ts +213 -0
- package/dist/ui-studio/presets/factor-registry.d.ts +364 -0
- package/dist/ui-studio/presets/granularity-registry.d.ts +252 -0
- package/dist/ui-studio/presets/index.d.ts +32 -0
- package/dist/ui-studio/presets/industries.d.ts +143 -0
- package/dist/ui-studio/presets/layout-registry.d.ts +21 -0
- package/dist/ui-studio/presets/matrix-groups.d.ts +195 -0
- package/dist/ui-studio/presets/page-registry.d.ts +24 -0
- package/dist/ui-studio/presets/registry.constants.d.ts +69 -0
- package/dist/ui-studio/presets/registry.types.d.ts +166 -0
- package/dist/ui-studio/presets/section-defaults.d.ts +175 -0
- package/dist/ui-studio/presets/section-registry.d.ts +83 -0
- package/dist/ui-studio/presets/section-registry.defaults.d.ts +106 -0
- package/dist/ui-studio/presets/section-registry.helpers.d.ts +112 -0
- package/dist/ui-studio/presets/section-registry.types.d.ts +181 -0
- package/dist/ui-studio/presets/template-registry.d.ts +23 -0
- package/dist/ui-studio/presets/variants.d.ts +1038 -0
- package/dist/ui-studio/registries/components-registry.d.ts +193 -0
- package/dist/ui-studio/registries/design-systems-registry.d.ts +153 -0
- package/dist/ui-studio/registries/factors-registry.d.ts +145 -0
- package/dist/ui-studio/registries/tiers-registry.d.ts +150 -0
- package/dist/ui-studio/resolution/FactorResolver.d.ts +201 -0
- package/dist/ui-studio/templates/TestGenerator.d.ts +55 -0
- package/dist/ui-studio/templates/TierGenerator.d.ts +153 -0
- package/dist/ui-studio/templates/TypesGenerator.d.ts +51 -0
- package/dist/ui-studio/types/granularity/base.types.d.ts +268 -0
- package/dist/ui-studio/types/granularity/config.types.d.ts +177 -0
- package/dist/ui-studio/types/granularity/factors.types.d.ts +194 -0
- package/dist/ui-studio/types/granularity/index.d.ts +57 -0
- package/dist/ui-studio/types/granularity/slot.types.d.ts +128 -0
- package/dist/ui-studio/types/granularity/template.types.d.ts +179 -0
- package/dist/ui-studio/types/granularity-levels/atom.config.d.ts +151 -0
- package/dist/ui-studio/types/granularity-levels/component.config.d.ts +175 -0
- package/dist/ui-studio/types/granularity-levels/index.d.ts +47 -0
- package/dist/ui-studio/types/granularity-levels/layout.config.d.ts +278 -0
- package/dist/ui-studio/types/granularity-levels/page.config.d.ts +210 -0
- package/dist/ui-studio/types/granularity-levels/section.config.d.ts +188 -0
- package/dist/ui-studio/types/granularity-levels/template.config.d.ts +340 -0
- package/dist/ui-studio/types.d.ts +323 -0
- package/dist/utils/CodeUtils.d.ts +103 -0
- package/dist/utils/GenerateComponentValidator.d.ts +35 -0
- package/dist/utils/Logger.d.ts +101 -0
- package/dist/utils/StringUtils.d.ts +120 -0
- package/dist/utils/ValidationUtils.d.ts +71 -0
- package/dist/utils/errors/BaseError.d.ts +23 -0
- package/dist/utils/errors/GenerationError.d.ts +14 -0
- package/dist/utils/errors/TemplateNotFoundError.d.ts +13 -0
- package/dist/utils/errors/ValidationError.d.ts +13 -0
- package/dist/utils/errors/index.d.ts +12 -0
- package/dist/utils/factor-resolver.d.ts +294 -0
- package/dist/utils/granularity-helpers.d.ts +359 -0
- package/dist/utils/index.d.ts +20 -0
- package/dist/utils/performance.d.ts +26 -0
- package/dist/utils/stringify.d.ts +28 -0
- package/dist/validators/component-validator.d.ts +86 -0
- package/dist/validators/design-system-validator.d.ts +95 -0
- package/dist/validators/factor-validator.d.ts +101 -0
- package/dist/validators/index.d.ts +263 -0
- package/dist/validators/section-validator.d.ts +120 -0
- package/dist/validators/slot-validator.d.ts +161 -0
- package/dist/validators/tier-validator.d.ts +102 -0
- package/package.json +67 -0
- package/tests/16-factor-integration.test.d.ts +14 -0
- package/tests/16-factor-visual.test.d.ts +14 -0
- package/tests/5-level-integration.test.d.ts +14 -0
- package/tests/CodeUtils.test.d.ts +7 -0
- package/tests/DesignSystems.test.d.ts +7 -0
- package/tests/GenerateComponentValidator.test.d.ts +7 -0
- package/tests/Logger.test.d.ts +7 -0
- package/tests/StringUtils.test.d.ts +7 -0
- package/tests/StyleGenerator.test.d.ts +13 -0
- package/tests/Tiers.test.d.ts +7 -0
- package/tests/TokenRegistry.test.d.ts +14 -0
- package/tests/TokenStyleResolver.test.d.ts +13 -0
- package/tests/ValidationUtils.test.d.ts +7 -0
- package/tests/_pending_fix/Accordion.test.d.ts +13 -0
- package/tests/_pending_fix/Alert.test.d.ts +13 -0
- package/tests/_pending_fix/AlertDialog.test.d.ts +13 -0
- package/tests/_pending_fix/AspectRatio.test.d.ts +13 -0
- package/tests/_pending_fix/Autocomplete.test.d.ts +13 -0
- package/tests/_pending_fix/Avatar.test.d.ts +13 -0
- package/tests/_pending_fix/Badge.test.d.ts +13 -0
- package/tests/_pending_fix/Banner.test.d.ts +13 -0
- package/tests/_pending_fix/Box.test.d.ts +13 -0
- package/tests/_pending_fix/Breadcrumb.test.d.ts +13 -0
- package/tests/_pending_fix/Callout.test.d.ts +13 -0
- package/tests/_pending_fix/Card.test.d.ts +13 -0
- package/tests/_pending_fix/Center.test.d.ts +13 -0
- package/tests/_pending_fix/Checkbox.test.d.ts +13 -0
- package/tests/_pending_fix/Chip.test.d.ts +13 -0
- package/tests/_pending_fix/ColorPicker.test.d.ts +13 -0
- package/tests/_pending_fix/Combobox.test.d.ts +13 -0
- package/tests/_pending_fix/CommandPalette.test.d.ts +13 -0
- package/tests/_pending_fix/ConfirmationModal.test.d.ts +13 -0
- package/tests/_pending_fix/Container.test.d.ts +13 -0
- package/tests/_pending_fix/DataTable.test.d.ts +13 -0
- package/tests/_pending_fix/DatePicker.test.d.ts +13 -0
- package/tests/_pending_fix/DateRangePicker.test.d.ts +13 -0
- package/tests/_pending_fix/DateTimePicker.test.d.ts +13 -0
- package/tests/_pending_fix/Divider.test.d.ts +13 -0
- package/tests/_pending_fix/Drawer.test.d.ts +13 -0
- package/tests/_pending_fix/Dropdown.test.d.ts +13 -0
- package/tests/_pending_fix/EmptyState.test.d.ts +13 -0
- package/tests/_pending_fix/ErrorState.test.d.ts +13 -0
- package/tests/_pending_fix/FileDropzone.test.d.ts +13 -0
- package/tests/_pending_fix/FileUpload.test.d.ts +13 -0
- package/tests/_pending_fix/Flex.test.d.ts +13 -0
- package/tests/_pending_fix/Grid.test.d.ts +13 -0
- package/tests/_pending_fix/GridItem.test.d.ts +13 -0
- package/tests/_pending_fix/HStack.test.d.ts +13 -0
- package/tests/_pending_fix/Input.test.d.ts +13 -0
- package/tests/_pending_fix/InputCurrency.test.d.ts +13 -0
- package/tests/_pending_fix/InputGroup.test.d.ts +13 -0
- package/tests/_pending_fix/InputOTP.test.d.ts +13 -0
- package/tests/_pending_fix/InputPassword.test.d.ts +13 -0
- package/tests/_pending_fix/InputPhone.test.d.ts +13 -0
- package/tests/_pending_fix/InputSearch.test.d.ts +13 -0
- package/tests/_pending_fix/Link.test.d.ts +13 -0
- package/tests/_pending_fix/List.test.d.ts +13 -0
- package/tests/_pending_fix/LoadingOverlay.test.d.ts +13 -0
- package/tests/_pending_fix/Menu.test.d.ts +13 -0
- package/tests/_pending_fix/Modal.test.d.ts +13 -0
- package/tests/_pending_fix/MultiSelect.test.d.ts +13 -0
- package/tests/_pending_fix/NavGroup.test.d.ts +13 -0
- package/tests/_pending_fix/NavItem.test.d.ts +13 -0
- package/tests/_pending_fix/NavLink.test.d.ts +13 -0
- package/tests/_pending_fix/Navbar.test.d.ts +13 -0
- package/tests/_pending_fix/Notification.test.d.ts +13 -0
- package/tests/_pending_fix/NotificationBadge.test.d.ts +13 -0
- package/tests/_pending_fix/NumberInput.test.d.ts +13 -0
- package/tests/_pending_fix/Pagination.test.d.ts +13 -0
- package/tests/_pending_fix/Popover.test.d.ts +13 -0
- package/tests/_pending_fix/Progress.test.d.ts +13 -0
- package/tests/_pending_fix/ProgressCircle.test.d.ts +13 -0
- package/tests/_pending_fix/ProgressSteps.test.d.ts +13 -0
- package/tests/_pending_fix/Radio.test.d.ts +13 -0
- package/tests/_pending_fix/RangeSlider.test.d.ts +13 -0
- package/tests/_pending_fix/ResizablePanel.test.d.ts +13 -0
- package/tests/_pending_fix/ResultState.test.d.ts +13 -0
- package/tests/_pending_fix/ScrollArea.test.d.ts +13 -0
- package/tests/_pending_fix/Select.test.d.ts +14 -0
- package/tests/_pending_fix/Sheet.test.d.ts +13 -0
- package/tests/_pending_fix/Sidebar.test.d.ts +13 -0
- package/tests/_pending_fix/SimpleGrid.test.d.ts +13 -0
- package/tests/_pending_fix/Skeleton.test.d.ts +13 -0
- package/tests/_pending_fix/Slider.test.d.ts +13 -0
- package/tests/_pending_fix/Spacer.test.d.ts +13 -0
- package/tests/_pending_fix/Spinner.test.d.ts +13 -0
- package/tests/_pending_fix/Stack.test.d.ts +13 -0
- package/tests/_pending_fix/Stat.test.d.ts +13 -0
- package/tests/_pending_fix/Stepper.test.d.ts +14 -0
- package/tests/_pending_fix/Switch.test.d.ts +13 -0
- package/tests/_pending_fix/Table.test.d.ts +13 -0
- package/tests/_pending_fix/Tabs.test.d.ts +13 -0
- package/tests/_pending_fix/Textarea.test.d.ts +13 -0
- package/tests/_pending_fix/Timeline.test.d.ts +13 -0
- package/tests/_pending_fix/Toast.test.d.ts +14 -0
- package/tests/_pending_fix/Tooltip.test.d.ts +14 -0
- package/tests/_pending_fix/VStack.test.d.ts +13 -0
- package/tests/alert.test.d.ts +13 -0
- package/tests/badge.test.d.ts +13 -0
- package/tests/benchmarks/factor-resolution.bench.d.ts +41 -0
- package/tests/button.test.d.ts +16 -0
- package/tests/card.test.d.ts +19 -0
- package/tests/checkbox.test.d.ts +13 -0
- package/tests/component-16-factor-types.test.d.ts +13 -0
- package/tests/component-5level-integration.test.d.ts +14 -0
- package/tests/component-registry-ui.test.d.ts +13 -0
- package/tests/e2e/16-factor-visual.test.d.ts +14 -0
- package/tests/edge-cases.test.d.ts +14 -0
- package/tests/factor-17-24-integration.test.d.ts +14 -0
- package/tests/factor-17-24-performance.test.d.ts +14 -0
- package/tests/factor-validators.test.d.ts +13 -0
- package/tests/factors-1-6.test.d.ts +13 -0
- package/tests/factors-12-16.test.d.ts +13 -0
- package/tests/factors-17-24.test.d.ts +21 -0
- package/tests/factors-all.test.d.ts +13 -0
- package/tests/factors-registry.test.d.ts +11 -0
- package/tests/factors.test.d.ts +13 -0
- package/tests/granularity-types.test.d.ts +18 -0
- package/tests/groups.test.d.ts +14 -0
- package/tests/input.test.d.ts +16 -0
- package/tests/intents.test.d.ts +14 -0
- package/tests/memory-leak.test.d.ts +14 -0
- package/tests/modal.test.d.ts +19 -0
- package/tests/presets.test.d.ts +14 -0
- package/tests/radio.test.d.ts +13 -0
- package/tests/resolution-intents.test.d.ts +13 -0
- package/tests/resolution-presets.test.d.ts +13 -0
- package/tests/resolveProps.test.d.ts +14 -0
- package/tests/section-integration.test.d.ts +16 -0
- package/tests/section-types.test.d.ts +11 -0
- package/tests/setup.d.ts +13 -0
- package/tests/shorthands.test.d.ts +14 -0
- package/tests/switch.test.d.ts +13 -0
- package/tests/tabs.test.d.ts +13 -0
- package/tests/tiers-registry.test.d.ts +11 -0
- package/tests/useComponentStyles.test.d.ts +11 -0
- package/tests/useFactors.test.d.ts +13 -0
- package/tests/validators-invalid-input.test.d.ts +13 -0
- package/tsup.config.d.ts +11 -0
- package/vitest.config.d.ts +3 -0
|
@@ -0,0 +1,1038 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nikkory Vibe - 16-Factor Variant System
|
|
3
|
+
*
|
|
4
|
+
* Each component is built from a base structure + 16 customizable factors.
|
|
5
|
+
* Change any factor → instant new UI variation.
|
|
6
|
+
*
|
|
7
|
+
* Factors 1-10: Original system
|
|
8
|
+
* Factors 11-16: Extended system (Position+, Alignment, Orientation, Density, Loading, Responsive)
|
|
9
|
+
*
|
|
10
|
+
* @packageDocumentation
|
|
11
|
+
* Powered by Nikkory
|
|
12
|
+
*/
|
|
13
|
+
export declare const COLORS: {
|
|
14
|
+
readonly primary: "blue";
|
|
15
|
+
readonly secondary: "purple";
|
|
16
|
+
readonly success: "green";
|
|
17
|
+
readonly warning: "yellow";
|
|
18
|
+
readonly error: "red";
|
|
19
|
+
readonly info: "cyan";
|
|
20
|
+
readonly red: "red";
|
|
21
|
+
readonly orange: "orange";
|
|
22
|
+
readonly amber: "amber";
|
|
23
|
+
readonly yellow: "yellow";
|
|
24
|
+
readonly lime: "lime";
|
|
25
|
+
readonly green: "green";
|
|
26
|
+
readonly emerald: "emerald";
|
|
27
|
+
readonly teal: "teal";
|
|
28
|
+
readonly cyan: "cyan";
|
|
29
|
+
readonly sky: "sky";
|
|
30
|
+
readonly blue: "blue";
|
|
31
|
+
readonly indigo: "indigo";
|
|
32
|
+
readonly violet: "violet";
|
|
33
|
+
readonly purple: "purple";
|
|
34
|
+
readonly fuchsia: "fuchsia";
|
|
35
|
+
readonly pink: "pink";
|
|
36
|
+
readonly rose: "rose";
|
|
37
|
+
readonly slate: "slate";
|
|
38
|
+
readonly gray: "gray";
|
|
39
|
+
readonly zinc: "zinc";
|
|
40
|
+
readonly neutral: "neutral";
|
|
41
|
+
readonly stone: "stone";
|
|
42
|
+
};
|
|
43
|
+
export type Color = keyof typeof COLORS;
|
|
44
|
+
export declare const colorVariants: {
|
|
45
|
+
solid: (color: Color) => string;
|
|
46
|
+
outline: (color: Color) => string;
|
|
47
|
+
ghost: (color: Color) => string;
|
|
48
|
+
soft: (color: Color) => string;
|
|
49
|
+
link: (color: Color) => string;
|
|
50
|
+
};
|
|
51
|
+
export declare const SIZES: {
|
|
52
|
+
readonly xs: "xs";
|
|
53
|
+
readonly sm: "sm";
|
|
54
|
+
readonly md: "md";
|
|
55
|
+
readonly lg: "lg";
|
|
56
|
+
readonly xl: "xl";
|
|
57
|
+
readonly '2xl': "2xl";
|
|
58
|
+
};
|
|
59
|
+
export type Size = keyof typeof SIZES;
|
|
60
|
+
export declare const sizeVariants: {
|
|
61
|
+
button: {
|
|
62
|
+
xs: string;
|
|
63
|
+
sm: string;
|
|
64
|
+
md: string;
|
|
65
|
+
lg: string;
|
|
66
|
+
xl: string;
|
|
67
|
+
'2xl': string;
|
|
68
|
+
};
|
|
69
|
+
input: {
|
|
70
|
+
xs: string;
|
|
71
|
+
sm: string;
|
|
72
|
+
md: string;
|
|
73
|
+
lg: string;
|
|
74
|
+
xl: string;
|
|
75
|
+
'2xl': string;
|
|
76
|
+
};
|
|
77
|
+
icon: {
|
|
78
|
+
xs: string;
|
|
79
|
+
sm: string;
|
|
80
|
+
md: string;
|
|
81
|
+
lg: string;
|
|
82
|
+
xl: string;
|
|
83
|
+
'2xl': string;
|
|
84
|
+
};
|
|
85
|
+
avatar: {
|
|
86
|
+
xs: string;
|
|
87
|
+
sm: string;
|
|
88
|
+
md: string;
|
|
89
|
+
lg: string;
|
|
90
|
+
xl: string;
|
|
91
|
+
'2xl': string;
|
|
92
|
+
};
|
|
93
|
+
padding: {
|
|
94
|
+
xs: string;
|
|
95
|
+
sm: string;
|
|
96
|
+
md: string;
|
|
97
|
+
lg: string;
|
|
98
|
+
xl: string;
|
|
99
|
+
'2xl': string;
|
|
100
|
+
};
|
|
101
|
+
gap: {
|
|
102
|
+
xs: string;
|
|
103
|
+
sm: string;
|
|
104
|
+
md: string;
|
|
105
|
+
lg: string;
|
|
106
|
+
xl: string;
|
|
107
|
+
'2xl': string;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
export declare const VARIANTS: {
|
|
111
|
+
readonly solid: "solid";
|
|
112
|
+
readonly outline: "outline";
|
|
113
|
+
readonly ghost: "ghost";
|
|
114
|
+
readonly soft: "soft";
|
|
115
|
+
readonly link: "link";
|
|
116
|
+
};
|
|
117
|
+
export type Variant = keyof typeof VARIANTS;
|
|
118
|
+
export declare const SHAPES: {
|
|
119
|
+
readonly square: "rounded-none";
|
|
120
|
+
readonly rounded: "rounded-md";
|
|
121
|
+
readonly pill: "rounded-full";
|
|
122
|
+
readonly circle: "rounded-full aspect-square";
|
|
123
|
+
};
|
|
124
|
+
export type Shape = keyof typeof SHAPES;
|
|
125
|
+
export declare const POSITIONS: {
|
|
126
|
+
readonly left: "left";
|
|
127
|
+
readonly center: "center";
|
|
128
|
+
readonly right: "right";
|
|
129
|
+
readonly top: "top";
|
|
130
|
+
readonly middle: "middle";
|
|
131
|
+
readonly bottom: "bottom";
|
|
132
|
+
readonly 'top-left': "top-left";
|
|
133
|
+
readonly 'top-center': "top-center";
|
|
134
|
+
readonly 'top-right': "top-right";
|
|
135
|
+
readonly 'bottom-left': "bottom-left";
|
|
136
|
+
readonly 'bottom-center': "bottom-center";
|
|
137
|
+
readonly 'bottom-right': "bottom-right";
|
|
138
|
+
readonly 'left-start': "left-start";
|
|
139
|
+
readonly 'left-center': "left-center";
|
|
140
|
+
readonly 'left-end': "left-end";
|
|
141
|
+
readonly 'right-start': "right-start";
|
|
142
|
+
readonly 'right-center': "right-center";
|
|
143
|
+
readonly 'right-end': "right-end";
|
|
144
|
+
readonly 'top-start': "top-start";
|
|
145
|
+
readonly 'top-end': "top-end";
|
|
146
|
+
readonly 'bottom-start': "bottom-start";
|
|
147
|
+
readonly 'bottom-end': "bottom-end";
|
|
148
|
+
};
|
|
149
|
+
export type Position = keyof typeof POSITIONS;
|
|
150
|
+
/**
|
|
151
|
+
* Position-specific classes for different component types.
|
|
152
|
+
* Each component type uses positions differently based on its layout needs.
|
|
153
|
+
*/
|
|
154
|
+
export declare const positionVariants: {
|
|
155
|
+
/** Tooltip positioning relative to trigger element */
|
|
156
|
+
tooltip: {
|
|
157
|
+
top: string;
|
|
158
|
+
'top-start': string;
|
|
159
|
+
'top-center': string;
|
|
160
|
+
'top-end': string;
|
|
161
|
+
bottom: string;
|
|
162
|
+
'bottom-start': string;
|
|
163
|
+
'bottom-center': string;
|
|
164
|
+
'bottom-end': string;
|
|
165
|
+
left: string;
|
|
166
|
+
'left-start': string;
|
|
167
|
+
'left-center': string;
|
|
168
|
+
'left-end': string;
|
|
169
|
+
right: string;
|
|
170
|
+
'right-start': string;
|
|
171
|
+
'right-center': string;
|
|
172
|
+
'right-end': string;
|
|
173
|
+
};
|
|
174
|
+
/** Popover positioning (similar to tooltip but larger content) */
|
|
175
|
+
popover: {
|
|
176
|
+
top: string;
|
|
177
|
+
'top-start': string;
|
|
178
|
+
'top-center': string;
|
|
179
|
+
'top-end': string;
|
|
180
|
+
bottom: string;
|
|
181
|
+
'bottom-start': string;
|
|
182
|
+
'bottom-center': string;
|
|
183
|
+
'bottom-end': string;
|
|
184
|
+
left: string;
|
|
185
|
+
'left-start': string;
|
|
186
|
+
'left-center': string;
|
|
187
|
+
'left-end': string;
|
|
188
|
+
right: string;
|
|
189
|
+
'right-start': string;
|
|
190
|
+
'right-center': string;
|
|
191
|
+
'right-end': string;
|
|
192
|
+
};
|
|
193
|
+
/** Dropdown menu positioning */
|
|
194
|
+
dropdown: {
|
|
195
|
+
'bottom-start': string;
|
|
196
|
+
'bottom-end': string;
|
|
197
|
+
'bottom-center': string;
|
|
198
|
+
'top-start': string;
|
|
199
|
+
'top-end': string;
|
|
200
|
+
'top-center': string;
|
|
201
|
+
};
|
|
202
|
+
/** Toast notification positioning (fixed to viewport) */
|
|
203
|
+
toast: {
|
|
204
|
+
'top-left': string;
|
|
205
|
+
'top-center': string;
|
|
206
|
+
'top-right': string;
|
|
207
|
+
'bottom-left': string;
|
|
208
|
+
'bottom-center': string;
|
|
209
|
+
'bottom-right': string;
|
|
210
|
+
};
|
|
211
|
+
/** Modal dialog positioning */
|
|
212
|
+
modal: {
|
|
213
|
+
center: string;
|
|
214
|
+
top: string;
|
|
215
|
+
bottom: string;
|
|
216
|
+
};
|
|
217
|
+
/** Drawer/Sidebar positioning */
|
|
218
|
+
drawer: {
|
|
219
|
+
left: string;
|
|
220
|
+
right: string;
|
|
221
|
+
top: string;
|
|
222
|
+
bottom: string;
|
|
223
|
+
};
|
|
224
|
+
/** Text/content alignment */
|
|
225
|
+
align: {
|
|
226
|
+
left: string;
|
|
227
|
+
center: string;
|
|
228
|
+
right: string;
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
export declare const ICON_POSITIONS: {
|
|
232
|
+
readonly none: "none";
|
|
233
|
+
readonly left: "left";
|
|
234
|
+
readonly right: "right";
|
|
235
|
+
readonly both: "both";
|
|
236
|
+
readonly only: "only";
|
|
237
|
+
};
|
|
238
|
+
export type IconPosition = keyof typeof ICON_POSITIONS;
|
|
239
|
+
export declare const STATES: {
|
|
240
|
+
readonly default: "default";
|
|
241
|
+
readonly hover: "hover";
|
|
242
|
+
readonly focus: "focus";
|
|
243
|
+
readonly active: "active";
|
|
244
|
+
readonly disabled: "disabled";
|
|
245
|
+
readonly loading: "loading";
|
|
246
|
+
readonly error: "error";
|
|
247
|
+
readonly success: "success";
|
|
248
|
+
};
|
|
249
|
+
export type State = keyof typeof STATES;
|
|
250
|
+
export declare const stateVariants: {
|
|
251
|
+
disabled: string;
|
|
252
|
+
loading: string;
|
|
253
|
+
error: string;
|
|
254
|
+
success: string;
|
|
255
|
+
};
|
|
256
|
+
export declare const ANIMATIONS: {
|
|
257
|
+
readonly none: "";
|
|
258
|
+
readonly subtle: "transition-all duration-150 ease-out";
|
|
259
|
+
readonly standard: "transition-all duration-200 ease-in-out";
|
|
260
|
+
readonly smooth: "transition-all duration-300 ease-out";
|
|
261
|
+
readonly bounce: "transition-all duration-200 ease-out hover:scale-105 active:scale-95";
|
|
262
|
+
readonly pulse: "animate-pulse";
|
|
263
|
+
readonly spin: "animate-spin";
|
|
264
|
+
readonly ping: "animate-ping";
|
|
265
|
+
};
|
|
266
|
+
export type Animation = keyof typeof ANIMATIONS;
|
|
267
|
+
export declare const enterAnimations: {
|
|
268
|
+
fade: {
|
|
269
|
+
initial: string;
|
|
270
|
+
animate: string;
|
|
271
|
+
};
|
|
272
|
+
scale: {
|
|
273
|
+
initial: string;
|
|
274
|
+
animate: string;
|
|
275
|
+
};
|
|
276
|
+
slideUp: {
|
|
277
|
+
initial: string;
|
|
278
|
+
animate: string;
|
|
279
|
+
};
|
|
280
|
+
slideDown: {
|
|
281
|
+
initial: string;
|
|
282
|
+
animate: string;
|
|
283
|
+
};
|
|
284
|
+
slideLeft: {
|
|
285
|
+
initial: string;
|
|
286
|
+
animate: string;
|
|
287
|
+
};
|
|
288
|
+
slideRight: {
|
|
289
|
+
initial: string;
|
|
290
|
+
animate: string;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
export declare const ELEVATIONS: {
|
|
294
|
+
readonly none: "";
|
|
295
|
+
readonly xs: "shadow-xs";
|
|
296
|
+
readonly sm: "shadow-sm";
|
|
297
|
+
readonly md: "shadow-md";
|
|
298
|
+
readonly lg: "shadow-lg";
|
|
299
|
+
readonly xl: "shadow-xl";
|
|
300
|
+
readonly '2xl': "shadow-2xl";
|
|
301
|
+
readonly inner: "shadow-inner";
|
|
302
|
+
readonly glow: (color: Color) => string;
|
|
303
|
+
};
|
|
304
|
+
export type Elevation = keyof Omit<typeof ELEVATIONS, 'glow'> | 'glow';
|
|
305
|
+
export declare const A11Y_LEVELS: {
|
|
306
|
+
readonly standard: "standard";
|
|
307
|
+
readonly enhanced: "enhanced";
|
|
308
|
+
readonly maximum: "maximum";
|
|
309
|
+
};
|
|
310
|
+
export type A11yLevel = keyof typeof A11Y_LEVELS;
|
|
311
|
+
export declare const a11yVariants: {
|
|
312
|
+
focusRing: {
|
|
313
|
+
standard: string;
|
|
314
|
+
enhanced: string;
|
|
315
|
+
maximum: string;
|
|
316
|
+
};
|
|
317
|
+
contrast: {
|
|
318
|
+
standard: string;
|
|
319
|
+
enhanced: string;
|
|
320
|
+
maximum: string;
|
|
321
|
+
};
|
|
322
|
+
motion: {
|
|
323
|
+
standard: string;
|
|
324
|
+
enhanced: string;
|
|
325
|
+
maximum: string;
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Alignment values for flex/grid layouts.
|
|
330
|
+
* Used for both main axis (justify) and cross axis (items) alignment.
|
|
331
|
+
*/
|
|
332
|
+
export declare const ALIGNMENTS: {
|
|
333
|
+
readonly start: "start";
|
|
334
|
+
readonly center: "center";
|
|
335
|
+
readonly end: "end";
|
|
336
|
+
readonly between: "between";
|
|
337
|
+
readonly around: "around";
|
|
338
|
+
readonly evenly: "evenly";
|
|
339
|
+
readonly stretch: "stretch";
|
|
340
|
+
readonly baseline: "baseline";
|
|
341
|
+
};
|
|
342
|
+
export type Alignment = keyof typeof ALIGNMENTS;
|
|
343
|
+
/**
|
|
344
|
+
* Alignment classes for different layout contexts.
|
|
345
|
+
*/
|
|
346
|
+
export declare const alignmentVariants: {
|
|
347
|
+
/** Flex justify-content */
|
|
348
|
+
justify: {
|
|
349
|
+
start: string;
|
|
350
|
+
center: string;
|
|
351
|
+
end: string;
|
|
352
|
+
between: string;
|
|
353
|
+
around: string;
|
|
354
|
+
evenly: string;
|
|
355
|
+
};
|
|
356
|
+
/** Flex align-items */
|
|
357
|
+
items: {
|
|
358
|
+
start: string;
|
|
359
|
+
center: string;
|
|
360
|
+
end: string;
|
|
361
|
+
stretch: string;
|
|
362
|
+
baseline: string;
|
|
363
|
+
};
|
|
364
|
+
/** Text alignment */
|
|
365
|
+
text: {
|
|
366
|
+
start: string;
|
|
367
|
+
center: string;
|
|
368
|
+
end: string;
|
|
369
|
+
};
|
|
370
|
+
/** Self alignment (for individual flex/grid items) */
|
|
371
|
+
self: {
|
|
372
|
+
start: string;
|
|
373
|
+
center: string;
|
|
374
|
+
end: string;
|
|
375
|
+
stretch: string;
|
|
376
|
+
};
|
|
377
|
+
/** Content alignment (for multi-line flex containers) */
|
|
378
|
+
content: {
|
|
379
|
+
start: string;
|
|
380
|
+
center: string;
|
|
381
|
+
end: string;
|
|
382
|
+
between: string;
|
|
383
|
+
around: string;
|
|
384
|
+
evenly: string;
|
|
385
|
+
stretch: string;
|
|
386
|
+
};
|
|
387
|
+
/** Place alignment (combined justify + items) */
|
|
388
|
+
place: {
|
|
389
|
+
start: string;
|
|
390
|
+
center: string;
|
|
391
|
+
end: string;
|
|
392
|
+
stretch: string;
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
/**
|
|
396
|
+
* Build alignment classes for flex/grid layouts.
|
|
397
|
+
*
|
|
398
|
+
* @param justify - Main axis alignment (justify-content)
|
|
399
|
+
* @param items - Cross axis alignment (align-items)
|
|
400
|
+
* @returns Combined Tailwind classes
|
|
401
|
+
*
|
|
402
|
+
* @example
|
|
403
|
+
* ```typescript
|
|
404
|
+
* buildAlignmentClasses('center', 'center')
|
|
405
|
+
* // Returns: 'justify-center items-center'
|
|
406
|
+
*
|
|
407
|
+
* buildAlignmentClasses('between')
|
|
408
|
+
* // Returns: 'justify-between'
|
|
409
|
+
* ```
|
|
410
|
+
*/
|
|
411
|
+
export declare function buildAlignmentClasses(justify?: Alignment, items?: Alignment): string;
|
|
412
|
+
/**
|
|
413
|
+
* Layout orientation for directional components.
|
|
414
|
+
*/
|
|
415
|
+
export declare const ORIENTATIONS: {
|
|
416
|
+
readonly horizontal: "horizontal";
|
|
417
|
+
readonly vertical: "vertical";
|
|
418
|
+
};
|
|
419
|
+
export type Orientation = keyof typeof ORIENTATIONS;
|
|
420
|
+
/**
|
|
421
|
+
* Orientation-specific classes for different component types.
|
|
422
|
+
*/
|
|
423
|
+
export declare const orientationVariants: {
|
|
424
|
+
/** Basic flex direction */
|
|
425
|
+
flex: {
|
|
426
|
+
horizontal: string;
|
|
427
|
+
vertical: string;
|
|
428
|
+
};
|
|
429
|
+
/** Stack components (flex with explicit display) */
|
|
430
|
+
stack: {
|
|
431
|
+
horizontal: string;
|
|
432
|
+
vertical: string;
|
|
433
|
+
};
|
|
434
|
+
/** Tabs component orientation */
|
|
435
|
+
tabs: {
|
|
436
|
+
horizontal: string;
|
|
437
|
+
vertical: string;
|
|
438
|
+
};
|
|
439
|
+
/** Divider/separator orientation */
|
|
440
|
+
divider: {
|
|
441
|
+
horizontal: string;
|
|
442
|
+
vertical: string;
|
|
443
|
+
};
|
|
444
|
+
/** Stepper component orientation */
|
|
445
|
+
stepper: {
|
|
446
|
+
horizontal: string;
|
|
447
|
+
vertical: string;
|
|
448
|
+
};
|
|
449
|
+
/** Button group orientation */
|
|
450
|
+
buttonGroup: {
|
|
451
|
+
horizontal: string;
|
|
452
|
+
vertical: string;
|
|
453
|
+
};
|
|
454
|
+
/** Radio/Checkbox group orientation */
|
|
455
|
+
group: {
|
|
456
|
+
horizontal: string;
|
|
457
|
+
vertical: string;
|
|
458
|
+
};
|
|
459
|
+
/** List orientation */
|
|
460
|
+
list: {
|
|
461
|
+
horizontal: string;
|
|
462
|
+
vertical: string;
|
|
463
|
+
};
|
|
464
|
+
/** Slider/range orientation */
|
|
465
|
+
slider: {
|
|
466
|
+
horizontal: string;
|
|
467
|
+
vertical: string;
|
|
468
|
+
};
|
|
469
|
+
/** Toolbar orientation */
|
|
470
|
+
toolbar: {
|
|
471
|
+
horizontal: string;
|
|
472
|
+
vertical: string;
|
|
473
|
+
};
|
|
474
|
+
/** Navigation menu orientation */
|
|
475
|
+
nav: {
|
|
476
|
+
horizontal: string;
|
|
477
|
+
vertical: string;
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
/**
|
|
481
|
+
* Build orientation classes for a specific component type.
|
|
482
|
+
*
|
|
483
|
+
* @param component - The component type
|
|
484
|
+
* @param orientation - The orientation ('horizontal' or 'vertical')
|
|
485
|
+
* @returns Tailwind classes for the specified orientation
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* ```typescript
|
|
489
|
+
* buildOrientationClasses('tabs', 'vertical')
|
|
490
|
+
* // Returns: 'flex-col border-r'
|
|
491
|
+
*
|
|
492
|
+
* buildOrientationClasses('buttonGroup', 'horizontal')
|
|
493
|
+
* // Returns: 'flex flex-row [&>*:first-child]:rounded-r-none ...'
|
|
494
|
+
* ```
|
|
495
|
+
*/
|
|
496
|
+
export declare function buildOrientationClasses(component: keyof typeof orientationVariants, orientation?: Orientation): string;
|
|
497
|
+
export interface VariantConfig {
|
|
498
|
+
color?: Color;
|
|
499
|
+
size?: Size;
|
|
500
|
+
variant?: Variant;
|
|
501
|
+
shape?: Shape;
|
|
502
|
+
position?: Position;
|
|
503
|
+
iconPosition?: IconPosition;
|
|
504
|
+
state?: State;
|
|
505
|
+
animation?: Animation;
|
|
506
|
+
elevation?: Elevation;
|
|
507
|
+
a11y?: A11yLevel;
|
|
508
|
+
alignment?: Alignment;
|
|
509
|
+
justifyContent?: Alignment;
|
|
510
|
+
alignItems?: Alignment;
|
|
511
|
+
orientation?: Orientation;
|
|
512
|
+
density?: Density;
|
|
513
|
+
loadingState?: LoadingState;
|
|
514
|
+
responsive?: ResponsiveConfig;
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Build component classes from variant config.
|
|
518
|
+
* Supports all 16 factors for maximum customization.
|
|
519
|
+
*
|
|
520
|
+
* @param component - The component type ('button', 'input', 'avatar')
|
|
521
|
+
* @param config - Configuration object with any of the 16 factors
|
|
522
|
+
* @returns Combined Tailwind class string
|
|
523
|
+
*
|
|
524
|
+
* @example
|
|
525
|
+
* ```typescript
|
|
526
|
+
* const classes = buildVariants('button', {
|
|
527
|
+
* color: 'blue',
|
|
528
|
+
* size: 'md',
|
|
529
|
+
* variant: 'solid',
|
|
530
|
+
* shape: 'rounded',
|
|
531
|
+
* animation: 'bounce',
|
|
532
|
+
* density: 'comfortable',
|
|
533
|
+
* loadingState: 'idle',
|
|
534
|
+
* });
|
|
535
|
+
* ```
|
|
536
|
+
*/
|
|
537
|
+
export declare function buildVariants(component: 'button' | 'input' | 'avatar', config: VariantConfig): string;
|
|
538
|
+
export declare const PRESETS: {
|
|
539
|
+
'button-primary': {
|
|
540
|
+
color: Color;
|
|
541
|
+
size: Size;
|
|
542
|
+
variant: Variant;
|
|
543
|
+
shape: Shape;
|
|
544
|
+
animation: Animation;
|
|
545
|
+
elevation: Elevation;
|
|
546
|
+
a11y: A11yLevel;
|
|
547
|
+
};
|
|
548
|
+
'button-secondary': {
|
|
549
|
+
color: Color;
|
|
550
|
+
size: Size;
|
|
551
|
+
variant: Variant;
|
|
552
|
+
shape: Shape;
|
|
553
|
+
animation: Animation;
|
|
554
|
+
elevation: Elevation;
|
|
555
|
+
a11y: A11yLevel;
|
|
556
|
+
};
|
|
557
|
+
'button-danger': {
|
|
558
|
+
color: Color;
|
|
559
|
+
size: Size;
|
|
560
|
+
variant: Variant;
|
|
561
|
+
shape: Shape;
|
|
562
|
+
animation: Animation;
|
|
563
|
+
elevation: Elevation;
|
|
564
|
+
a11y: A11yLevel;
|
|
565
|
+
};
|
|
566
|
+
'button-ghost': {
|
|
567
|
+
color: Color;
|
|
568
|
+
size: Size;
|
|
569
|
+
variant: Variant;
|
|
570
|
+
shape: Shape;
|
|
571
|
+
animation: Animation;
|
|
572
|
+
elevation: Elevation;
|
|
573
|
+
a11y: A11yLevel;
|
|
574
|
+
};
|
|
575
|
+
'button-pill': {
|
|
576
|
+
color: Color;
|
|
577
|
+
size: Size;
|
|
578
|
+
variant: Variant;
|
|
579
|
+
shape: Shape;
|
|
580
|
+
animation: Animation;
|
|
581
|
+
elevation: Elevation;
|
|
582
|
+
a11y: A11yLevel;
|
|
583
|
+
};
|
|
584
|
+
'toast-success': {
|
|
585
|
+
color: Color;
|
|
586
|
+
position: Position;
|
|
587
|
+
animation: Animation;
|
|
588
|
+
elevation: Elevation;
|
|
589
|
+
};
|
|
590
|
+
'toast-error': {
|
|
591
|
+
color: Color;
|
|
592
|
+
position: Position;
|
|
593
|
+
animation: Animation;
|
|
594
|
+
elevation: Elevation;
|
|
595
|
+
};
|
|
596
|
+
'toast-center': {
|
|
597
|
+
color: Color;
|
|
598
|
+
position: Position;
|
|
599
|
+
animation: Animation;
|
|
600
|
+
elevation: Elevation;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
export type PresetName = keyof typeof PRESETS;
|
|
604
|
+
/**
|
|
605
|
+
* Density levels control spacing and padding throughout components.
|
|
606
|
+
* Use compact for data-dense UIs, spacious for marketing/landing pages.
|
|
607
|
+
*/
|
|
608
|
+
export declare const DENSITIES: {
|
|
609
|
+
readonly compact: "compact";
|
|
610
|
+
readonly default: "default";
|
|
611
|
+
readonly comfortable: "comfortable";
|
|
612
|
+
readonly spacious: "spacious";
|
|
613
|
+
};
|
|
614
|
+
export type Density = keyof typeof DENSITIES;
|
|
615
|
+
/**
|
|
616
|
+
* Density-specific classes for different component types.
|
|
617
|
+
* Each component type has tailored spacing for each density level.
|
|
618
|
+
*/
|
|
619
|
+
export declare const densityVariants: {
|
|
620
|
+
/** Padding scale for general containers */
|
|
621
|
+
padding: {
|
|
622
|
+
compact: string;
|
|
623
|
+
default: string;
|
|
624
|
+
comfortable: string;
|
|
625
|
+
spacious: string;
|
|
626
|
+
};
|
|
627
|
+
/** Gap scale for flex/grid layouts */
|
|
628
|
+
gap: {
|
|
629
|
+
compact: string;
|
|
630
|
+
default: string;
|
|
631
|
+
comfortable: string;
|
|
632
|
+
spacious: string;
|
|
633
|
+
};
|
|
634
|
+
/** Table row density */
|
|
635
|
+
tableRow: {
|
|
636
|
+
compact: string;
|
|
637
|
+
default: string;
|
|
638
|
+
comfortable: string;
|
|
639
|
+
spacious: string;
|
|
640
|
+
};
|
|
641
|
+
/** List item density */
|
|
642
|
+
listItem: {
|
|
643
|
+
compact: string;
|
|
644
|
+
default: string;
|
|
645
|
+
comfortable: string;
|
|
646
|
+
spacious: string;
|
|
647
|
+
};
|
|
648
|
+
/** Form field vertical spacing */
|
|
649
|
+
formField: {
|
|
650
|
+
compact: string;
|
|
651
|
+
default: string;
|
|
652
|
+
comfortable: string;
|
|
653
|
+
spacious: string;
|
|
654
|
+
};
|
|
655
|
+
/** Card content density */
|
|
656
|
+
card: {
|
|
657
|
+
compact: string;
|
|
658
|
+
default: string;
|
|
659
|
+
comfortable: string;
|
|
660
|
+
spacious: string;
|
|
661
|
+
};
|
|
662
|
+
/** Menu item density */
|
|
663
|
+
menu: {
|
|
664
|
+
compact: string;
|
|
665
|
+
default: string;
|
|
666
|
+
comfortable: string;
|
|
667
|
+
spacious: string;
|
|
668
|
+
};
|
|
669
|
+
/** Button density (affects height and padding) */
|
|
670
|
+
button: {
|
|
671
|
+
compact: string;
|
|
672
|
+
default: string;
|
|
673
|
+
comfortable: string;
|
|
674
|
+
spacious: string;
|
|
675
|
+
};
|
|
676
|
+
/** Input density */
|
|
677
|
+
input: {
|
|
678
|
+
compact: string;
|
|
679
|
+
default: string;
|
|
680
|
+
comfortable: string;
|
|
681
|
+
spacious: string;
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Build density classes for a specific component type.
|
|
686
|
+
*
|
|
687
|
+
* @param component - The component type to get density classes for
|
|
688
|
+
* @param density - The density level (defaults to 'default')
|
|
689
|
+
* @returns Tailwind classes for the specified density
|
|
690
|
+
*
|
|
691
|
+
* @example
|
|
692
|
+
* ```typescript
|
|
693
|
+
* buildDensityClasses('tableRow', 'compact')
|
|
694
|
+
* // Returns: 'h-8 px-2 py-1 text-xs'
|
|
695
|
+
* ```
|
|
696
|
+
*/
|
|
697
|
+
export declare function buildDensityClasses(component: keyof typeof densityVariants, density?: Density): string;
|
|
698
|
+
/**
|
|
699
|
+
* Loading states for async operations.
|
|
700
|
+
* Components can show different visual feedback based on operation status.
|
|
701
|
+
*/
|
|
702
|
+
export declare const LOADING_STATES: {
|
|
703
|
+
readonly idle: "idle";
|
|
704
|
+
readonly loading: "loading";
|
|
705
|
+
readonly success: "success";
|
|
706
|
+
readonly error: "error";
|
|
707
|
+
};
|
|
708
|
+
export type LoadingState = keyof typeof LOADING_STATES;
|
|
709
|
+
/**
|
|
710
|
+
* Visual classes for different loading states.
|
|
711
|
+
*/
|
|
712
|
+
export declare const loadingStateVariants: {
|
|
713
|
+
/** Base visual indicators */
|
|
714
|
+
visual: {
|
|
715
|
+
idle: string;
|
|
716
|
+
loading: string;
|
|
717
|
+
success: string;
|
|
718
|
+
error: string;
|
|
719
|
+
};
|
|
720
|
+
/** Background colors for states */
|
|
721
|
+
background: {
|
|
722
|
+
idle: string;
|
|
723
|
+
loading: string;
|
|
724
|
+
success: string;
|
|
725
|
+
error: string;
|
|
726
|
+
};
|
|
727
|
+
/** Text colors for states */
|
|
728
|
+
text: {
|
|
729
|
+
idle: string;
|
|
730
|
+
loading: string;
|
|
731
|
+
success: string;
|
|
732
|
+
error: string;
|
|
733
|
+
};
|
|
734
|
+
/** Icon display classes */
|
|
735
|
+
icon: {
|
|
736
|
+
idle: string;
|
|
737
|
+
loading: string;
|
|
738
|
+
success: string;
|
|
739
|
+
error: string;
|
|
740
|
+
};
|
|
741
|
+
/** Button-specific state classes */
|
|
742
|
+
button: {
|
|
743
|
+
idle: string;
|
|
744
|
+
loading: string;
|
|
745
|
+
success: string;
|
|
746
|
+
error: string;
|
|
747
|
+
};
|
|
748
|
+
/** Input-specific state classes */
|
|
749
|
+
input: {
|
|
750
|
+
idle: string;
|
|
751
|
+
loading: string;
|
|
752
|
+
success: string;
|
|
753
|
+
error: string;
|
|
754
|
+
};
|
|
755
|
+
/** Card-specific state classes */
|
|
756
|
+
card: {
|
|
757
|
+
idle: string;
|
|
758
|
+
loading: string;
|
|
759
|
+
success: string;
|
|
760
|
+
error: string;
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
/**
|
|
764
|
+
* Loading spinner utility classes.
|
|
765
|
+
*/
|
|
766
|
+
export declare const loadingSpinner: {
|
|
767
|
+
/** Wrapper for centering spinner */
|
|
768
|
+
wrapper: string;
|
|
769
|
+
/** Spinner animation */
|
|
770
|
+
spinner: string;
|
|
771
|
+
/** Semi-transparent overlay */
|
|
772
|
+
overlay: string;
|
|
773
|
+
/** Spinner sizes */
|
|
774
|
+
sizes: {
|
|
775
|
+
xs: string;
|
|
776
|
+
sm: string;
|
|
777
|
+
md: string;
|
|
778
|
+
lg: string;
|
|
779
|
+
xl: string;
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
/**
|
|
783
|
+
* Build loading state classes for a specific component type.
|
|
784
|
+
*
|
|
785
|
+
* @param component - The component type
|
|
786
|
+
* @param state - The loading state (defaults to 'idle')
|
|
787
|
+
* @returns Tailwind classes for the specified state
|
|
788
|
+
*
|
|
789
|
+
* @example
|
|
790
|
+
* ```typescript
|
|
791
|
+
* buildLoadingStateClasses('button', 'loading')
|
|
792
|
+
* // Returns: 'relative pointer-events-none'
|
|
793
|
+
*
|
|
794
|
+
* buildLoadingStateClasses('input', 'error')
|
|
795
|
+
* // Returns: 'border-red-500 focus:border-red-500 focus:ring-red-500'
|
|
796
|
+
* ```
|
|
797
|
+
*/
|
|
798
|
+
export declare function buildLoadingStateClasses(component: keyof typeof loadingStateVariants, state?: LoadingState): string;
|
|
799
|
+
/**
|
|
800
|
+
* Tailwind breakpoints for responsive design.
|
|
801
|
+
*/
|
|
802
|
+
export declare const BREAKPOINTS: {
|
|
803
|
+
readonly sm: "640px";
|
|
804
|
+
readonly md: "768px";
|
|
805
|
+
readonly lg: "1024px";
|
|
806
|
+
readonly xl: "1280px";
|
|
807
|
+
readonly '2xl': "1536px";
|
|
808
|
+
};
|
|
809
|
+
export type Breakpoint = keyof typeof BREAKPOINTS;
|
|
810
|
+
/**
|
|
811
|
+
* Configuration for responsive classes.
|
|
812
|
+
* Each breakpoint can have its own class string.
|
|
813
|
+
*/
|
|
814
|
+
export interface ResponsiveConfig {
|
|
815
|
+
/** Base classes (no breakpoint prefix) */
|
|
816
|
+
base?: string;
|
|
817
|
+
/** Small screens (640px+) */
|
|
818
|
+
sm?: string;
|
|
819
|
+
/** Medium screens (768px+) */
|
|
820
|
+
md?: string;
|
|
821
|
+
/** Large screens (1024px+) */
|
|
822
|
+
lg?: string;
|
|
823
|
+
/** Extra large screens (1280px+) */
|
|
824
|
+
xl?: string;
|
|
825
|
+
/** 2X large screens (1536px+) */
|
|
826
|
+
'2xl'?: string;
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* Pre-built responsive patterns for common use cases.
|
|
830
|
+
*/
|
|
831
|
+
export declare const responsiveVariants: {
|
|
832
|
+
/** Visibility utilities */
|
|
833
|
+
visibility: {
|
|
834
|
+
hiddenOnMobile: string;
|
|
835
|
+
hiddenOnDesktop: string;
|
|
836
|
+
showOnlyMobile: string;
|
|
837
|
+
showOnlyDesktop: string;
|
|
838
|
+
showOnlyTablet: string;
|
|
839
|
+
};
|
|
840
|
+
/** Stack direction changes */
|
|
841
|
+
stack: {
|
|
842
|
+
mobileVertical: string;
|
|
843
|
+
mobileHorizontal: string;
|
|
844
|
+
tabletVertical: string;
|
|
845
|
+
};
|
|
846
|
+
/** Grid column patterns */
|
|
847
|
+
gridCols: {
|
|
848
|
+
responsive: string;
|
|
849
|
+
responsiveTwo: string;
|
|
850
|
+
responsiveThree: string;
|
|
851
|
+
responsiveSidebar: string;
|
|
852
|
+
};
|
|
853
|
+
/** Text size scaling */
|
|
854
|
+
textSize: {
|
|
855
|
+
responsive: string;
|
|
856
|
+
heading: string;
|
|
857
|
+
subheading: string;
|
|
858
|
+
caption: string;
|
|
859
|
+
};
|
|
860
|
+
/** Padding scaling */
|
|
861
|
+
padding: {
|
|
862
|
+
responsive: string;
|
|
863
|
+
responsiveX: string;
|
|
864
|
+
responsiveY: string;
|
|
865
|
+
};
|
|
866
|
+
/** Width utilities */
|
|
867
|
+
width: {
|
|
868
|
+
container: string;
|
|
869
|
+
modal: string;
|
|
870
|
+
modalWide: string;
|
|
871
|
+
drawer: string;
|
|
872
|
+
sidebar: string;
|
|
873
|
+
};
|
|
874
|
+
/** Gap scaling */
|
|
875
|
+
gap: {
|
|
876
|
+
responsive: string;
|
|
877
|
+
responsiveLarge: string;
|
|
878
|
+
};
|
|
879
|
+
};
|
|
880
|
+
/**
|
|
881
|
+
* Build responsive class string from configuration.
|
|
882
|
+
*
|
|
883
|
+
* @param config - Responsive configuration with classes for each breakpoint
|
|
884
|
+
* @returns Combined class string with breakpoint prefixes
|
|
885
|
+
*
|
|
886
|
+
* @example
|
|
887
|
+
* ```typescript
|
|
888
|
+
* buildResponsiveClasses({
|
|
889
|
+
* base: 'text-sm',
|
|
890
|
+
* md: 'text-base',
|
|
891
|
+
* lg: 'text-lg',
|
|
892
|
+
* })
|
|
893
|
+
* // Returns: 'text-sm md:text-base lg:text-lg'
|
|
894
|
+
* ```
|
|
895
|
+
*/
|
|
896
|
+
export declare function buildResponsiveClasses(config: ResponsiveConfig): string;
|
|
897
|
+
/**
|
|
898
|
+
* Build responsive size classes for components.
|
|
899
|
+
* Applies different sizes at different breakpoints.
|
|
900
|
+
*
|
|
901
|
+
* @param component - The component type ('button', 'input', 'avatar')
|
|
902
|
+
* @param sizes - Object mapping breakpoints to size values
|
|
903
|
+
* @returns Combined class string with responsive size classes
|
|
904
|
+
*
|
|
905
|
+
* @example
|
|
906
|
+
* ```typescript
|
|
907
|
+
* buildResponsiveSize('button', { base: 'sm', lg: 'md', xl: 'lg' })
|
|
908
|
+
* // Returns size classes that change based on screen width
|
|
909
|
+
* ```
|
|
910
|
+
*/
|
|
911
|
+
export declare function buildResponsiveSize(component: 'button' | 'input' | 'avatar', sizes: Partial<Record<Breakpoint | 'base', Size>>): string;
|
|
912
|
+
/**
|
|
913
|
+
* Theme modes for components.
|
|
914
|
+
* Components adapt their styling based on light/dark/system preference.
|
|
915
|
+
*/
|
|
916
|
+
export declare const THEMES: {
|
|
917
|
+
readonly light: "light";
|
|
918
|
+
readonly dark: "dark";
|
|
919
|
+
readonly system: "system";
|
|
920
|
+
};
|
|
921
|
+
export type Theme = keyof typeof THEMES;
|
|
922
|
+
/**
|
|
923
|
+
* Theme-specific class patterns for different component aspects.
|
|
924
|
+
* These classes use Tailwind's dark: prefix for dark mode.
|
|
925
|
+
*/
|
|
926
|
+
export declare const themeVariants: {
|
|
927
|
+
/** Background colors */
|
|
928
|
+
background: {
|
|
929
|
+
light: string;
|
|
930
|
+
dark: string;
|
|
931
|
+
system: string;
|
|
932
|
+
};
|
|
933
|
+
/** Surface/card backgrounds */
|
|
934
|
+
surface: {
|
|
935
|
+
light: string;
|
|
936
|
+
dark: string;
|
|
937
|
+
system: string;
|
|
938
|
+
};
|
|
939
|
+
/** Primary text colors */
|
|
940
|
+
textPrimary: {
|
|
941
|
+
light: string;
|
|
942
|
+
dark: string;
|
|
943
|
+
system: string;
|
|
944
|
+
};
|
|
945
|
+
/** Secondary text colors */
|
|
946
|
+
textSecondary: {
|
|
947
|
+
light: string;
|
|
948
|
+
dark: string;
|
|
949
|
+
system: string;
|
|
950
|
+
};
|
|
951
|
+
/** Border colors */
|
|
952
|
+
border: {
|
|
953
|
+
light: string;
|
|
954
|
+
dark: string;
|
|
955
|
+
system: string;
|
|
956
|
+
};
|
|
957
|
+
/** Divider colors */
|
|
958
|
+
divider: {
|
|
959
|
+
light: string;
|
|
960
|
+
dark: string;
|
|
961
|
+
system: string;
|
|
962
|
+
};
|
|
963
|
+
/** Input backgrounds */
|
|
964
|
+
input: {
|
|
965
|
+
light: string;
|
|
966
|
+
dark: string;
|
|
967
|
+
system: string;
|
|
968
|
+
};
|
|
969
|
+
/** Hover states */
|
|
970
|
+
hover: {
|
|
971
|
+
light: string;
|
|
972
|
+
dark: string;
|
|
973
|
+
system: string;
|
|
974
|
+
};
|
|
975
|
+
/** Active states */
|
|
976
|
+
active: {
|
|
977
|
+
light: string;
|
|
978
|
+
dark: string;
|
|
979
|
+
system: string;
|
|
980
|
+
};
|
|
981
|
+
/** Ring/focus colors */
|
|
982
|
+
ring: {
|
|
983
|
+
light: string;
|
|
984
|
+
dark: string;
|
|
985
|
+
system: string;
|
|
986
|
+
};
|
|
987
|
+
/** Shadow styles */
|
|
988
|
+
shadow: {
|
|
989
|
+
light: string;
|
|
990
|
+
dark: string;
|
|
991
|
+
system: string;
|
|
992
|
+
};
|
|
993
|
+
};
|
|
994
|
+
/**
|
|
995
|
+
* Build theme classes for a specific component aspect.
|
|
996
|
+
*
|
|
997
|
+
* @param aspect - The aspect to get theme classes for (background, text, border, etc.)
|
|
998
|
+
* @param theme - The theme mode ('light', 'dark', or 'system')
|
|
999
|
+
* @returns Tailwind classes for the specified theme aspect
|
|
1000
|
+
*
|
|
1001
|
+
* @example
|
|
1002
|
+
* ```typescript
|
|
1003
|
+
* buildThemeClasses('background', 'system')
|
|
1004
|
+
* // Returns: 'bg-white dark:bg-gray-900'
|
|
1005
|
+
*
|
|
1006
|
+
* buildThemeClasses('textPrimary', 'dark')
|
|
1007
|
+
* // Returns: 'text-gray-100 dark:text-gray-100'
|
|
1008
|
+
* ```
|
|
1009
|
+
*/
|
|
1010
|
+
export declare function buildThemeClasses(aspect: keyof typeof themeVariants, theme?: Theme): string;
|
|
1011
|
+
/**
|
|
1012
|
+
* Build complete theme class set for a component.
|
|
1013
|
+
* Combines multiple theme aspects into a single class string.
|
|
1014
|
+
*
|
|
1015
|
+
* @param options - Theme options specifying which aspects to include
|
|
1016
|
+
* @returns Combined Tailwind classes for all specified theme aspects
|
|
1017
|
+
*
|
|
1018
|
+
* @example
|
|
1019
|
+
* ```typescript
|
|
1020
|
+
* buildComponentTheme({
|
|
1021
|
+
* theme: 'system',
|
|
1022
|
+
* background: true,
|
|
1023
|
+
* text: true,
|
|
1024
|
+
* border: true,
|
|
1025
|
+
* })
|
|
1026
|
+
* // Returns combined classes for system theme
|
|
1027
|
+
* ```
|
|
1028
|
+
*/
|
|
1029
|
+
export declare function buildComponentTheme(options: {
|
|
1030
|
+
theme?: Theme;
|
|
1031
|
+
background?: boolean;
|
|
1032
|
+
surface?: boolean;
|
|
1033
|
+
text?: boolean;
|
|
1034
|
+
border?: boolean;
|
|
1035
|
+
input?: boolean;
|
|
1036
|
+
hover?: boolean;
|
|
1037
|
+
}): string;
|
|
1038
|
+
//# sourceMappingURL=variants.d.ts.map
|