Browse Source

[stdf]更新 v0.5.5

dufu1991 1 year ago
parent
commit
8f97dd46fb

+ 1 - 1
demo/src/routes/en_US/input/+page.svelte

@@ -52,7 +52,7 @@
 <Input title="password" type="password" />
 <Input title="Number (arbitrarily)" type="number" />
 <Input title="Number (integer)" type="numeric" />
-<Input title="Number (allowing decimal points)" type="decimal" />
+<Input title="Number (Allow Negative)" type="number" negative />
 <Input title="Mail" type="email" />
 <Input title="telephone number" type="tel" />
 <Input title="Url" type="url" />

+ 1 - 1
doc/components/input/api.md

@@ -18,6 +18,7 @@
 | maxlength         | Number             | 24      | -                                                                                             | N    | 最多可输入文本长度。            |
 | rows              | Number             | 2       | -                                                                                             | N    | textarea 时行数。               |
 | autosize          | Boolean            | false   | true/false                                                                                    | N    | textarea 时是否自动调整高度。   |
+| negative          | Boolean            | false   | true/false                                                                                    | N    | 是否允许负数。                  |
 | textareaMaxlength | Number             | 200     | -                                                                                             | N    | textarea 时最多可输入文本长度。 |
 | clear             | Boolean            | false   | true/false                                                                                    | N    | 是否可清空。                    |
 | autocomplete      | Boolean            | true    | true/false                                                                                    | N    | 是否开启自动填充功能。          |
@@ -32,7 +33,6 @@
 | data1             | String/slot        | ''      | ''/Any String/slot                                                                            | N    | 数据项 1 内容。                 |
 | data2             | String/slot        | ''      | ''/Any String/slot                                                                            | N    | 数据项 2 内容。                 |
 | data3             | String/slot        | ''      | ''/Any String/slot                                                                            | N    | 数据项 3 内容。                 |
-| negative          | Boolean            | false   | true/false                                                                                    | N    | 是否允许负数。                  |
 
 ## Input Events
 

+ 1 - 1
doc/components/input/api_en.md

@@ -18,6 +18,7 @@
 | maxlength         | Number             | 24            | -                                                                                             | No       | The maximum number of characters allowed.                     |
 | rows              | Number             | 2             | -                                                                                             | No       | The number of rows when the input is a text area.             |
 | autosize          | Boolean            | false         | true/false                                                                                    | No       | Whether or not the text area automatically adjust its height. |
+| negative          | Boolean            | false         | true/false                                                                                    | No       | Whether or not to allow negative numbers.                     |
 | textareaMaxlength | Number             | 200           | -                                                                                             | No       | The maximum number of characters allowed in the text area.    |
 | clear             | Boolean            | false         | true/false                                                                                    | No       | Whether or not it is possible to clear the input field.       |
 | autocomplete      | Boolean            | true          | true/false                                                                                    | No       | Whether or not to enable auto-fill functionality.             |
@@ -32,7 +33,6 @@
 | data1             | String/slot        | ''            | ''/Any String/slot                                                                            | No       | The contents of data item 1.                                  |
 | data2             | String/slot        | ''            | ''/Any String/slot                                                                            | No       | The contents of data item 2.                                  |
 | data3             | String/slot        | ''            | ''/Any String/slot                                                                            | No       | The contents of data item 3.                                  |
-| negative          | Boolean            | false         | true/false                                                                                    | No       | Whether or not to allow negative numbers.                     |
 
 ## Input Events
 

+ 4 - 0
doc/components/input/version.md

@@ -1,3 +1,7 @@
+## 0.5.5
+
+- [!tag|A|0|]通过 `negative` 属性允许输入负数 [Issue#37](https://github.com/any-tdf/stdf/issues/37) [PR#38](https://github.com/any-tdf/stdf/pull/38)。[!issue|sbscan|] [!contribute|rizmyabdulla|]
+
 ## 0.3.2
 
 - [!tag|B|2|]修复 textarea 回车无法换行的问题。

+ 4 - 0
doc/components/input/version_en.md

@@ -1,3 +1,7 @@
+## 0.5.5
+
+- [!tag|A|0|] Allow negative numbers through the `negative` property [Issue#37](https://github.com/any-tdf/stdf/issues/37) [PR#38](https://github.com/any-tdf/stdf/pull/38). [!issue|sbscan|] [!contribute|rizmyabdulla|]
+
 ## 0.3.2
 
 - [!tag|B|2|] Fixed the problem that textarea cannot wrap when pressing enter.

+ 39 - 35
doc/guide/changelog.md

@@ -1,43 +1,47 @@
+## 0.5.5 <font size=1>2025-04-27</font>
+
+- 优化 Input 组件,详见 [Input](https://0.stdf.design/#/components?nav=input&tab=4)。
+
 ## 0.5.3 <font size=1>2024-11-19</font>
 
-- 优化 Icon 组件,详见 [Icon](https://stdf.design/#/components?nav=icon&tab=4)。
+- 优化 Icon 组件,详见 [Icon](https://0.stdf.design/#/components?nav=icon&tab=4)。
 
 ## 0.5.2 <font size=1>2024-10-02</font>
 
-- 优化 Button 组件,详见 [Button](https://stdf.design/#/components?nav=button&tab=4)。
+- 优化 Button 组件,详见 [Button](https://0.stdf.design/#/components?nav=button&tab=4)。
 
 ## 0.5.1 <font size=1>2024-10-02</font>
 
-- 增强 Button 组件,详见 [Button](https://stdf.design/#/components?nav=button&tab=4)。
-- 优化 BottomSheet 组件,详见 [BottomSheet](https://stdf.design/#/components?nav=bottomSheet&tab=4)。
-- 优化 IndexBar 组件,详见 [IndexBar](https://stdf.design/#/components?nav=indexBar&tab=4)。
-- 修复 Avatar 组件,详见 [Avatar](https://stdf.design/#/components?nav=avatar&tab=4)。
+- 增强 Button 组件,详见 [Button](https://0.stdf.design/#/components?nav=button&tab=4)。
+- 优化 BottomSheet 组件,详见 [BottomSheet](https://0.stdf.design/#/components?nav=bottomSheet&tab=4)。
+- 优化 IndexBar 组件,详见 [IndexBar](https://0.stdf.design/#/components?nav=indexBar&tab=4)。
+- 修复 Avatar 组件,详见 [Avatar](https://0.stdf.design/#/components?nav=avatar&tab=4)。
 
 ## 0.5.0 <font size=1>2024-09-09</font>
 
-- 新增 Stepper 组件,详见 [Stepper](https://stdf.design/#/components?nav=stepper&tab=0)。
+- 新增 Stepper 组件,详见 [Stepper](https://0.stdf.design/#/components?nav=stepper&tab=0)。
 
 ## 0.4.7 <font size=1>2024-08-12</font>
 
-- 修复 Pagination 组件,详见 [Pagination](https://stdf.design/#/components?nav=pagination&tab=4)。
-- 优化 Loading 组件,详见 [Loading](https://stdf.design/#/components?nav=loading&tab=4)。
-- 优化 Slider 组件,详见 [Slider](https://stdf.design/#/components?nav=slider&tab=4)。
+- 修复 Pagination 组件,详见 [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4)。
+- 优化 Loading 组件,详见 [Loading](https://0.stdf.design/#/components?nav=loading&tab=4)。
+- 优化 Slider 组件,详见 [Slider](https://0.stdf.design/#/components?nav=slider&tab=4)。
 
 ## 0.4.6 <font size=1>2024-03-31</font>
 
-- 新增 Loading 类型,详见 [Loading](https://stdf.design/#/components?nav=loading&tab=4)。
+- 新增 Loading 类型,详见 [Loading](https://0.stdf.design/#/components?nav=loading&tab=4)。
 
 ## 0.4.5 <font size=1>2024-03-28</font>
 
-- 修复 Pagination 组件,详见 [Pagination](https://stdf.design/#/components?nav=pagination&tab=4)。
+- 修复 Pagination 组件,详见 [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4)。
 
 ## 0.4.4 <font size=1>2023-12-13</font>
 
-- 增强 Tabs 组件,详见 [Tabs](https://stdf.design/#/components?nav=tabs&tab=4)。
+- 增强 Tabs 组件,详见 [Tabs](https://0.stdf.design/#/components?nav=tabs&tab=4)。
 
 ## 0.4.3 <font size=1>2023-12-11</font>
 
-- 修改 Tabs 组件,详见 [Tabs](https://stdf.design/#/components?nav=tabs&tab=4)。
+- 修改 Tabs 组件,详见 [Tabs](https://0.stdf.design/#/components?nav=tabs&tab=4)。
 
 ## 0.4.2 <font size=1>2023-11-21</font>
 
@@ -49,31 +53,31 @@
 
 ## 0.4.0 <font size=1>2023-11-03</font>
 
-- 新增支持多主题配置,请参考 [主题配置](https://stdf.design/#/guide/theme)、[色彩](https://stdf.design/#/guide/color)、[主题生成器](https://stdf.design/#/guide/generator)。
-- 按照 Tailwind 命名规则统一将灰色由 `gray5` 改为 `gray-500` 写法,请注意升级后更改写法。详见 [色彩](https://stdf.design/#/guide/color)。
-- Avatar 组件新增头像组用法,详见 [Avatar](https://stdf.design/#/components?nav=avatar&tab=4)。
+- 新增支持多主题配置,请参考 [主题配置](https://0.stdf.design/#/guide/theme)、[色彩](https://0.stdf.design/#/guide/color)、[主题生成器](https://0.stdf.design/#/guide/generator)。
+- 按照 Tailwind 命名规则统一将灰色由 `gray5` 改为 `gray-500` 写法,请注意升级后更改写法。详见 [色彩](https://0.stdf.design/#/guide/color)。
+- Avatar 组件新增头像组用法,详见 [Avatar](https://0.stdf.design/#/components?nav=avatar&tab=4)。
 
 ## 0.3.2 <font size=1>2023-10-11</font>
 
-- 修复 Input 组件,详见 [Input](https://stdf.design/#/components?nav=input&tab=4)。
+- 修复 Input 组件,详见 [Input](https://0.stdf.design/#/components?nav=input&tab=4)。
 
 ## 0.3.1 <font size=1>2023-10-11</font>
 
-- 增强 Input 组件,详见 [Input](https://stdf.design/#/components?nav=input&tab=4)。
+- 增强 Input 组件,详见 [Input](https://0.stdf.design/#/components?nav=input&tab=4)。
 
 ## 0.3.0 <font size=1>2023-09-20</font>
 
-- 新增 NumKeyboard 组件,详见 [NumKeyboard](https://stdf.design/#/components?nav=numKeyboard&tab=0)。
+- 新增 NumKeyboard 组件,详见 [NumKeyboard](https://0.stdf.design/#/components?nav=numKeyboard&tab=0)。
 
 ## 0.2.11 <font size=1>2023-09-15</font>
 
-- 修复 Cell,详见 [Cell](https://stdf.design/#/components?nav=cell&tab=4)。
-- 修复 Icon,详见 [Icon](https://stdf.design/#/components?nav=icon&tab=4)。
-- 修复 Skeleton,详见 [Skeleton](https://stdf.design/#/components?nav=skeleton&tab=4)。
+- 修复 Cell,详见 [Cell](https://0.stdf.design/#/components?nav=cell&tab=4)。
+- 修复 Icon,详见 [Icon](https://0.stdf.design/#/components?nav=icon&tab=4)。
+- 修复 Skeleton,详见 [Skeleton](https://0.stdf.design/#/components?nav=skeleton&tab=4)。
 
 ## 0.2.10 <font size=1>2023-09-11</font>
 
-- 增强 Cell 组件,详见 [Cell](https://stdf.design/#/components?nav=cell&tab=4)。
+- 增强 Cell 组件,详见 [Cell](https://0.stdf.design/#/components?nav=cell&tab=4)。
 
 ## 0.2.9 <font size=1>2023-08-31</font>
 
@@ -84,7 +88,7 @@
 - 删除部分组件无用代码。
 - 格式化组件代码,方便后续其他参与成员统一代码风格。
 - 考虑到组件代码本身体积也不大,还是决定直接将组件源码放入 NPM 包中,方便用户直接查看源码,避免了需要去 GitHub 上查看源码的麻烦。
-- 多语言引入路径改回 `stdf/lang/xx_XX`,详见 [国际化](https://stdf.design/#/guide/internation)。
+- 多语言引入路径改回 `stdf/lang/xx_XX`,详见 [国际化](https://0.stdf.design/#/guide/internation)。
 
 ## 0.2.7 <font size=1>2023-08-26</font>
 
@@ -92,14 +96,14 @@
 
 ## 0.2.5 <font size=1>2023-08-16</font>
 
-- Icon 修改 path 默认值,详见 [Icon](https://stdf.design/#/components?nav=icon&tab=4)。
+- Icon 修改 path 默认值,详见 [Icon](https://0.stdf.design/#/components?nav=icon&tab=4)。
 - 新增了 `rollup-plugin-stdf-icon` 插件,将指定文件夹内的所有 SVG 组合为 SVG symbol,详见 [rollup-plugin-stdf-icon](https://www.npmjs.com/package/rollup-plugin-stdf-icon),方便 STDF 的 Icon 组件使用。
 - 配合 `rollup-plugin-stdf-icon` 更新 `create-stdf`。
 
 ## 0.2.4 <font size=1>2023-08-14</font>
 
 - 0.2.2 ~ 0.2.4 优化文件结构,精简 NPM 包体积。抵制 `node_modules` 体积膨胀和依赖黑洞,从我做起!
-- 多语言引入路径由 `stdf/lang/xx_XX` 改为 `stdf/dist/lang/xx_XX`,详见 [国际化](https://stdf.design/#/guide/internation)。
+- 多语言引入路径由 `stdf/lang/xx_XX` 改为 `stdf/dist/lang/xx_XX`,详见 [国际化](https://0.stdf.design/#/guide/internation)。
 
 ## 0.2.1 <font size=1>2023-07-26</font>
 
@@ -108,7 +112,7 @@
 ## 0.2.0 <font size=1>2023-07-23</font>
 
 - 适配 Svelte 4 同时也兼容 Svelte 3。目前仅需适配一项,即升级部分组件过渡动画,参考 Svelte 4 migration guide - [Transitions are local by default](https://svelte.dev/docs/v4-migration-guide#transitions-are-local-by-default)。
-- 增强 Swiper 组件,详见 [Swiper](https://stdf.design/#/components?nav=swiper&tab=4)。
+- 增强 Swiper 组件,详见 [Swiper](https://0.stdf.design/#/components?nav=swiper&tab=4)。
 
 ## 0.1.5 <font size=1>2023-07-19</font>
 
@@ -120,11 +124,11 @@
 
 ## 0.1.3 <font size=1>2023-07-16</font>
 
-- Pagination 新增 Props。详见 [Pagination](https://stdf.design/#/components?nav=pagination&tab=4)。
+- Pagination 新增 Props。详见 [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4)。
 
 ## 0.1.2 <font size=1>2023-07-11</font>
 
-- Pagination 细节优化。详见 [Pagination](https://stdf.design/#/components?nav=pagination&tab=4)。
+- Pagination 细节优化。详见 [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4)。
 
 ## 0.1.1 <font size=1>2023-07-10</font>
 
@@ -132,7 +136,7 @@
 
 ## 0.1.0 <font size=1>2023-07-10</font>
 
-- 新增 Pagination 组件,详见 [Pagination](https://stdf.design/#/components?nav=pagination&tab=0)。
+- 新增 Pagination 组件,详见 [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=0)。
 
 ## 0.0.27 <font size=1>2023-06-29</font>
 
@@ -140,11 +144,11 @@
 
 ## 0.0.11 <font size=1>2023-06-19</font>
 
-- 优化 Input,详见 [Input](https://stdf.design/#/components?nav=input&tab=4)。
+- 优化 Input,详见 [Input](https://0.stdf.design/#/components?nav=input&tab=4)。
 
 ## 0.0.10 <font size=1>2023-06-17</font>
 
-- 优化 Cell,详见 [Cell](https://stdf.design/#/components?nav=cell&tab=4)。
+- 优化 Cell,详见 [Cell](https://0.stdf.design/#/components?nav=cell&tab=4)。
 
 ## 0.0.9
 
@@ -152,7 +156,7 @@
 
 ## 0.0.8
 
-- 修复 Calendar,详见 [Calendar](https://stdf.design/#/components?nav=calendar&tab=4)。
+- 修复 Calendar,详见 [Calendar](https://0.stdf.design/#/components?nav=calendar&tab=4)。
 
 ## 0.0.7
 
@@ -161,7 +165,7 @@
 
 ## 0.0.6
 
-- 新增 Loading 类型,详见 [Loading](https://stdf.design/#/components?nav=loading&tab=4)。
+- 新增 Loading 类型,详见 [Loading](https://0.stdf.design/#/components?nav=loading&tab=4)。
 
 ## 0.0.1 <font size=1>2023-04-27</font>
 

+ 39 - 35
doc/guide/changelog_en.md

@@ -1,43 +1,47 @@
+## 0.5.5 <font size=1>2025-04-27</font>
+
+- Optimized Input component, please see [Input](https://0.stdf.design/#/components?nav=input&tab=4).
+
 ## 0.5.3 <font size=1>2024-11-19</font>
 
-- Optimized Icon component, please see [Icon](https://stdf.design/#/components?nav=icon&tab=4).
+- Optimized Icon component, please see [Icon](https://0.stdf.design/#/components?nav=icon&tab=4).
 
 ## 0.5.2 <font size=1>2024-10-02</font>
 
-- Optimized Button component, please see [Button](https://stdf.design/#/components?nav=button&tab=4).
+- Optimized Button component, please see [Button](https://0.stdf.design/#/components?nav=button&tab=4).
 
 ## 0.5.1 <font size=1>2024-10-02</font>
 
-- Optimized Button component, please see [Button](https://stdf.design/#/components?nav=button&tab=4).
-- Optimized BottomSheet component, please see [BottomSheet](https://stdf.design/#/components?nav=bottomSheet&tab=4).
-- Optimized IndexBar component, please see [IndexBar](https://stdf.design/#/components?nav=indexBar&tab=4).
-- Fixed Avatar component, please see [Avatar](https://stdf.design/#/components?nav=avatar&tab=4).
+- Optimized Button component, please see [Button](https://0.stdf.design/#/components?nav=button&tab=4).
+- Optimized BottomSheet component, please see [BottomSheet](https://0.stdf.design/#/components?nav=bottomSheet&tab=4).
+- Optimized IndexBar component, please see [IndexBar](https://0.stdf.design/#/components?nav=indexBar&tab=4).
+- Fixed Avatar component, please see [Avatar](https://0.stdf.design/#/components?nav=avatar&tab=4).
 
 ## 0.5.0 <font size=1>2024-09-09</font>
 
-- Added Stepper component, please see [Stepper](https://stdf.design/#/components?nav=stepper&tab=0).
+- Added Stepper component, please see [Stepper](https://0.stdf.design/#/components?nav=stepper&tab=0).
 
 ## 0.4.7 <font size=1>2024-08-12</font>
 
-- Fixed Pagination component, please see [Pagination](https://stdf.design/#/components?nav=pagination&tab=4).
-- Optimized Loading component, please see [Loading](https://stdf.design/#/components?nav=loading&tab=4).
-- Optimized Slider component, please see [Slider](https://stdf.design/#/components?nav=slider&tab=4).
+- Fixed Pagination component, please see [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4).
+- Optimized Loading component, please see [Loading](https://0.stdf.design/#/components?nav=loading&tab=4).
+- Optimized Slider component, please see [Slider](https://0.stdf.design/#/components?nav=slider&tab=4).
 
 ## 0.4.6 <font size=1>2024-03-31</font>
 
-- Add Loading type, For more information, please see [Loading](https://stdf.design/#/components?nav=loading&tab=4).
+- Add Loading type, For more information, please see [Loading](https://0.stdf.design/#/components?nav=loading&tab=4).
 
 ## 0.4.5 <font size=1>2024-03-28</font>
 
-- Fixed the Pagination component, please see [Pagination](https://stdf.design/#/components?nav=pagination&tab=4).
+- Fixed the Pagination component, please see [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4).
 
 ## 0.4.4 <font size=1>2023-12-13</font>
 
-- Enhanced Tabs components, please see [Tabs](https://stdf.design/#/components?nav=tabs&tab=4).
+- Enhanced Tabs components, please see [Tabs](https://0.stdf.design/#/components?nav=tabs&tab=4).
 
 ## 0.4.3 <font size=1>2023-12-11</font>
 
-- Modify the Tabs component, please see [Tabs](https://stdf.design/#/components?nav=tabs&tab=4).
+- Modify the Tabs component, please see [Tabs](https://0.stdf.design/#/components?nav=tabs&tab=4).
 
 ## 0.4.2 <font size=1>2023-11-21</font>
 
@@ -49,31 +53,31 @@
 
 ## 0.4.0 <font size=1>2023-11-03</font>
 
-- Added support for multi-theme configuration, please refer to [Theme Configuration](https://stdf.design/#/guide/theme), [Color](https://stdf.design/#/guide/color), [Theme Generator](https://stdf.design/#/guide/generator).
-- In accordance with the Tailwind naming rules, the gray color has been uniformly changed from `gray5` to `gray-500` writing method. Please note that the writing method should be changed after the upgrade. See [Color](https://stdf.design/#/guide/color) for details.
-- The Avatar component adds the usage of the avatar group, please see [Avatar](https://stdf.design/#/components/avatar&tab=4).
+- Added support for multi-theme configuration, please refer to [Theme Configuration](https://0.stdf.design/#/guide/theme), [Color](https://0.stdf.design/#/guide/color), [Theme Generator](https://0.stdf.design/#/guide/generator).
+- In accordance with the Tailwind naming rules, the gray color has been uniformly changed from `gray5` to `gray-500` writing method. Please note that the writing method should be changed after the upgrade. See [Color](https://0.stdf.design/#/guide/color) for details.
+- The Avatar component adds the usage of the avatar group, please see [Avatar](https://0.stdf.design/#/components/avatar&tab=4).
 
 ## 0.3.2 <font size=1>2023-10-11</font>
 
-- Fix Input, please see [Input](https://stdf.design/#/components?nav=input&tab=4).
+- Fix Input, please see [Input](https://0.stdf.design/#/components?nav=input&tab=4).
 
 ## 0.3.1 <font size=1>2023-10-11</font>
 
-- Enhanced the Input component. For details, see [Input](https://stdf.design/#/components?nav=input&tab=4).
+- Enhanced the Input component. For details, see [Input](https://0.stdf.design/#/components?nav=input&tab=4).
 
 ## 0.3.0 <font size=1>2023-09-20</font>
 
-- Add NumKeyboard component, please see [NumKeyboard](https://stdf.design/#/components?nav=numKeyboard&tab=0).
+- Add NumKeyboard component, please see [NumKeyboard](https://0.stdf.design/#/components?nav=numKeyboard&tab=0).
 
 ## 0.2.11 <font size=1>2023-09-15</font>
 
-- Fix Cell, please see [Cell](https://stdf.design/#/components?nav=cell&tab=4).
-- Fix Icon, please see [Icon](https://stdf.design/#/components?nav=icon&tab=4).
-- Fix Skeleton, please see [Skeleton](https://stdf.design/#/components?nav=skeleton&tab=4).
+- Fix Cell, please see [Cell](https://0.stdf.design/#/components?nav=cell&tab=4).
+- Fix Icon, please see [Icon](https://0.stdf.design/#/components?nav=icon&tab=4).
+- Fix Skeleton, please see [Skeleton](https://0.stdf.design/#/components?nav=skeleton&tab=4).
 
 ## 0.2.10 <font size=1>2023-09-11</font>
 
-- Enhanced the Cell component. For details, see [Cell](https://stdf.design/#/components?nav=cell&tab=4).
+- Enhanced the Cell component. For details, see [Cell](https://0.stdf.design/#/components?nav=cell&tab=4).
 
 ## 0.2.9 <font size=1>2023-08-31</font>
 
@@ -84,7 +88,7 @@
 - Removed unnecessary code from some components.
 - Formatted component code to facilitate consistent code style among other contributors in the future.
 - Considering that the size of the component code itself is not large, we decided to directly include the component source code in the NPM package. This makes it easier for users to view the source code directly and avoids the hassle of having to view the source code on GitHub.
-- Reverted the language import path back to `stdf/lang/xx_XX`, as described in the [Internationalization](https://stdf.design/#/guide/internation) section.
+- Reverted the language import path back to `stdf/lang/xx_XX`, as described in the [Internationalization](https://0.stdf.design/#/guide/internation) section.
 
 ## 0.2.7 <font size=1>2023-08-26</font>
 
@@ -92,14 +96,14 @@
 
 ## 0.2.5 <font size=1>2023-08-16</font>
 
-- The default value of `path` in the Icon component has been modified. Please refer to the [Icon](https://stdf.design/#/components?nav=icon&tab=4) section for more details.
+- The default value of `path` in the Icon component has been modified. Please refer to the [Icon](https://0.stdf.design/#/components?nav=icon&tab=4) section for more details.
 - A new plugin called `rollup-plugin-stdf-icon` has been added. It combines all SVG files in a specified folder into an SVG symbol for the convenience of using the Icon component in STDF. Please see [rollup-plugin-stdf-icon](https://www.npmjs.com/package/rollup-plugin-stdf-icon) for more information.
 - The `create-stdf` project has been updated to work with `rollup-plugin-stdf-icon`.
 
 ## 0.2.4 <font size=1>2023-08-14</font>
 
 - 0.2.2 ~ 0.2.4 Optimized file structure and reduced NPM package size. Say no to bloated `node_modules` and dependency black holes!
-- Updated the language import path from `stdf/lang/xx_XX` to `stdf/dist/lang/xx_XX`. For more details, please refer to the [Internation](https://stdf.design/#/guide/internation).
+- Updated the language import path from `stdf/lang/xx_XX` to `stdf/dist/lang/xx_XX`. For more details, please refer to the [Internation](https://0.stdf.design/#/guide/internation).
 
 ## 0.2.1 <font size=1>2023-07-26</font>
 
@@ -108,7 +112,7 @@
 ## 0.2.0 <font size=1>2023-07-23</font>
 
 - Adapted for Svelte 4 while remaining compatible with Svelte 3. Currently, only one item needs to be adapted, which is to upgrade the transition animation of some components. Refer to the Svelte 4 migration guide - [Transitions are local by default](https://svelte.dev/docs/v4-migration-guide#transitions-are-local-by-default).
-- Enhanced the Swiper component. For details, see [Swiper](https://stdf.design/#/components?nav=swiper&tab=4).
+- Enhanced the Swiper component. For details, see [Swiper](https://0.stdf.design/#/components?nav=swiper&tab=4).
 
 ## 0.1.5 <font size=1>2023-07-19</font>
 
@@ -120,11 +124,11 @@
 
 ## 0.1.3 <font size=1>2023-07-16</font>
 
-- Pagination add Props. Please see [Pagination](https://stdf.design/#/components?nav=pagination&tab=4).
+- Pagination add Props. Please see [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4).
 
 ## 0.1.2 <font size=1>2023-07-11</font>
 
-- Pagination fine-tuning. Please see [Pagination](https://stdf.design/#/components?nav=pagination&tab=4).
+- Pagination fine-tuning. Please see [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=4).
 
 ## 0.1.1 <font size=1>2023-07-10</font>
 
@@ -132,7 +136,7 @@
 
 ## 0.1.0 <font size=1>2023-07-10</font>
 
-- Add Pagination component, please see [Pagination](https://stdf.design/#/components?nav=pagination&tab=0).
+- Add Pagination component, please see [Pagination](https://0.stdf.design/#/components?nav=pagination&tab=0).
 
 ## 0.0.27 <font size=1>2023-06-29</font>
 
@@ -140,11 +144,11 @@
 
 ## 0.0.11 <font size=1>2023-06-19</font>
 
-- Optimize Input, please see [Input](https://stdf.design/#/components?nav=input&tab=4).
+- Optimize Input, please see [Input](https://0.stdf.design/#/components?nav=input&tab=4).
 
 ## 0.0.10 <font size=1>2023-06-17</font>
 
-- Optimize Cell, please see [Cell](https://stdf.design/#/components?nav=cell&tab=4).
+- Optimize Cell, please see [Cell](https://0.stdf.design/#/components?nav=cell&tab=4).
 
 ## 0.0.9
 
@@ -152,7 +156,7 @@
 
 ## 0.0.8
 
-- Fix Calendar, please see [Calendar](https://stdf.design/#/components?nav=calendar&tab=4).
+- Fix Calendar, please see [Calendar](https://0.stdf.design/#/components?nav=calendar&tab=4).
 
 ## 0.0.7
 
@@ -161,7 +165,7 @@
 
 ## 0.0.6
 
-- Add Loading type, For more information, please see [Loading](https://stdf.design/#/components?nav=loading&tab=4).
+- Add Loading type, For more information, please see [Loading](https://0.stdf.design/#/components?nav=loading&tab=4).
 
 ## 0.0.1 <font size=1>2023-04-27</font>
 

+ 43 - 20
packages/stdf/components/input/Input.svelte

@@ -272,7 +272,7 @@
 
 	// 输入模式判断
 	// Input mode judgment
-	const modeFun = type => {
+	const modeFun = (type) => {
 		switch (type) {
 			case 'password':
 				return 'text';
@@ -290,7 +290,7 @@
 	$: mode = inputmode === '' ? modeFun(type) : inputmode;
 
 	// 输入框类型判断
-	const typeAction = node => {
+	const typeAction = (node) => {
 		if (type !== 'textarea') {
 			node.type = type === 'password' ? 'password' : 'text';
 		}
@@ -304,7 +304,7 @@
 	// Input box style style
 	const inputStyleObj = {
 		block: 'px-2 ring-2 ring-transparent bg-black/5 dark:bg-white/5 ' + radiusObj[radius] || radiusObj.base,
-		line: 'px-1 border-b bg-transparent border-gray-300 dark:border-gray-500',
+		line: 'px-1 border-b bg-transparent border-gray-300 dark:border-gray-500'
 	};
 
 	// 状态样式
@@ -314,14 +314,14 @@
 		success: 'ring-success',
 		warning: 'ring-warning',
 		error: 'ring-error',
-		info: 'ring-info',
+		info: 'ring-info'
 	};
 
 	// 根据是否获取焦点判断输入框样式
 	// Determine the input box style according to whether to get focus
 	$: inputStyleFocusObj = {
 		block: 'px-2 ring-2 bg-transparent ' + stateObj[state] || stateObj.theme + radiusObj[radius] || radiusObj.base,
-		line: 'px-1 border-b bg-transparent border-gray-300 dark:border-gray-500',
+		line: 'px-1 border-b bg-transparent border-gray-300 dark:border-gray-500'
 	};
 
 	// 线性动画样式
@@ -331,7 +331,7 @@
 		success: 'bg-success',
 		warning: 'bg-warning',
 		error: 'bg-error',
-		info: 'bg-info',
+		info: 'bg-info'
 	};
 
 	// 动画时长样式
@@ -358,7 +358,7 @@
 
 	// 输入内容变化时触发
 	// Triggered when input content changes
-	const valueChangeFun = e => {
+	const valueChangeFun = (e) => {
 		//处理拼音输入时,内容上屏后才做校验
 		//Handle pinyin input, content screening after validation
 		setTimeout(function () {
@@ -379,12 +379,35 @@
 				if (type === 'decimal' || type === 'number') {
 					// 数字
 					// Number
-					value = e.target.value.replace(negative ? /[^\d^.\-]+/g : /[^\d^.]+/g, '');
-					// value = e.target.value.replace(/[^\d^\.]+/g, '');
+					if (negative && e.value.startsWith('-')) {
+						// 允许第一个字符为负号
+						// Allow the first character to be a negative sign
+						value =
+							'-' +
+							e.value
+								.substring(1)
+								.replace(/[^\d.]+/g, '')
+								.replace(/\.{2,}/g, '.')
+								.replace(/^(\d*\.\d*)\./, '$1');
+					} else {
+						// 不允许小数点开头且只允许一个小数点
+						// Do not allow decimal points to start and only allow one decimal point
+						value = e.value
+							.replace(/[^\d.]+/g, '')
+							.replace(/^\./, '')
+							.replace(/\.{2,}/g, '.')
+							.replace(/^(\d*\.\d*)\./, '$1');
+					}
 				} else if (type === 'numeric') {
 					// 整数
 					// Integer
-					value = e.target.value.replace(/[^\d]/g, '');
+					if (negative && e.value.startsWith('-')) {
+						// 允许第一个字符为负号
+						// Allow the first character to be a negative sign
+						value = '-' + e.value.substring(1).replace(/[^\d]+/g, '');
+					} else {
+						value = e.value.replace(/[^\d]+/g, '');
+					}
 				} else {
 					value = e.target.value;
 				}
@@ -435,7 +458,7 @@
 
 	// 键盘事件
 	// Keyboard event
-	const keydownFunc = e => {
+	const keydownFunc = (e) => {
 		// 派发事件,并传出按键的 key
 		// Dispatch events and pass out the key of the key
 		dispatch('keydown', e.key);
@@ -451,7 +474,7 @@
 				{:else if title === 'slot'}
 					<slot name="title">title {commonLang.slotEmpty}</slot>
 				{:else}
-					<div class="text-sm font-semibold mb-1">{title}</div>
+					<div class="mb-1 text-sm font-semibold">{title}</div>
 				{/if}
 			{/if}
 			<div class="flex space-x-2 text-xs">
@@ -472,7 +495,7 @@
 			</div>
 		</div>
 		<div
-			class={`flex items-center my-0.5 space-x-1 text-sm relative transition-all whitespace-nowrap ${
+			class={`relative my-0.5 flex items-center space-x-1 whitespace-nowrap text-sm transition-all ${
 				durationObj[duration] || durationObj.base
 			} ${titlePosition === 'in' ? 'py-1' : 'py-3'} ${
 				focus ? inputStyleFocusObj[inputStyle] || inputStyleFocusObj.block : inputStyleObj[inputStyle] || inputStyleObj.block
@@ -511,9 +534,9 @@
 					<Icon {...label3} />
 				</div>
 			{/if}
-			<div class="flex flex-col grow">
+			<div class="flex grow flex-col">
 				{#if titlePosition === 'in'}
-					<div class="text-gray-400 text-xs">{title}</div>
+					<div class="text-xs text-gray-400">{title}</div>
 				{/if}
 				<div class="flex space-x-1">
 					<div class="w-full">
@@ -524,7 +547,7 @@
 								{rows}
 								inputmode={mode}
 								placeholder={placeholder !== '' ? placeholder : title !== '' ? inputLang.pleaseInput + ' ' + title : ''}
-								class={`w-full focus:outline-none bg-transparent font-semibold ${inputPosition === 'left' ? 'text-left' : 'text-right'} ${
+								class={`w-full bg-transparent font-semibold focus:outline-none ${inputPosition === 'left' ? 'text-left' : 'text-right'} ${
 									disabled ? 'cursor-not-allowed opacity-50' : ''
 								}`}
 								on:focus={onFocus}
@@ -543,7 +566,7 @@
 								use:typeAction
 								inputmode={mode}
 								placeholder={placeholder !== '' ? placeholder : title !== '' ? inputLang.pleaseInput + ' ' + title : ''}
-								class={`w-full focus:outline-none bg-transparent font-semibold whitespace-normal ${
+								class={`w-full whitespace-normal bg-transparent font-semibold focus:outline-none ${
 									inputPosition === 'left' ? 'text-left' : 'text-right'
 								} ${disabled ? 'cursor-not-allowed opacity-50' : ''}`}
 								on:focus={onFocus}
@@ -601,9 +624,9 @@
 			{/if}
 			{#if inputStyle === 'line'}
 				<div
-					class={`h-[2px] absolute -bottom-px ${lineTransition === 'none' ? 'transition-colors' : 'transition-all'} ${
+					class={`absolute -bottom-px h-[2px] ${lineTransition === 'none' ? 'transition-colors' : 'transition-all'} ${
 						durationObj[duration] || durationObj.base
-					} ${!focus && lineTransition === 'none' && 'bg-transparent w-full'} ${
+					} ${!focus && lineTransition === 'none' && 'w-full bg-transparent'} ${
 						focus && lineTransition === 'none' && `${lineTransitionStateObj[state] || lineTransitionStateObj.theme} w-full`
 					} ${!focus && lineTransition !== 'none' && `w-0 ${lineTransitionStateObj[state] || lineTransitionStateObj.theme}`} ${
 						focus && lineTransition !== 'none' && `w-full ${lineTransitionStateObj[state] || lineTransitionStateObj.theme}`
@@ -614,7 +637,7 @@
 				/>
 			{/if}
 		</div>
-		<div class={`flex  px-2 text-gay6 ${tip === '' ? 'justify-end' : 'justify-between'}`}>
+		<div class={`text-gay6  flex px-2 ${tip === '' ? 'justify-end' : 'justify-between'}`}>
 			{#if tip === ''}
 				<!-- none -->
 			{:else if tip === 'slot'}

+ 1 - 1
packages/stdf/package.json

@@ -1,6 +1,6 @@
 {
 	"name": "stdf",
-	"version": "0.5.4",
+	"version": "0.5.5",
 	"description": "Mobile web component library based on Svelte and Tailwind",
 	"main": "./components/index.js",
 	"svelte": "./components/index.js",