@jdlien/validator 1.0.4 → 1.0.5

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/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "tabWidth": 2,
3
+ "useTabs": false,
4
+ "trailingComma": "es5",
5
+ "semi": false,
6
+ "singleQuote": true,
7
+ "printWidth": 100
8
+ }
package/README.md CHANGED
@@ -292,7 +292,7 @@ Install dev dependencies:
292
292
  npm install
293
293
  ```
294
294
 
295
- When running Vite you may get an error like
295
+ When running Vite, you may get an error like
296
296
 
297
297
  ```
298
298
  Module did not self-register: '...\node_modules\canvas\build\Release\canvas.node'
package/demo-src.css ADDED
@@ -0,0 +1,106 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ @layer base {
6
+ [type='text'],
7
+ [type='email'],
8
+ [type='url'],
9
+ [type='password'],
10
+ [type='number'],
11
+ [type='date'],
12
+ [type='datetime-local'],
13
+ [type='month'],
14
+ [type='search'],
15
+ [type='tel'],
16
+ [type='time'],
17
+ [type='week'],
18
+ [type='color'],
19
+ [multiple],
20
+ textarea,
21
+ select {
22
+ @apply border border-zinc-300 rounded bg-zinc-50 px-2 py-1.5 text-zinc-700
23
+ placeholder-zinc-500 placeholder-opacity-50 shadow-inner
24
+ focus:bg-white focus:outline-none focus:ring-2 focus:ring-blue-400/50
25
+ focus:ring-offset-0 focus:ring-offset-transparent;
26
+
27
+ @apply dark:border-zinc-500 dark:bg-zinc-900 dark:text-white dark:focus:bg-zinc-800;
28
+
29
+ @apply disabled:bg-zinc-200 disabled:text-zinc-500 dark:disabled:bg-zinc-800 dark:disabled:text-zinc-300;
30
+ }
31
+
32
+ /* Form input variants (do not apply when disabled) */
33
+ [type='text']:not([disabled]),
34
+ [type='email']:not([disabled]),
35
+ [type='url']:not([disabled]),
36
+ [type='password']:not([disabled]),
37
+ [type='number']:not([disabled]),
38
+ [type='date']:not([disabled]),
39
+ [type='datetime-local']:not([disabled]),
40
+ [type='month']:not([disabled]),
41
+ [type='search']:not([disabled]),
42
+ [type='tel']:not([disabled]),
43
+ [type='time']:not([disabled]),
44
+ [type='week']:not([disabled]),
45
+ [type='color']:not([disabled]),
46
+ [multiple]:not([disabled]),
47
+ textarea:not([disabled]),
48
+ select:not([disabled]) {
49
+ @apply hover:bg-white dark:hover:bg-zinc-800;
50
+ }
51
+
52
+ [type='checkbox'],
53
+ [type='radio'] {
54
+ @apply border border-zinc-300 bg-zinc-50 text-blue-600 shadow-sm
55
+ checked:border checked:border-zinc-400 checked:bg-blue-600 focus:outline-none
56
+ focus:ring-2 focus:ring-blue-400/50 focus:ring-offset-0 focus:ring-offset-transparent focus:checked:bg-blue-500;
57
+
58
+ @apply dark:border-zinc-500 dark:bg-zinc-400 dark:checked:bg-blue-600 dark:focus:checked:bg-blue-400;
59
+
60
+ @apply disabled:opacity-60 disabled:checked:hover:bg-blue-600;
61
+
62
+ /* Prevents border change when disabled and hovered */
63
+ @apply disabled:checked:hover:border-zinc-400 disabled:dark:checked:bg-blue-600 dark:disabled:checked:hover:border-zinc-500;
64
+ }
65
+
66
+ [type='checkbox']:not([disabled]),
67
+ [type='radio']:not([disabled]) {
68
+ @apply hover:bg-zinc-200 checked:hover:bg-blue-500
69
+ dark:hover:bg-zinc-300 dark:hover:checked:bg-blue-400 dark:hover:focus:checked:bg-blue-400;
70
+ }
71
+
72
+ [type='radio'] {
73
+ @apply rounded-full;
74
+ }
75
+
76
+ select {
77
+ @apply pr-6;
78
+ /* background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='rgb(120 113 108)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important; */
79
+ background-image: url('data:image/svg+xml,%3Csvg xmlns=%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 fill=%22none%22 viewBox=%220 0 24 24%22 stroke-width=%221.5%22 stroke=%22rgb(120 113 108)%22%3E%3Cpath stroke-linecap=%22round%22 stroke-linejoin=%22round%22 d=%22M19.5 8.25l-7.5 7.5-7.5-7.5%22 %2F%3E%3C%2Fsvg%3E') !important;
80
+ background-size: 1.2rem;
81
+ background-position: right 0.1rem center;
82
+ }
83
+ }
84
+
85
+ @layer components {
86
+ .checked-label {
87
+ @apply ml-1.5 mr-1;
88
+ /* no styles are directly applied unless this is used with a checked input */
89
+ }
90
+
91
+ input:checked + .checked-label {
92
+ @apply text-black dark:text-white;
93
+ /* This is only really visible in dark mode, giving the text a subtle glow */
94
+ text-shadow: 0 0 5px hsl(0 0% 100%/25%);
95
+ }
96
+
97
+ /* Apply checked-border to labels for checkboxes and radio buttons for a label that colors up automatically when checked */
98
+ .checked-border {
99
+ @apply inline-flex items-center border border-zinc-300/30 bg-zinc-50 px-1 text-zinc-700 shadow-inner;
100
+ @apply hover:bg-white dark:border-zinc-500/10 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800 dark:focus:bg-zinc-800;
101
+ }
102
+
103
+ .checked-border:has([type='checkbox']:checked, [type='radio']:checked) {
104
+ @apply border-blue-600 text-black hover:border-blue-500 dark:text-white;
105
+ }
106
+ }