Commit Graph

88 Commits

Author SHA1 Message Date
一只前端汪
7c16480bcd refactor(style): Update Eslint to V9 and Prettier to V3 (#21949)
* refactor(style): Update Eslint to V9 and Prettier to V3

* fix: vscode color

* fix: vscode color

* chore: remove Useless dependence and old config file

* chore: format

* Merge branch 'dev' into eslintV9

* fix: fix

* fix: ssr test

* fix: ssr test

* fix: use defineConfig

* fix: prettier format and ignore docs dist

* fix: index.mjs => index.js

* fix: Vscode color

* fix: prettier ignore global.d.ts

* fix: format

---------

Co-authored-by: 2586740555 <15972343+CYJ090915@user.noreply.gitee.com>
2025-09-29 14:14:30 +08:00
qiang
b881ef25cb refactor(hooks): [useFocusController] add disabled attribute (#21032)
refactor(hooks): [useFocusController] add disabled prop

Co-authored-by: warmthsea <2586244885@qq.com>
2025-07-01 08:41:35 +00:00
Noblet Ouways
2f17df1209 style(eslint-config): newline before import type (#21036)
* perf: change to import-x

* feat: add rules

* chore: fix rule

* chore: fix

* chore: fix

* chore: fix

* style: `pnpm lint:fix`

* Revert "style: `pnpm lint:fix`"

This reverts commit db0116a288.

* Revert "chore: fix"

This reverts commit 69c82a90c0.

* chore: fix

* style: `pnpm lint:fix`

* fix: lint

* chore: `pnpm format`
2025-06-16 15:37:12 +08:00
qiang
9539c19b40 style(eslint-config): add rules to restrict the imports of element-plus (#20959)
* style(eslint-config): add rules to restrict the imports of element-plus

* chore: added validation for tsx files

* chore: revert the shell
2025-06-13 17:07:39 +08:00
sea
31f08e0954 test: use test fn replace sleep (#19977)
* test: use test fn replace sleep

* test: update
2025-02-26 16:21:04 +08:00
Liao-js
a116f0ef71 fix(hooks): [use-lockscreen] remove hiddenCls (#19429)
* fix(hooks): [use-lockscreen] remove hiddenCls

* fix(hooks): [useLockscreen] unit test

* test(hooks): [useLockscreen] should not cleanup when not all unmounted

* test(hooks): [useLockscreen] update test

* test(hooks): [useLockscreen] update test
2025-01-05 23:07:27 +08:00
qiang
d416dd74b0 feat(components): [input-tag] new component (#18885)
* feat(components): [input-tag] add input-tag component

* feat: styles

* test: add test

* docs: add docs

* docs: updata

* docs: uopdata

* docs: updata

* fix: optimize the style when input too long text

* feat: add draggable attribute

* fix: regain focus after dragged

* fix: regain focus on dragend

* refactor: useDragTag

* fix: style of disabled

* refactor: rename event name

* refactor: move useCalcInputWidth to hooks

* feat: add aria-label
2024-11-29 10:50:21 +08:00
chenweiyi
3eb734ccc4 feat(components): [skeleton] throttle supports values ​​as object (#17041)
* fix(components): [skeleton] `throttle` property not working

* fix: lint fix

* feat: add func & doc & test

* feat: remove test modify

* feat: increase document examples, improve document descriptions

* fix(components): [skeleton] `throttle` property not working

* fix: lint fix

* feat: add func & doc & test

* feat: remove test modify

* feat: increase document examples, improve document descriptions

* feat: 重构`useThrottleRender`钩子以提高代码可读性和效率

- 简化了对`throttle`参数的判断逻辑,通过`isNumber`函数判断是否为数字
- 将`leadingDispatch`和`trailingDispatch`函数合并为`dispatcher`函数,根据传入的类型判断执行逻辑
- 优化了`watch`回调函数,使用`dispatcher`函数替代重复的判断逻辑

* feat: 写法优化

* feat: 引入`isObject`函数替代原有的`typeof throttle === 'object'`判断方式

* feat: 优化骨架屏文档结构和示例

* feat: 完善文字描述和修改对应的文件名

* Update docs/en-US/component/skeleton.md

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/skeleton.md

Co-authored-by: btea <2356281422@qq.com>

* feat: Optimize code writing

* Update docs/en-US/component/skeleton.md

Co-authored-by: btea <2356281422@qq.com>

* Update docs/en-US/component/skeleton.md

* feat: modify doc

* feat: md

* feat: 补充 useThrottleRender 钩子的测试用例

* feat: 将 SkeletonThrottle 类型移动到hook中, 重命名为 ThrottleType 以提高通用性

---------

Co-authored-by: btea <2356281422@qq.com>
2024-11-07 21:31:16 +08:00
qiang
f2a65850b4 fix(hooks): [useId] SSR hydration error caused by id in vue@3.5+ (#18647) 2024-10-27 15:49:43 +08:00
kimverchan
29a21e86ba fix(hooks): PopperContainer cannot be recreated when body is recreated (#18121)
In the micro-front-end scenario, the body is recreated; Because PopperContainer determines that the
cache exists and does not recreate it, teleport cannot find the element to mount.

closed #18115,#17710

Co-authored-by: chenjingwen <chenjingwen@sie.com>
2024-09-03 20:25:15 +08:00
btea
d7e5f193cd fix: the disabled state should not trigger focus (#18108) 2024-08-31 19:48:48 +08:00
dopamine
8618a6bcd0 refactor: import shared utilities from @element-plus/utils (#18048)
chore: import shared utilities from `@element-plus/utils`
2024-08-29 09:04:03 +08:00
btea
19eaae7171 fix: the disabled state should not trigger focus (#18012)
* fix: the disabled state should not trigger focus

* fix: update

* chore: update

* chore: update test

* Update packages/hooks/__tests__/use-focus-controller.test.tsx

Co-authored-by: qiang <qw13131wang@gmail.com>

---------

Co-authored-by: qiang <qw13131wang@gmail.com>
2024-08-26 20:46:15 +08:00
qiang
949479699b refactor(hooks): determine the focus by event listening (#17719)
* refactor(hooks): determine the focus by event listening

* test: skip the focus test

* test: fix test

* feat(hooks): add beforeFocus

* fix: optimize blur

* chore(components): [mention] remove focus & blur
2024-08-07 18:35:30 +08:00
wzc520pyfm
e83a18ea27 test(hooks): add use-throttle-render test (#16499)
* test(hooks): add use-throttle-render test

* chore(hooks): [use-throttle-render] fix lint err

* chore(hooks): use sleep and concurrent

* fix(hooks): [use-throttle-render] fix import error

* fix(hooks): fix concurrent interfere
2024-04-15 18:03:02 +08:00
wzc520pyfm
84f49de955 test(hooks): [use-teleport] add no-client test (#16498) 2024-04-14 11:35:04 +08:00
kooriookami
1163d27f71 feat(components): add empty-values and value-on-clear props (#16361)
* feat(components): add empty values

* feat(hooks): update

* feat(components): update

* feat(components): update

* feat: update

* feat(components): update

* feat(components): update

* feat(components): update

* feat: update doc

* feat: add doc
2024-04-12 13:33:21 +08:00
wzc520pyfm
dd2a4f6546 test(hooks): add test for use-intermediate-render (#16395) 2024-04-11 20:38:51 +08:00
btea
d0eb6c3d1a feat: support node 18+ & update tsx and vitest (#16190)
* feat: support node 18+ & update tsx and vitest

* chore: update

* chore: remove

* fix: update dep

* test: fix autocomplete

* test: update

* test: update

* chore: update

* chore: update

* chore: update
2024-04-11 17:48:34 +08:00
wzc520pyfm
79b6235fdf test(hooks): [use-id] add debug-warn test (#16194) 2024-03-23 09:43:22 +08:00
qiang
1621b6a2d5 fix(hooks): SSR hydration error caused by z-index (#16175)
* fix(hooks): SSR hydration error caused by z-index

* test(hooks): test error

* chore: optimize name

* update

Co-authored-by: btea <2356281422@qq.com>

---------

Co-authored-by: btea <2356281422@qq.com>
2024-03-22 16:36:25 +08:00
小林不是coder
a778a9c6ee test(hooks): fix typo (#15113)
test(hooks): fix typo
2023-12-13 09:07:57 +08:00
qiang
351774f418 feat(components): [color-picker] add focus and blur event (#14244)
* feat(components): [color-picker] add focus blur event

* docs: updata
2023-10-11 14:13:59 +00:00
dopamine
ee705e5c2d chore: prevent warnings while running test cases (#12189)
* chore: prevent warnings while running test cases

* fix: overlook a test case
2023-07-22 23:19:33 +08:00
qiang
704399fadd fix(components): [input] lose focus when click suffix icon (#13264)
* feat(hooks): add useFocusController

* fix(components): [input] lose focus when click suffix icon

closed #13153, #13159

* refactor(hooks): use-focus-controller

* test: fix test

* test: update

* fix(theme-chalk): [input] add cursor style to the wrapper
2023-07-13 16:41:18 +08:00
qiang
6222629007 refactor(components): [message-box] remove useRestoreActive (#11646) 2023-05-28 09:57:29 +08:00
Dave
8306138159 fix(hooks): [use-delayed-toggle] clear timer when call onClose (#12056)
* fix(hooks): [use-delayed-toggle] clear timer when call onClose

* test(hooks): [use-delayed-toggle] coverage 100%
2023-03-16 22:29:24 +08:00
Jeremy
3eda7fc603 fix(components): [overlay] namespace issue (#11881)
* Fix namespace issue on global components overlay.
* Closes #11877
2023-03-07 22:51:31 +08:00
Jeremy
c2710d97d0 fix(components): [global-config] (#11847)
* fix(components): [loading]

* Remove inappropriate way of using injection in directives.

* chore: rewrite implementation

* fix(components): [global-config]

* Fix global config injection in global components.

* chore: fix format

* chore: remove .only modifier

* chore: fix failing tests
2023-03-06 23:20:21 +08:00
Jeremy
a30ae9d103 refactor(project): removing packages/tokens (#11769)
* refactor(tokens): remove tokens

* Remove tokens/breadcrumb.

* refactor(tokens): remove tokens/button

* refactor(tokens): remove tokens/carousel

* refactor(tokens): removing tokens/checkbox

* refactor(tokens): removing tokens/collapse

* refactor(tokens): removing tokens/dialog

* refactor(tokens): removing tokens/pagination

* refactor(tokens): removing tokens/radio

* refactor(tokens): removing tokens/row

* refactor(tokens): removing tokens/scrollbar

* refactor(tokens): removing tokens/slider

* refactor(tokens): removing tokens/tabs

* refactor(tokens): removing tokens/upload

* refactor(tokens): removing tokens/popper

* refactor(tokens): removing tokens/tooltip

* refactor(tokens): removing tokens/tooltip-v2

* refactor(tokens): removing tokens/date-picker

* refactor(project): removing tokens/experimentals

* Remove tokens/experimentals
* Remove package/tokens
* Remove tokens related parts

* refactor(project): removing packages/tokens completely

* chore: update import statement
2023-03-01 13:59:21 +08:00
Jeremy
d58149f4bb refactor(components): [config-provider] (#11749)
* refactor(components): [config-provider]

* Port useConfigProviders and tokens to components/.

* refactor(hooks): [global-config]

* Reimplement a few coupled hooks.
* Remove hooks/globa-config and tokens/&.
* Update import paths based on the changes.

* chore: fix a failing test case
2023-02-28 10:35:56 +08:00
Jeremy
11925c8231 refactor(tokens) - [form] (#11743)
* refactor(tokens): [form] - remove tokens/form

* Move content in tokens/form to components/form.
* Replace token imports in components/form.

* chore: remove form/tokens and replace imports

* refactor(components): [form/form-item]

* Move `useForm` related hooks to components/form
* Replace references to reduce circular dependencies.
2023-02-27 13:19:20 +08:00
Jeremy
ec161eaef5 feat(hooks): [use-popper] (#10983)
* feat(hooks): [use-popper]

* Implement use-popper

* chore: code adjustment

* test: add test for use popper

* test: finish test for use popper

* fix: popper API

* chore: remove unused imports

* chore: refine code

* feat: export popper from hooks package

* chore: enhanced how to process default value

Co-authored-by: JeremyWuuuuu <15975785+JeremyWuuuuu@users.noreply.github.com>
2022-12-19 21:46:16 +08:00
qiang
b456125431 fix(components): [tooltip] SSR hydration error caused by random ID (#10541) 2022-11-21 14:10:52 +08:00
zz
51a3c454ea fix(hooks): [use-popper-container] fix namespace (#9655) 2022-09-06 14:51:05 +08:00
Xc
fda97e27dd fix(hooks): [useLockscreen] close shake (#9610)
* fix(hooks): [useLockscreen] close shake

* fix(hooks): [useLockscreen] remove unused

* fix(hooks): [useLockscreen] unit test
2022-09-03 22:57:37 +08:00
qiang
c28e1cfa42 fix(hooks): [use-namespace] exclude invalid CSS variables (#8905)
* fix(hooks): [use-namespace] exclude invalid CSS variables

* test(hooks): [use-namespace] add test
2022-07-28 22:01:22 +08:00
zz
60fdcfe946 fix(hooks): [use-locale] fix type error (#8733) 2022-07-11 19:25:58 +09:00
zz
5399d7c882 fix(hooks): [use-attrs] fix type error (#8558)
* fix(hooks): [use-attrs] fix type error
2022-07-10 18:02:40 +08:00
zz
b50e21015c fix(hooks): [use-floating] fix type error (#8727) 2022-07-09 18:15:53 +09:00
zz
58bbef942a fix(hooks): [use-form-item] fix type error (#8726) 2022-07-09 17:49:07 +09:00
三咲智子
7097940f4a refactor: add ts-nocheck and check all files (#8401) 2022-06-22 08:04:42 +08:00
opengraphica
42ff59fc39 feat(components): [date-picker] work with modal focus trap; a11y controls and attributes (#7598)
* feat(components): [date-picker] a11y controls and attributes

* feat(components): [date-picker] keyboard controls for picker

* feat(components): [date-picker] unit test complete

* feat(components): [date-picker] remove immediate watch date
2022-05-10 21:51:17 +08:00
Serendipity96
9b23b1c9ec feat(components): [input] add input formatter (#6876)
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
2022-04-23 22:48:21 +08:00
Delyan Haralanov
34f6f71042 test: enable clearMocks in vitest config (#7263) 2022-04-20 17:02:44 +08:00
三咲智子
1d13ebb05d feat: drop jest (#7248)
* feat: drop jest

* test: remove ssr

* test: rename

* chore: update tsconfig
2022-04-19 16:51:44 +08:00
Delyan Haralanov
de0ee53cf0 test(components): switch all components to vitest (#7205)
Co-authored-by: 三咲智子 <sxzz@sxzz.moe>
2022-04-19 12:46:57 +08:00
三咲智子
b2bfb6f159 fix: vitest 2022-04-12 01:38:15 +08:00
JeremyWuuuuu
0ff293b3e9 chore(hooks): [floating] fix eslint warnigns (#6827)
- Update importing order
2022-03-25 17:39:01 +08:00
JeremyWuuuuu
da992a97b2 feat(hooks): [floating] add use-floating (#6822)
* feat(hooks): [floating] add use-floating

- Implement floating-ui vue with composition API
- Add test for the hook.

* Update coordinate type
2022-03-25 15:43:54 +08:00