webcoreui 0.0.8 → 0.0.10

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 (93) hide show
  1. package/README.md +26 -11
  2. package/astro.d.ts +31 -11
  3. package/astro.js +23 -1
  4. package/components/Alert/Alert.astro +3 -5
  5. package/components/Alert/Alert.svelte +3 -5
  6. package/components/Alert/Alert.tsx +3 -3
  7. package/components/Alert/alert.scss +1 -0
  8. package/components/Alert/alert.ts +6 -1
  9. package/components/Avatar/Avatar.astro +51 -0
  10. package/components/Avatar/Avatar.svelte +48 -0
  11. package/components/Avatar/Avatar.tsx +64 -0
  12. package/components/Avatar/avatar.scss +35 -0
  13. package/components/Avatar/avatar.ts +10 -0
  14. package/components/Badge/Badge.astro +4 -7
  15. package/components/Badge/Badge.svelte +2 -5
  16. package/components/Badge/Badge.tsx +3 -3
  17. package/components/Badge/badge.ts +4 -1
  18. package/components/Button/Button.astro +1 -4
  19. package/components/Button/Button.svelte +1 -4
  20. package/components/Button/Button.tsx +2 -2
  21. package/components/Button/button.scss +0 -1
  22. package/components/Button/button.ts +4 -0
  23. package/components/Card/Card.astro +2 -5
  24. package/components/Card/Card.svelte +1 -4
  25. package/components/Card/Card.tsx +2 -2
  26. package/components/Card/card.scss +1 -0
  27. package/components/Card/card.ts +7 -0
  28. package/components/Checkbox/Checkbox.astro +51 -0
  29. package/components/Checkbox/Checkbox.svelte +52 -0
  30. package/components/Checkbox/Checkbox.tsx +65 -0
  31. package/components/Checkbox/checkbox.scss +85 -0
  32. package/components/Checkbox/checkbox.ts +12 -0
  33. package/components/ConditionalWrapper/ConditionalWrapper.tsx +2 -8
  34. package/components/ConditionalWrapper/conditionalwrapper.ts +5 -0
  35. package/components/Progress/Progress.astro +40 -0
  36. package/components/Progress/Progress.svelte +38 -0
  37. package/components/Progress/Progress.tsx +47 -0
  38. package/components/Progress/progress.scss +66 -0
  39. package/components/Progress/progress.ts +12 -0
  40. package/components/Radio/Radio.astro +57 -0
  41. package/components/Radio/Radio.svelte +56 -0
  42. package/components/Radio/Radio.tsx +68 -0
  43. package/components/Radio/radio.scss +92 -0
  44. package/components/Radio/radio.ts +17 -0
  45. package/components/Rating/Rating.astro +66 -0
  46. package/components/Rating/Rating.svelte +70 -0
  47. package/components/Rating/Rating.tsx +67 -0
  48. package/components/Rating/rating.scss +37 -0
  49. package/components/Rating/rating.ts +16 -0
  50. package/components/Spinner/Spinner.astro +42 -0
  51. package/components/Spinner/Spinner.svelte +38 -0
  52. package/components/Spinner/Spinner.tsx +44 -0
  53. package/components/Spinner/spinner.scss +41 -0
  54. package/components/Spinner/spinner.ts +7 -0
  55. package/components/Switch/Switch.astro +38 -0
  56. package/components/Switch/Switch.svelte +42 -0
  57. package/components/Switch/Switch.tsx +46 -0
  58. package/components/Switch/switch.scss +84 -0
  59. package/components/Switch/switch.ts +15 -0
  60. package/components/Tabs/Tabs.astro +76 -0
  61. package/components/Tabs/Tabs.svelte +54 -0
  62. package/components/Tabs/Tabs.tsx +69 -0
  63. package/components/Tabs/tabs.scss +134 -0
  64. package/components/Tabs/tabs.ts +16 -0
  65. package/components/Timeline/Timeline.astro +34 -0
  66. package/components/Timeline/Timeline.svelte +30 -0
  67. package/components/Timeline/Timeline.tsx +37 -0
  68. package/components/Timeline/timeline.scss +71 -0
  69. package/components/Timeline/timeline.ts +61 -0
  70. package/components/TimelineItem/TimelineItem.astro +26 -0
  71. package/components/TimelineItem/TimelineItem.svelte +22 -0
  72. package/components/TimelineItem/TimelineItem.tsx +32 -0
  73. package/components/TimelineItem/timelineitem.scss +31 -0
  74. package/components/TimelineItem/timelineitem.ts +5 -0
  75. package/components/Toast/Toast.astro +30 -0
  76. package/components/Toast/Toast.svelte +21 -0
  77. package/components/Toast/Toast.tsx +28 -0
  78. package/components/Toast/toast.scss +43 -0
  79. package/components/Toast/toast.ts +11 -0
  80. package/icons/check.svg +1 -2
  81. package/icons/circle-check.svg +4 -0
  82. package/index.js +1 -0
  83. package/package.json +5 -2
  84. package/react.d.ts +38 -17
  85. package/react.js +23 -1
  86. package/scss/global/tooltip.scss +133 -0
  87. package/scss/global/utility.scss +17 -0
  88. package/scss/global.scss +1 -0
  89. package/scss/resets.scss +4 -0
  90. package/scss/setup.scss +31 -1
  91. package/svelte.d.ts +31 -11
  92. package/svelte.js +23 -1
  93. package/utils/toast.ts +65 -0
@@ -0,0 +1,61 @@
1
+ export type TimelineProps = {
2
+ theme?: 'fill' | 'stroke' | 'stroke fill' | null
3
+ alternate?: boolean
4
+ centered?: boolean
5
+ color?: string
6
+ textColor?: string
7
+ className?: string
8
+ counter?: 'arabic-indic'
9
+ | 'armenian'
10
+ | 'bengali'
11
+ | 'cambodian'
12
+ | 'circle'
13
+ | 'cjk-decimal'
14
+ | 'cjk-earthly-branch'
15
+ | 'cjk-heavenly-stem'
16
+ | 'decimal-leading-zero'
17
+ | 'devanagari'
18
+ | 'disc'
19
+ | 'disclosure-closed'
20
+ | 'disclosure-open'
21
+ | 'ethiopic-numeric'
22
+ | 'georgian'
23
+ | 'gujarati'
24
+ | 'gurmukhi'
25
+ | 'hebrew'
26
+ | 'hiragana'
27
+ | 'hiragana-iroha'
28
+ | 'japanese-formal'
29
+ | 'kannada'
30
+ | 'katakana'
31
+ | 'katakana-iroha'
32
+ | 'khmer'
33
+ | 'korean-hangul-formal'
34
+ | 'korean-hanja-formal'
35
+ | 'lao'
36
+ | 'lower-alpha'
37
+ | 'lower-alpha'
38
+ | 'lower-armenian'
39
+ | 'lower-greek'
40
+ | 'lower-roman'
41
+ | 'malayalam'
42
+ | 'mongolian'
43
+ | 'myanmar'
44
+ | 'oriya'
45
+ | 'persian'
46
+ | 'simp-chinese-formal'
47
+ | 'square'
48
+ | 'tamil'
49
+ | 'telugu'
50
+ | 'thai'
51
+ | 'tibetan'
52
+ | 'trad-chinese-formal'
53
+ | 'upper-alpha'
54
+ | 'upper-armenian'
55
+ | 'upper-roman'
56
+ | null
57
+ }
58
+
59
+ export type ReactTimelineProps = {
60
+ children: React.ReactNode
61
+ } & TimelineProps
@@ -0,0 +1,26 @@
1
+ ---
2
+ import type { TimelineItemProps } from './timelineitem'
3
+ import './timelineitem.scss'
4
+
5
+ interface Props extends TimelineItemProps {}
6
+
7
+ const {
8
+ title,
9
+ titleTag = 'span',
10
+ className
11
+ } = Astro.props
12
+
13
+ const classes = [
14
+ 'w-timeline-item',
15
+ className
16
+ ]
17
+
18
+ const Title = titleTag
19
+ ---
20
+
21
+ <li class:list={classes}>
22
+ {title && (
23
+ <Title class:list="timeline-title">{title}</Title>
24
+ )}
25
+ <slot />
26
+ </li>
@@ -0,0 +1,22 @@
1
+ <script lang="ts">
2
+ import type { TimelineItemProps } from './timelineitem'
3
+ import './timelineitem.scss'
4
+
5
+ export let title: TimelineItemProps['title'] = ''
6
+ export let titleTag: TimelineItemProps['titleTag'] = 'span'
7
+ export let className: TimelineItemProps['className'] = ''
8
+
9
+ const classes = [
10
+ 'w-timeline-item',
11
+ className
12
+ ].filter(Boolean).join(' ')
13
+ </script>
14
+
15
+ <li class={classes}>
16
+ {#if title}
17
+ <svelte:element this={titleTag} class="timeline-title">
18
+ {title}
19
+ </svelte:element>
20
+ {/if}
21
+ <slot />
22
+ </li>
@@ -0,0 +1,32 @@
1
+ import React from 'react'
2
+ import type { TimelineItemProps } from './timelineitem'
3
+
4
+ import './timelineitem.scss'
5
+
6
+ type ReactTimelineItemProps = {
7
+ TitleTag?: keyof JSX.IntrinsicElements
8
+ children: React.ReactNode
9
+ } & Omit<TimelineItemProps, 'titleTag'>
10
+
11
+ const TimelineItem = ({
12
+ title,
13
+ TitleTag = 'span',
14
+ className,
15
+ children
16
+ }: ReactTimelineItemProps) => {
17
+ const classes = [
18
+ 'w-timeline-item',
19
+ className
20
+ ].filter(Boolean).join(' ')
21
+
22
+ return (
23
+ <li className={classes}>
24
+ {title && (
25
+ <TitleTag className="timeline-title">{title}</TitleTag>
26
+ )}
27
+ {children}
28
+ </li>
29
+ )
30
+ }
31
+
32
+ export default TimelineItem
@@ -0,0 +1,31 @@
1
+ @import '../../scss/config.scss';
2
+
3
+ .w-timeline-item {
4
+ position: relative;
5
+ font-size: 16px;
6
+
7
+ &::before {
8
+ content: counter(item, var(--w-timeline-counter));
9
+ counter-increment: item;
10
+ position: absolute;
11
+ top: -5px;
12
+ width: 25px;
13
+ height: 25px;
14
+ border-radius: 100%;
15
+ background: var(--w-timeline-color);
16
+ color: var(--w-timeline-text-color);
17
+ font-size: 14px;
18
+ display: inline-flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ border: 2px solid #000;
22
+ margin-left: -40px;
23
+ }
24
+
25
+ .timeline-title {
26
+ display: block;
27
+ margin-bottom: 10px;
28
+ font-family: Bold;
29
+ font-size: 18px;
30
+ }
31
+ }
@@ -0,0 +1,5 @@
1
+ export type TimelineItemProps = {
2
+ title?: string
3
+ titleTag?: string
4
+ className?: string
5
+ }
@@ -0,0 +1,30 @@
1
+ ---
2
+ import type { ToastProps } from './toast'
3
+ import Alert from '../Alert/Alert.astro'
4
+
5
+ import './toast.scss'
6
+
7
+ interface Props extends ToastProps {}
8
+
9
+ const {
10
+ position,
11
+ className
12
+ } = Astro.props
13
+
14
+ const classes = [
15
+ 'w-toast',
16
+ position,
17
+ className
18
+ ].filter(Boolean).join(' ')
19
+ ---
20
+
21
+ {Astro.slots.has('icon') ? (
22
+ <Alert {...Astro.props} className={classes}>
23
+ <slot slot="icon" name="icon" />
24
+ <slot />
25
+ </Alert>
26
+ ) : (
27
+ <Alert {...Astro.props} className={classes}>
28
+ <slot />
29
+ </Alert>
30
+ )}
@@ -0,0 +1,21 @@
1
+ <script lang="ts">
2
+ import type { ToastProps } from './toast'
3
+ import Alert from '../Alert/Alert.svelte'
4
+ import './toast.scss'
5
+
6
+ export let position: ToastProps['position'] = ''
7
+ export let className: ToastProps['className'] = ''
8
+
9
+ const classes = [
10
+ 'w-toast',
11
+ position,
12
+ className
13
+ ].filter(Boolean).join(' ')
14
+ </script>
15
+
16
+ <Alert {...$$restProps} className={classes}>
17
+ {#if $$slots.icon}
18
+ <slot name="icon" />
19
+ {/if}
20
+ <slot />
21
+ </Alert>
@@ -0,0 +1,28 @@
1
+ import React from 'react'
2
+ import type { ReactToastProps } from './toast'
3
+ import Alert from '../Alert/Alert.tsx'
4
+
5
+ import './toast.scss'
6
+
7
+ const Toast = ({
8
+ icon,
9
+ position,
10
+ className,
11
+ children,
12
+ ...rest
13
+ }: ReactToastProps) => {
14
+ const classes = [
15
+ 'w-toast',
16
+ position,
17
+ className
18
+ ].filter(Boolean).join(' ')
19
+
20
+ return (
21
+ <Alert {...rest} className={classes} icon={icon}>
22
+ {children}
23
+ </Alert>
24
+
25
+ )
26
+ }
27
+
28
+ export default Toast
@@ -0,0 +1,43 @@
1
+ @import '../../scss/config.scss';
2
+
3
+ .w-toast {
4
+ background: #000;
5
+ position: fixed;
6
+ right: 20px;
7
+ bottom: 20px;
8
+ transform: translateY(calc(100% + 25px));
9
+
10
+ &:not(.no-anim) {
11
+ @include Transition(transform);
12
+ }
13
+
14
+ &.show {
15
+ transform: translateY(0);
16
+ }
17
+
18
+ &.bottom-left,
19
+ &.top-left {
20
+ right: auto;
21
+ left: 20px;
22
+ }
23
+
24
+ &.top-left,
25
+ &.top-right,
26
+ &.top-full {
27
+ bottom: auto;
28
+ top: 20px;
29
+ transform: translateY(calc(-100% - 25px));
30
+
31
+ &.show {
32
+ transform: translateY(0);
33
+ }
34
+ }
35
+
36
+ &.bottom-full {
37
+ left: 20px;
38
+ }
39
+
40
+ &.top-full {
41
+ left: 20px;
42
+ }
43
+ }
@@ -0,0 +1,11 @@
1
+ import type { AlertProps } from '../Alert/alert'
2
+
3
+ export type ToastProps = {
4
+ position?: string
5
+ [key: string]: any
6
+ } & AlertProps
7
+
8
+ export type ReactToastProps = {
9
+ children: React.ReactNode
10
+ icon?: string
11
+ } & ToastProps
package/icons/check.svg CHANGED
@@ -1,4 +1,3 @@
1
1
  <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M16.6425 7.92858C17.0558 8.22704 17.1489 8.80404 16.8505 9.21734L12.4237 15.3474C12.4236 15.3475 12.4238 15.3473 12.4237 15.3474C12.2341 15.6102 11.9873 15.8271 11.7024 15.9814C11.4174 16.1357 11.1011 16.2237 10.7773 16.2389C10.4535 16.254 10.1304 16.1958 9.83224 16.0687C9.53413 15.9416 9.26855 15.7489 9.05527 15.5049C9.0552 15.5048 9.05534 15.505 9.05527 15.5049L7.20296 13.3867C6.86736 13.003 6.90641 12.4198 7.29017 12.0842C7.67393 11.7486 8.25709 11.7877 8.59268 12.1714L10.445 14.2896C10.4755 14.3245 10.5136 14.3522 10.5562 14.3704C10.5988 14.3886 10.645 14.3969 10.6912 14.3947C10.7375 14.3925 10.7827 14.38 10.8234 14.3579C10.8641 14.3359 10.8993 14.3049 10.9264 14.2674L15.3538 8.13651C15.6522 7.72321 16.2292 7.63012 16.6425 7.92858Z" fill="currentColor"/>
3
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12 1.84615C6.39219 1.84615 1.84615 6.39219 1.84615 12C1.84615 17.6078 6.39219 22.1538 12 22.1538C17.6078 22.1538 22.1538 17.6078 22.1538 12C22.1538 6.39219 17.6078 1.84615 12 1.84615ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z" fill="currentColor"/>
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M23.086 2.4174C24.073 3.13011 24.2953 4.50795 23.5827 5.49488L13.0118 20.1331C13.012 20.1328 13.0116 20.1333 13.0118 20.1331C12.559 20.7606 11.9697 21.2786 11.2894 21.647C10.6088 22.0155 9.85351 22.2256 9.0803 22.2619C8.30708 22.298 7.53554 22.159 6.82355 21.8555C6.11169 21.552 5.4775 21.0918 4.9682 20.5092C4.96837 20.5094 4.96803 20.5089 4.9682 20.5092L0.544999 15.451C-0.256393 14.5348 -0.163144 13.1422 0.753251 12.3408C1.66965 11.5394 3.06219 11.6327 3.86356 12.549L8.28678 17.6071C8.35962 17.6905 8.4506 17.7566 8.55232 17.8001C8.65405 17.8435 8.76437 17.8633 8.8747 17.8581C8.98526 17.8528 9.09319 17.823 9.19038 17.7702C9.28757 17.7177 9.37163 17.6437 9.43634 17.5541L20.0087 2.91393C20.7212 1.92699 22.0991 1.7047 23.086 2.4174Z" fill="currentColor"/>
4
3
  </svg>
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M16.6425 7.92858C17.0558 8.22704 17.1489 8.80404 16.8505 9.21734L12.4237 15.3474C12.4236 15.3475 12.4238 15.3473 12.4237 15.3474C12.2341 15.6102 11.9873 15.8271 11.7024 15.9814C11.4174 16.1357 11.1011 16.2237 10.7773 16.2389C10.4535 16.254 10.1304 16.1958 9.83224 16.0687C9.53413 15.9416 9.26855 15.7489 9.05527 15.5049C9.0552 15.5048 9.05534 15.505 9.05527 15.5049L7.20296 13.3867C6.86736 13.003 6.90641 12.4198 7.29017 12.0842C7.67393 11.7486 8.25709 11.7877 8.59268 12.1714L10.445 14.2896C10.4755 14.3245 10.5136 14.3522 10.5562 14.3704C10.5988 14.3886 10.645 14.3969 10.6912 14.3947C10.7375 14.3925 10.7827 14.38 10.8234 14.3579C10.8641 14.3359 10.8993 14.3049 10.9264 14.2674L15.3538 8.13651C15.6522 7.72321 16.2292 7.63012 16.6425 7.92858Z" fill="currentColor"/>
3
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 1.84615C6.39219 1.84615 1.84615 6.39219 1.84615 12C1.84615 17.6078 6.39219 22.1538 12 22.1538C17.6078 22.1538 22.1538 17.6078 22.1538 12C22.1538 6.39219 17.6078 1.84615 12 1.84615ZM0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z" fill="currentColor"/>
4
+ </svg>
package/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from './utils/toast.ts'
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "webcoreui",
3
3
  "type": "module",
4
- "version": "0.0.8",
4
+ "version": "0.0.10",
5
5
  "scripts": {
6
6
  "dev": "astro dev",
7
7
  "build": "astro check && astro build",
8
8
  "build:package": "node scripts/build.js",
9
- "test": "echo \"Error: no test specified\""
9
+ "test": "echo \"Error: no test specified\"",
10
+ "create-component": "node scripts/createComponent.js"
10
11
  },
11
12
  "dependencies": {
12
13
  "@astrojs/check": "0.7.0",
@@ -30,12 +31,14 @@
30
31
  "components",
31
32
  "icons",
32
33
  "scss",
34
+ "utils",
33
35
  "astro.d.ts",
34
36
  "astro.js",
35
37
  "svelte.d.ts",
36
38
  "svelte.js",
37
39
  "react.d.ts",
38
40
  "react.js",
41
+ "index.js",
39
42
  "README.md",
40
43
  "LICENSE"
41
44
  ],
package/react.d.ts CHANGED
@@ -1,19 +1,40 @@
1
+ import { FC } from 'react'
2
+ import type { AccordionProps } from './components/Accordion/accordion'
3
+ import type { ReactAlertProps } from './components/Alert/alert'
4
+ import type { AvatarProps } from './components/Avatar/avatar'
5
+ import type { ReactBadgeProps } from './components/Badge/badge'
6
+ import type { ReactButtonProps } from './components/Button/button'
7
+ import type { ReactCardProps } from './components/Card/card'
8
+ import type { ReactCheckboxProps } from './components/Checkbox/checkbox'
9
+ import type { ReactConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
10
+ import type { IconProps } from './components/Icon/icon'
11
+ import type { ProgressProps } from './components/Progress/progress'
12
+ import type { ReactRadioProps } from './components/Radio/radio'
13
+ import type { RatingProps } from './components/Rating/rating'
14
+ import type { SpinnerProps } from './components/Spinner/spinner'
15
+ import type { ReactSwitchProps } from './components/Switch/switch'
16
+ import type { ReactTabsProps } from './components/Tabs/tabs'
17
+ import type { ReactTimelineProps } from './components/Timeline/timeline'
18
+ import type { TimelineItemProps } from './components/TimelineItem/timelineitem'
19
+ import type { ReactToastProps } from './components/Toast/toast'
1
20
 
2
21
  declare module 'webcoreui/react' {
3
- import type { AccordionProps } from './components/Accordion/accordion'
4
- import type { AlertProps } from './components/Alert/alert'
5
- import type { BadgeProps } from './components/Badge/badge'
6
- import type { ButtonProps } from './components/Button/button'
7
- import type { CardProps } from './components/Card/card'
8
- import type { ConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
9
- import type { IconProps } from './components/Icon/icon'
10
-
11
- export function Accordion(_props: AccordionProps): any
12
- export function Alert(_props: AlertProps): any
13
- export function Badge(_props: BadgeProps): any
14
- export function Button(_props: ButtonProps): any
15
- export function Card(_props: CardProps): any
16
- export function ConditionalWrapper(_props: ConditionalWrapperProps): any
17
- export function Icon(_props: IconProps): any
18
- }
19
-
22
+ export const Accordion: FC<AccordionProps>
23
+ export const Alert: FC<ReactAlertProps>
24
+ export const Avatar: FC<AvatarProps>
25
+ export const Badge: FC<ReactBadgeProps>
26
+ export const Button: FC<ReactButtonProps>
27
+ export const Card: FC<ReactCardProps>
28
+ export const Checkbox: FC<ReactCheckboxProps>
29
+ export const ConditionalWrapper: FC<ReactConditionalWrapperProps>
30
+ export const Icon: FC<IconProps>
31
+ export const Progress: FC<ProgressProps>
32
+ export const Radio: FC<ReactRadioProps>
33
+ export const Rating: FC<RatingProps>
34
+ export const Spinner: FC<SpinnerProps>
35
+ export const Switch: FC<ReactSwitchProps>
36
+ export const Tabs: FC<ReactTabsProps>
37
+ export const Timeline: FC<ReactTimelineProps>
38
+ export const TimelineItem: FC<TimelineItemProps>
39
+ export const Toast: FC<ReactToastProps>
40
+ }
package/react.js CHANGED
@@ -1,15 +1,37 @@
1
1
  import AccordionComponent from './components/Accordion/Accordion.tsx'
2
2
  import AlertComponent from './components/Alert/Alert.tsx'
3
+ import AvatarComponent from './components/Avatar/Avatar.tsx'
3
4
  import BadgeComponent from './components/Badge/Badge.tsx'
4
5
  import ButtonComponent from './components/Button/Button.tsx'
5
6
  import CardComponent from './components/Card/Card.tsx'
7
+ import CheckboxComponent from './components/Checkbox/Checkbox.tsx'
6
8
  import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.tsx'
7
9
  import IconComponent from './components/Icon/Icon.tsx'
10
+ import ProgressComponent from './components/Progress/Progress.tsx'
11
+ import RadioComponent from './components/Radio/Radio.tsx'
12
+ import RatingComponent from './components/Rating/Rating.tsx'
13
+ import SpinnerComponent from './components/Spinner/Spinner.tsx'
14
+ import SwitchComponent from './components/Switch/Switch.tsx'
15
+ import TabsComponent from './components/Tabs/Tabs.tsx'
16
+ import TimelineComponent from './components/Timeline/Timeline.tsx'
17
+ import TimelineItemComponent from './components/TimelineItem/TimelineItem.tsx'
18
+ import ToastComponent from './components/Toast/Toast.tsx'
8
19
 
9
20
  export const Accordion = AccordionComponent
10
21
  export const Alert = AlertComponent
22
+ export const Avatar = AvatarComponent
11
23
  export const Badge = BadgeComponent
12
24
  export const Button = ButtonComponent
13
25
  export const Card = CardComponent
26
+ export const Checkbox = CheckboxComponent
14
27
  export const ConditionalWrapper = ConditionalWrapperComponent
15
- export const Icon = IconComponent
28
+ export const Icon = IconComponent
29
+ export const Progress = ProgressComponent
30
+ export const Radio = RadioComponent
31
+ export const Rating = RatingComponent
32
+ export const Spinner = SpinnerComponent
33
+ export const Switch = SwitchComponent
34
+ export const Tabs = TabsComponent
35
+ export const Timeline = TimelineComponent
36
+ export const TimelineItem = TimelineItemComponent
37
+ export const Toast = ToastComponent
@@ -0,0 +1,133 @@
1
+ @import '../config';
2
+
3
+ @mixin Tooltip() {
4
+ [data-tooltip] {
5
+ display: inline-block;
6
+ position: relative;
7
+
8
+ &::before,
9
+ &::after {
10
+ @include Transition();
11
+ opacity: 0;
12
+ left: 50%;
13
+ transform: translate(-50%, 5px);
14
+ }
15
+
16
+ &::before {
17
+ content: attr(data-tooltip);
18
+ border-radius: 5px;
19
+ font-size: 14px;
20
+ position: absolute;
21
+ background: var(--w-tooltip-background);
22
+ color: var(--w-tooltip-color);
23
+ padding: 0 5px;
24
+ top: -30px;
25
+ width: max-content;
26
+ line-height: 1.8;
27
+ max-width: 300px;
28
+ }
29
+
30
+ &::after {
31
+ content: '';
32
+ position: absolute;
33
+ width: 0;
34
+ height: 0;
35
+ border-left: 5px solid transparent;
36
+ border-right: 5px solid transparent;
37
+ border-top: 5px solid var(--w-tooltip-background);
38
+ top: -5px;
39
+ }
40
+
41
+ &:hover::before,
42
+ &:hover::after {
43
+ opacity: 1;
44
+ transform: translate(-50%, 0);
45
+ }
46
+
47
+ &[data-position="bottom"] {
48
+ &::before,
49
+ &::after {
50
+ transform: translate(-50%, -5px);
51
+ }
52
+
53
+ &::before {
54
+ top: auto;
55
+ bottom: -30px;
56
+ }
57
+
58
+ &::after {
59
+ border-left: 5px solid transparent;
60
+ border-right: 5px solid transparent;
61
+ border-top: 5px solid transparent;
62
+ border-bottom: 5px solid var(--w-tooltip-background);
63
+ top: auto;
64
+ bottom: -5px;
65
+ }
66
+
67
+ &:hover::before,
68
+ &:hover::after {
69
+ transform: translate(-50%, 0);
70
+ }
71
+ }
72
+
73
+ &[data-position="left"] {
74
+ &::before,
75
+ &::after {
76
+ transform: translate(0, 0);
77
+ left: auto;
78
+ right: 105%;
79
+ }
80
+
81
+ &::before {
82
+ top: auto;
83
+ }
84
+
85
+ &::after {
86
+ border-left: 5px solid var(--w-tooltip-background);
87
+ border-right: 5px solid transparent;
88
+ border-top: 5px solid transparent;
89
+ border-bottom: 5px solid transparent;
90
+ top: 50%;
91
+ transform: translate(10px, -40%);
92
+ }
93
+
94
+ &:hover::before {
95
+ transform: translate(-5px, 0);
96
+ }
97
+
98
+ &:hover::after {
99
+ transform: translate(5px, -40%);
100
+ }
101
+ }
102
+
103
+ &[data-position="right"] {
104
+ &::before,
105
+ &::after {
106
+ transform: translate(0, 0);
107
+ left: 105%;
108
+ }
109
+
110
+ &::before {
111
+ top: auto;
112
+ }
113
+
114
+ &::after {
115
+ border-left: 5px solid transparent;
116
+ border-right: 5px solid var(--w-tooltip-background);
117
+ border-top: 5px solid transparent;
118
+ border-bottom: 5px solid transparent;
119
+ top: 50%;
120
+ transform: translate(-10px, -40%);
121
+ }
122
+
123
+ &:hover::before {
124
+ transform: translate(5px, 0);
125
+ }
126
+
127
+ &:hover::after {
128
+ transform: translate(-5px, -40%);
129
+ }
130
+ }
131
+ }
132
+ }
133
+
@@ -12,6 +12,23 @@
12
12
  gap: 20px;
13
13
  }
14
14
 
15
+ .flex {
16
+ display: flex;
17
+ gap: 20px;
18
+
19
+ &.xs {
20
+ gap: 5px;
21
+ }
22
+
23
+ &.wrap {
24
+ flex-wrap: wrap;
25
+ }
26
+ }
27
+
28
+ .my {
29
+ margin: 20px auto;
30
+ }
31
+
15
32
  @include Media('md') {
16
33
  .grid.md-2 {
17
34
  grid-template-columns: repeat(2, minmax(0, 1fr));
package/scss/global.scss CHANGED
@@ -1,2 +1,3 @@
1
1
  @import './global/elements.scss';
2
+ @import './global/tooltip.scss';
2
3
  @import './global/utility.scss';
package/scss/resets.scss CHANGED
@@ -41,4 +41,8 @@
41
41
  color: #FFF;
42
42
  text-decoration: none;
43
43
  }
44
+
45
+ button {
46
+ font-family: Regular;
47
+ }
44
48
  }