@work-rjkashyap/unified-ui 0.3.4 → 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/CHANGELOG.md +105 -0
- package/LICENSE +21 -0
- package/dist/components/accordion.cjs +225 -0
- package/dist/components/accordion.d.cts +157 -0
- package/dist/components/accordion.d.ts +157 -0
- package/dist/components/accordion.mjs +199 -0
- package/dist/components/alert-dialog.cjs +246 -0
- package/dist/components/alert-dialog.d.cts +61 -0
- package/dist/components/alert-dialog.d.ts +61 -0
- package/dist/components/alert-dialog.mjs +218 -0
- package/dist/components/alert.cjs +401 -0
- package/dist/components/alert.d.cts +217 -0
- package/dist/components/alert.d.ts +217 -0
- package/dist/components/alert.mjs +374 -0
- package/dist/components/aspect-ratio.cjs +45 -0
- package/dist/components/aspect-ratio.d.cts +10 -0
- package/dist/components/aspect-ratio.d.ts +10 -0
- package/dist/components/aspect-ratio.mjs +23 -0
- package/dist/components/avatar.cjs +348 -0
- package/dist/components/avatar.d.cts +198 -0
- package/dist/components/avatar.d.ts +198 -0
- package/dist/components/avatar.mjs +329 -0
- package/dist/components/badge.cjs +325 -0
- package/dist/components/badge.d.cts +259 -0
- package/dist/components/badge.d.ts +259 -0
- package/dist/components/badge.mjs +298 -0
- package/dist/components/banner.cjs +147 -0
- package/dist/components/banner.d.cts +31 -0
- package/dist/components/banner.d.ts +31 -0
- package/dist/components/banner.mjs +122 -0
- package/dist/components/breadcrumb.cjs +266 -0
- package/dist/components/breadcrumb.d.cts +159 -0
- package/dist/components/breadcrumb.d.ts +159 -0
- package/dist/components/breadcrumb.mjs +235 -0
- package/dist/components/button.cjs +254 -0
- package/dist/components/button.d.cts +126 -0
- package/dist/components/button.d.ts +126 -0
- package/dist/components/button.mjs +229 -0
- package/dist/components/calendar.cjs +511 -0
- package/dist/components/calendar.d.cts +94 -0
- package/dist/components/calendar.d.ts +94 -0
- package/dist/components/calendar.mjs +492 -0
- package/dist/components/card.cjs +234 -0
- package/dist/components/card.d.cts +190 -0
- package/dist/components/card.d.ts +190 -0
- package/dist/components/card.mjs +210 -0
- package/dist/components/carousel.cjs +234 -0
- package/dist/components/carousel.d.cts +30 -0
- package/dist/components/carousel.d.ts +30 -0
- package/dist/components/carousel.mjs +217 -0
- package/dist/components/chart.cjs +122 -0
- package/dist/components/chart.d.cts +103 -0
- package/dist/components/chart.d.ts +103 -0
- package/dist/components/chart.mjs +96 -0
- package/dist/components/checkbox.cjs +318 -0
- package/dist/components/checkbox.d.cts +182 -0
- package/dist/components/checkbox.d.ts +182 -0
- package/dist/components/checkbox.mjs +296 -0
- package/dist/components/code-highlight.cjs +335 -0
- package/dist/components/code-highlight.d.cts +18 -0
- package/dist/components/code-highlight.d.ts +18 -0
- package/dist/components/code-highlight.mjs +308 -0
- package/dist/components/code.cjs +265 -0
- package/dist/components/code.d.cts +40 -0
- package/dist/components/code.d.ts +40 -0
- package/dist/components/code.mjs +243 -0
- package/dist/components/collapsible.cjs +143 -0
- package/dist/components/collapsible.d.cts +159 -0
- package/dist/components/collapsible.d.ts +159 -0
- package/dist/components/collapsible.mjs +123 -0
- package/dist/components/color-picker.cjs +348 -0
- package/dist/components/color-picker.d.cts +35 -0
- package/dist/components/color-picker.d.ts +35 -0
- package/dist/components/color-picker.mjs +331 -0
- package/dist/components/combobox.cjs +584 -0
- package/dist/components/combobox.d.cts +183 -0
- package/dist/components/combobox.d.ts +183 -0
- package/dist/components/combobox.mjs +571 -0
- package/dist/components/command.cjs +329 -0
- package/dist/components/command.d.cts +97 -0
- package/dist/components/command.d.ts +97 -0
- package/dist/components/command.mjs +311 -0
- package/dist/components/confirm-dialog.cjs +100 -0
- package/dist/components/confirm-dialog.d.cts +25 -0
- package/dist/components/confirm-dialog.d.ts +25 -0
- package/dist/components/confirm-dialog.mjs +86 -0
- package/dist/components/context-menu.cjs +325 -0
- package/dist/components/context-menu.d.cts +259 -0
- package/dist/components/context-menu.d.ts +259 -0
- package/dist/components/context-menu.mjs +290 -0
- package/dist/components/copy-button.cjs +203 -0
- package/dist/components/copy-button.d.cts +22 -0
- package/dist/components/copy-button.d.ts +22 -0
- package/dist/components/copy-button.mjs +178 -0
- package/dist/components/data-list.cjs +140 -0
- package/dist/components/data-list.d.cts +36 -0
- package/dist/components/data-list.d.ts +36 -0
- package/dist/components/data-list.mjs +113 -0
- package/dist/components/data-table-toolbar.cjs +338 -0
- package/dist/components/data-table-toolbar.d.cts +84 -0
- package/dist/components/data-table-toolbar.d.ts +84 -0
- package/dist/components/data-table-toolbar.mjs +320 -0
- package/dist/components/data-table.cjs +1324 -0
- package/dist/components/data-table.d.cts +349 -0
- package/dist/components/data-table.d.ts +349 -0
- package/dist/components/data-table.mjs +1323 -0
- package/dist/components/date-picker.cjs +282 -0
- package/dist/components/date-picker.d.cts +97 -0
- package/dist/components/date-picker.d.ts +97 -0
- package/dist/components/date-picker.mjs +258 -0
- package/dist/components/dialog.cjs +319 -0
- package/dist/components/dialog.d.cts +74 -0
- package/dist/components/dialog.d.ts +74 -0
- package/dist/components/dialog.mjs +292 -0
- package/dist/components/drawer.cjs +262 -0
- package/dist/components/drawer.d.cts +113 -0
- package/dist/components/drawer.d.ts +113 -0
- package/dist/components/drawer.mjs +230 -0
- package/dist/components/dropdown-menu.cjs +328 -0
- package/dist/components/dropdown-menu.d.cts +95 -0
- package/dist/components/dropdown-menu.d.ts +95 -0
- package/dist/components/dropdown-menu.mjs +293 -0
- package/dist/components/empty-state.cjs +123 -0
- package/dist/components/empty-state.d.cts +15 -0
- package/dist/components/empty-state.d.ts +15 -0
- package/dist/components/empty-state.mjs +99 -0
- package/dist/components/file-upload.cjs +442 -0
- package/dist/components/file-upload.d.cts +35 -0
- package/dist/components/file-upload.d.ts +35 -0
- package/dist/components/file-upload.mjs +423 -0
- package/dist/components/form-field.cjs +191 -0
- package/dist/components/form-field.d.cts +163 -0
- package/dist/components/form-field.d.ts +163 -0
- package/dist/components/form-field.mjs +167 -0
- package/dist/components/hover-card.cjs +99 -0
- package/dist/components/hover-card.d.cts +28 -0
- package/dist/components/hover-card.d.ts +28 -0
- package/dist/components/hover-card.mjs +75 -0
- package/dist/components/image-gallery.cjs +359 -0
- package/dist/components/image-gallery.d.cts +46 -0
- package/dist/components/image-gallery.d.ts +46 -0
- package/dist/components/image-gallery.mjs +340 -0
- package/dist/components/index.cjs +719 -0
- package/dist/components/index.d.cts +84 -0
- package/dist/components/index.d.ts +84 -0
- package/dist/components/index.mjs +771 -0
- package/dist/components/infinite-scroll.cjs +95 -0
- package/dist/components/infinite-scroll.d.cts +54 -0
- package/dist/components/infinite-scroll.d.ts +54 -0
- package/dist/components/infinite-scroll.mjs +71 -0
- package/dist/components/input-group.cjs +202 -0
- package/dist/components/input-group.d.cts +22 -0
- package/dist/components/input-group.d.ts +22 -0
- package/dist/components/input-group.mjs +178 -0
- package/dist/components/input.cjs +318 -0
- package/dist/components/input.d.cts +99 -0
- package/dist/components/input.d.ts +99 -0
- package/dist/components/input.mjs +296 -0
- package/dist/components/kbd.cjs +69 -0
- package/dist/components/kbd.d.cts +25 -0
- package/dist/components/kbd.d.ts +25 -0
- package/dist/components/kbd.mjs +44 -0
- package/dist/components/label.cjs +138 -0
- package/dist/components/label.d.cts +91 -0
- package/dist/components/label.d.ts +91 -0
- package/dist/components/label.mjs +113 -0
- package/dist/components/markdown.cjs +179 -0
- package/dist/components/markdown.d.cts +41 -0
- package/dist/components/markdown.d.ts +41 -0
- package/dist/components/markdown.mjs +155 -0
- package/dist/components/menubar.cjs +365 -0
- package/dist/components/menubar.d.cts +88 -0
- package/dist/components/menubar.d.ts +88 -0
- package/dist/components/menubar.mjs +329 -0
- package/dist/components/navigation-menu.cjs +280 -0
- package/dist/components/navigation-menu.d.cts +123 -0
- package/dist/components/navigation-menu.d.ts +123 -0
- package/dist/components/navigation-menu.mjs +250 -0
- package/dist/components/number-input.cjs +419 -0
- package/dist/components/number-input.d.cts +111 -0
- package/dist/components/number-input.d.ts +111 -0
- package/dist/components/number-input.mjs +400 -0
- package/dist/components/pagination.cjs +322 -0
- package/dist/components/pagination.d.cts +119 -0
- package/dist/components/pagination.d.ts +119 -0
- package/dist/components/pagination.mjs +297 -0
- package/dist/components/pin-input.cjs +321 -0
- package/dist/components/pin-input.d.cts +112 -0
- package/dist/components/pin-input.d.ts +112 -0
- package/dist/components/pin-input.mjs +303 -0
- package/dist/components/popover.cjs +194 -0
- package/dist/components/popover.d.cts +108 -0
- package/dist/components/popover.d.ts +108 -0
- package/dist/components/popover.mjs +168 -0
- package/dist/components/progress.cjs +237 -0
- package/dist/components/progress.d.cts +137 -0
- package/dist/components/progress.d.ts +137 -0
- package/dist/components/progress.mjs +211 -0
- package/dist/components/radio.cjs +344 -0
- package/dist/components/radio.d.cts +145 -0
- package/dist/components/radio.d.ts +145 -0
- package/dist/components/radio.mjs +320 -0
- package/dist/components/resizable.cjs +121 -0
- package/dist/components/resizable.d.cts +23 -0
- package/dist/components/resizable.d.ts +23 -0
- package/dist/components/resizable.mjs +99 -0
- package/dist/components/scroll-area.cjs +168 -0
- package/dist/components/scroll-area.d.cts +131 -0
- package/dist/components/scroll-area.d.ts +131 -0
- package/dist/components/scroll-area.mjs +143 -0
- package/dist/components/search-input.cjs +261 -0
- package/dist/components/search-input.d.cts +26 -0
- package/dist/components/search-input.d.ts +26 -0
- package/dist/components/search-input.mjs +243 -0
- package/dist/components/select.cjs +320 -0
- package/dist/components/select.d.cts +55 -0
- package/dist/components/select.d.ts +55 -0
- package/dist/components/select.mjs +288 -0
- package/dist/components/separator.cjs +193 -0
- package/dist/components/separator.d.cts +92 -0
- package/dist/components/separator.d.ts +92 -0
- package/dist/components/separator.mjs +170 -0
- package/dist/components/sheet.cjs +399 -0
- package/dist/components/sheet.d.cts +219 -0
- package/dist/components/sheet.d.ts +219 -0
- package/dist/components/sheet.mjs +379 -0
- package/dist/components/sidebar.cjs +1077 -0
- package/dist/components/sidebar.d.cts +733 -0
- package/dist/components/sidebar.d.ts +733 -0
- package/dist/components/sidebar.mjs +1033 -0
- package/dist/components/skeleton.cjs +210 -0
- package/dist/components/skeleton.d.cts +202 -0
- package/dist/components/skeleton.d.ts +202 -0
- package/dist/components/skeleton.mjs +182 -0
- package/dist/components/slider.cjs +319 -0
- package/dist/components/slider.d.cts +82 -0
- package/dist/components/slider.d.ts +82 -0
- package/dist/components/slider.mjs +296 -0
- package/dist/components/sonner.cjs +119 -0
- package/dist/components/sonner.d.cts +60 -0
- package/dist/components/sonner.d.ts +60 -0
- package/dist/components/sonner.mjs +94 -0
- package/dist/components/spinner.cjs +238 -0
- package/dist/components/spinner.d.cts +101 -0
- package/dist/components/spinner.d.ts +101 -0
- package/dist/components/spinner.mjs +213 -0
- package/dist/components/stat.cjs +180 -0
- package/dist/components/stat.d.cts +21 -0
- package/dist/components/stat.d.ts +21 -0
- package/dist/components/stat.mjs +161 -0
- package/dist/components/steps.cjs +228 -0
- package/dist/components/steps.d.cts +76 -0
- package/dist/components/steps.d.ts +76 -0
- package/dist/components/steps.mjs +207 -0
- package/dist/components/switch.cjs +243 -0
- package/dist/components/switch.d.cts +90 -0
- package/dist/components/switch.d.ts +90 -0
- package/dist/components/switch.mjs +228 -0
- package/dist/components/table.cjs +381 -0
- package/dist/components/table.d.cts +181 -0
- package/dist/components/table.d.ts +181 -0
- package/dist/components/table.mjs +349 -0
- package/dist/components/tabs.cjs +326 -0
- package/dist/components/tabs.d.cts +154 -0
- package/dist/components/tabs.d.ts +154 -0
- package/dist/components/tabs.mjs +304 -0
- package/dist/components/textarea.cjs +258 -0
- package/dist/components/textarea.d.cts +112 -0
- package/dist/components/textarea.d.ts +112 -0
- package/dist/components/textarea.mjs +233 -0
- package/dist/components/theme-toggle.cjs +282 -0
- package/dist/components/theme-toggle.d.cts +58 -0
- package/dist/components/theme-toggle.d.ts +58 -0
- package/dist/components/theme-toggle.mjs +258 -0
- package/dist/components/timeline.cjs +178 -0
- package/dist/components/timeline.d.cts +41 -0
- package/dist/components/timeline.d.ts +41 -0
- package/dist/components/timeline.mjs +157 -0
- package/dist/components/toast.cjs +546 -0
- package/dist/components/toast.d.cts +169 -0
- package/dist/components/toast.d.ts +169 -0
- package/dist/components/toast.mjs +528 -0
- package/dist/components/toggle-group.cjs +204 -0
- package/dist/components/toggle-group.d.cts +215 -0
- package/dist/components/toggle-group.d.ts +215 -0
- package/dist/components/toggle-group.mjs +180 -0
- package/dist/components/toggle.cjs +155 -0
- package/dist/components/toggle.d.cts +100 -0
- package/dist/components/toggle.d.ts +100 -0
- package/dist/components/toggle.mjs +130 -0
- package/dist/components/tooltip.cjs +155 -0
- package/dist/components/tooltip.d.cts +129 -0
- package/dist/components/tooltip.d.ts +129 -0
- package/dist/components/tooltip.mjs +132 -0
- package/dist/components/tree-view.cjs +450 -0
- package/dist/components/tree-view.d.cts +67 -0
- package/dist/components/tree-view.d.ts +67 -0
- package/dist/components/tree-view.mjs +433 -0
- package/dist/components/video-player.cjs +344 -0
- package/dist/components/video-player.d.cts +34 -0
- package/dist/components/video-player.d.ts +34 -0
- package/dist/components/video-player.mjs +320 -0
- package/dist/components/virtual-list.cjs +153 -0
- package/dist/components/virtual-list.d.cts +53 -0
- package/dist/components/virtual-list.d.ts +53 -0
- package/dist/components/virtual-list.mjs +136 -0
- package/dist/components/visually-hidden.cjs +43 -0
- package/dist/components/visually-hidden.d.cts +9 -0
- package/dist/components/visually-hidden.d.ts +9 -0
- package/dist/components/visually-hidden.mjs +21 -0
- package/dist/index.cjs +1081 -1957
- package/dist/index.d.cts +99 -11
- package/dist/index.d.ts +99 -11
- package/dist/index.mjs +1138 -16
- package/dist/motion/hooks.cjs +98 -0
- package/dist/motion/hooks.d.cts +32 -0
- package/dist/motion/hooks.d.ts +32 -0
- package/dist/motion/hooks.mjs +70 -0
- package/dist/motion/index.cjs +157 -0
- package/dist/motion/index.d.cts +5 -0
- package/dist/motion/index.d.ts +5 -0
- package/dist/motion/index.mjs +137 -0
- package/dist/motion/presets.cjs +609 -0
- package/dist/{motion.d.ts → motion/presets.d.cts} +1 -30
- package/dist/{motion.d.cts → motion/presets.d.ts} +1 -30
- package/dist/{chunk-PLRSH37T.mjs → motion/presets.mjs} +119 -126
- package/dist/primitives/container.cjs +88 -0
- package/dist/primitives/container.d.cts +82 -0
- package/dist/primitives/container.d.ts +82 -0
- package/dist/primitives/container.mjs +64 -0
- package/dist/primitives/divider.cjs +74 -0
- package/dist/primitives/divider.d.cts +30 -0
- package/dist/primitives/divider.d.ts +30 -0
- package/dist/primitives/divider.mjs +50 -0
- package/dist/primitives/index.cjs +54 -0
- package/dist/primitives/index.d.cts +6 -0
- package/dist/primitives/index.d.ts +6 -0
- package/dist/primitives/index.mjs +33 -0
- package/dist/primitives/stack.cjs +167 -0
- package/dist/primitives/stack.d.cts +132 -0
- package/dist/primitives/stack.d.ts +132 -0
- package/dist/primitives/stack.mjs +142 -0
- package/dist/primitives/typography.cjs +260 -0
- package/dist/primitives/typography.d.cts +157 -0
- package/dist/primitives/typography.d.ts +157 -0
- package/dist/primitives/typography.mjs +229 -0
- package/dist/theme/contract.cjs +246 -0
- package/dist/theme/contract.d.cts +76 -0
- package/dist/theme/contract.d.ts +76 -0
- package/dist/theme/contract.mjs +221 -0
- package/dist/theme/customizer-store.cjs +266 -0
- package/dist/theme/customizer-store.d.cts +76 -0
- package/dist/theme/customizer-store.d.ts +76 -0
- package/dist/theme/customizer-store.mjs +261 -0
- package/dist/theme/customizer.cjs +812 -0
- package/dist/theme/customizer.d.cts +13 -0
- package/dist/theme/customizer.d.ts +13 -0
- package/dist/theme/customizer.mjs +803 -0
- package/dist/theme/index.cjs +105 -0
- package/dist/theme/index.d.cts +13 -0
- package/dist/theme/index.d.ts +13 -0
- package/dist/theme/index.mjs +87 -0
- package/dist/theme/presets.cjs +1205 -0
- package/dist/theme/presets.d.cts +232 -0
- package/dist/theme/presets.d.ts +232 -0
- package/dist/theme/presets.mjs +1175 -0
- package/dist/theme/provider.cjs +122 -0
- package/dist/theme/provider.d.cts +57 -0
- package/dist/theme/provider.d.ts +57 -0
- package/dist/theme/provider.mjs +104 -0
- package/dist/{chunk-AAEWG5VR.mjs → tokens/colors.cjs} +94 -94
- package/dist/{z-index-DmLl6FUD.d.ts → tokens/colors.d.cts} +118 -72
- package/dist/{z-index-DmLl6FUD.d.cts → tokens/colors.d.ts} +118 -72
- package/dist/{chunk-6ZZZBOCH.cjs → tokens/colors.mjs} +47 -121
- package/dist/tokens/index.cjs +96 -0
- package/dist/tokens/index.d.cts +7 -0
- package/dist/tokens/index.d.ts +7 -0
- package/dist/tokens/index.mjs +71 -0
- package/dist/{chunk-XCKK6P46.cjs → tokens/motion.cjs} +46 -18
- package/dist/{motion-D9wQbcKL.d.cts → tokens/motion.d.cts} +1 -1
- package/dist/{motion-D9wQbcKL.d.ts → tokens/motion.d.ts} +1 -1
- package/dist/{chunk-EZ2L3XPS.mjs → tokens/motion.mjs} +16 -10
- package/dist/tokens/radius.cjs +41 -0
- package/dist/tokens/radius.d.cts +18 -0
- package/dist/tokens/radius.d.ts +18 -0
- package/dist/tokens/radius.mjs +17 -0
- package/dist/tokens/shadows.cjs +57 -0
- package/dist/tokens/shadows.d.cts +32 -0
- package/dist/tokens/shadows.d.ts +32 -0
- package/dist/tokens/shadows.mjs +32 -0
- package/dist/tokens/spacing.cjs +51 -0
- package/dist/tokens/spacing.d.cts +26 -0
- package/dist/tokens/spacing.d.ts +26 -0
- package/dist/{chunk-NMPHV6ZD.mjs → tokens/spacing.mjs} +4 -4
- package/dist/{chunk-ECIGDEAH.cjs → tokens/typography.cjs} +43 -16
- package/dist/{typography-DlvVjEdE.d.ts → tokens/typography.d.cts} +1 -1
- package/dist/{typography-DlvVjEdE.d.cts → tokens/typography.d.ts} +1 -1
- package/dist/{chunk-ITBG42M5.mjs → tokens/typography.mjs} +14 -9
- package/dist/tokens/z-index.cjs +47 -0
- package/dist/tokens/z-index.d.cts +24 -0
- package/dist/tokens/z-index.d.ts +24 -0
- package/dist/tokens/z-index.mjs +23 -0
- package/dist/utils/cn.cjs +102 -0
- package/dist/utils/cn.d.cts +84 -0
- package/dist/utils/cn.d.ts +84 -0
- package/dist/{chunk-ZT3PCXDF.mjs → utils/cn.mjs} +14 -7
- package/dist/{chunk-33QEKXRQ.cjs → utils/contrast.cjs} +68 -38
- package/dist/utils/contrast.d.cts +209 -0
- package/dist/utils/contrast.d.ts +209 -0
- package/dist/{chunk-5NZDQWRV.mjs → utils/contrast.mjs} +27 -18
- package/dist/utils/focus-ring.cjs +81 -0
- package/dist/utils/focus-ring.d.cts +80 -0
- package/dist/utils/focus-ring.d.ts +80 -0
- package/dist/utils/focus-ring.mjs +47 -0
- package/dist/utils/index.cjs +107 -0
- package/dist/utils/index.d.cts +6 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/index.mjs +88 -0
- package/dist/utils/types.cjs +38 -0
- package/dist/utils/types.d.cts +187 -0
- package/dist/utils/types.d.ts +187 -0
- package/dist/utils/types.mjs +13 -0
- package/package.json +191 -191
- package/dist/chunk-2JFREULQ.cjs +0 -29
- package/dist/chunk-3EHT6IOA.cjs +0 -49
- package/dist/chunk-4ON3M3OM.cjs +0 -73
- package/dist/chunk-A2DGHQL2.cjs +0 -21808
- package/dist/chunk-BJ55D5IK.mjs +0 -2433
- package/dist/chunk-F4JJFWWU.cjs +0 -604
- package/dist/chunk-FUWXGHWQ.cjs +0 -468
- package/dist/chunk-MBYCK2JJ.mjs +0 -37
- package/dist/chunk-OHEH57BV.mjs +0 -455
- package/dist/chunk-RUG3BW2B.cjs +0 -2471
- package/dist/chunk-XAIUX2YS.mjs +0 -21477
- package/dist/components.cjs +0 -1247
- package/dist/components.d.cts +0 -7881
- package/dist/components.d.ts +0 -7881
- package/dist/components.mjs +0 -6
- package/dist/motion.cjs +0 -264
- package/dist/motion.mjs +0 -3
- package/dist/primitives.cjs +0 -57
- package/dist/primitives.d.cts +0 -390
- package/dist/primitives.d.ts +0 -390
- package/dist/primitives.mjs +0 -4
- package/dist/theme.cjs +0 -159
- package/dist/theme.d.cts +0 -440
- package/dist/theme.d.ts +0 -440
- package/dist/theme.mjs +0 -6
- package/dist/tokens.cjs +0 -137
- package/dist/tokens.d.cts +0 -30
- package/dist/tokens.d.ts +0 -30
- package/dist/tokens.mjs +0 -4
- package/dist/utils.cjs +0 -164
- package/dist/utils.d.cts +0 -525
- package/dist/utils.d.ts +0 -525
- package/dist/utils.mjs +0 -3
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
/** An RGB color represented as a tuple of [red, green, blue] (0–255 each). */
|
|
2
|
+
type RGB = readonly [number, number, number];
|
|
3
|
+
/** Text size category for WCAG contrast thresholds. */
|
|
4
|
+
type TextSize = "normal" | "large";
|
|
5
|
+
/** Full result of a contrast check between two colors. */
|
|
6
|
+
interface ContrastResult {
|
|
7
|
+
/** The computed contrast ratio (e.g. 4.56). Always ≥ 1. */
|
|
8
|
+
ratio: number;
|
|
9
|
+
/** Meets WCAG AA for normal text (≥ 4.5:1). */
|
|
10
|
+
aa: boolean;
|
|
11
|
+
/** Meets WCAG AA for large text (≥ 3:1). */
|
|
12
|
+
aaLarge: boolean;
|
|
13
|
+
/** Meets WCAG AAA for normal text (≥ 7:1). */
|
|
14
|
+
aaa: boolean;
|
|
15
|
+
/** Meets WCAG AAA for large text (≥ 4.5:1). */
|
|
16
|
+
aaaLarge: boolean;
|
|
17
|
+
/** Meets WCAG AA for non-text UI components (≥ 3:1). */
|
|
18
|
+
nonTextAA: boolean;
|
|
19
|
+
}
|
|
20
|
+
/** Minimum contrast ratio for WCAG AA normal text. */
|
|
21
|
+
declare const WCAG_AA_NORMAL = 4.5;
|
|
22
|
+
/** Minimum contrast ratio for WCAG AA large text. */
|
|
23
|
+
declare const WCAG_AA_LARGE = 3;
|
|
24
|
+
/** Minimum contrast ratio for WCAG AAA normal text. */
|
|
25
|
+
declare const WCAG_AAA_NORMAL = 7;
|
|
26
|
+
/** Minimum contrast ratio for WCAG AAA large text. */
|
|
27
|
+
declare const WCAG_AAA_LARGE = 4.5;
|
|
28
|
+
/** Minimum contrast ratio for WCAG AA non-text UI components (SC 1.4.11). */
|
|
29
|
+
declare const WCAG_NON_TEXT_AA = 3;
|
|
30
|
+
/**
|
|
31
|
+
* Calculate the relative luminance of an sRGB color.
|
|
32
|
+
*
|
|
33
|
+
* @param color - RGB tuple [r, g, b] with values in 0–255 range
|
|
34
|
+
* @returns Relative luminance in 0–1 range (0 = black, 1 = white)
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* relativeLuminance([255, 255, 255]) // → 1.0 (white)
|
|
39
|
+
* relativeLuminance([0, 0, 0]) // → 0.0 (black)
|
|
40
|
+
* relativeLuminance([79, 70, 229]) // → ~0.067 (indigo)
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare function relativeLuminance(color: RGB): number;
|
|
44
|
+
/**
|
|
45
|
+
* Calculate the WCAG contrast ratio between two colors.
|
|
46
|
+
*
|
|
47
|
+
* @param foreground - RGB tuple [r, g, b] for the foreground (text) color
|
|
48
|
+
* @param background - RGB tuple [r, g, b] for the background color
|
|
49
|
+
* @returns Contrast ratio ≥ 1.0 (e.g. 4.5 means "4.5:1")
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* ```ts
|
|
53
|
+
* contrastRatio([0, 0, 0], [255, 255, 255]) // → 21.0 (max)
|
|
54
|
+
* contrastRatio([255, 255, 255], [0, 0, 0]) // → 21.0 (order doesn't matter)
|
|
55
|
+
* contrastRatio([79, 70, 229], [255, 255, 255]) // → ~4.56
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
declare function contrastRatio(foreground: RGB, background: RGB): number;
|
|
59
|
+
/**
|
|
60
|
+
* Check if a contrast ratio meets WCAG AA requirements.
|
|
61
|
+
*
|
|
62
|
+
* @param ratio - The contrast ratio to check
|
|
63
|
+
* @param textSize - "normal" (default, ≥ 4.5:1) or "large" (≥ 3:1)
|
|
64
|
+
* @returns `true` if the ratio meets the AA threshold
|
|
65
|
+
*/
|
|
66
|
+
declare function meetsAA(ratio: number, textSize?: TextSize): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Check if a contrast ratio meets WCAG AAA requirements.
|
|
69
|
+
*
|
|
70
|
+
* @param ratio - The contrast ratio to check
|
|
71
|
+
* @param textSize - "normal" (default, ≥ 7:1) or "large" (≥ 4.5:1)
|
|
72
|
+
* @returns `true` if the ratio meets the AAA threshold
|
|
73
|
+
*/
|
|
74
|
+
declare function meetsAAA(ratio: number, textSize?: TextSize): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Check if a contrast ratio meets WCAG AA for non-text elements (SC 1.4.11).
|
|
77
|
+
* This applies to UI component boundaries, focus indicators, and graphical objects.
|
|
78
|
+
*
|
|
79
|
+
* @param ratio - The contrast ratio to check
|
|
80
|
+
* @returns `true` if the ratio meets ≥ 3:1
|
|
81
|
+
*/
|
|
82
|
+
declare function meetsNonTextAA(ratio: number): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Parse a space-separated RGB string (as used in `design-system.css`) into
|
|
85
|
+
* an RGB tuple.
|
|
86
|
+
*
|
|
87
|
+
* @param rgbString - Space-separated RGB channels, e.g. "79 70 229"
|
|
88
|
+
* @returns RGB tuple [r, g, b]
|
|
89
|
+
* @throws {Error} If the string is not a valid 3-channel RGB value
|
|
90
|
+
*
|
|
91
|
+
* @example
|
|
92
|
+
* ```ts
|
|
93
|
+
* parseRGBString("79 70 229") // → [79, 70, 229]
|
|
94
|
+
* parseRGBString("255 255 255") // → [255, 255, 255]
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
declare function parseRGBString(rgbString: string): RGB;
|
|
98
|
+
/**
|
|
99
|
+
* Convert an RGB tuple back to a space-separated string.
|
|
100
|
+
*
|
|
101
|
+
* @param color - RGB tuple [r, g, b]
|
|
102
|
+
* @returns Space-separated string, e.g. "79 70 229"
|
|
103
|
+
*/
|
|
104
|
+
declare function toRGBString(color: RGB): string;
|
|
105
|
+
/**
|
|
106
|
+
* Parse a hex color string into an RGB tuple.
|
|
107
|
+
*
|
|
108
|
+
* @param hex - Hex color string (with or without #), supports 3 or 6 digits
|
|
109
|
+
* @returns RGB tuple [r, g, b]
|
|
110
|
+
* @throws {Error} If the string is not a valid hex color
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```ts
|
|
114
|
+
* parseHex("#4F46E5") // → [79, 70, 229]
|
|
115
|
+
* parseHex("4F46E5") // → [79, 70, 229]
|
|
116
|
+
* parseHex("#fff") // → [255, 255, 255]
|
|
117
|
+
* ```
|
|
118
|
+
*/
|
|
119
|
+
declare function parseHex(hex: string): RGB;
|
|
120
|
+
/**
|
|
121
|
+
* Perform a comprehensive WCAG contrast check between two colors.
|
|
122
|
+
* Accepts the space-separated RGB strings used in `design-system.css`.
|
|
123
|
+
*
|
|
124
|
+
* @param fgRGBString - Foreground color as "R G B" string (e.g. "255 255 255")
|
|
125
|
+
* @param bgRGBString - Background color as "R G B" string (e.g. "79 70 229")
|
|
126
|
+
* @returns Full contrast result with ratio and pass/fail for each WCAG level
|
|
127
|
+
*
|
|
128
|
+
* @example
|
|
129
|
+
* ```ts
|
|
130
|
+
* const result = checkDSContrast("255 255 255", "79 70 229");
|
|
131
|
+
* // → {
|
|
132
|
+
* // ratio: 4.56,
|
|
133
|
+
* // aa: true,
|
|
134
|
+
* // aaLarge: true,
|
|
135
|
+
* // aaa: false,
|
|
136
|
+
* // aaaLarge: true,
|
|
137
|
+
* // nonTextAA: true,
|
|
138
|
+
* // }
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
declare function checkDSContrast(fgRGBString: string, bgRGBString: string): ContrastResult;
|
|
142
|
+
/**
|
|
143
|
+
* Perform a comprehensive WCAG contrast check between two hex colors.
|
|
144
|
+
*
|
|
145
|
+
* @param fgHex - Foreground hex color (e.g. "#FFFFFF")
|
|
146
|
+
* @param bgHex - Background hex color (e.g. "#4F46E5")
|
|
147
|
+
* @returns Full contrast result with ratio and pass/fail for each WCAG level
|
|
148
|
+
*/
|
|
149
|
+
declare function checkHexContrast(fgHex: string, bgHex: string): ContrastResult;
|
|
150
|
+
/** A named color pair for batch auditing. */
|
|
151
|
+
interface ColorPair {
|
|
152
|
+
/** Human-readable label for the pair (e.g. "primary on background"). */
|
|
153
|
+
label: string;
|
|
154
|
+
/** Foreground color as space-separated RGB string. */
|
|
155
|
+
fg: string;
|
|
156
|
+
/** Background color as space-separated RGB string. */
|
|
157
|
+
bg: string;
|
|
158
|
+
}
|
|
159
|
+
/** Result of a single pair in a batch audit. */
|
|
160
|
+
interface AuditResult extends ContrastResult {
|
|
161
|
+
/** The label from the input pair. */
|
|
162
|
+
label: string;
|
|
163
|
+
/** The foreground RGB string. */
|
|
164
|
+
fg: string;
|
|
165
|
+
/** The background RGB string. */
|
|
166
|
+
bg: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Audit multiple color pairs against WCAG contrast requirements.
|
|
170
|
+
* Returns results for each pair, making it easy to identify failing
|
|
171
|
+
* combinations during design system QA.
|
|
172
|
+
*
|
|
173
|
+
* @param pairs - Array of labeled color pairs to check
|
|
174
|
+
* @returns Array of audit results, one per input pair
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```ts
|
|
178
|
+
* const results = auditContrast([
|
|
179
|
+
* { label: "primary text on bg", fg: "79 70 229", bg: "255 255 255" },
|
|
180
|
+
* { label: "muted text on bg", fg: "113 113 122", bg: "255 255 255" },
|
|
181
|
+
* { label: "danger on white", fg: "220 38 38", bg: "255 255 255" },
|
|
182
|
+
* ]);
|
|
183
|
+
*
|
|
184
|
+
* // Filter to just the failures:
|
|
185
|
+
* const failures = results.filter((r) => !r.aa);
|
|
186
|
+
* ```
|
|
187
|
+
*/
|
|
188
|
+
declare function auditContrast(pairs: ColorPair[]): AuditResult[];
|
|
189
|
+
/**
|
|
190
|
+
* Critical color pairs from the Unified UI light theme that must meet
|
|
191
|
+
* WCAG AA contrast. Use with `auditContrast()` for automated checks.
|
|
192
|
+
*
|
|
193
|
+
* @example
|
|
194
|
+
* ```ts
|
|
195
|
+
* const results = auditContrast(DS_LIGHT_CRITICAL_PAIRS);
|
|
196
|
+
* const failures = results.filter((r) => !r.aa);
|
|
197
|
+
* if (failures.length > 0) {
|
|
198
|
+
* console.error("WCAG AA failures:", failures);
|
|
199
|
+
* }
|
|
200
|
+
* ```
|
|
201
|
+
*/
|
|
202
|
+
declare const DS_LIGHT_CRITICAL_PAIRS: ColorPair[];
|
|
203
|
+
/**
|
|
204
|
+
* Critical color pairs from the Unified UI dark theme that must meet
|
|
205
|
+
* WCAG AA contrast. Use with `auditContrast()` for automated checks.
|
|
206
|
+
*/
|
|
207
|
+
declare const DS_DARK_CRITICAL_PAIRS: ColorPair[];
|
|
208
|
+
|
|
209
|
+
export { type AuditResult, type ColorPair, type ContrastResult, DS_DARK_CRITICAL_PAIRS, DS_LIGHT_CRITICAL_PAIRS, type RGB, type TextSize, WCAG_AAA_LARGE, WCAG_AAA_NORMAL, WCAG_AA_LARGE, WCAG_AA_NORMAL, WCAG_NON_TEXT_AA, auditContrast, checkDSContrast, checkHexContrast, contrastRatio, meetsAA, meetsAAA, meetsNonTextAA, parseHex, parseRGBString, relativeLuminance, toRGBString };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var WCAG_NON_TEXT_AA = 3;
|
|
1
|
+
const WCAG_AA_NORMAL = 4.5;
|
|
2
|
+
const WCAG_AA_LARGE = 3;
|
|
3
|
+
const WCAG_AAA_NORMAL = 7;
|
|
4
|
+
const WCAG_AAA_LARGE = 4.5;
|
|
5
|
+
const WCAG_NON_TEXT_AA = 3;
|
|
7
6
|
function linearize(channel) {
|
|
8
7
|
const normalized = channel / 255;
|
|
9
8
|
if (normalized <= 0.04045) {
|
|
@@ -96,7 +95,7 @@ function auditContrast(pairs) {
|
|
|
96
95
|
};
|
|
97
96
|
});
|
|
98
97
|
}
|
|
99
|
-
|
|
98
|
+
const DS_LIGHT_CRITICAL_PAIRS = [
|
|
100
99
|
// Primary text on backgrounds
|
|
101
100
|
{ label: "foreground on background", fg: "9 9 11", bg: "255 255 255" },
|
|
102
101
|
{ label: "primary on background", fg: "79 70 229", bg: "255 255 255" },
|
|
@@ -169,7 +168,7 @@ var DS_LIGHT_CRITICAL_PAIRS = [
|
|
|
169
168
|
bg: "255 255 255"
|
|
170
169
|
}
|
|
171
170
|
];
|
|
172
|
-
|
|
171
|
+
const DS_DARK_CRITICAL_PAIRS = [
|
|
173
172
|
// Primary text on backgrounds
|
|
174
173
|
{ label: "foreground on background", fg: "250 250 250", bg: "9 9 11" },
|
|
175
174
|
// Primary shifted to brand.400 (129 140 248) for AA on dark bg (6.67:1)
|
|
@@ -236,13 +235,23 @@ var DS_DARK_CRITICAL_PAIRS = [
|
|
|
236
235
|
bg: "9 9 11"
|
|
237
236
|
}
|
|
238
237
|
];
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
238
|
+
export {
|
|
239
|
+
DS_DARK_CRITICAL_PAIRS,
|
|
240
|
+
DS_LIGHT_CRITICAL_PAIRS,
|
|
241
|
+
WCAG_AAA_LARGE,
|
|
242
|
+
WCAG_AAA_NORMAL,
|
|
243
|
+
WCAG_AA_LARGE,
|
|
244
|
+
WCAG_AA_NORMAL,
|
|
245
|
+
WCAG_NON_TEXT_AA,
|
|
246
|
+
auditContrast,
|
|
247
|
+
checkDSContrast,
|
|
248
|
+
checkHexContrast,
|
|
249
|
+
contrastRatio,
|
|
250
|
+
meetsAA,
|
|
251
|
+
meetsAAA,
|
|
252
|
+
meetsNonTextAA,
|
|
253
|
+
parseHex,
|
|
254
|
+
parseRGBString,
|
|
255
|
+
relativeLuminance,
|
|
256
|
+
toRGBString
|
|
257
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var focus_ring_exports = {};
|
|
20
|
+
__export(focus_ring_exports, {
|
|
21
|
+
focusRingClassList: () => focusRingClassList,
|
|
22
|
+
focusRingClasses: () => focusRingClasses,
|
|
23
|
+
focusRingCompactClassList: () => focusRingCompactClassList,
|
|
24
|
+
focusRingCompactClasses: () => focusRingCompactClasses,
|
|
25
|
+
focusRingGroupRingClasses: () => focusRingGroupRingClasses,
|
|
26
|
+
focusRingGroupTriggerClasses: () => focusRingGroupTriggerClasses,
|
|
27
|
+
focusRingInsetClassList: () => focusRingInsetClassList,
|
|
28
|
+
focusRingInsetClasses: () => focusRingInsetClasses,
|
|
29
|
+
focusRingVariantOverrides: () => focusRingVariantOverrides,
|
|
30
|
+
focusWithinRingClassList: () => focusWithinRingClassList,
|
|
31
|
+
focusWithinRingClasses: () => focusWithinRingClasses
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(focus_ring_exports);
|
|
34
|
+
const focusRingClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
35
|
+
const focusRingClassList = [
|
|
36
|
+
"focus-visible:outline-none",
|
|
37
|
+
"focus-visible:border-border-strong"
|
|
38
|
+
];
|
|
39
|
+
const focusRingInsetClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
40
|
+
const focusRingInsetClassList = [
|
|
41
|
+
"focus-visible:outline-none",
|
|
42
|
+
"focus-visible:border-border-strong"
|
|
43
|
+
];
|
|
44
|
+
const focusRingCompactClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
45
|
+
const focusRingCompactClassList = [
|
|
46
|
+
"focus-visible:outline-none",
|
|
47
|
+
"focus-visible:border-border-strong"
|
|
48
|
+
];
|
|
49
|
+
const focusRingVariantOverrides = {
|
|
50
|
+
/** Override focus border color to danger red */
|
|
51
|
+
danger: "focus-visible:border-danger",
|
|
52
|
+
/** Override focus border color to success green */
|
|
53
|
+
success: "focus-visible:border-success",
|
|
54
|
+
/** Override focus border color to warning amber */
|
|
55
|
+
warning: "focus-visible:border-warning",
|
|
56
|
+
/** Override focus border color to info blue */
|
|
57
|
+
info: "focus-visible:border-info",
|
|
58
|
+
/** Override focus border color to current text color */
|
|
59
|
+
current: "focus-visible:border-current"
|
|
60
|
+
};
|
|
61
|
+
const focusRingGroupTriggerClasses = "focus-visible:outline-none";
|
|
62
|
+
const focusRingGroupRingClasses = "group-focus-visible:border-border-strong";
|
|
63
|
+
const focusWithinRingClasses = "focus-within:outline-none focus-within:border-border-strong";
|
|
64
|
+
const focusWithinRingClassList = [
|
|
65
|
+
"focus-within:outline-none",
|
|
66
|
+
"focus-within:border-border-strong"
|
|
67
|
+
];
|
|
68
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
69
|
+
0 && (module.exports = {
|
|
70
|
+
focusRingClassList,
|
|
71
|
+
focusRingClasses,
|
|
72
|
+
focusRingCompactClassList,
|
|
73
|
+
focusRingCompactClasses,
|
|
74
|
+
focusRingGroupRingClasses,
|
|
75
|
+
focusRingGroupTriggerClasses,
|
|
76
|
+
focusRingInsetClassList,
|
|
77
|
+
focusRingInsetClasses,
|
|
78
|
+
focusRingVariantOverrides,
|
|
79
|
+
focusWithinRingClassList,
|
|
80
|
+
focusWithinRingClasses
|
|
81
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard focus classes for interactive elements.
|
|
3
|
+
* Uses `focus-visible` for keyboard-only visibility.
|
|
4
|
+
* Applies a subtle border-color shift — no ring or outline.
|
|
5
|
+
*/
|
|
6
|
+
declare const focusRingClasses: "focus-visible:outline-none focus-visible:border-border-strong";
|
|
7
|
+
/**
|
|
8
|
+
* Array variant of the standard focus classes.
|
|
9
|
+
* Useful when building CVA base class arrays.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const buttonVariants = cva([...focusRingClassList, "inline-flex"], { ... });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare const focusRingClassList: readonly ["focus-visible:outline-none", "focus-visible:border-border-strong"];
|
|
17
|
+
/**
|
|
18
|
+
* Focus classes without ring-offset, for elements inside containers.
|
|
19
|
+
* Same subtle border-color shift as the standard variant.
|
|
20
|
+
*/
|
|
21
|
+
declare const focusRingInsetClasses: "focus-visible:outline-none focus-visible:border-border-strong";
|
|
22
|
+
/**
|
|
23
|
+
* Array variant of the inset focus classes.
|
|
24
|
+
*/
|
|
25
|
+
declare const focusRingInsetClassList: readonly ["focus-visible:outline-none", "focus-visible:border-border-strong"];
|
|
26
|
+
/**
|
|
27
|
+
* Compact focus classes. For small interactive elements.
|
|
28
|
+
* Same subtle treatment as the standard variant.
|
|
29
|
+
*/
|
|
30
|
+
declare const focusRingCompactClasses: "focus-visible:outline-none focus-visible:border-border-strong";
|
|
31
|
+
/**
|
|
32
|
+
* Array variant of the compact focus classes.
|
|
33
|
+
*/
|
|
34
|
+
declare const focusRingCompactClassList: readonly ["focus-visible:outline-none", "focus-visible:border-border-strong"];
|
|
35
|
+
/**
|
|
36
|
+
* Focus variant strings for use with error/success/warning states.
|
|
37
|
+
* Replace the border color with the appropriate semantic color.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* cn(
|
|
42
|
+
* focusRingClasses,
|
|
43
|
+
* hasError && focusRingVariantOverrides.danger,
|
|
44
|
+
* )
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare const focusRingVariantOverrides: {
|
|
48
|
+
/** Override focus border color to danger red */
|
|
49
|
+
readonly danger: "focus-visible:border-danger";
|
|
50
|
+
/** Override focus border color to success green */
|
|
51
|
+
readonly success: "focus-visible:border-success";
|
|
52
|
+
/** Override focus border color to warning amber */
|
|
53
|
+
readonly warning: "focus-visible:border-warning";
|
|
54
|
+
/** Override focus border color to info blue */
|
|
55
|
+
readonly info: "focus-visible:border-info";
|
|
56
|
+
/** Override focus border color to current text color */
|
|
57
|
+
readonly current: "focus-visible:border-current";
|
|
58
|
+
};
|
|
59
|
+
type FocusRingVariant = keyof typeof focusRingVariantOverrides;
|
|
60
|
+
/**
|
|
61
|
+
* Classes to apply on the focusable child element (add `group` to parent).
|
|
62
|
+
*/
|
|
63
|
+
declare const focusRingGroupTriggerClasses: "focus-visible:outline-none";
|
|
64
|
+
/**
|
|
65
|
+
* Classes to apply on the parent element that shows the focus indicator.
|
|
66
|
+
* The parent must have the `group` class.
|
|
67
|
+
* Uses a subtle border-color shift on the parent when a child is focused.
|
|
68
|
+
*/
|
|
69
|
+
declare const focusRingGroupRingClasses: "group-focus-visible:border-border-strong";
|
|
70
|
+
/**
|
|
71
|
+
* Focus indicator that activates when any descendant receives focus.
|
|
72
|
+
* Apply to the wrapper element (e.g., an input wrapper with icons).
|
|
73
|
+
*/
|
|
74
|
+
declare const focusWithinRingClasses: "focus-within:outline-none focus-within:border-border-strong";
|
|
75
|
+
/**
|
|
76
|
+
* Array variant of the focus-within classes.
|
|
77
|
+
*/
|
|
78
|
+
declare const focusWithinRingClassList: readonly ["focus-within:outline-none", "focus-within:border-border-strong"];
|
|
79
|
+
|
|
80
|
+
export { type FocusRingVariant, focusRingClassList, focusRingClasses, focusRingCompactClassList, focusRingCompactClasses, focusRingGroupRingClasses, focusRingGroupTriggerClasses, focusRingInsetClassList, focusRingInsetClasses, focusRingVariantOverrides, focusWithinRingClassList, focusWithinRingClasses };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standard focus classes for interactive elements.
|
|
3
|
+
* Uses `focus-visible` for keyboard-only visibility.
|
|
4
|
+
* Applies a subtle border-color shift — no ring or outline.
|
|
5
|
+
*/
|
|
6
|
+
declare const focusRingClasses: "focus-visible:outline-none focus-visible:border-border-strong";
|
|
7
|
+
/**
|
|
8
|
+
* Array variant of the standard focus classes.
|
|
9
|
+
* Useful when building CVA base class arrays.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const buttonVariants = cva([...focusRingClassList, "inline-flex"], { ... });
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
declare const focusRingClassList: readonly ["focus-visible:outline-none", "focus-visible:border-border-strong"];
|
|
17
|
+
/**
|
|
18
|
+
* Focus classes without ring-offset, for elements inside containers.
|
|
19
|
+
* Same subtle border-color shift as the standard variant.
|
|
20
|
+
*/
|
|
21
|
+
declare const focusRingInsetClasses: "focus-visible:outline-none focus-visible:border-border-strong";
|
|
22
|
+
/**
|
|
23
|
+
* Array variant of the inset focus classes.
|
|
24
|
+
*/
|
|
25
|
+
declare const focusRingInsetClassList: readonly ["focus-visible:outline-none", "focus-visible:border-border-strong"];
|
|
26
|
+
/**
|
|
27
|
+
* Compact focus classes. For small interactive elements.
|
|
28
|
+
* Same subtle treatment as the standard variant.
|
|
29
|
+
*/
|
|
30
|
+
declare const focusRingCompactClasses: "focus-visible:outline-none focus-visible:border-border-strong";
|
|
31
|
+
/**
|
|
32
|
+
* Array variant of the compact focus classes.
|
|
33
|
+
*/
|
|
34
|
+
declare const focusRingCompactClassList: readonly ["focus-visible:outline-none", "focus-visible:border-border-strong"];
|
|
35
|
+
/**
|
|
36
|
+
* Focus variant strings for use with error/success/warning states.
|
|
37
|
+
* Replace the border color with the appropriate semantic color.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* cn(
|
|
42
|
+
* focusRingClasses,
|
|
43
|
+
* hasError && focusRingVariantOverrides.danger,
|
|
44
|
+
* )
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
declare const focusRingVariantOverrides: {
|
|
48
|
+
/** Override focus border color to danger red */
|
|
49
|
+
readonly danger: "focus-visible:border-danger";
|
|
50
|
+
/** Override focus border color to success green */
|
|
51
|
+
readonly success: "focus-visible:border-success";
|
|
52
|
+
/** Override focus border color to warning amber */
|
|
53
|
+
readonly warning: "focus-visible:border-warning";
|
|
54
|
+
/** Override focus border color to info blue */
|
|
55
|
+
readonly info: "focus-visible:border-info";
|
|
56
|
+
/** Override focus border color to current text color */
|
|
57
|
+
readonly current: "focus-visible:border-current";
|
|
58
|
+
};
|
|
59
|
+
type FocusRingVariant = keyof typeof focusRingVariantOverrides;
|
|
60
|
+
/**
|
|
61
|
+
* Classes to apply on the focusable child element (add `group` to parent).
|
|
62
|
+
*/
|
|
63
|
+
declare const focusRingGroupTriggerClasses: "focus-visible:outline-none";
|
|
64
|
+
/**
|
|
65
|
+
* Classes to apply on the parent element that shows the focus indicator.
|
|
66
|
+
* The parent must have the `group` class.
|
|
67
|
+
* Uses a subtle border-color shift on the parent when a child is focused.
|
|
68
|
+
*/
|
|
69
|
+
declare const focusRingGroupRingClasses: "group-focus-visible:border-border-strong";
|
|
70
|
+
/**
|
|
71
|
+
* Focus indicator that activates when any descendant receives focus.
|
|
72
|
+
* Apply to the wrapper element (e.g., an input wrapper with icons).
|
|
73
|
+
*/
|
|
74
|
+
declare const focusWithinRingClasses: "focus-within:outline-none focus-within:border-border-strong";
|
|
75
|
+
/**
|
|
76
|
+
* Array variant of the focus-within classes.
|
|
77
|
+
*/
|
|
78
|
+
declare const focusWithinRingClassList: readonly ["focus-within:outline-none", "focus-within:border-border-strong"];
|
|
79
|
+
|
|
80
|
+
export { type FocusRingVariant, focusRingClassList, focusRingClasses, focusRingCompactClassList, focusRingCompactClasses, focusRingGroupRingClasses, focusRingGroupTriggerClasses, focusRingInsetClassList, focusRingInsetClasses, focusRingVariantOverrides, focusWithinRingClassList, focusWithinRingClasses };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const focusRingClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
2
|
+
const focusRingClassList = [
|
|
3
|
+
"focus-visible:outline-none",
|
|
4
|
+
"focus-visible:border-border-strong"
|
|
5
|
+
];
|
|
6
|
+
const focusRingInsetClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
7
|
+
const focusRingInsetClassList = [
|
|
8
|
+
"focus-visible:outline-none",
|
|
9
|
+
"focus-visible:border-border-strong"
|
|
10
|
+
];
|
|
11
|
+
const focusRingCompactClasses = "focus-visible:outline-none focus-visible:border-border-strong";
|
|
12
|
+
const focusRingCompactClassList = [
|
|
13
|
+
"focus-visible:outline-none",
|
|
14
|
+
"focus-visible:border-border-strong"
|
|
15
|
+
];
|
|
16
|
+
const focusRingVariantOverrides = {
|
|
17
|
+
/** Override focus border color to danger red */
|
|
18
|
+
danger: "focus-visible:border-danger",
|
|
19
|
+
/** Override focus border color to success green */
|
|
20
|
+
success: "focus-visible:border-success",
|
|
21
|
+
/** Override focus border color to warning amber */
|
|
22
|
+
warning: "focus-visible:border-warning",
|
|
23
|
+
/** Override focus border color to info blue */
|
|
24
|
+
info: "focus-visible:border-info",
|
|
25
|
+
/** Override focus border color to current text color */
|
|
26
|
+
current: "focus-visible:border-current"
|
|
27
|
+
};
|
|
28
|
+
const focusRingGroupTriggerClasses = "focus-visible:outline-none";
|
|
29
|
+
const focusRingGroupRingClasses = "group-focus-visible:border-border-strong";
|
|
30
|
+
const focusWithinRingClasses = "focus-within:outline-none focus-within:border-border-strong";
|
|
31
|
+
const focusWithinRingClassList = [
|
|
32
|
+
"focus-within:outline-none",
|
|
33
|
+
"focus-within:border-border-strong"
|
|
34
|
+
];
|
|
35
|
+
export {
|
|
36
|
+
focusRingClassList,
|
|
37
|
+
focusRingClasses,
|
|
38
|
+
focusRingCompactClassList,
|
|
39
|
+
focusRingCompactClasses,
|
|
40
|
+
focusRingGroupRingClasses,
|
|
41
|
+
focusRingGroupTriggerClasses,
|
|
42
|
+
focusRingInsetClassList,
|
|
43
|
+
focusRingInsetClasses,
|
|
44
|
+
focusRingVariantOverrides,
|
|
45
|
+
focusWithinRingClassList,
|
|
46
|
+
focusWithinRingClasses
|
|
47
|
+
};
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var utils_exports = {};
|
|
20
|
+
__export(utils_exports, {
|
|
21
|
+
DS_DARK_CRITICAL_PAIRS: () => import_contrast.DS_DARK_CRITICAL_PAIRS,
|
|
22
|
+
DS_LIGHT_CRITICAL_PAIRS: () => import_contrast.DS_LIGHT_CRITICAL_PAIRS,
|
|
23
|
+
WCAG_AAA_LARGE: () => import_contrast.WCAG_AAA_LARGE,
|
|
24
|
+
WCAG_AAA_NORMAL: () => import_contrast.WCAG_AAA_NORMAL,
|
|
25
|
+
WCAG_AA_LARGE: () => import_contrast.WCAG_AA_LARGE,
|
|
26
|
+
WCAG_AA_NORMAL: () => import_contrast.WCAG_AA_NORMAL,
|
|
27
|
+
WCAG_NON_TEXT_AA: () => import_contrast.WCAG_NON_TEXT_AA,
|
|
28
|
+
auditContrast: () => import_contrast.auditContrast,
|
|
29
|
+
checkDSContrast: () => import_contrast.checkDSContrast,
|
|
30
|
+
checkHexContrast: () => import_contrast.checkHexContrast,
|
|
31
|
+
cn: () => import_cn.cn,
|
|
32
|
+
composeRefs: () => import_cn.composeRefs,
|
|
33
|
+
contrastRatio: () => import_contrast.contrastRatio,
|
|
34
|
+
dsAttr: () => import_cn.dsAttr,
|
|
35
|
+
dsColorVar: () => import_cn.dsColorVar,
|
|
36
|
+
dsDataAttrs: () => import_types.dsDataAttrs,
|
|
37
|
+
dsStateAttr: () => import_cn.dsStateAttr,
|
|
38
|
+
dsVar: () => import_cn.dsVar,
|
|
39
|
+
focusRingClassList: () => import_focus_ring.focusRingClassList,
|
|
40
|
+
focusRingClasses: () => import_focus_ring.focusRingClasses,
|
|
41
|
+
focusRingCompactClassList: () => import_focus_ring.focusRingCompactClassList,
|
|
42
|
+
focusRingCompactClasses: () => import_focus_ring.focusRingCompactClasses,
|
|
43
|
+
focusRingGroupRingClasses: () => import_focus_ring.focusRingGroupRingClasses,
|
|
44
|
+
focusRingGroupTriggerClasses: () => import_focus_ring.focusRingGroupTriggerClasses,
|
|
45
|
+
focusRingInsetClassList: () => import_focus_ring.focusRingInsetClassList,
|
|
46
|
+
focusRingInsetClasses: () => import_focus_ring.focusRingInsetClasses,
|
|
47
|
+
focusRingVariantOverrides: () => import_focus_ring.focusRingVariantOverrides,
|
|
48
|
+
focusWithinRingClassList: () => import_focus_ring.focusWithinRingClassList,
|
|
49
|
+
focusWithinRingClasses: () => import_focus_ring.focusWithinRingClasses,
|
|
50
|
+
meetsAA: () => import_contrast.meetsAA,
|
|
51
|
+
meetsAAA: () => import_contrast.meetsAAA,
|
|
52
|
+
meetsNonTextAA: () => import_contrast.meetsNonTextAA,
|
|
53
|
+
mergeSlots: () => import_cn.mergeSlots,
|
|
54
|
+
noop: () => import_cn.noop,
|
|
55
|
+
parseHex: () => import_contrast.parseHex,
|
|
56
|
+
parseRGBString: () => import_contrast.parseRGBString,
|
|
57
|
+
relativeLuminance: () => import_contrast.relativeLuminance,
|
|
58
|
+
toRGBString: () => import_contrast.toRGBString,
|
|
59
|
+
typedKeys: () => import_cn.typedKeys
|
|
60
|
+
});
|
|
61
|
+
module.exports = __toCommonJS(utils_exports);
|
|
62
|
+
var import_cn = require("./cn");
|
|
63
|
+
var import_contrast = require("./contrast");
|
|
64
|
+
var import_focus_ring = require("./focus-ring");
|
|
65
|
+
var import_types = require("./types");
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
DS_DARK_CRITICAL_PAIRS,
|
|
69
|
+
DS_LIGHT_CRITICAL_PAIRS,
|
|
70
|
+
WCAG_AAA_LARGE,
|
|
71
|
+
WCAG_AAA_NORMAL,
|
|
72
|
+
WCAG_AA_LARGE,
|
|
73
|
+
WCAG_AA_NORMAL,
|
|
74
|
+
WCAG_NON_TEXT_AA,
|
|
75
|
+
auditContrast,
|
|
76
|
+
checkDSContrast,
|
|
77
|
+
checkHexContrast,
|
|
78
|
+
cn,
|
|
79
|
+
composeRefs,
|
|
80
|
+
contrastRatio,
|
|
81
|
+
dsAttr,
|
|
82
|
+
dsColorVar,
|
|
83
|
+
dsDataAttrs,
|
|
84
|
+
dsStateAttr,
|
|
85
|
+
dsVar,
|
|
86
|
+
focusRingClassList,
|
|
87
|
+
focusRingClasses,
|
|
88
|
+
focusRingCompactClassList,
|
|
89
|
+
focusRingCompactClasses,
|
|
90
|
+
focusRingGroupRingClasses,
|
|
91
|
+
focusRingGroupTriggerClasses,
|
|
92
|
+
focusRingInsetClassList,
|
|
93
|
+
focusRingInsetClasses,
|
|
94
|
+
focusRingVariantOverrides,
|
|
95
|
+
focusWithinRingClassList,
|
|
96
|
+
focusWithinRingClasses,
|
|
97
|
+
meetsAA,
|
|
98
|
+
meetsAAA,
|
|
99
|
+
meetsNonTextAA,
|
|
100
|
+
mergeSlots,
|
|
101
|
+
noop,
|
|
102
|
+
parseHex,
|
|
103
|
+
parseRGBString,
|
|
104
|
+
relativeLuminance,
|
|
105
|
+
toRGBString,
|
|
106
|
+
typedKeys
|
|
107
|
+
});
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { AsProp, PolymorphicProps, PolymorphicPropsWithRef, PolymorphicRef, SlotClasses, cn, composeRefs, dsAttr, dsColorVar, dsStateAttr, dsVar, mergeSlots, noop, typedKeys } from './cn.cjs';
|
|
2
|
+
export { AuditResult, ColorPair, ContrastResult, DS_DARK_CRITICAL_PAIRS, DS_LIGHT_CRITICAL_PAIRS, RGB, TextSize, WCAG_AAA_LARGE, WCAG_AAA_NORMAL, WCAG_AA_LARGE, WCAG_AA_NORMAL, WCAG_NON_TEXT_AA, auditContrast, checkDSContrast, checkHexContrast, contrastRatio, meetsAA, meetsAAA, meetsNonTextAA, parseHex, parseRGBString, relativeLuminance, toRGBString } from './contrast.cjs';
|
|
3
|
+
export { FocusRingVariant, focusRingClassList, focusRingClasses, focusRingCompactClassList, focusRingCompactClasses, focusRingGroupRingClasses, focusRingGroupTriggerClasses, focusRingInsetClassList, focusRingInsetClasses, focusRingVariantOverrides, focusWithinRingClassList, focusWithinRingClasses } from './focus-ring.cjs';
|
|
4
|
+
export { ChildrenProps, ComponentIntent, ComponentSize, Defined, MergedProps, OptionalChildrenProps, PartialExcept, PolymorphicComponent, RenderChildrenProps, RequireKeys, SlotConfig, SlotDefinition, SlotRenderFn, Slots, VariantKey, dsDataAttrs } from './types.cjs';
|
|
5
|
+
import 'clsx';
|
|
6
|
+
import 'react';
|