@itcase/storybook-config 1.2.79 → 1.2.80
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/components/EmailTemplatePreview.js +1 -1
- package/dist/cjs/decorators/withFormSubmitDecorator.js +0 -1
- package/dist/cjs/decorators/withNextDecorator.js +1 -1
- package/dist/cjs/decorators/withUiDecorator.js +1 -1
- package/dist/cjs/decorators.js +1 -2
- package/dist/components/EmailTemplatePreview/index.d.ts +2 -0
- package/dist/components/EmailTemplatePreview/index.js +38 -0
- package/dist/components/EmailTemplatePreview.js +1 -1
- package/dist/components/FormSubmitWrapper/FormSubmitWrapper.d.ts +14 -0
- package/dist/components/FormSubmitWrapper/FormSubmitWrapper.js +84 -0
- package/dist/components/FormSubmitWrapper/autoSubmitForm.d.ts +2 -0
- package/dist/components/FormSubmitWrapper/autoSubmitForm.js +106 -0
- package/dist/components/FormSubmitWrapper/index.d.ts +2 -0
- package/dist/components/FormSubmitWrapper/index.js +2 -0
- package/dist/config/addons/addonThemes.d.ts +15 -0
- package/dist/config/addons/addonThemes.js +14 -15
- package/dist/config/addons/addonsNextJs.d.ts +2 -0
- package/dist/config/addons/addonsNextJs.js +8 -9
- package/dist/config/addons/addonsReactNative.d.ts +2 -0
- package/dist/config/addons/addonsReactNative.js +6 -7
- package/dist/config/addons/addonsReactNativeWeb.d.ts +2 -0
- package/dist/config/addons/addonsReactNativeWeb.js +2 -3
- package/dist/config/addons/addonsVite.d.ts +2 -0
- package/dist/config/addons/addonsVite.js +8 -9
- package/dist/config/addons/addonsWebpack.d.ts +18 -0
- package/dist/config/addons/addonsWebpack.js +26 -27
- package/dist/config/appearance/appearance.d.ts +1 -0
- package/dist/config/appearance/appearance.js +1 -1
- package/dist/config/backgrounds/backgrounds.d.ts +23 -0
- package/dist/config/backgrounds/backgrounds.js +22 -24
- package/dist/config/code/code.d.ts +8 -0
- package/dist/config/code/code.js +18 -22
- package/dist/config/config/mainConfigNextJsVite.d.ts +10 -0
- package/dist/config/config/mainConfigNextJsVite.js +35 -38
- package/dist/config/config/mainConfigReactNative.d.ts +9 -0
- package/dist/config/config/mainConfigReactNative.js +21 -23
- package/dist/config/config/mainConfigReactNativeWeb.d.ts +23 -0
- package/dist/config/config/mainConfigReactNativeWeb.js +42 -46
- package/dist/config/config/mainConfigVite.d.ts +9 -0
- package/dist/config/config/mainConfigVite.js +75 -80
- package/dist/config/config/mainConfigWebpack.d.ts +9 -0
- package/dist/config/config/mainConfigWebpack.js +39 -64
- package/dist/config/framework/frameworkNextJs.d.ts +4 -0
- package/dist/config/framework/frameworkNextJs.js +3 -4
- package/dist/config/framework/frameworkNextJsVite.d.ts +4 -0
- package/dist/config/framework/frameworkNextJsVite.js +3 -4
- package/dist/config/framework/frameworkReactNative.d.ts +4 -0
- package/dist/config/framework/frameworkReactNative.js +3 -4
- package/dist/config/framework/frameworkReactNativeWeb.d.ts +4 -0
- package/dist/config/framework/frameworkReactNativeWeb.js +3 -4
- package/dist/config/framework/frameworkVite.d.ts +4 -0
- package/dist/config/framework/frameworkVite.js +3 -4
- package/dist/config/framework/frameworkWebpack.d.ts +11 -0
- package/dist/config/framework/frameworkWebpack.js +9 -10
- package/dist/config/main/index.d.ts +26 -0
- package/dist/config/main/index.js +26 -53
- package/dist/config/msw/index.d.ts +2 -0
- package/dist/config/msw/index.js +2 -7
- package/dist/config/msw/mswHandlers.d.ts +5 -0
- package/dist/config/msw/mswHandlers.js +20 -24
- package/dist/config/ondevice/ondeviceBackgrounds.d.ts +8 -0
- package/dist/config/ondevice/ondeviceBackgrounds.js +8 -9
- package/dist/config/preview/index.d.ts +6 -0
- package/dist/config/preview/index.js +6 -13
- package/dist/config/refs/refs.d.ts +13 -0
- package/dist/config/refs/refs.js +12 -13
- package/dist/config/sourceLink/sourceLink.d.ts +35 -0
- package/dist/config/sourceLink/sourceLink.js +32 -36
- package/dist/config/static/staticDirsNextJs.d.ts +5 -0
- package/dist/config/static/staticDirsNextJs.js +5 -6
- package/dist/config/static/staticDirsReactNative.d.ts +2 -0
- package/dist/config/static/staticDirsReactNative.js +2 -3
- package/dist/config/static/staticDirsReactNativeWeb.d.ts +2 -0
- package/dist/config/static/staticDirsReactNativeWeb.js +2 -3
- package/dist/config/static/staticDirsVite.d.ts +5 -0
- package/dist/config/static/staticDirsVite.js +2 -3
- package/dist/config/static/staticDirsWebpack.d.ts +5 -0
- package/dist/config/static/staticDirsWebpack.js +2 -3
- package/dist/config/status/status.d.ts +21 -0
- package/dist/config/status/status.js +23 -24
- package/dist/config/users/authorization.d.ts +22 -0
- package/dist/config/users/authorization.js +6 -8
- package/dist/config/users/users.d.ts +18 -0
- package/dist/config/users/users.js +19 -21
- package/dist/config/viewport/viewport.d.ts +264 -0
- package/dist/config/viewport/viewport.js +23 -25
- package/dist/config/vite/getMediaProxyServerConfig.d.ts +13 -0
- package/dist/config/vite/getMediaProxyServerConfig.js +14 -16
- package/dist/decorators/index.d.ts +8 -0
- package/dist/decorators/index.js +8 -0
- package/dist/decorators/withClearStoresDecorator.d.ts +4 -0
- package/dist/decorators/withExtraProviders.d.ts +2 -0
- package/dist/decorators/withFigmaSourceLink.d.ts +5 -0
- package/dist/decorators/withFormSubmitDecorator.d.ts +2 -0
- package/dist/decorators/withFormSubmitDecorator.js +0 -1
- package/dist/decorators/withLayoutDecorator.d.ts +4 -0
- package/dist/decorators/withNextDecorator.d.ts +9 -0
- package/dist/decorators/withNextDecorator.js +1 -1
- package/dist/decorators/withUiDecorator.d.ts +5 -0
- package/dist/decorators/withUiDecorator.js +1 -1
- package/dist/decorators.js +1 -2
- package/dist/utils/getFigmaSourceLink.d.ts +2 -0
- package/dist/utils/getFigmaSourceLink.js +13 -14
- package/dist/utils/getStoryInfoBlocks.d.ts +2 -0
- package/dist/utils/getStoryInfoBlocks.js +45 -55
- package/dist/utils/handleMSWParameters.d.ts +8 -0
- package/dist/utils/handleMSWParameters.js +18 -27
- package/dist/utils/hasFormParameters.d.ts +2 -0
- package/dist/utils/hasFormParameters.js +6 -9
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +9 -17
- package/dist/utils/isVitestEnvironment.d.ts +2 -0
- package/dist/utils/isVitestEnvironment.js +2 -3
- package/dist/utils/storybookServerErrorOnSubmit.d.ts +2 -0
- package/dist/utils/storybookServerErrorOnSubmit.js +12 -19
- package/package.json +50 -43
|
@@ -11,12 +11,12 @@ function EmailTemplatePreview(props) {
|
|
|
11
11
|
const style = {
|
|
12
12
|
width: '100%',
|
|
13
13
|
height: '100%',
|
|
14
|
-
border: '0',
|
|
15
14
|
position: 'absolute',
|
|
16
15
|
top: '0',
|
|
17
16
|
right: '0',
|
|
18
17
|
bottom: '0',
|
|
19
18
|
left: '0',
|
|
19
|
+
border: '0',
|
|
20
20
|
overflow: 'hidden',
|
|
21
21
|
overflowX: 'hidden',
|
|
22
22
|
overflowY: 'hidden'
|
|
@@ -5,7 +5,6 @@ var FormSubmitWrapper = require('../../FormSubmitWrapper-_VeLgVir.js');
|
|
|
5
5
|
var isArray = require('../../isArray-DJguRq_2.js');
|
|
6
6
|
require('@itcase/common');
|
|
7
7
|
require('msw');
|
|
8
|
-
require('final-form');
|
|
9
8
|
var jsxRuntime = require('react/jsx-runtime');
|
|
10
9
|
|
|
11
10
|
/** Detect free variable `global` from Node.js. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('react');
|
|
4
|
-
var Notification = require('@itcase/ui-web/components/Notification');
|
|
5
4
|
var context = require('@itcase/ui-core/context');
|
|
5
|
+
var Notification = require('@itcase/ui-web/components/Notification');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
|
|
8
8
|
function withNextDecoratorFactory({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
require('react');
|
|
4
|
-
var Notification = require('@itcase/ui-web/components/Notification');
|
|
5
4
|
var context = require('@itcase/ui-core/context');
|
|
5
|
+
var Notification = require('@itcase/ui-web/components/Notification');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
|
|
8
8
|
function withUiDecorator(Story, {
|
package/dist/cjs/decorators.js
CHANGED
|
@@ -13,9 +13,8 @@ require('../isArray-DJguRq_2.js');
|
|
|
13
13
|
require('../FormSubmitWrapper-_VeLgVir.js');
|
|
14
14
|
require('@itcase/common');
|
|
15
15
|
require('msw');
|
|
16
|
-
require('final-form');
|
|
17
|
-
require('@itcase/ui-web/components/Notification');
|
|
18
16
|
require('@itcase/ui-core/context');
|
|
17
|
+
require('@itcase/ui-web/components/Notification');
|
|
19
18
|
|
|
20
19
|
|
|
21
20
|
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
let BACKEND_URL = process.env.EMAIL_URL;
|
|
4
|
+
if (process.env.NODE_ENV === 'production' && process.env.REST_BASE_URL) {
|
|
5
|
+
BACKEND_URL = `${process.env.REST_BASE_URL}/storybook`;
|
|
6
|
+
}
|
|
7
|
+
function EmailTemplatePreview(props) {
|
|
8
|
+
const style = {
|
|
9
|
+
width: '100%',
|
|
10
|
+
height: '100%',
|
|
11
|
+
position: 'absolute',
|
|
12
|
+
top: '0',
|
|
13
|
+
right: '0',
|
|
14
|
+
bottom: '0',
|
|
15
|
+
left: '0',
|
|
16
|
+
border: '0',
|
|
17
|
+
overflow: 'hidden',
|
|
18
|
+
overflowX: 'hidden',
|
|
19
|
+
overflowY: 'hidden',
|
|
20
|
+
};
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const emailPreviewIframe = document.getElementById('emailPreview');
|
|
23
|
+
const loaded = () => {
|
|
24
|
+
const email = emailPreviewIframe.getElementsByClassName('email-body').length;
|
|
25
|
+
if (!email &&
|
|
26
|
+
process.env.EMAIL_URL &&
|
|
27
|
+
process.env.EMAIL_URL.includes('http://')) {
|
|
28
|
+
alert('Need to run the backend server to display email templates, use: python manage.py runserver');
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
emailPreviewIframe?.addEventListener('load', loaded, true);
|
|
32
|
+
});
|
|
33
|
+
if (!BACKEND_URL) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
return (_jsx("iframe", { id: "emailPreview", width: "100%", height: "100%", src: `${BACKEND_URL}${props.url}`, style: style }));
|
|
37
|
+
}
|
|
38
|
+
export { EmailTemplatePreview };
|
|
@@ -9,12 +9,12 @@ function EmailTemplatePreview(props) {
|
|
|
9
9
|
const style = {
|
|
10
10
|
width: '100%',
|
|
11
11
|
height: '100%',
|
|
12
|
-
border: '0',
|
|
13
12
|
position: 'absolute',
|
|
14
13
|
top: '0',
|
|
15
14
|
right: '0',
|
|
16
15
|
bottom: '0',
|
|
17
16
|
left: '0',
|
|
17
|
+
border: '0',
|
|
18
18
|
overflow: 'hidden',
|
|
19
19
|
overflowX: 'hidden',
|
|
20
20
|
overflowY: 'hidden'
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Авто-submit для интерактивного Storybook (Require / Validation / ServerError).
|
|
4
|
+
* При primaryButtonHtmlType="button" — formRef.current.submit() (final-form API),
|
|
5
|
+
* при type="submit" — click по кнопке. В Vitest submit в play.
|
|
6
|
+
*/
|
|
7
|
+
declare function FormSubmitWrapper(props: any): React.FunctionComponentElement<{
|
|
8
|
+
component: any;
|
|
9
|
+
args: any;
|
|
10
|
+
render: any;
|
|
11
|
+
allArgs: any;
|
|
12
|
+
context: any;
|
|
13
|
+
}>;
|
|
14
|
+
export { FormSubmitWrapper };
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { autoSubmitForm } from './autoSubmitForm';
|
|
3
|
+
function wrapRender(component, render, formRef, defaultArgs = {}) {
|
|
4
|
+
if (typeof render !== 'function') {
|
|
5
|
+
return render;
|
|
6
|
+
}
|
|
7
|
+
return function renderWithRef(storyArgs) {
|
|
8
|
+
const args = { ...defaultArgs, ...(storyArgs ?? {}) };
|
|
9
|
+
delete args.ref;
|
|
10
|
+
delete args.errors;
|
|
11
|
+
if (!args.onSubmit && defaultArgs.onSubmit) {
|
|
12
|
+
args.onSubmit = defaultArgs.onSubmit;
|
|
13
|
+
}
|
|
14
|
+
const rendered = render(args);
|
|
15
|
+
if (React.isValidElement(rendered)) {
|
|
16
|
+
return React.cloneElement(rendered, {
|
|
17
|
+
...rendered.props,
|
|
18
|
+
...args,
|
|
19
|
+
ref: formRef,
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
if (component) {
|
|
23
|
+
return React.createElement(component, {
|
|
24
|
+
ref: formRef,
|
|
25
|
+
...args,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return rendered;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function withFormRef(children, formRef, bindings) {
|
|
32
|
+
const { component, args, render: storyRender, allArgs, context } = bindings;
|
|
33
|
+
const storyArgs = args ?? context?.args ?? children?.props?.args ?? {};
|
|
34
|
+
const storyComponent = component ?? context?.component ?? children?.props?.component;
|
|
35
|
+
const storyRenderFn = storyRender ?? context?.render ?? children?.props?.render;
|
|
36
|
+
const boundRender = wrapRender(storyComponent, storyRenderFn, formRef, storyArgs);
|
|
37
|
+
const addRef = (value) => (value ? { ...value, ref: formRef } : value);
|
|
38
|
+
return React.cloneElement(children, {
|
|
39
|
+
component: storyComponent,
|
|
40
|
+
args: addRef(storyArgs),
|
|
41
|
+
render: boundRender,
|
|
42
|
+
allArgs: addRef(allArgs),
|
|
43
|
+
context: context
|
|
44
|
+
? {
|
|
45
|
+
...context,
|
|
46
|
+
component: storyComponent,
|
|
47
|
+
args: addRef(context.args),
|
|
48
|
+
render: boundRender,
|
|
49
|
+
allArgs: addRef(context.allArgs),
|
|
50
|
+
}
|
|
51
|
+
: context,
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Авто-submit для интерактивного Storybook (Require / Validation / ServerError).
|
|
56
|
+
* При primaryButtonHtmlType="button" — formRef.current.submit() (final-form API),
|
|
57
|
+
* при type="submit" — click по кнопке. В Vitest submit в play.
|
|
58
|
+
*/
|
|
59
|
+
function FormSubmitWrapper(props) {
|
|
60
|
+
const formRef = useRef(null);
|
|
61
|
+
const { component, args, render, allArgs, context, submit = true, children, } = props;
|
|
62
|
+
const storyArgs = args ?? context?.args ?? children?.props?.args ?? {};
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!submit) {
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
67
|
+
delete formRef.__itcaseDidAutoSubmit;
|
|
68
|
+
const abortController = new AbortController();
|
|
69
|
+
autoSubmitForm(formRef, abortController.signal);
|
|
70
|
+
return () => {
|
|
71
|
+
abortController.abort();
|
|
72
|
+
delete formRef.__itcaseDidAutoSubmit;
|
|
73
|
+
};
|
|
74
|
+
}, [submit, storyArgs.errors]);
|
|
75
|
+
// eslint-disable-next-line react-hooks/refs -- ref уходит в cloneElement внутри bound render
|
|
76
|
+
return withFormRef(children, formRef, {
|
|
77
|
+
component,
|
|
78
|
+
args: storyArgs,
|
|
79
|
+
render,
|
|
80
|
+
allArgs,
|
|
81
|
+
context,
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
export { FormSubmitWrapper };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const SUBMIT_POLL_MS = 50;
|
|
2
|
+
function getStoryPreviewDocument() {
|
|
3
|
+
const previewIframe = (document.getElementById('storybook-preview-iframe') ??
|
|
4
|
+
document.querySelector('iframe[data-is-storybook="true"]'));
|
|
5
|
+
return previewIframe?.contentDocument ?? null;
|
|
6
|
+
}
|
|
7
|
+
function getMountRoot() {
|
|
8
|
+
const previewDocument = getStoryPreviewDocument();
|
|
9
|
+
if (previewDocument) {
|
|
10
|
+
return (previewDocument.getElementById('storybook-root') ??
|
|
11
|
+
previewDocument.getElementById('root') ??
|
|
12
|
+
previewDocument.body);
|
|
13
|
+
}
|
|
14
|
+
return (document.getElementById('storybook-root') ??
|
|
15
|
+
document.getElementById('root') ??
|
|
16
|
+
document.body);
|
|
17
|
+
}
|
|
18
|
+
function canSubmitFormApi(form) {
|
|
19
|
+
return (typeof form?.submit === 'function' &&
|
|
20
|
+
typeof form.getRegisteredFields === 'function' &&
|
|
21
|
+
form.getRegisteredFields().length > 0);
|
|
22
|
+
}
|
|
23
|
+
function findSaveDraftButton(root) {
|
|
24
|
+
if (!root) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
const saveDraft = root.querySelector('[data-testid$="SaveDraftButton"]');
|
|
28
|
+
if (!saveDraft) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return saveDraft.tagName === 'BUTTON'
|
|
32
|
+
? saveDraft
|
|
33
|
+
: saveDraft.querySelector('button');
|
|
34
|
+
}
|
|
35
|
+
function findSubmitButton(root) {
|
|
36
|
+
if (!root) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const byType = root.querySelector('button[type="submit"]');
|
|
40
|
+
if (byType) {
|
|
41
|
+
return byType;
|
|
42
|
+
}
|
|
43
|
+
const form = root.querySelector('form[data-testid], form');
|
|
44
|
+
if (!form) {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
return (form.querySelector('.form__button .form__button-item, .form__button-item') ?? null);
|
|
48
|
+
}
|
|
49
|
+
function touchFieldsBeforeSubmit(form) {
|
|
50
|
+
if (!canSubmitFormApi(form)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
for (const fieldName of form.getRegisteredFields()) {
|
|
54
|
+
if (!form.getFieldState(fieldName)?.touched) {
|
|
55
|
+
form.blur(fieldName);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
function triggerFormSubmit({ form, root, submitButton }) {
|
|
60
|
+
const saveDraftButton = findSaveDraftButton(root ?? getMountRoot());
|
|
61
|
+
if (saveDraftButton) {
|
|
62
|
+
saveDraftButton.click();
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
if (canSubmitFormApi(form)) {
|
|
66
|
+
touchFieldsBeforeSubmit(form);
|
|
67
|
+
form.submit();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (submitButton?.type === 'submit') {
|
|
71
|
+
submitButton.click();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async function autoSubmitForm(formRef, signal) {
|
|
75
|
+
if (formRef.__itcaseDidAutoSubmit) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
while (!signal.aborted) {
|
|
79
|
+
const root = getMountRoot();
|
|
80
|
+
const form = formRef.current;
|
|
81
|
+
const submitButton = findSubmitButton(root);
|
|
82
|
+
const saveDraftButton = findSaveDraftButton(root);
|
|
83
|
+
const canSubmitViaFormApi = canSubmitFormApi(form);
|
|
84
|
+
const canClickNativeSubmit = submitButton?.type === 'submit';
|
|
85
|
+
const canClickSaveDraft = Boolean(saveDraftButton);
|
|
86
|
+
// primaryButtonHtmlType="button": ждём final-form API или кнопку черновика в DOM
|
|
87
|
+
if (!canSubmitViaFormApi && !canClickNativeSubmit && !canClickSaveDraft) {
|
|
88
|
+
await new Promise((resolve) => {
|
|
89
|
+
setTimeout(resolve, SUBMIT_POLL_MS);
|
|
90
|
+
});
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
formRef.__itcaseDidAutoSubmit = true;
|
|
94
|
+
await new Promise((resolve) => {
|
|
95
|
+
requestAnimationFrame(() => {
|
|
96
|
+
requestAnimationFrame(resolve);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
if (signal.aborted) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
triggerFormSubmit({ form: formRef.current, root, submitButton });
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
export { autoSubmitForm };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const ADDON_THEMES: {
|
|
2
|
+
defaultTheme: string;
|
|
3
|
+
themes: {
|
|
4
|
+
AM: string;
|
|
5
|
+
'AM Dark Theme': string;
|
|
6
|
+
'AM Light Theme': string;
|
|
7
|
+
Baikal: string;
|
|
8
|
+
'Baikal Dark Theme': string;
|
|
9
|
+
'Baikal Light Theme': string;
|
|
10
|
+
ITCase: string;
|
|
11
|
+
'ITCase Dark': string;
|
|
12
|
+
'ITCase Light Theme': string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export { ADDON_THEMES };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
const ADDON_THEMES = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { ADDON_THEMES }
|
|
2
|
+
defaultTheme: 'AM',
|
|
3
|
+
themes: {
|
|
4
|
+
AM: 'am',
|
|
5
|
+
'AM Dark Theme': 'am dark-theme',
|
|
6
|
+
'AM Light Theme': 'am light-theme',
|
|
7
|
+
Baikal: 'baikal',
|
|
8
|
+
'Baikal Dark Theme': 'baikal dark-theme',
|
|
9
|
+
'Baikal Light Theme': 'baikal light-theme',
|
|
10
|
+
ITCase: 'itcase',
|
|
11
|
+
'ITCase Dark': 'itcase dark-theme',
|
|
12
|
+
'ITCase Light Theme': 'itcase light-theme',
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export { ADDON_THEMES };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
const ADDONS_NEXTJS = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
export { ADDONS_NEXTJS }
|
|
2
|
+
'@storybook/addon-links',
|
|
3
|
+
'@storybook/addon-themes',
|
|
4
|
+
'@storybook/addon-designs',
|
|
5
|
+
'@storybook/addon-docs',
|
|
6
|
+
'@storybook/addon-vitest',
|
|
7
|
+
'storybook-addon-source-link',
|
|
8
|
+
];
|
|
9
|
+
export { ADDONS_NEXTJS };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
const ADDONS_REACT_NATIVE = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
]
|
|
7
|
-
|
|
8
|
-
export { ADDONS_REACT_NATIVE }
|
|
2
|
+
'@storybook/addon-ondevice-notes',
|
|
3
|
+
'@storybook/addon-ondevice-controls',
|
|
4
|
+
'@storybook/addon-ondevice-backgrounds',
|
|
5
|
+
'@storybook/addon-ondevice-actions',
|
|
6
|
+
];
|
|
7
|
+
export { ADDONS_REACT_NATIVE };
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
const ADDONS_REACT_NATIVE_WEB = ['@storybook/addon-docs']
|
|
2
|
-
|
|
3
|
-
export { ADDONS_REACT_NATIVE_WEB }
|
|
1
|
+
const ADDONS_REACT_NATIVE_WEB = ['@storybook/addon-docs'];
|
|
2
|
+
export { ADDONS_REACT_NATIVE_WEB };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
const ADDONS_VITE = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
]
|
|
9
|
-
|
|
10
|
-
export { ADDONS_VITE }
|
|
2
|
+
'@storybook/addon-links',
|
|
3
|
+
'@storybook/addon-themes',
|
|
4
|
+
'@storybook/addon-designs',
|
|
5
|
+
'@storybook/addon-docs',
|
|
6
|
+
'@storybook/addon-vitest',
|
|
7
|
+
'storybook-addon-source-link',
|
|
8
|
+
];
|
|
9
|
+
export { ADDONS_VITE };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const ADDONS_WEBPACK: (string | {
|
|
2
|
+
name: string;
|
|
3
|
+
options: {
|
|
4
|
+
rules: {
|
|
5
|
+
test: RegExp;
|
|
6
|
+
use: (string | {
|
|
7
|
+
loader: string;
|
|
8
|
+
options: {
|
|
9
|
+
importLoaders: number;
|
|
10
|
+
};
|
|
11
|
+
} | {
|
|
12
|
+
loader: string;
|
|
13
|
+
options?: undefined;
|
|
14
|
+
})[];
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
})[];
|
|
18
|
+
export { ADDONS_WEBPACK };
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
const ADDONS_WEBPACK = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
2
|
+
'@storybook/addon-webpack5-compiler-swc',
|
|
3
|
+
'@storybook/addon-themes',
|
|
4
|
+
'@storybook/addon-designs',
|
|
5
|
+
'@storybook/addon-docs',
|
|
6
|
+
'@storybook/addon-themes',
|
|
7
|
+
{
|
|
8
|
+
name: '@storybook/addon-styling-webpack',
|
|
9
|
+
options: {
|
|
10
|
+
rules: [
|
|
11
|
+
{
|
|
12
|
+
test: /\.css$/,
|
|
13
|
+
use: [
|
|
14
|
+
'style-loader',
|
|
15
|
+
{
|
|
16
|
+
loader: 'css-loader',
|
|
17
|
+
options: { importLoaders: 1 },
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
loader: 'postcss-loader',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
23
25
|
},
|
|
24
|
-
],
|
|
25
26
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
export { ADDONS_WEBPACK }
|
|
27
|
+
'storybook-addon-source-link',
|
|
28
|
+
];
|
|
29
|
+
export { ADDONS_WEBPACK };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const BACKGROUNDS: {
|
|
2
|
+
baikal: {
|
|
3
|
+
name: string;
|
|
4
|
+
value: string;
|
|
5
|
+
};
|
|
6
|
+
dark: {
|
|
7
|
+
name: string;
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
default: {
|
|
11
|
+
name: string;
|
|
12
|
+
value: string;
|
|
13
|
+
};
|
|
14
|
+
figma: {
|
|
15
|
+
name: string;
|
|
16
|
+
value: string;
|
|
17
|
+
};
|
|
18
|
+
light: {
|
|
19
|
+
name: string;
|
|
20
|
+
value: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export { BACKGROUNDS };
|
|
@@ -1,25 +1,23 @@
|
|
|
1
1
|
const BACKGROUNDS = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export { BACKGROUNDS }
|
|
25
|
-
|
|
2
|
+
baikal: {
|
|
3
|
+
name: 'Baikal',
|
|
4
|
+
value: '#4CB7EA',
|
|
5
|
+
},
|
|
6
|
+
dark: {
|
|
7
|
+
name: 'Dark',
|
|
8
|
+
value: '#000000',
|
|
9
|
+
},
|
|
10
|
+
default: {
|
|
11
|
+
name: 'Default',
|
|
12
|
+
value: 'none',
|
|
13
|
+
},
|
|
14
|
+
figma: {
|
|
15
|
+
name: 'Figma',
|
|
16
|
+
value: '#E5E5E5',
|
|
17
|
+
},
|
|
18
|
+
light: {
|
|
19
|
+
name: 'Light',
|
|
20
|
+
value: '#fff',
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
export { BACKGROUNDS };
|