@cwcss/crosswind 0.2.2 → 0.2.3

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.
@@ -0,0 +1,223 @@
1
+ // @bun
2
+ import{A as Kx,B as Ox,C as Qx,D as Rx,E as Ux,F as Q,G as Vx,H as Wx,I as Xx,J as Yx,K as Zx,L as R,M as _x,N as $x,O as U,P as jx,Q as kx,a as T,b as y,c as S,d as O,e as h,f as u,g as f,h as C,i as c,j as p,k as g,l as d,m as a,n as l,o as e,p as t,q as n,r as s,s as i,t as o,u as xx,v as mx,w as qx,x as Bx,y as Dx,z as Jx}from"../chunk-3frpk224.js";function v(x={}){return{name:"bun-plugin-crosswind",async setup(V){let m=await R({name:"crosswind",defaultConfig:U}),q={...m,...x.config,theme:{...m.theme,...x.config?.theme},shortcuts:{...m.shortcuts,...x.config?.shortcuts},rules:[...m.rules||[],...x.config?.rules||[]],variants:{...m.variants,...x.config?.variants},safelist:[...m.safelist||[],...x.config?.safelist||[]],blocklist:[...m.blocklist||[],...x.config?.blocklist||[]],preflights:[...m.preflights||[],...x.config?.preflights||[]],presets:[...m.presets||[],...x.config?.presets||[]]},W=x.includePreflight??!0;V.onLoad({filter:/\.html?$/},async({path:X})=>{let D=await Bun.file(X).text(),J=O(D);for(let B of q.safelist)J.add(B);let K=new Q(q);for(let B of J)K.generate(B);let Y=K.toCSS(W,q.minify);return{contents:D.replace("</head>",`<style>${Y}</style>
3
+ </head>`),loader:"text"}})}}}var A={getCSS:()=>`
4
+ /* Tailwind Forms */
5
+
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
+ textarea,
19
+ select {
20
+ appearance: none;
21
+ background-color: #fff;
22
+ border-color: #6b7280;
23
+ border-width: 1px;
24
+ border-radius: 0px;
25
+ padding-top: 0.5rem;
26
+ padding-right: 0.75rem;
27
+ padding-bottom: 0.5rem;
28
+ padding-left: 0.75rem;
29
+ font-size: 1rem;
30
+ line-height: 1.5rem;
31
+ --hw-shadow: 0 0 #0000;
32
+ }
33
+
34
+ [type='text']:focus,
35
+ [type='email']:focus,
36
+ [type='url']:focus,
37
+ [type='password']:focus,
38
+ [type='number']:focus,
39
+ [type='date']:focus,
40
+ [type='datetime-local']:focus,
41
+ [type='month']:focus,
42
+ [type='search']:focus,
43
+ [type='tel']:focus,
44
+ [type='time']:focus,
45
+ [type='week']:focus,
46
+ textarea:focus,
47
+ select:focus {
48
+ outline: 2px solid transparent;
49
+ outline-offset: 2px;
50
+ --hw-ring-inset: var(--hw-empty,/*!*/ /*!*/);
51
+ --hw-ring-offset-width: 0px;
52
+ --hw-ring-offset-color: #fff;
53
+ --hw-ring-color: #2563eb;
54
+ --hw-ring-offset-shadow: var(--hw-ring-inset) 0 0 0 var(--hw-ring-offset-width) var(--hw-ring-offset-color);
55
+ --hw-ring-shadow: var(--hw-ring-inset) 0 0 0 calc(1px + var(--hw-ring-offset-width)) var(--hw-ring-color);
56
+ box-shadow: var(--hw-ring-offset-shadow), var(--hw-ring-shadow), var(--hw-shadow);
57
+ border-color: #2563eb;
58
+ }
59
+
60
+ input::placeholder,
61
+ textarea::placeholder {
62
+ color: #6b7280;
63
+ opacity: 1;
64
+ }
65
+
66
+ ::-webkit-datetime-edit-fields-wrapper {
67
+ padding: 0;
68
+ }
69
+
70
+ ::-webkit-date-and-time-value {
71
+ min-height: 1.5em;
72
+ text-align: inherit;
73
+ }
74
+
75
+ ::-webkit-datetime-edit {
76
+ display: inline-flex;
77
+ }
78
+
79
+ ::-webkit-datetime-edit,
80
+ ::-webkit-datetime-edit-year-field,
81
+ ::-webkit-datetime-edit-month-field,
82
+ ::-webkit-datetime-edit-day-field,
83
+ ::-webkit-datetime-edit-hour-field,
84
+ ::-webkit-datetime-edit-minute-field,
85
+ ::-webkit-datetime-edit-second-field,
86
+ ::-webkit-datetime-edit-millisecond-field,
87
+ ::-webkit-datetime-edit-meridiem-field {
88
+ padding-top: 0;
89
+ padding-bottom: 0;
90
+ }
91
+
92
+ select {
93
+ 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='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
94
+ background-position: right 0.5rem center;
95
+ background-repeat: no-repeat;
96
+ background-size: 1.5em 1.5em;
97
+ padding-right: 2.5rem;
98
+ print-color-adjust: exact;
99
+ }
100
+
101
+ select[multiple],
102
+ select[size]:where([size]:not([size="1"])) {
103
+ background-image: initial;
104
+ background-position: initial;
105
+ background-repeat: unset;
106
+ background-size: initial;
107
+ padding-right: 0.75rem;
108
+ print-color-adjust: unset;
109
+ }
110
+
111
+ [type='checkbox'],
112
+ [type='radio'] {
113
+ appearance: none;
114
+ padding: 0;
115
+ print-color-adjust: exact;
116
+ display: inline-block;
117
+ vertical-align: middle;
118
+ background-origin: border-box;
119
+ user-select: none;
120
+ flex-shrink: 0;
121
+ height: 1rem;
122
+ width: 1rem;
123
+ color: #2563eb;
124
+ background-color: #fff;
125
+ border-color: #6b7280;
126
+ border-width: 1px;
127
+ --hw-shadow: 0 0 #0000;
128
+ }
129
+
130
+ [type='checkbox'] {
131
+ border-radius: 0px;
132
+ }
133
+
134
+ [type='radio'] {
135
+ border-radius: 100%;
136
+ }
137
+
138
+ [type='checkbox']:focus,
139
+ [type='radio']:focus {
140
+ outline: 2px solid transparent;
141
+ outline-offset: 2px;
142
+ --hw-ring-inset: var(--hw-empty,/*!*/ /*!*/);
143
+ --hw-ring-offset-width: 2px;
144
+ --hw-ring-offset-color: #fff;
145
+ --hw-ring-color: #2563eb;
146
+ --hw-ring-offset-shadow: var(--hw-ring-inset) 0 0 0 var(--hw-ring-offset-width) var(--hw-ring-offset-color);
147
+ --hw-ring-shadow: var(--hw-ring-inset) 0 0 0 calc(2px + var(--hw-ring-offset-width)) var(--hw-ring-color);
148
+ box-shadow: var(--hw-ring-offset-shadow), var(--hw-ring-shadow), var(--hw-shadow);
149
+ }
150
+
151
+ [type='checkbox']:checked,
152
+ [type='radio']:checked {
153
+ border-color: transparent;
154
+ background-color: currentColor;
155
+ background-size: 100% 100%;
156
+ background-position: center;
157
+ background-repeat: no-repeat;
158
+ }
159
+
160
+ [type='checkbox']:checked {
161
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
162
+ }
163
+
164
+ @media (forced-colors: active) {
165
+ [type='checkbox']:checked {
166
+ appearance: auto;
167
+ }
168
+ }
169
+
170
+ [type='radio']:checked {
171
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
172
+ }
173
+
174
+ @media (forced-colors: active) {
175
+ [type='radio']:checked {
176
+ appearance: auto;
177
+ }
178
+ }
179
+
180
+ [type='checkbox']:checked:hover,
181
+ [type='checkbox']:checked:focus,
182
+ [type='radio']:checked:hover,
183
+ [type='radio']:checked:focus {
184
+ border-color: transparent;
185
+ background-color: currentColor;
186
+ }
187
+
188
+ [type='checkbox']:indeterminate {
189
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
190
+ border-color: transparent;
191
+ background-color: currentColor;
192
+ background-size: 100% 100%;
193
+ background-position: center;
194
+ background-repeat: no-repeat;
195
+ }
196
+
197
+ @media (forced-colors: active) {
198
+ [type='checkbox']:indeterminate {
199
+ appearance: auto;
200
+ }
201
+ }
202
+
203
+ [type='checkbox']:indeterminate:hover,
204
+ [type='checkbox']:indeterminate:focus {
205
+ border-color: transparent;
206
+ background-color: currentColor;
207
+ }
208
+
209
+ [type='file'] {
210
+ background: unset;
211
+ border-color: inherit;
212
+ border-width: 0;
213
+ border-radius: 0;
214
+ padding: 0;
215
+ font-size: unset;
216
+ line-height: inherit;
217
+ }
218
+
219
+ [type='file']:focus {
220
+ outline: 1px solid ButtonText;
221
+ outline: 1px auto -webkit-focus-ring-color;
222
+ }
223
+ `};export{Yx as writeTransformedFiles,Xx as writeCSS,Kx as textAlignRule,$x as tailwindPreflight,A as tailwindFormsPreflight,s as spacingRule,i as sizingRule,u as scrollbarRule,mx as resolveColorValue,v as plugin,qx as placeholderColorRule,S as parseClass,_x as modernNormalize,Jx as leadingRule,t as justifyItemsRule,l as justifyContentRule,jx as getConfig,Dx as fontWeightRule,Bx as fontSizeRule,p as flexWrapRule,a as flexShrinkRule,g as flexRule,d as flexGrowRule,c as flexDirectionRule,O as extractClasses,y as extractAttributifyClasses,T as expandBracketSyntax,h as displayRule,U as defaultConfig,f as contentPropertyRule,C as containerRule,kx as config,o as colorRule,Ux as builtInRules,Zx as buildAndWrite,Wx as build,Ox as borderWidthRule,Qx as borderSideWidthRule,Rx as borderRadiusRule,xx as applyOpacity,e as alignItemsRule,n as alignContentRule,Vx as Scanner,Q as CSSGenerator};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cwcss/crosswind",
3
3
  "type": "module",
4
- "version": "0.2.2",
4
+ "version": "0.2.3",
5
5
  "description": "A performant Utility-First CSS framework. Similar to Tailwind or UnoCSS.",
6
6
  "author": "Chris Breuer <chris@stacksjs.org>",
7
7
  "license": "MIT",
package/dist/cli.d.ts DELETED
@@ -1 +0,0 @@
1
-