@vitus-labs/rocketstyle 0.49.0 → 0.52.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.
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"fcac-1","name":"usePseudoState.tsx"},{"uid":"fcac-9","name":"useTheme.tsx"},{"uid":"fcac-15","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"fcac-3","name":"collection.ts"},{"uid":"fcac-5","name":"dimensions.ts"},{"uid":"fcac-7","name":"theme.ts"},{"uid":"fcac-17","name":"attrs.ts"},{"uid":"fcac-25","name":"styles.ts"}]},{"uid":"fcac-11","name":"context.tsx"},{"name":"constants","children":[{"uid":"fcac-13","name":"reservedKeys.ts"},{"uid":"fcac-29","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"fcac-19","name":"rocketstyleAttrsHoc.tsx"},{"uid":"fcac-21","name":"localContext.tsx"},{"uid":"fcac-23","name":"createProvider.tsx"}]},{"uid":"fcac-27","name":"rocketstyle.tsx"},{"uid":"fcac-31","name":"init.ts"},{"uid":"fcac-33","name":"isRocketComponent.ts"},{"uid":"fcac-35","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fcac-1":{"renderedLength":1775,"gzipLength":407,"brotliLength":0,"mainUid":"fcac-0"},"fcac-3":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"fcac-2"},"fcac-5":{"renderedLength":1474,"gzipLength":545,"brotliLength":0,"mainUid":"fcac-4"},"fcac-7":{"renderedLength":2625,"gzipLength":845,"brotliLength":0,"mainUid":"fcac-6"},"fcac-9":{"renderedLength":542,"gzipLength":295,"brotliLength":0,"mainUid":"fcac-8"},"fcac-11":{"renderedLength":464,"gzipLength":261,"brotliLength":0,"mainUid":"fcac-10"},"fcac-13":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"fcac-12"},"fcac-15":{"renderedLength":331,"gzipLength":206,"brotliLength":0,"mainUid":"fcac-14"},"fcac-17":{"renderedLength":2568,"gzipLength":873,"brotliLength":0,"mainUid":"fcac-16"},"fcac-19":{"renderedLength":1029,"gzipLength":445,"brotliLength":0,"mainUid":"fcac-18"},"fcac-21":{"renderedLength":43,"gzipLength":58,"brotliLength":0,"mainUid":"fcac-20"},"fcac-23":{"renderedLength":832,"gzipLength":384,"brotliLength":0,"mainUid":"fcac-22"},"fcac-25":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"fcac-24"},"fcac-27":{"renderedLength":11491,"gzipLength":2801,"brotliLength":0,"mainUid":"fcac-26"},"fcac-29":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"fcac-28"},"fcac-31":{"renderedLength":1570,"gzipLength":577,"brotliLength":0,"mainUid":"fcac-30"},"fcac-33":{"renderedLength":288,"gzipLength":192,"brotliLength":0,"mainUid":"fcac-32"},"fcac-35":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"fcac-34"}},"nodeMetas":{"fcac-0":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-1"},"imported":[{"uid":"fcac-37"}],"importedBy":[{"uid":"fcac-39"}]},"fcac-2":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-3"},"imported":[],"importedBy":[{"uid":"fcac-26"},{"uid":"fcac-6"}]},"fcac-4":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-5"},"imported":[{"uid":"fcac-36"}],"importedBy":[{"uid":"fcac-30"},{"uid":"fcac-6"},{"uid":"fcac-8"}]},"fcac-6":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-7"},"imported":[{"uid":"fcac-36"},{"uid":"fcac-2"},{"uid":"fcac-4"}],"importedBy":[{"uid":"fcac-26"},{"uid":"fcac-8"}]},"fcac-8":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-9"},"imported":[{"uid":"fcac-36"},{"uid":"fcac-6"},{"uid":"fcac-4"}],"importedBy":[{"uid":"fcac-39"}]},"fcac-10":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-11"},"imported":[{"uid":"fcac-37"},{"uid":"fcac-36"}],"importedBy":[{"uid":"fcac-34"},{"uid":"fcac-14"}]},"fcac-12":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-13"},"imported":[],"importedBy":[{"uid":"fcac-30"},{"uid":"fcac-26"},{"uid":"fcac-14"}]},"fcac-14":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-15"},"imported":[{"uid":"fcac-37"},{"uid":"fcac-10"},{"uid":"fcac-12"}],"importedBy":[{"uid":"fcac-39"}]},"fcac-16":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-17"},"imported":[{"uid":"fcac-36"}],"importedBy":[{"uid":"fcac-26"},{"uid":"fcac-18"}]},"fcac-18":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-19"},"imported":[{"uid":"fcac-37"},{"uid":"fcac-36"},{"uid":"fcac-16"},{"uid":"fcac-39"}],"importedBy":[{"uid":"fcac-40"}]},"fcac-20":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-21"},"imported":[{"uid":"fcac-37"}],"importedBy":[{"uid":"fcac-40"},{"uid":"fcac-22"}]},"fcac-22":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-23"},"imported":[{"uid":"fcac-37"},{"uid":"fcac-39"},{"uid":"fcac-20"}],"importedBy":[{"uid":"fcac-40"}]},"fcac-24":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-25"},"imported":[],"importedBy":[{"uid":"fcac-26"}]},"fcac-26":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-27"},"imported":[{"uid":"fcac-37"},{"uid":"fcac-38"},{"uid":"fcac-36"},{"uid":"fcac-39"},{"uid":"fcac-40"},{"uid":"fcac-6"},{"uid":"fcac-24"},{"uid":"fcac-2"},{"uid":"fcac-16"},{"uid":"fcac-12"}],"importedBy":[{"uid":"fcac-30"}]},"fcac-28":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-29"},"imported":[],"importedBy":[{"uid":"fcac-30"}]},"fcac-30":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-31"},"imported":[{"uid":"fcac-36"},{"uid":"fcac-26"},{"uid":"fcac-4"},{"uid":"fcac-12"},{"uid":"fcac-28"}],"importedBy":[{"uid":"fcac-34"}]},"fcac-32":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-33"},"imported":[],"importedBy":[{"uid":"fcac-34"}]},"fcac-34":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.js":"fcac-35"},"imported":[{"uid":"fcac-30"},{"uid":"fcac-10"},{"uid":"fcac-32"}],"importedBy":[],"isEntry":true},"fcac-36":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcac-30"},{"uid":"fcac-10"},{"uid":"fcac-26"},{"uid":"fcac-4"},{"uid":"fcac-6"},{"uid":"fcac-16"},{"uid":"fcac-8"},{"uid":"fcac-18"}],"isExternal":true},"fcac-37":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcac-10"},{"uid":"fcac-26"},{"uid":"fcac-0"},{"uid":"fcac-14"},{"uid":"fcac-18"},{"uid":"fcac-22"},{"uid":"fcac-20"}],"isExternal":true},"fcac-38":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcac-26"}],"isExternal":true},"fcac-39":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"fcac-0"},{"uid":"fcac-8"},{"uid":"fcac-14"}],"importedBy":[{"uid":"fcac-26"},{"uid":"fcac-18"},{"uid":"fcac-22"}]},"fcac-40":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"fcac-18"},{"uid":"fcac-22"},{"uid":"fcac-20"}],"importedBy":[{"uid":"fcac-26"}]}},"env":{"rollup":"2.70.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
|
@@ -6424,7 +6424,7 @@ var drawChart = (function (exports) {
|
|
|
6424
6424
|
</script>
|
|
6425
6425
|
<script>
|
|
6426
6426
|
/*<!--*/
|
|
6427
|
-
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"
|
|
6427
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"vitus-labs-rocketstyle.module.js","children":[{"name":"src","children":[{"name":"hooks","children":[{"uid":"fcac-42","name":"usePseudoState.tsx"},{"uid":"fcac-50","name":"useTheme.tsx"},{"uid":"fcac-56","name":"useThemeOptions.tsx"}]},{"name":"utils","children":[{"uid":"fcac-44","name":"collection.ts"},{"uid":"fcac-46","name":"dimensions.ts"},{"uid":"fcac-48","name":"theme.ts"},{"uid":"fcac-58","name":"attrs.ts"},{"uid":"fcac-66","name":"styles.ts"}]},{"uid":"fcac-52","name":"context.tsx"},{"name":"constants","children":[{"uid":"fcac-54","name":"reservedKeys.ts"},{"uid":"fcac-70","name":"defaultDimensions.ts"}]},{"name":"internal","children":[{"uid":"fcac-60","name":"rocketstyleAttrsHoc.tsx"},{"uid":"fcac-62","name":"localContext.tsx"},{"uid":"fcac-64","name":"createProvider.tsx"}]},{"uid":"fcac-68","name":"rocketstyle.tsx"},{"uid":"fcac-72","name":"init.ts"},{"uid":"fcac-74","name":"isRocketComponent.ts"},{"uid":"fcac-76","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"fcac-42":{"renderedLength":1721,"gzipLength":401,"brotliLength":0,"mainUid":"fcac-41"},"fcac-44":{"renderedLength":468,"gzipLength":280,"brotliLength":0,"mainUid":"fcac-43"},"fcac-46":{"renderedLength":1459,"gzipLength":537,"brotliLength":0,"mainUid":"fcac-45"},"fcac-48":{"renderedLength":2595,"gzipLength":838,"brotliLength":0,"mainUid":"fcac-47"},"fcac-50":{"renderedLength":537,"gzipLength":292,"brotliLength":0,"mainUid":"fcac-49"},"fcac-52":{"renderedLength":430,"gzipLength":245,"brotliLength":0,"mainUid":"fcac-51"},"fcac-54":{"renderedLength":566,"gzipLength":296,"brotliLength":0,"mainUid":"fcac-53"},"fcac-56":{"renderedLength":320,"gzipLength":199,"brotliLength":0,"mainUid":"fcac-55"},"fcac-58":{"renderedLength":2563,"gzipLength":870,"brotliLength":0,"mainUid":"fcac-57"},"fcac-60":{"renderedLength":983,"gzipLength":424,"brotliLength":0,"mainUid":"fcac-59"},"fcac-62":{"renderedLength":37,"gzipLength":51,"brotliLength":0,"mainUid":"fcac-61"},"fcac-64":{"renderedLength":780,"gzipLength":365,"brotliLength":0,"mainUid":"fcac-63"},"fcac-66":{"renderedLength":129,"gzipLength":112,"brotliLength":0,"mainUid":"fcac-65"},"fcac-68":{"renderedLength":11343,"gzipLength":2762,"brotliLength":0,"mainUid":"fcac-67"},"fcac-70":{"renderedLength":178,"gzipLength":128,"brotliLength":0,"mainUid":"fcac-69"},"fcac-72":{"renderedLength":1560,"gzipLength":573,"brotliLength":0,"mainUid":"fcac-71"},"fcac-74":{"renderedLength":288,"gzipLength":192,"brotliLength":0,"mainUid":"fcac-73"},"fcac-76":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"mainUid":"fcac-75"}},"nodeMetas":{"fcac-41":{"id":"/src/hooks/usePseudoState.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-42"},"imported":[{"uid":"fcac-78"}],"importedBy":[{"uid":"fcac-80"}]},"fcac-43":{"id":"/src/utils/collection.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-44"},"imported":[],"importedBy":[{"uid":"fcac-67"},{"uid":"fcac-47"}]},"fcac-45":{"id":"/src/utils/dimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-46"},"imported":[{"uid":"fcac-77"}],"importedBy":[{"uid":"fcac-71"},{"uid":"fcac-47"},{"uid":"fcac-49"}]},"fcac-47":{"id":"/src/utils/theme.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-48"},"imported":[{"uid":"fcac-77"},{"uid":"fcac-43"},{"uid":"fcac-45"}],"importedBy":[{"uid":"fcac-67"},{"uid":"fcac-49"}]},"fcac-49":{"id":"/src/hooks/useTheme.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-50"},"imported":[{"uid":"fcac-77"},{"uid":"fcac-47"},{"uid":"fcac-45"}],"importedBy":[{"uid":"fcac-80"}]},"fcac-51":{"id":"/src/context.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-52"},"imported":[{"uid":"fcac-78"},{"uid":"fcac-77"}],"importedBy":[{"uid":"fcac-75"},{"uid":"fcac-55"}]},"fcac-53":{"id":"/src/constants/reservedKeys.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-54"},"imported":[],"importedBy":[{"uid":"fcac-71"},{"uid":"fcac-67"},{"uid":"fcac-55"}]},"fcac-55":{"id":"/src/hooks/useThemeOptions.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-56"},"imported":[{"uid":"fcac-78"},{"uid":"fcac-51"},{"uid":"fcac-53"}],"importedBy":[{"uid":"fcac-80"}]},"fcac-57":{"id":"/src/utils/attrs.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-58"},"imported":[{"uid":"fcac-77"}],"importedBy":[{"uid":"fcac-67"},{"uid":"fcac-59"}]},"fcac-59":{"id":"/src/internal/rocketstyleAttrsHoc.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-60"},"imported":[{"uid":"fcac-78"},{"uid":"fcac-77"},{"uid":"fcac-57"},{"uid":"fcac-80"}],"importedBy":[{"uid":"fcac-81"}]},"fcac-61":{"id":"/src/internal/localContext.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-62"},"imported":[{"uid":"fcac-78"}],"importedBy":[{"uid":"fcac-81"},{"uid":"fcac-63"}]},"fcac-63":{"id":"/src/internal/createProvider.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-64"},"imported":[{"uid":"fcac-78"},{"uid":"fcac-80"},{"uid":"fcac-61"}],"importedBy":[{"uid":"fcac-81"}]},"fcac-65":{"id":"/src/utils/styles.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-66"},"imported":[],"importedBy":[{"uid":"fcac-67"}]},"fcac-67":{"id":"/src/rocketstyle.tsx","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-68"},"imported":[{"uid":"fcac-78"},{"uid":"fcac-79"},{"uid":"fcac-77"},{"uid":"fcac-80"},{"uid":"fcac-81"},{"uid":"fcac-47"},{"uid":"fcac-65"},{"uid":"fcac-43"},{"uid":"fcac-57"},{"uid":"fcac-53"}],"importedBy":[{"uid":"fcac-71"}]},"fcac-69":{"id":"/src/constants/defaultDimensions.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-70"},"imported":[],"importedBy":[{"uid":"fcac-71"}]},"fcac-71":{"id":"/src/init.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-72"},"imported":[{"uid":"fcac-77"},{"uid":"fcac-67"},{"uid":"fcac-45"},{"uid":"fcac-53"},{"uid":"fcac-69"}],"importedBy":[{"uid":"fcac-75"}]},"fcac-73":{"id":"/src/isRocketComponent.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-74"},"imported":[],"importedBy":[{"uid":"fcac-75"}]},"fcac-75":{"id":"/src/index.ts","moduleParts":{"vitus-labs-rocketstyle.module.js":"fcac-76"},"imported":[{"uid":"fcac-71"},{"uid":"fcac-51"},{"uid":"fcac-73"}],"importedBy":[],"isEntry":true},"fcac-77":{"id":"@vitus-labs/core","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcac-71"},{"uid":"fcac-51"},{"uid":"fcac-67"},{"uid":"fcac-45"},{"uid":"fcac-47"},{"uid":"fcac-57"},{"uid":"fcac-49"},{"uid":"fcac-59"}],"isExternal":true},"fcac-78":{"id":"react","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcac-51"},{"uid":"fcac-67"},{"uid":"fcac-41"},{"uid":"fcac-55"},{"uid":"fcac-59"},{"uid":"fcac-63"},{"uid":"fcac-61"}],"isExternal":true},"fcac-79":{"id":"hoist-non-react-statics","moduleParts":{},"imported":[],"importedBy":[{"uid":"fcac-67"}],"isExternal":true},"fcac-80":{"id":"/src/hooks/index.ts","moduleParts":{},"imported":[{"uid":"fcac-41"},{"uid":"fcac-49"},{"uid":"fcac-55"}],"importedBy":[{"uid":"fcac-67"},{"uid":"fcac-59"},{"uid":"fcac-63"}]},"fcac-81":{"id":"/src/internal/index.ts","moduleParts":{},"imported":[{"uid":"fcac-59"},{"uid":"fcac-63"},{"uid":"fcac-61"}],"importedBy":[{"uid":"fcac-67"}]}},"env":{"rollup":"2.70.1"},"options":{"gzip":true,"brotli":false,"sourcemap":false}};
|
|
6428
6428
|
|
|
6429
6429
|
const run = () => {
|
|
6430
6430
|
const width = window.innerWidth;
|
package/lib/index.d.ts
CHANGED
|
@@ -180,6 +180,68 @@ declare type RocketComponent<OA extends TObj = {}, EA extends TObj = {}, T exten
|
|
|
180
180
|
* @param DFP Calculated final component props
|
|
181
181
|
*/
|
|
182
182
|
interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, S extends TObj = {}, HOC extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP, DFP = MergeTypes<[OA, EA, DefaultProps, ExtractDimensionProps<D, DKP, UB>]>> extends ForwardRefExoticComponent<DFP> {
|
|
183
|
+
/**
|
|
184
|
+
* A chaining method to define default component theme
|
|
185
|
+
* @param param _object_
|
|
186
|
+
*
|
|
187
|
+
* ### Examples
|
|
188
|
+
*
|
|
189
|
+
* #### Component name / displayName
|
|
190
|
+
* ```tsx
|
|
191
|
+
* const base = rocketstyleComponent
|
|
192
|
+
* .config({
|
|
193
|
+
* name: 'Component name'
|
|
194
|
+
* })
|
|
195
|
+
* ```
|
|
196
|
+
*
|
|
197
|
+
* #### Replace component by a new one
|
|
198
|
+
* ```tsx
|
|
199
|
+
* const base = rocketstyleComponent
|
|
200
|
+
* .config({
|
|
201
|
+
* component: (props) => <div {...props} />
|
|
202
|
+
* })
|
|
203
|
+
* ```
|
|
204
|
+
*
|
|
205
|
+
* #### Component as provider
|
|
206
|
+
* ```tsx
|
|
207
|
+
* const parent = rocketstyleComponent
|
|
208
|
+
* .config({
|
|
209
|
+
* provider: true
|
|
210
|
+
* })
|
|
211
|
+
* ```
|
|
212
|
+
*
|
|
213
|
+
* #### Component as consumer
|
|
214
|
+
* ```tsx
|
|
215
|
+
* const base = rocketstyleComponent
|
|
216
|
+
* .config({
|
|
217
|
+
* consumer: ctx => ctx<typeof parent>(({ pseudo, state, ...rest }) => ({
|
|
218
|
+
* pseudo,
|
|
219
|
+
* state
|
|
220
|
+
* }))
|
|
221
|
+
* })
|
|
222
|
+
* ```
|
|
223
|
+
*
|
|
224
|
+
* #### Inversed theme
|
|
225
|
+
* A possibility to set individualy for each component to have `inversed` styles
|
|
226
|
+
* when using dark / light theme modes
|
|
227
|
+
* ```tsx
|
|
228
|
+
* const base = rocketstyleComponent
|
|
229
|
+
* .config({
|
|
230
|
+
* inversed: true
|
|
231
|
+
* })
|
|
232
|
+
* ```
|
|
233
|
+
*
|
|
234
|
+
* #### Pass props to original component
|
|
235
|
+
* A possibility to set individualy for each component props names to be passed
|
|
236
|
+
* to `origin` component
|
|
237
|
+
*
|
|
238
|
+
* ```tsx
|
|
239
|
+
* const base = rocketstyleComponent
|
|
240
|
+
* .config({
|
|
241
|
+
* passProps: ['disabled', 'readOnly']
|
|
242
|
+
* })
|
|
243
|
+
* ```
|
|
244
|
+
*/
|
|
183
245
|
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, D, DKP, UB>) => NC extends ElementType ? RocketComponent<ExtractProps<NC>, EA, T, CSS, S, HOC, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
184
246
|
/**
|
|
185
247
|
* A chaining method to define default component props
|
|
@@ -210,9 +272,9 @@ interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends
|
|
|
210
272
|
* A chaining method to define default component theme
|
|
211
273
|
* @param param Can be either _object_ or a _callback_
|
|
212
274
|
*
|
|
213
|
-
*
|
|
275
|
+
* ### Examples
|
|
214
276
|
*
|
|
215
|
-
*
|
|
277
|
+
* #### Object as a parameter
|
|
216
278
|
* ```tsx
|
|
217
279
|
* const base = rocketstyleComponent
|
|
218
280
|
* const newElement = base.attrs({
|
|
@@ -220,18 +282,121 @@ interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends
|
|
|
220
282
|
* })
|
|
221
283
|
* ```
|
|
222
284
|
*
|
|
223
|
-
*
|
|
285
|
+
* #### Callback as a parameter
|
|
224
286
|
* ```tsx
|
|
225
287
|
* const base = rocketstyleComponent
|
|
226
288
|
* const newElement = base.theme((theme, css) => ({
|
|
227
289
|
* backgroundColor: t.color.black, // value from context
|
|
228
290
|
* }))
|
|
229
|
-
|
|
291
|
+
*```
|
|
292
|
+
*
|
|
293
|
+
* #### Dark / light theme callback
|
|
294
|
+
* ```tsx
|
|
295
|
+
* const base = rocketstyleComponent
|
|
296
|
+
*
|
|
297
|
+
* const newElement = base.theme((theme, mode, css) => ({
|
|
298
|
+
* backgroundColor: mode(t.color.black, t.color.white), // theme from context
|
|
299
|
+
* }))
|
|
300
|
+
* ```
|
|
230
301
|
*/
|
|
231
302
|
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[Styles<CSS>, P]>> | ThemeCb<MergeTypes<[Styles<CSS>, P]>, Theme$1<T>> : Partial<Styles<CSS>> | ThemeCb<Styles<CSS>, Theme$1<T>>) => P extends TObj ? RocketComponent<OA, EA, T, MergeTypes<[CSS, P]>, S, HOC, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
303
|
+
/**
|
|
304
|
+
* A chaining method to define default rendered styles
|
|
305
|
+
* @param param Callback of styled-components `css` function
|
|
306
|
+
*
|
|
307
|
+
* #### Examples
|
|
308
|
+
*
|
|
309
|
+
* ```tsx
|
|
310
|
+
* const base = rocketstyleComponent
|
|
311
|
+
*
|
|
312
|
+
* const newElement = base.styles(css => css``)
|
|
313
|
+
* ```
|
|
314
|
+
*/
|
|
232
315
|
styles: (param: StylesCb) => RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
316
|
+
/**
|
|
317
|
+
* A chaining method to define high-order components to wrap
|
|
318
|
+
* the defined component
|
|
319
|
+
* @param param object of key hoc function
|
|
320
|
+
*
|
|
321
|
+
* ### Examples
|
|
322
|
+
*
|
|
323
|
+
* #### Define new hoc component
|
|
324
|
+
* Using the `{ key: hoc }` annotation allows to override or remove
|
|
325
|
+
* the defined hoc(s) later on. See the examples below.
|
|
326
|
+
* ```tsx
|
|
327
|
+
* const hoc = (WrappedComponent) => (props) => <WrappedComponent {...props} />
|
|
328
|
+
* const base = rocketstyleComponent
|
|
329
|
+
*
|
|
330
|
+
* const newElement = base.compose({ hocName: hoc })
|
|
331
|
+
* ```
|
|
332
|
+
*
|
|
333
|
+
* #### Remove previously defined hoc component
|
|
334
|
+
* (1) Set value to be `false`
|
|
335
|
+
* ```tsx
|
|
336
|
+
* const newElement = base.compose({ hocName: false })
|
|
337
|
+
* ```
|
|
338
|
+
* (2) Set value to be `null`
|
|
339
|
+
* ```tsx
|
|
340
|
+
* const newElement = base.compose({ hocName: null })
|
|
341
|
+
* ```
|
|
342
|
+
* (3) Set value to be `undefined`
|
|
343
|
+
* ```tsx
|
|
344
|
+
* const newElement = base.compose({ hocName: undefined })
|
|
345
|
+
* ```
|
|
346
|
+
*/
|
|
233
347
|
compose: <P extends ComposeParam>(param: P) => P extends TObj ? RocketComponent<OA, EA, T, CSS, S, MergeTypes<[HOC, P]>, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
348
|
+
/**
|
|
349
|
+
* A chaining method to define statics on the rocketstyle component.
|
|
350
|
+
* All statics are accessible via `is` static key on the component.
|
|
351
|
+
* @param param object of statics
|
|
352
|
+
*
|
|
353
|
+
* ### Examples
|
|
354
|
+
*
|
|
355
|
+
* #### Define new static
|
|
356
|
+
* Using the `{ key: value }` annotation allows to override or remove
|
|
357
|
+
* the defined static(s) later on. See the examples below.
|
|
358
|
+
* ```tsx
|
|
359
|
+
* const base = rocketstyleComponent
|
|
360
|
+
*
|
|
361
|
+
* const newElement = base.statics({
|
|
362
|
+
* isNewStatic: true,
|
|
363
|
+
* arrayStatic: ['a', 'b'],
|
|
364
|
+
* functionStatic: (param) => { ...do something }
|
|
365
|
+
* })
|
|
366
|
+
* ```
|
|
367
|
+
*
|
|
368
|
+
* #### Override previously defined hoc component
|
|
369
|
+
* (1) Set value to be `false`
|
|
370
|
+
* ```tsx
|
|
371
|
+
* const newElement = base.statics({ isNewStatic: false })
|
|
372
|
+
* ```
|
|
373
|
+
* (2) Set value to be `null`
|
|
374
|
+
* ```tsx
|
|
375
|
+
* const newElement = base.statics({ isNewStatic: null })
|
|
376
|
+
* ```
|
|
377
|
+
* (3) Set value to be `undefined`
|
|
378
|
+
* ```tsx
|
|
379
|
+
* const newElement = base.statics({ isNewStatic: undefined })
|
|
380
|
+
* ```
|
|
381
|
+
*/
|
|
234
382
|
statics: <P extends TObj>(param: P) => P extends TObj ? RocketComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, HOC, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
383
|
+
/**
|
|
384
|
+
* An access to all defined statics on the component.
|
|
385
|
+
*
|
|
386
|
+
* ### Examples
|
|
387
|
+
*
|
|
388
|
+
* #### Access a static property
|
|
389
|
+
* ```tsx
|
|
390
|
+
* const element = rocketcomponent.statics({
|
|
391
|
+
* isNewStatic: true,
|
|
392
|
+
* arrayStatic: ['a', 'b'],
|
|
393
|
+
* functionStatic: (param) => { ...do something }
|
|
394
|
+
* })
|
|
395
|
+
*
|
|
396
|
+
* // staticValue = true
|
|
397
|
+
* const staticValue = element.is.isNewStatic
|
|
398
|
+
* ```
|
|
399
|
+
*/
|
|
235
400
|
is: S;
|
|
236
401
|
getStaticDimensions: (theme: TObj) => {
|
|
237
402
|
dimensions: DKP;
|
|
@@ -239,11 +404,83 @@ interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends
|
|
|
239
404
|
multiKeys: MultiKeys<D>;
|
|
240
405
|
};
|
|
241
406
|
getDefaultAttrs: (props: TObj, theme: TObj, mode: ThemeModeKeys) => TObj;
|
|
407
|
+
/**
|
|
408
|
+
* Accessible via types only!
|
|
409
|
+
*
|
|
410
|
+
* Provides defined rocketstyle dimensions and their options
|
|
411
|
+
*
|
|
412
|
+
* ### Examples
|
|
413
|
+
* ```tsx
|
|
414
|
+
* const element = rocketcomponent
|
|
415
|
+
*
|
|
416
|
+
* type Props = typeof element['$$rocketstyle']
|
|
417
|
+
*
|
|
418
|
+
* ```
|
|
419
|
+
*/
|
|
242
420
|
readonly $$rocketstyle: ExtractDimensions<D, DKP>;
|
|
421
|
+
/**
|
|
422
|
+
* Accessible via types only!
|
|
423
|
+
*
|
|
424
|
+
* Provides defined original props types (props of origin
|
|
425
|
+
* component passed to _rocketstyle_)
|
|
426
|
+
*
|
|
427
|
+
* ### Examples
|
|
428
|
+
* ```tsx
|
|
429
|
+
* const element = rocketcomponent
|
|
430
|
+
*
|
|
431
|
+
* type Props = typeof element['$$originProps']
|
|
432
|
+
*
|
|
433
|
+
* ```
|
|
434
|
+
*/
|
|
243
435
|
readonly $$originProps: OA;
|
|
436
|
+
/**
|
|
437
|
+
* Accessible via types only!
|
|
438
|
+
*
|
|
439
|
+
* Provides defined extended props types (props types defined
|
|
440
|
+
* on `.attrs()` chaining method
|
|
441
|
+
* component passed to _rocketstyle_)
|
|
442
|
+
*
|
|
443
|
+
* ### Examples
|
|
444
|
+
* ```tsx
|
|
445
|
+
* const element = rocketcomponent
|
|
446
|
+
* .attrs<{ propName: string }>({})
|
|
447
|
+
*
|
|
448
|
+
* type Props = typeof element['$$extendedProps']
|
|
449
|
+
*
|
|
450
|
+
* ```
|
|
451
|
+
*/
|
|
244
452
|
readonly $$extendedProps: EA;
|
|
453
|
+
/**
|
|
454
|
+
* Accessible via types only!
|
|
455
|
+
*
|
|
456
|
+
* Provides all defined props types (including **origin**
|
|
457
|
+
* props types, **extended** props types & **rocketstyle**
|
|
458
|
+
* props types all together)
|
|
459
|
+
*
|
|
460
|
+
* ### Examples
|
|
461
|
+
* ```tsx
|
|
462
|
+
* const element = rocketcomponent
|
|
463
|
+
*
|
|
464
|
+
* type Props = typeof element['$$allProps']
|
|
465
|
+
*
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
245
468
|
readonly $$allProps: DFP;
|
|
469
|
+
/**
|
|
470
|
+
* Static Rocketstyle component identificator
|
|
471
|
+
*/
|
|
246
472
|
readonly IS_ROCKETSTYLE: true;
|
|
473
|
+
/**
|
|
474
|
+
* Component displayName defined in `.config()` chaining
|
|
475
|
+
* method
|
|
476
|
+
*
|
|
477
|
+
* ```tsx
|
|
478
|
+
* const element = rockestyleComponent
|
|
479
|
+
* .config({
|
|
480
|
+
* name: 'ComponentName'
|
|
481
|
+
* })
|
|
482
|
+
* ```
|
|
483
|
+
*/
|
|
247
484
|
readonly displayName: string;
|
|
248
485
|
}
|
|
249
486
|
|
|
@@ -22,6 +22,68 @@ export declare type RocketComponent<OA extends TObj = {}, EA extends TObj = {},
|
|
|
22
22
|
* @param DFP Calculated final component props
|
|
23
23
|
*/
|
|
24
24
|
export interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T extends TObj = {}, CSS extends TObj = {}, S extends TObj = {}, HOC extends TObj = {}, D extends Dimensions = Dimensions, UB extends boolean = boolean, DKP extends TDKP = TDKP, DFP = MergeTypes<[OA, EA, DefaultProps, ExtractDimensionProps<D, DKP, UB>]>> extends ForwardRefExoticComponent<DFP> {
|
|
25
|
+
/**
|
|
26
|
+
* A chaining method to define default component theme
|
|
27
|
+
* @param param _object_
|
|
28
|
+
*
|
|
29
|
+
* ### Examples
|
|
30
|
+
*
|
|
31
|
+
* #### Component name / displayName
|
|
32
|
+
* ```tsx
|
|
33
|
+
* const base = rocketstyleComponent
|
|
34
|
+
* .config({
|
|
35
|
+
* name: 'Component name'
|
|
36
|
+
* })
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* #### Replace component by a new one
|
|
40
|
+
* ```tsx
|
|
41
|
+
* const base = rocketstyleComponent
|
|
42
|
+
* .config({
|
|
43
|
+
* component: (props) => <div {...props} />
|
|
44
|
+
* })
|
|
45
|
+
* ```
|
|
46
|
+
*
|
|
47
|
+
* #### Component as provider
|
|
48
|
+
* ```tsx
|
|
49
|
+
* const parent = rocketstyleComponent
|
|
50
|
+
* .config({
|
|
51
|
+
* provider: true
|
|
52
|
+
* })
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* #### Component as consumer
|
|
56
|
+
* ```tsx
|
|
57
|
+
* const base = rocketstyleComponent
|
|
58
|
+
* .config({
|
|
59
|
+
* consumer: ctx => ctx<typeof parent>(({ pseudo, state, ...rest }) => ({
|
|
60
|
+
* pseudo,
|
|
61
|
+
* state
|
|
62
|
+
* }))
|
|
63
|
+
* })
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* #### Inversed theme
|
|
67
|
+
* A possibility to set individualy for each component to have `inversed` styles
|
|
68
|
+
* when using dark / light theme modes
|
|
69
|
+
* ```tsx
|
|
70
|
+
* const base = rocketstyleComponent
|
|
71
|
+
* .config({
|
|
72
|
+
* inversed: true
|
|
73
|
+
* })
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* #### Pass props to original component
|
|
77
|
+
* A possibility to set individualy for each component props names to be passed
|
|
78
|
+
* to `origin` component
|
|
79
|
+
*
|
|
80
|
+
* ```tsx
|
|
81
|
+
* const base = rocketstyleComponent
|
|
82
|
+
* .config({
|
|
83
|
+
* passProps: ['disabled', 'readOnly']
|
|
84
|
+
* })
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
25
87
|
config: <NC extends ElementType | unknown = unknown>({ name, component: NC, provider, consumer, DEBUG, inversed, passProps, }: ConfigAttrs<NC, D, DKP, UB>) => NC extends ElementType ? RocketComponent<ExtractProps<NC>, EA, T, CSS, S, HOC, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
26
88
|
/**
|
|
27
89
|
* A chaining method to define default component props
|
|
@@ -52,9 +114,9 @@ export interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T
|
|
|
52
114
|
* A chaining method to define default component theme
|
|
53
115
|
* @param param Can be either _object_ or a _callback_
|
|
54
116
|
*
|
|
55
|
-
*
|
|
117
|
+
* ### Examples
|
|
56
118
|
*
|
|
57
|
-
*
|
|
119
|
+
* #### Object as a parameter
|
|
58
120
|
* ```tsx
|
|
59
121
|
* const base = rocketstyleComponent
|
|
60
122
|
* const newElement = base.attrs({
|
|
@@ -62,18 +124,121 @@ export interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T
|
|
|
62
124
|
* })
|
|
63
125
|
* ```
|
|
64
126
|
*
|
|
65
|
-
*
|
|
127
|
+
* #### Callback as a parameter
|
|
66
128
|
* ```tsx
|
|
67
129
|
* const base = rocketstyleComponent
|
|
68
130
|
* const newElement = base.theme((theme, css) => ({
|
|
69
131
|
* backgroundColor: t.color.black, // value from context
|
|
70
132
|
* }))
|
|
71
|
-
|
|
133
|
+
*```
|
|
134
|
+
*
|
|
135
|
+
* #### Dark / light theme callback
|
|
136
|
+
* ```tsx
|
|
137
|
+
* const base = rocketstyleComponent
|
|
138
|
+
*
|
|
139
|
+
* const newElement = base.theme((theme, mode, css) => ({
|
|
140
|
+
* backgroundColor: mode(t.color.black, t.color.white), // theme from context
|
|
141
|
+
* }))
|
|
142
|
+
* ```
|
|
72
143
|
*/
|
|
73
144
|
theme: <P extends TObj | unknown = unknown>(param: P extends TObj ? Partial<MergeTypes<[Styles<CSS>, P]>> | ThemeCb<MergeTypes<[Styles<CSS>, P]>, Theme<T>> : Partial<Styles<CSS>> | ThemeCb<Styles<CSS>, Theme<T>>) => P extends TObj ? RocketComponent<OA, EA, T, MergeTypes<[CSS, P]>, S, HOC, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
145
|
+
/**
|
|
146
|
+
* A chaining method to define default rendered styles
|
|
147
|
+
* @param param Callback of styled-components `css` function
|
|
148
|
+
*
|
|
149
|
+
* #### Examples
|
|
150
|
+
*
|
|
151
|
+
* ```tsx
|
|
152
|
+
* const base = rocketstyleComponent
|
|
153
|
+
*
|
|
154
|
+
* const newElement = base.styles(css => css``)
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
74
157
|
styles: (param: StylesCb) => RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
158
|
+
/**
|
|
159
|
+
* A chaining method to define high-order components to wrap
|
|
160
|
+
* the defined component
|
|
161
|
+
* @param param object of key hoc function
|
|
162
|
+
*
|
|
163
|
+
* ### Examples
|
|
164
|
+
*
|
|
165
|
+
* #### Define new hoc component
|
|
166
|
+
* Using the `{ key: hoc }` annotation allows to override or remove
|
|
167
|
+
* the defined hoc(s) later on. See the examples below.
|
|
168
|
+
* ```tsx
|
|
169
|
+
* const hoc = (WrappedComponent) => (props) => <WrappedComponent {...props} />
|
|
170
|
+
* const base = rocketstyleComponent
|
|
171
|
+
*
|
|
172
|
+
* const newElement = base.compose({ hocName: hoc })
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* #### Remove previously defined hoc component
|
|
176
|
+
* (1) Set value to be `false`
|
|
177
|
+
* ```tsx
|
|
178
|
+
* const newElement = base.compose({ hocName: false })
|
|
179
|
+
* ```
|
|
180
|
+
* (2) Set value to be `null`
|
|
181
|
+
* ```tsx
|
|
182
|
+
* const newElement = base.compose({ hocName: null })
|
|
183
|
+
* ```
|
|
184
|
+
* (3) Set value to be `undefined`
|
|
185
|
+
* ```tsx
|
|
186
|
+
* const newElement = base.compose({ hocName: undefined })
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
75
189
|
compose: <P extends ComposeParam>(param: P) => P extends TObj ? RocketComponent<OA, EA, T, CSS, S, MergeTypes<[HOC, P]>, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
190
|
+
/**
|
|
191
|
+
* A chaining method to define statics on the rocketstyle component.
|
|
192
|
+
* All statics are accessible via `is` static key on the component.
|
|
193
|
+
* @param param object of statics
|
|
194
|
+
*
|
|
195
|
+
* ### Examples
|
|
196
|
+
*
|
|
197
|
+
* #### Define new static
|
|
198
|
+
* Using the `{ key: value }` annotation allows to override or remove
|
|
199
|
+
* the defined static(s) later on. See the examples below.
|
|
200
|
+
* ```tsx
|
|
201
|
+
* const base = rocketstyleComponent
|
|
202
|
+
*
|
|
203
|
+
* const newElement = base.statics({
|
|
204
|
+
* isNewStatic: true,
|
|
205
|
+
* arrayStatic: ['a', 'b'],
|
|
206
|
+
* functionStatic: (param) => { ...do something }
|
|
207
|
+
* })
|
|
208
|
+
* ```
|
|
209
|
+
*
|
|
210
|
+
* #### Override previously defined hoc component
|
|
211
|
+
* (1) Set value to be `false`
|
|
212
|
+
* ```tsx
|
|
213
|
+
* const newElement = base.statics({ isNewStatic: false })
|
|
214
|
+
* ```
|
|
215
|
+
* (2) Set value to be `null`
|
|
216
|
+
* ```tsx
|
|
217
|
+
* const newElement = base.statics({ isNewStatic: null })
|
|
218
|
+
* ```
|
|
219
|
+
* (3) Set value to be `undefined`
|
|
220
|
+
* ```tsx
|
|
221
|
+
* const newElement = base.statics({ isNewStatic: undefined })
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
76
224
|
statics: <P extends TObj>(param: P) => P extends TObj ? RocketComponent<OA, EA, T, CSS, MergeTypes<[S, P]>, HOC, D, UB, DKP> : RocketComponent<OA, EA, T, CSS, S, HOC, D, UB, DKP>;
|
|
225
|
+
/**
|
|
226
|
+
* An access to all defined statics on the component.
|
|
227
|
+
*
|
|
228
|
+
* ### Examples
|
|
229
|
+
*
|
|
230
|
+
* #### Access a static property
|
|
231
|
+
* ```tsx
|
|
232
|
+
* const element = rocketcomponent.statics({
|
|
233
|
+
* isNewStatic: true,
|
|
234
|
+
* arrayStatic: ['a', 'b'],
|
|
235
|
+
* functionStatic: (param) => { ...do something }
|
|
236
|
+
* })
|
|
237
|
+
*
|
|
238
|
+
* // staticValue = true
|
|
239
|
+
* const staticValue = element.is.isNewStatic
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
77
242
|
is: S;
|
|
78
243
|
getStaticDimensions: (theme: TObj) => {
|
|
79
244
|
dimensions: DKP;
|
|
@@ -81,10 +246,82 @@ export interface IRocketComponent<OA extends TObj = {}, EA extends TObj = {}, T
|
|
|
81
246
|
multiKeys: MultiKeys<D>;
|
|
82
247
|
};
|
|
83
248
|
getDefaultAttrs: (props: TObj, theme: TObj, mode: ThemeModeKeys) => TObj;
|
|
249
|
+
/**
|
|
250
|
+
* Accessible via types only!
|
|
251
|
+
*
|
|
252
|
+
* Provides defined rocketstyle dimensions and their options
|
|
253
|
+
*
|
|
254
|
+
* ### Examples
|
|
255
|
+
* ```tsx
|
|
256
|
+
* const element = rocketcomponent
|
|
257
|
+
*
|
|
258
|
+
* type Props = typeof element['$$rocketstyle']
|
|
259
|
+
*
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
84
262
|
readonly $$rocketstyle: ExtractDimensions<D, DKP>;
|
|
263
|
+
/**
|
|
264
|
+
* Accessible via types only!
|
|
265
|
+
*
|
|
266
|
+
* Provides defined original props types (props of origin
|
|
267
|
+
* component passed to _rocketstyle_)
|
|
268
|
+
*
|
|
269
|
+
* ### Examples
|
|
270
|
+
* ```tsx
|
|
271
|
+
* const element = rocketcomponent
|
|
272
|
+
*
|
|
273
|
+
* type Props = typeof element['$$originProps']
|
|
274
|
+
*
|
|
275
|
+
* ```
|
|
276
|
+
*/
|
|
85
277
|
readonly $$originProps: OA;
|
|
278
|
+
/**
|
|
279
|
+
* Accessible via types only!
|
|
280
|
+
*
|
|
281
|
+
* Provides defined extended props types (props types defined
|
|
282
|
+
* on `.attrs()` chaining method
|
|
283
|
+
* component passed to _rocketstyle_)
|
|
284
|
+
*
|
|
285
|
+
* ### Examples
|
|
286
|
+
* ```tsx
|
|
287
|
+
* const element = rocketcomponent
|
|
288
|
+
* .attrs<{ propName: string }>({})
|
|
289
|
+
*
|
|
290
|
+
* type Props = typeof element['$$extendedProps']
|
|
291
|
+
*
|
|
292
|
+
* ```
|
|
293
|
+
*/
|
|
86
294
|
readonly $$extendedProps: EA;
|
|
295
|
+
/**
|
|
296
|
+
* Accessible via types only!
|
|
297
|
+
*
|
|
298
|
+
* Provides all defined props types (including **origin**
|
|
299
|
+
* props types, **extended** props types & **rocketstyle**
|
|
300
|
+
* props types all together)
|
|
301
|
+
*
|
|
302
|
+
* ### Examples
|
|
303
|
+
* ```tsx
|
|
304
|
+
* const element = rocketcomponent
|
|
305
|
+
*
|
|
306
|
+
* type Props = typeof element['$$allProps']
|
|
307
|
+
*
|
|
308
|
+
* ```
|
|
309
|
+
*/
|
|
87
310
|
readonly $$allProps: DFP;
|
|
311
|
+
/**
|
|
312
|
+
* Static Rocketstyle component identificator
|
|
313
|
+
*/
|
|
88
314
|
readonly IS_ROCKETSTYLE: true;
|
|
315
|
+
/**
|
|
316
|
+
* Component displayName defined in `.config()` chaining
|
|
317
|
+
* method
|
|
318
|
+
*
|
|
319
|
+
* ```tsx
|
|
320
|
+
* const element = rockestyleComponent
|
|
321
|
+
* .config({
|
|
322
|
+
* name: 'ComponentName'
|
|
323
|
+
* })
|
|
324
|
+
* ```
|
|
325
|
+
*/
|
|
89
326
|
readonly displayName: string;
|
|
90
327
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/rocketstyle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.52.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "Vit Bokisch <vit@bokisch.cz>",
|
|
6
6
|
"maintainers": [
|
|
@@ -61,13 +61,13 @@
|
|
|
61
61
|
"hoist-non-react-statics": "^3.1.0"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@vitus-labs/core": "^0.
|
|
65
|
-
"@vitus-labs/elements": "^0.
|
|
64
|
+
"@vitus-labs/core": "^0.52.0",
|
|
65
|
+
"@vitus-labs/elements": "^0.52.0",
|
|
66
66
|
"@vitus-labs/tools-babel": "^0.29.0",
|
|
67
67
|
"@vitus-labs/tools-rollup": "^0.29.0",
|
|
68
68
|
"@vitus-labs/tools-storybook": "^0.29.0",
|
|
69
69
|
"@vitus-labs/tools-typescript": "^0.29.0",
|
|
70
|
-
"@vitus-labs/unistyle": "^0.
|
|
70
|
+
"@vitus-labs/unistyle": "^0.52.0"
|
|
71
71
|
},
|
|
72
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "bf53340625bda90e6cab372f8f38005b4a7e0c73"
|
|
73
73
|
}
|