sample-ui-component-library 0.0.14-dev → 0.0.16-dev

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sample-ui-component-library",
3
- "version": "0.0.14-dev",
3
+ "version": "0.0.16-dev",
4
4
  "description": "A library which contains sample UI elements that can be used for populating layouts.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -65,9 +65,18 @@ export const Tab = ({ id, parentId, node }) => {
65
65
  {...listeners}
66
66
  {...attributes}
67
67
  >
68
- <FileEarmark className="icon" style={{ pointerEvents: "none" }} />
69
- <span className="tab-name">{node.name}</span>
70
- <XLg onMouseDown={clickClose} className="close-icon"/>
68
+ <div className="tab-content">
69
+ <div className="icon">
70
+ <FileEarmark size={14} style={{ pointerEvents: "none" }} />
71
+ </div>
72
+ <div className="tab-name">
73
+ <span>{node.name}</span>
74
+ </div>
75
+ <div className="close-icon" onMouseDown={clickClose}>
76
+ <XLg size={18} />
77
+ </div>
78
+
79
+ </div>
71
80
  </div>
72
81
  );
73
82
  }
@@ -84,9 +93,17 @@ Tab.propTypes = {
84
93
  export const TabPreview = ({node}) => {
85
94
  return (
86
95
  <div className="tab" style={{ backgroundColor: ACTIVE_TAB_BG_COLOR, color: ACTIVE_TAB_FG_COLOR, opacity:0.5 }}>
87
- <FileEarmark className="icon" />
88
- <span className="tab-name">{node.name}</span>
89
- <XLg className="close-icon"/>
96
+ <div className="tab-content">
97
+ <div className="icon">
98
+ <FileEarmark size={14} style={{ pointerEvents: "none" }} />
99
+ </div>
100
+ <div className="tab-name">
101
+ <span>{node.name}</span>
102
+ </div>
103
+ <div className="close-icon">
104
+ <XLg size={18} />
105
+ </div>
106
+ </div>
90
107
  </div>
91
108
  );
92
109
  }
@@ -1,28 +1,39 @@
1
1
  .tab {
2
- padding: 0px 15px;
3
- cursor: pointer;
2
+ padding: 0px 18px;
3
+ cursor: default !important;
4
4
  height: 40px;
5
5
  width: auto;
6
+ }
7
+
8
+ .tab-content {
9
+ width:auto;
10
+ height:36px;
6
11
  display:flex;
7
12
  align-items: center;
13
+ vertical-align: middle;
14
+ overflow-y: hidden;
8
15
  }
9
16
 
10
- .tab > .icon {
11
- padding-right: 7px;
17
+ .tab > .tab-content > .icon {
18
+ padding-right: 2px;
12
19
  display:flex;
13
- align-self: center;
20
+ align-items: center;
14
21
  width:20px;
15
22
  }
16
23
 
17
- .tab > .tab-name {
24
+ .tab > .tab-content> .tab-name {
25
+ display:flex;
26
+ align-items: center;
18
27
  width: auto;
19
28
  font-size:13px;
20
29
  }
21
30
 
22
- .tab > .close-icon {
23
- margin-left:7px;
24
- margin-right:7px;
31
+ .tab > .tab-content> .close-icon {
25
32
  display:flex;
26
- align-self: center;
33
+ margin-left:7px;
34
+ padding-top:3px;
35
+ align-items: center;
36
+ vertical-align: middle;
27
37
  width:10px;
38
+ cursor: pointer;
28
39
  }
@@ -34,14 +34,14 @@ export const Tabs = () => {
34
34
  const list = [];
35
35
  tabs.forEach((tab, index) => {
36
36
  list.push(<Gutter key={tab.uid + "-gutter"} id={tabGroupId + "-" + index} index={index} parentId={tabGroupId} />);
37
- list.push(<Tab key={tab.uid} id={"tab-" + tabGroupId + "-" + tab.uid} parentId={tabGroupId} node={tab} />);
37
+ list.push(<Tab key={tab.uid} id={tab.uid} parentId={tabGroupId} node={tab} />);
38
38
  });
39
39
  list.push(<Gutter key="last-gutter" id={tabGroupId + "-" + tabs.length} index={tabs.length} parentId={tabGroupId} />);
40
40
  setTabsList(list);
41
41
  };
42
42
 
43
43
  return (
44
- <div className="tabs" style={{background: TABS_CONTAINER_BG_COLOR }}>{tabsList}</div>
44
+ <div className="tabs-container" style={{background: TABS_CONTAINER_BG_COLOR }}>{tabsList}</div>
45
45
  );
46
46
  };
47
47
 
@@ -1,15 +1,25 @@
1
- .tabs {
1
+ .tabs-container {
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  height: 40px;
5
5
  width: 100%;
6
+ position: relative;
6
7
  overflow-x: auto;
7
8
  overflow-y: hidden;
8
- flex-wrap: nowrap;
9
- scrollbar-width: none;
10
- -ms-overflow-style: none;
9
+ white-space: nowrap;
10
+ scrollbar-width: thin;
11
+ scrollbar-color: rgba(255,255,255,0.2) transparent;
11
12
  }
12
13
 
13
- .tabs::-webkit-scrollbar {
14
- display: none;
14
+ .tabs-container::-webkit-scrollbar {
15
+ height: 4px;
16
+ }
17
+
18
+ .tabs-container::-webkit-scrollbar-track {
19
+ background: transparent;
20
+ }
21
+
22
+ .tabs-container::-webkit-scrollbar-thumb {
23
+ background: rgba(255, 255, 255, 0.2);
24
+ border-radius: 4px;
15
25
  }
@@ -1,7 +1,11 @@
1
1
  .file-browser{
2
2
  width: 100%;
3
3
  height:100%;
4
- padding:5px;
5
4
  color:white;
5
+ overflow-y: auto;
6
+ scrollbar-gutter: stable;
7
+ scrollbar-color: #47474766 #252526;
8
+ scrollbar-width: thin;
9
+ background-color: #1e1e1e;
6
10
  }
7
11
 
@@ -2,32 +2,30 @@
2
2
  width:100%;
3
3
  min-width: 200px;
4
4
  display:flex;
5
- padding: 5px 0;
6
5
  font-size:13px;
7
6
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
8
7
  cursor: pointer;
8
+ height:32px;
9
9
  }
10
10
 
11
11
  .indent {
12
12
  height:100%;
13
+ margin-left:10px;
13
14
  }
14
15
 
15
- .center {
16
- display:flex;
17
- align-self: center;
18
- }
19
-
20
-
21
16
  .folder-icon {
22
17
  display:flex;
23
18
  margin-right: 5px;
19
+ align-self: center;
24
20
  }
25
21
 
26
22
  .file-icon {
23
+ display:flex;
27
24
  margin-right: 5px;
28
25
  font-size:16px;
26
+ align-self: center;
29
27
  }
30
28
 
31
29
  .file-name {
32
- color: #CCC;
30
+ color: #DDD;
33
31
  }
@@ -7,13 +7,4 @@
7
7
  display:flex;
8
8
  align-items: center;
9
9
  justify-content: center;
10
- }
11
-
12
- .viewerStoryWrapper > .file-browser{
13
- height: 300px;
14
- background-color: #333;
15
- overflow: auto;
16
- scrollbar-gutter: stable;
17
- scrollbar-color: #47474766 #252526;
18
- scrollbar-width: thin;
19
10
  }