Browse Source

[doc]更新版本号至1.0.4,增强输入和按钮组件,新增`type`属性及负数输入支持,修复类型导出错误,补充遗漏的语言文件。

dufu1991 1 year ago
parent
commit
805dbf76a1

+ 4 - 0
docs/mds/components/button/version.md

@@ -13,6 +13,10 @@
 -   [!tag|A|0|] 新增。
  -->
 
+## 1.0.4
+
+- [!tag|A|0|] 新增 `type` 属性 [PR#43](https://github.com/any-tdf/stdf/pull/43),相关 [MDN](https://developer.mozilla.org/zh-CN/docs/Web/HTML/Reference/Elements/button#type)。[!contribute|arithefirst|]
+
 ## 0.5.2
 
 - [!tag|O|0|]调整 icon 与 loading 参数,使其可同时存在。

+ 4 - 0
docs/mds/components/button/version_en.md

@@ -1,3 +1,7 @@
+## 1.0.4
+
+- [!tag|A|0|] Added `type` property [PR#43](https://github.com/any-tdf/stdf/pull/43), related [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/button#type). [!contribute|arithefirst|]
+
 ## 0.5.2
 
 - [!tag|O|0|]Adjust the icon and loading parameters to allow them to coexist.

+ 2 - 1
docs/mds/components/input/api.md

@@ -8,7 +8,7 @@
 | placeholder       | `string`                                                                                                  | `''`      | N    | 输入框提示文本。                |
 | radius            | `'none'\|'sm'\|'xl'\|'full'`                                                                              | `'sm'`    | N    | 圆角风格。                      |
 | inputStyle        | `'block'\|'line'`                                                                                         | `'block'` | N    | 输入框风格。                    |
-| lineTransition    | `string`                                                                                                  | `'none'`  | N    | 线性过渡位置。                  |
+| lineTransition    | `'left'\|'center'`                                                                                         | `'left'`  | N    | 线性过渡位置。                  |
 | duration          | `'fast'\|'base'\|'slow'\|'slower'`                                                                        | `'base'`  | N    | 过渡时间。                      |
 | autocomplete      | `boolean`                                                                                                 | `true`    | N    | 是否开启自动填充功能。          |
 | py                | `'0'\|'0.5'\|'1'\|'2'\|'3'\|'4'\|'6'`                                                                     | `'2'`     | N    | 垂直间距。                      |
@@ -20,6 +20,7 @@
 | textareaMaxlength | `number`                                                                                                  | `200`     | N    | textarea 时最多可输入文本长度。 |
 | rows              | `number`                                                                                                  | `2`       | N    | textarea 时行数。               |
 | autosize          | `boolean`                                                                                                 | `false`   | N    | textarea 时是否自动调整高度。   |
+| negative          | `boolean`                                                                                                 | `false`   | N    | 是否允许输入负数。              |
 | label1            | [`Icon`](https://stdf.design/components?nav=icon&tab=1)\|`null`                                         | `null`    | N    | 标签 1 内容。                   |
 | label2            | `string\|null`                                                                                            | `null`    | N    | 标签 2 内容。                   |
 | label3            | [`Icon`](https://stdf.design/components?nav=icon&tab=1)\|`null`                                         | `null`    | N    | 标签 3 内容。                   |

+ 2 - 1
docs/mds/components/input/api_en.md

@@ -8,7 +8,7 @@
 | placeholder       | `string`                                                                                                  | `''`      | N        | Input placeholder text.           |
 | radius            | `'none'\|'base'\|'xl'\|'full'`                                                                            | `'base'`  | N        | Border radius style.              |
 | inputStyle        | `'block'\|'line'`                                                                                         | `'block'` | N        | Input box style.                  |
-| lineTransition    | `string`                                                                                                  | `'none'`  | N        | Linear transition position.       |
+| lineTransition    | `'left'\|'center'`                                                                                         | `'left'`  | N        | Linear transition position.       |
 | duration          | `'fast'\|'base'\|'slow'\|'slower'`                                                                        | `'base'`  | N        | Transition duration.              |
 | autocomplete      | `boolean`                                                                                                 | `true`    | N        | Whether to enable autocomplete.   |
 | py                | `'0'\|'0.5'\|'1'\|'2'\|'3'\|'4'\|'6'`                                                                     | `'2'`     | N        | Vertical padding.                 |
@@ -20,6 +20,7 @@
 | textareaMaxlength | `number`                                                                                                  | `200`     | N        | Maximum text length for textarea. |
 | rows              | `number`                                                                                                  | `2`       | N        | Number of rows for textarea.      |
 | autosize          | `boolean`                                                                                                 | `false`   | N        | Auto adjust height for textarea.  |
+| negative          | `boolean`                                                                                                 | `false`   | N        | Whether to allow negative numbers. |
 | label1            | [`Icon`](https://stdf.design/components?nav=icon&tab=1)\|`null`                                         | `null`    | N        | Label 1 content.                  |
 | label2            | `string\|null`                                                                                            | `null`    | N        | Label 2 content.                  |
 | label3            | [`Icon`](https://stdf.design/components?nav=icon&tab=1)\|`null`                                         | `null`    | N        | Label 3 content.                  |

+ 6 - 0
docs/mds/components/input/version.md

@@ -1,3 +1,9 @@
+## 1.0.4
+
+- [!tag|B|3|]触发 `onclear` 同时也触发 `onchange`。
+- [!tag|A|0|]通过 `negative` 属性允许输入负数 [PR#38](https://github.com/any-tdf/stdf/pull/38)。[!contribute|rizmyabdulla |]
+- [!tag|O|0|]输入数字时不允许小数点开头且只允许一个小数点。
+
 ## 0.3.2
 
 - [!tag|B|2|]修复 textarea 回车无法换行的问题。

+ 6 - 0
docs/mds/components/input/version_en.md

@@ -1,3 +1,9 @@
+## 1.0.4
+
+- [!tag|B|3|] Trigger `onclear` also triggers `onchange`.
+- [!tag|A|0|] Allow negative numbers through the `negative` property [PR#43](https://github.com/any-tdf/stdf/pull/43). [!contribute|arithefirst|]
+- [!tag|O|0|] Do not allow decimal points to start and only allow one decimal point when entering numbers.
+
 ## 0.3.2
 
 - [!tag|B|2|] Fixed the problem that textarea cannot wrap when pressing enter.

+ 7 - 0
docs/mds/guide/changelog.md

@@ -1,3 +1,10 @@
+## 1.0.4 <font size=1>2025-04-26</font>
+
+- 增强 Input 组件,详见 [Input](https://stdf.design/components?nav=input&tab=4)。
+- 增强 Button 组件,详见 [Button](https://stdf.design/components?nav=button&tab=4)。
+- 补充遗漏的语言文件。
+- 修复类型导出错误。
+
 ## 1.0.3 <font size=1>2025-04-07</font>
 
 - 完整支持 Svelte v5、Tailwind CSS v4 与 TypeScript,包括库、示例、create-stdf、站点。

+ 7 - 0
docs/mds/guide/changelog_en.md

@@ -1,3 +1,10 @@
+## 1.0.4 <font size=1>2025-04-26</font>
+
+- Enhanced Input component, please see [Input](https://stdf.design/components?nav=input&tab=4).
+- Enhanced Button component, please see [Button](https://stdf.design/components?nav=button&tab=4).
+- Added missing language files.
+- Fixed type export error.
+
 ## 1.0.3 <font size=1>2025-04-07</font>
 
 - Full support for Svelte v5, Tailwind CSS v4, and TypeScript, including libraries, demos, create-stdf, and site.

+ 4 - 4
docs/site/src/routes/components/Version.svelte

@@ -62,9 +62,9 @@
 		if (issueList) {
 			issueList.forEach((item) => {
 				const arr = item.split('|');
-				const span = `<span><a href="https://github.com/${
+				const span = `<span><a class="size-4 translate-y-0.5 rounded-full overflow-hidden inline-flex items-center justify-center" href="https://github.com/${
 					arr[1]
-				}" target="_blank"><img class="w-4 h-4 ml-1 p-0 m-0 rounded-full overflow-hidden inline" src="https://avatars.githubusercontent.com/${
+				}" target="_blank"><img class="w-full h-full" src="https://avatars.githubusercontent.com/${
 					arr[1]
 				}" title="${isZh ? '感谢' : 'Thanks'} ${arr[1]} ${isZh ? '提出 Issue' : 'raise an Issue'}" alt=""></a></span>`;
 				string = string.replace(item, span);
@@ -75,9 +75,9 @@
 		if (contributeList) {
 			contributeList.forEach((item) => {
 				const arr = item.split('|');
-				const span = `<span><a href="https://github.com/${
+				const span = `<span><a class="size-4 translate-y-0.5 rounded-full overflow-hidden inline-flex items-center justify-center" href="https://github.com/${
 					arr[1]
-				}" target="_blank"><img class="w-4 h-4 ml-1 p-0 m-0 rounded-full overflow-hidden inline" src="https://avatars.githubusercontent.com/${
+				}" target="_blank"><img class="w-full h-full" src="https://avatars.githubusercontent.com/${
 					arr[1]
 				}" title="${isZh ? '感谢' : 'Thanks'} ${arr[1]} ${isZh ? '贡献代码' : 'contribute code'}" alt=""></a></span>`;
 				string = string.replace(item, span);