@fluixi-css/core 1.0.0-next.1 → 1.0.0-next.2

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 (48) hide show
  1. package/dist/package.json +1 -1
  2. package/dist/reset.css +174 -152
  3. package/dist/src/css-parser.cjs +6 -1
  4. package/dist/src/css-parser.cjs.map +1 -1
  5. package/dist/src/css-parser.js +6 -2
  6. package/dist/src/css-parser.js.map +1 -1
  7. package/dist/src/css-parser.mjs +6 -1
  8. package/dist/src/css-parser.mjs.map +1 -1
  9. package/dist/src/engine/apply.d.ts +2 -0
  10. package/dist/src/engine/apply.js +75 -0
  11. package/dist/src/engine/apply.js.map +1 -0
  12. package/dist/src/engine/ast.js +25 -2
  13. package/dist/src/engine/ast.js.map +1 -1
  14. package/dist/src/engine/compile.js +48 -10
  15. package/dist/src/engine/compile.js.map +1 -1
  16. package/dist/src/engine/directives.js +45 -19
  17. package/dist/src/engine/directives.js.map +1 -1
  18. package/dist/src/engine/index.d.ts +4 -0
  19. package/dist/src/engine/index.js +6 -0
  20. package/dist/src/engine/index.js.map +1 -1
  21. package/dist/src/engine/log.d.ts +6 -0
  22. package/dist/src/engine/log.js +42 -0
  23. package/dist/src/engine/log.js.map +1 -0
  24. package/dist/src/engine/registry.d.ts +5 -4
  25. package/dist/src/engine/registry.js +2 -2
  26. package/dist/src/engine/registry.js.map +1 -1
  27. package/dist/src/engine/transform.d.ts +22 -0
  28. package/dist/src/engine/transform.js +34 -9
  29. package/dist/src/engine/transform.js.map +1 -1
  30. package/dist/src/engine/utilities/backgrounds.js +11 -0
  31. package/dist/src/engine/utilities/backgrounds.js.map +1 -1
  32. package/dist/src/engine/utilities/borders.js +60 -1
  33. package/dist/src/engine/utilities/borders.js.map +1 -1
  34. package/dist/src/engine/utilities/layout.js +25 -0
  35. package/dist/src/engine/utilities/layout.js.map +1 -1
  36. package/dist/src/engine/utilities/spacing.js +25 -1
  37. package/dist/src/engine/utilities/spacing.js.map +1 -1
  38. package/dist/src/engine/utilities/typography.js +7 -0
  39. package/dist/src/engine/utilities/typography.js.map +1 -1
  40. package/dist/src/engine/variants.js +25 -6
  41. package/dist/src/engine/variants.js.map +1 -1
  42. package/dist/src/index.cjs +619 -179
  43. package/dist/src/index.cjs.map +1 -1
  44. package/dist/src/index.mjs +618 -180
  45. package/dist/src/index.mjs.map +1 -1
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +1 -1
  48. package/reset.css +174 -152
package/reset.css CHANGED
@@ -1,177 +1,199 @@
1
- html, :host {
2
- font-family: Inter, sans-serif;
3
- line-height: 1.45;
1
+ /* Baseline preset. It lives in the `flx.base` layer, declared here first so the
2
+ token / component / skin layers — plus any unlayered app CSS and the generated
3
+ utilities — always win. So the reset gives sensible defaults without ever
4
+ overriding @fluixi-ui components (their `:where([data-*])` rules sit in
5
+ `flx.components`) or your own styles. Load this before component CSS. */
6
+ @layer flx.base, flx.tokens, flx.components, flx.skin;
7
+
8
+ @layer flx.base {
9
+ *,
10
+ ::before,
11
+ ::after {
12
+ box-sizing: border-box;
13
+ border: 0 solid;
14
+ }
15
+
16
+ * {
17
+ margin: 0;
18
+ }
19
+
20
+ html,
21
+ :host {
22
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
23
+ line-height: 1.5;
4
24
  tab-size: 4;
5
25
  text-size-adjust: 100%;
6
26
  -webkit-text-size-adjust: 100%;
7
- font-feature-settings: normal;
8
- font-variation-settings: normal;
9
27
  -webkit-tap-highlight-color: transparent;
10
- }
11
-
12
- h1, h2, h3, h4, h5, h6 {
28
+ }
29
+
30
+ h1,
31
+ h2,
32
+ h3,
33
+ h4,
34
+ h5,
35
+ h6 {
13
36
  font-size: inherit;
14
37
  font-weight: inherit;
15
- }
38
+ }
16
39
 
17
- ol, ul {
18
- margin: 0;
19
- padding: 0;
20
- list-style: none;
21
- }
40
+ a {
41
+ color: inherit;
42
+ text-decoration: inherit;
43
+ }
22
44
 
23
- img, video {
24
- vertical-align: middle;
25
- max-width: 100%;
26
- height: auto;
45
+ ol,
46
+ ul,
47
+ menu {
48
+ list-style: none;
49
+ }
50
+
51
+ img,
52
+ svg,
53
+ video,
54
+ canvas,
55
+ audio,
56
+ iframe,
57
+ embed,
58
+ object {
27
59
  display: block;
28
- }
29
-
30
- svg, canvas, audio, iframe, embed, object {
31
60
  vertical-align: middle;
32
- display: block;
33
- }
61
+ }
34
62
 
35
- input {
63
+ img,
64
+ video {
65
+ max-width: 100%;
66
+ height: auto;
67
+ }
68
+
69
+ /* Form controls inherit typography instead of the UA's own. Colour, border and
70
+ sizing are left to @fluixi-ui / utilities (which sit in higher layers). */
71
+ button,
72
+ input,
73
+ select,
74
+ optgroup,
75
+ textarea,
76
+ ::file-selector-button {
36
77
  font: inherit;
37
78
  line-height: inherit;
79
+ letter-spacing: inherit;
38
80
  color: inherit;
39
- }
81
+ }
40
82
 
41
- button, [role="button"] {
42
- font-family: inherit;
43
- font-size: 100%;
44
- line-height: inherit;
45
- appearance: button;
46
- color: inherit;
83
+ button,
84
+ [role='button'] {
47
85
  cursor: pointer;
48
- -webkit-tap-highlight-color: transparent;
49
- background-color: #0000;
50
- padding: 0;
51
- margin: 0;
52
- }
53
-
54
- button, [role="button"]:focus {
55
- outline: 0;
56
- }
86
+ }
57
87
 
58
- a {
59
- cursor: pointer;
60
- color: inherit;
61
- -webkit-text-decoration: inherit;
62
- text-decoration: inherit;
63
- -webkit-tap-highlight-color: transparent;
64
- }
65
-
66
- textarea {
67
- font: inherit;
68
- line-height: inherit;
69
- color: inherit;
70
- appearance: none;
71
- width: 100%;
72
- overflow: auto;
73
- }
74
-
75
- textarea:focus {
76
- outline: 0;
77
- }
78
-
79
- select {
80
- font: inherit;
81
- line-height: inherit;
82
- color: inherit;
83
- -webkit-appearance: none;
84
- -moz-appearance: none;
85
- appearance: none;
86
- }
87
-
88
- select:focus {
89
- outline: 0;
90
- }
91
-
92
- /* [type="date"], [type="datetime"], [type="datetime-local"], [type="email"], [type="password"], [type="month"], [type="number"], [type="text"], [type="search"], [type="tel"], [type="time"], [type="url"], [type="week"], [type="checkbox"], [type="radio"] {
93
- appearance: none;
94
- width: 100%;
95
- } */
96
-
97
- [type="date"]:not(.flx-form-control), [type="datetime"]:not(.flx-form-control), [type="datetime-local"]:not(.flx-form-control), [type="email"]:not(.flx-form-control), [type="password"]:not(.flx-form-control), [type="month"]:not(.flx-form-control), [type="number"]:not(.flx-form-control), [type="text"]:not(.flx-form-control), [type="search"]:not(.flx-form-control), [type="tel"]:not(.flx-form-control), [type="time"]:not(.flx-form-control), [type="url"]:not(.flx-form-control), [type="week"]:not(.flx-form-control), [type="checkbox"]:not(.flx-form-control), [type="radio"]:not(.flx-form-control) {
98
- outline: 0;
99
- }
100
-
101
- * {
102
- margin: 0;
103
- }
88
+ button,
89
+ input:where([type='button'], [type='reset'], [type='submit']),
90
+ ::file-selector-button {
91
+ appearance: button;
92
+ background-color: transparent;
93
+ background-image: none;
94
+ padding: 0;
95
+ }
104
96
 
105
- /* Reset borders */
106
- ::before, ::after, *:where(:not([class*="flx-"], .flx-card, .flx-card-header, .flx-card-body, .flx-card-footer, .flx-dialog, .flx-dialog-header, .flx-dialog-body, .flx-dialog-footer, .flx-dropdown, .flx-dropdown-header, .flx-dropdown-body, .flx-dropdown-footer, .flx-dropdown-item, .flx-list, .flx-list-header, .flx-list-body, .flx-list-footer, .flx-btn, .flx-grid, .flx-grid-cell, .flx-grid-row, .flx-paginator, .flx-alert, .flx-table, input.flx-form-control, .flx-dropdown-menu)) {
107
- /* border-color: #e5e7eb; */
108
- box-sizing: border-box;
109
- border: 0 solid;
110
- }
97
+ textarea {
98
+ resize: vertical;
99
+ }
111
100
 
112
- ::-moz-placeholder {
101
+ ::placeholder {
113
102
  opacity: 1;
114
- }
115
-
116
- *, ::before, ::after, ::backdrop {
117
- --flx-border-spacing-x: 0;
118
- --flx-border-spacing-y: 0;
119
- --flx-translate-x: 0;
120
- --flx-translate-y: 0;
121
- --flx-rotate: 0;
122
- --flx-skew-x: 0;
123
- --flx-skew-y: 0;
124
- --flx-scale-x: 1;
125
- --flx-scale-y: 1;
126
- --flx-pan-x: ;
127
- --flx-pan-y: ;
128
- --flx-pinch-zoom: ;
129
- --flx-scroll-snap-strictness: proximity;
130
- --flx-gradient-from-position: ;
131
- --flx-gradient-via-position: ;
132
- --flx-gradient-to-position: ;
133
- --flx-ordinal: ;
134
- --flx-slashed-zero: ;
135
- --flx-numeric-figure: ;
136
- --flx-numeric-spacing: ;
137
- --flx-numeric-fraction: ;
138
- --flx-ring-inset: ;
139
- --flx-ring-offset-width: 0px;
140
- --flx-ring-offset-color: #fff;
141
- --flx-ring-color: #3b82f680;
142
- --flx-ring-offset-shadow: 0 0 #0000;
143
- --flx-ring-shadow: 0 0 #0000;
144
- --flx-shadow: 0 0 #0000;
145
- --flx-shadow-colored: 0 0 #0000;
146
- --flx-blur: ;
147
- --flx-brightness: ;
148
- --flx-contrast: ;
149
- --flx-grayscale: ;
150
- --flx-hue-rotate: ;
151
- --flx-invert: ;
152
- --flx-saturate: ;
153
- --flx-sepia: ;
154
- --flx-drop-shadow: ;
155
- --flx-backdrop-blur: ;
156
- --flx-backdrop-brightness: ;
157
- --flx-backdrop-contrast: ;
158
- --flx-backdrop-grayscale: ;
159
- --flx-backdrop-hue-rotate: ;
160
- --flx-backdrop-invert: ;
161
- --flx-backdrop-opacity: ;
162
- --flx-backdrop-saturate: ;
163
- --flx-backdrop-sepia: ;
164
- --flx-contain-size: ;
165
- --flx-contain-layout: ;
166
- --flx-contain-paint: ;
167
- --flx-contain-style: ;
103
+ }
104
+
105
+ :-moz-focusring {
106
+ outline: auto;
107
+ }
108
+
109
+ [hidden]:where(:not([hidden='until-found'])) {
110
+ display: none !important;
111
+ }
112
+ }
113
+
114
+ /* Compose vars the transform / filter / ring / snap utilities build on. Kept
115
+ unlayered so a utility that sets one always wins over the default. */
116
+ *,
117
+ ::before,
118
+ ::after,
119
+ ::backdrop {
120
+ --flx-translate-x: 0;
121
+ --flx-translate-y: 0;
122
+ --flx-rotate: 0;
123
+ --flx-skew-x: 0;
124
+ --flx-skew-y: 0;
125
+ --flx-scale-x: 1;
126
+ --flx-scale-y: 1;
127
+ --flx-pan-x: ;
128
+ --flx-pan-y: ;
129
+ --flx-pinch-zoom: ;
130
+ --flx-scroll-snap-strictness: proximity;
131
+ --flx-gradient-from-position: ;
132
+ --flx-gradient-via-position: ;
133
+ --flx-gradient-to-position: ;
134
+ --flx-ordinal: ;
135
+ --flx-slashed-zero: ;
136
+ --flx-numeric-figure: ;
137
+ --flx-numeric-spacing: ;
138
+ --flx-numeric-fraction: ;
139
+ --flx-ring-inset: ;
140
+ --flx-ring-offset-width: 0px;
141
+ --flx-ring-offset-color: #fff;
142
+ --flx-ring-color: #3b82f680;
143
+ --flx-ring-offset-shadow: 0 0 #0000;
144
+ --flx-ring-shadow: 0 0 #0000;
145
+ --flx-shadow: 0 0 #0000;
146
+ --flx-shadow-colored: 0 0 #0000;
147
+ --flx-blur: ;
148
+ --flx-brightness: ;
149
+ --flx-contrast: ;
150
+ --flx-grayscale: ;
151
+ --flx-hue-rotate: ;
152
+ --flx-invert: ;
153
+ --flx-saturate: ;
154
+ --flx-sepia: ;
155
+ --flx-drop-shadow: ;
156
+ --flx-backdrop-blur: ;
157
+ --flx-backdrop-brightness: ;
158
+ --flx-backdrop-contrast: ;
159
+ --flx-backdrop-grayscale: ;
160
+ --flx-backdrop-hue-rotate: ;
161
+ --flx-backdrop-invert: ;
162
+ --flx-backdrop-opacity: ;
163
+ --flx-backdrop-saturate: ;
164
+ --flx-backdrop-sepia: ;
165
+ --flx-contain-size: ;
166
+ --flx-contain-layout: ;
167
+ --flx-contain-paint: ;
168
+ --flx-contain-style: ;
168
169
  }
169
170
 
170
171
  /* Keyframes for the animate-* utilities. */
171
- @keyframes spin { to { transform: rotate(360deg); } }
172
- @keyframes ping { 75%, 100% { transform: scale(2); opacity: 0; } }
173
- @keyframes pulse { 50% { opacity: 0.5; } }
172
+ @keyframes spin {
173
+ to {
174
+ transform: rotate(360deg);
175
+ }
176
+ }
177
+ @keyframes ping {
178
+ 75%,
179
+ 100% {
180
+ transform: scale(2);
181
+ opacity: 0;
182
+ }
183
+ }
184
+ @keyframes pulse {
185
+ 50% {
186
+ opacity: 0.5;
187
+ }
188
+ }
174
189
  @keyframes bounce {
175
- 0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
176
- 50% { transform: none; animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
190
+ 0%,
191
+ 100% {
192
+ transform: translateY(-25%);
193
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
194
+ }
195
+ 50% {
196
+ transform: none;
197
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
198
+ }
177
199
  }