webcoreui 1.5.0-0 → 1.5.0-beta.1

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.
Files changed (228) hide show
  1. package/astro.d.ts +62 -56
  2. package/astro.js +4 -0
  3. package/components/Accordion/Accordion.astro +1 -1
  4. package/components/Accordion/Accordion.svelte +60 -58
  5. package/components/Accordion/Accordion.tsx +3 -1
  6. package/components/Alert/Alert.astro +2 -1
  7. package/components/Alert/Alert.svelte +9 -2
  8. package/components/Alert/Alert.tsx +10 -3
  9. package/components/Alert/alert.ts +2 -18
  10. package/components/AspectRatio/AspectRatio.astro +1 -1
  11. package/components/AspectRatio/AspectRatio.svelte +7 -2
  12. package/components/AspectRatio/AspectRatio.tsx +6 -3
  13. package/components/AspectRatio/aspectratio.ts +0 -10
  14. package/components/Avatar/Avatar.astro +1 -1
  15. package/components/Avatar/Avatar.svelte +3 -1
  16. package/components/Avatar/Avatar.tsx +3 -2
  17. package/components/Badge/Badge.astro +2 -1
  18. package/components/Badge/Badge.svelte +9 -2
  19. package/components/Badge/Badge.tsx +8 -3
  20. package/components/Badge/badge.ts +11 -13
  21. package/components/Banner/Banner.astro +1 -1
  22. package/components/Banner/Banner.svelte +7 -2
  23. package/components/Banner/Banner.tsx +6 -2
  24. package/components/Banner/banner.ts +0 -10
  25. package/components/BottomNavigation/BottomNavigation.astro +1 -1
  26. package/components/BottomNavigation/BottomNavigation.svelte +3 -1
  27. package/components/BottomNavigation/BottomNavigation.tsx +3 -2
  28. package/components/Breadcrumb/Breadcrumb.astro +1 -1
  29. package/components/Breadcrumb/Breadcrumb.svelte +3 -1
  30. package/components/Breadcrumb/Breadcrumb.tsx +3 -1
  31. package/components/Button/Button.astro +2 -1
  32. package/components/Button/Button.svelte +9 -2
  33. package/components/Button/Button.tsx +7 -2
  34. package/components/Button/button.ts +23 -20
  35. package/components/Card/Card.astro +9 -2
  36. package/components/Card/Card.svelte +17 -4
  37. package/components/Card/Card.tsx +23 -6
  38. package/components/Card/card.module.scss +11 -4
  39. package/components/Card/card.ts +3 -16
  40. package/components/Carousel/Carousel.astro +1 -1
  41. package/components/Carousel/Carousel.svelte +8 -3
  42. package/components/Carousel/Carousel.tsx +7 -2
  43. package/components/Carousel/carousel.ts +0 -12
  44. package/components/CarouselItem/CarouselItem.astro +14 -0
  45. package/components/CarouselItem/CarouselItem.svelte +18 -0
  46. package/components/CarouselItem/CarouselItem.tsx +18 -0
  47. package/components/CarouselItem/carouselItem.ts +4 -0
  48. package/components/Checkbox/Checkbox.astro +3 -6
  49. package/components/Checkbox/Checkbox.svelte +9 -7
  50. package/components/Checkbox/Checkbox.tsx +8 -5
  51. package/components/Checkbox/checkbox.ts +2 -17
  52. package/components/Collapsible/Collapsible.astro +1 -1
  53. package/components/Collapsible/Collapsible.svelte +9 -2
  54. package/components/Collapsible/Collapsible.tsx +8 -2
  55. package/components/Collapsible/collapsible.ts +0 -15
  56. package/components/ConditionalWrapper/ConditionalWrapper.astro +1 -1
  57. package/components/ConditionalWrapper/ConditionalWrapper.svelte +8 -2
  58. package/components/ConditionalWrapper/ConditionalWrapper.tsx +7 -2
  59. package/components/ConditionalWrapper/conditionalwrapper.ts +2 -14
  60. package/components/ContextMenu/ContextMenu.astro +2 -1
  61. package/components/ContextMenu/ContextMenu.svelte +9 -3
  62. package/components/ContextMenu/ContextMenu.tsx +8 -2
  63. package/components/ContextMenu/contextmenu.ts +2 -17
  64. package/components/Copy/Copy.astro +2 -2
  65. package/components/Copy/Copy.svelte +8 -3
  66. package/components/Copy/Copy.tsx +7 -3
  67. package/components/Copy/copy.ts +2 -12
  68. package/components/Counter/Counter.astro +3 -2
  69. package/components/Counter/Counter.svelte +10 -5
  70. package/components/Counter/Counter.tsx +11 -7
  71. package/components/Counter/counter.ts +2 -11
  72. package/components/DataTable/DataTable.astro +1 -1
  73. package/components/DataTable/DataTable.svelte +8 -2
  74. package/components/DataTable/DataTable.tsx +7 -2
  75. package/components/DataTable/datatable.ts +0 -12
  76. package/components/Flex/Flex.astro +2 -1
  77. package/components/Flex/Flex.svelte +8 -2
  78. package/components/Flex/Flex.tsx +8 -3
  79. package/components/Flex/flex.ts +2 -15
  80. package/components/Footer/Footer.astro +1 -1
  81. package/components/Footer/Footer.svelte +7 -2
  82. package/components/Footer/Footer.tsx +6 -2
  83. package/components/Footer/footer.ts +0 -10
  84. package/components/Grid/Grid.astro +2 -1
  85. package/components/Grid/Grid.svelte +8 -2
  86. package/components/Grid/Grid.tsx +8 -3
  87. package/components/Grid/grid.ts +2 -15
  88. package/components/Group/Group.astro +1 -1
  89. package/components/Group/Group.svelte +7 -2
  90. package/components/Group/Group.tsx +6 -2
  91. package/components/Group/group.ts +0 -10
  92. package/components/Icon/Icon.astro +1 -1
  93. package/components/Icon/Icon.svelte +3 -1
  94. package/components/Icon/Icon.tsx +3 -2
  95. package/components/Image/Image.astro +2 -1
  96. package/components/Image/Image.svelte +4 -1
  97. package/components/Image/Image.tsx +3 -1
  98. package/components/Image/image.ts +2 -3
  99. package/components/ImageLoader/ImageLoader.astro +1 -1
  100. package/components/ImageLoader/ImageLoader.svelte +3 -1
  101. package/components/ImageLoader/ImageLoader.tsx +3 -1
  102. package/components/Input/Input.astro +3 -2
  103. package/components/Input/Input.svelte +14 -4
  104. package/components/Input/Input.tsx +11 -3
  105. package/components/Input/input.ts +26 -53
  106. package/components/Kbd/Kbd.astro +1 -1
  107. package/components/Kbd/Kbd.svelte +7 -2
  108. package/components/Kbd/Kbd.tsx +6 -2
  109. package/components/Kbd/kbd.ts +0 -10
  110. package/components/List/List.astro +1 -1
  111. package/components/List/List.svelte +6 -2
  112. package/components/List/List.tsx +8 -4
  113. package/components/List/list.ts +0 -8
  114. package/components/Masonry/Masonry.astro +1 -1
  115. package/components/Masonry/Masonry.svelte +7 -2
  116. package/components/Masonry/Masonry.tsx +7 -3
  117. package/components/Masonry/masonry.ts +2 -13
  118. package/components/Menu/Menu.astro +1 -1
  119. package/components/Menu/Menu.svelte +7 -2
  120. package/components/Menu/Menu.tsx +6 -2
  121. package/components/Menu/menu.ts +0 -10
  122. package/components/Modal/Modal.astro +2 -3
  123. package/components/Modal/Modal.svelte +8 -4
  124. package/components/Modal/Modal.tsx +6 -4
  125. package/components/Modal/modal.ts +2 -14
  126. package/components/OTPInput/OTPInput.astro +3 -5
  127. package/components/OTPInput/OTPInput.svelte +6 -6
  128. package/components/OTPInput/OTPInput.tsx +10 -8
  129. package/components/OTPInput/otpinput.ts +2 -4
  130. package/components/Pagination/Pagination.astro +1 -1
  131. package/components/Pagination/Pagination.svelte +6 -2
  132. package/components/Pagination/Pagination.tsx +6 -2
  133. package/components/Pagination/pagination.ts +0 -8
  134. package/components/Popover/Popover.astro +3 -7
  135. package/components/Popover/Popover.svelte +9 -8
  136. package/components/Popover/Popover.tsx +9 -12
  137. package/components/Popover/popover.ts +2 -15
  138. package/components/Progress/Progress.astro +1 -1
  139. package/components/Progress/Progress.svelte +3 -1
  140. package/components/Progress/Progress.tsx +3 -1
  141. package/components/Radio/Radio.astro +3 -4
  142. package/components/Radio/Radio.svelte +10 -5
  143. package/components/Radio/Radio.tsx +7 -5
  144. package/components/Radio/radio.ts +2 -14
  145. package/components/RangeSlider/RangeSlider.astro +1 -1
  146. package/components/RangeSlider/RangeSlider.svelte +6 -2
  147. package/components/RangeSlider/RangeSlider.tsx +7 -3
  148. package/components/RangeSlider/rangeslider.ts +0 -9
  149. package/components/Rating/Rating.astro +1 -1
  150. package/components/Rating/Rating.svelte +3 -1
  151. package/components/Rating/Rating.tsx +3 -1
  152. package/components/Ribbon/Ribbon.astro +1 -1
  153. package/components/Ribbon/Ribbon.svelte +7 -2
  154. package/components/Ribbon/Ribbon.tsx +6 -2
  155. package/components/Ribbon/ribbon.ts +0 -10
  156. package/components/Select/Select.astro +1 -1
  157. package/components/Select/Select.svelte +9 -4
  158. package/components/Select/Select.tsx +9 -4
  159. package/components/Select/select.ts +1 -12
  160. package/components/Sheet/Sheet.astro +2 -1
  161. package/components/Sheet/Sheet.svelte +5 -3
  162. package/components/Sheet/Sheet.tsx +5 -4
  163. package/components/Sheet/sheet.ts +3 -10
  164. package/components/Sidebar/Sidebar.astro +1 -1
  165. package/components/Sidebar/Sidebar.svelte +7 -2
  166. package/components/Sidebar/Sidebar.tsx +6 -2
  167. package/components/Sidebar/sidebar.ts +0 -10
  168. package/components/Skeleton/Skeleton.astro +1 -1
  169. package/components/Skeleton/Skeleton.svelte +3 -1
  170. package/components/Skeleton/Skeleton.tsx +3 -1
  171. package/components/Slider/Slider.astro +1 -1
  172. package/components/Slider/Slider.svelte +8 -2
  173. package/components/Slider/Slider.tsx +6 -2
  174. package/components/Slider/slider.ts +0 -10
  175. package/components/SpeedDial/SpeedDial.astro +1 -1
  176. package/components/SpeedDial/SpeedDial.svelte +3 -1
  177. package/components/SpeedDial/SpeedDial.tsx +3 -1
  178. package/components/Spinner/Spinner.astro +1 -1
  179. package/components/Spinner/Spinner.svelte +3 -1
  180. package/components/Spinner/Spinner.tsx +3 -1
  181. package/components/Spoiler/Spoiler.astro +1 -1
  182. package/components/Spoiler/Spoiler.svelte +7 -2
  183. package/components/Spoiler/Spoiler.tsx +6 -2
  184. package/components/Spoiler/spoiler.ts +0 -10
  185. package/components/Stepper/Stepper.astro +1 -1
  186. package/components/Stepper/Stepper.svelte +3 -1
  187. package/components/Stepper/Stepper.tsx +3 -1
  188. package/components/Switch/Switch.astro +7 -2
  189. package/components/Switch/Switch.svelte +13 -4
  190. package/components/Switch/Switch.tsx +8 -4
  191. package/components/Switch/switch.ts +2 -16
  192. package/components/Tab/Tab.astro +25 -0
  193. package/components/Tab/Tab.svelte +28 -0
  194. package/components/Tab/Tab.tsx +30 -0
  195. package/components/Tab/tab.ts +6 -0
  196. package/components/Table/Table.astro +1 -1
  197. package/components/Table/Table.svelte +3 -1
  198. package/components/Table/Table.tsx +3 -1
  199. package/components/Tabs/Tabs.astro +58 -25
  200. package/components/Tabs/Tabs.svelte +45 -12
  201. package/components/Tabs/Tabs.tsx +42 -11
  202. package/components/Tabs/tabs.module.scss +7 -6
  203. package/components/Tabs/tabs.ts +0 -10
  204. package/components/Textarea/Textarea.astro +3 -6
  205. package/components/Textarea/Textarea.svelte +10 -7
  206. package/components/Textarea/Textarea.tsx +9 -7
  207. package/components/Textarea/textarea.ts +2 -17
  208. package/components/ThemeSwitcher/ThemeSwitcher.astro +1 -1
  209. package/components/ThemeSwitcher/ThemeSwitcher.svelte +9 -3
  210. package/components/ThemeSwitcher/ThemeSwitcher.tsx +7 -2
  211. package/components/ThemeSwitcher/themeswitcher.ts +0 -13
  212. package/components/Timeline/Timeline.astro +1 -1
  213. package/components/Timeline/Timeline.svelte +7 -2
  214. package/components/Timeline/Timeline.tsx +6 -2
  215. package/components/Timeline/timeline.ts +0 -10
  216. package/components/TimelineItem/TimelineItem.astro +1 -1
  217. package/components/TimelineItem/TimelineItem.svelte +7 -2
  218. package/components/TimelineItem/TimelineItem.tsx +8 -3
  219. package/components/TimelineItem/timelineitem.ts +0 -12
  220. package/components/Toast/Toast.astro +2 -1
  221. package/components/Toast/Toast.svelte +5 -3
  222. package/components/Toast/Toast.tsx +5 -4
  223. package/components/Toast/toast.ts +3 -11
  224. package/package.json +19 -19
  225. package/react.d.ts +145 -138
  226. package/react.js +4 -0
  227. package/svelte.d.ts +145 -138
  228. package/svelte.js +4 -0
package/astro.d.ts CHANGED
@@ -1,59 +1,61 @@
1
- import type { AccordionProps as WAccordionProps } from './components/Accordion/accordion'
2
- import type { AlertProps as WAlertProps } from './components/Alert/alert'
3
- import type { AspectRatioProps as WAspectRatioProps } from './components/AspectRatio/aspectratio'
4
- import type { AvatarProps as WAvatarProps } from './components/Avatar/avatar'
5
- import type { BadgeProps as WBadgeProps } from './components/Badge/badge'
6
- import type { BannerProps as WBannerProps } from './components/Banner/banner'
7
- import type { BottomNavigationProps as WBottomNavigationProps } from './components/BottomNavigation/bottomnavigation'
8
- import type { BreadcrumbProps as WBreadcrumbProps } from './components/Breadcrumb/breadcrumb'
9
- import type { ButtonProps as WButtonProps } from './components/Button/button'
10
- import type { CardProps as WCardProps } from './components/Card/card'
11
- import type { CarouselProps as WCarouselProps } from './components/Carousel/carousel'
12
- import type { CheckboxProps as WCheckboxProps } from './components/Checkbox/checkbox'
13
- import type { CollapsibleProps as WCollapsibleProps } from './components/Collapsible/collapsible'
14
- import type { ConditionalWrapperProps as WConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
15
- import type { ContextMenuProps as WContextMenuProps } from './components/ContextMenu/contextmenu'
16
- import type { CopyProps as WCopyProps } from './components/Copy/copy'
17
- import type { CounterProps as WCounterProps } from './components/Counter/counter'
18
- import type { DataTableProps as WDataTableProps } from './components/DataTable/datatable'
19
- import type { FlexProps as WFlexProps } from './components/Flex/flex'
20
- import type { FooterProps as WFooterProps } from './components/Footer/footer'
21
- import type { GridProps as WGridProps } from './components/Grid/grid'
22
- import type { GroupProps as WGroupProps } from './components/Group/group'
23
- import type { IconProps as WIconProps } from './components/Icon/icon'
24
- import type { ImageProps as WImageProps } from './components/Image/image'
25
- import type { ImageLoaderProps as WImageLoaderProps } from './components/ImageLoader/imageloader'
26
- import type { InputProps as WInputProps } from './components/Input/input'
27
- import type { KbdProps as WKbdProps } from './components/Kbd/kbd'
28
- import type { ListProps as WListProps } from './components/List/list'
29
- import type { MasonryProps as WMasonryProps } from './components/Masonry/masonry'
30
- import type { MenuProps as WMenuProps } from './components/Menu/menu'
31
- import type { ModalProps as WModalProps } from './components/Modal/modal'
32
- import type { OTPInputProps as WOTPInputProps } from './components/OTPInput/otpinput'
33
- import type { PaginationProps as WPaginationProps } from './components/Pagination/pagination'
34
- import type { PopoverProps as WPopoverProps } from './components/Popover/popover'
35
- import type { ProgressProps as WProgressProps } from './components/Progress/progress'
36
- import type { RadioProps as WRadioProps } from './components/Radio/radio'
37
- import type { RangeSliderProps as WRangeSliderProps } from './components/RangeSlider/rangeslider'
38
- import type { RatingProps as WRatingProps } from './components/Rating/rating'
39
- import type { RibbonProps as WRibbonProps } from './components/Ribbon/ribbon'
40
- import type { SelectProps as WSelectProps } from './components/Select/select'
41
- import type { SheetProps as WSheetProps } from './components/Sheet/sheet'
42
- import type { SidebarProps as WSidebarProps } from './components/Sidebar/sidebar'
43
- import type { SkeletonProps as WSkeletonProps } from './components/Skeleton/skeleton'
44
- import type { SliderProps as WSliderProps } from './components/Slider/slider'
45
- import type { SpeedDialProps as WSpeedDialProps } from './components/SpeedDial/speeddial'
46
- import type { SpinnerProps as WSpinnerProps } from './components/Spinner/spinner'
47
- import type { SpoilerProps as WSpoilerProps } from './components/Spoiler/spoiler'
48
- import type { StepperProps as WStepperProps } from './components/Stepper/stepper'
49
- import type { SwitchProps as WSwitchProps } from './components/Switch/switch'
50
- import type { TableProps as WTableProps } from './components/Table/table'
51
- import type { TabsProps as WTabsProps } from './components/Tabs/tabs'
52
- import type { TextareaProps as WTextareaProps } from './components/Textarea/textarea'
53
- import type { ThemeSwitcherProps as WThemeSwitcherProps } from './components/ThemeSwitcher/themeswitcher'
54
- import type { TimelineProps as WTimelineProps } from './components/Timeline/timeline'
55
- import type { TimelineItemProps as WTimelineItemProps } from './components/TimelineItem/timelineitem'
56
- import type { ToastProps as WToastProps } from './components/Toast/toast'
1
+ import type { Props as WAccordionProps } from './components/Accordion/Accordion.astro'
2
+ import type { Props as WAlertProps } from './components/Alert/Alert.astro'
3
+ import type { Props as WAspectRatioProps } from './components/AspectRatio/AspectRatio.astro'
4
+ import type { Props as WAvatarProps } from './components/Avatar/Avatar.astro'
5
+ import type { Props as WBadgeProps } from './components/Badge/Badge.astro'
6
+ import type { Props as WBannerProps } from './components/Banner/Banner.astro'
7
+ import type { Props as WBottomNavigationProps } from './components/BottomNavigation/BottomNavigation.astro'
8
+ import type { Props as WBreadcrumbProps } from './components/Breadcrumb/Breadcrumb.astro'
9
+ import type { Props as WButtonProps } from './components/Button/Button.astro'
10
+ import type { Props as WCardProps } from './components/Card/Card.astro'
11
+ import type { Props as WCarouselProps } from './components/Carousel/Carousel.astro'
12
+ import type { Props as WCarouselItemProps } from './components/CarouselItem/CarouselItem.astro'
13
+ import type { Props as WCheckboxProps } from './components/Checkbox/Checkbox.astro'
14
+ import type { Props as WCollapsibleProps } from './components/Collapsible/Collapsible.astro'
15
+ import type { Props as WConditionalWrapperProps } from './components/ConditionalWrapper/ConditionalWrapper.astro'
16
+ import type { Props as WContextMenuProps } from './components/ContextMenu/ContextMenu.astro'
17
+ import type { Props as WCopyProps } from './components/Copy/Copy.astro'
18
+ import type { Props as WCounterProps } from './components/Counter/Counter.astro'
19
+ import type { Props as WDataTableProps } from './components/DataTable/DataTable.astro'
20
+ import type { Props as WFlexProps } from './components/Flex/Flex.astro'
21
+ import type { Props as WFooterProps } from './components/Footer/Footer.astro'
22
+ import type { Props as WGridProps } from './components/Grid/Grid.astro'
23
+ import type { Props as WGroupProps } from './components/Group/Group.astro'
24
+ import type { Props as WIconProps } from './components/Icon/Icon.astro'
25
+ import type { Props as WImageProps } from './components/Image/Image.astro'
26
+ import type { Props as WImageLoaderProps } from './components/ImageLoader/ImageLoader.astro'
27
+ import type { Props as WInputProps } from './components/Input/Input.astro'
28
+ import type { Props as WKbdProps } from './components/Kbd/Kbd.astro'
29
+ import type { Props as WListProps } from './components/List/List.astro'
30
+ import type { Props as WMasonryProps } from './components/Masonry/Masonry.astro'
31
+ import type { Props as WMenuProps } from './components/Menu/Menu.astro'
32
+ import type { Props as WModalProps } from './components/Modal/Modal.astro'
33
+ import type { Props as WOTPInputProps } from './components/OTPInput/OTPInput.astro'
34
+ import type { Props as WPaginationProps } from './components/Pagination/Pagination.astro'
35
+ import type { Props as WPopoverProps } from './components/Popover/Popover.astro'
36
+ import type { Props as WProgressProps } from './components/Progress/Progress.astro'
37
+ import type { Props as WRadioProps } from './components/Radio/Radio.astro'
38
+ import type { Props as WRangeSliderProps } from './components/RangeSlider/RangeSlider.astro'
39
+ import type { Props as WRatingProps } from './components/Rating/Rating.astro'
40
+ import type { Props as WRibbonProps } from './components/Ribbon/Ribbon.astro'
41
+ import type { Props as WSelectProps } from './components/Select/Select.astro'
42
+ import type { Props as WSheetProps } from './components/Sheet/Sheet.astro'
43
+ import type { Props as WSidebarProps } from './components/Sidebar/Sidebar.astro'
44
+ import type { Props as WSkeletonProps } from './components/Skeleton/Skeleton.astro'
45
+ import type { Props as WSliderProps } from './components/Slider/Slider.astro'
46
+ import type { Props as WSpeedDialProps } from './components/SpeedDial/SpeedDial.astro'
47
+ import type { Props as WSpinnerProps } from './components/Spinner/Spinner.astro'
48
+ import type { Props as WSpoilerProps } from './components/Spoiler/Spoiler.astro'
49
+ import type { Props as WStepperProps } from './components/Stepper/Stepper.astro'
50
+ import type { Props as WSwitchProps } from './components/Switch/Switch.astro'
51
+ import type { Props as WTabProps } from './components/Tab/Tab.astro'
52
+ import type { Props as WTableProps } from './components/Table/Table.astro'
53
+ import type { Props as WTabsProps } from './components/Tabs/Tabs.astro'
54
+ import type { Props as WTextareaProps } from './components/Textarea/Textarea.astro'
55
+ import type { Props as WThemeSwitcherProps } from './components/ThemeSwitcher/ThemeSwitcher.astro'
56
+ import type { Props as WTimelineProps } from './components/Timeline/Timeline.astro'
57
+ import type { Props as WTimelineItemProps } from './components/TimelineItem/TimelineItem.astro'
58
+ import type { Props as WToastProps } from './components/Toast/Toast.astro'
57
59
 
58
60
  import type { DataTableEventType as WDataTableEventType, HeadingObject as WHeadingObject } from './components/DataTable/datatable.ts'
59
61
  import type { ListEventType as WListEventType } from './components/List/list.ts'
@@ -73,6 +75,7 @@ declare module 'webcoreui/astro' {
73
75
  export function Button(_props: WButtonProps): any
74
76
  export function Card(_props: WCardProps): any
75
77
  export function Carousel(_props: WCarouselProps): any
78
+ export function CarouselItem(_props: WCarouselItemProps): any
76
79
  export function Checkbox(_props: WCheckboxProps): any
77
80
  export function Collapsible(_props: WCollapsibleProps): any
78
81
  export function ConditionalWrapper(_props: WConditionalWrapperProps): any
@@ -111,6 +114,7 @@ declare module 'webcoreui/astro' {
111
114
  export function Spoiler(_props: WSpoilerProps): any
112
115
  export function Stepper(_props: WStepperProps): any
113
116
  export function Switch(_props: WSwitchProps): any
117
+ export function Tab(_props: WTabProps): any
114
118
  export function Table(_props: WTableProps): any
115
119
  export function Tabs(_props: WTabsProps): any
116
120
  export function Textarea(_props: WTextareaProps): any
@@ -130,6 +134,7 @@ declare module 'webcoreui/astro' {
130
134
  export type ButtonProps = WButtonProps
131
135
  export type CardProps = WCardProps
132
136
  export type CarouselProps = WCarouselProps
137
+ export type CarouselItemProps = WCarouselItemProps
133
138
  export type CheckboxProps = WCheckboxProps
134
139
  export type CollapsibleProps = WCollapsibleProps
135
140
  export type ConditionalWrapperProps = WConditionalWrapperProps
@@ -168,6 +173,7 @@ declare module 'webcoreui/astro' {
168
173
  export type SpoilerProps = WSpoilerProps
169
174
  export type StepperProps = WStepperProps
170
175
  export type SwitchProps = WSwitchProps
176
+ export type TabProps = WTabProps
171
177
  export type TableProps = WTableProps
172
178
  export type TabsProps = WTabsProps
173
179
  export type TextareaProps = WTextareaProps
package/astro.js CHANGED
@@ -9,6 +9,7 @@ import BreadcrumbComponent from './components/Breadcrumb/Breadcrumb.astro'
9
9
  import ButtonComponent from './components/Button/Button.astro'
10
10
  import CardComponent from './components/Card/Card.astro'
11
11
  import CarouselComponent from './components/Carousel/Carousel.astro'
12
+ import CarouselItemComponent from './components/CarouselItem/CarouselItem.astro'
12
13
  import CheckboxComponent from './components/Checkbox/Checkbox.astro'
13
14
  import CollapsibleComponent from './components/Collapsible/Collapsible.astro'
14
15
  import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.astro'
@@ -47,6 +48,7 @@ import SpinnerComponent from './components/Spinner/Spinner.astro'
47
48
  import SpoilerComponent from './components/Spoiler/Spoiler.astro'
48
49
  import StepperComponent from './components/Stepper/Stepper.astro'
49
50
  import SwitchComponent from './components/Switch/Switch.astro'
51
+ import TabComponent from './components/Tab/Tab.astro'
50
52
  import TableComponent from './components/Table/Table.astro'
51
53
  import TabsComponent from './components/Tabs/Tabs.astro'
52
54
  import TextareaComponent from './components/Textarea/Textarea.astro'
@@ -66,6 +68,7 @@ export const Breadcrumb = BreadcrumbComponent
66
68
  export const Button = ButtonComponent
67
69
  export const Card = CardComponent
68
70
  export const Carousel = CarouselComponent
71
+ export const CarouselItem = CarouselItemComponent
69
72
  export const Checkbox = CheckboxComponent
70
73
  export const Collapsible = CollapsibleComponent
71
74
  export const ConditionalWrapper = ConditionalWrapperComponent
@@ -104,6 +107,7 @@ export const Spinner = SpinnerComponent
104
107
  export const Spoiler = SpoilerComponent
105
108
  export const Stepper = StepperComponent
106
109
  export const Switch = SwitchComponent
110
+ export const Tab = TabComponent
107
111
  export const Table = TableComponent
108
112
  export const Tabs = TabsComponent
109
113
  export const Textarea = TextareaComponent
@@ -6,7 +6,7 @@ import Plus from '../../icons/plus.svg?raw'
6
6
 
7
7
  import styles from './accordion.module.scss'
8
8
 
9
- interface Props extends AccordionProps {}
9
+ export type Props = AccordionProps
10
10
 
11
11
  const {
12
12
  items,
@@ -1,58 +1,60 @@
1
- <script lang="ts">
2
- import type { AccordionProps } from './accordion'
3
-
4
- import { classNames } from '../../utils/classNames'
5
-
6
- import ChevronDown from '../../icons/chevron-down.svg?raw'
7
- import Plus from '../../icons/plus.svg?raw'
8
-
9
- import styles from './accordion.module.scss'
10
-
11
- const {
12
- items,
13
- icon,
14
- reverse,
15
- className
16
- }: AccordionProps = $props()
17
-
18
- let toggleState = $derived(items.map(item => item.expanded ?? false))
19
-
20
- const toggle = (index: number) => {
21
- toggleState = toggleState.map((_, i) => index === i
22
- ? !toggleState[i]
23
- : toggleState[i]
24
- )
25
- }
26
-
27
- const classes = $derived(classNames([
28
- styles.accordion,
29
- reverse && styles.reverse,
30
- icon === 'plus' && styles.plus,
31
- className
32
- ]))
33
- </script>
34
-
35
- <ul class={classes}>
36
- {#each items as item, index}
37
- <li>
38
- <button
39
- class={classNames([
40
- styles.title,
41
- item.reverse && styles.reverse
42
- ])}
43
- data-open={toggleState[index]}
44
- onclick={() => toggle(index)}
45
- >
46
- {item.title}
47
- {#if icon !== 'none'}
48
- {@html icon === 'plus' ? Plus : ChevronDown}
49
- {/if}
50
- </button>
51
- <div class={styles.wrapper}>
52
- <div class={styles.content}>
53
- {@html item.content}
54
- </div>
55
- </div>
56
- </li>
57
- {/each}
58
- </ul>
1
+ <script lang="ts">
2
+ import type { AccordionProps } from './accordion'
3
+
4
+ import { classNames } from '../../utils/classNames'
5
+
6
+ import ChevronDown from '../../icons/chevron-down.svg?raw'
7
+ import Plus from '../../icons/plus.svg?raw'
8
+
9
+ import styles from './accordion.module.scss'
10
+
11
+ export type Props = AccordionProps
12
+
13
+ const {
14
+ items,
15
+ icon,
16
+ reverse,
17
+ className
18
+ }: Props = $props()
19
+
20
+ let toggleState = $derived(items.map(item => item.expanded ?? false))
21
+
22
+ const toggle = (index: number) => {
23
+ toggleState = toggleState.map((_, i) => index === i
24
+ ? !toggleState[i]
25
+ : toggleState[i]
26
+ )
27
+ }
28
+
29
+ const classes = $derived(classNames([
30
+ styles.accordion,
31
+ reverse && styles.reverse,
32
+ icon === 'plus' && styles.plus,
33
+ className
34
+ ]))
35
+ </script>
36
+
37
+ <ul class={classes}>
38
+ {#each items as item, index}
39
+ <li>
40
+ <button
41
+ class={classNames([
42
+ styles.title,
43
+ item.reverse && styles.reverse
44
+ ])}
45
+ data-open={toggleState[index]}
46
+ onclick={() => toggle(index)}
47
+ >
48
+ {item.title}
49
+ {#if icon !== 'none'}
50
+ {@html icon === 'plus' ? Plus : ChevronDown}
51
+ {/if}
52
+ </button>
53
+ <div class={styles.wrapper}>
54
+ <div class={styles.content}>
55
+ {@html item.content}
56
+ </div>
57
+ </div>
58
+ </li>
59
+ {/each}
60
+ </ul>
@@ -7,13 +7,15 @@ import ChevronDown from '../../icons/chevron-down.svg?raw'
7
7
  import Plus from '../../icons/plus.svg?raw'
8
8
 
9
9
  import styles from './accordion.module.scss'
10
+
11
+ export type Props = AccordionProps
10
12
 
11
13
  const Accordion = ({
12
14
  items,
13
15
  icon,
14
16
  reverse,
15
17
  className
16
- }: AccordionProps) => {
18
+ }: Props) => {
17
19
  const [state, setState] = useState(items.map(item => item.expanded ?? false))
18
20
 
19
21
  const toggle = (index: number) => {
@@ -1,4 +1,5 @@
1
1
  ---
2
+ import type { HTMLAttributes } from 'astro/types'
2
3
  import type { AlertProps } from './alert'
3
4
 
4
5
  import ConditionalWrapper from '../ConditionalWrapper/ConditionalWrapper.astro'
@@ -10,7 +11,7 @@ import warning from '../../icons/warning.svg?raw'
10
11
 
11
12
  import styles from './alert.module.scss'
12
13
 
13
- interface Props extends AlertProps {}
14
+ export type Props = AlertProps<HTMLAttributes<'section'>>
14
15
 
15
16
  const iconMap = {
16
17
  info,
@@ -1,5 +1,7 @@
1
1
  <script lang="ts">
2
- import type { SvelteAlertProps } from './alert'
2
+ import type { Snippet } from 'svelte'
3
+ import type { HTMLAttributes } from 'svelte/elements'
4
+ import type { AlertProps } from './alert'
3
5
 
4
6
  import ConditionalWrapper from '../ConditionalWrapper/ConditionalWrapper.svelte'
5
7
 
@@ -10,6 +12,11 @@
10
12
 
11
13
  import styles from './alert.module.scss'
12
14
 
15
+ export type Props = AlertProps<HTMLAttributes<HTMLElement>> & {
16
+ icon?: Snippet
17
+ children: Snippet
18
+ }
19
+
13
20
  const {
14
21
  element = 'section',
15
22
  title,
@@ -21,7 +28,7 @@
21
28
  icon,
22
29
  children,
23
30
  ...rest
24
- }: SvelteAlertProps = $props()
31
+ }: Props = $props()
25
32
 
26
33
  const iconMap = {
27
34
  info,
@@ -1,5 +1,5 @@
1
- import React from 'react'
2
- import type { ReactAlertProps } from './alert'
1
+ import React, { type JSX } from 'react'
2
+ import type { AlertProps } from './alert'
3
3
 
4
4
  import ConditionalWrapper from '../ConditionalWrapper/ConditionalWrapper.tsx'
5
5
 
@@ -10,6 +10,13 @@ import warning from '../../icons/warning.svg?raw'
10
10
 
11
11
  import styles from './alert.module.scss'
12
12
 
13
+ export type Props = Omit<AlertProps, 'titleTag' | 'element'> & {
14
+ Element?: keyof JSX.IntrinsicElements
15
+ TitleTag?: keyof JSX.IntrinsicElements
16
+ icon?: React.ReactNode
17
+ children: React.ReactNode
18
+ }
19
+
13
20
  const iconMap = {
14
21
  info,
15
22
  success,
@@ -28,7 +35,7 @@ const Alert = ({
28
35
  children,
29
36
  icon,
30
37
  ...rest
31
- }: ReactAlertProps) => {
38
+ }: Props) => {
32
39
  const classes = [
33
40
  styles['w-alert'],
34
41
  (!icon && !theme) && styles.col,
@@ -1,7 +1,4 @@
1
- import type { JSX } from 'react'
2
- import type { Snippet } from 'svelte'
3
-
4
- export type AlertProps = {
1
+ export type AlertProps<T extends object = object> = {
5
2
  element?: string
6
3
  title?: string
7
4
  titleTag?: string
@@ -12,17 +9,4 @@ export type AlertProps = {
12
9
  | 'success'
13
10
  | 'warning'
14
11
  | 'alert'
15
- [key: string]: any
16
- }
17
-
18
- export type SvelteAlertProps = {
19
- icon?: Snippet
20
- children: Snippet
21
- } & AlertProps
22
-
23
- export type ReactAlertProps = {
24
- Element?: keyof JSX.IntrinsicElements
25
- TitleTag?: keyof JSX.IntrinsicElements
26
- icon?: React.ReactNode
27
- children: React.ReactNode
28
- } & Omit<AlertProps, 'titleTag' | 'element'>
12
+ } & T
@@ -3,7 +3,7 @@ import type { AspectRatioProps } from './aspectratio'
3
3
 
4
4
  import styles from './aspect-ratio.module.scss'
5
5
 
6
- interface Props extends AspectRatioProps {}
6
+ export type Props = AspectRatioProps
7
7
 
8
8
  const {
9
9
  ratio,
@@ -1,15 +1,20 @@
1
1
  <script lang="ts">
2
- import type { SvelteAspectRatioProps } from './aspectratio'
2
+ import type { Snippet } from 'svelte'
3
+ import type { AspectRatioProps } from './aspectratio'
3
4
 
4
5
  import { classNames } from '../../utils/classNames'
5
6
 
6
7
  import styles from './aspect-ratio.module.scss'
7
8
 
9
+ export type Props = AspectRatioProps & {
10
+ children: Snippet
11
+ }
12
+
8
13
  const {
9
14
  ratio,
10
15
  className,
11
16
  children
12
- }: SvelteAspectRatioProps = $props()
17
+ }: Props = $props()
13
18
 
14
19
  const classes = $derived(classNames([
15
20
  styles.ratio,
@@ -1,15 +1,18 @@
1
- import React from 'react'
2
- import type { ReactAspectRatioProps } from './aspectratio'
1
+ import type { AspectRatioProps } from './aspectratio'
3
2
 
4
3
  import { classNames } from '../../utils/classNames'
5
4
 
6
5
  import styles from './aspect-ratio.module.scss'
7
6
 
7
+ export type Props = AspectRatioProps & {
8
+ children: React.ReactNode
9
+ }
10
+
8
11
  const AspectRatio = ({
9
12
  ratio,
10
13
  children,
11
14
  className
12
- }: ReactAspectRatioProps) => {
15
+ }: Props) => {
13
16
  const classes = classNames([
14
17
  styles.ratio,
15
18
  className
@@ -1,14 +1,4 @@
1
- import type { Snippet } from 'svelte'
2
-
3
1
  export type AspectRatioProps = {
4
2
  ratio: string
5
3
  className?: string
6
4
  }
7
-
8
- export type SvelteAspectRatioProps = {
9
- children: Snippet
10
- } & AspectRatioProps
11
-
12
- export type ReactAspectRatioProps = {
13
- children: React.ReactNode
14
- } & AspectRatioProps
@@ -5,7 +5,7 @@ import Image from '../Image/Image.astro'
5
5
 
6
6
  import styles from './avatar.module.scss'
7
7
 
8
- interface Props extends AvatarProps {}
8
+ export type Props = AvatarProps
9
9
 
10
10
  const {
11
11
  img,
@@ -6,6 +6,8 @@
6
6
  import { classNames } from '../../utils/classNames'
7
7
 
8
8
  import styles from './avatar.module.scss'
9
+
10
+ export type Props = AvatarProps
9
11
 
10
12
  const {
11
13
  img,
@@ -17,7 +19,7 @@
17
19
  reverse,
18
20
  className,
19
21
  groupClassName
20
- }: AvatarProps = $props()
22
+ }: Props = $props()
21
23
 
22
24
  const classes = $derived(classNames([
23
25
  styles.avatar,
@@ -1,4 +1,3 @@
1
- import React from 'react'
2
1
  import type { AvatarProps } from './avatar'
3
2
 
4
3
  import Image from '../Image/Image.tsx'
@@ -6,6 +5,8 @@ import Image from '../Image/Image.tsx'
6
5
  import { classNames } from '../../utils/classNames'
7
6
 
8
7
  import styles from './avatar.module.scss'
8
+
9
+ export type Props = AvatarProps
9
10
 
10
11
  const Avatar = ({
11
12
  img,
@@ -17,7 +18,7 @@ const Avatar = ({
17
18
  reverse,
18
19
  className,
19
20
  groupClassName
20
- }: AvatarProps) => {
21
+ }: Props) => {
21
22
  const classes = classNames([
22
23
  styles.avatar,
23
24
  borderless && styles.borderless,
@@ -1,9 +1,10 @@
1
1
  ---
2
+ import type { HTMLAttributes } from 'astro/types'
2
3
  import type { BadgeProps } from './badge'
3
4
 
4
5
  import styles from './badge.module.scss'
5
6
 
6
- interface Props extends BadgeProps {}
7
+ export type Props = BadgeProps<HTMLAttributes<'span'>>
7
8
 
8
9
  const {
9
10
  theme,
@@ -1,10 +1,17 @@
1
1
  <script lang="ts">
2
- import type { SvelteBadgeProps } from './badge'
2
+ import type { Snippet } from 'svelte'
3
+ import type { HTMLAttributes, MouseEventHandler } from 'svelte/elements'
4
+ import type { BadgeProps } from './badge'
3
5
 
4
6
  import { classNames } from '../../utils/classNames'
5
7
 
6
8
  import styles from './badge.module.scss'
7
9
 
10
+ export type Props = BadgeProps<HTMLAttributes<HTMLElement>> & {
11
+ onClick?: MouseEventHandler<HTMLButtonElement> | null
12
+ children?: Snippet
13
+ }
14
+
8
15
  const {
9
16
  theme,
10
17
  hover,
@@ -15,7 +22,7 @@
15
22
  onClick,
16
23
  children,
17
24
  ...rest
18
- }: SvelteBadgeProps = $props()
25
+ }: Props = $props()
19
26
 
20
27
  const classes = $derived(classNames([
21
28
  styles.badge,
@@ -1,10 +1,15 @@
1
- import React from 'react'
2
- import type { ReactBadgeProps } from './badge'
1
+ import type React from 'react'
2
+ import type { BadgeProps } from './badge'
3
3
 
4
4
  import { classNames } from '../../utils/classNames'
5
5
 
6
6
  import styles from './badge.module.scss'
7
7
 
8
+ export type Props = BadgeProps<React.HTMLAttributes<HTMLElement>> & {
9
+ onClick?: React.MouseEventHandler<HTMLButtonElement>
10
+ children?: React.ReactNode
11
+ }
12
+
8
13
  const Badge = ({
9
14
  theme,
10
15
  onClick,
@@ -15,7 +20,7 @@ const Badge = ({
15
20
  className,
16
21
  children,
17
22
  ...rest
18
- }: ReactBadgeProps) => {
23
+ }: Props) => {
19
24
  const classes = classNames([
20
25
  styles.badge,
21
26
  theme && styles[theme],