@donglegeyu/company-ui 1.2.10 → 1.2.11

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.
@@ -103,43 +103,45 @@ function DetailPageTemplate({
103
103
  actions: titleActions
104
104
  }
105
105
  ),
106
- hasInfoCard && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-card", children: [
107
- hasHeader && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-top", children: [
108
- (avatar !== void 0 || primaryName !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-identity", children: [
109
- avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-avatar", children: avatar }),
110
- primaryName !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-primary-name", children: primaryName })
111
- ] }),
112
- tags && tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-info-tags", children: tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_basic_components.CompanyTag, { className: tagVariantClass[tag.variant ?? "default"], children: tag.text }, index)) })
113
- ] }),
114
- infoFields && infoFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-info-fields", children: infoFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-field-item", children: [
115
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dpt-field-label", children: [
116
- field.label,
117
- ":"
118
- ] }),
119
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-field-value", children: field.value ?? "--" })
120
- ] }, index)) }),
121
- infoArea
122
- ] }),
123
- showDivider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-divider" }),
124
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-container", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
125
107
  "div",
126
108
  {
127
- className: `dpt-content${isScrolling ? " scrolling" : ""}`,
109
+ className: `dpt-scroll${isScrolling ? " scrolling" : ""}`,
128
110
  onScroll: handleScroll,
129
- children: tabs && tabs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
130
- import_basic_components.CompanyTabs,
131
- {
132
- activeKey: activeTab,
133
- onChange: handleTabChange,
134
- items: tabs.map((tab) => ({
135
- key: tab.key,
136
- label: tab.label,
137
- disabled: tab.disabled,
138
- children: tab.children
139
- }))
140
- }
141
- ) : children
111
+ children: [
112
+ hasInfoCard && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-card", children: [
113
+ hasHeader && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-top", children: [
114
+ (avatar !== void 0 || primaryName !== void 0) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-info-identity", children: [
115
+ avatar !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-avatar", children: avatar }),
116
+ primaryName !== void 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-primary-name", children: primaryName })
117
+ ] }),
118
+ tags && tags.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-info-tags", children: tags.map((tag, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_basic_components.CompanyTag, { className: tagVariantClass[tag.variant ?? "default"], children: tag.text }, index)) })
119
+ ] }),
120
+ infoFields && infoFields.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-info-fields", children: infoFields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "dpt-field-item", children: [
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "dpt-field-label", children: [
122
+ field.label,
123
+ ":"
124
+ ] }),
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "dpt-field-value", children: field.value ?? "--" })
126
+ ] }, index)) }),
127
+ infoArea
128
+ ] }),
129
+ showDivider && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-divider" }),
130
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "dpt-container", children: tabs && tabs.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
131
+ import_basic_components.CompanyTabs,
132
+ {
133
+ activeKey: activeTab,
134
+ onChange: handleTabChange,
135
+ items: tabs.map((tab) => ({
136
+ key: tab.key,
137
+ label: tab.label,
138
+ disabled: tab.disabled,
139
+ children: tab.children
140
+ }))
141
+ }
142
+ ) : children })
143
+ ]
142
144
  }
143
- ) })
145
+ )
144
146
  ] });
145
147
  }
@@ -10,9 +10,7 @@
10
10
  background: #f5f5f5;
11
11
 
12
12
  .dpt-page-title {
13
- position: sticky;
14
- top: 0;
15
- z-index: 20;
13
+ flex-shrink: 0;
16
14
  background: var(--ant-color-bg-container);
17
15
  }
18
16
 
@@ -129,32 +127,14 @@
129
127
  color: #faad14;
130
128
  }
131
129
 
132
- .dpt-divider {
133
- height: 12px;
134
- flex-shrink: 0;
135
- background: #f5f5f5;
136
- }
137
-
138
- .dpt-container {
139
- width: 100%;
130
+ .dpt-scroll {
140
131
  flex: 1;
141
132
  display: flex;
142
133
  flex-direction: column;
143
- flex-grow: 1;
144
- align-self: stretch;
145
- z-index: 3;
146
- border-radius: 6px 6px 0 0;
147
- background: #ffffff;
148
- overflow: hidden;
149
- }
150
-
151
- .dpt-content {
152
- flex: 1;
153
134
  overflow-y: auto;
154
135
  overflow-x: hidden;
155
136
  scrollbar-width: thin;
156
137
  scrollbar-color: transparent transparent;
157
- padding: 0 16px 16px;
158
138
 
159
139
  &::-webkit-scrollbar {
160
140
  width: 6px;
@@ -176,4 +156,26 @@
176
156
  background-color: rgba(0, 0, 0, 0.2);
177
157
  }
178
158
  }
159
+
160
+ .dpt-divider {
161
+ height: 12px;
162
+ flex-shrink: 0;
163
+ background: #f5f5f5;
164
+ }
165
+
166
+ .dpt-container {
167
+ width: 100%;
168
+ flex-grow: 1;
169
+ background: #ffffff;
170
+ border-radius: 6px 6px 0 0;
171
+ padding: 0 16px;
172
+
173
+ .ant-tabs-nav {
174
+ position: sticky;
175
+ top: 0;
176
+ z-index: 10;
177
+ margin: 0;
178
+ background: #ffffff;
179
+ }
180
+ }
179
181
  }
@@ -78,52 +78,52 @@ export default function DetailPageTemplate(_ref) {
78
78
  onBack: onBack,
79
79
  className: "dpt-page-title",
80
80
  actions: titleActions
81
- }), hasInfoCard && /*#__PURE__*/_jsxs("div", {
82
- className: "dpt-info-card",
83
- children: [hasHeader && /*#__PURE__*/_jsxs("div", {
84
- className: "dpt-info-top",
85
- children: [(avatar !== undefined || primaryName !== undefined) && /*#__PURE__*/_jsxs("div", {
86
- className: "dpt-info-identity",
87
- children: [avatar !== undefined && /*#__PURE__*/_jsx("div", {
88
- className: "dpt-avatar",
89
- children: avatar
90
- }), primaryName !== undefined && /*#__PURE__*/_jsx("span", {
91
- className: "dpt-primary-name",
92
- children: primaryName
81
+ }), /*#__PURE__*/_jsxs("div", {
82
+ className: "dpt-scroll".concat(isScrolling ? ' scrolling' : ''),
83
+ onScroll: handleScroll,
84
+ children: [hasInfoCard && /*#__PURE__*/_jsxs("div", {
85
+ className: "dpt-info-card",
86
+ children: [hasHeader && /*#__PURE__*/_jsxs("div", {
87
+ className: "dpt-info-top",
88
+ children: [(avatar !== undefined || primaryName !== undefined) && /*#__PURE__*/_jsxs("div", {
89
+ className: "dpt-info-identity",
90
+ children: [avatar !== undefined && /*#__PURE__*/_jsx("div", {
91
+ className: "dpt-avatar",
92
+ children: avatar
93
+ }), primaryName !== undefined && /*#__PURE__*/_jsx("span", {
94
+ className: "dpt-primary-name",
95
+ children: primaryName
96
+ })]
97
+ }), tags && tags.length > 0 && /*#__PURE__*/_jsx("div", {
98
+ className: "dpt-info-tags",
99
+ children: tags.map(function (tag, index) {
100
+ var _tag$variant;
101
+ return /*#__PURE__*/_jsx(CompanyTag, {
102
+ className: tagVariantClass[(_tag$variant = tag.variant) !== null && _tag$variant !== void 0 ? _tag$variant : 'default'],
103
+ children: tag.text
104
+ }, index);
105
+ })
93
106
  })]
94
- }), tags && tags.length > 0 && /*#__PURE__*/_jsx("div", {
95
- className: "dpt-info-tags",
96
- children: tags.map(function (tag, index) {
97
- var _tag$variant;
98
- return /*#__PURE__*/_jsx(CompanyTag, {
99
- className: tagVariantClass[(_tag$variant = tag.variant) !== null && _tag$variant !== void 0 ? _tag$variant : 'default'],
100
- children: tag.text
107
+ }), infoFields && infoFields.length > 0 && /*#__PURE__*/_jsx("div", {
108
+ className: "dpt-info-fields",
109
+ children: infoFields.map(function (field, index) {
110
+ var _field$value;
111
+ return /*#__PURE__*/_jsxs("div", {
112
+ className: "dpt-field-item",
113
+ children: [/*#__PURE__*/_jsxs("span", {
114
+ className: "dpt-field-label",
115
+ children: [field.label, "\uFF1A"]
116
+ }), /*#__PURE__*/_jsx("span", {
117
+ className: "dpt-field-value",
118
+ children: (_field$value = field.value) !== null && _field$value !== void 0 ? _field$value : '--'
119
+ })]
101
120
  }, index);
102
121
  })
103
- })]
104
- }), infoFields && infoFields.length > 0 && /*#__PURE__*/_jsx("div", {
105
- className: "dpt-info-fields",
106
- children: infoFields.map(function (field, index) {
107
- var _field$value;
108
- return /*#__PURE__*/_jsxs("div", {
109
- className: "dpt-field-item",
110
- children: [/*#__PURE__*/_jsxs("span", {
111
- className: "dpt-field-label",
112
- children: [field.label, "\uFF1A"]
113
- }), /*#__PURE__*/_jsx("span", {
114
- className: "dpt-field-value",
115
- children: (_field$value = field.value) !== null && _field$value !== void 0 ? _field$value : '--'
116
- })]
117
- }, index);
118
- })
119
- }), infoArea]
120
- }), showDivider && /*#__PURE__*/_jsx("div", {
121
- className: "dpt-divider"
122
- }), /*#__PURE__*/_jsx("div", {
123
- className: "dpt-container",
124
- children: /*#__PURE__*/_jsx("div", {
125
- className: "dpt-content".concat(isScrolling ? ' scrolling' : ''),
126
- onScroll: handleScroll,
122
+ }), infoArea]
123
+ }), showDivider && /*#__PURE__*/_jsx("div", {
124
+ className: "dpt-divider"
125
+ }), /*#__PURE__*/_jsx("div", {
126
+ className: "dpt-container",
127
127
  children: tabs && tabs.length > 0 ? /*#__PURE__*/_jsx(CompanyTabs, {
128
128
  activeKey: activeTab,
129
129
  onChange: handleTabChange,
@@ -136,7 +136,7 @@ export default function DetailPageTemplate(_ref) {
136
136
  };
137
137
  })
138
138
  }) : children
139
- })
139
+ })]
140
140
  })]
141
141
  });
142
142
  }
@@ -10,9 +10,7 @@
10
10
  background: #f5f5f5;
11
11
 
12
12
  .dpt-page-title {
13
- position: sticky;
14
- top: 0;
15
- z-index: 20;
13
+ flex-shrink: 0;
16
14
  background: var(--ant-color-bg-container);
17
15
  }
18
16
 
@@ -129,32 +127,14 @@
129
127
  color: #faad14;
130
128
  }
131
129
 
132
- .dpt-divider {
133
- height: 12px;
134
- flex-shrink: 0;
135
- background: #f5f5f5;
136
- }
137
-
138
- .dpt-container {
139
- width: 100%;
130
+ .dpt-scroll {
140
131
  flex: 1;
141
132
  display: flex;
142
133
  flex-direction: column;
143
- flex-grow: 1;
144
- align-self: stretch;
145
- z-index: 3;
146
- border-radius: 6px 6px 0 0;
147
- background: #ffffff;
148
- overflow: hidden;
149
- }
150
-
151
- .dpt-content {
152
- flex: 1;
153
134
  overflow-y: auto;
154
135
  overflow-x: hidden;
155
136
  scrollbar-width: thin;
156
137
  scrollbar-color: transparent transparent;
157
- padding: 0 16px 16px;
158
138
 
159
139
  &::-webkit-scrollbar {
160
140
  width: 6px;
@@ -176,4 +156,26 @@
176
156
  background-color: rgba(0, 0, 0, 0.2);
177
157
  }
178
158
  }
159
+
160
+ .dpt-divider {
161
+ height: 12px;
162
+ flex-shrink: 0;
163
+ background: #f5f5f5;
164
+ }
165
+
166
+ .dpt-container {
167
+ width: 100%;
168
+ flex-grow: 1;
169
+ background: #ffffff;
170
+ border-radius: 6px 6px 0 0;
171
+ padding: 0 16px;
172
+
173
+ .ant-tabs-nav {
174
+ position: sticky;
175
+ top: 0;
176
+ z-index: 10;
177
+ margin: 0;
178
+ background: #ffffff;
179
+ }
180
+ }
179
181
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donglegeyu/company-ui",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",