webcoreui 0.3.0 → 0.4.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 (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 -2
  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,113 +1,116 @@
1
- import React, { useState } from 'react'
2
- import type { ReactMenuProps } from './menu'
3
- import ConditionalWrapper from '../ConditionalWrapper/ConditionalWrapper.tsx'
4
-
5
- import styles from './menu.module.scss'
6
- import { classNames } from '../../utils/classNames'
7
-
8
- const Menu = ({
9
- items,
10
- logo,
11
- centerLogo,
12
- className,
13
- wrapperClassName,
14
- children
15
- }: ReactMenuProps) => {
16
- const [active, setActive] = useState(false)
17
-
18
- const classes = classNames([
19
- styles.menu,
20
- className
21
- ])
22
-
23
- const containerClasses = classNames([
24
- styles.container,
25
- wrapperClassName
26
- ])
27
-
28
- const wrapMenu = (logo?.url || logo?.html) && items?.length && children
29
-
30
- const toggleMenu = () => setActive(!active)
31
-
32
- return (
33
- <header className={classes} data-active={active || null}>
34
- <div className={containerClasses}>
35
- <ConditionalWrapper
36
- condition={!!wrapMenu}
37
- wrapper={children => (
38
- <div className={styles.wrapper}>
39
- {children}
40
- </div>
41
- )}
42
- >
43
- {logo?.url && !centerLogo && (
44
- <a href="/">
45
- <img
46
- src={logo.url}
47
- alt={logo.alt || 'Logo'}
48
- width={logo.width}
49
- height={logo.height}
50
- />
51
- </a>
52
- )}
53
-
54
- {!centerLogo && logo?.html && (
55
- <a
56
- href="/"
57
- dangerouslySetInnerHTML={{ __html: logo.html }}
58
- aria-label={logo.alt || 'Logo'}
59
- />
60
- )}
61
-
62
- {!!items?.length && (
63
- <ul>
64
- {items.map((item, index) => (
65
- <li key={index}>
66
- <a
67
- href={item.url}
68
- target={item.target}
69
- className={item.active ? styles.active : undefined}
70
- >
71
- {item.name}
72
- </a>
73
- </li>
74
- ))}
75
- </ul>
76
- )}
77
- </ConditionalWrapper>
78
-
79
- {!!items?.length && (
80
- <button className={styles.hamburger} onClick={toggleMenu}>
81
- <span className={styles.meat}></span>
82
- <span className={styles.meat}></span>
83
- <span className={styles.meat}></span>
84
- <span className={styles.meat}></span>
85
- </button>
86
- )}
87
-
88
- {centerLogo && logo?.html && (
89
- <a
90
- href="/"
91
- dangerouslySetInnerHTML={{ __html: logo.html }}
92
- aria-label={logo.alt || 'Logo'}
93
- />
94
- )}
95
-
96
- {logo?.url && centerLogo && (
97
- <a href="/">
98
- <img
99
- src={logo.url}
100
- alt={logo.alt || 'Logo'}
101
- width={logo.width}
102
- height={logo.height}
103
- />
104
- </a>
105
- )}
106
-
107
- {children}
108
- </div>
109
- </header>
110
- )
111
- }
112
-
113
- export default Menu
1
+ import React, { useState } from 'react'
2
+ import type { ReactMenuProps } from './menu'
3
+
4
+ import ConditionalWrapper from '../ConditionalWrapper/ConditionalWrapper.tsx'
5
+
6
+ import { classNames } from '../../utils/classNames'
7
+
8
+ import styles from './menu.module.scss'
9
+
10
+ // eslint-disable-next-line complexity
11
+ const Menu = ({
12
+ items,
13
+ logo,
14
+ centerLogo,
15
+ className,
16
+ wrapperClassName,
17
+ children
18
+ }: ReactMenuProps) => {
19
+ const [active, setActive] = useState(false)
20
+
21
+ const classes = classNames([
22
+ styles.menu,
23
+ className
24
+ ])
25
+
26
+ const containerClasses = classNames([
27
+ styles.container,
28
+ wrapperClassName
29
+ ])
30
+
31
+ const wrapMenu = (logo?.url || logo?.html) && items?.length && children
32
+
33
+ const toggleMenu = () => setActive(!active)
34
+
35
+ return (
36
+ <header className={classes} data-active={active || null}>
37
+ <div className={containerClasses}>
38
+ <ConditionalWrapper
39
+ condition={!!wrapMenu}
40
+ wrapper={children => (
41
+ <div className={styles.wrapper}>
42
+ {children}
43
+ </div>
44
+ )}
45
+ >
46
+ {logo?.url && !centerLogo && (
47
+ <a href="/">
48
+ <img
49
+ src={logo.url}
50
+ alt={logo.alt || 'Logo'}
51
+ width={logo.width}
52
+ height={logo.height}
53
+ />
54
+ </a>
55
+ )}
56
+
57
+ {!centerLogo && logo?.html && (
58
+ <a
59
+ href="/"
60
+ dangerouslySetInnerHTML={{ __html: logo.html }}
61
+ aria-label={logo.alt || 'Logo'}
62
+ />
63
+ )}
64
+
65
+ {!!items?.length && (
66
+ <ul>
67
+ {items.map((item, index) => (
68
+ <li key={index}>
69
+ <a
70
+ href={item.url}
71
+ target={item.target}
72
+ className={item.active ? styles.active : undefined}
73
+ >
74
+ {item.name}
75
+ </a>
76
+ </li>
77
+ ))}
78
+ </ul>
79
+ )}
80
+ </ConditionalWrapper>
81
+
82
+ {!!items?.length && (
83
+ <button className={styles.hamburger} onClick={toggleMenu}>
84
+ <span className={styles.meat}></span>
85
+ <span className={styles.meat}></span>
86
+ <span className={styles.meat}></span>
87
+ <span className={styles.meat}></span>
88
+ </button>
89
+ )}
90
+
91
+ {centerLogo && logo?.html && (
92
+ <a
93
+ href="/"
94
+ dangerouslySetInnerHTML={{ __html: logo.html }}
95
+ aria-label={logo.alt || 'Logo'}
96
+ />
97
+ )}
98
+
99
+ {logo?.url && centerLogo && (
100
+ <a href="/">
101
+ <img
102
+ src={logo.url}
103
+ alt={logo.alt || 'Logo'}
104
+ width={logo.width}
105
+ height={logo.height}
106
+ />
107
+ </a>
108
+ )}
109
+
110
+ {children}
111
+ </div>
112
+ </header>
113
+ )
114
+ }
115
+
116
+ export default Menu
@@ -3,11 +3,11 @@ import type { ModalProps } from './modal'
3
3
 
4
4
  import Button from '../Button/Button.astro'
5
5
 
6
- import info from '../../icons/info.svg?raw'
7
- import success from '../../icons/circle-check.svg?raw'
8
- import warning from '../../icons/warning.svg?raw'
9
6
  import alert from '../../icons/alert.svg?raw'
7
+ import success from '../../icons/circle-check.svg?raw'
10
8
  import closeIcon from '../../icons/close.svg?raw'
9
+ import info from '../../icons/info.svg?raw'
10
+ import warning from '../../icons/warning.svg?raw'
11
11
 
12
12
  import styles from './modal.module.scss'
13
13
 
@@ -28,7 +28,8 @@ const {
28
28
  closeOnOverlay = true,
29
29
  theme,
30
30
  id,
31
- className
31
+ className,
32
+ ...rest
32
33
  } = Astro.props
33
34
 
34
35
  const close = [
@@ -48,6 +49,7 @@ const classes = [
48
49
  class:list={classes}
49
50
  id={id}
50
51
  data-close={close.length ? close : undefined}
52
+ {...rest}
51
53
  >
52
54
  {showCloseIcon && (
53
55
  <Button
@@ -1,16 +1,17 @@
1
1
  <script lang="ts">
2
2
  import type { ModalProps } from './modal'
3
3
 
4
- import styles from './modal.module.scss'
5
- import { classNames } from '../../utils/classNames'
6
-
7
4
  import Button from '../Button/Button.svelte'
8
5
 
9
- import info from '../../icons/info.svg?raw'
10
- import success from '../../icons/circle-check.svg?raw'
11
- import warning from '../../icons/warning.svg?raw'
6
+ import { classNames } from '../../utils/classNames'
7
+
12
8
  import alert from '../../icons/alert.svg?raw'
9
+ import success from '../../icons/circle-check.svg?raw'
13
10
  import closeIcon from '../../icons/close.svg?raw'
11
+ import info from '../../icons/info.svg?raw'
12
+ import warning from '../../icons/warning.svg?raw'
13
+
14
+ import styles from './modal.module.scss'
14
15
 
15
16
  export let title: ModalProps['title'] = ''
16
17
  export let subTitle: ModalProps['subTitle'] = ''
@@ -45,6 +46,7 @@
45
46
  class={classes}
46
47
  id={id}
47
48
  data-close={close.length ? close : undefined}
49
+ {...$$restProps}
48
50
  >
49
51
  {#if showCloseIcon}
50
52
  <Button
@@ -1,76 +1,79 @@
1
- import React from 'react'
2
- import type { ReactModalProps } from './modal'
3
-
4
- import styles from './modal.module.scss'
5
- import { classNames } from '../../utils/classNames'
6
-
7
- import Button from '../Button/Button.tsx'
8
-
9
- import info from '../../icons/info.svg?raw'
10
- import success from '../../icons/circle-check.svg?raw'
11
- import warning from '../../icons/warning.svg?raw'
12
- import alert from '../../icons/alert.svg?raw'
13
- import closeIcon from '../../icons/close.svg?raw'
14
-
15
- const iconMap = {
16
- info,
17
- success,
18
- warning,
19
- alert
20
- }
21
-
22
- const Modal = ({
23
- title,
24
- subTitle,
25
- showCloseIcon = true,
26
- closeOnEsc = true,
27
- closeOnOverlay = true,
28
- theme,
29
- id,
30
- className,
31
- children
32
- }: ReactModalProps) => {
33
- const classes = classNames([
34
- styles.modal,
35
- theme && styles[theme],
36
- className
37
- ])
38
-
39
- const close = [
40
- showCloseIcon && 'icon',
41
- closeOnEsc && 'esc',
42
- closeOnOverlay && 'overlay'
43
- ].filter(Boolean).join(',')
44
-
45
- return (
46
- <React.Fragment>
47
- <dialog
48
- className={classes}
49
- id={id}
50
- data-close={close.length ? close : undefined}
51
- >
52
- {showCloseIcon && (
53
- <Button
54
- theme="flat"
55
- className={styles.close}
56
- data-id="close"
57
- dangerouslySetInnerHTML={{ __html: closeIcon }}
58
- />
59
- )}
60
- {title && (
61
- <strong
62
- className={styles.title}
63
- dangerouslySetInnerHTML={{
64
- __html: theme ? iconMap[theme] + title : title
65
- }}
66
- />
67
- )}
68
- {subTitle && <div className={styles.subTitle}>{subTitle}</div>}
69
- {children}
70
- </dialog>
71
- <div className={styles.overlay} />
72
- </React.Fragment>
73
- )
74
- }
75
-
76
- export default Modal
1
+ import React from 'react'
2
+ import type { ReactModalProps } from './modal'
3
+
4
+ import Button from '../Button/Button.tsx'
5
+
6
+ import { classNames } from '../../utils/classNames'
7
+
8
+ import alert from '../../icons/alert.svg?raw'
9
+ import success from '../../icons/circle-check.svg?raw'
10
+ import closeIcon from '../../icons/close.svg?raw'
11
+ import info from '../../icons/info.svg?raw'
12
+ import warning from '../../icons/warning.svg?raw'
13
+
14
+ import styles from './modal.module.scss'
15
+
16
+ const iconMap = {
17
+ info,
18
+ success,
19
+ warning,
20
+ alert
21
+ }
22
+
23
+ const Modal = ({
24
+ title,
25
+ subTitle,
26
+ showCloseIcon = true,
27
+ closeOnEsc = true,
28
+ closeOnOverlay = true,
29
+ theme,
30
+ id,
31
+ className,
32
+ children,
33
+ ...rest
34
+ }: ReactModalProps) => {
35
+ const classes = classNames([
36
+ styles.modal,
37
+ theme && styles[theme],
38
+ className
39
+ ])
40
+
41
+ const close = [
42
+ showCloseIcon && 'icon',
43
+ closeOnEsc && 'esc',
44
+ closeOnOverlay && 'overlay'
45
+ ].filter(Boolean).join(',')
46
+
47
+ return (
48
+ <React.Fragment>
49
+ <dialog
50
+ className={classes}
51
+ id={id}
52
+ data-close={close.length ? close : undefined}
53
+ {...rest}
54
+ >
55
+ {showCloseIcon && (
56
+ <Button
57
+ theme="flat"
58
+ className={styles.close}
59
+ data-id="close"
60
+ dangerouslySetInnerHTML={{ __html: closeIcon }}
61
+ />
62
+ )}
63
+ {title && (
64
+ <strong
65
+ className={styles.title}
66
+ dangerouslySetInnerHTML={{
67
+ __html: theme ? iconMap[theme] + title : title
68
+ }}
69
+ />
70
+ )}
71
+ {subTitle && <div className={styles.subTitle}>{subTitle}</div>}
72
+ {children}
73
+ </dialog>
74
+ <div className={styles.overlay} />
75
+ </React.Fragment>
76
+ )
77
+ }
78
+
79
+ export default Modal
@@ -11,6 +11,7 @@ export type ModalProps = {
11
11
  | 'warning'
12
12
  | 'alert'
13
13
  | null
14
+ [key: string]: any
14
15
  }
15
16
 
16
17
  export type ReactModalProps = {
@@ -1,12 +1,14 @@
1
1
  ---
2
2
  import type { PopoverProps } from './popover'
3
+
3
4
  import styles from './popover.module.scss'
4
5
 
5
6
  interface Props extends PopoverProps {}
6
7
 
7
8
  const {
8
9
  id,
9
- className
10
+ className,
11
+ ...rest
10
12
  } = Astro.props
11
13
 
12
14
  const classes = [
@@ -18,6 +20,7 @@ const classes = [
18
20
  <dialog
19
21
  class:list={classes}
20
22
  id={id}
23
+ {...rest}
21
24
  >
22
25
  <slot />
23
26
  </dialog>
@@ -1,9 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { PopoverProps } from './popover'
3
3
 
4
- import styles from './popover.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './popover.module.scss'
7
+
7
8
  export let id: PopoverProps['id'] = ''
8
9
  export let className: PopoverProps['className'] = ''
9
10
 
@@ -15,7 +16,8 @@
15
16
 
16
17
  <dialog
17
18
  class={classes}
18
- id={id}
19
+ id={id || null}
20
+ {...$$restProps}
19
21
  >
20
22
  <slot />
21
23
  </dialog>
@@ -1,27 +1,55 @@
1
- import React from 'react'
2
- import type { ReactPopoverProps } from './popover'
3
-
4
- import styles from './popover.module.scss'
5
- import { classNames } from '../../utils/classNames'
6
-
7
- const Popover = ({
8
- id,
9
- className,
10
- children
11
- }: ReactPopoverProps) => {
12
- const classes = classNames([
13
- styles.popover,
14
- className
15
- ])
16
-
17
- return (
18
- <dialog
19
- className={classes}
20
- id={id}
21
- >
22
- {children}
23
- </dialog>
24
- )
25
- }
26
-
27
- export default Popover
1
+ import React, { useEffect,useState } from 'react'
2
+ import { createPortal } from 'react-dom'
3
+ import type { ReactPopoverProps } from './popover'
4
+
5
+ import { classNames } from '../../utils/classNames'
6
+
7
+ import styles from './popover.module.scss'
8
+
9
+ const Popover = ({
10
+ id,
11
+ className,
12
+ isInteractive = false,
13
+ children,
14
+ ...rest
15
+ }: ReactPopoverProps) => {
16
+ const [isMounted, setIsMounted] = useState(false)
17
+
18
+ const classes = classNames([
19
+ styles.popover,
20
+ className
21
+ ])
22
+
23
+ useEffect(() => {
24
+ setIsMounted(true)
25
+ }, [])
26
+
27
+ if (!isMounted && isInteractive) {
28
+ return null
29
+ }
30
+
31
+ if (isInteractive) {
32
+ return createPortal(
33
+ <dialog
34
+ className={classes}
35
+ id={id}
36
+ {...rest}
37
+ >
38
+ {children}
39
+ </dialog>,
40
+ document.body
41
+ )
42
+ }
43
+
44
+ return (
45
+ <dialog
46
+ className={classes}
47
+ id={id}
48
+ {...rest}
49
+ >
50
+ {children}
51
+ </dialog>
52
+ )
53
+ }
54
+
55
+ export default Popover
@@ -9,6 +9,7 @@
9
9
  @include typography(primary);
10
10
  @include border-radius(md);
11
11
  @include size(w300px);
12
+ @include position('t-100%');
12
13
 
13
14
  transform: translateY(-5px);
14
15
  pointer-events: none;
@@ -1,8 +1,10 @@
1
1
  export type PopoverProps = {
2
2
  id?: string
3
3
  className?: string
4
+ [key: string]: any
4
5
  }
5
6
 
6
7
  export type ReactPopoverProps = {
8
+ isInteractive?: boolean
7
9
  children?: React.ReactNode
8
10
  } & PopoverProps
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  import type { ProgressProps } from './progress'
3
3
 
4
- import styles from './progress.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './progress.module.scss'
7
+
7
8
  interface Props extends ProgressProps {}
8
9
 
9
10
  const {
@@ -1,9 +1,10 @@
1
1
  <script lang="ts">
2
2
  import type { ProgressProps } from './progress'
3
3
 
4
- import styles from './progress.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './progress.module.scss'
7
+
7
8
  export let value: ProgressProps['value'] = 0
8
9
  export let size: ProgressProps['size'] = null
9
10
  export let label: ProgressProps['label'] = false
@@ -1,9 +1,10 @@
1
1
  import React from 'react'
2
2
  import type { ProgressProps } from './progress'
3
3
 
4
- import styles from './progress.module.scss'
5
4
  import { classNames } from '../../utils/classNames'
6
5
 
6
+ import styles from './progress.module.scss'
7
+
7
8
  const Progress = ({
8
9
  value,
9
10
  size,
@@ -28,7 +29,7 @@ const Progress = ({
28
29
  ...(color && { '--w-progress-color': color }),
29
30
  ...(background && { '--w-progress-background': background }),
30
31
  ...(stripeLight && { '--w-progress-stripe-light': stripeLight }),
31
- ...(stripeDark && { '--w-progress-stripe-dark': stripeDark }),
32
+ ...(stripeDark && { '--w-progress-stripe-dark': stripeDark })
32
33
  } as React.CSSProperties
33
34
 
34
35
  const percent = {