@jetbrains/ring-ui 8.0.0-beta.6 → 8.0.0-beta.7

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.
Files changed (44) hide show
  1. package/babel.config.js +0 -8
  2. package/components/avatar/avatar-info.js +0 -2
  3. package/components/avatar/avatar-size.d.ts +0 -4
  4. package/components/avatar/avatar-size.js +0 -4
  5. package/components/avatar/avatar.js +0 -6
  6. package/components/avatar/fallback-avatar.js +0 -28
  7. package/components/avatar-stack/avatar-stack.js +1 -1
  8. package/components/button/button.css +4 -4
  9. package/components/button/button.d.ts +0 -4
  10. package/components/button/button.js +2 -7
  11. package/components/global/variables.css +0 -10
  12. package/components/global/variables.interface.d.ts +0 -4
  13. package/components/global/variables_dark.css +0 -7
  14. package/components/icon/icon.css +0 -27
  15. package/components/icon/icon.d.ts +0 -1
  16. package/components/icon/icon.js +2 -4
  17. package/components/list/consts.d.ts +0 -1
  18. package/components/list/consts.js +0 -1
  19. package/components/list/list.d.ts +0 -4
  20. package/components/select/select.js +1 -3
  21. package/package.json +1 -4
  22. package/components/content-layout/content-layout.css +0 -109
  23. package/components/content-layout/content-layout.d.ts +0 -20
  24. package/components/content-layout/content-layout.js +0 -40
  25. package/components/content-layout/sidebar.d.ts +0 -26
  26. package/components/content-layout/sidebar.js +0 -71
  27. package/components/expand/collapsible-group.css +0 -76
  28. package/components/expand/collapsible-group.d.ts +0 -8
  29. package/components/expand/collapsible-group.js +0 -14
  30. package/components/grid/col.d.ts +0 -16
  31. package/components/grid/col.js +0 -35
  32. package/components/grid/grid.css +0 -920
  33. package/components/grid/grid.d.ts +0 -13
  34. package/components/grid/grid.js +0 -19
  35. package/components/grid/row.d.ts +0 -21
  36. package/components/grid/row.js +0 -41
  37. package/components/old-browsers-message/__mocks__/old-browsers-message.js +0 -1
  38. package/components/old-browsers-message/old-browsers-message-stop.d.ts +0 -1
  39. package/components/old-browsers-message/old-browsers-message-stop.js +0 -2
  40. package/components/old-browsers-message/old-browsers-message.css +0 -26
  41. package/components/old-browsers-message/old-browsers-message.d.ts +0 -5
  42. package/components/old-browsers-message/old-browsers-message.js +0 -86
  43. package/components/old-browsers-message/white-list.d.ts +0 -2
  44. package/components/old-browsers-message/white-list.js +0 -24
@@ -1,71 +0,0 @@
1
- import { Component } from 'react';
2
- import classNames from 'classnames';
3
- import { Waypoint } from 'react-waypoint';
4
- import styles from './content-layout.css';
5
- const ABOVE = 'above';
6
- const INSIDE = 'inside';
7
- /**
8
- * @name Sidebar
9
- * @deprecated Will be removed in Ring UI 8.0.
10
- */
11
- export default class Sidebar extends Component {
12
- state = {
13
- topIsOutside: true,
14
- bottomIsOutside: true,
15
- sidebarVisibleHeight: undefined,
16
- };
17
- sidebarNode;
18
- handleTopWaypoint = ({ currentPosition }) => {
19
- this.setState({ topIsOutside: currentPosition === ABOVE });
20
- };
21
- handleBottomWaypoint = ({ currentPosition, waypointTop }) => {
22
- this.setState({
23
- sidebarVisibleHeight: waypointTop,
24
- bottomIsOutside: currentPosition !== INSIDE,
25
- });
26
- };
27
- shouldUseFixation() {
28
- const { contentNode } = this.props;
29
- const { sidebarNode } = this;
30
- if (!contentNode || !sidebarNode) {
31
- return false;
32
- }
33
- return contentNode.offsetHeight >= sidebarNode.offsetHeight;
34
- }
35
- shouldFixateBottom() {
36
- const { topIsOutside, bottomIsOutside } = this.state;
37
- return !bottomIsOutside && topIsOutside && this.shouldUseFixation();
38
- }
39
- sidebarRef = (node) => {
40
- this.sidebarNode = node;
41
- };
42
- render() {
43
- const { right, children, className, containerClassName, fixedClassName, contentNode, ...restProps } = this.props;
44
- const { topIsOutside, bottomIsOutside, sidebarVisibleHeight } = this.state;
45
- const shouldFixateTop = bottomIsOutside && topIsOutside && this.shouldUseFixation();
46
- const shouldFixateBottom = this.shouldFixateBottom();
47
- const containerClasses = classNames(styles.sidebarContainer, containerClassName, {
48
- [styles.sidebarContainerRight]: right,
49
- });
50
- const classes = classNames(styles.sidebar, className, {
51
- [styles.sidebarRight]: right,
52
- [styles.sidebarFixedTop]: shouldFixateTop,
53
- [styles.sidebarFixedBottom]: shouldFixateBottom,
54
- [fixedClassName ?? '']: shouldFixateTop || shouldFixateBottom,
55
- });
56
- const style = {
57
- maxHeight: shouldFixateBottom && sidebarVisibleHeight ? `${sidebarVisibleHeight}px` : undefined,
58
- };
59
- return (<aside className={containerClasses} ref={this.sidebarRef}>
60
- <Waypoint onEnter={this.handleTopWaypoint} onLeave={this.handleTopWaypoint}/>
61
-
62
- <div {...restProps} style={style} className={classes}>
63
- {children}
64
- </div>
65
-
66
- <div className={styles.bottomMarker}>
67
- <Waypoint onEnter={this.handleBottomWaypoint} onLeave={this.handleBottomWaypoint}/>
68
- </div>
69
- </aside>);
70
- }
71
- }
@@ -1,76 +0,0 @@
1
- /* Deprecated alias of `../collapsible-group/collapsible-group.css` (removed in Ring UI 8.0).
2
- Class names are forwarded via `composes` so the canonical stylesheet stays the single source of
3
- the actual rules, while `import styles from '.../components/expand/collapsible-group.css'` keeps
4
- returning the full token map. */
5
-
6
- .expand {
7
- composes: expand from '../collapsible-group/collapsible-group.css';
8
- }
9
-
10
- .collapseRoot {
11
- composes: collapseRoot from '../collapsible-group/collapsible-group.css';
12
- }
13
-
14
- .hovered {
15
- composes: hovered from '../collapsible-group/collapsible-group.css';
16
- }
17
-
18
- .expanded {
19
- composes: expanded from '../collapsible-group/collapsible-group.css';
20
- }
21
-
22
- .focused {
23
- composes: focused from '../collapsible-group/collapsible-group.css';
24
- }
25
-
26
- .header {
27
- composes: header from '../collapsible-group/collapsible-group.css';
28
- }
29
-
30
- .heading {
31
- composes: heading from '../collapsible-group/collapsible-group.css';
32
- }
33
-
34
- .headerButton {
35
- composes: headerButton from '../collapsible-group/collapsible-group.css';
36
- }
37
-
38
- .headerStatic {
39
- composes: headerStatic from '../collapsible-group/collapsible-group.css';
40
- }
41
-
42
- .headerContent {
43
- composes: headerContent from '../collapsible-group/collapsible-group.css';
44
- }
45
-
46
- .avatarGroup {
47
- composes: avatarGroup from '../collapsible-group/collapsible-group.css';
48
- }
49
-
50
- .title {
51
- composes: title from '../collapsible-group/collapsible-group.css';
52
- }
53
-
54
- .subtitleGroup {
55
- composes: subtitleGroup from '../collapsible-group/collapsible-group.css';
56
- }
57
-
58
- .subtitle {
59
- composes: subtitle from '../collapsible-group/collapsible-group.css';
60
- }
61
-
62
- .subtitleChevron {
63
- composes: subtitleChevron from '../collapsible-group/collapsible-group.css';
64
- }
65
-
66
- .toggle {
67
- composes: toggle from '../collapsible-group/collapsible-group.css';
68
- }
69
-
70
- .toggleIcon {
71
- composes: toggleIcon from '../collapsible-group/collapsible-group.css';
72
- }
73
-
74
- .body {
75
- composes: body from '../collapsible-group/collapsible-group.css';
76
- }
@@ -1,8 +0,0 @@
1
- import { type CollapsibleGroupProps } from '../collapsible-group/collapsible-group';
2
- /**
3
- * @deprecated The `expand` module has been renamed to `collapsible-group`. This re-export will be removed in
4
- * Ring UI 8.0. Use `CollapsibleGroup` from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.
5
- */
6
- declare const DeprecatedCollapsibleGroup: import("react").ForwardRefExoticComponent<Omit<CollapsibleGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
7
- export type { CollapsibleGroupProps };
8
- export default DeprecatedCollapsibleGroup;
@@ -1,14 +0,0 @@
1
- import { forwardRef } from 'react';
2
- import deprecate from 'util-deprecate';
3
- import CollapsibleGroup from '../collapsible-group/collapsible-group';
4
- const warnDeprecation = deprecate(() => { }, '`CollapsibleGroup` from `@jetbrains/ring-ui/components/expand/collapsible-group` is deprecated and will be removed in Ring UI 8.0. Import it from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.');
5
- /**
6
- * @deprecated The `expand` module has been renamed to `collapsible-group`. This re-export will be removed in
7
- * Ring UI 8.0. Use `CollapsibleGroup` from `@jetbrains/ring-ui/components/collapsible-group/collapsible-group` instead.
8
- */
9
- const DeprecatedCollapsibleGroup = forwardRef((props, ref) => {
10
- warnDeprecation();
11
- return <CollapsibleGroup ref={ref} {...props}/>;
12
- });
13
- DeprecatedCollapsibleGroup.displayName = 'CollapsibleGroup';
14
- export default DeprecatedCollapsibleGroup;
@@ -1,16 +0,0 @@
1
- import { Component, type HTMLAttributes } from 'react';
2
- export interface ColProps extends HTMLAttributes<HTMLDivElement> {
3
- 'data-test'?: string | null | undefined;
4
- xs?: boolean | number | null | undefined;
5
- sm?: boolean | number | null | undefined;
6
- md?: boolean | number | null | undefined;
7
- lg?: boolean | number | null | undefined;
8
- xsOffset?: number | null | undefined;
9
- smOffset?: number | null | undefined;
10
- mdOffset?: number | null | undefined;
11
- lgOffset?: number | null | undefined;
12
- reverse?: boolean | null | undefined;
13
- }
14
- export default class Col extends Component<ColProps> {
15
- render(): import("react").JSX.Element;
16
- }
@@ -1,35 +0,0 @@
1
- import { Component } from 'react';
2
- import classNames from 'classnames';
3
- import dataTests from '../global/data-tests';
4
- import styles from './grid.css';
5
- const classMap = {
6
- xs: 'col-xs',
7
- sm: 'col-sm',
8
- md: 'col-md',
9
- lg: 'col-lg',
10
- xsOffset: 'col-xs-offset',
11
- smOffset: 'col-sm-offset',
12
- mdOffset: 'col-md-offset',
13
- lgOffset: 'col-lg-offset',
14
- };
15
- /**
16
- * Converts props like "xs=9 xsOffset={2}" to classes "col-xs-9 col-xs-offset-2"
17
- * @param {Object} props incoming props
18
- * @mockReturnValue {Array} result classnames
19
- */
20
- function getClassNames(props) {
21
- return Object.entries(props)
22
- .filter(([key, value]) => classMap[key] && value != null)
23
- .map(([key, value]) => styles[Number.isInteger(value) ? `${classMap[key]}-${value}` : classMap[key]]);
24
- }
25
- export default class Col extends Component {
26
- render() {
27
- const { children, className, 'data-test': dataTest, reverse, xs, sm, md, lg, xsOffset, smOffset, mdOffset, lgOffset, ...restProps } = this.props;
28
- const classes = classNames(styles.col, className, getClassNames({ xs, sm, md, lg, xsOffset, smOffset, mdOffset, lgOffset }), {
29
- [styles.reverse]: reverse,
30
- });
31
- return (<div {...restProps} className={classes} data-test={dataTests('ring-grid-column', dataTest)}>
32
- {children}
33
- </div>);
34
- }
35
- }