@salutejs/plasma-web 1.494.1-canary.1688.12694209114.0 → 1.494.1-canary.1688.12704841896.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/cjs/components/Accordion/Accordion.config.js +1 -1
- package/css/cjs/components/Attach/Attach.config.js +1 -1
- package/css/cjs/components/Autocomplete/Autocomplete.config.js +1 -1
- package/css/cjs/components/Avatar/Avatar.config.js +1 -1
- package/css/cjs/components/Badge/Badge.config.js +1 -1
- package/css/cjs/components/Breadcrumbs/Breadcrumbs.config.js +1 -1
- package/css/cjs/components/Button/Button.config.js +1 -1
- package/css/cjs/components/ButtonGroup/ButtonGroup.config.js +1 -1
- package/css/cjs/components/Calendar/CalendarBase.config.js +1 -1
- package/css/cjs/components/Calendar/CalendarDouble.config.js +1 -1
- package/css/cjs/components/Cell/Cell.config.js +1 -1
- package/css/cjs/components/Checkbox/Checkbox.config.js +1 -1
- package/css/cjs/components/Chip/Chip.config.js +1 -1
- package/css/cjs/components/ChipGroup/ChipGroup.config.js +1 -1
- package/css/cjs/components/Combobox/Combobox.config.js +1 -1
- package/css/cjs/components/Combobox/Legacy/Combobox.config.js +1 -1
- package/css/cjs/components/Counter/Counter.config.js +1 -1
- package/css/cjs/components/DatePicker/DatePicker.config.js +1 -1
- package/css/cjs/components/Divider/Divider.config.js +1 -1
- package/css/cjs/components/Drawer/Drawer.config.js +1 -1
- package/css/cjs/components/Dropdown/Dropdown.config.js +1 -1
- package/css/cjs/components/Dropdown/components/DropdownOld.config.js +1 -1
- package/css/cjs/components/Dropzone/Dropzone.config.js +1 -1
- package/css/cjs/components/Editable/Editable.config.js +1 -1
- package/css/cjs/components/EmptyState/EmptyState.config.js +1 -1
- package/css/cjs/components/Grid/Grid.config.js +1 -1
- package/css/cjs/components/IconButton/IconButton.config.js +1 -1
- package/css/cjs/components/Indicator/Indicator.config.js +1 -1
- package/css/cjs/components/Link/Link.config.js +1 -1
- package/css/cjs/components/ModalBase/Modal.config.js +1 -1
- package/css/cjs/components/Note/Note.config.js +1 -1
- package/css/cjs/components/Notification/Notification.config.js +1 -1
- package/css/cjs/components/NumberInput/NumberInput.config.js +1 -1
- package/css/cjs/components/Pagination/Pagination.config.js +1 -1
- package/css/cjs/components/Popover/Popover.config.js +1 -1
- package/css/cjs/components/Progress/Progress.config.js +1 -1
- package/css/cjs/components/Radiobox/Radiobox.config.js +1 -1
- package/css/cjs/components/Range/Range.config.js +1 -1
- package/css/cjs/components/Rating/Rating.config.js +1 -1
- package/css/cjs/components/Segment/SegmentGroup.config.js +1 -1
- package/css/cjs/components/Segment/SegmentItem.config.js +1 -1
- package/css/cjs/components/Select/Select.config.js +1 -1
- package/css/cjs/components/Sheet/Sheet.config.js +1 -1
- package/css/cjs/components/Skeleton/LineSkeleton.config.js +1 -1
- package/css/cjs/components/Slider/Slider.config.js +1 -1
- package/css/cjs/components/Spinner/Spinner.config.js +1 -1
- package/css/cjs/components/Steps/Steps.config.js +1 -1
- package/css/cjs/components/Switch/Switch.config.js +1 -1
- package/css/cjs/components/Tabs/horizontal/HorizontalTabItem.config.js +1 -1
- package/css/cjs/components/Tabs/horizontal/HorizontalTabs.config.js +1 -1
- package/css/cjs/components/Tabs/vertical/VerticalTabItem.config.js +1 -1
- package/css/cjs/components/Tabs/vertical/VerticalTabs.config.js +1 -1
- package/css/cjs/components/TextArea/TextArea.config.js +1 -1
- package/css/cjs/components/TextField/TextField.config.js +1 -1
- package/css/cjs/components/TextFieldGroup/TextFieldGroup.config.js +1 -1
- package/css/cjs/components/Toast/Toast.config.js +1 -1
- package/css/cjs/components/Toolbar/Toolbar.config.js +1 -1
- package/css/cjs/components/Tooltip/Tooltip.config.js +1 -1
- package/css/cjs/components/Tree/Tree.config.js +1 -1
- package/css/cjs/components/Typography/Body.config.js +1 -1
- package/css/cjs/components/Typography/Dspl.config.js +1 -1
- package/css/cjs/components/Typography/Heading.config.js +1 -1
- package/css/cjs/components/Typography/Old/Body.config.js +1 -1
- package/css/cjs/components/Typography/Old/Button.config.js +1 -1
- package/css/cjs/components/Typography/Old/Caption.config.js +1 -1
- package/css/cjs/components/Typography/Old/Footnote.config.js +1 -1
- package/css/cjs/components/Typography/Old/Headline.config.js +1 -1
- package/css/cjs/components/Typography/Old/Paragraph.config.js +1 -1
- package/css/cjs/components/Typography/Old/ParagraphText.config.js +1 -1
- package/css/cjs/components/Typography/Old/Subtitle.config.js +1 -1
- package/css/cjs/components/Typography/Old/Underline.config.js +1 -1
- package/css/cjs/components/Typography/Text.config.js +1 -1
- package/package.json +3 -3
- package/rollup.config.mjs +67 -55
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-web",
|
3
|
-
"version": "1.494.1-canary.1688.
|
3
|
+
"version": "1.494.1-canary.1688.12704841896.0",
|
4
4
|
"description": "Salute Design System / React UI kit for web applications",
|
5
5
|
"author": "Salute Frontend Team <salute.developers@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -21,7 +21,7 @@
|
|
21
21
|
"dependencies": {
|
22
22
|
"@salutejs/plasma-core": "1.191.0-dev.0",
|
23
23
|
"@salutejs/plasma-hope": "1.328.1-dev.0",
|
24
|
-
"@salutejs/plasma-new-hope": "0.238.1-canary.1688.
|
24
|
+
"@salutejs/plasma-new-hope": "0.238.1-canary.1688.12704841896.0",
|
25
25
|
"@salutejs/plasma-themes": "0.28.0",
|
26
26
|
"@salutejs/plasma-tokens-b2b": "1.45.0-dev.0",
|
27
27
|
"@salutejs/plasma-tokens-b2c": "0.56.0-dev.0",
|
@@ -111,5 +111,5 @@
|
|
111
111
|
"Fanil Zubairov"
|
112
112
|
],
|
113
113
|
"sideEffects": false,
|
114
|
-
"gitHead": "
|
114
|
+
"gitHead": "714a64fae9f48583cee1ee88dfb5cfecacceae49"
|
115
115
|
}
|
package/rollup.config.mjs
CHANGED
@@ -80,66 +80,78 @@ function importCssPlugin() {
|
|
80
80
|
const styles = {};
|
81
81
|
|
82
82
|
return {
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
// TODO: #718 cjs modules => require('./file.css');
|
105
|
-
const importString = `import './${file.replace('.css.js', '.css.css')}';\n`;
|
106
|
-
this.emitFile({
|
107
|
-
type: 'asset',
|
108
|
-
fileName: file,
|
109
|
-
source: importString + code,
|
110
|
-
});
|
111
|
-
} else if (file.endsWith('.js')) {
|
112
|
-
// ADD IMPORT FOR LINARIA
|
113
|
-
// linaria
|
114
|
-
const cssFiles = modules.importedIds
|
115
|
-
.filter(a => a.includes(inputDir))
|
116
|
-
.filter(a => !a.endsWith('.module.css') && a.endsWith('.css'))
|
117
|
-
.map(a => path.relative(inputDir, a))
|
118
|
-
|
119
|
-
if (!cssFiles.length) {
|
120
|
-
return;
|
121
|
-
}
|
122
|
-
const imports = [];
|
123
|
-
cssFiles.forEach(cssFile => {
|
124
|
-
imports.push(`import './${path.relative(path.dirname(file), cssFile)}';`);
|
125
|
-
this.emitFile({
|
126
|
-
type: 'asset',
|
127
|
-
fileName: cssFile,
|
128
|
-
source: styles[cssFile],
|
129
|
-
});
|
130
|
-
})
|
131
|
-
if (imports.length) {
|
83
|
+
name: 'importCssPlugin',
|
84
|
+
transform(code, id) {
|
85
|
+
if (!filter(id)) {
|
86
|
+
return;
|
87
|
+
}
|
88
|
+
|
89
|
+
if (styles[id] !== code && (styles[id] || code)) {
|
90
|
+
styles[path.relative(inputDir, id)] = code;
|
91
|
+
}
|
92
|
+
|
93
|
+
return { code };
|
94
|
+
},
|
95
|
+
generateBundle(options, bundle) {
|
96
|
+
const files = Object.keys(bundle);
|
97
|
+
|
98
|
+
files.forEach((file) => {
|
99
|
+
const root = bundle[file].facadeModuleId;
|
100
|
+
const modules = this.getModuleInfo(root);
|
101
|
+
|
102
|
+
// ADD IMPORT FOR CSS MODULES
|
103
|
+
if (file.endsWith('.css.js')) {
|
132
104
|
const { code } = bundle[file];
|
105
|
+
const data = file.replace('.css.js', '.css.css');
|
106
|
+
|
107
|
+
const requireString =
|
108
|
+
options.format === 'cjs' ? `require('./${data}');\n` : `import './${data}';\n`;
|
109
|
+
|
133
110
|
this.emitFile({
|
134
111
|
type: 'asset',
|
135
112
|
fileName: file,
|
136
|
-
source:
|
113
|
+
source: requireString + code,
|
114
|
+
});
|
115
|
+
} else if (file.endsWith('.js')) {
|
116
|
+
// ADD IMPORT FOR LINARIA
|
117
|
+
// linaria
|
118
|
+
const cssFiles = modules.importedIds
|
119
|
+
.filter((a) => a.includes(inputDir))
|
120
|
+
.filter((a) => !a.endsWith('.module.css') && a.endsWith('.css'))
|
121
|
+
.map((a) => path.relative(inputDir, a));
|
122
|
+
|
123
|
+
if (!cssFiles.length) {
|
124
|
+
return;
|
125
|
+
}
|
126
|
+
|
127
|
+
const imports = [];
|
128
|
+
|
129
|
+
cssFiles.forEach((cssFile) => {
|
130
|
+
const data = path.relative(path.dirname(file), cssFile);
|
131
|
+
|
132
|
+
const importStatement =
|
133
|
+
options.format === 'cjs' ? `require('./${data}');` : `import './${data}';`;
|
134
|
+
|
135
|
+
imports.push(importStatement);
|
136
|
+
|
137
|
+
this.emitFile({
|
138
|
+
type: 'asset',
|
139
|
+
fileName: cssFile,
|
140
|
+
source: styles[cssFile],
|
141
|
+
});
|
137
142
|
});
|
138
143
|
|
139
|
-
|
144
|
+
if (imports.length) {
|
145
|
+
const { code } = bundle[file];
|
146
|
+
|
147
|
+
this.emitFile({
|
148
|
+
type: 'asset',
|
149
|
+
fileName: file,
|
150
|
+
source: `${imports.join('\n')}\n${code}`,
|
151
|
+
});
|
152
|
+
}
|
140
153
|
}
|
141
|
-
}
|
142
|
-
}
|
143
|
-
},
|
154
|
+
});
|
155
|
+
},
|
144
156
|
};
|
145
|
-
|
157
|
+
}
|