webcoreui 0.5.0 → 0.6.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 (74) hide show
  1. package/README.md +7 -0
  2. package/astro.d.ts +115 -68
  3. package/astro.js +8 -0
  4. package/components/Badge/Badge.astro +4 -0
  5. package/components/Badge/Badge.svelte +5 -1
  6. package/components/Badge/Badge.tsx +4 -0
  7. package/components/Badge/badge.module.scss +8 -0
  8. package/components/Badge/badge.ts +7 -3
  9. package/components/Breadcrumb/Breadcrumb.astro +51 -0
  10. package/components/Breadcrumb/Breadcrumb.svelte +45 -0
  11. package/components/Breadcrumb/Breadcrumb.tsx +51 -0
  12. package/components/Breadcrumb/breadcrumb.module.scss +26 -0
  13. package/components/Breadcrumb/breadcrumb.ts +12 -0
  14. package/components/Button/button.ts +13 -3
  15. package/components/Carousel/Carousel.astro +16 -7
  16. package/components/Carousel/Carousel.svelte +15 -5
  17. package/components/Carousel/Carousel.tsx +15 -5
  18. package/components/Carousel/carousel.module.scss +4 -1
  19. package/components/Carousel/carousel.ts +1 -1
  20. package/components/Checkbox/checkbox.ts +4 -2
  21. package/components/DataTable/DataTable.astro +2 -2
  22. package/components/DataTable/DataTable.tsx +287 -287
  23. package/components/Footer/Footer.astro +91 -0
  24. package/components/Footer/Footer.svelte +94 -0
  25. package/components/Footer/Footer.tsx +107 -0
  26. package/components/Footer/footer.module.scss +61 -0
  27. package/components/Footer/footer.ts +29 -0
  28. package/components/Icon/Icon.svelte +1 -1
  29. package/components/Icon/icon.ts +18 -1
  30. package/components/Icon/map.ts +8 -0
  31. package/components/List/list.ts +3 -1
  32. package/components/Masonry/Masonry.astro +54 -0
  33. package/components/Masonry/Masonry.svelte +54 -0
  34. package/components/Masonry/Masonry.tsx +62 -0
  35. package/components/Masonry/masonry.module.scss +18 -0
  36. package/components/Masonry/masonry.ts +36 -0
  37. package/components/Menu/Menu.astro +1 -1
  38. package/components/Menu/Menu.svelte +1 -1
  39. package/components/Menu/Menu.tsx +1 -1
  40. package/components/Menu/menu.ts +4 -2
  41. package/components/Modal/Modal.astro +2 -0
  42. package/components/Modal/Modal.svelte +2 -0
  43. package/components/Modal/Modal.tsx +2 -0
  44. package/components/Modal/modal.module.scss +29 -22
  45. package/components/Modal/modal.ts +1 -0
  46. package/components/Pagination/Pagination.astro +2 -0
  47. package/components/Pagination/Pagination.svelte +6 -3
  48. package/components/Pagination/Pagination.tsx +5 -3
  49. package/components/Pagination/pagination.ts +1 -0
  50. package/components/Rating/rating.ts +3 -1
  51. package/components/Sidebar/Sidebar.astro +61 -0
  52. package/components/Sidebar/Sidebar.svelte +50 -0
  53. package/components/Sidebar/Sidebar.tsx +58 -0
  54. package/components/Sidebar/sidebar.module.scss +43 -0
  55. package/components/Sidebar/sidebar.ts +21 -0
  56. package/components/Switch/switch.ts +4 -2
  57. package/icons/circle-close.svg +3 -0
  58. package/icons/components.svg +3 -0
  59. package/icons/file.svg +3 -0
  60. package/icons/home.svg +4 -0
  61. package/icons/sun.svg +1 -1
  62. package/icons.d.ts +4 -0
  63. package/icons.js +4 -0
  64. package/index.d.ts +8 -0
  65. package/index.js +1 -0
  66. package/package.json +9 -10
  67. package/react.d.ts +115 -68
  68. package/react.js +8 -0
  69. package/scss/config/typography.scss +3 -1
  70. package/scss/global/utility.scss +1 -1
  71. package/svelte.d.ts +116 -68
  72. package/svelte.js +8 -0
  73. package/utils/DOMUtils.ts +28 -0
  74. package/scss/global/elements.scss +0 -31
@@ -26,6 +26,7 @@ const Modal = ({
26
26
  showCloseIcon = true,
27
27
  closeOnEsc = true,
28
28
  closeOnOverlay = true,
29
+ transparent,
29
30
  theme,
30
31
  id,
31
32
  className,
@@ -35,6 +36,7 @@ const Modal = ({
35
36
  const classes = classNames([
36
37
  styles.modal,
37
38
  theme && styles[theme],
39
+ transparent && styles.transparent,
38
40
  className
39
41
  ])
40
42
 
@@ -28,28 +28,11 @@
28
28
  }
29
29
  }
30
30
 
31
- .close {
32
- @include position(absolute, t10px, r10px);
33
- @include spacing(p-xs);
34
-
35
- svg {
36
- @include size(10px);
37
- }
38
- }
39
-
40
- .title {
41
- @include typography(lg);
42
- @include spacing(mb-xs);
43
- @include layout(flex, v-center, xs);
44
-
45
- svg {
46
- @include size(20px);
47
- }
48
- }
49
-
50
- .subTitle {
51
- @include typography(primary-20);
52
- @include spacing(mb-xs);
31
+ &.transparent {
32
+ @include border(0);
33
+ @include spacing(p0);
34
+ @include size('wfit-content');
35
+ @include background(transparent);
53
36
  }
54
37
 
55
38
  &.info {
@@ -83,6 +66,30 @@
83
66
  @include typography(alert);
84
67
  }
85
68
  }
69
+
70
+ .close {
71
+ @include position(absolute, t10px, r10px);
72
+ @include spacing(p-xs);
73
+
74
+ svg {
75
+ @include size(10px);
76
+ }
77
+ }
78
+
79
+ .title {
80
+ @include typography(lg);
81
+ @include spacing(mb-xs);
82
+ @include layout(flex, v-center, xs);
83
+
84
+ svg {
85
+ @include size(20px);
86
+ }
87
+ }
88
+
89
+ .subTitle {
90
+ @include typography(primary-20);
91
+ @include spacing(mb-xs);
92
+ }
86
93
  }
87
94
 
88
95
  .overlay {
@@ -4,6 +4,7 @@ export type ModalProps = {
4
4
  showCloseIcon?: boolean
5
5
  closeOnEsc?: boolean
6
6
  closeOnOverlay?: boolean
7
+ transparent?: boolean
7
8
  id?: string
8
9
  className?: string
9
10
  theme?: 'info'
@@ -150,6 +150,7 @@ const generatedPages = pages?.length
150
150
  const prevPageButton = element.querySelector('[data-page="prev"]') as HTMLButtonElement
151
151
  const nextPageButton = element.querySelector('[data-page="next"]') as HTMLButtonElement
152
152
  const currentPageButton = element.querySelector('[data-active]') as HTMLButtonElement
153
+ const previousPage = currentPage
153
154
 
154
155
  const pageElements = Array
155
156
  .from(pagination.children)
@@ -179,6 +180,7 @@ const generatedPages = pages?.length
179
180
 
180
181
  dispatch('paginate', {
181
182
  page: currentPage,
183
+ direction: previousPage > currentPage ? 'prev' : 'next',
182
184
  ...(activeButton?.dataset.page && { label: activeButton?.dataset.page }),
183
185
  target: element,
184
186
  trusted: event.isTrusted
@@ -45,6 +45,8 @@
45
45
  }))
46
46
 
47
47
  const paginate = (to: string | number) => {
48
+ const previousPage = calculatedCurrentPage
49
+
48
50
  if (to === 'prev') {
49
51
  calculatedCurrentPage = calculatedCurrentPage - 1
50
52
  } else if (to === 'next') {
@@ -57,6 +59,7 @@
57
59
 
58
60
  onChange?.({
59
61
  page: calculatedCurrentPage,
62
+ direction: previousPage > calculatedCurrentPage ? 'prev' : 'next',
60
63
  ...(label && { label })
61
64
  })
62
65
  }
@@ -87,7 +90,7 @@
87
90
  theme={theme}
88
91
  onClick={!(disablePrevious || (calculatedCurrentPage === 1 && !previousLink))
89
92
  ? () => paginate('prev')
90
- : null
93
+ : undefined
91
94
  }
92
95
  >
93
96
  {#if showChevrons || type === 'arrows'}
@@ -107,7 +110,7 @@
107
110
  theme={theme}
108
111
  onClick={calculatedCurrentPage !== index + 1
109
112
  ? () => paginate(index + 1)
110
- : null
113
+ : undefined
111
114
  }
112
115
  >
113
116
  {page.label}
@@ -129,7 +132,7 @@
129
132
  theme={theme}
130
133
  onClick={!disableNext
131
134
  ? () => paginate('next')
132
- : null
135
+ : undefined
133
136
  }
134
137
  >
135
138
  {#if type !== 'arrows'}
@@ -53,6 +53,7 @@ const Pagination = ({
53
53
  }))
54
54
 
55
55
  const paginate = (to: string | number) => {
56
+ const previousPage = calculatedCurrentPage
56
57
  let currentPage = calculatedCurrentPage
57
58
 
58
59
  if (to === 'prev') {
@@ -69,6 +70,7 @@ const Pagination = ({
69
70
 
70
71
  onChange?.({
71
72
  page: currentPage,
73
+ direction: previousPage > currentPage ? 'prev' : 'next',
72
74
  ...(label && { label })
73
75
  })
74
76
  }
@@ -104,7 +106,7 @@ const Pagination = ({
104
106
  theme={theme}
105
107
  onClick={!(disablePrevious || (calculatedCurrentPage === 1 && !previousLink))
106
108
  ? () => paginate('prev')
107
- : null
109
+ : undefined
108
110
  }
109
111
  >
110
112
  {(showChevrons || type === 'arrows') && (
@@ -122,7 +124,7 @@ const Pagination = ({
122
124
  theme={theme}
123
125
  onClick={calculatedCurrentPage !== index + 1
124
126
  ? () => paginate(index + 1)
125
- : null
127
+ : undefined
126
128
  }
127
129
  >
128
130
  {page.label}
@@ -144,7 +146,7 @@ const Pagination = ({
144
146
  theme={theme}
145
147
  onClick={!disableNext
146
148
  ? () => paginate('next')
147
- : null
149
+ : undefined
148
150
  }
149
151
  >
150
152
  {type !== 'arrows' && nextPageLabel}
@@ -2,6 +2,7 @@ import type { ButtonProps } from '../Button/button'
2
2
 
3
3
  export type PaginationEventType = {
4
4
  page: number
5
+ direction: 'prev' | 'next'
5
6
  label?: string | number | undefined
6
7
  }
7
8
 
@@ -1,3 +1,5 @@
1
+ import type { ButtonProps } from '../Button/button'
2
+
1
3
  export type RatingProps = {
2
4
  score: number
3
5
  total?: number
@@ -8,7 +10,7 @@ export type RatingProps = {
8
10
  reviewCount?: number
9
11
  reviewText?: string
10
12
  reviewLink?: string
11
- reviewTarget?: string
13
+ reviewTarget?: ButtonProps['target']
12
14
  color?: string
13
15
  emptyColor?: string
14
16
  size?: number
@@ -0,0 +1,61 @@
1
+ ---
2
+ import type { SidebarProps } from './sidebar'
3
+
4
+ import Badge from '../Badge/Badge.astro'
5
+ import Icon from '../Icon/Icon.astro'
6
+
7
+ import styles from './sidebar.module.scss'
8
+
9
+ import type { IconProps } from '../Icon/icon'
10
+
11
+ interface Props extends SidebarProps {}
12
+
13
+ const {
14
+ groups,
15
+ className
16
+ } = Astro.props
17
+
18
+ const classes = [
19
+ styles.sidebar,
20
+ className
21
+ ]
22
+ ---
23
+
24
+ <aside class:list={classes}>
25
+ {groups.map(group => (
26
+ <Fragment>
27
+ {group.title && (
28
+ <strong>{group.title}</strong>
29
+ )}
30
+
31
+ <ul>
32
+ {group.items.map(item => (
33
+ <li>
34
+ <a
35
+ href={item.href}
36
+ target={item.target}
37
+ class:list={[item.active && styles.active]}
38
+ >
39
+ {item.icon && (
40
+ <Fragment>
41
+ {item.icon.startsWith('<svg')
42
+ ? <Fragment set:html={item.icon} />
43
+ : <Icon type={item.icon as IconProps['type']} />
44
+ }
45
+ </Fragment>
46
+ )}
47
+ {item.name}
48
+ {item.badge && (
49
+ <Badge theme={item.badgeTheme || 'success'} small={true}>
50
+ {item.badge}
51
+ </Badge>
52
+ )}
53
+ </a>
54
+ </li>
55
+ ))}
56
+ </ul>
57
+ </Fragment>
58
+ ))}
59
+
60
+ <slot />
61
+ </aside>
@@ -0,0 +1,50 @@
1
+ <script lang="ts">
2
+ import type { SidebarProps } from './sidebar'
3
+
4
+ import Badge from '../Badge/Badge.svelte'
5
+
6
+ import { classNames } from '../../utils/classNames'
7
+
8
+ import styles from './sidebar.module.scss'
9
+
10
+ export let groups: SidebarProps['groups'] = []
11
+ export let className: SidebarProps['className'] = ''
12
+
13
+ const classes = classNames([
14
+ styles.sidebar,
15
+ className
16
+ ])
17
+ </script>
18
+
19
+ <aside class={classes}>
20
+ {#each groups as group}
21
+
22
+ {#if group.title}
23
+ <strong>{group.title}</strong>
24
+ {/if}
25
+
26
+ <ul>
27
+ {#each group.items as item}
28
+ <li>
29
+ <a
30
+ href={item.href}
31
+ target={item.target}
32
+ class={item.active ? styles.active : undefined}
33
+ >
34
+ {#if item.icon}
35
+ {@html item.icon}
36
+ {/if}
37
+ {item.name}
38
+ {#if item.badge}
39
+ <Badge theme={item.badgeTheme || 'success'} small={true}>
40
+ {item.badge}
41
+ </Badge>
42
+ {/if}
43
+ </a>
44
+ </li>
45
+ {/each}
46
+ </ul>
47
+ {/each}
48
+
49
+ <slot />
50
+ </aside>
@@ -0,0 +1,58 @@
1
+ import React from 'react'
2
+ import type { ReactSidebarProps } from './sidebar'
3
+
4
+ import Badge from '../Badge/Badge.tsx'
5
+
6
+ import { classNames } from '../../utils/classNames'
7
+
8
+ import styles from './sidebar.module.scss'
9
+
10
+ const Sidebar = ({
11
+ groups,
12
+ children,
13
+ className
14
+ }: ReactSidebarProps) => {
15
+ const classes = classNames([
16
+ styles.sidebar,
17
+ className
18
+ ])
19
+
20
+ return (
21
+ <aside className={classes}>
22
+ {groups.map((group, groupIndex) => (
23
+ <React.Fragment key={groupIndex}>
24
+ {group.title && (
25
+ <strong>{group.title}</strong>
26
+ )}
27
+
28
+ <ul>
29
+ {group.items.map((item, itemIndex) => (
30
+ <li key={itemIndex}>
31
+ <a
32
+ href={item.href}
33
+ target={item.target}
34
+ className={item.active ? styles.active : undefined}
35
+ >
36
+ {item.icon && (
37
+ <span dangerouslySetInnerHTML={{ __html: item.icon }} />
38
+ )}
39
+ {item.name}
40
+ {item.badge && (
41
+ <Badge theme={item.badgeTheme || 'success'} small={true}>
42
+ {item.badge}
43
+ </Badge>
44
+ )}
45
+ </a>
46
+ </li>
47
+ ))}
48
+ </ul>
49
+ </React.Fragment>
50
+ ))}
51
+
52
+ {children}
53
+ </aside>
54
+ )
55
+ }
56
+
57
+ export default Sidebar
58
+
@@ -0,0 +1,43 @@
1
+ @import '../../scss/config.scss';
2
+
3
+ .sidebar {
4
+
5
+ strong {
6
+ @include spacing(mb-sm);
7
+
8
+ display: block;
9
+ }
10
+
11
+ ul {
12
+ @include layout(flex, column, sm);
13
+ @include typography(normal);
14
+ @include spacing(0);
15
+
16
+ list-style-type: none;
17
+
18
+ &:not(:last-child) {
19
+ @include spacing('mb-3xl');
20
+ }
21
+
22
+ li {
23
+ @include spacing(m0);
24
+ }
25
+
26
+ a {
27
+ @include typography(primary-20, none);
28
+ @include layout(flex, v-center, sm);
29
+
30
+ &:hover {
31
+ @include typography(primary);
32
+ }
33
+
34
+ &.active {
35
+ @include typography(primary);
36
+ }
37
+
38
+ svg {
39
+ @include size(18px);
40
+ }
41
+ }
42
+ }
43
+ }
@@ -0,0 +1,21 @@
1
+ import type { ButtonProps } from '../Button/button'
2
+
3
+ export type SidebarProps = {
4
+ groups: {
5
+ title?: string
6
+ items: {
7
+ name: string
8
+ href: string
9
+ target?: ButtonProps['target']
10
+ active?: boolean
11
+ icon?: string
12
+ badge?: string
13
+ badgeTheme?: ButtonProps['theme']
14
+ }[]
15
+ }[]
16
+ className?: string
17
+ }
18
+
19
+ export type ReactSidebarProps = {
20
+ children?: React.ReactNode
21
+ } & SidebarProps
@@ -1,3 +1,5 @@
1
+ import type { MouseEventHandler } from 'svelte/elements'
2
+
1
3
  export type SwitchProps = {
2
4
  label?: string
3
5
  reverse?: boolean
@@ -11,9 +13,9 @@ export type SwitchProps = {
11
13
  }
12
14
 
13
15
  export type SvelteSwitchProps = {
14
- onClick?: (key: any) => any
16
+ onClick?: MouseEventHandler<HTMLInputElement>
15
17
  } & SwitchProps
16
18
 
17
19
  export type ReactSwitchProps = {
18
- onClick?: (key: any) => any
20
+ onClick?: React.MouseEventHandler<HTMLInputElement>
19
21
  } & SwitchProps
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15.6667 8.33333L8.33333 15.6667M8.33333 8.33333L15.6667 15.6667M23 12C23 13.4445 22.7155 14.8749 22.1627 16.2095C21.6099 17.5441 20.7996 18.7567 19.7782 19.7782C18.7567 20.7996 17.5441 21.6099 16.2095 22.1627C14.8749 22.7155 13.4445 23 12 23C10.5555 23 9.12506 22.7155 7.79048 22.1627C6.4559 21.6099 5.24327 20.7996 4.22183 19.7782C3.20038 18.7567 2.39013 17.5441 1.83733 16.2095C1.28452 14.8749 1 13.4445 1 12C1 9.08262 2.15893 6.28473 4.22183 4.22183C6.28473 2.15893 9.08262 1 12 1C14.9174 1 17.7153 2.15893 19.7782 4.22183C21.8411 6.28473 23 9.08262 23 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M8.15 4.85L12 1L15.85 4.85L12 8.7L8.15 4.85ZM15.3 12.55L19.15 8.7L23 12.55L19.15 16.4L15.3 12.55ZM8.15 19.15L12 15.3L15.85 19.15L12 23L8.15 19.15ZM1 12L4.85 8.15L8.7 12L4.85 15.85L1 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
package/icons/file.svg ADDED
@@ -0,0 +1,3 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M9.30726 1H6.66667C5.95942 1 5.28115 1.28973 4.78105 1.80546C4.28095 2.32118 4 3.02065 4 3.75V20.25C4 20.9793 4.28095 21.6788 4.78105 22.1945C5.28115 22.7103 5.95942 23 6.66667 23H17.3333C18.0406 23 18.7189 22.7103 19.219 22.1945C19.719 21.6788 20 20.9793 20 20.25V12M9.30726 1C10.7804 1 12 2.23078 12 3.75V6.5C12 7.22935 12.281 7.92882 12.781 8.44454C13.2811 8.96027 13.9594 9.25 14.6667 9.25H17.3333C18.0406 9.25 18.7189 9.53973 19.219 10.0555C19.719 10.5712 20 11.2707 20 12M9.30726 1C13.6806 1 20 7.55111 20 12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
package/icons/home.svg ADDED
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M4.66625 23C3.19375 23 2 21.8022 2 20.3234V9.56554C2 8.75277 2.36875 7.98279 3 7.47557L10.3337 1.587C10.8023 1.2076 11.3916 1 12 1C12.6084 1 13.1977 1.2076 13.6663 1.587L20.9987 7.47557C21.6312 7.98279 22 8.75277 22 9.56554V20.3234C22 21.8022 20.8063 23 19.3338 23H4.66625Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ <path d="M9 23V16.4C9 15.7635 9.25286 15.153 9.70294 14.7029C10.153 14.2529 10.7635 14 11.4 14H12.6C13.2365 14 13.847 14.2529 14.2971 14.7029C14.7471 15.153 15 15.7635 15 16.4V23" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4
+ </svg>
package/icons/sun.svg CHANGED
@@ -1,3 +1,3 @@
1
- <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <path d="M1 12H4.66667M3.44444 3.44444L6.03678 6.03678M20.5556 3.44444L17.9632 6.03678M3.44444 20.5556L6.03678 17.9632M20.5556 20.5556L17.9632 17.9632M12 1V4.66667M12 23V19.3333M19.3333 12H23M15.6667 12C15.6667 12.9725 15.2804 13.9051 14.5927 14.5927C13.9051 15.2804 12.9725 15.6667 12 15.6667C11.0275 15.6667 10.0949 15.2804 9.40727 14.5927C8.71964 13.9051 8.33333 12.9725 8.33333 12C8.33333 11.0275 8.71964 10.0949 9.40727 9.40727C10.0949 8.71964 11.0275 8.33333 12 8.33333C12.9725 8.33333 13.9051 8.71964 14.5927 9.40727C15.2804 10.0949 15.6667 11.0275 15.6667 12Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
3
  </svg>
package/icons.d.ts CHANGED
@@ -5,8 +5,12 @@ declare module 'webcoreui/icons' {
5
5
  export const arrowRight: string
6
6
  export const check: string
7
7
  export const circleCheck: string
8
+ export const circleClose: string
8
9
  export const close: string
10
+ export const components: string
11
+ export const file: string
9
12
  export const github: string
13
+ export const home: string
10
14
  export const info: string
11
15
  export const moon: string
12
16
  export const order: string
package/icons.js CHANGED
@@ -4,8 +4,12 @@ export { default as arrowLeft } from './icons/arrow-left.svg?raw'
4
4
  export { default as arrowRight } from './icons/arrow-right.svg?raw'
5
5
  export { default as check } from './icons/check.svg?raw'
6
6
  export { default as circleCheck } from './icons/circle-check.svg?raw'
7
+ export { default as circleClose } from './icons/circle-close.svg?raw'
7
8
  export { default as close } from './icons/close.svg?raw'
9
+ export { default as components } from './icons/components.svg?raw'
10
+ export { default as file } from './icons/file.svg?raw'
8
11
  export { default as github } from './icons/github.svg?raw'
12
+ export { default as home } from './icons/home.svg?raw'
9
13
  export { default as info } from './icons/info.svg?raw'
10
14
  export { default as moon } from './icons/moon.svg?raw'
11
15
  export { default as order } from './icons/order.svg?raw'
package/index.d.ts CHANGED
@@ -68,6 +68,14 @@ declare module 'webcoreui' {
68
68
  cancel: () => void
69
69
  }
70
70
 
71
+ export const get: (selector: string, all: boolean) => Element | NodeListOf<Element> | null
72
+ export const on: (
73
+ selector: string | HTMLElement,
74
+ event: string,
75
+ callback: any,
76
+ all?: boolean
77
+ ) => void
78
+
71
79
  export const dispatch: (event: string, detail: unknown) => void
72
80
  export const listen: (event: string, callback: (e: any) => unknown) => {
73
81
  remove: () => void
package/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './utils/classNames.ts'
2
2
  export * from './utils/cookies.ts'
3
3
  export * from './utils/debounce.ts'
4
+ export * from './utils/DOMUtils.ts'
4
5
  export * from './utils/event.ts'
5
6
  export * from './utils/interpolate.ts'
6
7
  export * from './utils/modal.ts'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "webcoreui",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.6.1",
5
5
  "scripts": {
6
6
  "prepare": "husky",
7
7
  "pre-commit": "lint-staged",
@@ -12,20 +12,14 @@
12
12
  "create-component": "node scripts/createComponent.js",
13
13
  "lint": "eslint src/**/* --fix"
14
14
  },
15
- "dependencies": {
15
+ "devDependencies": {
16
16
  "@astrojs/check": "0.7.0",
17
+ "@astrojs/node": "8.3.4",
17
18
  "@astrojs/react": "3.5.0",
18
19
  "@astrojs/svelte": "5.5.0",
19
- "astro": "4.10.2",
20
- "react": "18.3.1",
21
- "react-dom": "18.3.1",
22
- "sass": "1.77.5",
23
- "svelte": "4.2.18",
24
- "typescript": "5.4.5"
25
- },
26
- "devDependencies": {
27
20
  "@eslint/js": "9.9.1",
28
21
  "@typescript-eslint/parser": "8.3.0",
22
+ "astro": "4.15.11",
29
23
  "astro-eslint-parser": "1.0.2",
30
24
  "eslint": "9.9.1",
31
25
  "eslint-plugin-astro": "1.2.3",
@@ -34,7 +28,12 @@
34
28
  "eslint-plugin-svelte": "2.43.0",
35
29
  "husky": "9.1.5",
36
30
  "lint-staged": "15.2.9",
31
+ "react": "18.3.1",
32
+ "react-dom": "18.3.1",
33
+ "sass": "1.77.5",
34
+ "svelte": "4.2.19",
37
35
  "svelte-eslint-parser": "0.41.0",
36
+ "typescript": "5.4.5",
38
37
  "typescript-eslint": "8.3.0"
39
38
  },
40
39
  "exports": {