@bagaar/velvet-thunder 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/velvet-alert.js.map +1 -1
  3. package/dist/components/velvet-avatar.js.map +1 -1
  4. package/dist/components/velvet-button.js.map +1 -1
  5. package/dist/components/velvet-checkbox-group.js.map +1 -1
  6. package/dist/components/velvet-checkbox.js.map +1 -1
  7. package/dist/components/velvet-disclosure.js.map +1 -1
  8. package/dist/components/velvet-dropdown/content.js +1 -1
  9. package/dist/components/velvet-dropdown/content.js.map +1 -1
  10. package/dist/components/velvet-dropdown.js.map +1 -1
  11. package/dist/components/velvet-icon/chevron-down.js.map +1 -1
  12. package/dist/components/velvet-icon/circle-check-solid.js +1 -1
  13. package/dist/components/velvet-icon/circle-check-solid.js.map +1 -1
  14. package/dist/components/velvet-icon/circle-exclamation-solid.js.map +1 -1
  15. package/dist/components/velvet-icon/circle-info-solid.js +1 -1
  16. package/dist/components/velvet-icon/circle-info-solid.js.map +1 -1
  17. package/dist/components/velvet-icon/user.js.map +1 -1
  18. package/dist/components/velvet-icon/x-mark.js.map +1 -1
  19. package/dist/components/velvet-icon-button.js.map +1 -1
  20. package/dist/components/velvet-icon-link.js.map +1 -1
  21. package/dist/components/velvet-input.js.map +1 -1
  22. package/dist/components/velvet-link.js.map +1 -1
  23. package/dist/components/velvet-progress.js.map +1 -1
  24. package/dist/components/velvet-radio-group.js.map +1 -1
  25. package/dist/components/velvet-radio.js.map +1 -1
  26. package/dist/components/velvet-select/option.js.map +1 -1
  27. package/dist/components/velvet-select.js.map +1 -1
  28. package/dist/components/velvet-spinner.js.map +1 -1
  29. package/dist/components/velvet-switch.js.map +1 -1
  30. package/dist/components/velvet-tag.js.map +1 -1
  31. package/dist/components/velvet-textarea.js.map +1 -1
  32. package/dist/components/velvet-tooltip/content.js.map +1 -1
  33. package/dist/components/velvet-tooltip.js.map +1 -1
  34. package/package.json +22 -18
  35. package/tailwind/components/alert.cjs +15 -6
  36. package/tailwind/components/avatar.cjs +30 -9
  37. package/tailwind/components/button.cjs +34 -13
  38. package/tailwind/components/checkbox.cjs +30 -12
  39. package/tailwind/components/disclosure.cjs +2 -2
  40. package/tailwind/components/icon-button.cjs +26 -12
  41. package/tailwind/components/icon-link.cjs +23 -10
  42. package/tailwind/components/input.cjs +25 -8
  43. package/tailwind/components/link.cjs +30 -10
  44. package/tailwind/components/progress.cjs +12 -6
  45. package/tailwind/components/radio.cjs +29 -12
  46. package/tailwind/components/select.cjs +28 -10
  47. package/tailwind/components/spinner.cjs +18 -8
  48. package/tailwind/components/switch.cjs +49 -18
  49. package/tailwind/components/tag.cjs +23 -8
  50. package/tailwind/components/textarea.cjs +28 -7
  51. package/tailwind/components/tooltip.cjs +3 -2
  52. package/tailwind/utilities/outline.cjs +6 -2
@@ -1,33 +1,53 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
4
  '.velvet-link': {
5
- '@apply border border-transparent font-medium': {},
6
- '@apply flex items-center justify-center': {},
7
- '@apply rounded-md text-sm transition w-fit': {},
5
+ 'border-width': '1px',
6
+ 'border-color': 'transparent',
7
+ 'font-weight': theme('fontWeight.medium'),
8
+ display: 'flex',
9
+ 'align-items': 'center',
10
+ 'justify-content': 'center',
11
+ 'border-radius': theme('borderRadius.md'),
12
+ 'font-size': theme('fontSize.sm'),
13
+ 'line-height': theme('lineHeight.5'),
14
+ 'transition-property': theme('transitionProperty.DEFAULT'),
15
+ 'transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
16
+ 'transition-duration': theme('transitionDuration.DEFAULT'),
17
+ width: 'fit-content',
8
18
 
9
19
  '&:focus-visible': {
10
- '@apply velvet-outline': {},
20
+ 'outline-style': 'solid',
21
+ 'outline-width': '2px',
22
+ 'outline-offset': '1px',
11
23
  },
12
24
 
13
25
  '&-xs': {
14
- '@apply h-7 px-2': {},
26
+ height: theme('spacing.7'),
27
+ 'padding-left': theme('spacing.2'),
28
+ 'padding-right': theme('spacing.2'),
15
29
  },
16
30
 
17
31
  '&-sm': {
18
- '@apply h-8 px-3': {},
32
+ height: theme('spacing.8'),
33
+ 'padding-left': theme('spacing.3'),
34
+ 'padding-right': theme('spacing.3'),
19
35
  },
20
36
 
21
37
  '&-md': {
22
- '@apply h-9 px-4': {},
38
+ height: theme('spacing.9'),
39
+ 'padding-left': theme('spacing.4'),
40
+ 'padding-right': theme('spacing.4'),
23
41
  },
24
42
 
25
43
  '&-lg': {
26
- '@apply h-10 px-6': {},
44
+ height: theme('spacing.10'),
45
+ 'padding-left': theme('spacing.6'),
46
+ 'padding-right': theme('spacing.6'),
27
47
  },
28
48
 
29
49
  '&-pill': {
30
- '@apply rounded-full': {},
50
+ 'border-radius': theme('borderRadius.full'),
31
51
  },
32
52
  },
33
53
  });
@@ -1,23 +1,29 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
4
  '.velvet-progress': {
5
- '@apply overflow-hidden rounded-full w-full': {},
5
+ overflow: 'hidden',
6
+ 'border-radius': theme('borderRadius.full'),
7
+ width: '100%',
6
8
 
7
9
  '&-sm': {
8
- '@apply h-1': {},
10
+ height: theme('spacing.1'),
9
11
  },
10
12
 
11
13
  '&-md': {
12
- '@apply h-2': {},
14
+ height: theme('spacing.2'),
13
15
  },
14
16
 
15
17
  '&-lg': {
16
- '@apply h-3': {},
18
+ height: theme('spacing.3'),
17
19
  },
18
20
 
19
21
  '&-line': {
20
- '@apply h-full rounded-full transition-all': {},
22
+ height: '100%',
23
+ 'border-radius': theme('borderRadius.full'),
24
+ 'transition-property': theme('transitionProperty.all'),
25
+ 'transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
26
+ 'transition-duration': theme('transitionDuration.DEFAULT'),
21
27
  },
22
28
  },
23
29
  });
@@ -1,46 +1,63 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
4
  '.velvet-radio': {
5
- '@apply flex items-center w-fit': {},
5
+ display: 'flex',
6
+ 'align-items': 'center',
7
+ width: 'fit-content',
6
8
 
7
9
  '&-sm': {
8
- '@apply text-xs': {},
10
+ 'font-size': theme('fontSize.xs'),
11
+ 'line-height': theme('lineHeight.4'),
9
12
 
10
13
  '.velvet-radio-input': {
11
- '@apply mr-2 size-4': {},
14
+ 'margin-right': theme('spacing.2'),
15
+ width: theme('spacing.4'),
16
+ height: theme('spacing.4'),
12
17
  },
13
18
  },
14
19
 
15
20
  '&-md': {
16
- '@apply text-sm': {},
21
+ 'font-size': theme('fontSize.sm'),
22
+ 'line-height': theme('lineHeight.5'),
17
23
 
18
24
  '.velvet-radio-input': {
19
- '@apply mr-3 size-5': {},
25
+ 'margin-right': theme('spacing.3'),
26
+ width: theme('spacing.5'),
27
+ height: theme('spacing.5'),
20
28
  },
21
29
  },
22
30
 
23
31
  '&-lg': {
24
- '@apply text-base': {},
32
+ 'font-size': theme('fontSize.base'),
33
+ 'line-height': theme('lineHeight.6'),
25
34
 
26
35
  '.velvet-radio-input': {
27
- '@apply mr-4 size-6': {},
36
+ 'margin-right': theme('spacing.4'),
37
+ width: theme('spacing.6'),
38
+ height: theme('spacing.6'),
28
39
  },
29
40
  },
30
41
 
31
42
  '&-disabled': {
32
- '@apply cursor-not-allowed': {},
43
+ cursor: 'not-allowed',
33
44
  },
34
45
 
35
46
  '&-input': {
36
- '@apply border-2 transition': {},
47
+ 'border-width': '2px',
48
+ 'transition-property': theme('transitionProperty.DEFAULT'),
49
+ 'transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
50
+ 'transition-duration': theme('transitionDuration.DEFAULT'),
37
51
 
38
52
  '&:focus': {
39
- '@apply ring-0 ring-offset-0 velvet-outline': {},
53
+ 'box-shadow': 'none',
54
+ 'outline-style': 'solid',
55
+ 'outline-width': '2px',
56
+ 'outline-offset': '1px',
40
57
  },
41
58
 
42
59
  '&:disabled': {
43
- '@apply cursor-not-allowed': {},
60
+ cursor: 'not-allowed',
44
61
  },
45
62
  },
46
63
  },
@@ -2,33 +2,51 @@
2
2
 
3
3
  module.exports = ({ theme }) => ({
4
4
  '.velvet-select': {
5
- '@apply py-0 rounded-md text-sm transition w-full': {},
5
+ 'padding-top': '0',
6
+ 'padding-bottom': '0',
7
+ 'border-radius': theme('borderRadius.md'),
8
+ 'font-size': theme('fontSize.sm'),
9
+ 'line-height': theme('lineHeight.5'),
10
+ 'transition-property': theme('transitionProperty.DEFAULT'),
11
+ 'transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
12
+ 'transition-duration': theme('transitionDuration.DEFAULT'),
13
+ width: '100%',
6
14
 
7
15
  '&:focus': {
8
- '@apply ring-0 velvet-outline-offset-0': {},
16
+ 'box-shadow': 'none',
17
+ 'outline-style': 'solid',
18
+ 'outline-width': '2px',
19
+ 'outline-offset': '0px',
9
20
  },
10
21
 
11
22
  '&:disabled': {
12
- '@apply cursor-not-allowed opacity-100': {},
23
+ cursor: 'not-allowed',
24
+ opacity: '1',
13
25
  },
14
26
 
15
27
  '&-sm': {
16
- '@apply h-8 pl-2 pr-8': {},
17
- [`@apply bg-[right_${theme('spacing.1')}_center]`]: {},
28
+ height: theme('spacing.8'),
29
+ 'padding-left': theme('spacing.2'),
30
+ 'padding-right': theme('spacing.8'),
31
+ 'background-position': `right ${theme('spacing.1')} center`,
18
32
  },
19
33
 
20
34
  '&-md': {
21
- '@apply h-9 pl-3 pr-10': {},
22
- [`@apply bg-[right_${theme('spacing.2')}_center]`]: {},
35
+ height: theme('spacing.9'),
36
+ 'padding-left': theme('spacing.3'),
37
+ 'padding-right': theme('spacing.10'),
38
+ 'background-position': `right ${theme('spacing.2')} center`,
23
39
  },
24
40
 
25
41
  '&-lg': {
26
- '@apply h-10 pl-4 pr-12': {},
27
- [`@apply bg-[right_${theme('spacing.3')}_center]`]: {},
42
+ height: theme('spacing.10'),
43
+ 'padding-left': theme('spacing.4'),
44
+ 'padding-right': theme('spacing.12'),
45
+ 'background-position': `right ${theme('spacing.3')} center`,
28
46
  },
29
47
 
30
48
  '&-pill': {
31
- '@apply rounded-full': {},
49
+ 'border-radius': theme('borderRadius.full'),
32
50
  },
33
51
  },
34
52
  });
@@ -1,31 +1,41 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
+ '@keyframes velvet-spin': {
5
+ to: { transform: 'rotate(360deg)' },
6
+ },
7
+
4
8
  '.velvet-spinner': {
5
- '@apply animate-spin shrink-0': {},
9
+ animation: 'velvet-spin 1s linear infinite',
10
+ 'flex-shrink': '0',
6
11
 
7
12
  '&-xs': {
8
- '@apply size-3': {},
13
+ width: theme('spacing.3'),
14
+ height: theme('spacing.3'),
9
15
  },
10
16
 
11
17
  '&-sm': {
12
- '@apply size-4': {},
18
+ width: theme('spacing.4'),
19
+ height: theme('spacing.4'),
13
20
  },
14
21
 
15
22
  '&-md': {
16
- '@apply size-5': {},
23
+ width: theme('spacing.5'),
24
+ height: theme('spacing.5'),
17
25
  },
18
26
 
19
27
  '&-lg': {
20
- '@apply size-6': {},
28
+ width: theme('spacing.6'),
29
+ height: theme('spacing.6'),
21
30
  },
22
31
 
23
32
  '&-xl': {
24
- '@apply size-7': {},
33
+ width: theme('spacing.7'),
34
+ height: theme('spacing.7'),
25
35
  },
26
36
 
27
37
  '&-track': {
28
- '@apply opacity-20': {},
38
+ opacity: '0.2',
29
39
  },
30
40
  },
31
41
  });
@@ -1,71 +1,102 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
4
  '.velvet-switch': {
5
- '@apply flex items-center w-fit': {},
5
+ display: 'flex',
6
+ 'align-items': 'center',
7
+ width: 'fit-content',
6
8
 
7
9
  '&-right': {
8
- '@apply flex-row-reverse': {},
10
+ 'flex-direction': 'row-reverse',
9
11
  },
10
12
 
11
13
  '&-sm': {
12
- '@apply gap-2 text-xs': {},
14
+ gap: theme('spacing.2'),
15
+ 'font-size': theme('fontSize.xs'),
16
+ 'line-height': theme('lineHeight.4'),
13
17
 
14
18
  '.velvet-switch-track': {
15
- '@apply h-4 w-7': {},
19
+ height: theme('spacing.4'),
20
+ width: theme('spacing.7'),
16
21
  },
17
22
 
18
23
  '.velvet-switch-handle': {
19
- '@apply size-3': {},
24
+ width: theme('spacing.3'),
25
+ height: theme('spacing.3'),
20
26
  },
21
27
  },
22
28
 
23
29
  '&-md': {
24
- '@apply gap-3 text-sm': {},
30
+ gap: theme('spacing.3'),
31
+ 'font-size': theme('fontSize.sm'),
32
+ 'line-height': theme('lineHeight.5'),
25
33
 
26
34
  '.velvet-switch-track': {
27
- '@apply h-5 w-9': {},
35
+ height: theme('spacing.5'),
36
+ width: theme('spacing.9'),
28
37
  },
29
38
 
30
39
  '.velvet-switch-handle': {
31
- '@apply size-4': {},
40
+ width: theme('spacing.4'),
41
+ height: theme('spacing.4'),
32
42
  },
33
43
  },
34
44
 
35
45
  '&-lg': {
36
- '@apply gap-4 text-base': {},
46
+ gap: theme('spacing.4'),
47
+ 'font-size': theme('fontSize.base'),
48
+ 'line-height': theme('lineHeight.6'),
37
49
 
38
50
  '.velvet-switch-track': {
39
- '@apply h-6 w-11': {},
51
+ height: theme('spacing.6'),
52
+ width: theme('spacing.11'),
40
53
  },
41
54
 
42
55
  '.velvet-switch-handle': {
43
- '@apply size-5': {},
56
+ width: theme('spacing.5'),
57
+ height: theme('spacing.5'),
44
58
  },
45
59
  },
46
60
 
47
61
  '&-disabled': {
48
- '@apply cursor-not-allowed': {},
62
+ cursor: 'not-allowed',
49
63
  },
50
64
 
51
65
  '&-input': {
52
- '@apply sr-only': {},
66
+ position: 'absolute',
67
+ width: '1px',
68
+ height: '1px',
69
+ padding: '0',
70
+ margin: '-1px',
71
+ overflow: 'hidden',
72
+ clip: 'rect(0, 0, 0, 0)',
73
+ 'white-space': 'nowrap',
74
+ 'border-width': '0',
53
75
 
54
76
  '&:focus-visible + .velvet-switch-track': {
55
- '@apply velvet-outline': {},
77
+ 'outline-style': 'solid',
78
+ 'outline-width': '2px',
79
+ 'outline-offset': '1px',
56
80
  },
57
81
 
58
82
  '&:checked + .velvet-switch-track .velvet-switch-handle': {
59
- '@apply translate-x-full': {},
83
+ transform: 'translateX(100%)',
60
84
  },
61
85
  },
62
86
 
63
87
  '.velvet-switch-track': {
64
- '@apply p-0.5 rounded-full transition-colors': {},
88
+ padding: '0.125rem',
89
+ 'border-radius': theme('borderRadius.full'),
90
+ 'transition-property': theme('transitionProperty.colors'),
91
+ 'transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
92
+ 'transition-duration': theme('transitionDuration.DEFAULT'),
65
93
  },
66
94
 
67
95
  '.velvet-switch-handle': {
68
- '@apply rounded-full transition-transform': {},
96
+ 'border-radius': theme('borderRadius.full'),
97
+ 'transition-property': theme('transitionProperty.transform'),
98
+ 'transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
99
+ 'transition-duration': theme('transitionDuration.DEFAULT'),
69
100
  },
70
101
  },
71
102
  });
@@ -1,25 +1,40 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
4
  '.velvet-tag': {
5
- '@apply border border-transparent font-medium': {},
6
- '@apply flex items-center justify-center': {},
7
- '@apply rounded text-sm w-fit': {},
5
+ 'border-width': '1px',
6
+ 'border-color': 'transparent',
7
+ 'font-weight': theme('fontWeight.medium'),
8
+ display: 'flex',
9
+ 'align-items': 'center',
10
+ 'justify-content': 'center',
11
+ 'border-radius': theme('borderRadius.DEFAULT'),
12
+ 'font-size': theme('fontSize.sm'),
13
+ 'line-height': theme('lineHeight.5'),
14
+ width: 'fit-content',
8
15
 
9
16
  '&-sm': {
10
- '@apply h-5 px-1 text-xs': {},
17
+ height: theme('spacing.5'),
18
+ 'padding-left': theme('spacing.1'),
19
+ 'padding-right': theme('spacing.1'),
20
+ 'font-size': theme('fontSize.xs'),
21
+ 'line-height': theme('lineHeight.4'),
11
22
  },
12
23
 
13
24
  '&-md': {
14
- '@apply h-6 px-2': {},
25
+ height: theme('spacing.6'),
26
+ 'padding-left': theme('spacing.2'),
27
+ 'padding-right': theme('spacing.2'),
15
28
  },
16
29
 
17
30
  '&-lg': {
18
- '@apply h-7 px-3': {},
31
+ height: theme('spacing.7'),
32
+ 'padding-left': theme('spacing.3'),
33
+ 'padding-right': theme('spacing.3'),
19
34
  },
20
35
 
21
36
  '&-pill': {
22
- '@apply rounded-full': {},
37
+ 'border-radius': theme('borderRadius.full'),
23
38
  },
24
39
  },
25
40
  });
@@ -1,27 +1,48 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
4
  '.velvet-textarea': {
5
- '@apply rounded-md text-sm transition w-full': {},
5
+ 'border-radius': theme('borderRadius.md'),
6
+ 'font-size': theme('fontSize.sm'),
7
+ 'line-height': theme('lineHeight.5'),
8
+ 'transition-property': theme('transitionProperty.DEFAULT'),
9
+ 'transition-timing-function': theme('transitionTimingFunction.DEFAULT'),
10
+ 'transition-duration': theme('transitionDuration.DEFAULT'),
11
+ width: '100%',
6
12
 
7
13
  '&:focus': {
8
- '@apply ring-0 velvet-outline-offset-0': {},
14
+ 'box-shadow': 'none',
15
+ 'outline-style': 'solid',
16
+ 'outline-width': '2px',
17
+ 'outline-offset': '0px',
9
18
  },
10
19
 
11
20
  '&:disabled': {
12
- '@apply cursor-not-allowed': {},
21
+ cursor: 'not-allowed',
13
22
  },
14
23
 
15
24
  '&-sm': {
16
- '@apply h-16 px-2 py-1': {},
25
+ height: theme('spacing.16'),
26
+ 'padding-left': theme('spacing.2'),
27
+ 'padding-right': theme('spacing.2'),
28
+ 'padding-top': theme('spacing.1'),
29
+ 'padding-bottom': theme('spacing.1'),
17
30
  },
18
31
 
19
32
  '&-md': {
20
- '@apply h-24 px-3 py-2': {},
33
+ height: theme('spacing.24'),
34
+ 'padding-left': theme('spacing.3'),
35
+ 'padding-right': theme('spacing.3'),
36
+ 'padding-top': theme('spacing.2'),
37
+ 'padding-bottom': theme('spacing.2'),
21
38
  },
22
39
 
23
40
  '&-lg': {
24
- '@apply h-32 px-4 py-3': {},
41
+ height: theme('spacing.32'),
42
+ 'padding-left': theme('spacing.4'),
43
+ 'padding-right': theme('spacing.4'),
44
+ 'padding-top': theme('spacing.3'),
45
+ 'padding-bottom': theme('spacing.3'),
25
46
  },
26
47
  },
27
48
  });
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- module.exports = () => ({
3
+ module.exports = ({ theme }) => ({
4
4
  '.velvet-tooltip': {
5
5
  '&-content': {
6
- '@apply text-sm': {},
6
+ 'font-size': theme('fontSize.sm'),
7
+ 'line-height': theme('lineHeight.5'),
7
8
  },
8
9
  },
9
10
  });
@@ -2,9 +2,13 @@
2
2
 
3
3
  module.exports = {
4
4
  '.velvet-outline': {
5
- '@apply outline outline-2 outline-offset-1': {},
5
+ 'outline-style': 'solid',
6
+ 'outline-width': '2px',
7
+ 'outline-offset': '1px',
6
8
  },
7
9
  '.velvet-outline-offset-0': {
8
- '@apply outline outline-2 outline-offset-0': {},
10
+ 'outline-style': 'solid',
11
+ 'outline-width': '2px',
12
+ 'outline-offset': '0px',
9
13
  },
10
14
  };