@bagaar/velvet-thunder 0.0.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 (192) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +27 -0
  3. package/addon-main.cjs +4 -0
  4. package/declarations/-private/helpers/cn.d.ts +2 -0
  5. package/declarations/-private/helpers/cn.d.ts.map +1 -0
  6. package/declarations/components/velvet-alert.d.ts +21 -0
  7. package/declarations/components/velvet-alert.d.ts.map +1 -0
  8. package/declarations/components/velvet-avatar.d.ts +16 -0
  9. package/declarations/components/velvet-avatar.d.ts.map +1 -0
  10. package/declarations/components/velvet-button.d.ts +28 -0
  11. package/declarations/components/velvet-button.d.ts.map +1 -0
  12. package/declarations/components/velvet-checkbox-group.d.ts +30 -0
  13. package/declarations/components/velvet-checkbox-group.d.ts.map +1 -0
  14. package/declarations/components/velvet-checkbox.d.ts +28 -0
  15. package/declarations/components/velvet-checkbox.d.ts.map +1 -0
  16. package/declarations/components/velvet-disclosure.d.ts +34 -0
  17. package/declarations/components/velvet-disclosure.d.ts.map +1 -0
  18. package/declarations/components/velvet-dropdown/content.d.ts +16 -0
  19. package/declarations/components/velvet-dropdown/content.d.ts.map +1 -0
  20. package/declarations/components/velvet-dropdown.d.ts +60 -0
  21. package/declarations/components/velvet-dropdown.d.ts.map +1 -0
  22. package/declarations/components/velvet-icon/chevron-down.d.ts +7 -0
  23. package/declarations/components/velvet-icon/chevron-down.d.ts.map +1 -0
  24. package/declarations/components/velvet-icon/circle-check-solid.d.ts +7 -0
  25. package/declarations/components/velvet-icon/circle-check-solid.d.ts.map +1 -0
  26. package/declarations/components/velvet-icon/circle-exclamation-solid.d.ts +7 -0
  27. package/declarations/components/velvet-icon/circle-exclamation-solid.d.ts.map +1 -0
  28. package/declarations/components/velvet-icon/circle-info-solid.d.ts +7 -0
  29. package/declarations/components/velvet-icon/circle-info-solid.d.ts.map +1 -0
  30. package/declarations/components/velvet-icon/user.d.ts +7 -0
  31. package/declarations/components/velvet-icon/user.d.ts.map +1 -0
  32. package/declarations/components/velvet-icon/x-mark.d.ts +7 -0
  33. package/declarations/components/velvet-icon/x-mark.d.ts.map +1 -0
  34. package/declarations/components/velvet-icon-button.d.ts +28 -0
  35. package/declarations/components/velvet-icon-button.d.ts.map +1 -0
  36. package/declarations/components/velvet-icon-link.d.ts +19 -0
  37. package/declarations/components/velvet-icon-link.d.ts.map +1 -0
  38. package/declarations/components/velvet-input.d.ts +21 -0
  39. package/declarations/components/velvet-input.d.ts.map +1 -0
  40. package/declarations/components/velvet-link.d.ts +19 -0
  41. package/declarations/components/velvet-link.d.ts.map +1 -0
  42. package/declarations/components/velvet-progress.d.ts +19 -0
  43. package/declarations/components/velvet-progress.d.ts.map +1 -0
  44. package/declarations/components/velvet-radio-group.d.ts +25 -0
  45. package/declarations/components/velvet-radio-group.d.ts.map +1 -0
  46. package/declarations/components/velvet-radio.d.ts +25 -0
  47. package/declarations/components/velvet-radio.d.ts.map +1 -0
  48. package/declarations/components/velvet-select/option.d.ts +20 -0
  49. package/declarations/components/velvet-select/option.d.ts.map +1 -0
  50. package/declarations/components/velvet-select.d.ts +32 -0
  51. package/declarations/components/velvet-select.d.ts.map +1 -0
  52. package/declarations/components/velvet-spinner.d.ts +10 -0
  53. package/declarations/components/velvet-spinner.d.ts.map +1 -0
  54. package/declarations/components/velvet-switch.d.ts +18 -0
  55. package/declarations/components/velvet-switch.d.ts.map +1 -0
  56. package/declarations/components/velvet-tag.d.ts +15 -0
  57. package/declarations/components/velvet-tag.d.ts.map +1 -0
  58. package/declarations/components/velvet-textarea.d.ts +19 -0
  59. package/declarations/components/velvet-textarea.d.ts.map +1 -0
  60. package/declarations/components/velvet-tooltip/content.d.ts +16 -0
  61. package/declarations/components/velvet-tooltip/content.d.ts.map +1 -0
  62. package/declarations/components/velvet-tooltip.d.ts +59 -0
  63. package/declarations/components/velvet-tooltip.d.ts.map +1 -0
  64. package/declarations/index.d.ts +1 -0
  65. package/declarations/index.d.ts.map +1 -0
  66. package/declarations/modifiers/velvet-auto-animate.d.ts +9 -0
  67. package/declarations/modifiers/velvet-auto-animate.d.ts.map +1 -0
  68. package/declarations/template-registry.d.ts +92 -0
  69. package/declarations/template-registry.d.ts.map +1 -0
  70. package/declarations/test-support/index.d.ts +8 -0
  71. package/declarations/test-support/index.d.ts.map +1 -0
  72. package/dist/-private/helpers/cn.js +6 -0
  73. package/dist/-private/helpers/cn.js.map +1 -0
  74. package/dist/_app_/components/velvet-alert.js +1 -0
  75. package/dist/_app_/components/velvet-avatar.js +1 -0
  76. package/dist/_app_/components/velvet-button.js +1 -0
  77. package/dist/_app_/components/velvet-checkbox-group.js +1 -0
  78. package/dist/_app_/components/velvet-checkbox.js +1 -0
  79. package/dist/_app_/components/velvet-disclosure.js +1 -0
  80. package/dist/_app_/components/velvet-dropdown/content.js +1 -0
  81. package/dist/_app_/components/velvet-dropdown.js +1 -0
  82. package/dist/_app_/components/velvet-icon/chevron-down.js +1 -0
  83. package/dist/_app_/components/velvet-icon/circle-check-solid.js +1 -0
  84. package/dist/_app_/components/velvet-icon/circle-exclamation-solid.js +1 -0
  85. package/dist/_app_/components/velvet-icon/circle-info-solid.js +1 -0
  86. package/dist/_app_/components/velvet-icon/user.js +1 -0
  87. package/dist/_app_/components/velvet-icon/x-mark.js +1 -0
  88. package/dist/_app_/components/velvet-icon-button.js +1 -0
  89. package/dist/_app_/components/velvet-icon-link.js +1 -0
  90. package/dist/_app_/components/velvet-input.js +1 -0
  91. package/dist/_app_/components/velvet-link.js +1 -0
  92. package/dist/_app_/components/velvet-progress.js +1 -0
  93. package/dist/_app_/components/velvet-radio-group.js +1 -0
  94. package/dist/_app_/components/velvet-radio.js +1 -0
  95. package/dist/_app_/components/velvet-select/option.js +1 -0
  96. package/dist/_app_/components/velvet-select.js +1 -0
  97. package/dist/_app_/components/velvet-spinner.js +1 -0
  98. package/dist/_app_/components/velvet-switch.js +1 -0
  99. package/dist/_app_/components/velvet-tag.js +1 -0
  100. package/dist/_app_/components/velvet-textarea.js +1 -0
  101. package/dist/_app_/components/velvet-tooltip/content.js +1 -0
  102. package/dist/_app_/components/velvet-tooltip.js +1 -0
  103. package/dist/_app_/modifiers/velvet-auto-animate.js +1 -0
  104. package/dist/components/velvet-alert.js +40 -0
  105. package/dist/components/velvet-alert.js.map +1 -0
  106. package/dist/components/velvet-avatar.js +27 -0
  107. package/dist/components/velvet-avatar.js.map +1 -0
  108. package/dist/components/velvet-button.js +41 -0
  109. package/dist/components/velvet-button.js.map +1 -0
  110. package/dist/components/velvet-checkbox-group.js +27 -0
  111. package/dist/components/velvet-checkbox-group.js.map +1 -0
  112. package/dist/components/velvet-checkbox.js +74 -0
  113. package/dist/components/velvet-checkbox.js.map +1 -0
  114. package/dist/components/velvet-disclosure.js +48 -0
  115. package/dist/components/velvet-disclosure.js.map +1 -0
  116. package/dist/components/velvet-dropdown/content.js +10 -0
  117. package/dist/components/velvet-dropdown/content.js.map +1 -0
  118. package/dist/components/velvet-dropdown.js +116 -0
  119. package/dist/components/velvet-dropdown.js.map +1 -0
  120. package/dist/components/velvet-icon/chevron-down.js +10 -0
  121. package/dist/components/velvet-icon/chevron-down.js.map +1 -0
  122. package/dist/components/velvet-icon/circle-check-solid.js +10 -0
  123. package/dist/components/velvet-icon/circle-check-solid.js.map +1 -0
  124. package/dist/components/velvet-icon/circle-exclamation-solid.js +10 -0
  125. package/dist/components/velvet-icon/circle-exclamation-solid.js.map +1 -0
  126. package/dist/components/velvet-icon/circle-info-solid.js +10 -0
  127. package/dist/components/velvet-icon/circle-info-solid.js.map +1 -0
  128. package/dist/components/velvet-icon/user.js +10 -0
  129. package/dist/components/velvet-icon/user.js.map +1 -0
  130. package/dist/components/velvet-icon/x-mark.js +10 -0
  131. package/dist/components/velvet-icon/x-mark.js.map +1 -0
  132. package/dist/components/velvet-icon-button.js +41 -0
  133. package/dist/components/velvet-icon-button.js.map +1 -0
  134. package/dist/components/velvet-icon-link.js +40 -0
  135. package/dist/components/velvet-icon-link.js.map +1 -0
  136. package/dist/components/velvet-input.js +44 -0
  137. package/dist/components/velvet-input.js.map +1 -0
  138. package/dist/components/velvet-link.js +40 -0
  139. package/dist/components/velvet-link.js.map +1 -0
  140. package/dist/components/velvet-progress.js +42 -0
  141. package/dist/components/velvet-progress.js.map +1 -0
  142. package/dist/components/velvet-radio-group.js +27 -0
  143. package/dist/components/velvet-radio-group.js.map +1 -0
  144. package/dist/components/velvet-radio.js +55 -0
  145. package/dist/components/velvet-radio.js.map +1 -0
  146. package/dist/components/velvet-select/option.js +27 -0
  147. package/dist/components/velvet-select/option.js.map +1 -0
  148. package/dist/components/velvet-select.js +50 -0
  149. package/dist/components/velvet-select.js.map +1 -0
  150. package/dist/components/velvet-spinner.js +18 -0
  151. package/dist/components/velvet-spinner.js.map +1 -0
  152. package/dist/components/velvet-switch.js +34 -0
  153. package/dist/components/velvet-switch.js.map +1 -0
  154. package/dist/components/velvet-tag.js +18 -0
  155. package/dist/components/velvet-tag.js.map +1 -0
  156. package/dist/components/velvet-textarea.js +44 -0
  157. package/dist/components/velvet-textarea.js.map +1 -0
  158. package/dist/components/velvet-tooltip/content.js +10 -0
  159. package/dist/components/velvet-tooltip/content.js.map +1 -0
  160. package/dist/components/velvet-tooltip.js +111 -0
  161. package/dist/components/velvet-tooltip.js.map +1 -0
  162. package/dist/index.js +2 -0
  163. package/dist/index.js.map +1 -0
  164. package/dist/modifiers/velvet-auto-animate.js +12 -0
  165. package/dist/modifiers/velvet-auto-animate.js.map +1 -0
  166. package/dist/template-registry.js +2 -0
  167. package/dist/template-registry.js.map +1 -0
  168. package/dist/test-support/index.js +21 -0
  169. package/dist/test-support/index.js.map +1 -0
  170. package/package.json +177 -0
  171. package/tailwind/components/alert.cjs +23 -0
  172. package/tailwind/components/avatar.cjs +32 -0
  173. package/tailwind/components/button.cjs +45 -0
  174. package/tailwind/components/checkbox.cjs +47 -0
  175. package/tailwind/components/disclosure.cjs +11 -0
  176. package/tailwind/components/dropdown.cjs +7 -0
  177. package/tailwind/components/icon-button.cjs +41 -0
  178. package/tailwind/components/icon-link.cjs +33 -0
  179. package/tailwind/components/input.cjs +31 -0
  180. package/tailwind/components/link.cjs +33 -0
  181. package/tailwind/components/progress.cjs +23 -0
  182. package/tailwind/components/radio.cjs +47 -0
  183. package/tailwind/components/select.cjs +34 -0
  184. package/tailwind/components/spinner.cjs +31 -0
  185. package/tailwind/components/switch.cjs +71 -0
  186. package/tailwind/components/tag.cjs +25 -0
  187. package/tailwind/components/textarea.cjs +27 -0
  188. package/tailwind/components/tooltip.cjs +9 -0
  189. package/tailwind/content.cjs +8 -0
  190. package/tailwind/index.cjs +6 -0
  191. package/tailwind/plugin.cjs +66 -0
  192. package/tailwind/utilities/outline.cjs +10 -0
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-button': {
5
+ '@apply border border-transparent font-medium': {},
6
+ '@apply flex items-center justify-center': {},
7
+ '@apply rounded-md text-sm transition': {},
8
+
9
+ '&:focus-visible': {
10
+ '@apply velvet-outline': {},
11
+ },
12
+
13
+ '&:disabled': {
14
+ '@apply cursor-not-allowed': {},
15
+ },
16
+
17
+ '&-xs': {
18
+ '@apply h-7 px-2': {},
19
+ },
20
+
21
+ '&-sm': {
22
+ '@apply h-8 px-3': {},
23
+ },
24
+
25
+ '&-md': {
26
+ '@apply h-9 px-4': {},
27
+ },
28
+
29
+ '&-lg': {
30
+ '@apply h-10 px-6': {},
31
+ },
32
+
33
+ '&-pill': {
34
+ '@apply rounded-full': {},
35
+ },
36
+
37
+ '&-disclosure-icon': {
38
+ '@apply ml-2 size-4': {},
39
+ },
40
+
41
+ '.velvet-spinner': {
42
+ '@apply mr-2': {},
43
+ },
44
+ },
45
+ });
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-checkbox': {
5
+ '@apply flex items-center w-fit': {},
6
+
7
+ '&-sm': {
8
+ '@apply text-xs': {},
9
+
10
+ '.velvet-checkbox-input': {
11
+ '@apply mr-2 size-4': {},
12
+ },
13
+ },
14
+
15
+ '&-md': {
16
+ '@apply text-sm': {},
17
+
18
+ '.velvet-checkbox-input': {
19
+ '@apply mr-3 size-5': {},
20
+ },
21
+ },
22
+
23
+ '&-lg': {
24
+ '@apply text-base': {},
25
+
26
+ '.velvet-checkbox-input': {
27
+ '@apply mr-4 size-6': {},
28
+ },
29
+ },
30
+
31
+ '&-disabled': {
32
+ '@apply cursor-not-allowed': {},
33
+ },
34
+
35
+ '&-input': {
36
+ '@apply border-2 rounded transition': {},
37
+
38
+ '&:focus': {
39
+ '@apply ring-0 ring-offset-0 velvet-outline': {},
40
+ },
41
+
42
+ '&:disabled': {
43
+ '@apply cursor-not-allowed': {},
44
+ },
45
+ },
46
+ },
47
+ });
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-disclosure': {
5
+ '@apply overflow-hidden': {},
6
+
7
+ '&:focus-within': {
8
+ '@apply overflow-visible': {},
9
+ },
10
+ },
11
+ });
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-dropdown': {
5
+ '&-content': {},
6
+ },
7
+ });
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-icon-button': {
5
+ '@apply border border-transparent': {},
6
+ '@apply flex items-center justify-center shrink-0': {},
7
+ '@apply rounded-md transition': {},
8
+
9
+ '&:focus-visible': {
10
+ '@apply velvet-outline': {},
11
+ },
12
+
13
+ '&:disabled': {
14
+ '@apply cursor-not-allowed': {},
15
+ },
16
+
17
+ '&-xs': {
18
+ '@apply size-7': {},
19
+ },
20
+
21
+ '&-sm': {
22
+ '@apply size-8': {},
23
+ },
24
+
25
+ '&-md': {
26
+ '@apply size-9': {},
27
+ },
28
+
29
+ '&-lg': {
30
+ '@apply size-10': {},
31
+ },
32
+
33
+ '&-round': {
34
+ '@apply rounded-full': {},
35
+ },
36
+
37
+ '&-disclosure-icon': {
38
+ '@apply size-4': {},
39
+ },
40
+ },
41
+ });
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-icon-link': {
5
+ '@apply border border-transparent': {},
6
+ '@apply flex items-center justify-center shrink-0': {},
7
+ '@apply rounded-md transition': {},
8
+
9
+ '&:focus-visible': {
10
+ '@apply velvet-outline': {},
11
+ },
12
+
13
+ '&-xs': {
14
+ '@apply size-7': {},
15
+ },
16
+
17
+ '&-sm': {
18
+ '@apply size-8': {},
19
+ },
20
+
21
+ '&-md': {
22
+ '@apply size-9': {},
23
+ },
24
+
25
+ '&-lg': {
26
+ '@apply size-10': {},
27
+ },
28
+
29
+ '&-round': {
30
+ '@apply rounded-full': {},
31
+ },
32
+ },
33
+ });
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-input': {
5
+ '@apply py-0 rounded-md text-sm transition w-full': {},
6
+
7
+ '&:focus': {
8
+ '@apply ring-0 velvet-outline-offset-0': {},
9
+ },
10
+
11
+ '&:disabled': {
12
+ '@apply cursor-not-allowed': {},
13
+ },
14
+
15
+ '&-sm': {
16
+ '@apply h-8 px-2': {},
17
+ },
18
+
19
+ '&-md': {
20
+ '@apply h-9 px-3': {},
21
+ },
22
+
23
+ '&-lg': {
24
+ '@apply h-10 px-4': {},
25
+ },
26
+
27
+ '&-pill': {
28
+ '@apply rounded-full': {},
29
+ },
30
+ },
31
+ });
@@ -0,0 +1,33 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
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': {},
8
+
9
+ '&:focus-visible': {
10
+ '@apply velvet-outline': {},
11
+ },
12
+
13
+ '&-xs': {
14
+ '@apply h-7 px-2': {},
15
+ },
16
+
17
+ '&-sm': {
18
+ '@apply h-8 px-3': {},
19
+ },
20
+
21
+ '&-md': {
22
+ '@apply h-9 px-4': {},
23
+ },
24
+
25
+ '&-lg': {
26
+ '@apply h-10 px-6': {},
27
+ },
28
+
29
+ '&-pill': {
30
+ '@apply rounded-full': {},
31
+ },
32
+ },
33
+ });
@@ -0,0 +1,23 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-progress': {
5
+ '@apply overflow-hidden rounded-full w-full': {},
6
+
7
+ '&-sm': {
8
+ '@apply h-1': {},
9
+ },
10
+
11
+ '&-md': {
12
+ '@apply h-2': {},
13
+ },
14
+
15
+ '&-lg': {
16
+ '@apply h-3': {},
17
+ },
18
+
19
+ '&-line': {
20
+ '@apply h-full rounded-full transition-all': {},
21
+ },
22
+ },
23
+ });
@@ -0,0 +1,47 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-radio': {
5
+ '@apply flex items-center w-fit': {},
6
+
7
+ '&-sm': {
8
+ '@apply text-xs': {},
9
+
10
+ '.velvet-radio-input': {
11
+ '@apply mr-2 size-4': {},
12
+ },
13
+ },
14
+
15
+ '&-md': {
16
+ '@apply text-sm': {},
17
+
18
+ '.velvet-radio-input': {
19
+ '@apply mr-3 size-5': {},
20
+ },
21
+ },
22
+
23
+ '&-lg': {
24
+ '@apply text-base': {},
25
+
26
+ '.velvet-radio-input': {
27
+ '@apply mr-4 size-6': {},
28
+ },
29
+ },
30
+
31
+ '&-disabled': {
32
+ '@apply cursor-not-allowed': {},
33
+ },
34
+
35
+ '&-input': {
36
+ '@apply border-2 transition': {},
37
+
38
+ '&:focus': {
39
+ '@apply ring-0 ring-offset-0 velvet-outline': {},
40
+ },
41
+
42
+ '&:disabled': {
43
+ '@apply cursor-not-allowed': {},
44
+ },
45
+ },
46
+ },
47
+ });
@@ -0,0 +1,34 @@
1
+ 'use strict';
2
+
3
+ module.exports = ({ theme }) => ({
4
+ '.velvet-select': {
5
+ '@apply py-0 rounded-md text-sm transition w-full': {},
6
+
7
+ '&:focus': {
8
+ '@apply ring-0 velvet-outline-offset-0': {},
9
+ },
10
+
11
+ '&:disabled': {
12
+ '@apply cursor-not-allowed opacity-100': {},
13
+ },
14
+
15
+ '&-sm': {
16
+ '@apply h-8 pl-2 pr-8': {},
17
+ [`@apply bg-[right_${theme('spacing.1')}_center]`]: {},
18
+ },
19
+
20
+ '&-md': {
21
+ '@apply h-9 pl-3 pr-10': {},
22
+ [`@apply bg-[right_${theme('spacing.2')}_center]`]: {},
23
+ },
24
+
25
+ '&-lg': {
26
+ '@apply h-10 pl-4 pr-12': {},
27
+ [`@apply bg-[right_${theme('spacing.3')}_center]`]: {},
28
+ },
29
+
30
+ '&-pill': {
31
+ '@apply rounded-full': {},
32
+ },
33
+ },
34
+ });
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-spinner': {
5
+ '@apply animate-spin shrink-0': {},
6
+
7
+ '&-xs': {
8
+ '@apply size-3': {},
9
+ },
10
+
11
+ '&-sm': {
12
+ '@apply size-4': {},
13
+ },
14
+
15
+ '&-md': {
16
+ '@apply size-5': {},
17
+ },
18
+
19
+ '&-lg': {
20
+ '@apply size-6': {},
21
+ },
22
+
23
+ '&-xl': {
24
+ '@apply size-7': {},
25
+ },
26
+
27
+ '&-track': {
28
+ '@apply opacity-20': {},
29
+ },
30
+ },
31
+ });
@@ -0,0 +1,71 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-switch': {
5
+ '@apply flex items-center w-fit': {},
6
+
7
+ '&-right': {
8
+ '@apply flex-row-reverse': {},
9
+ },
10
+
11
+ '&-sm': {
12
+ '@apply gap-2 text-xs': {},
13
+
14
+ '.velvet-switch-track': {
15
+ '@apply h-4 w-7': {},
16
+ },
17
+
18
+ '.velvet-switch-handle': {
19
+ '@apply size-3': {},
20
+ },
21
+ },
22
+
23
+ '&-md': {
24
+ '@apply gap-3 text-sm': {},
25
+
26
+ '.velvet-switch-track': {
27
+ '@apply h-5 w-9': {},
28
+ },
29
+
30
+ '.velvet-switch-handle': {
31
+ '@apply size-4': {},
32
+ },
33
+ },
34
+
35
+ '&-lg': {
36
+ '@apply gap-4 text-base': {},
37
+
38
+ '.velvet-switch-track': {
39
+ '@apply h-6 w-11': {},
40
+ },
41
+
42
+ '.velvet-switch-handle': {
43
+ '@apply size-5': {},
44
+ },
45
+ },
46
+
47
+ '&-disabled': {
48
+ '@apply cursor-not-allowed': {},
49
+ },
50
+
51
+ '&-input': {
52
+ '@apply sr-only': {},
53
+
54
+ '&:focus-visible + .velvet-switch-track': {
55
+ '@apply velvet-outline': {},
56
+ },
57
+
58
+ '&:checked + .velvet-switch-track .velvet-switch-handle': {
59
+ '@apply translate-x-full': {},
60
+ },
61
+ },
62
+
63
+ '.velvet-switch-track': {
64
+ '@apply p-0.5 rounded-full transition-colors': {},
65
+ },
66
+
67
+ '.velvet-switch-handle': {
68
+ '@apply rounded-full transition-transform': {},
69
+ },
70
+ },
71
+ });
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-tag': {
5
+ '@apply border border-transparent font-medium': {},
6
+ '@apply flex items-center justify-center': {},
7
+ '@apply rounded text-sm w-fit': {},
8
+
9
+ '&-sm': {
10
+ '@apply h-5 px-1 text-xs': {},
11
+ },
12
+
13
+ '&-md': {
14
+ '@apply h-6 px-2': {},
15
+ },
16
+
17
+ '&-lg': {
18
+ '@apply h-7 px-3': {},
19
+ },
20
+
21
+ '&-pill': {
22
+ '@apply rounded-full': {},
23
+ },
24
+ },
25
+ });
@@ -0,0 +1,27 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-textarea': {
5
+ '@apply rounded-md text-sm transition w-full': {},
6
+
7
+ '&:focus': {
8
+ '@apply ring-0 velvet-outline-offset-0': {},
9
+ },
10
+
11
+ '&:disabled': {
12
+ '@apply cursor-not-allowed': {},
13
+ },
14
+
15
+ '&-sm': {
16
+ '@apply h-16 px-2 py-1': {},
17
+ },
18
+
19
+ '&-md': {
20
+ '@apply h-24 px-3 py-2': {},
21
+ },
22
+
23
+ '&-lg': {
24
+ '@apply h-32 px-4 py-3': {},
25
+ },
26
+ },
27
+ });
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ module.exports = () => ({
4
+ '.velvet-tooltip': {
5
+ '&-content': {
6
+ '@apply text-sm': {},
7
+ },
8
+ },
9
+ });
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ const { join } = require('node:path');
4
+
5
+ const CONTENT_PATHS = ['dist/components/**/*.js'];
6
+ const ROOT_PATH = join(__dirname, '..');
7
+
8
+ module.exports = () => CONTENT_PATHS.map((path) => join(ROOT_PATH, path));
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ content: require('./content.cjs'),
5
+ plugin: require('./plugin.cjs'),
6
+ };
@@ -0,0 +1,66 @@
1
+ 'use strict';
2
+
3
+ const tailwindPlugin = require('tailwindcss/plugin');
4
+
5
+ const COMPONENTS = {
6
+ alert: require('./components/alert.cjs'),
7
+ avatar: require('./components/avatar.cjs'),
8
+ button: require('./components/button.cjs'),
9
+ checkbox: require('./components/checkbox.cjs'),
10
+ disclosure: require('./components/disclosure.cjs'),
11
+ dropdown: require('./components/dropdown.cjs'),
12
+ iconButton: require('./components/icon-button.cjs'),
13
+ iconLink: require('./components/icon-link.cjs'),
14
+ input: require('./components/input.cjs'),
15
+ link: require('./components/link.cjs'),
16
+ progress: require('./components/progress.cjs'),
17
+ radio: require('./components/radio.cjs'),
18
+ select: require('./components/select.cjs'),
19
+ spinner: require('./components/spinner.cjs'),
20
+ switch: require('./components/switch.cjs'),
21
+ tag: require('./components/tag.cjs'),
22
+ textarea: require('./components/textarea.cjs'),
23
+ tooltip: require('./components/tooltip.cjs'),
24
+ };
25
+
26
+ const UTILITIES = {
27
+ ...require('./utilities/outline.cjs'),
28
+ };
29
+
30
+ const DEFAULT_OPTIONS = {
31
+ components: {},
32
+ };
33
+
34
+ module.exports = tailwindPlugin.withOptions(
35
+ (providedOptions) => {
36
+ const options = {
37
+ ...DEFAULT_OPTIONS,
38
+ ...providedOptions,
39
+ };
40
+
41
+ const components = Object.keys(COMPONENTS).filter((component) => {
42
+ return options.components[component] !== false;
43
+ });
44
+
45
+ return ({ addComponents, addUtilities, config, theme }) => {
46
+ addComponents(
47
+ components.map((component) =>
48
+ COMPONENTS[component]({
49
+ config,
50
+ options: options.components[component],
51
+ theme,
52
+ }),
53
+ ),
54
+ );
55
+
56
+ addUtilities(UTILITIES);
57
+ };
58
+ },
59
+ () => ({
60
+ safelist: [
61
+ {
62
+ pattern: /^velvet-/,
63
+ },
64
+ ],
65
+ }),
66
+ );
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ module.exports = {
4
+ '.velvet-outline': {
5
+ '@apply outline outline-2 outline-offset-1': {},
6
+ },
7
+ '.velvet-outline-offset-0': {
8
+ '@apply outline outline-2 outline-offset-0': {},
9
+ },
10
+ };