@jetbrains/ring-ui 7.0.75 → 7.0.76
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/package.json +3 -3
- package/components/avatar/avatar.figma.js +0 -45
- package/components/avatar-stack/avatar-stack.figma.js +0 -33
- package/components/breadcrumbs/breadcrumbs.figma.js +0 -31
- package/components/button/button.figma.js +0 -95
- package/components/checkbox/checkbox-group.figma.js +0 -31
- package/components/checkbox/checkbox.figma.js +0 -38
- package/components/error-bubble/error-bubble.figma.js +0 -15
- package/components/input/input.figma.js +0 -74
- /package/components/alert/{alert.jsx → alert.js} +0 -0
- /package/components/alert/{container.jsx → container.js} +0 -0
- /package/components/alert-service/{alert-service.jsx → alert-service.js} +0 -0
- /package/components/auth/{down-notification.jsx → down-notification.js} +0 -0
- /package/components/auth/{iframe-flow.jsx → iframe-flow.js} +0 -0
- /package/components/auth-dialog/{auth-dialog.jsx → auth-dialog.js} +0 -0
- /package/components/auth-dialog-service/{auth-dialog-service.jsx → auth-dialog-service.js} +0 -0
- /package/components/avatar/{avatar-info.jsx → avatar-info.js} +0 -0
- /package/components/avatar/{avatar.jsx → avatar.js} +0 -0
- /package/components/avatar/{fallback-avatar.jsx → fallback-avatar.js} +0 -0
- /package/components/avatar-stack/{avatar-stack.jsx → avatar-stack.js} +0 -0
- /package/components/banner/{banner.jsx → banner.js} +0 -0
- /package/components/breadcrumbs/{breadcrumbs.jsx → breadcrumbs.js} +0 -0
- /package/components/button/{button.jsx → button.js} +0 -0
- /package/components/button-group/{button-group.jsx → button-group.js} +0 -0
- /package/components/button-group/{caption.jsx → caption.js} +0 -0
- /package/components/button-set/{button-set.jsx → button-set.js} +0 -0
- /package/components/button-toolbar/{button-toolbar.jsx → button-toolbar.js} +0 -0
- /package/components/checkbox/{checkbox.jsx → checkbox.js} +0 -0
- /package/components/code/{code.jsx → code.js} +0 -0
- /package/components/collapse/{collapse-content.jsx → collapse-content.js} +0 -0
- /package/components/collapse/{collapse-control.jsx → collapse-control.js} +0 -0
- /package/components/collapse/{collapse.jsx → collapse.js} +0 -0
- /package/components/confirm/{confirm.jsx → confirm.js} +0 -0
- /package/components/confirm-service/{confirm-service.jsx → confirm-service.js} +0 -0
- /package/components/content-layout/{content-layout.jsx → content-layout.js} +0 -0
- /package/components/content-layout/{sidebar.jsx → sidebar.js} +0 -0
- /package/components/contenteditable/{contenteditable.jsx → contenteditable.js} +0 -0
- /package/components/control-help/{control-help.jsx → control-help.js} +0 -0
- /package/components/control-label/{control-label.jsx → control-label.js} +0 -0
- /package/components/data-list/{data-list.jsx → data-list.js} +0 -0
- /package/components/data-list/{data-list.mock.jsx → data-list.mock.js} +0 -0
- /package/components/data-list/{item.jsx → item.js} +0 -0
- /package/components/data-list/{title.jsx → title.js} +0 -0
- /package/components/date-picker/{date-input.jsx → date-input.js} +0 -0
- /package/components/date-picker/{date-picker.jsx → date-picker.js} +0 -0
- /package/components/date-picker/{date-popup.jsx → date-popup.js} +0 -0
- /package/components/date-picker/{day.jsx → day.js} +0 -0
- /package/components/date-picker/{month-names.jsx → month-names.js} +0 -0
- /package/components/date-picker/{month-slider.jsx → month-slider.js} +0 -0
- /package/components/date-picker/{month.jsx → month.js} +0 -0
- /package/components/date-picker/{months.jsx → months.js} +0 -0
- /package/components/date-picker/{weekdays.jsx → weekdays.js} +0 -0
- /package/components/date-picker/{years.jsx → years.js} +0 -0
- /package/components/dialog/{dialog.jsx → dialog.js} +0 -0
- /package/components/dropdown/{anchor.jsx → anchor.js} +0 -0
- /package/components/dropdown/{dropdown.jsx → dropdown.js} +0 -0
- /package/components/dropdown-menu/{dropdown-menu.jsx → dropdown-menu.js} +0 -0
- /package/components/editable-heading/{editable-heading.jsx → editable-heading.js} +0 -0
- /package/components/error-bubble/{error-bubble.jsx → error-bubble.js} +0 -0
- /package/components/error-message/{error-message.jsx → error-message.js} +0 -0
- /package/components/footer/{footer.jsx → footer.js} +0 -0
- /package/components/global/{controls-height.jsx → controls-height.js} +0 -0
- /package/components/global/{create-stateful-context.jsx → create-stateful-context.js} +0 -0
- /package/components/global/{focus-sensor-hoc.jsx → focus-sensor-hoc.js} +0 -0
- /package/components/global/{react-dom-renderer.jsx → react-dom-renderer.js} +0 -0
- /package/components/global/{rerender-hoc.jsx → rerender-hoc.js} +0 -0
- /package/components/global/{theme.jsx → theme.js} +0 -0
- /package/components/grid/{col.jsx → col.js} +0 -0
- /package/components/grid/{grid.jsx → grid.js} +0 -0
- /package/components/grid/{row.jsx → row.js} +0 -0
- /package/components/group/{group.jsx → group.js} +0 -0
- /package/components/header/{header-icon.jsx → header-icon.js} +0 -0
- /package/components/header/{header.jsx → header.js} +0 -0
- /package/components/header/{links.jsx → links.js} +0 -0
- /package/components/header/{logo.jsx → logo.js} +0 -0
- /package/components/header/{profile.jsx → profile.js} +0 -0
- /package/components/header/{services-link.jsx → services-link.js} +0 -0
- /package/components/header/{services.jsx → services.js} +0 -0
- /package/components/header/{smart-profile.jsx → smart-profile.js} +0 -0
- /package/components/header/{smart-services.jsx → smart-services.js} +0 -0
- /package/components/header/{tray.jsx → tray.js} +0 -0
- /package/components/heading/{heading.jsx → heading.js} +0 -0
- /package/components/i18n/{i18n-context.jsx → i18n-context.js} +0 -0
- /package/components/icon/{icon-svg.jsx → icon-svg.js} +0 -0
- /package/components/icon/{icon.jsx → icon.js} +0 -0
- /package/components/input/{input.jsx → input.js} +0 -0
- /package/components/island/{adaptive-island-hoc.jsx → adaptive-island-hoc.js} +0 -0
- /package/components/island/{content.jsx → content.js} +0 -0
- /package/components/island/{header.jsx → header.js} +0 -0
- /package/components/island/{island.jsx → island.js} +0 -0
- /package/components/link/{clickable-link.jsx → clickable-link.js} +0 -0
- /package/components/link/{clickableLink.jsx → clickableLink.js} +0 -0
- /package/components/link/{link.jsx → link.js} +0 -0
- /package/components/list/{list-custom.jsx → list-custom.js} +0 -0
- /package/components/list/{list-hint.jsx → list-hint.js} +0 -0
- /package/components/list/{list-item.jsx → list-item.js} +0 -0
- /package/components/list/{list-separator.jsx → list-separator.js} +0 -0
- /package/components/list/{list-title.jsx → list-title.js} +0 -0
- /package/components/list/{list.jsx → list.js} +0 -0
- /package/components/loader/{loader.jsx → loader.js} +0 -0
- /package/components/loader-inline/{loader-inline.jsx → loader-inline.js} +0 -0
- /package/components/loader-screen/{loader-screen.jsx → loader-screen.js} +0 -0
- /package/components/login-dialog/{login-dialog.jsx → login-dialog.js} +0 -0
- /package/components/login-dialog/{service.jsx → service.js} +0 -0
- /package/components/markdown/{markdown.jsx → markdown.js} +0 -0
- /package/components/message/{message.jsx → message.js} +0 -0
- /package/components/pager/{pager.jsx → pager.js} +0 -0
- /package/components/panel/{panel.jsx → panel.js} +0 -0
- /package/components/popup/{popup.jsx → popup.js} +0 -0
- /package/components/popup/{popup.target.jsx → popup.target.js} +0 -0
- /package/components/popup-menu/{popup-menu.jsx → popup-menu.js} +0 -0
- /package/components/progress-bar/{progress-bar.jsx → progress-bar.js} +0 -0
- /package/components/query-assist/{query-assist-suggestions.jsx → query-assist-suggestions.js} +0 -0
- /package/components/query-assist/{query-assist.jsx → query-assist.js} +0 -0
- /package/components/radio/{radio-item.jsx → radio-item.js} +0 -0
- /package/components/radio/{radio.jsx → radio.js} +0 -0
- /package/components/scrollable-section/{scrollable-section.jsx → scrollable-section.js} +0 -0
- /package/components/select/{select-filter.jsx → select-filter.js} +0 -0
- /package/components/select/{select-popup.jsx → select-popup.js} +0 -0
- /package/components/select/{select.jsx → select.js} +0 -0
- /package/components/shortcuts/{shortcuts-hoc.jsx → shortcuts-hoc.js} +0 -0
- /package/components/slider/{slider.jsx → slider.js} +0 -0
- /package/components/tab-trap/{tab-trap.jsx → tab-trap.js} +0 -0
- /package/components/table/{cell.jsx → cell.js} +0 -0
- /package/components/table/{disable-hover-hoc.jsx → disable-hover-hoc.js} +0 -0
- /package/components/table/{header-cell.jsx → header-cell.js} +0 -0
- /package/components/table/{header.jsx → header.js} +0 -0
- /package/components/table/{multitable.jsx → multitable.js} +0 -0
- /package/components/table/{row-with-focus-sensor.jsx → row-with-focus-sensor.js} +0 -0
- /package/components/table/{row.jsx → row.js} +0 -0
- /package/components/table/{selection-shortcuts-hoc.jsx → selection-shortcuts-hoc.js} +0 -0
- /package/components/table/{simple-table.jsx → simple-table.js} +0 -0
- /package/components/table/{smart-table.jsx → smart-table.js} +0 -0
- /package/components/table/{table.jsx → table.js} +0 -0
- /package/components/tabs/{collapsible-more.jsx → collapsible-more.js} +0 -0
- /package/components/tabs/{collapsible-tab.jsx → collapsible-tab.js} +0 -0
- /package/components/tabs/{collapsible-tabs.jsx → collapsible-tabs.js} +0 -0
- /package/components/tabs/{custom-item.jsx → custom-item.js} +0 -0
- /package/components/tabs/{dumb-tabs.jsx → dumb-tabs.js} +0 -0
- /package/components/tabs/{smart-tabs.jsx → smart-tabs.js} +0 -0
- /package/components/tabs/{tab-link.jsx → tab-link.js} +0 -0
- /package/components/tabs/{tab.jsx → tab.js} +0 -0
- /package/components/tag/{tag.jsx → tag.js} +0 -0
- /package/components/tags-input/{tags-input.jsx → tags-input.js} +0 -0
- /package/components/tags-list/{tags-list.jsx → tags-list.js} +0 -0
- /package/components/text/{text.jsx → text.js} +0 -0
- /package/components/toggle/{toggle.jsx → toggle.js} +0 -0
- /package/components/tooltip/{tooltip.jsx → tooltip.js} +0 -0
- /package/components/upload/{upload.jsx → upload.js} +0 -0
- /package/components/user-agreement/{service.jsx → service.js} +0 -0
- /package/components/user-agreement/{user-agreement.jsx → user-agreement.js} +0 -0
- /package/components/user-card/{card.jsx → card.js} +0 -0
- /package/components/user-card/{smart-user-card-tooltip.jsx → smart-user-card-tooltip.js} +0 -0
- /package/components/user-card/{tooltip.jsx → tooltip.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.76",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "JetBrains"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"postpublish": "pinst --enable",
|
|
64
64
|
"postrelease-ci": "git push --follow-tags",
|
|
65
65
|
"prea11y-audit": "playwright install",
|
|
66
|
-
"prebuild": "rimraf components && tsc --project tsconfig-build.json && cpy './**/*' '!**/*.stories.*' '!**/*.ts' '!**/*.tsx' '!**/test-helpers/mocks/**' ../components --parents --cwd=src/",
|
|
66
|
+
"prebuild": "rimraf components && tsc --project tsconfig-build.json && cpy './**/*' '!**/*.stories.*' '!**/*.figma.*' '!**/*.ts' '!**/*.tsx' '!**/test-helpers/mocks/**' ../components --parents --cwd=src/",
|
|
67
67
|
"prepare": "webpack -c .storybook/custom-header/webpack.config.js",
|
|
68
68
|
"prepublishOnly": "pinst --disable",
|
|
69
69
|
"prerelease-built-ci": "node scripts/prepare-built-package.js",
|
|
@@ -124,7 +124,6 @@
|
|
|
124
124
|
"@vitejs/plugin-react": "^5.0.4",
|
|
125
125
|
"@vitest/eslint-plugin": "^1.3.23",
|
|
126
126
|
"acorn": "^8.15.0",
|
|
127
|
-
"babel-plugin-react-compiler": "^1.0.0",
|
|
128
127
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
129
128
|
"caniuse-lite": "^1.0.30001754",
|
|
130
129
|
"chai-as-promised": "^8.0.2",
|
|
@@ -211,6 +210,7 @@
|
|
|
211
210
|
"@types/react-virtualized": "9.22.3",
|
|
212
211
|
"@types/util-deprecate": "^1.0.4",
|
|
213
212
|
"babel-loader": "10.0.0",
|
|
213
|
+
"babel-plugin-react-compiler": "^1.0.0",
|
|
214
214
|
"babel-plugin-transform-define": "^2.1.4",
|
|
215
215
|
"browserslist": "^4.27.0",
|
|
216
216
|
"change-case": "^4.1.1",
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=5990-522
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
|
|
6
|
-
const round = instance.getBoolean('Round');
|
|
7
|
-
const size = parseInt(instance.getString('Size'), 10);
|
|
8
|
-
const content = instance.getString('Content');
|
|
9
|
-
|
|
10
|
-
const props = [];
|
|
11
|
-
const DEFAULT_SIZE = 20;
|
|
12
|
-
const isDefaultSize = size === DEFAULT_SIZE;
|
|
13
|
-
const imports = [`import Avatar${isDefaultSize ? '' : ', {Size}'} from '@jetbrains/ring-ui/components/avatar/avatar'`];
|
|
14
|
-
if (!isDefaultSize) {
|
|
15
|
-
props.push(`size={Size.Size${size}}`);
|
|
16
|
-
}
|
|
17
|
-
switch (content) {
|
|
18
|
-
case 'color/image':
|
|
19
|
-
props.push('url="avatar.png"');
|
|
20
|
-
break;
|
|
21
|
-
case 'name':
|
|
22
|
-
props.push('username="Samuel Morse"');
|
|
23
|
-
break;
|
|
24
|
-
case 'label':
|
|
25
|
-
props.push(`info="${instance.findText('Content').textContent}"`);
|
|
26
|
-
break;
|
|
27
|
-
case 'icon':
|
|
28
|
-
imports.push(
|
|
29
|
-
"import Icon from '@jetbrains/ring-ui/components/icon/icon'",
|
|
30
|
-
"import warningIcon from '@jetbrains/icons/warning.svg'",
|
|
31
|
-
);
|
|
32
|
-
props.push('info={<Icon glyph={warningIcon} />}');
|
|
33
|
-
break;
|
|
34
|
-
default:
|
|
35
|
-
}
|
|
36
|
-
if (round) {
|
|
37
|
-
props.push('round');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export default {
|
|
41
|
-
id: 'avatar',
|
|
42
|
-
example: figma.code`${imports.join('\n')}
|
|
43
|
-
|
|
44
|
-
<Avatar ${props.map(prop => `${prop} `).join('')}/>`,
|
|
45
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=5990-752
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
const sizeString = instance.getString('Size');
|
|
6
|
-
const [sizeSubstring] = sizeString.match(/\d+/) ?? [];
|
|
7
|
-
const size = parseInt(sizeSubstring, 10);
|
|
8
|
-
const children = instance.findConnectedInstances(() => true);
|
|
9
|
-
|
|
10
|
-
const imports = ["import AvatarStack from '@jetbrains/ring-ui/components/avatar-stack/avatar-stack'"];
|
|
11
|
-
const props = [];
|
|
12
|
-
|
|
13
|
-
const DEFAULT_SIZE = 20;
|
|
14
|
-
const isDefaultSize = size === DEFAULT_SIZE;
|
|
15
|
-
if (!isDefaultSize) {
|
|
16
|
-
props.push(`size={Size.Size${size}}`);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
const renderedChildren = children.map(child => {
|
|
20
|
-
const {example} = child.executeTemplate();
|
|
21
|
-
const [childImports, code] = example[0].code.split('\n\n');
|
|
22
|
-
return {imports: childImports, code};
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export default {
|
|
26
|
-
id: 'avatar-stack',
|
|
27
|
-
example: figma.code`${imports.join('\n')}
|
|
28
|
-
${renderedChildren[0].imports}
|
|
29
|
-
|
|
30
|
-
<AvatarStack ${props.map(prop => `${prop} `).join('')}>
|
|
31
|
-
${renderedChildren.map(({code}) => code).join('\n ')}
|
|
32
|
-
</AvatarStack>`,
|
|
33
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=460%3A2730
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
|
|
6
|
-
const imports = [
|
|
7
|
-
"import Breadcrumbs from '@jetbrains/ring-ui/components/breadcrumbs/breadcrumbs'",
|
|
8
|
-
"import Link from '@jetbrains/ring-ui/components/link/link'",
|
|
9
|
-
];
|
|
10
|
-
|
|
11
|
-
const children = instance
|
|
12
|
-
.findLayers(() => true)
|
|
13
|
-
.map(layer => layer.textContent)
|
|
14
|
-
.filter(text => text !== '/');
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
id: 'breadcrumbs',
|
|
18
|
-
example: figma.code`${imports.join('\n')}
|
|
19
|
-
|
|
20
|
-
<Breadcrumbs>
|
|
21
|
-
${children
|
|
22
|
-
.map((text, index) => {
|
|
23
|
-
const props = [`href="/page${index + 1}"`];
|
|
24
|
-
if (index === children.length - 1) {
|
|
25
|
-
props.push('active');
|
|
26
|
-
}
|
|
27
|
-
return `<Link ${props.map(prop => `${prop} `).join('')}>${text}</Link>`;
|
|
28
|
-
})
|
|
29
|
-
.join('\n ')}
|
|
30
|
-
</Breadcrumbs>`,
|
|
31
|
-
};
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=9954-528
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
|
|
6
|
-
const size = instance.getString('Size');
|
|
7
|
-
const type = instance.getString('Type');
|
|
8
|
-
const state = instance.getString('State');
|
|
9
|
-
const variant = instance.getString('Variant');
|
|
10
|
-
|
|
11
|
-
const imports = ["import Button from '@jetbrains/ring-ui/components/button/button'"];
|
|
12
|
-
const props = [];
|
|
13
|
-
const DEFAULT_SIZE = 'M';
|
|
14
|
-
const isDefaultSize = size === DEFAULT_SIZE;
|
|
15
|
-
|
|
16
|
-
if (!isDefaultSize) {
|
|
17
|
-
imports.push("import {ControlsHeight} from '@jetbrains/ring-ui/components/global/controls-height'");
|
|
18
|
-
props.push(`height={ControlsHeight.${size}}`);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
switch (variant) {
|
|
22
|
-
case 'Red outlined':
|
|
23
|
-
props.push('danger');
|
|
24
|
-
break;
|
|
25
|
-
case 'Main':
|
|
26
|
-
props.push('primary');
|
|
27
|
-
break;
|
|
28
|
-
case 'Green':
|
|
29
|
-
props.push('success');
|
|
30
|
-
break;
|
|
31
|
-
case 'Red solid':
|
|
32
|
-
props.push('error');
|
|
33
|
-
break;
|
|
34
|
-
case 'Gray':
|
|
35
|
-
props.push('secondary');
|
|
36
|
-
break;
|
|
37
|
-
case 'Ghost':
|
|
38
|
-
props.push('ghost');
|
|
39
|
-
break;
|
|
40
|
-
case 'Text':
|
|
41
|
-
props.push('inline');
|
|
42
|
-
break;
|
|
43
|
-
default:
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const children = instance.findLayers(() => true)[0].findText('Button').textContent;
|
|
47
|
-
const use12pxIcon = size === 'S' && variant !== 'Text';
|
|
48
|
-
let useButtonGroup = false;
|
|
49
|
-
switch (type) {
|
|
50
|
-
case 'R-Icon-Label':
|
|
51
|
-
props.push('dropdown');
|
|
52
|
-
break;
|
|
53
|
-
case 'L-Icon-Label':
|
|
54
|
-
imports.push(`import downloadIcon from '@jetbrains/icons/download${use12pxIcon ? '-12px' : ''}'`);
|
|
55
|
-
props.push('icon={downloadIcon}');
|
|
56
|
-
break;
|
|
57
|
-
case 'Icon':
|
|
58
|
-
imports.push(`import addIcon from '@jetbrains/icons/add${use12pxIcon ? '-12px' : ''}'`);
|
|
59
|
-
props.push('icon={addIcon}');
|
|
60
|
-
break;
|
|
61
|
-
case 'Split':
|
|
62
|
-
imports.push("import ButtonGroup from '@jetbrains/ring-ui/components/button-group/button-group'");
|
|
63
|
-
imports.push(`import chevronDownIcon from '@jetbrains/icons/chevron-down${use12pxIcon ? '-12px' : ''}'`);
|
|
64
|
-
useButtonGroup = true;
|
|
65
|
-
break;
|
|
66
|
-
default:
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
switch (state) {
|
|
70
|
-
case 'Disabled':
|
|
71
|
-
props.push('disabled');
|
|
72
|
-
break;
|
|
73
|
-
default:
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
const joinedProps = props.map(prop => `${prop} `).join('');
|
|
77
|
-
// prettier-ignore
|
|
78
|
-
const button = children ?
|
|
79
|
-
`<Button ${joinedProps}>
|
|
80
|
-
${children}
|
|
81
|
-
</Button>` : `<Button ${joinedProps}/>`;
|
|
82
|
-
|
|
83
|
-
export default {
|
|
84
|
-
id: 'button',
|
|
85
|
-
example: figma.code`${imports.join('\n')}
|
|
86
|
-
|
|
87
|
-
${
|
|
88
|
-
// prettier-ignore
|
|
89
|
-
useButtonGroup ?
|
|
90
|
-
`<ButtonGroup>
|
|
91
|
-
${button}
|
|
92
|
-
<Button ${joinedProps} icon={chevronDownIcon} />
|
|
93
|
-
</ButtonGroup>` : button
|
|
94
|
-
}`,
|
|
95
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=226-2666
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
const labelType = instance.getString('Label');
|
|
6
|
-
const children = instance.findConnectedInstances(() => true);
|
|
7
|
-
const label = instance.findText('Group description').textContent;
|
|
8
|
-
|
|
9
|
-
const isFormLabel = labelType === 'form';
|
|
10
|
-
const imports = [
|
|
11
|
-
`import ControlLabel${isFormLabel ? ', {LabelType}' : ''} from '@jetbrains/ring-ui/components/control-label/control-label'`,
|
|
12
|
-
];
|
|
13
|
-
const labelProps = [];
|
|
14
|
-
if (isFormLabel) {
|
|
15
|
-
labelProps.push('type={LabelType.FORM}');
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const renderedChildren = children.map(child => {
|
|
19
|
-
const {example} = child.executeTemplate();
|
|
20
|
-
const [childImports, code] = example[0].code.split('\n\n');
|
|
21
|
-
return {imports: childImports, code};
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export default {
|
|
25
|
-
id: 'checkbox-group',
|
|
26
|
-
example: figma.code`${imports.join('\n')}
|
|
27
|
-
${renderedChildren[0].imports}
|
|
28
|
-
|
|
29
|
-
<ControlLabel ${labelProps.map(prop => `${prop} `).join('')}>${label}</ControlLabel>
|
|
30
|
-
${renderedChildren.map(({code}) => code).join('\n<br />\n')}`,
|
|
31
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI?node-id=224%3A1943
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
const selected = instance.getString('Selected');
|
|
6
|
-
const hasLabel = instance.getBoolean('Label');
|
|
7
|
-
const label = instance.findText('Label').textContent;
|
|
8
|
-
const hasHelpText = instance.getBoolean('Help Text');
|
|
9
|
-
const helpText = instance.findText('Description').textContent;
|
|
10
|
-
const state = instance.getString('State');
|
|
11
|
-
|
|
12
|
-
const imports = ["import Checkbox from '@jetbrains/ring-ui/components/checkbox/checkbox'"];
|
|
13
|
-
const props = [];
|
|
14
|
-
switch (selected) {
|
|
15
|
-
case 'selected':
|
|
16
|
-
props.push('defaultChecked');
|
|
17
|
-
break;
|
|
18
|
-
case 'intermediate':
|
|
19
|
-
props.push('indeterminate', 'defaultChecked');
|
|
20
|
-
break;
|
|
21
|
-
default:
|
|
22
|
-
}
|
|
23
|
-
if (hasLabel) {
|
|
24
|
-
props.push(`label="${label}"`);
|
|
25
|
-
}
|
|
26
|
-
if (hasHelpText) {
|
|
27
|
-
props.push(`help="${helpText}"`);
|
|
28
|
-
}
|
|
29
|
-
if (state === 'Disabled') {
|
|
30
|
-
props.push('disabled');
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
id: 'checkbox',
|
|
35
|
-
example: figma.code`${imports.join('\n')}
|
|
36
|
-
|
|
37
|
-
<Checkbox ${props.map(prop => `${prop} `).join('')}/>`,
|
|
38
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=1228-2869
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
const error = instance.findLayers(() => true)[0].textContent;
|
|
6
|
-
|
|
7
|
-
const imports = ["import ErrorBubble from '@jetbrains/ring-ui/components/error-bubble/error-bubble'"];
|
|
8
|
-
const props = [`error={\`${error}\``];
|
|
9
|
-
|
|
10
|
-
export default {
|
|
11
|
-
id: 'error-bubble',
|
|
12
|
-
example: figma.code`${imports.join('\n')}
|
|
13
|
-
|
|
14
|
-
<ErrorBubble ${props.map(prop => `${prop} `).join('')}/>`,
|
|
15
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// url=https://www.figma.com/design/HY6d4uE1xxaQXCMG9fe6Y2/RingUI-(Internal)?node-id=7538-7763
|
|
2
|
-
import figma from '@figma/code-connect';
|
|
3
|
-
|
|
4
|
-
const instance = figma.selectedInstance;
|
|
5
|
-
const size = instance.getString('Size');
|
|
6
|
-
const state = instance.getString('State');
|
|
7
|
-
const formVariant = instance.getBoolean('Form variant');
|
|
8
|
-
const icon = instance.getBoolean('Icon');
|
|
9
|
-
const clearable = instance.getBoolean('Clearable');
|
|
10
|
-
const hasLabel = instance.getBoolean('Label');
|
|
11
|
-
const label = instance.findText('Label').textContent;
|
|
12
|
-
const hasHelpText = instance.getBoolean('Help text');
|
|
13
|
-
const helpText = instance.findText('Help text').textContent;
|
|
14
|
-
const hasText = instance.getBoolean('Text');
|
|
15
|
-
const text = instance.findText('Text').textContent;
|
|
16
|
-
const hasPlaceholder = instance.getBoolean('Placeholder');
|
|
17
|
-
const placeholder = instance.findText('Placeholder').textContent;
|
|
18
|
-
|
|
19
|
-
const imports = ["import Input from '@jetbrains/ring-ui/components/input/input'"];
|
|
20
|
-
const props = [];
|
|
21
|
-
const DEFAULT_SIZE = 'M';
|
|
22
|
-
const isDefaultSize = size === DEFAULT_SIZE;
|
|
23
|
-
|
|
24
|
-
if (!isDefaultSize) {
|
|
25
|
-
imports.push("import {ControlsHeight} from '@jetbrains/ring-ui/components/global/controls-height'");
|
|
26
|
-
props.push(`height={ControlsHeight.${size}}`);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
switch (state) {
|
|
30
|
-
case 'disabled':
|
|
31
|
-
props.push('disabled');
|
|
32
|
-
break;
|
|
33
|
-
case 'error':
|
|
34
|
-
props.push('error=""');
|
|
35
|
-
break;
|
|
36
|
-
default:
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (formVariant) {
|
|
40
|
-
imports.push("import {LabelType} from '../control-label/control-label'");
|
|
41
|
-
props.push('labelType={LabelType.FORM}');
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
if (icon) {
|
|
45
|
-
imports.push("import searchIcon from '@jetbrains/icons/search'");
|
|
46
|
-
props.push('icon={searchIcon}');
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (clearable) {
|
|
50
|
-
props.push('onClear={() => {}}');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
if (hasLabel) {
|
|
54
|
-
props.push(`label="${label}"`);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
if (hasHelpText) {
|
|
58
|
-
props.push(`help="${helpText}"`);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
if (hasText) {
|
|
62
|
-
props.push(`defaultValue="${text}"`);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (hasPlaceholder) {
|
|
66
|
-
props.push(`placeholder="${placeholder}"`);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export default {
|
|
70
|
-
id: 'input',
|
|
71
|
-
example: figma.code`${imports.join('\n')}
|
|
72
|
-
|
|
73
|
-
<Input ${props.map(prop => `${prop} `).join('')}/>`,
|
|
74
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/components/query-assist/{query-assist-suggestions.jsx → query-assist-suggestions.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|