webcoreui 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +5 -2
  2. package/astro.d.ts +7 -1
  3. package/astro.js +6 -0
  4. package/components/Accordion/Accordion.astro +2 -0
  5. package/components/Accordion/Accordion.svelte +2 -0
  6. package/components/Accordion/Accordion.tsx +2 -0
  7. package/components/Alert/Alert.astro +3 -2
  8. package/components/Alert/Alert.svelte +4 -3
  9. package/components/Alert/Alert.tsx +3 -2
  10. package/components/Avatar/Avatar.astro +2 -1
  11. package/components/Avatar/Avatar.svelte +2 -1
  12. package/components/Avatar/Avatar.tsx +3 -3
  13. package/components/Badge/Badge.astro +1 -0
  14. package/components/Badge/Badge.svelte +3 -2
  15. package/components/Badge/Badge.tsx +2 -1
  16. package/components/Button/Button.astro +4 -5
  17. package/components/Button/Button.svelte +2 -1
  18. package/components/Button/Button.tsx +2 -1
  19. package/components/Button/button.ts +1 -1
  20. package/components/Card/Card.astro +11 -3
  21. package/components/Card/Card.svelte +5 -2
  22. package/components/Card/Card.tsx +5 -2
  23. package/components/Card/card.ts +1 -0
  24. package/components/Checkbox/Checkbox.astro +1 -0
  25. package/components/Checkbox/Checkbox.svelte +7 -5
  26. package/components/Checkbox/Checkbox.tsx +4 -2
  27. package/components/Collapsible/Collapsible.astro +2 -1
  28. package/components/Collapsible/Collapsible.svelte +2 -1
  29. package/components/Collapsible/Collapsible.tsx +55 -54
  30. package/components/ConditionalWrapper/ConditionalWrapper.astro +2 -1
  31. package/components/ConditionalWrapper/ConditionalWrapper.tsx +1 -2
  32. package/components/Group/Group.astro +22 -0
  33. package/components/Group/Group.svelte +20 -0
  34. package/components/Group/Group.tsx +22 -0
  35. package/components/Group/group.module.scss +43 -0
  36. package/components/Group/group.ts +8 -0
  37. package/components/Icon/map.ts +2 -0
  38. package/components/Input/Input.astro +8 -1
  39. package/components/Input/Input.svelte +15 -3
  40. package/components/Input/Input.tsx +10 -3
  41. package/components/Input/input.module.scss +4 -1
  42. package/components/Input/input.ts +9 -4
  43. package/components/List/List.astro +169 -0
  44. package/components/List/List.svelte +147 -0
  45. package/components/List/List.tsx +168 -0
  46. package/components/List/list.module.scss +91 -0
  47. package/components/List/list.ts +37 -0
  48. package/components/Menu/Menu.astro +2 -1
  49. package/components/Menu/Menu.svelte +7 -5
  50. package/components/Menu/Menu.tsx +116 -113
  51. package/components/Modal/Modal.astro +6 -4
  52. package/components/Modal/Modal.svelte +8 -6
  53. package/components/Modal/Modal.tsx +79 -76
  54. package/components/Modal/modal.ts +1 -0
  55. package/components/Popover/Popover.astro +4 -1
  56. package/components/Popover/Popover.svelte +4 -2
  57. package/components/Popover/Popover.tsx +55 -27
  58. package/components/Popover/popover.module.scss +1 -0
  59. package/components/Popover/popover.ts +2 -0
  60. package/components/Progress/Progress.astro +2 -1
  61. package/components/Progress/Progress.svelte +2 -1
  62. package/components/Progress/Progress.tsx +3 -2
  63. package/components/Radio/Radio.astro +1 -0
  64. package/components/Radio/Radio.svelte +4 -2
  65. package/components/Radio/Radio.tsx +3 -2
  66. package/components/Rating/Rating.astro +3 -1
  67. package/components/Rating/Rating.svelte +9 -7
  68. package/components/Rating/Rating.tsx +4 -2
  69. package/components/Select/Select.astro +135 -0
  70. package/components/Select/Select.svelte +122 -0
  71. package/components/Select/Select.tsx +142 -0
  72. package/components/Select/select.module.scss +25 -0
  73. package/components/Select/select.ts +21 -0
  74. package/components/Sheet/Sheet.astro +2 -1
  75. package/components/Sheet/Sheet.svelte +2 -1
  76. package/components/Sheet/Sheet.tsx +33 -32
  77. package/components/Slider/Slider.astro +2 -1
  78. package/components/Slider/Slider.svelte +2 -1
  79. package/components/Slider/Slider.tsx +49 -48
  80. package/components/Spinner/Spinner.astro +4 -3
  81. package/components/Spinner/Spinner.svelte +3 -2
  82. package/components/Spinner/Spinner.tsx +4 -3
  83. package/components/Switch/Switch.astro +2 -1
  84. package/components/Switch/Switch.svelte +5 -4
  85. package/components/Switch/Switch.tsx +2 -2
  86. package/components/Switch/switch.module.scss +1 -1
  87. package/components/Table/Table.astro +1 -0
  88. package/components/Table/Table.svelte +2 -1
  89. package/components/Table/Table.tsx +2 -1
  90. package/components/Tabs/Tabs.astro +2 -1
  91. package/components/Tabs/Tabs.svelte +2 -1
  92. package/components/Tabs/Tabs.tsx +4 -3
  93. package/components/Textarea/Textarea.astro +1 -0
  94. package/components/Textarea/Textarea.svelte +3 -1
  95. package/components/Textarea/Textarea.tsx +52 -50
  96. package/components/ThemeSwitcher/ThemeSwitcher.astro +108 -107
  97. package/components/ThemeSwitcher/ThemeSwitcher.svelte +5 -4
  98. package/components/ThemeSwitcher/ThemeSwitcher.tsx +91 -90
  99. package/components/Timeline/Timeline.astro +3 -2
  100. package/components/Timeline/Timeline.svelte +3 -2
  101. package/components/Timeline/Timeline.tsx +3 -2
  102. package/components/TimelineItem/TimelineItem.svelte +2 -1
  103. package/components/TimelineItem/TimelineItem.tsx +2 -1
  104. package/components/Toast/Toast.astro +3 -1
  105. package/components/Toast/Toast.svelte +3 -1
  106. package/components/Toast/Toast.tsx +3 -1
  107. package/icons/moon.svg +1 -1
  108. package/icons/search.svg +3 -0
  109. package/icons.d.ts +1 -0
  110. package/icons.js +1 -0
  111. package/index.d.ts +55 -25
  112. package/package.json +22 -4
  113. package/react.d.ts +6 -0
  114. package/react.js +6 -0
  115. package/scss/config/mixins.scss +12 -10
  116. package/scss/config/variables.scss +1 -0
  117. package/scss/config.scss +1 -0
  118. package/scss/global/utility.scss +2 -0
  119. package/svelte.d.ts +7 -1
  120. package/svelte.js +6 -0
  121. package/utils/cookies.ts +4 -4
  122. package/utils/debounce.ts +1 -1
  123. package/utils/event.ts +2 -2
  124. package/utils/interpolate.ts +5 -5
  125. package/utils/modal.ts +90 -27
  126. package/utils/popover.ts +30 -8
  127. package/utils/toast.ts +6 -2
@@ -1,107 +1,108 @@
1
- ---
2
- import type { ThemeSwitcherProps } from './themeswitcher'
3
- import styles from './themeswitcher.module.scss'
4
-
5
- interface Props extends ThemeSwitcherProps {}
6
-
7
- const {
8
- themes,
9
- toggle,
10
- size,
11
- className
12
- } = Astro.props
13
-
14
- const classes = [
15
- styles.switcher,
16
- toggle && styles.toggle,
17
- className
18
- ]
19
-
20
- const primaryTheme = themes[Object.keys(themes)[0]]
21
- const secondaryTheme = themes[Object.keys(themes)[1]]
22
- const useIcons = Astro.slots.has('primaryIcon') && Astro.slots.has('secondaryIcon')
23
-
24
- const buttonClasses = [
25
- styles.switch,
26
- useIcons && styles.icons
27
- ]
28
- ---
29
-
30
- <div
31
- class:list={classes}
32
- style={size ? `--w-theme-switcher-size: ${size}px;` : null}
33
- data-id="w-theme-switcher"
34
- data-primary-theme={primaryTheme}
35
- data-secondary-theme={toggle ? secondaryTheme : undefined}
36
- >
37
- {Object.keys(themes as {}).map((theme, index) => (
38
- <button
39
- style={!useIcons ? `background:${theme};` : undefined}
40
- data-theme={themes[theme]}
41
- aria-label={themes[theme]}
42
- class:list={buttonClasses}
43
- >
44
- {index === 0 && <slot name="primaryIcon" />}
45
- {index !== 0 && <slot name="secondaryIcon" />}
46
- </button>
47
- ))}
48
- </div>
49
-
50
- <script>
51
- import { setCookie, getCookie } from '../../utils/cookies'
52
- import { listen, dispatch } from '../../utils/event'
53
-
54
- const switchers = document.querySelectorAll('[data-id="w-theme-switcher"]')
55
-
56
- let currentTheme = localStorage.getItem('w-theme')
57
- || getCookie('w-theme')
58
- || (switchers[0] as HTMLDivElement).dataset.primaryTheme
59
- || ''
60
-
61
- const setActiveButton = (buttons: HTMLButtonElement[]) => {
62
- buttons.forEach(button => button.dataset.active = 'false')
63
-
64
- buttons.forEach(button => {
65
- if (button.dataset.theme === currentTheme) {
66
- button.dataset.active = 'true'
67
- }
68
- })
69
- }
70
-
71
- Array.from(switchers).forEach(switcher => {
72
- const buttons = Array.from(switcher.querySelectorAll('button'))
73
-
74
- setActiveButton(buttons)
75
-
76
- listen('theme-switched', theme => {
77
- currentTheme = theme
78
-
79
- setActiveButton(buttons)
80
- })
81
-
82
- switcher.addEventListener('click', event => {
83
- const target = event.target as HTMLButtonElement
84
-
85
- if (target.nodeName === 'BUTTON') {
86
- const toggleTheme = (switcher as HTMLDivElement).dataset.secondaryTheme
87
-
88
- const theme = toggleTheme
89
- ? toggleTheme === target.dataset.theme
90
- ? (target.previousElementSibling as HTMLButtonElement).dataset.theme as string
91
- : (target.nextElementSibling as HTMLButtonElement).dataset.theme as string
92
- : target.dataset.theme as string
93
-
94
- document.body.classList.replace(currentTheme, theme)
95
-
96
- currentTheme = theme
97
-
98
- setActiveButton(buttons)
99
- setCookie('w-theme', currentTheme, 30)
100
- localStorage.setItem('w-theme', currentTheme)
101
-
102
- dispatch('theme-switched', currentTheme)
103
- }
104
- })
105
- })
106
- </script>
107
-
1
+ ---
2
+ import type { ThemeSwitcherProps } from './themeswitcher'
3
+
4
+ import styles from './themeswitcher.module.scss'
5
+
6
+ interface Props extends ThemeSwitcherProps {}
7
+
8
+ const {
9
+ themes,
10
+ toggle,
11
+ size,
12
+ className
13
+ } = Astro.props
14
+
15
+ const classes = [
16
+ styles.switcher,
17
+ toggle && styles.toggle,
18
+ className
19
+ ]
20
+
21
+ const primaryTheme = themes[Object.keys(themes)[0]]
22
+ const secondaryTheme = themes[Object.keys(themes)[1]]
23
+ const useIcons = Astro.slots.has('primaryIcon') && Astro.slots.has('secondaryIcon')
24
+
25
+ const buttonClasses = [
26
+ styles.switch,
27
+ useIcons && styles.icons
28
+ ]
29
+ ---
30
+
31
+ <div
32
+ class:list={classes}
33
+ style={size ? `--w-theme-switcher-size: ${size}px;` : null}
34
+ data-id="w-theme-switcher"
35
+ data-primary-theme={primaryTheme}
36
+ data-secondary-theme={toggle ? secondaryTheme : undefined}
37
+ >
38
+ {Object.keys(themes).map((theme, index) => (
39
+ <button
40
+ style={!useIcons ? `background:${theme};` : undefined}
41
+ data-theme={themes[theme]}
42
+ aria-label={themes[theme]}
43
+ class:list={buttonClasses}
44
+ >
45
+ {index === 0 && <slot name="primaryIcon" />}
46
+ {index !== 0 && <slot name="secondaryIcon" />}
47
+ </button>
48
+ ))}
49
+ </div>
50
+
51
+ <script>
52
+ import { getCookie, setCookie } from '../../utils/cookies'
53
+ import { dispatch, listen } from '../../utils/event'
54
+
55
+ const switchers = document.querySelectorAll('[data-id="w-theme-switcher"]')
56
+
57
+ let currentTheme = localStorage.getItem('w-theme')
58
+ || getCookie('w-theme')
59
+ || (switchers[0] as HTMLDivElement).dataset.primaryTheme
60
+ || ''
61
+
62
+ const setActiveButton = (buttons: HTMLButtonElement[]) => {
63
+ buttons.forEach(button => button.dataset.active = 'false')
64
+
65
+ buttons.forEach(button => {
66
+ if (button.dataset.theme === currentTheme) {
67
+ button.dataset.active = 'true'
68
+ }
69
+ })
70
+ }
71
+
72
+ Array.from(switchers).forEach(switcher => {
73
+ const buttons = Array.from(switcher.querySelectorAll('button'))
74
+
75
+ setActiveButton(buttons)
76
+
77
+ listen('theme-switched', theme => {
78
+ currentTheme = theme
79
+
80
+ setActiveButton(buttons)
81
+ })
82
+
83
+ switcher.addEventListener('click', event => {
84
+ const target = event.target as HTMLButtonElement
85
+
86
+ if (target.nodeName === 'BUTTON') {
87
+ const toggleTheme = (switcher as HTMLDivElement).dataset.secondaryTheme
88
+
89
+ const theme = toggleTheme
90
+ ? toggleTheme === target.dataset.theme
91
+ ? (target.previousElementSibling as HTMLButtonElement).dataset.theme as string
92
+ : (target.nextElementSibling as HTMLButtonElement).dataset.theme as string
93
+ : target.dataset.theme as string
94
+
95
+ document.body.classList.replace(currentTheme, theme)
96
+
97
+ currentTheme = theme
98
+
99
+ setActiveButton(buttons)
100
+ setCookie('w-theme', currentTheme, 30)
101
+ localStorage.setItem('w-theme', currentTheme)
102
+
103
+ dispatch('theme-switched', currentTheme)
104
+ }
105
+ })
106
+ })
107
+ </script>
108
+
@@ -1,10 +1,10 @@
1
1
  <script lang="ts">
2
2
  import { onMount } from 'svelte'
3
3
  import type { ThemeSwitcherProps } from './themeswitcher'
4
-
4
+
5
5
  import { classNames } from '../../utils/classNames'
6
- import { listen, dispatch } from '../../utils/event'
7
- import { setCookie, getCookie } from '../../utils/cookies'
6
+ import { getCookie, setCookie } from '../../utils/cookies'
7
+ import { dispatch, listen } from '../../utils/event'
8
8
 
9
9
  import styles from './themeswitcher.module.scss'
10
10
 
@@ -24,10 +24,11 @@
24
24
 
25
25
  const primaryTheme = themes[Object.keys(themes)[0]]
26
26
  const secondaryTheme = themes[Object.keys(themes)[1]]
27
- const useIcons = $$slots.primaryIcon && $$slots.secondaryIcon
27
+ const useIcons = $$slots.primaryIcon && $$slots.secondaryIcon
28
28
 
29
29
  const setTheme = (theme: string | number) => {
30
30
  if (typeof theme === 'number') {
31
+ // eslint-disable-next-line no-param-reassign
31
32
  theme = toggled ? primaryTheme : secondaryTheme
32
33
  }
33
34
 
@@ -1,90 +1,91 @@
1
- import React, { useState, useEffect } from 'react'
2
- import type { ReactThemeSwitcherProps } from './themeswitcher'
3
-
4
- import { setCookie, getCookie } from '../../utils/cookies'
5
- import { listen, dispatch } from '../../utils/event'
6
- import { classNames } from '../../utils/classNames'
7
-
8
- import styles from './themeswitcher.module.scss'
9
-
10
- const ThemeSwitcher = ({
11
- themes,
12
- toggle,
13
- size,
14
- primaryIcon,
15
- secondaryIcon,
16
- className
17
- }: ReactThemeSwitcherProps) => {
18
- const [currentTheme, setCurrentTheme] = useState('')
19
- const [toggled, setToggled] = useState(false)
20
-
21
- const classes = classNames([
22
- styles.switcher,
23
- toggle && styles.toggle,
24
- className
25
- ])
26
-
27
- const sizeStyles = size
28
- ? { '--w-theme-switcher-size': `${size}px` } as React.CSSProperties
29
- : undefined
30
-
31
- const primaryTheme = themes[Object.keys(themes)[0]]
32
- const secondaryTheme = themes[Object.keys(themes)[1]]
33
- const useIcons = primaryIcon && secondaryIcon
34
-
35
- const setTheme = (theme: string | number) => {
36
- if (typeof theme === 'number') {
37
- theme = toggled ? primaryTheme : secondaryTheme
38
- }
39
-
40
- document.body.classList.replace(currentTheme, theme)
41
-
42
- setCookie('w-theme', theme, 30)
43
- localStorage.setItem('w-theme', theme)
44
-
45
- dispatch('theme-switched', theme)
46
- }
47
-
48
- useEffect(() => {
49
- setCurrentTheme(
50
- localStorage.getItem('w-theme')
51
- || getCookie('w-theme')
52
- || themes[Object.keys(themes)[0]]
53
- )
54
-
55
- if (toggle && currentTheme === secondaryTheme) {
56
- setToggled(true)
57
- }
58
-
59
- listen('theme-switched', theme => {
60
- setCurrentTheme(theme)
61
- setToggled(theme === secondaryTheme)
62
- })
63
- }, [])
64
-
65
- return (
66
- <div
67
- className={classes}
68
- style={sizeStyles}
69
- >
70
- {Object.keys(themes as {}).map((theme, index) => (
71
- <button
72
- key={index}
73
- onClick={() => setTheme(toggle ? index : themes[theme])}
74
- data-active={currentTheme === themes[theme]}
75
- aria-label={themes[theme]}
76
- style={!useIcons ? { background: theme } : undefined}
77
- className={classNames([
78
- styles.switch,
79
- useIcons && styles.icons
80
- ])}
81
- >
82
- {index === 0 && primaryIcon}
83
- {index !== 0 && secondaryIcon}
84
- </button>
85
- ))}
86
- </div>
87
- )
88
- }
89
-
90
- export default ThemeSwitcher
1
+ import React, { useEffect, useState } from 'react'
2
+ import type { ReactThemeSwitcherProps } from './themeswitcher'
3
+
4
+ import { classNames } from '../../utils/classNames'
5
+ import { getCookie, setCookie } from '../../utils/cookies'
6
+ import { dispatch, listen } from '../../utils/event'
7
+
8
+ import styles from './themeswitcher.module.scss'
9
+
10
+ const ThemeSwitcher = ({
11
+ themes,
12
+ toggle,
13
+ size,
14
+ primaryIcon,
15
+ secondaryIcon,
16
+ className
17
+ }: ReactThemeSwitcherProps) => {
18
+ const [currentTheme, setCurrentTheme] = useState('')
19
+ const [toggled, setToggled] = useState(false)
20
+
21
+ const classes = classNames([
22
+ styles.switcher,
23
+ toggle && styles.toggle,
24
+ className
25
+ ])
26
+
27
+ const sizeStyles = size
28
+ ? { '--w-theme-switcher-size': `${size}px` } as React.CSSProperties
29
+ : undefined
30
+
31
+ const primaryTheme = themes[Object.keys(themes)[0]]
32
+ const secondaryTheme = themes[Object.keys(themes)[1]]
33
+ const useIcons = primaryIcon && secondaryIcon
34
+
35
+ const setTheme = (theme: string | number) => {
36
+ if (typeof theme === 'number') {
37
+ // eslint-disable-next-line no-param-reassign
38
+ theme = toggled ? primaryTheme : secondaryTheme
39
+ }
40
+
41
+ document.body.classList.replace(currentTheme, theme)
42
+
43
+ setCookie('w-theme', theme, 30)
44
+ localStorage.setItem('w-theme', theme)
45
+
46
+ dispatch('theme-switched', theme)
47
+ }
48
+
49
+ useEffect(() => {
50
+ setCurrentTheme(
51
+ localStorage.getItem('w-theme')
52
+ || getCookie('w-theme')
53
+ || themes[Object.keys(themes)[0]]
54
+ )
55
+
56
+ if (toggle && currentTheme === secondaryTheme) {
57
+ setToggled(true)
58
+ }
59
+
60
+ listen('theme-switched', theme => {
61
+ setCurrentTheme(theme)
62
+ setToggled(theme === secondaryTheme)
63
+ })
64
+ }, [])
65
+
66
+ return (
67
+ <div
68
+ className={classes}
69
+ style={sizeStyles}
70
+ >
71
+ {Object.keys(themes).map((theme, index) => (
72
+ <button
73
+ key={index}
74
+ onClick={() => setTheme(toggle ? index : themes[theme])}
75
+ data-active={currentTheme === themes[theme]}
76
+ aria-label={themes[theme]}
77
+ style={!useIcons ? { background: theme } : undefined}
78
+ className={classNames([
79
+ styles.switch,
80
+ useIcons && styles.icons
81
+ ])}
82
+ >
83
+ {index === 0 && primaryIcon}
84
+ {index !== 0 && secondaryIcon}
85
+ </button>
86
+ ))}
87
+ </div>
88
+ )
89
+ }
90
+
91
+ export default ThemeSwitcher
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  import type { TimelineProps } from './timeline'
3
3
 
4
- import styles from './timeline.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './timeline.module.scss'
7
+
7
8
  interface Props extends TimelineProps {}
8
9
 
9
10
  const {
@@ -27,7 +28,7 @@ const classes = [
27
28
  const styleVariables = classNames([
28
29
  color && `--w-timeline-color: ${color};`,
29
30
  textColor && `--w-timeline-text-color: ${textColor};`,
30
- counter && `--w-timeline-counter: ${counter};`,
31
+ counter && `--w-timeline-counter: ${counter};`
31
32
  ])
32
33
  ---
33
34
 
@@ -1,9 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { TimelineProps } from './timeline'
3
3
 
4
- import styles from './timeline.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './timeline.module.scss'
7
+
7
8
  export let theme: TimelineProps['theme'] = null
8
9
  export let counter: TimelineProps['counter'] = null
9
10
  export let alternate: TimelineProps['alternate'] = false
@@ -23,7 +24,7 @@
23
24
  const styleVariables = classNames([
24
25
  color && `--w-timeline-color: ${color};`,
25
26
  textColor && `--w-timeline-text-color: ${textColor};`,
26
- counter && `--w-timeline-counter: ${counter};`,
27
+ counter && `--w-timeline-counter: ${counter};`
27
28
  ])
28
29
  </script>
29
30
 
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
2
  import type { ReactTimelineProps } from './timeline'
3
3
 
4
- import styles from './timeline.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './timeline.module.scss'
7
+
7
8
  const Timeline = ({
8
9
  theme,
9
10
  counter,
@@ -25,7 +26,7 @@ const Timeline = ({
25
26
  const styleVariables = {
26
27
  ...(color && { '--w-timeline-color': color }),
27
28
  ...(textColor && { '--w-timeline-text-color': textColor }),
28
- ...(counter && { '--w-timeline-counter': counter }),
29
+ ...(counter && { '--w-timeline-counter': counter })
29
30
  } as React.CSSProperties
30
31
 
31
32
  return (
@@ -1,9 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { TimelineItemProps } from './timelineitem'
3
3
 
4
- import styles from './timelineitem.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './timelineitem.module.scss'
7
+
7
8
  export let title: TimelineItemProps['title'] = ''
8
9
  export let titleTag: TimelineItemProps['titleTag'] = 'span'
9
10
  export let className: TimelineItemProps['className'] = ''
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
2
  import type { ReactTimelineItemProps } from './timelineitem'
3
3
 
4
- import styles from './timelineitem.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './timelineitem.module.scss'
7
+
7
8
  const TimelineItem = ({
8
9
  title,
9
10
  TitleTag = 'span',
@@ -1,10 +1,12 @@
1
1
  ---
2
2
  import type { ToastProps } from './toast'
3
+
3
4
  import Alert from '../Alert/Alert.astro'
4
5
 
5
- import styles from './toast.module.scss'
6
6
  import { classNames } from '../../utils/classNames'
7
7
 
8
+ import styles from './toast.module.scss'
9
+
8
10
  interface Props extends ToastProps {}
9
11
 
10
12
  const {
@@ -1,10 +1,12 @@
1
1
  <script lang="ts">
2
2
  import type { ToastProps } from './toast'
3
+
3
4
  import Alert from '../Alert/Alert.svelte'
4
5
 
5
- import styles from './toast.module.scss'
6
6
  import { classNames } from '../../utils/classNames'
7
7
 
8
+ import styles from './toast.module.scss'
9
+
8
10
  export let position: ToastProps['position'] = null
9
11
  export let className: ToastProps['className'] = ''
10
12
 
@@ -1,10 +1,12 @@
1
1
  import React from 'react'
2
2
  import type { ReactToastProps } from './toast'
3
+
3
4
  import Alert from '../Alert/Alert.tsx'
4
5
 
5
- import styles from './toast.module.scss'
6
6
  import { classNames } from '../../utils/classNames'
7
7
 
8
+ import styles from './toast.module.scss'
9
+
8
10
  const Toast = ({
9
11
  icon,
10
12
  position,
package/icons/moon.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="M23 12.9878C22.3889 19.5232 15.8512 24.1592 9.42483 22.745C-2.76068 20.0671 -1.26102 2.11102 10.9147 1C5.14829 8.69528 15.1998 18.6762 23 12.9878Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
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="M18.765 18.765L23 23M21.7776 11.4239C21.7776 17.181 17.126 21.8478 11.3895 21.8478C5.65163 21.8478 1 17.181 1 11.4252C1 5.66537 5.65162 1 11.3881 1C17.126 1 21.7776 5.66675 21.7776 11.4239Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
3
+ </svg>
package/icons.d.ts CHANGED
@@ -7,6 +7,7 @@ declare module 'webcoreui/icons' {
7
7
  export const github: string
8
8
  export const info: string
9
9
  export const moon: string
10
+ export const search: string
10
11
  export const sun: string
11
12
  export const warning: string
12
13
  }
package/icons.js CHANGED
@@ -6,5 +6,6 @@ export { default as close } from './icons/close.svg?raw'
6
6
  export { default as github } from './icons/github.svg?raw'
7
7
  export { default as info } from './icons/info.svg?raw'
8
8
  export { default as moon } from './icons/moon.svg?raw'
9
+ export { default as search } from './icons/search.svg?raw'
9
10
  export { default as sun } from './icons/sun.svg?raw'
10
11
  export { default as warning } from './icons/warning.svg?raw'