@alifd/chat 0.3.33-beta.6 → 0.3.33-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.
@@ -7,14 +7,37 @@
7
7
 
8
8
  &-group {
9
9
  .single-button {
10
- flex: 1 0 calc(33.33% - 6px); /* 每个按钮占据33.33%的宽度减去左右各3px的间隔(总共6px)来保证每行三个 */
10
+ flex: 1 0 calc(50% - 3px); // 修改为50%宽度,每个按钮间隔6px,所以是3px
11
11
  text-align: center;
12
- margin-right: 6px;
12
+ margin-right: 6px;
13
13
  max-width: 100%;
14
14
  overflow: hidden;
15
- &:last-child{
16
- margin-right: 0px;
15
+
16
+ &:nth-child(n+3) {
17
+ margin-top: 8px;
18
+ }
19
+
20
+ // 使用nth-child选择器处理偶数按钮的右边距
21
+ &:nth-child(2n) {
22
+ margin-right: 0;
17
23
  }
24
+
25
+ // 当按钮数量小于等于3个时,恢复为三等分布局
26
+ &:first-child:nth-last-child(-n+3),
27
+ &:first-child:nth-last-child(-n+3) ~ .single-button {
28
+ flex: 1 0 calc(33.33% - 6px);
29
+
30
+ // 重置偶数按钮的右边距规则
31
+ &:nth-child(2n) {
32
+ margin-right: 6px;
33
+ }
34
+
35
+ // 最后一个按钮不需要右边距
36
+ &:last-child {
37
+ margin-right: 0;
38
+ }
39
+ }
40
+
18
41
  .next-btn-helper {
19
42
  max-width: 100%;
20
43
  overflow: hidden;
@@ -50,12 +73,12 @@
50
73
  }
51
74
  }
52
75
  }
53
-
76
+
54
77
  &.sub {
55
78
  .single-button {
56
79
  max-width: calc(50% - 6px);
57
80
  margin-bottom: 0;
58
- }
81
+ }
59
82
  @media (max-width: 600px) {
60
83
  display: block;
61
84
  }
package/es/index.js CHANGED
@@ -32,4 +32,4 @@ export { default as CheckboxGroup } from './checkbox-group';
32
32
  export { default as Select } from './select';
33
33
  export { default as Flip } from './flip';
34
34
  export { default as ToolStatus } from './tool-status';
35
- export const version = '0.3.33-beta.6';
35
+ export const version = '0.3.33-beta.7';
@@ -7,14 +7,37 @@
7
7
 
8
8
  &-group {
9
9
  .single-button {
10
- flex: 1 0 calc(33.33% - 6px); /* 每个按钮占据33.33%的宽度减去左右各3px的间隔(总共6px)来保证每行三个 */
10
+ flex: 1 0 calc(50% - 3px); // 修改为50%宽度,每个按钮间隔6px,所以是3px
11
11
  text-align: center;
12
- margin-right: 6px;
12
+ margin-right: 6px;
13
13
  max-width: 100%;
14
14
  overflow: hidden;
15
- &:last-child{
16
- margin-right: 0px;
15
+
16
+ &:nth-child(n+3) {
17
+ margin-top: 8px;
18
+ }
19
+
20
+ // 使用nth-child选择器处理偶数按钮的右边距
21
+ &:nth-child(2n) {
22
+ margin-right: 0;
17
23
  }
24
+
25
+ // 当按钮数量小于等于3个时,恢复为三等分布局
26
+ &:first-child:nth-last-child(-n+3),
27
+ &:first-child:nth-last-child(-n+3) ~ .single-button {
28
+ flex: 1 0 calc(33.33% - 6px);
29
+
30
+ // 重置偶数按钮的右边距规则
31
+ &:nth-child(2n) {
32
+ margin-right: 6px;
33
+ }
34
+
35
+ // 最后一个按钮不需要右边距
36
+ &:last-child {
37
+ margin-right: 0;
38
+ }
39
+ }
40
+
18
41
  .next-btn-helper {
19
42
  max-width: 100%;
20
43
  overflow: hidden;
@@ -50,12 +73,12 @@
50
73
  }
51
74
  }
52
75
  }
53
-
76
+
54
77
  &.sub {
55
78
  .single-button {
56
79
  max-width: calc(50% - 6px);
57
80
  margin-bottom: 0;
58
- }
81
+ }
59
82
  @media (max-width: 600px) {
60
83
  display: block;
61
84
  }
package/lib/index.js CHANGED
@@ -70,4 +70,4 @@ var flip_1 = require("./flip");
70
70
  Object.defineProperty(exports, "Flip", { enumerable: true, get: function () { return tslib_1.__importDefault(flip_1).default; } });
71
71
  var tool_status_1 = require("./tool-status");
72
72
  Object.defineProperty(exports, "ToolStatus", { enumerable: true, get: function () { return tslib_1.__importDefault(tool_status_1).default; } });
73
- exports.version = '0.3.33-beta.6';
73
+ exports.version = '0.3.33-beta.7';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alifd/chat",
3
- "version": "0.3.33-beta.6",
3
+ "version": "0.3.33-beta.7",
4
4
  "description": "A configurable component library for chat built on React.",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -1,23 +0,0 @@
1
- /**
2
- * @component 输入框
3
- * @en Input
4
- * @type 通用 - General
5
- * @remarks 同 Next Input,按钮用于开始一个即时操作。- Same as Next.Input, Input used to trigger an action.
6
- * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Inputs are used for emphasizing important functions on your page.
7
- * @others
8
- * ## 无障碍键盘操作指南
9
- * | 按键 | 说明 |
10
- * | :---- | :---------- |
11
- * | Enter | 触发 onClick 事件 |
12
- * | SPACE | 触发 onClick 事件 |
13
- * @othersEn
14
- * ## ARIA and KeyBoard
15
- * | KeyBoard | Description |
16
- * | :---------- | :------------------------------ |
17
- * | Enter | Trigger the onClick event |
18
- * | SPACE | Trigger the onClick event |
19
- */
20
- import React from 'react';
21
- export * from './types';
22
- declare const _default: import("@alifd/next/types/config-provider/types").ConfiguredComponentClass<Pick<Pick<any, string | number | symbol> & React.RefAttributes<import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/input").InputProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>> & Pick<import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>, "focus" | "getInputNode">>, string | number | symbol> & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/config-provider/types").ConfiguredComponent<import("@alifd/next/types/input").InputProps & import("@alifd/next/types/config-provider/types").ComponentCommonProps, import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>> & Pick<import("@alifd/next/types/input/input").default<import("@alifd/next/types/input").InputProps>, "focus" | "getInputNode">, {}>;
23
- export default _default;
package/es/form/index.js DELETED
@@ -1,33 +0,0 @@
1
- /**
2
- * @component 输入框
3
- * @en Input
4
- * @type 通用 - General
5
- * @remarks 同 Next Input,按钮用于开始一个即时操作。- Same as Next.Input, Input used to trigger an action.
6
- * @when 标记一个(或封装一组)操作命令,响应用户点击行为,触发相应的业务逻辑。- Inputs are used for emphasizing important functions on your page.
7
- * @others
8
- * ## 无障碍键盘操作指南
9
- * | 按键 | 说明 |
10
- * | :---- | :---------- |
11
- * | Enter | 触发 onClick 事件 |
12
- * | SPACE | 触发 onClick 事件 |
13
- * @othersEn
14
- * ## ARIA and KeyBoard
15
- * | KeyBoard | Description |
16
- * | :---------- | :------------------------------ |
17
- * | Enter | Trigger the onClick event |
18
- * | SPACE | Trigger the onClick event |
19
- */
20
- import { __rest } from "tslib";
21
- import React, { forwardRef } from 'react';
22
- import { Input as NextInput, ConfigProvider } from '@alifd/next';
23
- import cs from 'classnames';
24
- import { PREFIX_DEFAULT, assignSubComponent } from '../utils';
25
- const Input = forwardRef((_a, ref) => {
26
- var { className, size = 'medium' } = _a, props = __rest(_a, ["className", "size"]);
27
- return (React.createElement(NextInput, Object.assign({}, props, { className: cs(`${PREFIX_DEFAULT}input`, className), size: size, ref: ref })));
28
- });
29
- const InputWithSub = assignSubComponent(Input, {
30
- displayName: 'Input',
31
- });
32
- export * from './types';
33
- export default ConfigProvider.config(InputWithSub);
package/es/form/main.scss DELETED
@@ -1,5 +0,0 @@
1
- @import "../core/variables.scss";
2
-
3
- .#{$prefix}input {
4
-
5
- }
@@ -1 +0,0 @@
1
- import '@alifd/next/lib/input/style2';
package/es/form/style.js DELETED
@@ -1 +0,0 @@
1
- import '@alifd/next/lib/input/style2';