webcoreui 0.0.9 → 0.0.11
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 +10 -10
- package/astro.d.ts +30 -16
- package/astro.js +17 -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/Input/Input.astro +52 -0
- package/components/Input/Input.svelte +52 -0
- package/components/Input/Input.tsx +59 -0
- package/components/Input/input.scss +83 -0
- package/components/Input/input.ts +44 -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/Table/Table.astro +60 -0
- package/components/Table/Table.svelte +54 -0
- package/components/Table/Table.tsx +63 -0
- package/components/Table/table.scss +65 -0
- package/components/Table/table.ts +10 -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 +42 -27
- package/react.js +17 -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 +30 -16
- package/svelte.js +17 -1
- package/utils/toast.ts +65 -0
|
@@ -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.11",
|
|
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,44 @@
|
|
|
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 { ReactInputProps } from './components/Input/input'
|
|
12
|
+
import type { ProgressProps } from './components/Progress/progress'
|
|
13
|
+
import type { ReactRadioProps } from './components/Radio/radio'
|
|
14
|
+
import type { RatingProps } from './components/Rating/rating'
|
|
15
|
+
import type { SpinnerProps } from './components/Spinner/spinner'
|
|
16
|
+
import type { ReactSwitchProps } from './components/Switch/switch'
|
|
17
|
+
import type { TableProps } from './components/Table/table'
|
|
18
|
+
import type { ReactTabsProps } from './components/Tabs/tabs'
|
|
19
|
+
import type { ReactTimelineProps } from './components/Timeline/timeline'
|
|
20
|
+
import type { TimelineItemProps } from './components/TimelineItem/timelineitem'
|
|
21
|
+
import type { ReactToastProps } from './components/Toast/toast'
|
|
1
22
|
|
|
2
23
|
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
|
-
export
|
|
22
|
-
export
|
|
23
|
-
|
|
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
|
-
|
|
24
|
+
export const Accordion: FC<AccordionProps>
|
|
25
|
+
export const Alert: FC<ReactAlertProps>
|
|
26
|
+
export const Avatar: FC<AvatarProps>
|
|
27
|
+
export const Badge: FC<ReactBadgeProps>
|
|
28
|
+
export const Button: FC<ReactButtonProps>
|
|
29
|
+
export const Card: FC<ReactCardProps>
|
|
30
|
+
export const Checkbox: FC<ReactCheckboxProps>
|
|
31
|
+
export const ConditionalWrapper: FC<ReactConditionalWrapperProps>
|
|
32
|
+
export const Icon: FC<IconProps>
|
|
33
|
+
export const Input: FC<ReactInputProps>
|
|
34
|
+
export const Progress: FC<ProgressProps>
|
|
35
|
+
export const Radio: FC<ReactRadioProps>
|
|
36
|
+
export const Rating: FC<RatingProps>
|
|
37
|
+
export const Spinner: FC<SpinnerProps>
|
|
38
|
+
export const Switch: FC<ReactSwitchProps>
|
|
39
|
+
export const Table: FC<TableProps>
|
|
40
|
+
export const Tabs: FC<ReactTabsProps>
|
|
41
|
+
export const Timeline: FC<ReactTimelineProps>
|
|
42
|
+
export const TimelineItem: FC<TimelineItemProps>
|
|
43
|
+
export const Toast: FC<ReactToastProps>
|
|
44
|
+
}
|
package/react.js
CHANGED
|
@@ -7,9 +7,17 @@ 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 InputComponent from './components/Input/Input.tsx'
|
|
11
|
+
import ProgressComponent from './components/Progress/Progress.tsx'
|
|
10
12
|
import RadioComponent from './components/Radio/Radio.tsx'
|
|
11
13
|
import RatingComponent from './components/Rating/Rating.tsx'
|
|
14
|
+
import SpinnerComponent from './components/Spinner/Spinner.tsx'
|
|
12
15
|
import SwitchComponent from './components/Switch/Switch.tsx'
|
|
16
|
+
import TableComponent from './components/Table/Table.tsx'
|
|
17
|
+
import TabsComponent from './components/Tabs/Tabs.tsx'
|
|
18
|
+
import TimelineComponent from './components/Timeline/Timeline.tsx'
|
|
19
|
+
import TimelineItemComponent from './components/TimelineItem/TimelineItem.tsx'
|
|
20
|
+
import ToastComponent from './components/Toast/Toast.tsx'
|
|
13
21
|
|
|
14
22
|
export const Accordion = AccordionComponent
|
|
15
23
|
export const Alert = AlertComponent
|
|
@@ -20,6 +28,14 @@ export const Card = CardComponent
|
|
|
20
28
|
export const Checkbox = CheckboxComponent
|
|
21
29
|
export const ConditionalWrapper = ConditionalWrapperComponent
|
|
22
30
|
export const Icon = IconComponent
|
|
31
|
+
export const Input = InputComponent
|
|
32
|
+
export const Progress = ProgressComponent
|
|
23
33
|
export const Radio = RadioComponent
|
|
24
34
|
export const Rating = RatingComponent
|
|
25
|
-
export const
|
|
35
|
+
export const Spinner = SpinnerComponent
|
|
36
|
+
export const Switch = SwitchComponent
|
|
37
|
+
export const Table = TableComponent
|
|
38
|
+
export const Tabs = TabsComponent
|
|
39
|
+
export const Timeline = TimelineComponent
|
|
40
|
+
export const TimelineItem = TimelineItemComponent
|
|
41
|
+
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
|
}
|
package/svelte.d.ts
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import type { AccordionProps } from './components/Accordion/accordion'
|
|
2
|
+
import type { AlertProps } from './components/Alert/alert'
|
|
3
|
+
import type { AvatarProps } from './components/Avatar/avatar'
|
|
4
|
+
import type { BadgeProps } from './components/Badge/badge'
|
|
5
|
+
import type { ButtonProps } from './components/Button/button'
|
|
6
|
+
import type { CardProps } from './components/Card/card'
|
|
7
|
+
import type { CheckboxProps } from './components/Checkbox/checkbox'
|
|
8
|
+
import type { ConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
|
|
9
|
+
import type { IconProps } from './components/Icon/icon'
|
|
10
|
+
import type { InputProps } from './components/Input/input'
|
|
11
|
+
import type { ProgressProps } from './components/Progress/progress'
|
|
12
|
+
import type { RadioProps } from './components/Radio/radio'
|
|
13
|
+
import type { RatingProps } from './components/Rating/rating'
|
|
14
|
+
import type { SpinnerProps } from './components/Spinner/spinner'
|
|
15
|
+
import type { SwitchProps } from './components/Switch/switch'
|
|
16
|
+
import type { TableProps } from './components/Table/table'
|
|
17
|
+
import type { TabsProps } from './components/Tabs/tabs'
|
|
18
|
+
import type { TimelineProps } from './components/Timeline/timeline'
|
|
19
|
+
import type { TimelineItemProps } from './components/TimelineItem/timelineitem'
|
|
20
|
+
import type { ToastProps } from './components/Toast/toast'
|
|
21
|
+
|
|
2
22
|
declare module 'webcoreui/svelte' {
|
|
3
|
-
import type { AccordionProps } from './components/Accordion/accordion'
|
|
4
|
-
import type { AlertProps } from './components/Alert/alert'
|
|
5
|
-
import type { AvatarProps } from './components/Avatar/avatar'
|
|
6
|
-
import type { BadgeProps } from './components/Badge/badge'
|
|
7
|
-
import type { ButtonProps } from './components/Button/button'
|
|
8
|
-
import type { CardProps } from './components/Card/card'
|
|
9
|
-
import type { CheckboxProps } from './components/Checkbox/checkbox'
|
|
10
|
-
import type { ConditionalWrapperProps } from './components/ConditionalWrapper/conditionalwrapper'
|
|
11
|
-
import type { IconProps } from './components/Icon/icon'
|
|
12
|
-
import type { RadioProps } from './components/Radio/radio'
|
|
13
|
-
import type { RatingProps } from './components/Rating/rating'
|
|
14
|
-
import type { SwitchProps } from './components/Switch/switch'
|
|
15
|
-
|
|
16
23
|
export function Accordion(_props: AccordionProps): any
|
|
17
24
|
export function Alert(_props: AlertProps): any
|
|
18
25
|
export function Avatar(_props: AvatarProps): any
|
|
@@ -22,8 +29,15 @@ declare module 'webcoreui/svelte' {
|
|
|
22
29
|
export function Checkbox(_props: CheckboxProps): any
|
|
23
30
|
export function ConditionalWrapper(_props: ConditionalWrapperProps): any
|
|
24
31
|
export function Icon(_props: IconProps): any
|
|
32
|
+
export function Input(_props: InputProps): any
|
|
33
|
+
export function Progress(_props: ProgressProps): any
|
|
25
34
|
export function Radio(_props: RadioProps): any
|
|
26
35
|
export function Rating(_props: RatingProps): any
|
|
36
|
+
export function Spinner(_props: SpinnerProps): any
|
|
27
37
|
export function Switch(_props: SwitchProps): any
|
|
28
|
-
|
|
29
|
-
|
|
38
|
+
export function Table(_props: TableProps): any
|
|
39
|
+
export function Tabs(_props: TabsProps): any
|
|
40
|
+
export function Timeline(_props: TimelineProps): any
|
|
41
|
+
export function TimelineItem(_props: TimelineItemProps): any
|
|
42
|
+
export function Toast(_props: ToastProps): any
|
|
43
|
+
}
|
package/svelte.js
CHANGED
|
@@ -7,9 +7,17 @@ import CardComponent from './components/Card/Card.svelte'
|
|
|
7
7
|
import CheckboxComponent from './components/Checkbox/Checkbox.svelte'
|
|
8
8
|
import ConditionalWrapperComponent from './components/ConditionalWrapper/ConditionalWrapper.svelte'
|
|
9
9
|
import IconComponent from './components/Icon/Icon.svelte'
|
|
10
|
+
import InputComponent from './components/Input/Input.svelte'
|
|
11
|
+
import ProgressComponent from './components/Progress/Progress.svelte'
|
|
10
12
|
import RadioComponent from './components/Radio/Radio.svelte'
|
|
11
13
|
import RatingComponent from './components/Rating/Rating.svelte'
|
|
14
|
+
import SpinnerComponent from './components/Spinner/Spinner.svelte'
|
|
12
15
|
import SwitchComponent from './components/Switch/Switch.svelte'
|
|
16
|
+
import TableComponent from './components/Table/Table.svelte'
|
|
17
|
+
import TabsComponent from './components/Tabs/Tabs.svelte'
|
|
18
|
+
import TimelineComponent from './components/Timeline/Timeline.svelte'
|
|
19
|
+
import TimelineItemComponent from './components/TimelineItem/TimelineItem.svelte'
|
|
20
|
+
import ToastComponent from './components/Toast/Toast.svelte'
|
|
13
21
|
|
|
14
22
|
export const Accordion = AccordionComponent
|
|
15
23
|
export const Alert = AlertComponent
|
|
@@ -20,6 +28,14 @@ export const Card = CardComponent
|
|
|
20
28
|
export const Checkbox = CheckboxComponent
|
|
21
29
|
export const ConditionalWrapper = ConditionalWrapperComponent
|
|
22
30
|
export const Icon = IconComponent
|
|
31
|
+
export const Input = InputComponent
|
|
32
|
+
export const Progress = ProgressComponent
|
|
23
33
|
export const Radio = RadioComponent
|
|
24
34
|
export const Rating = RatingComponent
|
|
25
|
-
export const
|
|
35
|
+
export const Spinner = SpinnerComponent
|
|
36
|
+
export const Switch = SwitchComponent
|
|
37
|
+
export const Table = TableComponent
|
|
38
|
+
export const Tabs = TabsComponent
|
|
39
|
+
export const Timeline = TimelineComponent
|
|
40
|
+
export const TimelineItem = TimelineItemComponent
|
|
41
|
+
export const Toast = ToastComponent
|