webcoreui 0.0.9 → 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.
- package/README.md +8 -10
- package/astro.d.ts +26 -16
- package/astro.js +13 -1
- package/components/Alert/Alert.tsx +1 -8
- package/components/Alert/alert.scss +1 -0
- package/components/Alert/alert.ts +6 -0
- package/components/Avatar/Avatar.tsx +1 -0
- package/components/Badge/Badge.astro +3 -2
- package/components/Badge/Badge.svelte +1 -1
- package/components/Badge/Badge.tsx +3 -7
- package/components/Badge/badge.ts +4 -0
- package/components/Button/Button.tsx +1 -5
- package/components/Button/button.scss +0 -1
- package/components/Button/button.ts +5 -1
- package/components/Card/Card.tsx +1 -7
- package/components/Card/card.scss +1 -0
- package/components/Card/card.ts +6 -0
- package/components/Checkbox/Checkbox.tsx +2 -6
- package/components/Checkbox/checkbox.ts +4 -0
- package/components/ConditionalWrapper/ConditionalWrapper.tsx +2 -8
- package/components/ConditionalWrapper/conditionalwrapper.ts +5 -0
- package/components/Progress/Progress.astro +40 -0
- package/components/Progress/Progress.svelte +38 -0
- package/components/Progress/Progress.tsx +47 -0
- package/components/Progress/progress.scss +66 -0
- package/components/Progress/progress.ts +12 -0
- package/components/Radio/Radio.tsx +2 -6
- package/components/Radio/radio.ts +4 -0
- package/components/Spinner/Spinner.astro +42 -0
- package/components/Spinner/Spinner.svelte +38 -0
- package/components/Spinner/Spinner.tsx +44 -0
- package/components/Spinner/spinner.scss +41 -0
- package/components/Spinner/spinner.ts +7 -0
- package/components/Switch/Switch.tsx +2 -6
- package/components/Switch/switch.ts +4 -0
- package/components/Tabs/Tabs.astro +76 -0
- package/components/Tabs/Tabs.svelte +54 -0
- package/components/Tabs/Tabs.tsx +69 -0
- package/components/Tabs/tabs.scss +134 -0
- package/components/Tabs/tabs.ts +16 -0
- package/components/Timeline/Timeline.astro +34 -0
- package/components/Timeline/Timeline.svelte +30 -0
- package/components/Timeline/Timeline.tsx +37 -0
- package/components/Timeline/timeline.scss +71 -0
- package/components/Timeline/timeline.ts +61 -0
- package/components/TimelineItem/TimelineItem.astro +26 -0
- package/components/TimelineItem/TimelineItem.svelte +22 -0
- package/components/TimelineItem/TimelineItem.tsx +32 -0
- package/components/TimelineItem/timelineitem.scss +31 -0
- package/components/TimelineItem/timelineitem.ts +5 -0
- package/components/Toast/Toast.astro +30 -0
- package/components/Toast/Toast.svelte +21 -0
- package/components/Toast/Toast.tsx +28 -0
- package/components/Toast/toast.scss +43 -0
- package/components/Toast/toast.ts +11 -0
- package/index.js +1 -0
- package/package.json +3 -1
- package/react.d.ts +38 -27
- package/react.js +13 -1
- package/scss/global/tooltip.scss +133 -0
- package/scss/global/utility.scss +17 -0
- package/scss/global.scss +1 -0
- package/scss/resets.scss +4 -0
- package/scss/setup.scss +20 -1
- package/svelte.d.ts +26 -16
- package/svelte.js +13 -1
- 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,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
|
+
}
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './utils/toast.ts'
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "webcoreui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.10",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "astro dev",
|
|
7
7
|
"build": "astro check && astro build",
|
|
@@ -31,12 +31,14 @@
|
|
|
31
31
|
"components",
|
|
32
32
|
"icons",
|
|
33
33
|
"scss",
|
|
34
|
+
"utils",
|
|
34
35
|
"astro.d.ts",
|
|
35
36
|
"astro.js",
|
|
36
37
|
"svelte.d.ts",
|
|
37
38
|
"svelte.js",
|
|
38
39
|
"react.d.ts",
|
|
39
40
|
"react.js",
|
|
41
|
+
"index.js",
|
|
40
42
|
"README.md",
|
|
41
43
|
"LICENSE"
|
|
42
44
|
],
|
package/react.d.ts
CHANGED
|
@@ -1,29 +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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
export
|
|
18
|
-
export
|
|
19
|
-
export
|
|
20
|
-
export
|
|
21
|
-
|
|
22
|
-
export function Checkbox(_props: CheckboxProps): any
|
|
23
|
-
export function ConditionalWrapper(_props: ConditionalWrapperProps): any
|
|
24
|
-
export function Icon(_props: IconProps): any
|
|
25
|
-
export function Radio(_props: RadioProps): any
|
|
26
|
-
export function Rating(_props: RatingProps): any
|
|
27
|
-
export function Switch(_props: SwitchProps): any
|
|
28
|
-
}
|
|
29
|
-
|
|
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
|
@@ -7,9 +7,15 @@ import CardComponent from './components/Card/Card.tsx'
|
|
|
7
7
|
import CheckboxComponent from './components/Checkbox/Checkbox.tsx'
|
|
8
8
|
import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.tsx'
|
|
9
9
|
import IconComponent from './components/Icon/Icon.tsx'
|
|
10
|
+
import ProgressComponent from './components/Progress/Progress.tsx'
|
|
10
11
|
import RadioComponent from './components/Radio/Radio.tsx'
|
|
11
12
|
import RatingComponent from './components/Rating/Rating.tsx'
|
|
13
|
+
import SpinnerComponent from './components/Spinner/Spinner.tsx'
|
|
12
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'
|
|
13
19
|
|
|
14
20
|
export const Accordion = AccordionComponent
|
|
15
21
|
export const Alert = AlertComponent
|
|
@@ -20,6 +26,12 @@ export const Card = CardComponent
|
|
|
20
26
|
export const Checkbox = CheckboxComponent
|
|
21
27
|
export const ConditionalWrapper = ConditionalWrapperComponent
|
|
22
28
|
export const Icon = IconComponent
|
|
29
|
+
export const Progress = ProgressComponent
|
|
23
30
|
export const Radio = RadioComponent
|
|
24
31
|
export const Rating = RatingComponent
|
|
25
|
-
export const
|
|
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
|
+
|
package/scss/global/utility.scss
CHANGED
|
@@ -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
package/scss/resets.scss
CHANGED
package/scss/setup.scss
CHANGED
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
$config: (
|
|
4
4
|
includeResets: true,
|
|
5
5
|
includeHelperClasses: true,
|
|
6
|
-
includeElementStyles: true
|
|
6
|
+
includeElementStyles: true,
|
|
7
|
+
includeTooltip: true
|
|
7
8
|
);
|
|
8
9
|
|
|
9
10
|
:root {
|
|
@@ -15,6 +16,20 @@ $config: (
|
|
|
15
16
|
--w-switch-on-color: #FFF;
|
|
16
17
|
--w-checkbox-color: #FFF;
|
|
17
18
|
--w-radio-color: #FFF;
|
|
19
|
+
--w-spinner-color: #FFF;
|
|
20
|
+
--w-spinner-width: 2px;
|
|
21
|
+
--w-spinner-speed: 2s;
|
|
22
|
+
--w-spinner-size: 30px;
|
|
23
|
+
--w-spinner-dash: 8;
|
|
24
|
+
--w-tooltip-background: #FFF;
|
|
25
|
+
--w-tooltip-color: #000;
|
|
26
|
+
--w-timeline-color: #252525;
|
|
27
|
+
--w-timeline-text-color: #FFF;
|
|
28
|
+
--w-timeline-counter: decimal;
|
|
29
|
+
--w-progress-color: #FFF;
|
|
30
|
+
--w-progress-background: #252525;
|
|
31
|
+
--w-progress-stripe-light: #FFF;
|
|
32
|
+
--w-progress-stripe-dark: #DDD;
|
|
18
33
|
}
|
|
19
34
|
|
|
20
35
|
@function config($key) {
|
|
@@ -35,4 +50,8 @@ $config: (
|
|
|
35
50
|
@if (config('includeElementStyles')) {
|
|
36
51
|
@include Elements();
|
|
37
52
|
}
|
|
53
|
+
|
|
54
|
+
@if (config('includeTooltip')) {
|
|
55
|
+
@include Tooltip();
|
|
56
|
+
}
|
|
38
57
|
}
|