@stacksjs/components 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +477 -0
- package/dist/Accordion-x2gjedap.stx +108 -0
- package/dist/Audio-0fk6p9tn.stx +50 -0
- package/dist/Avatar-5m0v0s4x.stx +88 -0
- package/dist/Badge-ynes82vv.stx +70 -0
- package/dist/Breadcrumb-h9n427sk.stx +79 -0
- package/dist/Button-7xtrzn14.stx +89 -0
- package/dist/Calendar-egvx1pma.stx +232 -0
- package/dist/Card-r9w7vy1a.stx +74 -0
- package/dist/Checkbox-m8v46pmx.stx +92 -0
- package/dist/Checkout-vcnnr176.stx +39 -0
- package/dist/CodeBlock-mwex82cm.stx +57 -0
- package/dist/Combobox-npb08vkp.stx +13 -0
- package/dist/ComboboxButton-vcdyq4zw.stx +13 -0
- package/dist/ComboboxInput-c9d2p02m.stx +25 -0
- package/dist/ComboboxOption-7d0h9ash.stx +52 -0
- package/dist/ComboboxOptions-4dtqc0qa.stx +12 -0
- package/dist/CommandPalette-ah00bf8v.stx +39 -0
- package/dist/CommandPaletteItem-2yx0gvtj.stx +32 -0
- package/dist/DefaultPaymentMethod-emw5fg8s.stx +62 -0
- package/dist/Dialog-1w4rz7x0.stx +19 -0
- package/dist/DialogBackdrop-qbm3y5ab.stx +9 -0
- package/dist/DialogDescription-01w5j74b.stx +11 -0
- package/dist/DialogPanel-brsszrrs.stx +16 -0
- package/dist/DialogTitle-3rxhwg21.stx +11 -0
- package/dist/Drawer-yfaz8q7f.stx +137 -0
- package/dist/Dropdown-ng7nx556.stx +24 -0
- package/dist/DropdownButton-vc4zpyrb.stx +23 -0
- package/dist/DropdownItem-z491y23c.stx +43 -0
- package/dist/DropdownItems-7ykf29sj.stx +18 -0
- package/dist/EmailInput-bfshpj92.stx +41 -0
- package/dist/Footer-xdaf02nr.stx +66 -0
- package/dist/Form-z4f7w6r1.stx +209 -0
- package/dist/Hero-9vvp7pxf.stx +25 -0
- package/dist/Image-ktk0451c.stx +197 -0
- package/dist/Installation-33bj4rm7.stx +39 -0
- package/dist/Listbox-xcejcmyc.stx +14 -0
- package/dist/ListboxButton-nx5kmw19.stx +17 -0
- package/dist/ListboxLabel-aky8a73n.stx +11 -0
- package/dist/ListboxOption-6h4hsdz5.stx +57 -0
- package/dist/ListboxOptions-2sacdtm5.stx +16 -0
- package/dist/Login-s2jkvd9y.stx +163 -0
- package/dist/Navigator-tqqdgdkw.stx +138 -0
- package/dist/Notification-sry8egea.stx +71 -0
- package/dist/NumberInput-zm93ddfw.stx +138 -0
- package/dist/Pagination-yza9v4qw.stx +183 -0
- package/dist/PasswordInput-4xnndp5y.stx +155 -0
- package/dist/PaymentMethods-jxba6kek.stx +113 -0
- package/dist/Popover-scbqatjq.stx +24 -0
- package/dist/PopoverButton-rbxhzj4k.stx +23 -0
- package/dist/PopoverPanel-9ng1rm6e.stx +23 -0
- package/dist/Portal-j111yvqp.stx +74 -0
- package/dist/Progress-gbmw3akr.stx +142 -0
- package/dist/Radio-1n9qamv1.stx +81 -0
- package/dist/RadioGroup-12dw2vhk.stx +13 -0
- package/dist/RadioGroupDescription-bjm3mdht.stx +11 -0
- package/dist/RadioGroupLabel-aky8a73n.stx +11 -0
- package/dist/RadioGroupOption-9pcxgwmd.stx +51 -0
- package/dist/SearchInput-g240e2nq.stx +63 -0
- package/dist/Select-p9f94b20.stx +89 -0
- package/dist/Sidebar-gwxw8q38.stx +288 -0
- package/dist/SidebarFooter-887kxret.stx +95 -0
- package/dist/SidebarHeader-qjeyx0hv.stx +100 -0
- package/dist/SidebarItem-4dpwtmb4.stx +118 -0
- package/dist/SidebarSection-kh92fk4m.stx +108 -0
- package/dist/Signup-3nxq5zag.stx +161 -0
- package/dist/Skeleton-g0nx1njm.stx +48 -0
- package/dist/Spinner-w4zj58xp.stx +109 -0
- package/dist/Stepper-rwc5actp.stx +17 -0
- package/dist/StepperStep-h0k657nm.stx +53 -0
- package/dist/SubscriptionCheckout-4cbxdg7w.stx +353 -0
- package/dist/Switch-kjq8qd2p.stx +74 -0
- package/dist/Table-59j9qwp0.stx +14 -0
- package/dist/TableBody-reka2gwv.stx +10 -0
- package/dist/TableCell-j7nh4sgr.stx +10 -0
- package/dist/TableHead-ecbrwpqm.stx +10 -0
- package/dist/TableHeader-jn2shwsv.stx +13 -0
- package/dist/TableRow-xz8rrxhc.stx +11 -0
- package/dist/Tabs-kb6ex6m7.stx +145 -0
- package/dist/Teleport-819cg9zm.stx +101 -0
- package/dist/TextInput-zx9kgr79.stx +146 -0
- package/dist/Textarea-5xvmrb0z.stx +119 -0
- package/dist/Tooltip-5ehqsy49.stx +76 -0
- package/dist/Transition-2j39s044.stx +174 -0
- package/dist/TwoFactorChallenge-2q4gg89m.stx +125 -0
- package/dist/Video-6aq4shh4.stx +45 -0
- package/dist/VirtualList-weh5qtm1.stx +83 -0
- package/dist/VirtualTable-59a1eskc.stx +113 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/composables/index.d.ts +4 -0
- package/dist/composables/index.js +3 -0
- package/dist/composables/useCopyCode.d.ts +19 -0
- package/dist/composables/useDarkMode.d.ts +25 -0
- package/dist/composables/useSEO.d.ts +36 -0
- package/dist/composables/utilities/index.d.ts +5 -0
- package/dist/composables/utilities/useClickOutside.d.ts +28 -0
- package/dist/composables/utilities/useFocusTrap.d.ts +34 -0
- package/dist/composables/utilities/useKeyboard.d.ts +55 -0
- package/dist/composables/utilities/useLocalStorage.d.ts +33 -0
- package/dist/composables/utilities/useMediaQuery.d.ts +64 -0
- package/dist/index.d.ts +86 -0
- package/dist/index.js +19 -0
- package/dist/ui/accordion/index.d.ts +12 -0
- package/dist/ui/audio/index.d.ts +12 -0
- package/dist/ui/auth/index.d.ts +29 -0
- package/dist/ui/avatar/index.d.ts +11 -0
- package/dist/ui/badge/index.d.ts +9 -0
- package/dist/ui/breadcrumb/index.d.ts +13 -0
- package/dist/ui/button/index.d.ts +45 -0
- package/dist/ui/calendar/index.d.ts +13 -0
- package/dist/ui/card/index.d.ts +12 -0
- package/dist/ui/checkbox/index.d.ts +15 -0
- package/dist/ui/combobox/index.d.ts +35 -0
- package/dist/ui/command-palette/index.d.ts +13 -0
- package/dist/ui/dialog/index.d.ts +27 -0
- package/dist/ui/drawer/index.d.ts +8 -0
- package/dist/ui/dropdown/index.d.ts +25 -0
- package/dist/ui/form/index.d.ts +48 -0
- package/dist/ui/image/index.d.ts +21 -0
- package/dist/ui/input/index.d.ts +73 -0
- package/dist/ui/listbox/index.d.ts +34 -0
- package/dist/ui/navigator/index.d.ts +18 -0
- package/dist/ui/notification/index.d.ts +11 -0
- package/dist/ui/pagination/index.d.ts +10 -0
- package/dist/ui/payment/index.d.ts +53 -0
- package/dist/ui/popover/index.d.ts +19 -0
- package/dist/ui/portal/index.d.ts +5 -0
- package/dist/ui/progress/index.d.ts +11 -0
- package/dist/ui/radio/index.d.ts +14 -0
- package/dist/ui/radio-group/index.d.ts +26 -0
- package/dist/ui/select/index.d.ts +19 -0
- package/dist/ui/sidebar/index.d.ts +129 -0
- package/dist/ui/skeleton/index.d.ts +10 -0
- package/dist/ui/spinner/index.d.ts +8 -0
- package/dist/ui/stepper/index.d.ts +17 -0
- package/dist/ui/storage/index.d.ts +40 -0
- package/dist/ui/switch/index.d.ts +9 -0
- package/dist/ui/table/index.d.ts +29 -0
- package/dist/ui/tabs/index.d.ts +14 -0
- package/dist/ui/teleport/index.d.ts +6 -0
- package/dist/ui/textarea/index.d.ts +19 -0
- package/dist/ui/tooltip/index.d.ts +9 -0
- package/dist/ui/transition/index.d.ts +24 -0
- package/dist/ui/video/index.d.ts +15 -0
- package/dist/ui/virtual-list/index.d.ts +9 -0
- package/dist/ui/virtual-table/index.d.ts +19 -0
- package/dist/utils/accessibility.d.ts +285 -0
- package/dist/utils/animation/easing.d.ts +112 -0
- package/dist/utils/animation/helpers.d.ts +119 -0
- package/dist/utils/animation/index.d.ts +3 -0
- package/dist/utils/animation/keyframes.d.ts +334 -0
- package/dist/utils/error-handling.d.ts +182 -0
- package/dist/utils/highlighter.d.ts +27 -0
- package/dist/utils/highlighter.js +2 -0
- package/dist/utils/i18n.d.ts +245 -0
- package/dist/utils/keep-alive.d.ts +171 -0
- package/dist/utils/lazy-loading.d.ts +174 -0
- package/dist/utils/prop-validation.d.ts +106 -0
- package/dist/utils/theme.d.ts +234 -0
- package/package.json +69 -0
- package/src/components/CodeBlock.stx +57 -0
- package/src/components/Footer.stx +66 -0
- package/src/components/Hero.stx +25 -0
- package/src/components/Installation.stx +39 -0
- package/src/components/index.ts +4 -0
- package/src/composables/index.ts +4 -0
- package/src/composables/useCopyCode.ts +73 -0
- package/src/composables/useDarkMode.ts +100 -0
- package/src/composables/useSEO.ts +229 -0
- package/src/composables/utilities/index.ts +7 -0
- package/src/composables/utilities/useClickOutside.ts +72 -0
- package/src/composables/utilities/useFocusTrap.ts +159 -0
- package/src/composables/utilities/useKeyboard.ts +124 -0
- package/src/composables/utilities/useLocalStorage.ts +132 -0
- package/src/composables/utilities/useMediaQuery.ts +118 -0
- package/src/index.ts +99 -0
- package/src/stx.d.ts +4 -0
- package/src/ui/accordion/Accordion.stx +108 -0
- package/src/ui/accordion/index.ts +14 -0
- package/src/ui/audio/Audio.stx +50 -0
- package/src/ui/audio/README.md +42 -0
- package/src/ui/audio/index.ts +13 -0
- package/src/ui/auth/Login.stx +163 -0
- package/src/ui/auth/README.md +145 -0
- package/src/ui/auth/Signup.stx +161 -0
- package/src/ui/auth/TwoFactorChallenge.stx +125 -0
- package/src/ui/auth/index.ts +32 -0
- package/src/ui/avatar/Avatar.stx +88 -0
- package/src/ui/avatar/index.ts +12 -0
- package/src/ui/badge/Badge.stx +70 -0
- package/src/ui/badge/index.ts +10 -0
- package/src/ui/breadcrumb/Breadcrumb.stx +79 -0
- package/src/ui/breadcrumb/index.ts +15 -0
- package/src/ui/button/Button.stx +89 -0
- package/src/ui/button/README.md +100 -0
- package/src/ui/button/index.ts +85 -0
- package/src/ui/calendar/Calendar.stx +232 -0
- package/src/ui/calendar/README.md +254 -0
- package/src/ui/calendar/index.ts +14 -0
- package/src/ui/card/Card.stx +74 -0
- package/src/ui/card/index.ts +13 -0
- package/src/ui/checkbox/Checkbox.stx +92 -0
- package/src/ui/checkbox/index.ts +16 -0
- package/src/ui/combobox/Combobox.stx +13 -0
- package/src/ui/combobox/ComboboxButton.stx +13 -0
- package/src/ui/combobox/ComboboxInput.stx +25 -0
- package/src/ui/combobox/ComboboxOption.stx +52 -0
- package/src/ui/combobox/ComboboxOptions.stx +12 -0
- package/src/ui/combobox/README.md +154 -0
- package/src/ui/combobox/index.ts +40 -0
- package/src/ui/command-palette/CommandPalette.stx +39 -0
- package/src/ui/command-palette/CommandPaletteItem.stx +32 -0
- package/src/ui/command-palette/README.md +42 -0
- package/src/ui/command-palette/index.ts +15 -0
- package/src/ui/dialog/Dialog.stx +19 -0
- package/src/ui/dialog/DialogBackdrop.stx +9 -0
- package/src/ui/dialog/DialogDescription.stx +11 -0
- package/src/ui/dialog/DialogPanel.stx +16 -0
- package/src/ui/dialog/DialogTitle.stx +11 -0
- package/src/ui/dialog/README.md +133 -0
- package/src/ui/dialog/index.ts +32 -0
- package/src/ui/drawer/Drawer.stx +137 -0
- package/src/ui/drawer/README.md +110 -0
- package/src/ui/drawer/index.ts +9 -0
- package/src/ui/dropdown/Dropdown.stx +24 -0
- package/src/ui/dropdown/DropdownButton.stx +23 -0
- package/src/ui/dropdown/DropdownItem.stx +43 -0
- package/src/ui/dropdown/DropdownItems.stx +18 -0
- package/src/ui/dropdown/README.md +142 -0
- package/src/ui/dropdown/index.ts +29 -0
- package/src/ui/form/Form.stx +209 -0
- package/src/ui/form/index.ts +67 -0
- package/src/ui/heatmap/Heatmap.stx +315 -0
- package/src/ui/image/Image.stx +197 -0
- package/src/ui/image/README.md +171 -0
- package/src/ui/image/index.ts +22 -0
- package/src/ui/input/EmailInput.stx +41 -0
- package/src/ui/input/NumberInput.stx +138 -0
- package/src/ui/input/PasswordInput.stx +155 -0
- package/src/ui/input/SearchInput.stx +63 -0
- package/src/ui/input/TextInput.stx +146 -0
- package/src/ui/input/index.ts +180 -0
- package/src/ui/listbox/Listbox.stx +14 -0
- package/src/ui/listbox/ListboxButton.stx +17 -0
- package/src/ui/listbox/ListboxLabel.stx +11 -0
- package/src/ui/listbox/ListboxOption.stx +57 -0
- package/src/ui/listbox/ListboxOptions.stx +16 -0
- package/src/ui/listbox/README.md +143 -0
- package/src/ui/listbox/index.ts +39 -0
- package/src/ui/navigator/Navigator.stx +138 -0
- package/src/ui/navigator/README.md +352 -0
- package/src/ui/navigator/index.ts +20 -0
- package/src/ui/notification/Notification.stx +71 -0
- package/src/ui/notification/README.md +118 -0
- package/src/ui/notification/index.ts +12 -0
- package/src/ui/pagination/Pagination.stx +183 -0
- package/src/ui/pagination/index.ts +11 -0
- package/src/ui/payment/Checkout.stx +39 -0
- package/src/ui/payment/DefaultPaymentMethod.stx +62 -0
- package/src/ui/payment/PaymentMethods.stx +113 -0
- package/src/ui/payment/README.md +427 -0
- package/src/ui/payment/SubscriptionCheckout.stx +353 -0
- package/src/ui/payment/index.ts +59 -0
- package/src/ui/popover/Popover.stx +24 -0
- package/src/ui/popover/PopoverButton.stx +23 -0
- package/src/ui/popover/PopoverPanel.stx +23 -0
- package/src/ui/popover/README.md +95 -0
- package/src/ui/popover/index.ts +22 -0
- package/src/ui/portal/Portal.stx +74 -0
- package/src/ui/portal/index.ts +6 -0
- package/src/ui/progress/Progress.stx +142 -0
- package/src/ui/progress/index.ts +12 -0
- package/src/ui/radio/Radio.stx +81 -0
- package/src/ui/radio/index.ts +15 -0
- package/src/ui/radio-group/README.md +145 -0
- package/src/ui/radio-group/RadioGroup.stx +13 -0
- package/src/ui/radio-group/RadioGroupDescription.stx +11 -0
- package/src/ui/radio-group/RadioGroupLabel.stx +11 -0
- package/src/ui/radio-group/RadioGroupOption.stx +51 -0
- package/src/ui/radio-group/index.ts +30 -0
- package/src/ui/select/README.md +204 -0
- package/src/ui/select/Select.stx +89 -0
- package/src/ui/select/index.ts +21 -0
- package/src/ui/sidebar/Sidebar.stx +288 -0
- package/src/ui/sidebar/SidebarFooter.stx +95 -0
- package/src/ui/sidebar/SidebarHeader.stx +100 -0
- package/src/ui/sidebar/SidebarItem.stx +118 -0
- package/src/ui/sidebar/SidebarSection.stx +108 -0
- package/src/ui/sidebar/index.ts +175 -0
- package/src/ui/skeleton/Skeleton.stx +48 -0
- package/src/ui/skeleton/index.ts +11 -0
- package/src/ui/spinner/Spinner.stx +109 -0
- package/src/ui/spinner/index.ts +9 -0
- package/src/ui/stepper/README.md +36 -0
- package/src/ui/stepper/Stepper.stx +17 -0
- package/src/ui/stepper/StepperStep.stx +53 -0
- package/src/ui/stepper/index.ts +19 -0
- package/src/ui/storage/README.md +193 -0
- package/src/ui/storage/index.ts +347 -0
- package/src/ui/switch/README.md +133 -0
- package/src/ui/switch/Switch.stx +74 -0
- package/src/ui/switch/index.ts +10 -0
- package/src/ui/table/README.md +39 -0
- package/src/ui/table/Table.stx +14 -0
- package/src/ui/table/TableBody.stx +10 -0
- package/src/ui/table/TableCell.stx +10 -0
- package/src/ui/table/TableHead.stx +10 -0
- package/src/ui/table/TableHeader.stx +13 -0
- package/src/ui/table/TableRow.stx +11 -0
- package/src/ui/table/index.ts +35 -0
- package/src/ui/tabs/Tabs.stx +145 -0
- package/src/ui/tabs/index.ts +16 -0
- package/src/ui/teleport/Teleport.stx +101 -0
- package/src/ui/teleport/index.ts +7 -0
- package/src/ui/textarea/Textarea.stx +119 -0
- package/src/ui/textarea/index.ts +20 -0
- package/src/ui/tooltip/Tooltip.stx +76 -0
- package/src/ui/tooltip/index.ts +10 -0
- package/src/ui/transition/README.md +30 -0
- package/src/ui/transition/Transition.stx +174 -0
- package/src/ui/transition/index.ts +25 -0
- package/src/ui/video/README.md +48 -0
- package/src/ui/video/Video.stx +45 -0
- package/src/ui/video/index.ts +16 -0
- package/src/ui/virtual-list/VirtualList.stx +83 -0
- package/src/ui/virtual-list/index.ts +10 -0
- package/src/ui/virtual-table/VirtualTable.stx +113 -0
- package/src/ui/virtual-table/index.ts +21 -0
- package/src/utils/PROP_VALIDATION.md +458 -0
- package/src/utils/THEME_SYSTEM.md +702 -0
- package/src/utils/accessibility.ts +841 -0
- package/src/utils/animation/easing.ts +368 -0
- package/src/utils/animation/helpers.ts +223 -0
- package/src/utils/animation/index.ts +5 -0
- package/src/utils/animation/keyframes.ts +230 -0
- package/src/utils/error-handling.ts +473 -0
- package/src/utils/highlighter.ts +93 -0
- package/src/utils/i18n.ts +634 -0
- package/src/utils/keep-alive.ts +818 -0
- package/src/utils/lazy-loading.ts +530 -0
- package/src/utils/prop-validation.ts +478 -0
- package/src/utils/theme.ts +626 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare interface TransitionProps {
|
|
2
|
+
show?: boolean
|
|
3
|
+
enter?: string
|
|
4
|
+
enterFrom?: string
|
|
5
|
+
enterTo?: string
|
|
6
|
+
leave?: string
|
|
7
|
+
leaveFrom?: string
|
|
8
|
+
leaveTo?: string
|
|
9
|
+
appear?: boolean
|
|
10
|
+
appearFrom?: string
|
|
11
|
+
appearTo?: string
|
|
12
|
+
mode?: 'in-out' | 'out-in' | 'default'
|
|
13
|
+
duration?: number
|
|
14
|
+
delay?: number
|
|
15
|
+
preset?: 'fade' | 'slide' | 'slideLeft' | 'slideRight' | 'scale' | 'rotate' | 'zoom' | ''
|
|
16
|
+
onBeforeEnter?: () => void
|
|
17
|
+
onEnter?: () => void
|
|
18
|
+
onAfterEnter?: () => void
|
|
19
|
+
onBeforeLeave?: () => void
|
|
20
|
+
onLeave?: () => void
|
|
21
|
+
onAfterLeave?: () => void
|
|
22
|
+
className?: string
|
|
23
|
+
}
|
|
24
|
+
export { default as Transition } from './Transition.stx';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare interface VideoProps {
|
|
2
|
+
src: string
|
|
3
|
+
poster?: string
|
|
4
|
+
autoplay?: boolean
|
|
5
|
+
loop?: boolean
|
|
6
|
+
muted?: boolean
|
|
7
|
+
controls?: boolean
|
|
8
|
+
preload?: 'none' | 'metadata' | 'auto'
|
|
9
|
+
width?: number | string
|
|
10
|
+
height?: number | string
|
|
11
|
+
aspectRatio?: '16/9' | '4/3' | '1/1' | string
|
|
12
|
+
className?: string
|
|
13
|
+
title?: string
|
|
14
|
+
}
|
|
15
|
+
export { default as Video } from './Video.stx';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare interface VirtualTableColumn<T = any> {
|
|
2
|
+
key: string
|
|
3
|
+
label?: string
|
|
4
|
+
width?: number
|
|
5
|
+
minWidth?: string
|
|
6
|
+
render?: (value: any, row: T) => string
|
|
7
|
+
}
|
|
8
|
+
export declare interface VirtualTableProps<T = any> {
|
|
9
|
+
columns: VirtualTableColumn<T>[]
|
|
10
|
+
data: T[]
|
|
11
|
+
rowHeight?: number
|
|
12
|
+
height?: number
|
|
13
|
+
headerHeight?: number
|
|
14
|
+
overscan?: number
|
|
15
|
+
striped?: boolean
|
|
16
|
+
hoverable?: boolean
|
|
17
|
+
className?: string
|
|
18
|
+
}
|
|
19
|
+
export { default as VirtualTable } from './VirtualTable.stx';
|
|
@@ -0,0 +1,285 @@
|
|
|
1
|
+
export declare function generateId(prefix?: any): string;
|
|
2
|
+
/**
|
|
3
|
+
* Create accessible label and associate with element
|
|
4
|
+
*
|
|
5
|
+
* @param text - Label text
|
|
6
|
+
* @param element - Element to associate with
|
|
7
|
+
* @param options - Label options
|
|
8
|
+
* @param options.visible - Whether the label should be visible
|
|
9
|
+
* @param options.id - Custom ID for the label
|
|
10
|
+
* @returns Generated label ID
|
|
11
|
+
*/
|
|
12
|
+
export declare function createAriaLabel(text: string, element?: HTMLElement | null, options?: { visible?: boolean, id?: string }): string;
|
|
13
|
+
/**
|
|
14
|
+
* Create accessible description and associate with element
|
|
15
|
+
*
|
|
16
|
+
* @param text - Description text
|
|
17
|
+
* @param element - Element to associate with
|
|
18
|
+
* @returns Generated description ID
|
|
19
|
+
*/
|
|
20
|
+
export declare function createAriaDescription(text: string, element?: HTMLElement | null): string;
|
|
21
|
+
/**
|
|
22
|
+
* Announce message to screen readers
|
|
23
|
+
*
|
|
24
|
+
* Creates a live region and announces the message
|
|
25
|
+
*
|
|
26
|
+
* @param message - Message to announce
|
|
27
|
+
* @param priority - Announcement priority
|
|
28
|
+
*/
|
|
29
|
+
export declare function announceToScreenReader(message: string, priority?: AriaLive): void;
|
|
30
|
+
/**
|
|
31
|
+
* Get all focusable elements within a container
|
|
32
|
+
*
|
|
33
|
+
* @param container - Container element
|
|
34
|
+
* @returns Array of focusable elements
|
|
35
|
+
*/
|
|
36
|
+
export declare function getFocusableElements(container: HTMLElement): HTMLElement[];
|
|
37
|
+
/**
|
|
38
|
+
* Create a focus trap for modal dialogs and overlays
|
|
39
|
+
*
|
|
40
|
+
* Traps keyboard focus within a container element
|
|
41
|
+
*
|
|
42
|
+
* @param container - Container element to trap focus within
|
|
43
|
+
* @param options - Focus trap options
|
|
44
|
+
* @returns Focus trap instance
|
|
45
|
+
*/
|
|
46
|
+
export declare function createFocusTrap(container: HTMLElement, options?: FocusTrapOptions): FocusTrap;
|
|
47
|
+
export declare function createRovingTabindex(container: HTMLElement, options?: RovingTabindexOptions): () => void;
|
|
48
|
+
/**
|
|
49
|
+
* Check if element has keyboard focus
|
|
50
|
+
*/
|
|
51
|
+
export declare function hasFocus(element: HTMLElement): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Move focus to next/previous element
|
|
54
|
+
*/
|
|
55
|
+
export declare function moveFocus(direction: 'next' | 'previous', from?: HTMLElement): void;
|
|
56
|
+
/**
|
|
57
|
+
* Check if element is visible to screen readers
|
|
58
|
+
*/
|
|
59
|
+
export declare function isVisibleToScreenReader(element: HTMLElement): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Screen reader only text
|
|
62
|
+
*
|
|
63
|
+
* Creates visually hidden text that's accessible to screen readers
|
|
64
|
+
*/
|
|
65
|
+
export declare function createScreenReaderText(text: string): HTMLSpanElement;
|
|
66
|
+
/**
|
|
67
|
+
* Check if reduced motion is preferred
|
|
68
|
+
*/
|
|
69
|
+
export declare function prefersReducedMotion(): boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Check if high contrast mode is enabled
|
|
72
|
+
*/
|
|
73
|
+
export declare function prefersHighContrast(): boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Get color scheme preference
|
|
76
|
+
*/
|
|
77
|
+
export declare function getColorSchemePreference(): 'light' | 'dark' | null;
|
|
78
|
+
/**
|
|
79
|
+
* Skip link helper for keyboard navigation
|
|
80
|
+
*
|
|
81
|
+
* Creates a skip link that appears on focus
|
|
82
|
+
*/
|
|
83
|
+
export declare function createSkipLink(targetId: string, text?: any): HTMLAnchorElement;
|
|
84
|
+
/**
|
|
85
|
+
* Validate ARIA relationships
|
|
86
|
+
*
|
|
87
|
+
* Ensures aria-labelledby, aria-describedby, etc. reference valid IDs
|
|
88
|
+
*/
|
|
89
|
+
export declare function validateAriaRelationships(element: HTMLElement): string[];
|
|
90
|
+
/**
|
|
91
|
+
* Keyboard navigation helpers
|
|
92
|
+
*/
|
|
93
|
+
export declare const KeyboardKeys: {
|
|
94
|
+
Enter: 'Enter';
|
|
95
|
+
Space: ' ';
|
|
96
|
+
Escape: 'Escape';
|
|
97
|
+
ArrowUp: 'ArrowUp';
|
|
98
|
+
ArrowDown: 'ArrowDown';
|
|
99
|
+
ArrowLeft: 'ArrowLeft';
|
|
100
|
+
ArrowRight: 'ArrowRight';
|
|
101
|
+
Tab: 'Tab';
|
|
102
|
+
Home: 'Home';
|
|
103
|
+
End: 'End';
|
|
104
|
+
PageUp: 'PageUp';
|
|
105
|
+
PageDown: 'PageDown'
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* ARIA attribute helpers
|
|
109
|
+
*/
|
|
110
|
+
export declare const aria: {
|
|
111
|
+
/**
|
|
112
|
+
* Set aria-expanded attribute
|
|
113
|
+
*/
|
|
114
|
+
setExpanded(element: HTMLElement, expanded: boolean): unknown;
|
|
115
|
+
/**
|
|
116
|
+
* Set aria-selected attribute
|
|
117
|
+
*/
|
|
118
|
+
setSelected(element: HTMLElement, selected: boolean): unknown;
|
|
119
|
+
/**
|
|
120
|
+
* Set aria-checked attribute
|
|
121
|
+
*/
|
|
122
|
+
setChecked(element: HTMLElement, checked: boolean | 'mixed'): unknown;
|
|
123
|
+
/**
|
|
124
|
+
* Set aria-disabled attribute
|
|
125
|
+
*/
|
|
126
|
+
setDisabled(element: HTMLElement, disabled: boolean): unknown;
|
|
127
|
+
/**
|
|
128
|
+
* Set aria-hidden attribute
|
|
129
|
+
*/
|
|
130
|
+
setHidden(element: HTMLElement, hidden: boolean): unknown;
|
|
131
|
+
/**
|
|
132
|
+
* Set aria-pressed attribute (for toggle buttons)
|
|
133
|
+
*/
|
|
134
|
+
setPressed(element: HTMLElement, pressed: boolean): unknown;
|
|
135
|
+
/**
|
|
136
|
+
* Set aria-invalid attribute
|
|
137
|
+
*/
|
|
138
|
+
setInvalid(element: HTMLElement, invalid: boolean): unknown;
|
|
139
|
+
/**
|
|
140
|
+
* Set aria-required attribute
|
|
141
|
+
*/
|
|
142
|
+
setRequired(element: HTMLElement, required: boolean): unknown;
|
|
143
|
+
/**
|
|
144
|
+
* Set aria-live region
|
|
145
|
+
*/
|
|
146
|
+
setLive(element: HTMLElement, live: AriaLive): unknown;
|
|
147
|
+
/**
|
|
148
|
+
* Set aria-busy attribute
|
|
149
|
+
*/
|
|
150
|
+
setBusy(element: HTMLElement, busy: boolean): unknown
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Focus trap options
|
|
154
|
+
*/
|
|
155
|
+
export declare interface FocusTrapOptions {
|
|
156
|
+
initialFocus?: HTMLElement | null
|
|
157
|
+
returnFocus?: HTMLElement | null
|
|
158
|
+
escapeDeactivates?: boolean
|
|
159
|
+
clickOutsideDeactivates?: boolean
|
|
160
|
+
allowOutsideClick?: boolean | ((event: MouseEvent) => boolean)
|
|
161
|
+
onActivate?: () => void
|
|
162
|
+
onDeactivate?: () => void
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Focus trap instance
|
|
166
|
+
*/
|
|
167
|
+
export declare interface FocusTrap {
|
|
168
|
+
activate: () => void
|
|
169
|
+
deactivate: () => void
|
|
170
|
+
pause: () => void
|
|
171
|
+
unpause: () => void
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Manage focus order with roving tabindex
|
|
175
|
+
*
|
|
176
|
+
* Useful for toolbars, menus, and other composite widgets
|
|
177
|
+
*
|
|
178
|
+
* @param container - Container element
|
|
179
|
+
* @param options - Options
|
|
180
|
+
* @returns Cleanup function
|
|
181
|
+
*/
|
|
182
|
+
export declare interface RovingTabindexOptions {
|
|
183
|
+
selector?: string
|
|
184
|
+
initialIndex?: number
|
|
185
|
+
orientation?: 'horizontal' | 'vertical' | 'both'
|
|
186
|
+
loop?: boolean
|
|
187
|
+
onFocusChange?: (index: number, element: HTMLElement) => void
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Accessibility utilities for @stacksjs/components
|
|
191
|
+
*
|
|
192
|
+
* Provides comprehensive ARIA helpers, focus management, keyboard navigation,
|
|
193
|
+
* and screen reader utilities for building accessible components
|
|
194
|
+
*
|
|
195
|
+
* @example
|
|
196
|
+
* ```ts
|
|
197
|
+
* import { createAriaLabel, manageFocus, announceToScreenReader } from '@stacksjs/components'
|
|
198
|
+
*
|
|
199
|
+
* // Create accessible label
|
|
200
|
+
* const labelId = createAriaLabel('Search', element)
|
|
201
|
+
*
|
|
202
|
+
* // Manage focus
|
|
203
|
+
* const trap = createFocusTrap(dialogElement)
|
|
204
|
+
* trap.activate()
|
|
205
|
+
*
|
|
206
|
+
* // Announce to screen readers
|
|
207
|
+
* announceToScreenReader('Form submitted successfully')
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
/**
|
|
211
|
+
* ARIA live region types
|
|
212
|
+
*/
|
|
213
|
+
export type AriaLive = 'off' | 'polite' | 'assertive'
|
|
214
|
+
/**
|
|
215
|
+
* ARIA role types
|
|
216
|
+
*/
|
|
217
|
+
export type AriaRole = | 'alert'
|
|
218
|
+
| 'alertdialog'
|
|
219
|
+
| 'application'
|
|
220
|
+
| 'article'
|
|
221
|
+
| 'banner'
|
|
222
|
+
| 'button'
|
|
223
|
+
| 'cell'
|
|
224
|
+
| 'checkbox'
|
|
225
|
+
| 'columnheader'
|
|
226
|
+
| 'combobox'
|
|
227
|
+
| 'complementary'
|
|
228
|
+
| 'contentinfo'
|
|
229
|
+
| 'definition'
|
|
230
|
+
| 'dialog'
|
|
231
|
+
| 'directory'
|
|
232
|
+
| 'document'
|
|
233
|
+
| 'feed'
|
|
234
|
+
| 'figure'
|
|
235
|
+
| 'form'
|
|
236
|
+
| 'grid'
|
|
237
|
+
| 'gridcell'
|
|
238
|
+
| 'group'
|
|
239
|
+
| 'heading'
|
|
240
|
+
| 'img'
|
|
241
|
+
| 'link'
|
|
242
|
+
| 'list'
|
|
243
|
+
| 'listbox'
|
|
244
|
+
| 'listitem'
|
|
245
|
+
| 'log'
|
|
246
|
+
| 'main'
|
|
247
|
+
| 'marquee'
|
|
248
|
+
| 'math'
|
|
249
|
+
| 'menu'
|
|
250
|
+
| 'menubar'
|
|
251
|
+
| 'menuitem'
|
|
252
|
+
| 'menuitemcheckbox'
|
|
253
|
+
| 'menuitemradio'
|
|
254
|
+
| 'navigation'
|
|
255
|
+
| 'none'
|
|
256
|
+
| 'note'
|
|
257
|
+
| 'option'
|
|
258
|
+
| 'presentation'
|
|
259
|
+
| 'progressbar'
|
|
260
|
+
| 'radio'
|
|
261
|
+
| 'radiogroup'
|
|
262
|
+
| 'region'
|
|
263
|
+
| 'row'
|
|
264
|
+
| 'rowgroup'
|
|
265
|
+
| 'rowheader'
|
|
266
|
+
| 'scrollbar'
|
|
267
|
+
| 'search'
|
|
268
|
+
| 'searchbox'
|
|
269
|
+
| 'separator'
|
|
270
|
+
| 'slider'
|
|
271
|
+
| 'spinbutton'
|
|
272
|
+
| 'status'
|
|
273
|
+
| 'switch'
|
|
274
|
+
| 'tab'
|
|
275
|
+
| 'table'
|
|
276
|
+
| 'tablist'
|
|
277
|
+
| 'tabpanel'
|
|
278
|
+
| 'term'
|
|
279
|
+
| 'textbox'
|
|
280
|
+
| 'timer'
|
|
281
|
+
| 'toolbar'
|
|
282
|
+
| 'tooltip'
|
|
283
|
+
| 'tree'
|
|
284
|
+
| 'treegrid'
|
|
285
|
+
| 'treeitem'
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Linear easing - no acceleration
|
|
3
|
+
*/
|
|
4
|
+
export declare const linear: EasingFunction;
|
|
5
|
+
/**
|
|
6
|
+
* Quadratic ease-in - accelerating from zero velocity
|
|
7
|
+
*/
|
|
8
|
+
export declare const easeInQuad: EasingFunction;
|
|
9
|
+
/**
|
|
10
|
+
* Quadratic ease-out - decelerating to zero velocity
|
|
11
|
+
*/
|
|
12
|
+
export declare const easeOutQuad: EasingFunction;
|
|
13
|
+
/**
|
|
14
|
+
* Quadratic ease-in-out - acceleration until halfway, then deceleration
|
|
15
|
+
*/
|
|
16
|
+
export declare const easeInOutQuad: EasingFunction;
|
|
17
|
+
// Cubic
|
|
18
|
+
export declare const easeInCubic: EasingFunction;
|
|
19
|
+
export declare const easeOutCubic: EasingFunction;
|
|
20
|
+
export declare const easeInOutCubic: EasingFunction;
|
|
21
|
+
// Quartic
|
|
22
|
+
export declare const easeInQuart: EasingFunction;
|
|
23
|
+
export declare const easeOutQuart: EasingFunction;
|
|
24
|
+
export declare const easeInOutQuart: EasingFunction;
|
|
25
|
+
// Quintic
|
|
26
|
+
export declare const easeInQuint: EasingFunction;
|
|
27
|
+
export declare const easeOutQuint: EasingFunction;
|
|
28
|
+
export declare const easeInOutQuint: EasingFunction;
|
|
29
|
+
// Sinusoidal
|
|
30
|
+
export declare const easeInSine: EasingFunction;
|
|
31
|
+
export declare const easeOutSine: EasingFunction;
|
|
32
|
+
export declare const easeInOutSine: EasingFunction;
|
|
33
|
+
// Exponential
|
|
34
|
+
export declare const easeInExpo: EasingFunction;
|
|
35
|
+
export declare const easeOutExpo: EasingFunction;
|
|
36
|
+
export declare const easeInOutExpo: EasingFunction;
|
|
37
|
+
// Circular
|
|
38
|
+
export declare const easeInCirc: EasingFunction;
|
|
39
|
+
export declare const easeOutCirc: EasingFunction;
|
|
40
|
+
export declare const easeInOutCirc: EasingFunction;
|
|
41
|
+
// Elastic
|
|
42
|
+
export declare const easeInElastic: EasingFunction;
|
|
43
|
+
export declare const easeOutElastic: EasingFunction;
|
|
44
|
+
export declare const easeInOutElastic: EasingFunction;
|
|
45
|
+
// Back
|
|
46
|
+
export declare const easeInBack: EasingFunction;
|
|
47
|
+
export declare const easeOutBack: EasingFunction;
|
|
48
|
+
export declare const easeInOutBack: EasingFunction;
|
|
49
|
+
// Bounce
|
|
50
|
+
export declare const easeOutBounce: EasingFunction;
|
|
51
|
+
export declare const easeInBounce: EasingFunction;
|
|
52
|
+
export declare const easeInOutBounce: EasingFunction;
|
|
53
|
+
/**
|
|
54
|
+
* Object containing all easing functions
|
|
55
|
+
*
|
|
56
|
+
* Available easings: Linear, Quad, Cubic, Quart, Quint, Sine, Expo, Circ, Elastic, Back, Bounce
|
|
57
|
+
* Each with In, Out, InOut variants (except Linear)
|
|
58
|
+
*/
|
|
59
|
+
export declare const Easing: {
|
|
60
|
+
linear: EasingFunction
|
|
61
|
+
easeInQuad: EasingFunction
|
|
62
|
+
easeOutQuad: EasingFunction
|
|
63
|
+
easeInOutQuad: EasingFunction
|
|
64
|
+
easeInCubic: EasingFunction
|
|
65
|
+
easeOutCubic: EasingFunction
|
|
66
|
+
easeInOutCubic: EasingFunction
|
|
67
|
+
easeInQuart: EasingFunction
|
|
68
|
+
easeOutQuart: EasingFunction
|
|
69
|
+
easeInOutQuart: EasingFunction
|
|
70
|
+
easeInQuint: EasingFunction
|
|
71
|
+
easeOutQuint: EasingFunction
|
|
72
|
+
easeInOutQuint: EasingFunction
|
|
73
|
+
easeInSine: EasingFunction
|
|
74
|
+
easeOutSine: EasingFunction
|
|
75
|
+
easeInOutSine: EasingFunction
|
|
76
|
+
easeInExpo: EasingFunction
|
|
77
|
+
easeOutExpo: EasingFunction
|
|
78
|
+
easeInOutExpo: EasingFunction
|
|
79
|
+
easeInCirc: EasingFunction
|
|
80
|
+
easeOutCirc: EasingFunction
|
|
81
|
+
easeInOutCirc: EasingFunction
|
|
82
|
+
easeInElastic: EasingFunction
|
|
83
|
+
easeOutElastic: EasingFunction
|
|
84
|
+
easeInOutElastic: EasingFunction
|
|
85
|
+
easeInBack: EasingFunction
|
|
86
|
+
easeOutBack: EasingFunction
|
|
87
|
+
easeInOutBack: EasingFunction
|
|
88
|
+
easeInBounce: EasingFunction
|
|
89
|
+
easeOutBounce: EasingFunction
|
|
90
|
+
easeInOutBounce: EasingFunction
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Easing functions for smooth animations
|
|
94
|
+
*
|
|
95
|
+
* All easing functions follow the signature:
|
|
96
|
+
* @param t - Current time (0 to duration)
|
|
97
|
+
* @param b - Start value
|
|
98
|
+
* @param c - Change in value (end - start)
|
|
99
|
+
* @param d - Duration
|
|
100
|
+
* @returns Current value at time t
|
|
101
|
+
*
|
|
102
|
+
* @example
|
|
103
|
+
* ```ts
|
|
104
|
+
* import { Easing } from '@stacksjs/components'
|
|
105
|
+
*
|
|
106
|
+
* const value = Easing.easeInOutCubic(currentTime, startValue, changeInValue, duration)
|
|
107
|
+
* ```
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* Easing function type signature
|
|
111
|
+
*/
|
|
112
|
+
export type EasingFunction = (t: number, b: number, c: number, d: number) => number
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate CSS animation string
|
|
3
|
+
*
|
|
4
|
+
* @param name - Animation name
|
|
5
|
+
* @param options - Animation options
|
|
6
|
+
* @returns CSS animation string
|
|
7
|
+
*/
|
|
8
|
+
export declare function cssAnimation(name: string, options?: CSSAnimationOptions): string;
|
|
9
|
+
/**
|
|
10
|
+
* Apply CSS animation to an element
|
|
11
|
+
*
|
|
12
|
+
* @param element - Target element
|
|
13
|
+
* @param animationName - Name of CSS animation
|
|
14
|
+
* @param options - Animation options
|
|
15
|
+
*/
|
|
16
|
+
export declare function applyAnimation(element: HTMLElement, animationName: string, options?: CSSAnimationOptions): void;
|
|
17
|
+
/**
|
|
18
|
+
* Remove animation from an element
|
|
19
|
+
*
|
|
20
|
+
* @param element - Target element
|
|
21
|
+
*/
|
|
22
|
+
export declare function removeAnimation(element: HTMLElement): void;
|
|
23
|
+
/**
|
|
24
|
+
* Wait for animation to complete
|
|
25
|
+
*
|
|
26
|
+
* @param element - Target element
|
|
27
|
+
* @returns Promise that resolves when animation ends
|
|
28
|
+
*/
|
|
29
|
+
export declare function waitForAnimation(element: HTMLElement): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Stagger animations across multiple elements
|
|
32
|
+
*
|
|
33
|
+
* @param elements - Array of elements to animate
|
|
34
|
+
* @param animationName - Name of CSS animation
|
|
35
|
+
* @param options - Animation options with stagger delay in ms
|
|
36
|
+
*/
|
|
37
|
+
export declare function staggerAnimation(elements: HTMLElement[], animationName: string, options?: CSSAnimationOptions & { stagger?: number }): void;
|
|
38
|
+
/**
|
|
39
|
+
* Run animations in sequence
|
|
40
|
+
*
|
|
41
|
+
* @param element - Target element
|
|
42
|
+
* @param animations - Array of animations to run in order
|
|
43
|
+
* @returns Promise that resolves when all animations complete
|
|
44
|
+
*/
|
|
45
|
+
export declare function sequenceAnimations(element: HTMLElement, animations: Array<{ name: string, options?: CSSAnimationOptions }>): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Add animation class with automatic removal
|
|
48
|
+
*
|
|
49
|
+
* @param element - Target element
|
|
50
|
+
* @param animationClass - CSS class name
|
|
51
|
+
* @param duration - Duration in milliseconds before removing class
|
|
52
|
+
* @returns Promise that resolves when animation completes
|
|
53
|
+
*/
|
|
54
|
+
export declare function animateWithClass(element: HTMLElement, animationClass: string, duration?: any): Promise<void>;
|
|
55
|
+
/**
|
|
56
|
+
* Create custom CSS @keyframes rule dynamically
|
|
57
|
+
*
|
|
58
|
+
* @param name - Animation name
|
|
59
|
+
* @param frames - Keyframe definitions (percentage -> styles)
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* createKeyframes('custom-fade', {
|
|
64
|
+
* '0%': { opacity: '0' },
|
|
65
|
+
* '100%': { opacity: '1' }
|
|
66
|
+
* })
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export declare function createKeyframes(name: string, frames: Record<string, Record<string, string>>): void;
|
|
70
|
+
/**
|
|
71
|
+
* Predefined CSS animation class names (compatible with Tailwind/headwind)
|
|
72
|
+
*/
|
|
73
|
+
export declare const AnimationClasses: {
|
|
74
|
+
// Fade
|
|
75
|
+
fadeIn: 'animate-fade-in';
|
|
76
|
+
fadeOut: 'animate-fade-out';
|
|
77
|
+
// Slide
|
|
78
|
+
slideInUp: 'animate-slide-in-up';
|
|
79
|
+
slideInDown: 'animate-slide-in-down';
|
|
80
|
+
slideInLeft: 'animate-slide-in-left';
|
|
81
|
+
slideInRight: 'animate-slide-in-right';
|
|
82
|
+
// Zoom
|
|
83
|
+
zoomIn: 'animate-zoom-in';
|
|
84
|
+
zoomOut: 'animate-zoom-out';
|
|
85
|
+
// Bounce
|
|
86
|
+
bounce: 'animate-bounce';
|
|
87
|
+
// Spin
|
|
88
|
+
spin: 'animate-spin';
|
|
89
|
+
// Ping
|
|
90
|
+
ping: 'animate-ping';
|
|
91
|
+
// Pulse
|
|
92
|
+
pulse: 'animate-pulse'
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* CSS Animation helper utilities
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```ts
|
|
99
|
+
* import { applyAnimation, staggerAnimation } from '@stacksjs/components'
|
|
100
|
+
*
|
|
101
|
+
* // Apply animation
|
|
102
|
+
* applyAnimation(element, 'fade-in', { duration: '300ms' })
|
|
103
|
+
*
|
|
104
|
+
* // Stagger multiple elements
|
|
105
|
+
* staggerAnimation(elements, 'slide-in', { stagger: 100 })
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
/**
|
|
109
|
+
* CSS animation configuration options
|
|
110
|
+
*/
|
|
111
|
+
export declare interface CSSAnimationOptions {
|
|
112
|
+
duration?: string
|
|
113
|
+
timing?: string
|
|
114
|
+
delay?: string
|
|
115
|
+
iteration?: string
|
|
116
|
+
direction?: string
|
|
117
|
+
fill?: string
|
|
118
|
+
playState?: string
|
|
119
|
+
}
|