webcoreui 0.0.12 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +39 -6
  2. package/astro.d.ts +4 -0
  3. package/astro.js +4 -0
  4. package/components/Accordion/accordion.module.scss +20 -27
  5. package/components/Alert/alert.module.scss +19 -22
  6. package/components/Avatar/avatar.module.scss +9 -6
  7. package/components/Badge/badge.module.scss +31 -34
  8. package/components/Button/Button.astro +0 -2
  9. package/components/Button/Button.svelte +0 -2
  10. package/components/Button/Button.tsx +0 -2
  11. package/components/Button/button.module.scss +32 -39
  12. package/components/Button/button.ts +1 -2
  13. package/components/Card/card.module.scss +19 -15
  14. package/components/Checkbox/checkbox.module.scss +27 -41
  15. package/components/Icon/Icon.astro +2 -2
  16. package/components/Icon/map.ts +2 -0
  17. package/components/Input/input.module.scss +28 -36
  18. package/components/Menu/Menu.astro +7 -3
  19. package/components/Menu/Menu.svelte +11 -3
  20. package/components/Menu/Menu.tsx +7 -1
  21. package/components/Menu/menu.module.scss +144 -144
  22. package/components/Menu/menu.ts +1 -0
  23. package/components/Modal/Modal.astro +70 -0
  24. package/components/Modal/Modal.svelte +71 -0
  25. package/components/Modal/Modal.tsx +76 -0
  26. package/components/Modal/modal.module.scss +103 -0
  27. package/components/Modal/modal.ts +18 -0
  28. package/components/Progress/progress.module.scss +26 -22
  29. package/components/Radio/radio.module.scss +32 -41
  30. package/components/Rating/Rating.astro +2 -2
  31. package/components/Rating/Rating.svelte +2 -2
  32. package/components/Rating/Rating.tsx +2 -2
  33. package/components/Rating/rating.module.scss +15 -8
  34. package/components/Slider/Slider.astro +44 -0
  35. package/components/Slider/Slider.svelte +42 -0
  36. package/components/Slider/Slider.tsx +48 -0
  37. package/components/Slider/slider.module.scss +68 -0
  38. package/components/Slider/slider.ts +20 -0
  39. package/components/Spinner/spinner.module.scss +11 -2
  40. package/components/Switch/switch.module.scss +28 -30
  41. package/components/Table/Table.astro +6 -1
  42. package/components/Table/Table.svelte +3 -1
  43. package/components/Table/Table.tsx +7 -1
  44. package/components/Table/table.module.scss +23 -17
  45. package/components/Table/table.ts +1 -0
  46. package/components/Tabs/Tabs.astro +0 -1
  47. package/components/Tabs/tabs.module.scss +45 -48
  48. package/components/ThemeSwitcher/ThemeSwitcher.astro +1 -0
  49. package/components/ThemeSwitcher/ThemeSwitcher.svelte +2 -1
  50. package/components/ThemeSwitcher/ThemeSwitcher.tsx +2 -1
  51. package/components/ThemeSwitcher/themeswitcher.module.scss +28 -26
  52. package/components/Timeline/timeline.module.scss +28 -23
  53. package/components/TimelineItem/TimelineItem.tsx +1 -6
  54. package/components/TimelineItem/timelineitem.module.scss +14 -17
  55. package/components/TimelineItem/timelineitem.ts +5 -0
  56. package/components/Toast/toast.module.scss +10 -14
  57. package/components/Toast/toast.ts +6 -1
  58. package/icons/close.svg +3 -0
  59. package/icons.d.ts +12 -0
  60. package/icons.js +10 -0
  61. package/index.js +2 -0
  62. package/package.json +3 -1
  63. package/react.d.ts +6 -2
  64. package/react.js +4 -0
  65. package/scss/config/color-palette.scss +24 -0
  66. package/scss/config/css-values.scss +44 -0
  67. package/scss/config/layout.scss +41 -0
  68. package/scss/config/mixins.scss +392 -9
  69. package/scss/config/typography.scss +65 -0
  70. package/scss/config.scss +6 -1
  71. package/scss/global/elements.scss +21 -1
  72. package/scss/global/scrollbar.scss +12 -9
  73. package/scss/global/theme.scss +73 -40
  74. package/scss/global/tooltip.scss +42 -35
  75. package/scss/global/utility.scss +79 -61
  76. package/scss/global.scss +0 -1
  77. package/scss/resets.scss +67 -9
  78. package/scss/setup.scss +14 -41
  79. package/svelte.d.ts +4 -0
  80. package/svelte.js +4 -0
  81. package/utils/interpolate.ts +23 -0
  82. package/utils/modal.ts +59 -0
  83. package/utils/toast.ts +3 -2
@@ -12,6 +12,7 @@ const Table = ({
12
12
  striped,
13
13
  offsetStripe,
14
14
  compact,
15
+ maxHeight,
15
16
  className
16
17
  }: TableProps) => {
17
18
  const classes = classNames([
@@ -20,11 +21,16 @@ const Table = ({
20
21
  striped && styles[`striped-${striped}s`],
21
22
  offsetStripe && styles.offset,
22
23
  compact && styles.compact,
24
+ maxHeight && styles.scroll,
23
25
  className
24
26
  ])
25
27
 
28
+ const styleVariables = {
29
+ ...(maxHeight && { 'max-height': maxHeight })
30
+ } as React.CSSProperties
31
+
26
32
  return (
27
- <div className={classes}>
33
+ <div className={classes} style={styleVariables}>
28
34
  <table>
29
35
  {headings?.length && (
30
36
  <thead>
@@ -1,38 +1,34 @@
1
- @import '../../scss/config.scss';
1
+ @use '../../scss/config.scss' as *;
2
2
 
3
3
  .table {
4
- overflow-x: auto;
4
+ @include visibility(auto);
5
5
 
6
6
  table {
7
- width: 100%;
7
+ @include size('w100%');
8
+ @include typography(left);
9
+
8
10
  border-collapse: collapse;
9
- text-align: left;
10
- font-size: 16px;
11
11
  }
12
12
 
13
13
  thead,
14
14
  tfoot {
15
- font-family: Bold;
15
+ @include typography(bold);
16
16
  }
17
17
 
18
18
  th,
19
19
  td {
20
- padding: 5px 10px;
20
+ @include spacing(py-xs, px-sm);
21
21
  }
22
22
 
23
23
  thead,
24
24
  tr {
25
- border-bottom: 1px solid var(--w-color-primary-50);
25
+ @include border(bottom, primary-50);
26
26
 
27
27
  &:last-child {
28
- border-bottom: 0;
28
+ @include border(bottom, 0);
29
29
  }
30
30
  }
31
31
 
32
- a {
33
- text-decoration: underline;
34
- }
35
-
36
32
  tfoot,
37
33
  &.hover tr:hover,
38
34
  &.striped-rows tbody tr:nth-child(odd),
@@ -40,25 +36,35 @@
40
36
  &.striped-columns td:nth-child(odd),
41
37
  &.striped-columns.offset td:nth-child(even),
42
38
  &.hover.striped-rows.offset tbody tr:nth-child(odd):hover {
43
- background: var(--w-color-primary-60);
39
+ @include background(primary-60);
44
40
  }
45
41
 
46
42
  &.striped-rows tr,
47
43
  &.striped-columns tr,
48
44
  &.striped-columns thead {
49
- border-bottom: 0;
45
+ @include border(bottom, 0);
50
46
  }
51
47
 
52
48
  &.striped-rows.offset tbody tr:nth-child(odd),
53
49
  &.striped-rows.offset tfoot,
54
50
  &.striped-columns.offset td:nth-child(odd),
55
51
  &.striped-columns tfoot {
56
- background: transparent;
52
+ @include background(transparent);
57
53
  }
58
54
 
59
55
  &.compact {
60
56
  th, td {
61
- padding: 3px 10px;
57
+ @include spacing(py-xxs, px-sm);
58
+ }
59
+ }
60
+
61
+ &.scroll {
62
+ @include spacing(pr-sm);
63
+
64
+ thead {
65
+ @include position(sticky, t0);
66
+ @include background(primary-70);
67
+ box-shadow: 0 .5px 0 var(--w-color-primary-50);
62
68
  }
63
69
  }
64
70
  }
@@ -6,5 +6,6 @@ export type TableProps = {
6
6
  striped?: 'column' | 'row' | null
7
7
  offsetStripe?: boolean
8
8
  compact?: boolean
9
+ maxHeight?: number
9
10
  className?: string
10
11
  }
@@ -63,7 +63,6 @@ const classes = [
63
63
 
64
64
  const tabs = target.parentElement?.querySelectorAll('button') as NodeListOf<HTMLButtonElement>
65
65
 
66
- // TODO - update logic
67
66
  Array.from(tabs).forEach((tab: any) => {
68
67
  tab.dataset.active = 'false'
69
68
 
@@ -1,60 +1,63 @@
1
- @import '../../scss/config.scss';
1
+ @use '../../scss/config.scss' as *;
2
2
 
3
3
  .tabs {
4
4
  &.boxed .items,
5
5
  &.outline .items {
6
- background: var(--w-color-primary-50);
7
- border-radius: 5px;
8
- padding: 5px;
9
- width: max-content;
6
+ @include background(primary-50);
7
+ @include border-radius(md);
8
+ @include spacing(p-xs);
9
+ @include size(wmax-content);
10
+ @include border(0);
10
11
 
11
12
  button {
12
- @include Transition();
13
- border-radius: 5px;
14
- padding: 10px;
13
+ @include transition();
14
+ @include border-radius(md);
15
+ @include spacing(p-sm);
15
16
 
16
17
  &[data-active="true"] {
17
- border: 0;
18
- background: var(--w-color-primary-70);
18
+ @include border(0);
19
+ @include background(primary-70);
19
20
  padding-bottom: 10px;
20
21
  }
21
22
  }
22
23
  }
23
24
 
24
25
  &.outline .items {
25
- background: transparent;
26
- border: 1px solid var(--w-color-primary-50);
26
+ @include background(transparent);
27
+ @include border(primary-50);
27
28
 
28
29
  button {
29
30
  margin-bottom: 0;
30
31
 
31
32
  &[data-active="true"] {
32
- background: var(--w-color-primary-50);
33
+ @include background(primary-50);
33
34
  }
34
35
  }
35
36
  }
36
37
 
37
38
  &.even .items button {
39
+ @include layout(h-center);
38
40
  flex: 1;
39
- justify-content: center;
40
41
  }
41
42
 
42
43
  &.vertical {
43
- display: flex;
44
- gap: 20px;
44
+ @include layout(flex, default);
45
45
 
46
46
  &.boxed .items button,
47
47
  &.outline .items button {
48
- border-bottom: 0;
48
+ @include border(bottom, 0);
49
+ }
50
+
51
+ &:not(.outline) .items {
52
+ @include border(0);
49
53
  }
50
54
 
51
55
  .items {
52
- flex-direction: column;
53
- gap: 5px;
56
+ @include layout(column, xs);
54
57
 
55
58
  button {
56
- padding: 10px;
57
- border-bottom: 2px solid var(--w-color-primary-50);
59
+ @include spacing(p-sm);
60
+ @include border(2px, bottom, primary-50);
58
61
 
59
62
  &[data-active="true"] {
60
63
  padding-bottom: 10px;
@@ -63,71 +66,65 @@
63
66
  }
64
67
 
65
68
  .content {
66
- margin-top: 0;
69
+ @include spacing(m0);
67
70
  }
68
71
  }
69
72
 
70
73
  .wrapper {
71
- overflow: auto;
74
+ @include visibility(auto);
72
75
  }
73
76
 
74
77
  .items {
75
- border-bottom: 2px solid var(--w-color-primary-50);
76
- display: flex;
77
- gap: 10px;
78
+ @include border(2px, bottom, primary-50);
79
+ @include layout(flex, sm);
78
80
 
79
81
  button {
80
- @include Transition(color);
81
- background: transparent;
82
+ @include transition(color);
83
+ @include background(transparent);
84
+ @include typography(default, primary-20);
85
+ @include border(0);
86
+ @include spacing(p-md);
87
+ @include layout(flex, v-center, sm);
88
+
82
89
  cursor: pointer;
83
- color: var(--w-color-primary);
84
- border: 0;
85
- font-size: 16px;
86
- padding: 0;
87
- margin-bottom: -2px;
88
- padding: 15px 15px;
89
- color: var(--w-color-primary-20);
90
- display: flex;
91
- align-items: center;
92
- gap: 10px;
93
90
  flex-shrink: 0;
94
91
 
95
92
  svg {
93
+ @include size(20px);
96
94
  pointer-events: none;
97
- width: 20px;
98
- height: 20px;
99
95
  }
100
96
 
101
97
  &[disabled] {
102
- color: var(--w-color-primary-30);
98
+ @include typography(primary-30);
103
99
  cursor: no-drop;
104
100
  }
105
101
 
106
102
  &[data-active="true"] {
107
- color: var(--w-color-primary);
108
- border-bottom: 2px solid var(--w-color-primary);
103
+ @include typography(primary);
104
+ @include border(2px, bottom, primary);
105
+
109
106
  padding-bottom: 13px;
110
107
  }
111
108
  }
112
109
  }
113
110
 
114
111
  .content {
115
- margin-top: 20px;
112
+ @include spacing(mt-default);
116
113
  }
117
114
 
118
115
  [data-tab] {
119
- display: none;
116
+ @include visibility(none);
120
117
 
121
118
  &[data-active="true"] {
122
- display: block;
119
+ @include visibility(block);
123
120
  }
124
121
  }
125
122
  }
126
123
 
127
- @include Media('xs') {
124
+ @include media('xs') {
128
125
  .tabs {
129
126
  &.even .items {
130
- width: auto;
127
+ @include size(wauto);
131
128
  }
132
129
  }
133
130
  }
@@ -38,6 +38,7 @@ const buttonClasses = [
38
38
  <button
39
39
  style={!useIcons ? `background:${theme};` : undefined}
40
40
  data-theme={themes[theme]}
41
+ aria-label={themes[theme]}
41
42
  class:list={buttonClasses}
42
43
  >
43
44
  {index === 0 && <slot name="primaryIcon" />}
@@ -61,9 +61,10 @@
61
61
  >
62
62
  {#each Object.keys(themes) as theme, index}
63
63
  <button
64
+ on:click={() => setTheme(toggle ? index : themes[theme])}
64
65
  style={!useIcons ? `background:${theme};` : undefined}
65
66
  data-active={currentTheme === themes[theme]}
66
- on:click={() => setTheme(toggle ? index : themes[theme])}
67
+ aria-label={themes[theme]}
67
68
  class={classNames([
68
69
  styles.switch,
69
70
  useIcons && styles.icons
@@ -70,8 +70,9 @@ const ThemeSwitcher = ({
70
70
  {Object.keys(themes as {}).map((theme, index) => (
71
71
  <button
72
72
  key={index}
73
- data-active={currentTheme === themes[theme]}
74
73
  onClick={() => setTheme(toggle ? index : themes[theme])}
74
+ data-active={currentTheme === themes[theme]}
75
+ aria-label={themes[theme]}
75
76
  style={!useIcons ? { background: theme } : undefined}
76
77
  className={classNames([
77
78
  styles.switch,
@@ -1,11 +1,14 @@
1
- @import '../../scss/config.scss';
1
+ @use '../../scss/config.scss' as *;
2
+
3
+ body {
4
+ --w-theme-switcher-size: 20px;
5
+ }
2
6
 
3
7
  .switcher {
4
- display: flex;
5
- gap: 10px;
8
+ @include layout(flex, sm);
6
9
 
7
10
  &.toggle {
8
- position: relative;
11
+ @include position(relative);
9
12
  width: var(--w-theme-switcher-size);
10
13
  height: var(--w-theme-switcher-size);
11
14
 
@@ -13,37 +16,38 @@
13
16
  position: absolute;
14
17
 
15
18
  &:first-child {
16
- z-index: 2;
19
+ @include layer(overlay);
17
20
  }
18
21
 
19
22
  &:nth-child(2) {
20
- z-index: 1;
23
+ @include layer(fg);
21
24
  }
22
25
 
23
26
  &[data-active="true"] {
24
- z-index: 3;
27
+ @include layer(popup);
25
28
  }
26
29
  }
27
30
  }
28
31
  }
29
32
 
30
33
  .switch {
34
+ @include border(0);
35
+ @include border-radius(max);
36
+ @include position(relative);
37
+
31
38
  width: var(--w-theme-switcher-size);
32
39
  height: var(--w-theme-switcher-size);
33
- border-radius: 100%;
34
40
  cursor: pointer;
35
- position: relative;
36
- border: 0;
37
41
 
38
42
  &.icons {
39
- @include Transition(opacity);
40
- color: var(--w-color-primary);
41
- background: transparent;
42
- padding: 0;
43
- opacity: 0;
43
+ @include transition(opacity);
44
+ @include typography(primary);
45
+ @include background(transparent);
46
+ @include spacing(p0);
47
+ @include visibility(0);
44
48
 
45
49
  &[data-active="true"] {
46
- opacity: 1;
50
+ @include visibility(1);
47
51
  }
48
52
 
49
53
  svg, img {
@@ -54,20 +58,18 @@
54
58
  }
55
59
 
56
60
  &:not(.icons)::after {
57
- @include Transition();
61
+ @include position(absolute, center);
62
+ @include border(primary);
63
+ @include border-radius(max);
64
+ @include layer(bg);
65
+ @include transition();
66
+ @include size(0);
67
+
58
68
  content: '';
59
- position: absolute;
60
- top: 50%;
61
- left: 50%;
62
- transform: translate(-50%, -50%);
63
- border: 1px solid var(--w-color-primary);
64
- border-radius: 100%;
65
- width: 0;
66
- height: 0;
67
- z-index: -1;
68
69
  }
69
70
 
70
71
  &[data-active="true"]::after {
72
+ @include layer(default);
71
73
  width: calc(var(--w-theme-switcher-size) + 5px);
72
74
  height: calc(var(--w-theme-switcher-size) + 5px);
73
75
  }
@@ -1,60 +1,65 @@
1
- @import '../../scss/config.scss';
1
+ @use '../../scss/config.scss' as *;
2
2
 
3
3
  // (circle width + border * 2) / 2 - line width
4
4
  $leftOffset: calc(((25px + 4px) / 2) - 1px);
5
5
  $rightOffset: calc((((25px + 4px) / 2) - 1px) * -1);
6
6
 
7
+ body {
8
+ --w-timeline-color: var(--w-color-primary-50);
9
+ --w-timeline-text-color: var(--w-color-primary);
10
+ --w-timeline-counter: decimal;
11
+ }
12
+
7
13
  .timeline {
8
- display: flex;
9
- gap: 20px;
10
- flex-direction: column;
11
- padding: 0 0 0 40px;
12
- margin: 0;
14
+ @include layout(flex, default, column);
15
+ @include spacing(pl-3xl, m0);
16
+ @include position(relative);
17
+ @include typography(normal);
18
+
13
19
  list-style-type: none;
14
20
  counter-reset: item;
15
- position: relative;
16
21
 
17
22
  &::before {
18
- position: absolute;
23
+ @include position(absolute);
24
+ @include size(w2px, 'h100%');
25
+ @include background(var(--w-timeline-color));
26
+
19
27
  content: '';
20
- width: 2px;
21
- background: var(--w-timeline-color);
22
- height: 100%;
23
28
  left: $leftOffset
24
29
  }
25
30
 
26
- &.fill li::before {
31
+ &.fill > li::before {
27
32
  content: '';
28
33
  }
29
34
 
30
- &.stroke li::before {
31
- background: var(--w-color-primary-70);
35
+ &.stroke > li::before {
36
+ @include background(primary-70);
32
37
  border: 2px solid var(--w-timeline-color);
33
38
  }
34
39
  }
35
40
 
36
- @include Media('xs') {
41
+ @include media('xs') {
37
42
  .timeline {
38
43
  &.alternate {
39
- padding: 0;
44
+ @include spacing(p0);
40
45
 
41
46
  &::before {
42
47
  left: calc(50% - 1px);
43
48
  }
44
49
 
45
- li {
46
- width: 50%;
50
+ > li {
51
+ @include size('w50%');
47
52
 
48
53
  &:nth-child(odd) {
49
- padding-right: 40px;
54
+ @include spacing(pr-3xl);
50
55
  }
51
56
 
52
57
  &:nth-child(even) {
58
+ @include spacing(pl-3xl);
53
59
  align-self: flex-end;
54
- padding-left: 40px;
55
60
 
56
61
  &::before {
57
- left: 25px;
62
+ @include position(l25px);
58
63
  }
59
64
  }
60
65
 
@@ -64,8 +69,8 @@ $rightOffset: calc((((25px + 4px) / 2) - 1px) * -1);
64
69
  }
65
70
  }
66
71
 
67
- &.centered li:nth-child(odd) {
68
- text-align: right;
72
+ &.centered > li:nth-child(odd) {
73
+ @include typography(right);
69
74
  }
70
75
  }
71
76
  }
@@ -1,14 +1,9 @@
1
1
  import React from 'react'
2
- import type { TimelineItemProps } from './timelineitem'
2
+ import type { ReactTimelineItemProps } from './timelineitem'
3
3
 
4
4
  import styles from './timelineitem.module.scss'
5
5
  import { classNames } from '../../utils/classNames'
6
6
 
7
- type ReactTimelineItemProps = {
8
- TitleTag?: keyof JSX.IntrinsicElements
9
- children: React.ReactNode
10
- } & Omit<TimelineItemProps, 'titleTag'>
11
-
12
7
  const TimelineItem = ({
13
8
  title,
14
9
  TitleTag = 'span',
@@ -1,31 +1,28 @@
1
- @import '../../scss/config.scss';
1
+ @use '../../scss/config.scss' as *;
2
2
 
3
3
  .item {
4
- position: relative;
5
- font-size: 16px;
4
+ @include position(relative);
5
+ @include spacing(m0);
6
6
 
7
7
  &::before {
8
+ @include position(absolute, t-5px);
9
+ @include size(25px);
10
+ @include border-radius(max);
11
+ @include background(var(--w-timeline-color));
12
+ @include typography(md);
13
+ @include layout(inline-flex, center);
14
+ @include border(2px, primary-70);
15
+
8
16
  content: counter(item, var(--w-timeline-counter));
9
17
  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
18
  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 var(--w-color-primary-70);
22
19
  margin-left: -40px;
23
20
  }
24
21
 
25
22
  .title {
23
+ @include typography(bold, lg);
24
+ @include spacing(mb-sm);
25
+
26
26
  display: block;
27
- margin-bottom: 10px;
28
- font-family: Bold;
29
- font-size: 18px;
30
27
  }
31
28
  }
@@ -3,3 +3,8 @@ export type TimelineItemProps = {
3
3
  titleTag?: string
4
4
  className?: string
5
5
  }
6
+
7
+ export type ReactTimelineItemProps = {
8
+ TitleTag?: keyof JSX.IntrinsicElements
9
+ children: React.ReactNode
10
+ } & Omit<TimelineItemProps, 'titleTag'>
@@ -1,15 +1,14 @@
1
- @import '../../scss/config.scss';
1
+ @use '../../scss/config.scss' as *;
2
2
 
3
3
  .toast {
4
- background: var(--w-color-primary-70);
5
- position: fixed;
6
- right: 20px;
7
- bottom: 20px;
4
+ @include background(primary-70);
5
+ @include position(fixed, r20px, b20px);
6
+ @include layer(header);
7
+
8
8
  transform: translateY(calc(100% + 25px));
9
- z-index: 99;
10
9
 
11
10
  &[data-show] {
12
- @include Transition(transform);
11
+ @include transition(transform);
13
12
  }
14
13
 
15
14
  &[data-show="true"] {
@@ -18,15 +17,15 @@
18
17
 
19
18
  &[data-position="bottom-left"],
20
19
  &[data-position="top-left"] {
20
+ @include position(l20px);
21
21
  right: auto;
22
- left: 20px;
23
22
  }
24
23
 
25
24
  &[data-position="top-left"],
26
25
  &[data-position="top-right"],
27
26
  &[data-position="top-full"] {
27
+ @include position(t20px);
28
28
  bottom: auto;
29
- top: 20px;
30
29
  transform: translateY(calc(-100% - 25px));
31
30
 
32
31
  &[data-show="true"] {
@@ -34,11 +33,8 @@
34
33
  }
35
34
  }
36
35
 
37
- &[data-position="bottom-full"] {
38
- left: 20px;
39
- }
40
-
36
+ &[data-position="bottom-full"],
41
37
  &[data-position="top-full"] {
42
- left: 20px;
38
+ @include position(l20px);
43
39
  }
44
40
  }
@@ -1,7 +1,12 @@
1
1
  import type { AlertProps, ReactAlertProps } from '../Alert/alert'
2
2
 
3
3
  export type ToastProps = {
4
- position?: 'bottom-left' | 'top-left' | 'top-right' | null
4
+ position?: 'bottom-left'
5
+ | 'top-left'
6
+ | 'top-right'
7
+ | 'bottom-full'
8
+ | 'top-full'
9
+ | null
5
10
  [key: string]: any
6
11
  } & AlertProps
7
12