@elliemae/ds-system 3.50.1-next.8 → 3.51.0-next.0
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/dist/cjs/HtmlComponents.js +59 -59
- package/dist/cjs/HtmlComponents.js.map +2 -2
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/styled/expressions/genStyleOverridesExpression.js.map +2 -2
- package/dist/cjs/styled/expressions/genVariantOverridesExpression.js.map +2 -2
- package/dist/cjs/styled/fixStyleArg.js +2 -1
- package/dist/cjs/styled/fixStyleArg.js.map +2 -2
- package/dist/cjs/styled/styledFunction.js +1 -1
- package/dist/cjs/styled/styledFunction.js.map +2 -2
- package/dist/cjs/styled/transformers/magicCssTransform.js.map +2 -2
- package/dist/esm/HtmlComponents.js +1 -1
- package/dist/esm/HtmlComponents.js.map +1 -1
- package/dist/esm/index.js +38 -38
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/styled/expressions/genStyleOverridesExpression.js.map +2 -2
- package/dist/esm/styled/expressions/genVariantOverridesExpression.js.map +2 -2
- package/dist/esm/styled/fixStyleArg.js +2 -1
- package/dist/esm/styled/fixStyleArg.js.map +2 -2
- package/dist/esm/styled/styledFunction.js +1 -1
- package/dist/esm/styled/styledFunction.js.map +2 -2
- package/dist/esm/styled/transformers/magicCssTransform.js.map +2 -2
- package/dist/types/HtmlComponents.d.ts +58 -58
- package/dist/types/index.d.ts +9 -9
- package/dist/types/styled/expressions/genStyleOverridesExpression.d.ts +1 -1
- package/dist/types/styled/expressions/genVariantOverridesExpression.d.ts +1 -1
- package/dist/types/styled/styledFunction.d.ts +1 -1
- package/package.json +6 -6
|
@@ -89,180 +89,180 @@ __export(HtmlComponents_exports, {
|
|
|
89
89
|
});
|
|
90
90
|
module.exports = __toCommonJS(HtmlComponents_exports);
|
|
91
91
|
var React = __toESM(require("react"));
|
|
92
|
-
var
|
|
92
|
+
var import_styled = require("./styled/index.js");
|
|
93
93
|
var import_xStyledWrapper = require("./xStyledWrapper.js");
|
|
94
|
-
const Address = (0,
|
|
94
|
+
const Address = (0, import_styled.styled)("address")`
|
|
95
95
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
96
96
|
`;
|
|
97
|
-
const Article = (0,
|
|
97
|
+
const Article = (0, import_styled.styled)("article")`
|
|
98
98
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
99
99
|
`;
|
|
100
|
-
const Aside = (0,
|
|
100
|
+
const Aside = (0, import_styled.styled)("aside")`
|
|
101
101
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
102
102
|
`;
|
|
103
|
-
const Footer = (0,
|
|
103
|
+
const Footer = (0, import_styled.styled)("footer")`
|
|
104
104
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
105
105
|
`;
|
|
106
|
-
const Header = (0,
|
|
106
|
+
const Header = (0, import_styled.styled)("header")`
|
|
107
107
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
108
108
|
`;
|
|
109
|
-
const H1 = (0,
|
|
109
|
+
const H1 = (0, import_styled.styled)("h1")`
|
|
110
110
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
111
111
|
`;
|
|
112
|
-
const H2 = (0,
|
|
112
|
+
const H2 = (0, import_styled.styled)("h2")`
|
|
113
113
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
114
114
|
`;
|
|
115
|
-
const H3 = (0,
|
|
115
|
+
const H3 = (0, import_styled.styled)("h3")`
|
|
116
116
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
117
117
|
`;
|
|
118
|
-
const H4 = (0,
|
|
118
|
+
const H4 = (0, import_styled.styled)("h4")`
|
|
119
119
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
120
120
|
`;
|
|
121
|
-
const H5 = (0,
|
|
121
|
+
const H5 = (0, import_styled.styled)("h5")`
|
|
122
122
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
123
123
|
`;
|
|
124
|
-
const H6 = (0,
|
|
124
|
+
const H6 = (0, import_styled.styled)("h6")`
|
|
125
125
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
126
126
|
`;
|
|
127
|
-
const Hgroup = (0,
|
|
127
|
+
const Hgroup = (0, import_styled.styled)("hgroup")`
|
|
128
128
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
129
129
|
`;
|
|
130
|
-
const Main = (0,
|
|
130
|
+
const Main = (0, import_styled.styled)("main")`
|
|
131
131
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
132
132
|
`;
|
|
133
|
-
const Nav = (0,
|
|
133
|
+
const Nav = (0, import_styled.styled)("nav")`
|
|
134
134
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
135
135
|
`;
|
|
136
|
-
const Section = (0,
|
|
136
|
+
const Section = (0, import_styled.styled)("section")`
|
|
137
137
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
138
138
|
`;
|
|
139
|
-
const Search = (0,
|
|
139
|
+
const Search = (0, import_styled.styled)("search")`
|
|
140
140
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
141
141
|
`;
|
|
142
|
-
const Blockquote = (0,
|
|
142
|
+
const Blockquote = (0, import_styled.styled)("blockquote")`
|
|
143
143
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
144
144
|
`;
|
|
145
|
-
const Dd = (0,
|
|
145
|
+
const Dd = (0, import_styled.styled)("dd")`
|
|
146
146
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
147
147
|
`;
|
|
148
|
-
const Div = (0,
|
|
148
|
+
const Div = (0, import_styled.styled)("div")`
|
|
149
149
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
150
150
|
`;
|
|
151
|
-
const Dl = (0,
|
|
151
|
+
const Dl = (0, import_styled.styled)("dl")`
|
|
152
152
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
153
153
|
`;
|
|
154
|
-
const Dt = (0,
|
|
154
|
+
const Dt = (0, import_styled.styled)("dt")`
|
|
155
155
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
156
156
|
`;
|
|
157
|
-
const Figcaption = (0,
|
|
157
|
+
const Figcaption = (0, import_styled.styled)("figcaption")`
|
|
158
158
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
159
159
|
`;
|
|
160
|
-
const Figure = (0,
|
|
160
|
+
const Figure = (0, import_styled.styled)("figure")`
|
|
161
161
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
162
162
|
`;
|
|
163
|
-
const Hr = (0,
|
|
163
|
+
const Hr = (0, import_styled.styled)("hr")`
|
|
164
164
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
165
165
|
`;
|
|
166
|
-
const Li = (0,
|
|
166
|
+
const Li = (0, import_styled.styled)("li")`
|
|
167
167
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
168
168
|
`;
|
|
169
|
-
const Menu = (0,
|
|
169
|
+
const Menu = (0, import_styled.styled)("menu")`
|
|
170
170
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
171
171
|
`;
|
|
172
|
-
const Ol = (0,
|
|
172
|
+
const Ol = (0, import_styled.styled)("ol")`
|
|
173
173
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
174
174
|
`;
|
|
175
|
-
const P = (0,
|
|
175
|
+
const P = (0, import_styled.styled)("p")`
|
|
176
176
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
177
177
|
`;
|
|
178
|
-
const Pre = (0,
|
|
178
|
+
const Pre = (0, import_styled.styled)("pre")`
|
|
179
179
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
180
180
|
`;
|
|
181
|
-
const Ul = (0,
|
|
181
|
+
const Ul = (0, import_styled.styled)("ul")`
|
|
182
182
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
183
183
|
`;
|
|
184
|
-
const A = (0,
|
|
184
|
+
const A = (0, import_styled.styled)("a")`
|
|
185
185
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
186
186
|
`;
|
|
187
|
-
const Abbr = (0,
|
|
187
|
+
const Abbr = (0, import_styled.styled)("abbr")`
|
|
188
188
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
189
189
|
`;
|
|
190
|
-
const B = (0,
|
|
190
|
+
const B = (0, import_styled.styled)("b")`
|
|
191
191
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
192
192
|
`;
|
|
193
|
-
const Bdi = (0,
|
|
193
|
+
const Bdi = (0, import_styled.styled)("bdi")`
|
|
194
194
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
195
195
|
`;
|
|
196
|
-
const Bdo = (0,
|
|
196
|
+
const Bdo = (0, import_styled.styled)("bdo")`
|
|
197
197
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
198
198
|
`;
|
|
199
|
-
const Br = (0,
|
|
199
|
+
const Br = (0, import_styled.styled)("br")`
|
|
200
200
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
201
201
|
`;
|
|
202
|
-
const Cite = (0,
|
|
202
|
+
const Cite = (0, import_styled.styled)("cite")`
|
|
203
203
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
204
204
|
`;
|
|
205
|
-
const Code = (0,
|
|
205
|
+
const Code = (0, import_styled.styled)("code")`
|
|
206
206
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
207
207
|
`;
|
|
208
|
-
const Data = (0,
|
|
208
|
+
const Data = (0, import_styled.styled)("data")`
|
|
209
209
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
210
210
|
`;
|
|
211
|
-
const Dfn = (0,
|
|
211
|
+
const Dfn = (0, import_styled.styled)("dfn")`
|
|
212
212
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
213
213
|
`;
|
|
214
|
-
const Em = (0,
|
|
214
|
+
const Em = (0, import_styled.styled)("em")`
|
|
215
215
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
216
216
|
`;
|
|
217
|
-
const I = (0,
|
|
217
|
+
const I = (0, import_styled.styled)("i")`
|
|
218
218
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
219
219
|
`;
|
|
220
|
-
const Kbd = (0,
|
|
220
|
+
const Kbd = (0, import_styled.styled)("kbd")`
|
|
221
221
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
222
222
|
`;
|
|
223
|
-
const Mark = (0,
|
|
223
|
+
const Mark = (0, import_styled.styled)("mark")`
|
|
224
224
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
225
225
|
`;
|
|
226
|
-
const Q = (0,
|
|
226
|
+
const Q = (0, import_styled.styled)("q")`
|
|
227
227
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
228
228
|
`;
|
|
229
|
-
const Rp = (0,
|
|
229
|
+
const Rp = (0, import_styled.styled)("rp")`
|
|
230
230
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
231
231
|
`;
|
|
232
|
-
const Rt = (0,
|
|
232
|
+
const Rt = (0, import_styled.styled)("rt")`
|
|
233
233
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
234
234
|
`;
|
|
235
|
-
const Ruby = (0,
|
|
235
|
+
const Ruby = (0, import_styled.styled)("ruby")`
|
|
236
236
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
237
237
|
`;
|
|
238
|
-
const S = (0,
|
|
238
|
+
const S = (0, import_styled.styled)("s")`
|
|
239
239
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
240
240
|
`;
|
|
241
|
-
const Samp = (0,
|
|
241
|
+
const Samp = (0, import_styled.styled)("samp")`
|
|
242
242
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
243
243
|
`;
|
|
244
|
-
const Small = (0,
|
|
244
|
+
const Small = (0, import_styled.styled)("small")`
|
|
245
245
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
246
246
|
`;
|
|
247
|
-
const Span = (0,
|
|
247
|
+
const Span = (0, import_styled.styled)("span")`
|
|
248
248
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
249
249
|
`;
|
|
250
|
-
const Strong = (0,
|
|
250
|
+
const Strong = (0, import_styled.styled)("strong")`
|
|
251
251
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
252
252
|
`;
|
|
253
|
-
const Sub = (0,
|
|
253
|
+
const Sub = (0, import_styled.styled)("sub")`
|
|
254
254
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
255
255
|
`;
|
|
256
|
-
const Sup = (0,
|
|
256
|
+
const Sup = (0, import_styled.styled)("sup")`
|
|
257
257
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
258
258
|
`;
|
|
259
|
-
const Time = (0,
|
|
259
|
+
const Time = (0, import_styled.styled)("time")`
|
|
260
260
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
261
261
|
`;
|
|
262
|
-
const U = (0,
|
|
262
|
+
const U = (0, import_styled.styled)("u")`
|
|
263
263
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
264
264
|
`;
|
|
265
|
-
const Wbr = (0,
|
|
265
|
+
const Wbr = (0, import_styled.styled)("wbr")`
|
|
266
266
|
${import_xStyledWrapper.xStyledCommonProps}
|
|
267
267
|
`;
|
|
268
268
|
//# sourceMappingURL=HtmlComponents.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/HtmlComponents.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { styled } from './index.js';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\nimport { xStyledCommonProps } from './xStyledWrapper.js';\n\nexport const Address = styled('address')`\n ${xStyledCommonProps}\n`;\nexport const Article = styled('article')`\n ${xStyledCommonProps}\n`;\nexport const Aside = styled('aside')`\n ${xStyledCommonProps}\n`;\nexport const Footer = styled('footer')`\n ${xStyledCommonProps}\n`;\nexport const Header = styled('header')`\n ${xStyledCommonProps}\n`;\nexport const H1 = styled('h1')`\n ${xStyledCommonProps}\n`;\nexport const H2 = styled('h2')`\n ${xStyledCommonProps}\n`;\nexport const H3 = styled('h3')`\n ${xStyledCommonProps}\n`;\nexport const H4 = styled('h4')`\n ${xStyledCommonProps}\n`;\nexport const H5 = styled('h5')`\n ${xStyledCommonProps}\n`;\nexport const H6 = styled('h6')`\n ${xStyledCommonProps}\n`;\nexport const Hgroup = styled('hgroup')`\n ${xStyledCommonProps}\n`;\nexport const Main = styled('main')`\n ${xStyledCommonProps}\n`;\nexport const Nav = styled('nav')`\n ${xStyledCommonProps}\n`;\nexport const Section = styled('section')`\n ${xStyledCommonProps}\n`;\nexport const Search = styled('search')`\n ${xStyledCommonProps}\n`;\nexport const Blockquote = styled('blockquote')`\n ${xStyledCommonProps}\n`;\nexport const Dd = styled('dd')`\n ${xStyledCommonProps}\n`;\nexport const Div = styled('div')`\n ${xStyledCommonProps}\n`;\nexport const Dl = styled('dl')`\n ${xStyledCommonProps}\n`;\nexport const Dt = styled('dt')`\n ${xStyledCommonProps}\n`;\nexport const Figcaption = styled('figcaption')`\n ${xStyledCommonProps}\n`;\nexport const Figure = styled('figure')`\n ${xStyledCommonProps}\n`;\nexport const Hr = styled('hr')`\n ${xStyledCommonProps}\n`;\nexport const Li = styled('li')`\n ${xStyledCommonProps}\n`;\nexport const Menu = styled('menu')`\n ${xStyledCommonProps}\n`;\nexport const Ol = styled('ol')`\n ${xStyledCommonProps}\n`;\nexport const P = styled('p')`\n ${xStyledCommonProps}\n`;\nexport const Pre = styled('pre')`\n ${xStyledCommonProps}\n`;\nexport const Ul = styled('ul')`\n ${xStyledCommonProps}\n`;\nexport const A = styled('a')`\n ${xStyledCommonProps}\n`;\nexport const Abbr = styled('abbr')`\n ${xStyledCommonProps}\n`;\nexport const B = styled('b')`\n ${xStyledCommonProps}\n`;\nexport const Bdi = styled('bdi')`\n ${xStyledCommonProps}\n`;\nexport const Bdo = styled('bdo')`\n ${xStyledCommonProps}\n`;\nexport const Br = styled('br')`\n ${xStyledCommonProps}\n`;\nexport const Cite = styled('cite')`\n ${xStyledCommonProps}\n`;\nexport const Code = styled('code')`\n ${xStyledCommonProps}\n`;\nexport const Data = styled('data')`\n ${xStyledCommonProps}\n`;\nexport const Dfn = styled('dfn')`\n ${xStyledCommonProps}\n`;\nexport const Em = styled('em')`\n ${xStyledCommonProps}\n`;\nexport const I = styled('i')`\n ${xStyledCommonProps}\n`;\nexport const Kbd = styled('kbd')`\n ${xStyledCommonProps}\n`;\nexport const Mark = styled('mark')`\n ${xStyledCommonProps}\n`;\nexport const Q = styled('q')`\n ${xStyledCommonProps}\n`;\nexport const Rp = styled('rp')`\n ${xStyledCommonProps}\n`;\nexport const Rt = styled('rt')`\n ${xStyledCommonProps}\n`;\nexport const Ruby = styled('ruby')`\n ${xStyledCommonProps}\n`;\nexport const S = styled('s')`\n ${xStyledCommonProps}\n`;\nexport const Samp = styled('samp')`\n ${xStyledCommonProps}\n`;\nexport const Small = styled('small')`\n ${xStyledCommonProps}\n`;\nexport const Span = styled('span')`\n ${xStyledCommonProps}\n`;\nexport const Strong = styled('strong')`\n ${xStyledCommonProps}\n`;\nexport const Sub = styled('sub')`\n ${xStyledCommonProps}\n`;\nexport const Sup = styled('sup')`\n ${xStyledCommonProps}\n`;\nexport const Time = styled('time')`\n ${xStyledCommonProps}\n`;\nexport const U = styled('u')`\n ${xStyledCommonProps}\n`;\nexport const Wbr = styled('wbr')`\n ${xStyledCommonProps}\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["import { styled } from './styled/index.js';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\nimport { xStyledCommonProps } from './xStyledWrapper.js';\n\nexport const Address = styled('address')`\n ${xStyledCommonProps}\n`;\nexport const Article = styled('article')`\n ${xStyledCommonProps}\n`;\nexport const Aside = styled('aside')`\n ${xStyledCommonProps}\n`;\nexport const Footer = styled('footer')`\n ${xStyledCommonProps}\n`;\nexport const Header = styled('header')`\n ${xStyledCommonProps}\n`;\nexport const H1 = styled('h1')`\n ${xStyledCommonProps}\n`;\nexport const H2 = styled('h2')`\n ${xStyledCommonProps}\n`;\nexport const H3 = styled('h3')`\n ${xStyledCommonProps}\n`;\nexport const H4 = styled('h4')`\n ${xStyledCommonProps}\n`;\nexport const H5 = styled('h5')`\n ${xStyledCommonProps}\n`;\nexport const H6 = styled('h6')`\n ${xStyledCommonProps}\n`;\nexport const Hgroup = styled('hgroup')`\n ${xStyledCommonProps}\n`;\nexport const Main = styled('main')`\n ${xStyledCommonProps}\n`;\nexport const Nav = styled('nav')`\n ${xStyledCommonProps}\n`;\nexport const Section = styled('section')`\n ${xStyledCommonProps}\n`;\nexport const Search = styled('search')`\n ${xStyledCommonProps}\n`;\nexport const Blockquote = styled('blockquote')`\n ${xStyledCommonProps}\n`;\nexport const Dd = styled('dd')`\n ${xStyledCommonProps}\n`;\nexport const Div = styled('div')`\n ${xStyledCommonProps}\n`;\nexport const Dl = styled('dl')`\n ${xStyledCommonProps}\n`;\nexport const Dt = styled('dt')`\n ${xStyledCommonProps}\n`;\nexport const Figcaption = styled('figcaption')`\n ${xStyledCommonProps}\n`;\nexport const Figure = styled('figure')`\n ${xStyledCommonProps}\n`;\nexport const Hr = styled('hr')`\n ${xStyledCommonProps}\n`;\nexport const Li = styled('li')`\n ${xStyledCommonProps}\n`;\nexport const Menu = styled('menu')`\n ${xStyledCommonProps}\n`;\nexport const Ol = styled('ol')`\n ${xStyledCommonProps}\n`;\nexport const P = styled('p')`\n ${xStyledCommonProps}\n`;\nexport const Pre = styled('pre')`\n ${xStyledCommonProps}\n`;\nexport const Ul = styled('ul')`\n ${xStyledCommonProps}\n`;\nexport const A = styled('a')`\n ${xStyledCommonProps}\n`;\nexport const Abbr = styled('abbr')`\n ${xStyledCommonProps}\n`;\nexport const B = styled('b')`\n ${xStyledCommonProps}\n`;\nexport const Bdi = styled('bdi')`\n ${xStyledCommonProps}\n`;\nexport const Bdo = styled('bdo')`\n ${xStyledCommonProps}\n`;\nexport const Br = styled('br')`\n ${xStyledCommonProps}\n`;\nexport const Cite = styled('cite')`\n ${xStyledCommonProps}\n`;\nexport const Code = styled('code')`\n ${xStyledCommonProps}\n`;\nexport const Data = styled('data')`\n ${xStyledCommonProps}\n`;\nexport const Dfn = styled('dfn')`\n ${xStyledCommonProps}\n`;\nexport const Em = styled('em')`\n ${xStyledCommonProps}\n`;\nexport const I = styled('i')`\n ${xStyledCommonProps}\n`;\nexport const Kbd = styled('kbd')`\n ${xStyledCommonProps}\n`;\nexport const Mark = styled('mark')`\n ${xStyledCommonProps}\n`;\nexport const Q = styled('q')`\n ${xStyledCommonProps}\n`;\nexport const Rp = styled('rp')`\n ${xStyledCommonProps}\n`;\nexport const Rt = styled('rt')`\n ${xStyledCommonProps}\n`;\nexport const Ruby = styled('ruby')`\n ${xStyledCommonProps}\n`;\nexport const S = styled('s')`\n ${xStyledCommonProps}\n`;\nexport const Samp = styled('samp')`\n ${xStyledCommonProps}\n`;\nexport const Small = styled('small')`\n ${xStyledCommonProps}\n`;\nexport const Span = styled('span')`\n ${xStyledCommonProps}\n`;\nexport const Strong = styled('strong')`\n ${xStyledCommonProps}\n`;\nexport const Sub = styled('sub')`\n ${xStyledCommonProps}\n`;\nexport const Sup = styled('sup')`\n ${xStyledCommonProps}\n`;\nexport const Time = styled('time')`\n ${xStyledCommonProps}\n`;\nexport const U = styled('u')`\n ${xStyledCommonProps}\n`;\nexport const Wbr = styled('wbr')`\n ${xStyled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AK;AAAA,IAC3B,wCAAkB;AAAA;AAEf,MAAM,WAAO,sBAAO,MAAM;AAAA,IAC7B,wCAAkB;AAAA;AAEf,MAAM,QAAI,sBAAO,GAAG;AAAA,IACvB,wCAAkB;AAAA;AAEf,MAAM,UAAM,sBAAO,KAAK;AAAA,IAC3B,wCAAkB;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -97,19 +97,19 @@ __export(src_exports, {
|
|
|
97
97
|
});
|
|
98
98
|
module.exports = __toCommonJS(src_exports);
|
|
99
99
|
var React = __toESM(require("react"));
|
|
100
|
+
var import_styled_components = require("@xstyled/styled-components");
|
|
101
|
+
var import_system = require("@xstyled/system");
|
|
102
|
+
var import_HtmlComponents = require("./HtmlComponents.js");
|
|
103
|
+
__reExport(src_exports, require("./arithmetic.js"), module.exports);
|
|
100
104
|
__reExport(src_exports, require("./globalStyles.js"), module.exports);
|
|
101
|
-
__reExport(src_exports, require("./
|
|
105
|
+
__reExport(src_exports, require("./mergeRefs.js"), module.exports);
|
|
102
106
|
__reExport(src_exports, require("./mobileUtilities.js"), module.exports);
|
|
103
|
-
__reExport(src_exports, require("./
|
|
104
|
-
__reExport(src_exports, require("./
|
|
107
|
+
__reExport(src_exports, require("./spaceUtilities.js"), module.exports);
|
|
108
|
+
__reExport(src_exports, require("./styled/index.js"), module.exports);
|
|
105
109
|
__reExport(src_exports, require("./th.js"), module.exports);
|
|
106
110
|
__reExport(src_exports, require("./theme.js"), module.exports);
|
|
107
|
-
__reExport(src_exports, require("./styled/index.js"), module.exports);
|
|
108
|
-
var import_system = require("@xstyled/system");
|
|
109
111
|
var import_themeProviderHOC = require("./themeProviderHOC.js");
|
|
110
|
-
|
|
112
|
+
__reExport(src_exports, require("./utils.js"), module.exports);
|
|
111
113
|
var import_xStyledWrapper = require("./xStyledWrapper.js");
|
|
112
|
-
var import_HtmlComponents = require("./HtmlComponents.js");
|
|
113
|
-
__reExport(src_exports, require("./mergeRefs.js"), module.exports);
|
|
114
114
|
var import_useGetLayoutMode = require("./useGetLayoutMode.js");
|
|
115
115
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,
|
|
4
|
+
"sourcesContent": ["export { ThemeContext } from '@xstyled/styled-components';\nexport { position, typography } from '@xstyled/system';\nexport {\n A,\n Abbr,\n Address,\n Article,\n Aside,\n B,\n Bdi,\n Bdo,\n Blockquote,\n Br,\n Cite,\n Code,\n Data,\n Dd,\n Dfn,\n Div,\n Dl,\n Dt,\n Em,\n Figcaption,\n Figure,\n Footer,\n H1,\n H2,\n H3,\n H4,\n H5,\n H6,\n Header,\n Hgroup,\n Hr,\n I,\n Kbd,\n Li,\n Main,\n Mark,\n Menu,\n Nav,\n Ol,\n P,\n Pre,\n Q,\n Rp,\n Rt,\n Ruby,\n S,\n Samp,\n Search,\n Section,\n Small,\n Span,\n Strong,\n Sub,\n Sup,\n Time,\n U,\n Ul,\n Wbr,\n} from './HtmlComponents.js';\nexport * from './arithmetic.js';\nexport * from './globalStyles.js';\nexport * from './mergeRefs.js';\nexport * from './mobileUtilities.js';\nexport * from './spaceUtilities.js';\nexport * from './styled/index.js';\nexport * from './th.js';\nexport * from './theme.js';\nexport { themeProviderHOC } from './themeProviderHOC.js';\nexport * from './utils.js';\nexport { XStyledWrapper, xStyledCommonProps } from './xStyledWrapper.js';\n// styled components uses csstype types internally but doesn't solve the types export correctly\n// so to fix ts2742 we need to re-export the types from csstype...\nexport type * from 'csstype';\nexport { useGetLayoutMode } from './useGetLayoutMode.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAA6B;AAC7B,oBAAqC;AACrC,4BA2DO;AACP,wBAAc,4BA9Dd;AA+DA,wBAAc,8BA/Dd;AAgEA,wBAAc,2BAhEd;AAiEA,wBAAc,iCAjEd;AAkEA,wBAAc,gCAlEd;AAmEA,wBAAc,8BAnEd;AAoEA,wBAAc,oBApEd;AAqEA,wBAAc,uBArEd;AAsEA,8BAAiC;AACjC,wBAAc,uBAvEd;AAwEA,4BAAmD;AAInD,8BAAiC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/styled/expressions/genStyleOverridesExpression.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { CSSObject } from 'styled-components';\nimport type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\n\nconst getStyleOverrides = (name: string, theme: Theme): CSSObject | null =>\n theme.components?.[name]?.styleOverrides || null;\n\nexport const genStyleOverridesExpression =\n (componentName: string, componentSlot: string) => (props: PropsWithTheme) => {\n const styleOverrides = getStyleOverrides(componentName, props.theme ?? defaultTheme);\n if (styleOverrides) {\n return [styleOverrides[componentSlot]];\n }\n return null;\n };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAsC;AAEtC,MAAM,oBAAoB,CAAC,MAAc,UACvC,MAAM,aAAa,IAAI,GAAG,kBAAkB;AAEvC,MAAM,8BACX,CAAC,eAAuB,kBAA0B,CAAC,UAA0B;AAC3E,QAAM,iBAAiB,kBAAkB,eAAe,MAAM,SAAS,aAAAA,KAAY;AACnF,MAAI,gBAAgB;AAClB,WAAO,CAAC,eAAe,aAAa,CAAC;AAAA,EACvC;AACA,SAAO;AACT;",
|
|
6
6
|
"names": ["defaultTheme"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/styled/expressions/genVariantOverridesExpression.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
4
|
+
"sourcesContent": ["import type { CSSObject } from 'styled-components';\nimport type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport { propsToClassKey } from '../helpers.js';\n\nconst getVariantStyles = (name: string, theme: Theme): Record<string, CSSObject> => {\n const variants = theme.components?.[name]?.variants || [];\n\n return variants.reduce(\n (styles, definition) => {\n const key = propsToClassKey(definition.props);\n styles[key] = definition.style;\n return styles;\n },\n {} as Record<string, CSSObject>,\n );\n};\n\nexport const genVariantOverridesExpression = (componentName: string) => (props: PropsWithTheme) => {\n const theme = props.theme ?? defaultTheme;\n const variantStyles = getVariantStyles(componentName, theme);\n\n const themeVariants = theme?.components?.[componentName]?.variants || [];\n\n return themeVariants.reduce(\n (resultingStyles, themeVariant) => {\n const isMatch = Object.keys(themeVariant.props).every((key) => props[key] === themeVariant.props[key]);\n if (isMatch) {\n resultingStyles.push(variantStyles[propsToClassKey(themeVariant.props)]);\n }\n return resultingStyles;\n },\n [] as CSSObject[keyof CSSObject][],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEvB,mBAAsC;AACtC,qBAAgC;AAEhC,MAAM,mBAAmB,CAAC,MAAc,UAA4C;AAClF,QAAM,WAAW,MAAM,aAAa,IAAI,GAAG,YAAY,CAAC;AAExD,SAAO,SAAS;AAAA,IACd,CAAC,QAAQ,eAAe;AACtB,YAAM,UAAM,gCAAgB,WAAW,KAAK;AAC5C,aAAO,GAAG,IAAI,WAAW;AACzB,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;AAEO,MAAM,gCAAgC,CAAC,kBAA0B,CAAC,UAA0B;AACjG,QAAM,QAAQ,MAAM,SAAS,aAAAA;AAC7B,QAAM,gBAAgB,iBAAiB,eAAe,KAAK;AAE3D,QAAM,gBAAgB,OAAO,aAAa,aAAa,GAAG,YAAY,CAAC;AAEvE,SAAO,cAAc;AAAA,IACnB,CAAC,iBAAiB,iBAAiB;AACjC,YAAM,UAAU,OAAO,KAAK,aAAa,KAAK,EAAE,MAAM,CAAC,QAAQ,MAAM,GAAG,MAAM,aAAa,MAAM,GAAG,CAAC;AACrG,UAAI,SAAS;AACX,wBAAgB,KAAK,kBAAc,gCAAgB,aAAa,KAAK,CAAC,CAAC;AAAA,MACzE;AACA,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": ["defaultTheme"]
|
|
7
7
|
}
|
|
@@ -40,7 +40,8 @@ const fixStyleArg = (styleArg, numberOfNewExpressions) => {
|
|
|
40
40
|
return Object.assign([...styleArg, ...placeholders], {
|
|
41
41
|
raw: [...styleArg.raw, ...placeholders]
|
|
42
42
|
});
|
|
43
|
-
}
|
|
43
|
+
}
|
|
44
|
+
if (typeof styleArg === "function") {
|
|
44
45
|
return (props) => styleArg({ ...props, theme: props.theme ?? import_theme.theme });
|
|
45
46
|
}
|
|
46
47
|
return styleArg;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styled/fixStyleArg.ts", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { theme as defaultTheme } from '../theme.js';\nimport type { PropsWithTheme, StyleArg } from './types.js';\n\nconst isTemplateStringsArray = (styleArg: StyleArg): styleArg is TemplateStringsArray => Array.isArray(styleArg);\n\nexport const fixStyleArg = (styleArg: StyleArg, numberOfNewExpressions: number): StyleArg => {\n if (isTemplateStringsArray(styleArg) && numberOfNewExpressions > 0) {\n // Here we are adding placeholders for all the new functions that we are gonna call\n const placeholders = new Array(numberOfNewExpressions).fill('') as string[];\n return Object.assign([...styleArg, ...placeholders], {\n raw: [...styleArg.raw, ...placeholders],\n });\n }
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AAGtC,MAAM,yBAAyB,CAAC,aAAyD,MAAM,QAAQ,QAAQ;AAExG,MAAM,cAAc,CAAC,UAAoB,2BAA6C;AAC3F,MAAI,uBAAuB,QAAQ,KAAK,yBAAyB,GAAG;AAElE,UAAM,eAAe,IAAI,MAAM,sBAAsB,EAAE,KAAK,EAAE;AAC9D,WAAO,OAAO,OAAO,CAAC,GAAG,UAAU,GAAG,YAAY,GAAG;AAAA,MACnD,KAAK,CAAC,GAAG,SAAS,KAAK,GAAG,YAAY;AAAA,IACxC,CAAC;AAAA,EACH,
|
|
4
|
+
"sourcesContent": ["import { theme as defaultTheme } from '../theme.js';\nimport type { PropsWithTheme, StyleArg } from './types.js';\n\nconst isTemplateStringsArray = (styleArg: StyleArg): styleArg is TemplateStringsArray => Array.isArray(styleArg);\n\nexport const fixStyleArg = (styleArg: StyleArg, numberOfNewExpressions: number): StyleArg => {\n if (isTemplateStringsArray(styleArg) && numberOfNewExpressions > 0) {\n // Here we are adding placeholders for all the new functions that we are gonna call\n const placeholders = new Array(numberOfNewExpressions).fill('') as string[];\n return Object.assign([...styleArg, ...placeholders], {\n raw: [...styleArg.raw, ...placeholders],\n });\n }\n if (typeof styleArg === 'function') {\n // Here we just coerce with the default theme\n return (props: PropsWithTheme) => styleArg({ ...props, theme: props.theme ?? defaultTheme });\n }\n return styleArg;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAsC;AAGtC,MAAM,yBAAyB,CAAC,aAAyD,MAAM,QAAQ,QAAQ;AAExG,MAAM,cAAc,CAAC,UAAoB,2BAA6C;AAC3F,MAAI,uBAAuB,QAAQ,KAAK,yBAAyB,GAAG;AAElE,UAAM,eAAe,IAAI,MAAM,sBAAsB,EAAE,KAAK,EAAE;AAC9D,WAAO,OAAO,OAAO,CAAC,GAAG,UAAU,GAAG,YAAY,GAAG;AAAA,MACnD,KAAK,CAAC,GAAG,SAAS,KAAK,GAAG,YAAY;AAAA,IACxC,CAAC;AAAA,EACH;AACA,MAAI,OAAO,aAAa,YAAY;AAElC,WAAO,CAAC,UAA0B,SAAS,EAAE,GAAG,OAAO,OAAO,MAAM,SAAS,aAAAA,MAAa,CAAC;AAAA,EAC7F;AACA,SAAO;AACT;",
|
|
6
6
|
"names": ["defaultTheme"]
|
|
7
7
|
}
|
|
@@ -33,6 +33,7 @@ __export(styledFunction_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(styledFunction_exports);
|
|
34
34
|
var React = __toESM(require("react"));
|
|
35
35
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
36
37
|
var import_checkNamingConvention = require("./checkNamingConvention.js");
|
|
37
38
|
var import_system = require("./system.js");
|
|
38
39
|
var import_transformers = require("./transformers/index.js");
|
|
@@ -43,7 +44,6 @@ var import_generated_attributes = require("./generated-attributes/index.js");
|
|
|
43
44
|
var import_generateAttributes = require("./generated-attributes/generateAttributes.js");
|
|
44
45
|
var import_refMerger = require("./generated-attributes/utils/refMerger.js");
|
|
45
46
|
var import_helpers = require("./helpers.js");
|
|
46
|
-
var import_react = require("react");
|
|
47
47
|
var import_callbackMerger = require("./generated-attributes/utils/callbackMerger.js");
|
|
48
48
|
const defaultOptions = {
|
|
49
49
|
name: null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/styled/styledFunction.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { styled as baseStyled } from './system.js';\nimport { dsStyledComponentTransform, magicCssTransform } from './transformers/index.js';\nimport type {\n AnyStyledRef,\n Options,\n OwnerInterface,\n InnerRefInterface,\n Theme,\n ThemedStyledFunctionBase,\n} from './types.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\nimport { getPartProps } from './generated-attributes/generateAttributes.js';\nimport { mergeRefs } from './generated-attributes/utils/refMerger.js';\nimport { displayNameToKebabCase, displayNameToPropCase } from './helpers.js';\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsJV;AAlJb,mCAAsC;AACtC,oBAAqC;AACrC,0BAA8D;AAS9D,oCAAuC;AACvC,yBAA2E;AAC3E,yBAA4B;AAC5B,kCAAuC;AACvC,gCAA6B;AAC7B,uBAA0B;AAC1B,qBAA8D;AAC9D,
|
|
4
|
+
"sourcesContent": ["/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport React, { useMemo } from 'react';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { styled as baseStyled } from './system.js';\nimport { dsStyledComponentTransform, magicCssTransform } from './transformers/index.js';\nimport type {\n AnyStyledRef,\n Options,\n OwnerInterface,\n InnerRefInterface,\n Theme,\n ThemedStyledFunctionBase,\n} from './types.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\nimport { getPartProps } from './generated-attributes/generateAttributes.js';\nimport { mergeRefs } from './generated-attributes/utils/refMerger.js';\nimport { displayNameToKebabCase, displayNameToPropCase } from './helpers.js';\nimport { callbackMerger } from './generated-attributes/utils/callbackMerger.js';\n\nconst defaultOptions: Options = {\n name: null,\n slot: null,\n};\n\nexport const styledFunction = <C extends AnyStyledComponent | keyof JSX.IntrinsicElements | React.ComponentType<any>>(\n tag: C,\n options: Options = defaultOptions,\n) => {\n const { name: componentName, slot: componentSlot } = options;\n\n checkNamingConvention(componentName, componentSlot);\n\n // Here we use the `as` because when C is keyof JSX.IntrinsicElements we get `never` for the attributes generic\n // We want to account for string | number | symbol that's why we transform it to `keyof any`\n const baseStyledResolver = baseStyled(tag) as unknown as ThemedStyledFunction<C, Theme, {}, keyof any>;\n\n // Due to the recursive natura of this function, we can't type it properly\n // Since we can apply .attrs or .withConfig, we are not sure on the type of the returned function\n // @ts-expect-error explained above\n const dsStyledResolver: ThemedStyledFunctionBase<C, Theme> = (styleArg, ...expressions) => {\n /**\n * Here we apply a transformation to the expressions only.\n * Since this resolver is returning a HOC of a styled-component, the syntax support for\n * selecting the className of another styled-component is not available anymore.\n * That's why we assign it a `dsStyledComponnentId`, we will replace the component's call for\n * the corresponding id\n */\n const expressionsWithDsStyledComponentId = dsStyledComponentTransform(expressions);\n\n /**\n * Here we apply a CSS transformation to support MAGIC styled components\n * This makes it possible to use the following syntax:\n * color: neutral-100;\n * background-color: success-900;\n */\n const [styleArgWithMagic, expressionsWithMagic] = magicCssTransform(styleArg, expressionsWithDsStyledComponentId);\n\n /**\n * We coerce all the already written expressions with the default theme\n * This prevents styled components to break when a theme is not provided\n * either with the HOC or the ThemeProvider\n */\n const expressionsWithThemeCoerced = coerceWithDefaultTheme(expressionsWithMagic);\n\n if (componentName && componentSlot) {\n // Here we add the style overrides expression\n expressionsWithThemeCoerced.push(genStyleOverridesExpression(componentName, componentSlot));\n }\n\n if (componentName && componentSlot === 'root') {\n // Here we add the variant overrides from the user (only for the root slot\n expressionsWithThemeCoerced.push(genVariantOverridesExpression(componentName));\n }\n\n /**\n * Here we will fix the format of the style argument\n * We possible added some new expressions into the mix,\n * so we need to properly adjust the style arg\n */\n const numOfExpressionsAdded = expressionsWithThemeCoerced.length - expressionsWithMagic.length;\n\n const fixedStyleArg = fixStyleArg(styleArgWithMagic, numOfExpressionsAdded);\n\n // We will add autocalculated attributes to the styled component\n const [displayName, attributes] = generateAutoCalculated(options);\n\n // For each attribute function, we will call `attrs` func with it\n // This will add the attributes to the styled component\n const baseStyledResolverWithAttributes = attributes.reduce<typeof baseStyledResolver>(\n (curStyledResolver, attributeFunc) => curStyledResolver.attrs(attributeFunc),\n baseStyledResolver,\n );\n\n const Component = baseStyledResolverWithAttributes(fixedStyleArg, ...expressionsWithThemeCoerced);\n\n const ComponentWithRefsMerged = (props: OwnerInterface & InnerRefInterface<C> & { 'data-testid'?: string }) => {\n // we may or not have data-testid at this point, so we need to calculate it\n const dataTestId = props['data-testid'] ?? (displayName !== null ? displayNameToKebabCase(displayName) : '');\n // we also need to calculate dataDimsumSlot at this point\n const dataDimsumSlot = displayName !== null ? displayNameToPropCase(displayName) : '';\n // then we get the part props for this slot, and we cast it to use refs\n const partProps = getPartProps({\n ...props,\n 'data-testid': dataTestId,\n 'data-dimsum-slot': dataDimsumSlot,\n }) as {\n innerRef?: AnyStyledRef<HTMLElement>;\n };\n\n // then we merge the callbacks from the props with the ones from the part\n // this object also has all global props from the parts\n const resultingObjectWithCallbackMerged = callbackMerger(props, partProps);\n\n const mergedRef = useMemo(\n () => mergeRefs(props.innerRef, partProps.innerRef),\n [props.innerRef, partProps.innerRef],\n );\n\n // We don't want to pass the owner props to the component down the line\n const { getOwnerProps, getOwnerPropsArguments, ...restProps } = props;\n // TODO:\n // deploy the following code and see if we break something in a dedicated effort ASAP\n // let ref = undefined;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore : as of thue 16 may 2024, Component.target.$$typeof is undefined for non-native react components\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n // if (typeof Component?.target === 'string') {\n // ref = mergedRef;\n // }\n\n const propsWithRefMerged = {\n ...restProps,\n ...resultingObjectWithCallbackMerged,\n // ref: ref,\n ref: mergedRef,\n innerRef: mergedRef,\n } as React.ComponentProps<C>;\n\n // TODO: check if we need to pass the ref to the component\n // Check $$typeof to see if it's a react-forward-ref\n // Check dsStyledComponentId to see if it's a styled component\n // Check what to do with span, div, etc.\n // Other cases should not receive ref...?\n\n return <Component {...propsWithRefMerged} />;\n };\n\n if (displayName !== null) {\n Component.displayName = displayName;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore We use dsStyledComponent to access the original's component id\n ComponentWithRefsMerged.dsStyledComponentId = Component.styledComponentId as string;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ComponentWithRefsMerged.toString = Component.toString;\n\n return ComponentWithRefsMerged;\n };\n\n // Here we use arrow functions to preserve the `this` context\n const styledAttributes = {\n attrs: ((...args) => {\n baseStyledResolver.attrs(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['attrs'],\n withConfig: ((...args) => {\n baseStyledResolver.withConfig(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['withConfig'],\n };\n\n return Object.assign(dsStyledResolver, styledAttributes);\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADsJV;AAlJb,mBAA+B;AAC/B,mCAAsC;AACtC,oBAAqC;AACrC,0BAA8D;AAS9D,oCAAuC;AACvC,yBAA2E;AAC3E,yBAA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AM,wCAAoC,sCAAe,OAAO,SAAS;AAEzE,YAAM,gBAAY;AAAA,QAChB,UAAM,4BAAU,MAAM,UAAU,UAAU,QAAQ;AAAA,QAClD,CAAC,MAAM,UAAU,UAAU,QAAQ;AAAA,MACrC;AAGA,YAAM,EAAE,eAAe,wBAAwB,GAAG,UAAU,IAAI;AAWhE,YAAM,qBAAqB;AAAA,QACzB,GAAG;AAAA,QACH,GAAG;AAAA;AAAA,QAEH,KAAK;AAAA,QACL,UAAU;AAAA,MACZ;AAQA,aAAO,4CAAC,aAAW,GAAG,oBAAoB;AAAA,IAC5C;AAEA,QAAI,gBAAgB,MAAM;AACxB,gBAAU,cAAc;AAAA,IAC1B;AAIA,4BAAwB,sBAAsB,UAAU;AAExD,4BAAwB,WAAW,UAAU;AAE7C,WAAO;AAAA,EACT;AAGA,QAAM,mBAAmB;AAAA,IACvB,OAAQ,IAAI,SAAS;AACnB,yBAAmB,MAAM,GAAG,IAAI;AAChC,aAAO;AAAA,IACT;AAAA,IACA,YAAa,IAAI,SAAS;AACxB,yBAAmB,WAAW,GAAG,IAAI;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,OAAO,kBAAkB,gBAAgB;AACzD;",
|
|
6
6
|
"names": ["baseStyled"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/styled/transformers/magicCssTransform.ts", "../../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { th } from '../../th.js';\nimport type { Expressions, StyleArg } from '../types.js';\n\ntype MagicCssTransform = (styleArg: StyleArg, expressions: Expressions) => [StyleArg, Expressions];\n\n// This file is heavily inspired by https://github.com/gregberge/xstyled/blob/c0c92b459bb3a5de46d7854be3667861f816baa5/packages/core/src/transform.ts#L65\n// Please refer to that file to understand of the idea of the css transformer\n\nconst COLOR_REGEX = /(neutral|brand|success|warning|danger)-(100|200|300|400|500|600|700|800|900|000|050|080)/g;\n\nconst magicfyCss = (rawValue: string): [string[], Expressions] => {\n let matches;\n let lastIndex = 0;\n const splittedValue: string[] = [];\n const themeGetters = [];\n while ((matches = COLOR_REGEX.exec(rawValue))) {\n const [match] = matches;\n splittedValue.push(rawValue.slice(lastIndex, matches.index));\n\n themeGetters.push(th.color(match, match));\n\n lastIndex = matches.index + match.length;\n }\n splittedValue.push(rawValue.slice(lastIndex, rawValue.length));\n return [splittedValue, themeGetters];\n};\n\nexport const magicCssTransform: MagicCssTransform = (styleArg, expressions) => {\n if (!Array.isArray(styleArg)) return [styleArg, expressions];\n\n const magicStyleArg: string[] = [];\n const magicExpressions: Expressions = [];\n\n const templateStringArray = styleArg as TemplateStringsArray;\n\n templateStringArray.forEach((templateString, index) => {\n const [splittedTemplateString, themeGetters] = magicfyCss(templateString);\n magicStyleArg.push(...splittedTemplateString);\n magicExpressions.push(...themeGetters);\n if (index < expressions.length) magicExpressions.push(expressions[index]);\n });\n\n return [Object.assign(magicStyleArg, { raw: [...magicStyleArg] }), magicExpressions];\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gBAAmB;AAQnB,MAAM,cAAc;AAEpB,MAAM,aAAa,CAAC,aAA8C;AAChE,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,gBAA0B,CAAC;AACjC,QAAM,eAAe,CAAC;
|
|
4
|
+
"sourcesContent": ["import { th } from '../../th.js';\nimport type { Expressions, StyleArg } from '../types.js';\n\ntype MagicCssTransform = (styleArg: StyleArg, expressions: Expressions) => [StyleArg, Expressions];\n\n// This file is heavily inspired by https://github.com/gregberge/xstyled/blob/c0c92b459bb3a5de46d7854be3667861f816baa5/packages/core/src/transform.ts#L65\n// Please refer to that file to understand of the idea of the css transformer\n\nconst COLOR_REGEX = /(neutral|brand|success|warning|danger)-(100|200|300|400|500|600|700|800|900|000|050|080)/g;\n\nconst magicfyCss = (rawValue: string): [string[], Expressions] => {\n let matches;\n let lastIndex = 0;\n const splittedValue: string[] = [];\n const themeGetters = [];\n // what is the while with an assignment about???\n // not broken so not touching but what?\n // eslint-disable-next-line no-cond-assign\n while ((matches = COLOR_REGEX.exec(rawValue))) {\n const [match] = matches;\n splittedValue.push(rawValue.slice(lastIndex, matches.index));\n\n themeGetters.push(th.color(match, match));\n\n lastIndex = matches.index + match.length;\n }\n splittedValue.push(rawValue.slice(lastIndex, rawValue.length));\n return [splittedValue, themeGetters];\n};\n\nexport const magicCssTransform: MagicCssTransform = (styleArg, expressions) => {\n if (!Array.isArray(styleArg)) return [styleArg, expressions];\n\n const magicStyleArg: string[] = [];\n const magicExpressions: Expressions = [];\n\n const templateStringArray = styleArg as TemplateStringsArray;\n\n templateStringArray.forEach((templateString, index) => {\n const [splittedTemplateString, themeGetters] = magicfyCss(templateString);\n magicStyleArg.push(...splittedTemplateString);\n magicExpressions.push(...themeGetters);\n if (index < expressions.length) magicExpressions.push(expressions[index]);\n });\n\n return [Object.assign(magicStyleArg, { raw: [...magicStyleArg] }), magicExpressions];\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,gBAAmB;AAQnB,MAAM,cAAc;AAEpB,MAAM,aAAa,CAAC,aAA8C;AAChE,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,gBAA0B,CAAC;AACjC,QAAM,eAAe,CAAC;AAItB,SAAQ,UAAU,YAAY,KAAK,QAAQ,GAAI;AAC7C,UAAM,CAAC,KAAK,IAAI;AAChB,kBAAc,KAAK,SAAS,MAAM,WAAW,QAAQ,KAAK,CAAC;AAE3D,iBAAa,KAAK,aAAG,MAAM,OAAO,KAAK,CAAC;AAExC,gBAAY,QAAQ,QAAQ,MAAM;AAAA,EACpC;AACA,gBAAc,KAAK,SAAS,MAAM,WAAW,SAAS,MAAM,CAAC;AAC7D,SAAO,CAAC,eAAe,YAAY;AACrC;AAEO,MAAM,oBAAuC,CAAC,UAAU,gBAAgB;AAC7E,MAAI,CAAC,MAAM,QAAQ,QAAQ,EAAG,QAAO,CAAC,UAAU,WAAW;AAE3D,QAAM,gBAA0B,CAAC;AACjC,QAAM,mBAAgC,CAAC;AAEvC,QAAM,sBAAsB;AAE5B,sBAAoB,QAAQ,CAAC,gBAAgB,UAAU;AACrD,UAAM,CAAC,wBAAwB,YAAY,IAAI,WAAW,cAAc;AACxE,kBAAc,KAAK,GAAG,sBAAsB;AAC5C,qBAAiB,KAAK,GAAG,YAAY;AACrC,QAAI,QAAQ,YAAY,OAAQ,kBAAiB,KAAK,YAAY,KAAK,CAAC;AAAA,EAC1E,CAAC;AAED,SAAO,CAAC,OAAO,OAAO,eAAe,EAAE,KAAK,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,gBAAgB;AACrF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/HtmlComponents.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from './index.js';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\nimport { xStyledCommonProps } from './xStyledWrapper.js';\n\nexport const Address = styled('address')`\n ${xStyledCommonProps}\n`;\nexport const Article = styled('article')`\n ${xStyledCommonProps}\n`;\nexport const Aside = styled('aside')`\n ${xStyledCommonProps}\n`;\nexport const Footer = styled('footer')`\n ${xStyledCommonProps}\n`;\nexport const Header = styled('header')`\n ${xStyledCommonProps}\n`;\nexport const H1 = styled('h1')`\n ${xStyledCommonProps}\n`;\nexport const H2 = styled('h2')`\n ${xStyledCommonProps}\n`;\nexport const H3 = styled('h3')`\n ${xStyledCommonProps}\n`;\nexport const H4 = styled('h4')`\n ${xStyledCommonProps}\n`;\nexport const H5 = styled('h5')`\n ${xStyledCommonProps}\n`;\nexport const H6 = styled('h6')`\n ${xStyledCommonProps}\n`;\nexport const Hgroup = styled('hgroup')`\n ${xStyledCommonProps}\n`;\nexport const Main = styled('main')`\n ${xStyledCommonProps}\n`;\nexport const Nav = styled('nav')`\n ${xStyledCommonProps}\n`;\nexport const Section = styled('section')`\n ${xStyledCommonProps}\n`;\nexport const Search = styled('search')`\n ${xStyledCommonProps}\n`;\nexport const Blockquote = styled('blockquote')`\n ${xStyledCommonProps}\n`;\nexport const Dd = styled('dd')`\n ${xStyledCommonProps}\n`;\nexport const Div = styled('div')`\n ${xStyledCommonProps}\n`;\nexport const Dl = styled('dl')`\n ${xStyledCommonProps}\n`;\nexport const Dt = styled('dt')`\n ${xStyledCommonProps}\n`;\nexport const Figcaption = styled('figcaption')`\n ${xStyledCommonProps}\n`;\nexport const Figure = styled('figure')`\n ${xStyledCommonProps}\n`;\nexport const Hr = styled('hr')`\n ${xStyledCommonProps}\n`;\nexport const Li = styled('li')`\n ${xStyledCommonProps}\n`;\nexport const Menu = styled('menu')`\n ${xStyledCommonProps}\n`;\nexport const Ol = styled('ol')`\n ${xStyledCommonProps}\n`;\nexport const P = styled('p')`\n ${xStyledCommonProps}\n`;\nexport const Pre = styled('pre')`\n ${xStyledCommonProps}\n`;\nexport const Ul = styled('ul')`\n ${xStyledCommonProps}\n`;\nexport const A = styled('a')`\n ${xStyledCommonProps}\n`;\nexport const Abbr = styled('abbr')`\n ${xStyledCommonProps}\n`;\nexport const B = styled('b')`\n ${xStyledCommonProps}\n`;\nexport const Bdi = styled('bdi')`\n ${xStyledCommonProps}\n`;\nexport const Bdo = styled('bdo')`\n ${xStyledCommonProps}\n`;\nexport const Br = styled('br')`\n ${xStyledCommonProps}\n`;\nexport const Cite = styled('cite')`\n ${xStyledCommonProps}\n`;\nexport const Code = styled('code')`\n ${xStyledCommonProps}\n`;\nexport const Data = styled('data')`\n ${xStyledCommonProps}\n`;\nexport const Dfn = styled('dfn')`\n ${xStyledCommonProps}\n`;\nexport const Em = styled('em')`\n ${xStyledCommonProps}\n`;\nexport const I = styled('i')`\n ${xStyledCommonProps}\n`;\nexport const Kbd = styled('kbd')`\n ${xStyledCommonProps}\n`;\nexport const Mark = styled('mark')`\n ${xStyledCommonProps}\n`;\nexport const Q = styled('q')`\n ${xStyledCommonProps}\n`;\nexport const Rp = styled('rp')`\n ${xStyledCommonProps}\n`;\nexport const Rt = styled('rt')`\n ${xStyledCommonProps}\n`;\nexport const Ruby = styled('ruby')`\n ${xStyledCommonProps}\n`;\nexport const S = styled('s')`\n ${xStyledCommonProps}\n`;\nexport const Samp = styled('samp')`\n ${xStyledCommonProps}\n`;\nexport const Small = styled('small')`\n ${xStyledCommonProps}\n`;\nexport const Span = styled('span')`\n ${xStyledCommonProps}\n`;\nexport const Strong = styled('strong')`\n ${xStyledCommonProps}\n`;\nexport const Sub = styled('sub')`\n ${xStyledCommonProps}\n`;\nexport const Sup = styled('sup')`\n ${xStyledCommonProps}\n`;\nexport const Time = styled('time')`\n ${xStyledCommonProps}\n`;\nexport const U = styled('u')`\n ${xStyledCommonProps}\n`;\nexport const Wbr = styled('wbr')`\n ${xStyledCommonProps}\n`;\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from './styled/index.js';\nimport type {} from '@xstyled/util';\nimport type {} from '@xstyled/system';\nimport { xStyledCommonProps } from './xStyledWrapper.js';\n\nexport const Address = styled('address')`\n ${xStyledCommonProps}\n`;\nexport const Article = styled('article')`\n ${xStyledCommonProps}\n`;\nexport const Aside = styled('aside')`\n ${xStyledCommonProps}\n`;\nexport const Footer = styled('footer')`\n ${xStyledCommonProps}\n`;\nexport const Header = styled('header')`\n ${xStyledCommonProps}\n`;\nexport const H1 = styled('h1')`\n ${xStyledCommonProps}\n`;\nexport const H2 = styled('h2')`\n ${xStyledCommonProps}\n`;\nexport const H3 = styled('h3')`\n ${xStyledCommonProps}\n`;\nexport const H4 = styled('h4')`\n ${xStyledCommonProps}\n`;\nexport const H5 = styled('h5')`\n ${xStyledCommonProps}\n`;\nexport const H6 = styled('h6')`\n ${xStyledCommonProps}\n`;\nexport const Hgroup = styled('hgroup')`\n ${xStyledCommonProps}\n`;\nexport const Main = styled('main')`\n ${xStyledCommonProps}\n`;\nexport const Nav = styled('nav')`\n ${xStyledCommonProps}\n`;\nexport const Section = styled('section')`\n ${xStyledCommonProps}\n`;\nexport const Search = styled('search')`\n ${xStyledCommonProps}\n`;\nexport const Blockquote = styled('blockquote')`\n ${xStyledCommonProps}\n`;\nexport const Dd = styled('dd')`\n ${xStyledCommonProps}\n`;\nexport const Div = styled('div')`\n ${xStyledCommonProps}\n`;\nexport const Dl = styled('dl')`\n ${xStyledCommonProps}\n`;\nexport const Dt = styled('dt')`\n ${xStyledCommonProps}\n`;\nexport const Figcaption = styled('figcaption')`\n ${xStyledCommonProps}\n`;\nexport const Figure = styled('figure')`\n ${xStyledCommonProps}\n`;\nexport const Hr = styled('hr')`\n ${xStyledCommonProps}\n`;\nexport const Li = styled('li')`\n ${xStyledCommonProps}\n`;\nexport const Menu = styled('menu')`\n ${xStyledCommonProps}\n`;\nexport const Ol = styled('ol')`\n ${xStyledCommonProps}\n`;\nexport const P = styled('p')`\n ${xStyledCommonProps}\n`;\nexport const Pre = styled('pre')`\n ${xStyledCommonProps}\n`;\nexport const Ul = styled('ul')`\n ${xStyledCommonProps}\n`;\nexport const A = styled('a')`\n ${xStyledCommonProps}\n`;\nexport const Abbr = styled('abbr')`\n ${xStyledCommonProps}\n`;\nexport const B = styled('b')`\n ${xStyledCommonProps}\n`;\nexport const Bdi = styled('bdi')`\n ${xStyledCommonProps}\n`;\nexport const Bdo = styled('bdo')`\n ${xStyledCommonProps}\n`;\nexport const Br = styled('br')`\n ${xStyledCommonProps}\n`;\nexport const Cite = styled('cite')`\n ${xStyledCommonProps}\n`;\nexport const Code = styled('code')`\n ${xStyledCommonProps}\n`;\nexport const Data = styled('data')`\n ${xStyledCommonProps}\n`;\nexport const Dfn = styled('dfn')`\n ${xStyledCommonProps}\n`;\nexport const Em = styled('em')`\n ${xStyledCommonProps}\n`;\nexport const I = styled('i')`\n ${xStyledCommonProps}\n`;\nexport const Kbd = styled('kbd')`\n ${xStyledCommonProps}\n`;\nexport const Mark = styled('mark')`\n ${xStyledCommonProps}\n`;\nexport const Q = styled('q')`\n ${xStyledCommonProps}\n`;\nexport const Rp = styled('rp')`\n ${xStyledCommonProps}\n`;\nexport const Rt = styled('rt')`\n ${xStyledCommonProps}\n`;\nexport const Ruby = styled('ruby')`\n ${xStyledCommonProps}\n`;\nexport const S = styled('s')`\n ${xStyledCommonProps}\n`;\nexport const Samp = styled('samp')`\n ${xStyledCommonProps}\n`;\nexport const Small = styled('small')`\n ${xStyledCommonProps}\n`;\nexport const Span = styled('span')`\n ${xStyledCommonProps}\n`;\nexport const Strong = styled('strong')`\n ${xStyledCommonProps}\n`;\nexport const Sub = styled('sub')`\n ${xStyledCommonProps}\n`;\nexport const Sup = styled('sup')`\n ${xStyledCommonProps}\n`;\nexport const Time = styled('time')`\n ${xStyledCommonProps}\n`;\nexport const U = styled('u')`\n ${xStyledCommonProps}\n`;\nexport const Wbr = styled('wbr')`\n ${xStyledCommonProps}\n`;\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAGvB,SAAS,0BAA0B;AAE5B,MAAM,UAAU,OAAO,SAAS;AAAA,IACnC,kBAAkB;AAAA;AAEf,MAAM,UAAU,OAAO,SAAS;AAAA,IACnC,kBAAkB;AAAA;AAEf,MAAM,QAAQ,OAAO,OAAO;AAAA,IAC/B,kBAAkB;AAAA;AAEf,MAAM,SAAS,OAAO,QAAQ;AAAA,IACjC,kBAAkB;AAAA;AAEf,MAAM,SAAS,OAAO,QAAQ;AAAA,IACjC,kBAAkB;AAAA;AAEf,MAAM,KAAK,OAAO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A,IACvB,kBAAkB;AAAA;AAEf,MAAM,OAAO,OAAO,MAAM;AAAA,IAC7B,kBAAkB;AAAA;AAEf,MAAM,QAAQ,OAAO,OAAO;AAAA,IAC/B,kBAAkB;AAAA;AAEf,MAAM,OAAO,OAAO,MAAM;AAAA,IAC7B,kBAAkB;AAAA;AAEf,MAAM,SAAS,OAAO,QAAQ;AAAA,IACjC,kBAAkB;AAAA;AAEf,MAAM,MAAM,OAAO,KAAK;AAAA,IAC3B,kBAAkB;AAAA;AAEf,MAAM,MAAM,OAAO,KAAK;AAAA,IAC3B,kBAAkB;AAAA;AAEf,MAAM,OAAO,OAAO,MAAM;AAAA,IAC7B,kBAAkB;AAAA;AAEf,MAAM,IAAI,OAAO,GAAG;AAAA,IACvB,kBAAkB;AAAA;AAEf,MAAM,MAAM,OAAO,KAAK;AAAA,IAC3B,kBAAkB;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,67 +1,56 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
export * from "./globalStyles.js";
|
|
3
|
-
export * from "./spaceUtilities.js";
|
|
4
|
-
export * from "./mobileUtilities.js";
|
|
5
|
-
export * from "./utils.js";
|
|
6
|
-
export * from "./arithmetic.js";
|
|
7
|
-
export * from "./th.js";
|
|
8
|
-
export * from "./theme.js";
|
|
9
|
-
export * from "./styled/index.js";
|
|
10
|
-
import { position, typography } from "@xstyled/system";
|
|
11
|
-
import { themeProviderHOC } from "./themeProviderHOC.js";
|
|
12
2
|
import { ThemeContext } from "@xstyled/styled-components";
|
|
13
|
-
import {
|
|
3
|
+
import { position, typography } from "@xstyled/system";
|
|
14
4
|
import {
|
|
5
|
+
A,
|
|
6
|
+
Abbr,
|
|
15
7
|
Address,
|
|
16
8
|
Article,
|
|
17
9
|
Aside,
|
|
10
|
+
B,
|
|
11
|
+
Bdi,
|
|
12
|
+
Bdo,
|
|
13
|
+
Blockquote,
|
|
14
|
+
Br,
|
|
15
|
+
Cite,
|
|
16
|
+
Code,
|
|
17
|
+
Data,
|
|
18
|
+
Dd,
|
|
19
|
+
Dfn,
|
|
20
|
+
Div,
|
|
21
|
+
Dl,
|
|
22
|
+
Dt,
|
|
23
|
+
Em,
|
|
24
|
+
Figcaption,
|
|
25
|
+
Figure,
|
|
18
26
|
Footer,
|
|
19
|
-
Header,
|
|
20
27
|
H1,
|
|
21
28
|
H2,
|
|
22
29
|
H3,
|
|
23
30
|
H4,
|
|
24
31
|
H5,
|
|
25
32
|
H6,
|
|
33
|
+
Header,
|
|
26
34
|
Hgroup,
|
|
27
|
-
Main,
|
|
28
|
-
Nav,
|
|
29
|
-
Section,
|
|
30
|
-
Search,
|
|
31
|
-
Blockquote,
|
|
32
|
-
Dd,
|
|
33
|
-
Div,
|
|
34
|
-
Dl,
|
|
35
|
-
Dt,
|
|
36
|
-
Figcaption,
|
|
37
|
-
Figure,
|
|
38
35
|
Hr,
|
|
36
|
+
I,
|
|
37
|
+
Kbd,
|
|
39
38
|
Li,
|
|
39
|
+
Main,
|
|
40
|
+
Mark,
|
|
40
41
|
Menu,
|
|
42
|
+
Nav,
|
|
41
43
|
Ol,
|
|
42
44
|
P,
|
|
43
45
|
Pre,
|
|
44
|
-
Ul,
|
|
45
|
-
A,
|
|
46
|
-
Abbr,
|
|
47
|
-
B,
|
|
48
|
-
Bdi,
|
|
49
|
-
Bdo,
|
|
50
|
-
Br,
|
|
51
|
-
Cite,
|
|
52
|
-
Code,
|
|
53
|
-
Data,
|
|
54
|
-
Dfn,
|
|
55
|
-
Em,
|
|
56
|
-
I,
|
|
57
|
-
Kbd,
|
|
58
|
-
Mark,
|
|
59
46
|
Q,
|
|
60
47
|
Rp,
|
|
61
48
|
Rt,
|
|
62
49
|
Ruby,
|
|
63
50
|
S,
|
|
64
51
|
Samp,
|
|
52
|
+
Search,
|
|
53
|
+
Section,
|
|
65
54
|
Small,
|
|
66
55
|
Span,
|
|
67
56
|
Strong,
|
|
@@ -69,9 +58,20 @@ import {
|
|
|
69
58
|
Sup,
|
|
70
59
|
Time,
|
|
71
60
|
U,
|
|
61
|
+
Ul,
|
|
72
62
|
Wbr
|
|
73
63
|
} from "./HtmlComponents.js";
|
|
64
|
+
export * from "./arithmetic.js";
|
|
65
|
+
export * from "./globalStyles.js";
|
|
74
66
|
export * from "./mergeRefs.js";
|
|
67
|
+
export * from "./mobileUtilities.js";
|
|
68
|
+
export * from "./spaceUtilities.js";
|
|
69
|
+
export * from "./styled/index.js";
|
|
70
|
+
export * from "./th.js";
|
|
71
|
+
export * from "./theme.js";
|
|
72
|
+
import { themeProviderHOC } from "./themeProviderHOC.js";
|
|
73
|
+
export * from "./utils.js";
|
|
74
|
+
import { XStyledWrapper, xStyledCommonProps } from "./xStyledWrapper.js";
|
|
75
75
|
import { useGetLayoutMode } from "./useGetLayoutMode.js";
|
|
76
76
|
export {
|
|
77
77
|
A,
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { ThemeContext } from '@xstyled/styled-components';\nexport { position, typography } from '@xstyled/system';\nexport {\n A,\n Abbr,\n Address,\n Article,\n Aside,\n B,\n Bdi,\n Bdo,\n Blockquote,\n Br,\n Cite,\n Code,\n Data,\n Dd,\n Dfn,\n Div,\n Dl,\n Dt,\n Em,\n Figcaption,\n Figure,\n Footer,\n H1,\n H2,\n H3,\n H4,\n H5,\n H6,\n Header,\n Hgroup,\n Hr,\n I,\n Kbd,\n Li,\n Main,\n Mark,\n Menu,\n Nav,\n Ol,\n P,\n Pre,\n Q,\n Rp,\n Rt,\n Ruby,\n S,\n Samp,\n Search,\n Section,\n Small,\n Span,\n Strong,\n Sub,\n Sup,\n Time,\n U,\n Ul,\n Wbr,\n} from './HtmlComponents.js';\nexport * from './arithmetic.js';\nexport * from './globalStyles.js';\nexport * from './mergeRefs.js';\nexport * from './mobileUtilities.js';\nexport * from './spaceUtilities.js';\nexport * from './styled/index.js';\nexport * from './th.js';\nexport * from './theme.js';\nexport { themeProviderHOC } from './themeProviderHOC.js';\nexport * from './utils.js';\nexport { XStyledWrapper, xStyledCommonProps } from './xStyledWrapper.js';\n// styled components uses csstype types internally but doesn't solve the types export correctly\n// so to fix ts2742 we need to re-export the types from csstype...\nexport type * from 'csstype';\nexport { useGetLayoutMode } from './useGetLayoutMode.js';\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,oBAAoB;AAC7B,SAAS,UAAU,kBAAkB;AACrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,cAAc;AACd,SAAS,wBAAwB;AACjC,cAAc;AACd,SAAS,gBAAgB,0BAA0B;AAInD,SAAS,wBAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/styled/expressions/genStyleOverridesExpression.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { CSSObject } from 'styled-components';\nimport type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\n\nconst getStyleOverrides = (name: string, theme: Theme): CSSObject | null =>\n theme.components?.[name]?.styleOverrides || null;\n\nexport const genStyleOverridesExpression =\n (componentName: string, componentSlot: string) => (props: PropsWithTheme) => {\n const styleOverrides = getStyleOverrides(componentName, props.theme ?? defaultTheme);\n if (styleOverrides) {\n return [styleOverrides[componentSlot]];\n }\n return null;\n };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,SAAS,oBAAoB;AAEtC,MAAM,oBAAoB,CAAC,MAAc,UACvC,MAAM,aAAa,IAAI,GAAG,kBAAkB;AAEvC,MAAM,8BACX,CAAC,eAAuB,kBAA0B,CAAC,UAA0B;AAC3E,QAAM,iBAAiB,kBAAkB,eAAe,MAAM,SAAS,YAAY;AACnF,MAAI,gBAAgB;AAClB,WAAO,CAAC,eAAe,aAAa,CAAC;AAAA,EACvC;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/styled/expressions/genVariantOverridesExpression.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { CSSObject } from 'styled-components';\nimport type { PropsWithTheme, Theme } from '../types.js';\nimport { theme as defaultTheme } from '../../theme.js';\nimport { propsToClassKey } from '../helpers.js';\n\nconst getVariantStyles = (name: string, theme: Theme): Record<string, CSSObject> => {\n const variants = theme.components?.[name]?.variants || [];\n\n return variants.reduce(\n (styles, definition) => {\n const key = propsToClassKey(definition.props);\n styles[key] = definition.style;\n return styles;\n },\n {} as Record<string, CSSObject>,\n );\n};\n\nexport const genVariantOverridesExpression = (componentName: string) => (props: PropsWithTheme) => {\n const theme = props.theme ?? defaultTheme;\n const variantStyles = getVariantStyles(componentName, theme);\n\n const themeVariants = theme?.components?.[componentName]?.variants || [];\n\n return themeVariants.reduce(\n (resultingStyles, themeVariant) => {\n const isMatch = Object.keys(themeVariant.props).every((key) => props[key] === themeVariant.props[key]);\n if (isMatch) {\n resultingStyles.push(variantStyles[propsToClassKey(themeVariant.props)]);\n }\n return resultingStyles;\n },\n [] as CSSObject[keyof CSSObject][],\n );\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACEvB,SAAS,SAAS,oBAAoB;AACtC,SAAS,uBAAuB;AAEhC,MAAM,mBAAmB,CAAC,MAAc,UAA4C;AAClF,QAAM,WAAW,MAAM,aAAa,IAAI,GAAG,YAAY,CAAC;AAExD,SAAO,SAAS;AAAA,IACd,CAAC,QAAQ,eAAe;AACtB,YAAM,MAAM,gBAAgB,WAAW,KAAK;AAC5C,aAAO,GAAG,IAAI,WAAW;AACzB,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;AAEO,MAAM,gCAAgC,CAAC,kBAA0B,CAAC,UAA0B;AACjG,QAAM,QAAQ,MAAM,SAAS;AAC7B,QAAM,gBAAgB,iBAAiB,eAAe,KAAK;AAE3D,QAAM,gBAAgB,OAAO,aAAa,aAAa,GAAG,YAAY,CAAC;AAEvE,SAAO,cAAc;AAAA,IACnB,CAAC,iBAAiB,iBAAiB;AACjC,YAAM,UAAU,OAAO,KAAK,aAAa,KAAK,EAAE,MAAM,CAAC,QAAQ,MAAM,GAAG,MAAM,aAAa,MAAM,GAAG,CAAC;AACrG,UAAI,SAAS;AACX,wBAAgB,KAAK,cAAc,gBAAgB,aAAa,KAAK,CAAC,CAAC;AAAA,MACzE;AACA,aAAO;AAAA,IACT;AAAA,IACA,CAAC;AAAA,EACH;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -7,7 +7,8 @@ const fixStyleArg = (styleArg, numberOfNewExpressions) => {
|
|
|
7
7
|
return Object.assign([...styleArg, ...placeholders], {
|
|
8
8
|
raw: [...styleArg.raw, ...placeholders]
|
|
9
9
|
});
|
|
10
|
-
}
|
|
10
|
+
}
|
|
11
|
+
if (typeof styleArg === "function") {
|
|
11
12
|
return (props) => styleArg({ ...props, theme: props.theme ?? defaultTheme });
|
|
12
13
|
}
|
|
13
14
|
return styleArg;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/fixStyleArg.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { theme as defaultTheme } from '../theme.js';\nimport type { PropsWithTheme, StyleArg } from './types.js';\n\nconst isTemplateStringsArray = (styleArg: StyleArg): styleArg is TemplateStringsArray => Array.isArray(styleArg);\n\nexport const fixStyleArg = (styleArg: StyleArg, numberOfNewExpressions: number): StyleArg => {\n if (isTemplateStringsArray(styleArg) && numberOfNewExpressions > 0) {\n // Here we are adding placeholders for all the new functions that we are gonna call\n const placeholders = new Array(numberOfNewExpressions).fill('') as string[];\n return Object.assign([...styleArg, ...placeholders], {\n raw: [...styleArg.raw, ...placeholders],\n });\n }
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,SAAS,oBAAoB;AAGtC,MAAM,yBAAyB,CAAC,aAAyD,MAAM,QAAQ,QAAQ;AAExG,MAAM,cAAc,CAAC,UAAoB,2BAA6C;AAC3F,MAAI,uBAAuB,QAAQ,KAAK,yBAAyB,GAAG;AAElE,UAAM,eAAe,IAAI,MAAM,sBAAsB,EAAE,KAAK,EAAE;AAC9D,WAAO,OAAO,OAAO,CAAC,GAAG,UAAU,GAAG,YAAY,GAAG;AAAA,MACnD,KAAK,CAAC,GAAG,SAAS,KAAK,GAAG,YAAY;AAAA,IACxC,CAAC;AAAA,EACH,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { theme as defaultTheme } from '../theme.js';\nimport type { PropsWithTheme, StyleArg } from './types.js';\n\nconst isTemplateStringsArray = (styleArg: StyleArg): styleArg is TemplateStringsArray => Array.isArray(styleArg);\n\nexport const fixStyleArg = (styleArg: StyleArg, numberOfNewExpressions: number): StyleArg => {\n if (isTemplateStringsArray(styleArg) && numberOfNewExpressions > 0) {\n // Here we are adding placeholders for all the new functions that we are gonna call\n const placeholders = new Array(numberOfNewExpressions).fill('') as string[];\n return Object.assign([...styleArg, ...placeholders], {\n raw: [...styleArg.raw, ...placeholders],\n });\n }\n if (typeof styleArg === 'function') {\n // Here we just coerce with the default theme\n return (props: PropsWithTheme) => styleArg({ ...props, theme: props.theme ?? defaultTheme });\n }\n return styleArg;\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,SAAS,oBAAoB;AAGtC,MAAM,yBAAyB,CAAC,aAAyD,MAAM,QAAQ,QAAQ;AAExG,MAAM,cAAc,CAAC,UAAoB,2BAA6C;AAC3F,MAAI,uBAAuB,QAAQ,KAAK,yBAAyB,GAAG;AAElE,UAAM,eAAe,IAAI,MAAM,sBAAsB,EAAE,KAAK,EAAE;AAC9D,WAAO,OAAO,OAAO,CAAC,GAAG,UAAU,GAAG,YAAY,GAAG;AAAA,MACnD,KAAK,CAAC,GAAG,SAAS,KAAK,GAAG,YAAY;AAAA,IACxC,CAAC;AAAA,EACH;AACA,MAAI,OAAO,aAAa,YAAY;AAElC,WAAO,CAAC,UAA0B,SAAS,EAAE,GAAG,OAAO,OAAO,MAAM,SAAS,aAAa,CAAC;AAAA,EAC7F;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from "react";
|
|
3
4
|
import { checkNamingConvention } from "./checkNamingConvention.js";
|
|
4
5
|
import { styled as baseStyled } from "./system.js";
|
|
5
6
|
import { dsStyledComponentTransform, magicCssTransform } from "./transformers/index.js";
|
|
@@ -10,7 +11,6 @@ import { generateAutoCalculated } from "./generated-attributes/index.js";
|
|
|
10
11
|
import { getPartProps } from "./generated-attributes/generateAttributes.js";
|
|
11
12
|
import { mergeRefs } from "./generated-attributes/utils/refMerger.js";
|
|
12
13
|
import { displayNameToKebabCase, displayNameToPropCase } from "./helpers.js";
|
|
13
|
-
import { useMemo } from "react";
|
|
14
14
|
import { callbackMerger } from "./generated-attributes/utils/callbackMerger.js";
|
|
15
15
|
const defaultOptions = {
|
|
16
16
|
name: null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/styled/styledFunction.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { styled as baseStyled } from './system.js';\nimport { dsStyledComponentTransform, magicCssTransform } from './transformers/index.js';\nimport type {\n AnyStyledRef,\n Options,\n OwnerInterface,\n InnerRefInterface,\n Theme,\n ThemedStyledFunctionBase,\n} from './types.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\nimport { getPartProps } from './generated-attributes/generateAttributes.js';\nimport { mergeRefs } from './generated-attributes/utils/refMerger.js';\nimport { displayNameToKebabCase, displayNameToPropCase } from './helpers.js';\nimport
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACsJV;AAlJb,SAAS,6BAA6B;AACtC,SAAS,UAAU,kBAAkB;AACrC,SAAS,4BAA4B,yBAAyB;AAS9D,SAAS,8BAA8B;AACvC,SAAS,6BAA6B,qCAAqC;AAC3E,SAAS,mBAAmB;AAC5B,SAAS,8BAA8B;AACvC,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,wBAAwB,6BAA6B;AAC9D,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable no-unused-vars */\n/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';\nimport React, { useMemo } from 'react';\nimport { checkNamingConvention } from './checkNamingConvention.js';\nimport { styled as baseStyled } from './system.js';\nimport { dsStyledComponentTransform, magicCssTransform } from './transformers/index.js';\nimport type {\n AnyStyledRef,\n Options,\n OwnerInterface,\n InnerRefInterface,\n Theme,\n ThemedStyledFunctionBase,\n} from './types.js';\nimport { coerceWithDefaultTheme } from './coerceWithDefaultTheme.js';\nimport { genStyleOverridesExpression, genVariantOverridesExpression } from './expressions/index.js';\nimport { fixStyleArg } from './fixStyleArg.js';\nimport { generateAutoCalculated } from './generated-attributes/index.js';\nimport { getPartProps } from './generated-attributes/generateAttributes.js';\nimport { mergeRefs } from './generated-attributes/utils/refMerger.js';\nimport { displayNameToKebabCase, displayNameToPropCase } from './helpers.js';\nimport { callbackMerger } from './generated-attributes/utils/callbackMerger.js';\n\nconst defaultOptions: Options = {\n name: null,\n slot: null,\n};\n\nexport const styledFunction = <C extends AnyStyledComponent | keyof JSX.IntrinsicElements | React.ComponentType<any>>(\n tag: C,\n options: Options = defaultOptions,\n) => {\n const { name: componentName, slot: componentSlot } = options;\n\n checkNamingConvention(componentName, componentSlot);\n\n // Here we use the `as` because when C is keyof JSX.IntrinsicElements we get `never` for the attributes generic\n // We want to account for string | number | symbol that's why we transform it to `keyof any`\n const baseStyledResolver = baseStyled(tag) as unknown as ThemedStyledFunction<C, Theme, {}, keyof any>;\n\n // Due to the recursive natura of this function, we can't type it properly\n // Since we can apply .attrs or .withConfig, we are not sure on the type of the returned function\n // @ts-expect-error explained above\n const dsStyledResolver: ThemedStyledFunctionBase<C, Theme> = (styleArg, ...expressions) => {\n /**\n * Here we apply a transformation to the expressions only.\n * Since this resolver is returning a HOC of a styled-component, the syntax support for\n * selecting the className of another styled-component is not available anymore.\n * That's why we assign it a `dsStyledComponnentId`, we will replace the component's call for\n * the corresponding id\n */\n const expressionsWithDsStyledComponentId = dsStyledComponentTransform(expressions);\n\n /**\n * Here we apply a CSS transformation to support MAGIC styled components\n * This makes it possible to use the following syntax:\n * color: neutral-100;\n * background-color: success-900;\n */\n const [styleArgWithMagic, expressionsWithMagic] = magicCssTransform(styleArg, expressionsWithDsStyledComponentId);\n\n /**\n * We coerce all the already written expressions with the default theme\n * This prevents styled components to break when a theme is not provided\n * either with the HOC or the ThemeProvider\n */\n const expressionsWithThemeCoerced = coerceWithDefaultTheme(expressionsWithMagic);\n\n if (componentName && componentSlot) {\n // Here we add the style overrides expression\n expressionsWithThemeCoerced.push(genStyleOverridesExpression(componentName, componentSlot));\n }\n\n if (componentName && componentSlot === 'root') {\n // Here we add the variant overrides from the user (only for the root slot\n expressionsWithThemeCoerced.push(genVariantOverridesExpression(componentName));\n }\n\n /**\n * Here we will fix the format of the style argument\n * We possible added some new expressions into the mix,\n * so we need to properly adjust the style arg\n */\n const numOfExpressionsAdded = expressionsWithThemeCoerced.length - expressionsWithMagic.length;\n\n const fixedStyleArg = fixStyleArg(styleArgWithMagic, numOfExpressionsAdded);\n\n // We will add autocalculated attributes to the styled component\n const [displayName, attributes] = generateAutoCalculated(options);\n\n // For each attribute function, we will call `attrs` func with it\n // This will add the attributes to the styled component\n const baseStyledResolverWithAttributes = attributes.reduce<typeof baseStyledResolver>(\n (curStyledResolver, attributeFunc) => curStyledResolver.attrs(attributeFunc),\n baseStyledResolver,\n );\n\n const Component = baseStyledResolverWithAttributes(fixedStyleArg, ...expressionsWithThemeCoerced);\n\n const ComponentWithRefsMerged = (props: OwnerInterface & InnerRefInterface<C> & { 'data-testid'?: string }) => {\n // we may or not have data-testid at this point, so we need to calculate it\n const dataTestId = props['data-testid'] ?? (displayName !== null ? displayNameToKebabCase(displayName) : '');\n // we also need to calculate dataDimsumSlot at this point\n const dataDimsumSlot = displayName !== null ? displayNameToPropCase(displayName) : '';\n // then we get the part props for this slot, and we cast it to use refs\n const partProps = getPartProps({\n ...props,\n 'data-testid': dataTestId,\n 'data-dimsum-slot': dataDimsumSlot,\n }) as {\n innerRef?: AnyStyledRef<HTMLElement>;\n };\n\n // then we merge the callbacks from the props with the ones from the part\n // this object also has all global props from the parts\n const resultingObjectWithCallbackMerged = callbackMerger(props, partProps);\n\n const mergedRef = useMemo(\n () => mergeRefs(props.innerRef, partProps.innerRef),\n [props.innerRef, partProps.innerRef],\n );\n\n // We don't want to pass the owner props to the component down the line\n const { getOwnerProps, getOwnerPropsArguments, ...restProps } = props;\n // TODO:\n // deploy the following code and see if we break something in a dedicated effort ASAP\n // let ref = undefined;\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore : as of thue 16 may 2024, Component.target.$$typeof is undefined for non-native react components\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n // if (typeof Component?.target === 'string') {\n // ref = mergedRef;\n // }\n\n const propsWithRefMerged = {\n ...restProps,\n ...resultingObjectWithCallbackMerged,\n // ref: ref,\n ref: mergedRef,\n innerRef: mergedRef,\n } as React.ComponentProps<C>;\n\n // TODO: check if we need to pass the ref to the component\n // Check $$typeof to see if it's a react-forward-ref\n // Check dsStyledComponentId to see if it's a styled component\n // Check what to do with span, div, etc.\n // Other cases should not receive ref...?\n\n return <Component {...propsWithRefMerged} />;\n };\n\n if (displayName !== null) {\n Component.displayName = displayName;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore We use dsStyledComponent to access the original's component id\n ComponentWithRefsMerged.dsStyledComponentId = Component.styledComponentId as string;\n // eslint-disable-next-line @typescript-eslint/unbound-method\n ComponentWithRefsMerged.toString = Component.toString;\n\n return ComponentWithRefsMerged;\n };\n\n // Here we use arrow functions to preserve the `this` context\n const styledAttributes = {\n attrs: ((...args) => {\n baseStyledResolver.attrs(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['attrs'],\n withConfig: ((...args) => {\n baseStyledResolver.withConfig(...args);\n return dsStyledResolver;\n }) as (typeof baseStyledResolver)['withConfig'],\n };\n\n return Object.assign(dsStyledResolver, styledAttributes);\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACsJV;AAlJb,SAAgB,eAAe;AAC/B,SAAS,6BAA6B;AACtC,SAAS,UAAU,kBAAkB;AACrC,SAAS,4BAA4B,yBAAyB;AAS9D,SAAS,8BAA8B;AACvC,SAAS,6BAA6B,qCAAqC;AAC3E,SAAS,mBAAmB;AAC5B,SAAS,8BAA8B;AACvC,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAC1B,SAAS,w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,QAChB,MAAM,UAAU,MAAM,UAAU,UAAU,QAAQ;AAAA,QAClD,CAAC,MAAM,UAAU,UAAU,QAAQ;AAAA,MACrC;AAGA,YAAM,EAAE,eAAe,wBAAwB,GAAG,UAAU,IAAI;AAWhE,YAAM,qBAAqB;AAAA,QACzB,GAAG;AAAA,QACH,GAAG;AAAA;AAAA,QAEH,KAAK;AAAA,QACL,UAAU;AAAA,MACZ;AAQA,aAAO,oBAAC,aAAW,GAAG,oBAAoB;AAAA,IAC5C;AAEA,QAAI,gBAAgB,MAAM;AACxB,gBAAU,cAAc;AAAA,IAC1B;AAIA,4BAAwB,sBAAsB,UAAU;AAExD,4BAAwB,WAAW,UAAU;AAE7C,WAAO;AAAA,EACT;AAGA,QAAM,mBAAmB;AAAA,IACvB,OAAQ,IAAI,SAAS;AACnB,yBAAmB,MAAM,GAAG,IAAI;AAChC,aAAO;AAAA,IACT;AAAA,IACA,YAAa,IAAI,SAAS;AACxB,yBAAmB,WAAW,GAAG,IAAI;AACrC,aAAO;AAAA,IACT;AAAA,EACF;AAEA,SAAO,OAAO,OAAO,kBAAkB,gBAAgB;AACzD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../scripts/build/transpile/react-shim.js", "../../../../src/styled/transformers/magicCssTransform.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { th } from '../../th.js';\nimport type { Expressions, StyleArg } from '../types.js';\n\ntype MagicCssTransform = (styleArg: StyleArg, expressions: Expressions) => [StyleArg, Expressions];\n\n// This file is heavily inspired by https://github.com/gregberge/xstyled/blob/c0c92b459bb3a5de46d7854be3667861f816baa5/packages/core/src/transform.ts#L65\n// Please refer to that file to understand of the idea of the css transformer\n\nconst COLOR_REGEX = /(neutral|brand|success|warning|danger)-(100|200|300|400|500|600|700|800|900|000|050|080)/g;\n\nconst magicfyCss = (rawValue: string): [string[], Expressions] => {\n let matches;\n let lastIndex = 0;\n const splittedValue: string[] = [];\n const themeGetters = [];\n while ((matches = COLOR_REGEX.exec(rawValue))) {\n const [match] = matches;\n splittedValue.push(rawValue.slice(lastIndex, matches.index));\n\n themeGetters.push(th.color(match, match));\n\n lastIndex = matches.index + match.length;\n }\n splittedValue.push(rawValue.slice(lastIndex, rawValue.length));\n return [splittedValue, themeGetters];\n};\n\nexport const magicCssTransform: MagicCssTransform = (styleArg, expressions) => {\n if (!Array.isArray(styleArg)) return [styleArg, expressions];\n\n const magicStyleArg: string[] = [];\n const magicExpressions: Expressions = [];\n\n const templateStringArray = styleArg as TemplateStringsArray;\n\n templateStringArray.forEach((templateString, index) => {\n const [splittedTemplateString, themeGetters] = magicfyCss(templateString);\n magicStyleArg.push(...splittedTemplateString);\n magicExpressions.push(...themeGetters);\n if (index < expressions.length) magicExpressions.push(expressions[index]);\n });\n\n return [Object.assign(magicStyleArg, { raw: [...magicStyleArg] }), magicExpressions];\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,UAAU;AAQnB,MAAM,cAAc;AAEpB,MAAM,aAAa,CAAC,aAA8C;AAChE,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,gBAA0B,CAAC;AACjC,QAAM,eAAe,CAAC;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { th } from '../../th.js';\nimport type { Expressions, StyleArg } from '../types.js';\n\ntype MagicCssTransform = (styleArg: StyleArg, expressions: Expressions) => [StyleArg, Expressions];\n\n// This file is heavily inspired by https://github.com/gregberge/xstyled/blob/c0c92b459bb3a5de46d7854be3667861f816baa5/packages/core/src/transform.ts#L65\n// Please refer to that file to understand of the idea of the css transformer\n\nconst COLOR_REGEX = /(neutral|brand|success|warning|danger)-(100|200|300|400|500|600|700|800|900|000|050|080)/g;\n\nconst magicfyCss = (rawValue: string): [string[], Expressions] => {\n let matches;\n let lastIndex = 0;\n const splittedValue: string[] = [];\n const themeGetters = [];\n // what is the while with an assignment about???\n // not broken so not touching but what?\n // eslint-disable-next-line no-cond-assign\n while ((matches = COLOR_REGEX.exec(rawValue))) {\n const [match] = matches;\n splittedValue.push(rawValue.slice(lastIndex, matches.index));\n\n themeGetters.push(th.color(match, match));\n\n lastIndex = matches.index + match.length;\n }\n splittedValue.push(rawValue.slice(lastIndex, rawValue.length));\n return [splittedValue, themeGetters];\n};\n\nexport const magicCssTransform: MagicCssTransform = (styleArg, expressions) => {\n if (!Array.isArray(styleArg)) return [styleArg, expressions];\n\n const magicStyleArg: string[] = [];\n const magicExpressions: Expressions = [];\n\n const templateStringArray = styleArg as TemplateStringsArray;\n\n templateStringArray.forEach((templateString, index) => {\n const [splittedTemplateString, themeGetters] = magicfyCss(templateString);\n magicStyleArg.push(...splittedTemplateString);\n magicExpressions.push(...themeGetters);\n if (index < expressions.length) magicExpressions.push(expressions[index]);\n });\n\n return [Object.assign(magicStyleArg, { raw: [...magicStyleArg] }), magicExpressions];\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,UAAU;AAQnB,MAAM,cAAc;AAEpB,MAAM,aAAa,CAAC,aAA8C;AAChE,MAAI;AACJ,MAAI,YAAY;AAChB,QAAM,gBAA0B,CAAC;AACjC,QAAM,eAAe,CAAC;AAItB,SAAQ,UAAU,YAAY,KAAK,QAAQ,GAAI;AAC7C,UAAM,CAAC,KAAK,IAAI;AAChB,kBAAc,KAAK,SAAS,MAAM,WAAW,QAAQ,KAAK,CAAC;AAE3D,iBAAa,KAAK,GAAG,MAAM,OAAO,KAAK,CAAC;AAExC,gBAAY,QAAQ,QAAQ,MAAM;AAAA,EACpC;AACA,gBAAc,KAAK,SAAS,MAAM,WAAW,SAAS,MAAM,CAAC;AAC7D,SAAO,CAAC,eAAe,YAAY;AACrC;AAEO,MAAM,oBAAuC,CAAC,UAAU,gBAAgB;AAC7E,MAAI,CAAC,MAAM,QAAQ,QAAQ,EAAG,QAAO,CAAC,UAAU,WAAW;AAE3D,QAAM,gBAA0B,CAAC;AACjC,QAAM,mBAAgC,CAAC;AAEvC,QAAM,sBAAsB;AAE5B,sBAAoB,QAAQ,CAAC,gBAAgB,UAAU;AACrD,UAAM,CAAC,wBAAwB,YAAY,IAAI,WAAW,cAAc;AACxE,kBAAc,KAAK,GAAG,sBAAsB;AAC5C,qBAAiB,KAAK,GAAG,YAAY;AACrC,QAAI,QAAQ,YAAY,OAAQ,kBAAiB,KAAK,YAAY,KAAK,CAAC;AAAA,EAC1E,CAAC;AAED,SAAO,CAAC,OAAO,OAAO,eAAe,EAAE,KAAK,CAAC,GAAG,aAAa,EAAE,CAAC,GAAG,gBAAgB;AACrF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
export declare const Address: import("styled-components").StyledComponent<"address", import("./
|
|
2
|
-
export declare const Article: import("styled-components").StyledComponent<"article", import("./
|
|
3
|
-
export declare const Aside: import("styled-components").StyledComponent<"aside", import("./
|
|
4
|
-
export declare const Footer: import("styled-components").StyledComponent<"footer", import("./
|
|
5
|
-
export declare const Header: import("styled-components").StyledComponent<"header", import("./
|
|
6
|
-
export declare const H1: import("styled-components").StyledComponent<"h1", import("./
|
|
7
|
-
export declare const H2: import("styled-components").StyledComponent<"h2", import("./
|
|
8
|
-
export declare const H3: import("styled-components").StyledComponent<"h3", import("./
|
|
9
|
-
export declare const H4: import("styled-components").StyledComponent<"h4", import("./
|
|
10
|
-
export declare const H5: import("styled-components").StyledComponent<"h5", import("./
|
|
11
|
-
export declare const H6: import("styled-components").StyledComponent<"h6", import("./
|
|
12
|
-
export declare const Hgroup: import("styled-components").StyledComponent<"hgroup", import("./
|
|
13
|
-
export declare const Main: import("styled-components").StyledComponent<"main", import("./
|
|
14
|
-
export declare const Nav: import("styled-components").StyledComponent<"nav", import("./
|
|
15
|
-
export declare const Section: import("styled-components").StyledComponent<"section", import("./
|
|
16
|
-
export declare const Search: import("styled-components").StyledComponent<"search", import("./
|
|
17
|
-
export declare const Blockquote: import("styled-components").StyledComponent<"blockquote", import("./
|
|
18
|
-
export declare const Dd: import("styled-components").StyledComponent<"dd", import("./
|
|
19
|
-
export declare const Div: import("styled-components").StyledComponent<"div", import("./
|
|
20
|
-
export declare const Dl: import("styled-components").StyledComponent<"dl", import("./
|
|
21
|
-
export declare const Dt: import("styled-components").StyledComponent<"dt", import("./
|
|
22
|
-
export declare const Figcaption: import("styled-components").StyledComponent<"figcaption", import("./
|
|
23
|
-
export declare const Figure: import("styled-components").StyledComponent<"figure", import("./
|
|
24
|
-
export declare const Hr: import("styled-components").StyledComponent<"hr", import("./
|
|
25
|
-
export declare const Li: import("styled-components").StyledComponent<"li", import("./
|
|
26
|
-
export declare const Menu: import("styled-components").StyledComponent<"menu", import("./
|
|
27
|
-
export declare const Ol: import("styled-components").StyledComponent<"ol", import("./
|
|
28
|
-
export declare const P: import("styled-components").StyledComponent<"p", import("./
|
|
29
|
-
export declare const Pre: import("styled-components").StyledComponent<"pre", import("./
|
|
30
|
-
export declare const Ul: import("styled-components").StyledComponent<"ul", import("./
|
|
31
|
-
export declare const A: import("styled-components").StyledComponent<"a", import("./
|
|
32
|
-
export declare const Abbr: import("styled-components").StyledComponent<"abbr", import("./
|
|
33
|
-
export declare const B: import("styled-components").StyledComponent<"b", import("./
|
|
34
|
-
export declare const Bdi: import("styled-components").StyledComponent<"bdi", import("./
|
|
35
|
-
export declare const Bdo: import("styled-components").StyledComponent<"bdo", import("./
|
|
36
|
-
export declare const Br: import("styled-components").StyledComponent<"br", import("./
|
|
37
|
-
export declare const Cite: import("styled-components").StyledComponent<"cite", import("./
|
|
38
|
-
export declare const Code: import("styled-components").StyledComponent<"code", import("./
|
|
39
|
-
export declare const Data: import("styled-components").StyledComponent<"data", import("./
|
|
40
|
-
export declare const Dfn: import("styled-components").StyledComponent<"dfn", import("./
|
|
41
|
-
export declare const Em: import("styled-components").StyledComponent<"em", import("./
|
|
42
|
-
export declare const I: import("styled-components").StyledComponent<"i", import("./
|
|
43
|
-
export declare const Kbd: import("styled-components").StyledComponent<"kbd", import("./
|
|
44
|
-
export declare const Mark: import("styled-components").StyledComponent<"mark", import("./
|
|
45
|
-
export declare const Q: import("styled-components").StyledComponent<"q", import("./
|
|
46
|
-
export declare const Rp: import("styled-components").StyledComponent<"rp", import("./
|
|
47
|
-
export declare const Rt: import("styled-components").StyledComponent<"rt", import("./
|
|
48
|
-
export declare const Ruby: import("styled-components").StyledComponent<"ruby", import("./
|
|
49
|
-
export declare const S: import("styled-components").StyledComponent<"s", import("./
|
|
50
|
-
export declare const Samp: import("styled-components").StyledComponent<"samp", import("./
|
|
51
|
-
export declare const Small: import("styled-components").StyledComponent<"small", import("./
|
|
52
|
-
export declare const Span: import("styled-components").StyledComponent<"span", import("./
|
|
53
|
-
export declare const Strong: import("styled-components").StyledComponent<"strong", import("./
|
|
54
|
-
export declare const Sub: import("styled-components").StyledComponent<"sub", import("./
|
|
55
|
-
export declare const Sup: import("styled-components").StyledComponent<"sup", import("./
|
|
56
|
-
export declare const Time: import("styled-components").StyledComponent<"time", import("./
|
|
57
|
-
export declare const U: import("styled-components").StyledComponent<"u", import("./
|
|
58
|
-
export declare const Wbr: import("styled-components").StyledComponent<"wbr", import("./
|
|
1
|
+
export declare const Address: import("styled-components").StyledComponent<"address", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"address">, never>;
|
|
2
|
+
export declare const Article: import("styled-components").StyledComponent<"article", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"article">, never>;
|
|
3
|
+
export declare const Aside: import("styled-components").StyledComponent<"aside", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"aside">, never>;
|
|
4
|
+
export declare const Footer: import("styled-components").StyledComponent<"footer", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"footer">, never>;
|
|
5
|
+
export declare const Header: import("styled-components").StyledComponent<"header", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"header">, never>;
|
|
6
|
+
export declare const H1: import("styled-components").StyledComponent<"h1", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"h1">, never>;
|
|
7
|
+
export declare const H2: import("styled-components").StyledComponent<"h2", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"h2">, never>;
|
|
8
|
+
export declare const H3: import("styled-components").StyledComponent<"h3", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"h3">, never>;
|
|
9
|
+
export declare const H4: import("styled-components").StyledComponent<"h4", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"h4">, never>;
|
|
10
|
+
export declare const H5: import("styled-components").StyledComponent<"h5", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"h5">, never>;
|
|
11
|
+
export declare const H6: import("styled-components").StyledComponent<"h6", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"h6">, never>;
|
|
12
|
+
export declare const Hgroup: import("styled-components").StyledComponent<"hgroup", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"hgroup">, never>;
|
|
13
|
+
export declare const Main: import("styled-components").StyledComponent<"main", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"main">, never>;
|
|
14
|
+
export declare const Nav: import("styled-components").StyledComponent<"nav", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"nav">, never>;
|
|
15
|
+
export declare const Section: import("styled-components").StyledComponent<"section", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"section">, never>;
|
|
16
|
+
export declare const Search: import("styled-components").StyledComponent<"search", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"search">, never>;
|
|
17
|
+
export declare const Blockquote: import("styled-components").StyledComponent<"blockquote", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"blockquote">, never>;
|
|
18
|
+
export declare const Dd: import("styled-components").StyledComponent<"dd", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"dd">, never>;
|
|
19
|
+
export declare const Div: import("styled-components").StyledComponent<"div", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"div">, never>;
|
|
20
|
+
export declare const Dl: import("styled-components").StyledComponent<"dl", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"dl">, never>;
|
|
21
|
+
export declare const Dt: import("styled-components").StyledComponent<"dt", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"dt">, never>;
|
|
22
|
+
export declare const Figcaption: import("styled-components").StyledComponent<"figcaption", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"figcaption">, never>;
|
|
23
|
+
export declare const Figure: import("styled-components").StyledComponent<"figure", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"figure">, never>;
|
|
24
|
+
export declare const Hr: import("styled-components").StyledComponent<"hr", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"hr">, never>;
|
|
25
|
+
export declare const Li: import("styled-components").StyledComponent<"li", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"li">, never>;
|
|
26
|
+
export declare const Menu: import("styled-components").StyledComponent<"menu", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"menu">, never>;
|
|
27
|
+
export declare const Ol: import("styled-components").StyledComponent<"ol", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"ol">, never>;
|
|
28
|
+
export declare const P: import("styled-components").StyledComponent<"p", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"p">, never>;
|
|
29
|
+
export declare const Pre: import("styled-components").StyledComponent<"pre", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"pre">, never>;
|
|
30
|
+
export declare const Ul: import("styled-components").StyledComponent<"ul", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"ul">, never>;
|
|
31
|
+
export declare const A: import("styled-components").StyledComponent<"a", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"a">, never>;
|
|
32
|
+
export declare const Abbr: import("styled-components").StyledComponent<"abbr", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"abbr">, never>;
|
|
33
|
+
export declare const B: import("styled-components").StyledComponent<"b", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"b">, never>;
|
|
34
|
+
export declare const Bdi: import("styled-components").StyledComponent<"bdi", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"bdi">, never>;
|
|
35
|
+
export declare const Bdo: import("styled-components").StyledComponent<"bdo", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"bdo">, never>;
|
|
36
|
+
export declare const Br: import("styled-components").StyledComponent<"br", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"br">, never>;
|
|
37
|
+
export declare const Cite: import("styled-components").StyledComponent<"cite", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"cite">, never>;
|
|
38
|
+
export declare const Code: import("styled-components").StyledComponent<"code", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"code">, never>;
|
|
39
|
+
export declare const Data: import("styled-components").StyledComponent<"data", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"data">, never>;
|
|
40
|
+
export declare const Dfn: import("styled-components").StyledComponent<"dfn", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"dfn">, never>;
|
|
41
|
+
export declare const Em: import("styled-components").StyledComponent<"em", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"em">, never>;
|
|
42
|
+
export declare const I: import("styled-components").StyledComponent<"i", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"i">, never>;
|
|
43
|
+
export declare const Kbd: import("styled-components").StyledComponent<"kbd", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"kbd">, never>;
|
|
44
|
+
export declare const Mark: import("styled-components").StyledComponent<"mark", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"mark">, never>;
|
|
45
|
+
export declare const Q: import("styled-components").StyledComponent<"q", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"q">, never>;
|
|
46
|
+
export declare const Rp: import("styled-components").StyledComponent<"rp", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"rp">, never>;
|
|
47
|
+
export declare const Rt: import("styled-components").StyledComponent<"rt", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"rt">, never>;
|
|
48
|
+
export declare const Ruby: import("styled-components").StyledComponent<"ruby", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"ruby">, never>;
|
|
49
|
+
export declare const S: import("styled-components").StyledComponent<"s", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"s">, never>;
|
|
50
|
+
export declare const Samp: import("styled-components").StyledComponent<"samp", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"samp">, never>;
|
|
51
|
+
export declare const Small: import("styled-components").StyledComponent<"small", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"small">, never>;
|
|
52
|
+
export declare const Span: import("styled-components").StyledComponent<"span", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"span">, never>;
|
|
53
|
+
export declare const Strong: import("styled-components").StyledComponent<"strong", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"strong">, never>;
|
|
54
|
+
export declare const Sub: import("styled-components").StyledComponent<"sub", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"sub">, never>;
|
|
55
|
+
export declare const Sup: import("styled-components").StyledComponent<"sup", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"sup">, never>;
|
|
56
|
+
export declare const Time: import("styled-components").StyledComponent<"time", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"time">, never>;
|
|
57
|
+
export declare const U: import("styled-components").StyledComponent<"u", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"u">, never>;
|
|
58
|
+
export declare const Wbr: import("styled-components").StyledComponent<"wbr", import("./styled/types.js").Theme, object & import("./styled/types.js").OwnerInterface & import("./styled/types.js").InnerRefInterface<"wbr">, never>;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
+
export { ThemeContext } from '@xstyled/styled-components';
|
|
2
|
+
export { position, typography } from '@xstyled/system';
|
|
3
|
+
export { A, Abbr, Address, Article, Aside, B, Bdi, Bdo, Blockquote, Br, Cite, Code, Data, Dd, Dfn, Div, Dl, Dt, Em, Figcaption, Figure, Footer, H1, H2, H3, H4, H5, H6, Header, Hgroup, Hr, I, Kbd, Li, Main, Mark, Menu, Nav, Ol, P, Pre, Q, Rp, Rt, Ruby, S, Samp, Search, Section, Small, Span, Strong, Sub, Sup, Time, U, Ul, Wbr, } from './HtmlComponents.js';
|
|
4
|
+
export * from './arithmetic.js';
|
|
1
5
|
export * from './globalStyles.js';
|
|
2
|
-
export * from './
|
|
6
|
+
export * from './mergeRefs.js';
|
|
3
7
|
export * from './mobileUtilities.js';
|
|
4
|
-
export * from './
|
|
5
|
-
export * from './
|
|
8
|
+
export * from './spaceUtilities.js';
|
|
9
|
+
export * from './styled/index.js';
|
|
6
10
|
export * from './th.js';
|
|
7
11
|
export * from './theme.js';
|
|
8
|
-
export * from './styled/index.js';
|
|
9
|
-
export { position, typography } from '@xstyled/system';
|
|
10
12
|
export { themeProviderHOC } from './themeProviderHOC.js';
|
|
11
|
-
export
|
|
12
|
-
export {
|
|
13
|
-
export { Address, Article, Aside, Footer, Header, H1, H2, H3, H4, H5, H6, Hgroup, Main, Nav, Section, Search, Blockquote, Dd, Div, Dl, Dt, Figcaption, Figure, Hr, Li, Menu, Ol, P, Pre, Ul, A, Abbr, B, Bdi, Bdo, Br, Cite, Code, Data, Dfn, Em, I, Kbd, Mark, Q, Rp, Rt, Ruby, S, Samp, Small, Span, Strong, Sub, Sup, Time, U, Wbr, } from './HtmlComponents.js';
|
|
14
|
-
export * from './mergeRefs.js';
|
|
13
|
+
export * from './utils.js';
|
|
14
|
+
export { XStyledWrapper, xStyledCommonProps } from './xStyledWrapper.js';
|
|
15
15
|
export type * from 'csstype';
|
|
16
16
|
export { useGetLayoutMode } from './useGetLayoutMode.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { PropsWithTheme } from '../types.js';
|
|
2
1
|
import type { CSSObject } from 'styled-components';
|
|
2
|
+
import type { PropsWithTheme } from '../types.js';
|
|
3
3
|
export declare const genStyleOverridesExpression: (componentName: string, componentSlot: string) => (props: PropsWithTheme) => (string | number | CSSObject | undefined)[] | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { PropsWithTheme } from '../types.js';
|
|
2
1
|
import type { CSSObject } from 'styled-components';
|
|
2
|
+
import type { PropsWithTheme } from '../types.js';
|
|
3
3
|
export declare const genVariantOverridesExpression: (componentName: string) => (props: PropsWithTheme) => (string | number | CSSObject | undefined)[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { AnyStyledComponent, ThemedStyledFunction } from 'styled-components';
|
|
2
|
-
import type { Options, Theme, ThemedStyledFunctionBase } from './types.js';
|
|
3
2
|
import React from 'react';
|
|
3
|
+
import type { Options, Theme, ThemedStyledFunctionBase } from './types.js';
|
|
4
4
|
export declare const styledFunction: <C extends React.ComponentType<any> | keyof JSX.IntrinsicElements | AnyStyledComponent>(tag: C, options?: Options) => ThemedStyledFunctionBase<C, Theme, {}, never> & {
|
|
5
5
|
attrs: <U, NewA extends Partial<import("styled-components").StyledComponentPropsWithRef<C> & U> & {
|
|
6
6
|
[others: string]: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-system",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.51.0-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - System",
|
|
6
6
|
"files": [
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
},
|
|
90
90
|
"publishConfig": {
|
|
91
91
|
"access": "public",
|
|
92
|
-
"typeSafety":
|
|
92
|
+
"typeSafety": false
|
|
93
93
|
},
|
|
94
94
|
"dependencies": {
|
|
95
95
|
"@xstyled/styled-components": "~3.7.3",
|
|
@@ -98,18 +98,18 @@
|
|
|
98
98
|
"polished": "~3.6.7"
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
101
|
+
"@elliemae/pui-cli": "9.0.0-next.50",
|
|
102
102
|
"@elliemae/pui-theme": "~2.10.0",
|
|
103
103
|
"jest": "~29.7.0",
|
|
104
104
|
"styled-components": "~5.3.9",
|
|
105
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
105
|
+
"@elliemae/ds-monorepo-devops": "3.51.0-next.0"
|
|
106
106
|
},
|
|
107
107
|
"peerDependencies": {
|
|
108
108
|
"@elliemae/pui-theme": "~2.10.0",
|
|
109
109
|
"csstype": "^3.0.0",
|
|
110
110
|
"lodash": "^4.17.21",
|
|
111
|
-
"react": "^
|
|
112
|
-
"react-dom": "^
|
|
111
|
+
"react": "^18.3.1",
|
|
112
|
+
"react-dom": "^18.3.1",
|
|
113
113
|
"styled-components": "~5.3.9"
|
|
114
114
|
},
|
|
115
115
|
"scripts": {
|