Jason Lee
ed132ad55e
Add more example to Label.
2024-07-24 18:56:32 +08:00
Jason Lee
c538a231c1
Fix Label text_align.
2024-07-24 18:39:13 +08:00
Jason Lee
6b019e3954
Impl InteractiveElement, StatefulInteractiveElement for Scrollable.
2024-07-24 17:59:44 +08:00
Jason Lee
030a706a4c
Refactor ScrollView into scrollable fluent method. ( #68 )
2024-07-24 17:50:50 +08:00
Jason Lee
7305967c09
Impl Scrollable for Focusable<E>, Stateful<E>.
2024-07-24 17:01:15 +08:00
Jason Lee
d63e256f19
Update Label masked char ( #67 )
2024-07-24 16:35:28 +08:00
Jason Lee
22a15c7dcc
Update scroll view ( #66 )
2024-07-24 15:41:20 +08:00
Jason Lee
4edf1e3427
Update ScrollView to let content is FnOnce. ( #65 )
2024-07-24 11:38:30 +08:00
Jason Lee
e0103d1d58
Add CI ( #62 )
2024-07-24 10:39:19 +08:00
Jason Lee
d60a1122d4
Scroll to top when list have searched. ( #64 )
2024-07-24 10:09:12 +08:00
Floyd Wang
764e7486e7
Set the default cleanable to false for new dropdown ( #63 )
2024-07-24 10:07:11 +08:00
Jason Lee
b4862082f1
Improve list item ( #61 )
2024-07-23 22:08:21 +08:00
Floyd Wang
1b715c431f
Fix new dropdown selected_index not work ( #60 )
2024-07-23 19:18:39 +08:00
Jason Lee
db14f0a2e5
Add pattern and validate to Input for limit input format. ( #59 )
2024-07-23 15:36:08 +08:00
Jason Lee
3ec35929ae
Add font-weight methods to styled: font_light, font_semibold, font_bold ... ( #58 )
...
https://tailwindcss.com/docs/font-weight
2024-07-23 14:57:16 +08:00
Jason Lee
30f34dc780
Fix button icon color support ( #57 )
2024-07-23 13:45:34 +08:00
Jason Lee
652efd187c
Update list to save the task on the struct.
2024-07-23 10:51:11 +08:00
Jason Lee
80bdf20376
Export set_query and query method to List.
2024-07-23 10:15:38 +08:00
Jason Lee
8ff4658c96
Update Icon again, let new to support impl Into<Icon>.
2024-07-23 10:02:34 +08:00
Jason Lee
8609968ac2
Improve Icon::new to support impl Into<IconName>
2024-07-23 09:56:57 +08:00
Jason Lee
faa16fb660
Add ScrollView ( #56 )
2024-07-23 09:38:23 +08:00
Jason Lee
5034152f21
Improved Input prefix, suffix with a builder to support Element. ( #54 )
...
- Add loading to List query input and changed perform_search now return
a Task.
2024-07-22 15:30:07 +08:00
Jason Lee
4687a18ee4
Add to support Input history for undo & redo ( #53 )
...
https://github.com/user-attachments/assets/b898dc08-8e99-4247-8dc3-d5752d1bc2f3
Ref https://github.com/huacnlee/gpui-component/issues/27
2024-07-22 11:36:54 +08:00
Jason Lee
ca08be7038
Fix Popup modal mouse move crossed to back layer. ( #51 )
2024-07-20 02:39:27 +08:00
Jason Lee
e54d1f600b
Add to masked Label and support children to Button ( #50 )
...
https://github.com/user-attachments/assets/9583ce15-b801-45f9-aafb-54f0ecdf7dc9
- Add masked mode to Label.
- Add to support any children to Button.
- Fix Popover to support selected state style.
2024-07-19 18:54:16 +08:00
Jason Lee
a69d30be6a
Add cx.theme auto import to support WindowContent.
2024-07-19 11:32:25 +08:00
Jason Lee
613cfebb65
Improve ActiveTheme trait to impl ViewContent and ModelContext to support auto import. ( #49 )
2024-07-19 11:20:45 +08:00
Jason Lee
e95971624e
Fix windows build.
2024-07-18 23:29:22 +08:00
Floyd Wang
e4b9e008ba
Use cx.quit() instead of std::process::exit(0) ( #47 )
2024-07-18 19:02:39 +08:00
Floyd Wang
653222db73
dropdown: Use event instead of callback ( #46 )
...
* Rule: use event for `Render`, use callback for `RenderOnce`
2024-07-18 18:40:32 +08:00
Jason Lee
bac5392e0a
Refactor Slider, Input, InputOtp to use EventEmiter to emit change ( #45 )
2024-07-18 18:38:58 +08:00
Jason Lee
f6146220e4
Add WebView ( #2 )
...
- https://github.com/huacnlee/zed/pull/6
- https://github.com/zed-industries/zed/pull/13730
2024-07-18 18:00:23 +08:00
Floyd Wang
91e123e942
input: TextEvent Add Focus & Blur events
2024-07-18 17:48:57 +08:00
Floyd Wang
07a1f3099e
dropdown: Add on change callback
2024-07-18 16:50:30 +08:00
尹吉峰
4ccbe9bd71
Update Dropdown ( #42 )
2024-07-18 16:12:12 +08:00
Jason Lee
683b22c4a4
Fix Resizable drag move position. #28 ( #41 )
2024-07-18 00:02:59 +08:00
Jason Lee
0fdf7be40d
Fix table scrollbar display layer.
2024-07-17 23:19:03 +08:00
Jason Lee
b8a7d6a2dd
Change InputOpt default masked: false and publish masked method.
2024-07-17 18:57:19 +08:00
Jason Lee
c7336fd5ea
Add InputOtp ( #40 )
...
https://github.com/user-attachments/assets/c92da4e7-21de-436f-968d-7cb47fa31aed
2024-07-17 18:49:41 +08:00
Jason Lee
d71b697f41
Add Slider ( #39 )
...
https://github.com/user-attachments/assets/a1799cd9-45af-413c-b32b-c60fb1b8d586
2024-07-17 16:01:27 +08:00
Jason Lee
3aaa348fbb
Add label support to horizontal Divider.
2024-07-17 14:11:17 +08:00
Jason Lee
ac3d6760ed
Fix vertical Divider
2024-07-17 13:59:20 +08:00
Jason Lee
3467522714
Add double click to select word support for Input. ( #38 )
...
Continue #27
2024-07-17 11:41:04 +08:00
Jason Lee
36411750ee
Fix to limit change when Input is disabled.
...
Add clean button to List query input.
Add ButtonRouneded with px support.
2024-07-17 10:47:25 +08:00
Jason Lee
702863eb83
Add overflow scroll support to Input. ( #37 )
...
Continue #27
- Fix cut and paste invalid replace range.
- Add `Shift-Home`, `Shift-End` for select to home or end.
## Show case
https://github.com/user-attachments/assets/d99c56e3-5241-46e2-b3ac-f72ef962b0b5
2024-07-17 10:31:17 +08:00
Jason Lee
07e1296916
Add cleanable to Input ( #36 )
2024-07-16 19:44:16 +08:00
Jason Lee
ce7c1a3a34
Add Small, Large size support to Input and Dropdown and let them use same height. ( #35 )
...
- Add `Dropdown::string_list` to use `Vec<SharedString>` to create
dropdown for easy use.
- Add `input_px`, `input_py`, `input_h` trait methods to `Styled`
element.
2024-07-16 15:14:12 +08:00
Jason Lee
2b184ca8d5
New Scrollbar ( #33 )
...
https://github.com/user-attachments/assets/30d890bc-49cc-4abe-8652-387ddbb73198
2024-07-16 12:00:51 +08:00
Floyd Wang
b1bb22fd1d
Fix clippy warning
2024-07-15 11:42:14 +08:00
Jason Lee
59603ab83b
Add min_w, max_w to PopupMenu, and default min_w: 120, max_w: 500
2024-07-15 09:15:12 +08:00
Jason Lee
4ca98029dd
Fix placeholder style for Input ( #32 )
...
https://github.com/huacnlee/gpui-component/issues/27
2024-07-13 09:53:03 +08:00
Jason Lee
35cec4cf5c
Update to use better implementation of selection support for Input. ( #31 )
...
Co-authored-by: Conrad Irwin <conrad@zed.dev>
2024-07-13 09:40:42 +08:00
Jason Lee
41a83e6f6f
Improve Input ( #29 )
...
Continue #27
- Fix selection color in dark mode.
- Allow to continue selection, even mouse is out of the input.
- Pause cursor blinking when keep typing.
https://github.com/user-attachments/assets/ce9e722c-5c47-4daa-b2ba-cbe1680c4932
2024-07-13 00:34:55 +08:00
Jason Lee
0d6d1c95d0
Fix ProgressBar example to avoid over the range.
2024-07-12 23:27:37 +08:00
Jason Lee
21f0e1c78a
Add mouse selection support to Input ( #26 )
...
Done reset mouse support of
https://github.com/zed-industries/zed/pull/13534
https://github.com/user-attachments/assets/71b1d4e4-eef7-4746-8400-b2e3812e5ad4
2024-07-12 22:41:18 +08:00
Floyd Wang
138fc9c7b5
Progress use positioning layout
2024-07-12 18:25:09 +08:00
Jason Lee
7c99584862
Add Indicator ( #25 )
...
https://github.com/user-attachments/assets/cd6410ca-e1c7-459e-8455-d76506b6d305
2024-07-12 17:33:05 +08:00
Floyd Wang
58dbf88af7
Add Radio ( #24 )
2024-07-12 16:37:31 +08:00
Jason Lee
2401d5d5a4
Add ResizablePanel ( #22 )
...
https://github.com/user-attachments/assets/b4067c1d-0ef0-4de4-bd7a-55f446d35ff0
2024-07-12 15:24:54 +08:00
Jason Lee
9e935bed56
Change switch use mouse_down to handle event fix Windows switch theme support.
2024-07-11 21:52:07 +08:00
Floyd Wang
e1aed0a03d
Add Progress ( #21 )
2024-07-11 19:10:46 +08:00
Jason Lee
56eb7147d9
Add a batch of color methods. ( #20 )
...
https://ui.shadcn.com/colors#colors
2024-07-11 18:16:57 +08:00
Jason Lee
eb43c78cea
Add to support open Popover as a child window. ( #18 )
...
## Goal
Change to let Popup elements open into a window, to make sure the Popup
windows, panels, menus render top than the WebView.
Then we can embed wry or other webview into GPUI.
https://github.com/huacnlee/gpui-component/assets/5518/ce005456-088f-4298-bf5d-2642cf96faff
----
This is also like other software, they are also used in child window to
render the menus, popups.
- https://github.com/huacnlee/gpui-component/pull/2
- https://github.com/zed-industries/zed/pull/13730
## Todos
- [x] Multiple display window position.
- [x] Windows transparent background. (No transparent, just render a
correct window border)
- [x] Disable window resize on Windows.
- [ ] Handle Menu action.
- [x] Provided `popover` or `window` two mode to uses.
2024-07-11 16:20:26 +08:00
Floyd Wang
4d9077fe85
Rename ui::stock to ui::stack
2024-07-09 16:25:07 +08:00
Floyd Wang
75e4451764
Add text align property for Label ( #19 )
2024-07-09 15:56:41 +08:00
Jason Lee
310e5e3cde
Avoid PickerStory clone vec.
2024-07-08 23:22:08 +08:00
Floyd Wang
cab6dc9f6e
Update the drag split edge fraction
2024-07-08 16:46:54 +08:00
Floyd Wang
84de8a88a4
Fix resize dock not work
2024-07-08 11:19:20 +08:00
Jason Lee
a02c981b74
table: Fix incorrect column selection bg render.
2024-07-08 09:47:13 +08:00
Jason Lee
9b51a5b998
Remove picker, add list instead. ( #17 )
2024-07-07 02:07:17 +08:00
Jason Lee
3c52d5f428
Rename ScrollableHandleElement to ScrollableMask.
2024-07-06 22:31:51 +08:00
Jason Lee
ac789b2379
Add Table ( #16 )
...
https://github.com/huacnlee/gpui-component/assets/5518/8603cbcc-c416-4d10-84a0-8cfe2e021e1a
2024-07-06 21:01:16 +08:00
Jason Lee
6eb63dfd28
Removed Button shadow in Light mode for ghost style button.
2024-07-05 11:26:11 +08:00
Jason Lee
c925a6aa61
Add ButtonStyle::Outline, ButtonStyle::Glost
2024-07-05 00:18:36 +08:00
Jason Lee
acbc029eed
Add PopupMenu ( #15 )
...

2024-07-05 00:04:34 +08:00
Jason Lee
3ccadf6cc3
Improve focus ( #14 )
...
- Add `FocusableCycle` trait to help impl cycle focus.
- Add `outline` style to StyledExt.
2024-07-04 14:05:14 +08:00
Jason Lee
24348ec874
Fix TitleBar
2024-07-04 10:14:44 +08:00
Jason Lee
f78d50b5e9
Update dock layout
2024-07-04 01:05:32 +08:00
Jason Lee
19930e46db
Add SvgImg to render svg, and with a Chart example ( #13 )
...
https://github.com/huacnlee/gpui-component/assets/5518/576da9f9-4bff-4faf-a17e-19860cf6f948
2024-07-03 19:09:59 +08:00
Floyd Wang
b8ffa12a90
Fix typo
2024-07-03 16:56:41 +08:00
Jason Lee
537dbfab9e
Fix Input avoid copy, cut a empty into into clipboard.
2024-07-02 17:35:23 +08:00
Jason Lee
88dcca590d
Simple Tooltip usage.
2024-07-02 00:13:07 +08:00
Jason Lee
f2703122b8
Move title_bar, util into workspace.
2024-07-01 23:51:47 +08:00
Jason Lee
f84e8b82ef
Add prefix and suffix to Input. ( #12 )
...
<img width="393" alt="image"
src="https://github.com/huacnlee/gpui-component/assets/5518/5df8d269-ea04-4d42-95c5-a3358cdee9b5 ">
2024-07-01 23:30:06 +08:00
Jason Lee
cbbd20867f
Add Icon Button support. ( #11 )
...
When the Button have no label present, it will use the Icon mode.
<img width="891" alt="image"
src="https://github.com/huacnlee/gpui-component/assets/5518/ca6240d5-02c8-4201-9a79-4afdf9938dd8 ">
2024-07-01 21:32:03 +08:00
Jason Lee
f9e075113e
Update README
2024-07-01 15:46:11 +08:00
Jason Lee
502d4df135
Add Dock & Panel ( #10 )
...
https://github.com/huacnlee/gpui-component/assets/5518/51622a5e-f51d-4ede-8cae-04cae703f8aa
2024-07-01 14:20:56 +08:00
Jason Lee
d183bacc73
Add Scrollbar ( #9 )
...
https://github.com/huacnlee/gpui-component/assets/5518/5e4b7809-f2d0-4e45-a0f2-b9578323a11e
2024-06-30 23:31:16 +08:00
Jason Lee
29dc803014
Fix dropdown selected icon.
2024-06-30 19:17:52 +08:00
Jason Lee
6503e00b69
Fix dropdown height.
2024-06-30 19:04:53 +08:00
Jason Lee
586569f241
Add a List example ( #8 )
...
https://github.com/huacnlee/gpui-component/assets/5518/2554bb6c-94f6-4808-87d6-9a04d7421b26
2024-06-30 16:56:23 +08:00
Jason Lee
93779164f0
Rewrite Popover ( #7 )
...
https://github.com/huacnlee/gpui-app/assets/5518/dfe0ba05-ecb7-4604-a057-56daed53c16c
2024-06-29 23:49:59 +08:00
Jason Lee
329b116980
Use Element to paint DropdownMenu to fix layer priority.
2024-06-29 18:04:47 +08:00
Jason Lee
08fc62ada0
Fix Windows Title button hover, active color.
2024-06-29 16:17:34 +08:00
Jason Lee
2785f38eeb
Add to blinking currsor support for Input.
2024-06-29 15:38:02 +08:00
Jason Lee
ddadcda140
Improve Picker details.
2024-06-29 14:39:15 +08:00
Jason Lee
3288270b49
Add Popover ( #6 )
2024-06-29 10:03:59 +08:00
Jason Lee
a3c14e1515
Sync with system appearance.
2024-06-29 09:06:52 +08:00
Jason Lee
3e8421c495
Fix Icon default use theme foreground and allows to override.
2024-06-29 03:10:14 +08:00
Jason Lee
3c4891cb69
Add icon support to Button.
2024-06-29 02:37:22 +08:00
Floyd Wang
a5aea36f75
Add Tooltip ( #5 )
2024-06-28 18:03:28 +08:00
Floyd Wang
11901dc1e4
Add Notification ( #4 )
2024-06-28 14:08:06 +08:00
Jason Lee
5393580789
Update Dropdown icon to ChevronsUpDown
2024-06-28 10:19:24 +08:00
Jason Lee
e0050c5ebe
Fix light theme
2024-06-28 10:11:00 +08:00
Jason Lee
5d3f19bdd8
Fix Label text_size support.
2024-06-28 10:11:00 +08:00
Jason Lee
63076725f2
Add up, down, enter, esc keybinding for Dropdown.
2024-06-28 10:11:00 +08:00
Jason Lee
720672b0e2
Update Input, Button, Dropdown based on theme.radius
2024-06-28 10:11:00 +08:00
Jason Lee
1a54a47ec8
Update foreground color in dark mode.
2024-06-28 10:11:00 +08:00
Jason Lee
daf4e713d1
Fix ListItem check icon.
2024-06-28 10:11:00 +08:00
Jason Lee
cb8067d89b
Fix Checkbox story.
2024-06-28 10:11:00 +08:00
Jason Lee
1d1803f348
Fix Input keybinding on Windows.
2024-06-28 10:11:00 +08:00
Jason Lee
910f27a66a
Add Dropdown.
2024-06-28 10:11:00 +08:00
Jason Lee
5590416c4b
Improve Picker to have on_mouse_click_out to dissmis.
2024-06-27 19:33:24 +08:00
Jason Lee
f50d4b351c
Set default text_color for workspace.
2024-06-27 19:32:56 +08:00
Jason Lee
10564f5140
Update KeyBinding for Picker.
2024-06-27 18:20:24 +08:00
Jason Lee
8489a3f7f7
Fix Picker to search filter.
2024-06-27 18:07:08 +08:00
Jason Lee
659f00c9a4
New input ( #1 )
...

Ref: https://github.com/zed-industries/zed/pull/13534
2024-06-27 15:36:07 +08:00
Jason Lee
a90f51d165
Fix ui dependency
2024-06-27 10:34:03 +08:00
Jason Lee
b562708318
windows: Fix title bar font for Windows 10.
2024-06-26 19:06:54 +08:00
Jason Lee
672240d750
Fix picker_story to display selected value.
2024-06-26 19:01:52 +08:00
Jason Lee
085b8e578b
Add ListItem and update PickerStory base on it.
2024-06-26 18:31:50 +08:00
Jason Lee
7bbc28b98e
Add small size for Switch.
2024-06-26 18:12:47 +08:00
Jason Lee
d5f446a351
Add to support no appearance for TextField and fix invalid key handle.
2024-06-26 17:47:42 +08:00
Jason Lee
4c278bfabc
Add span method, fix primary button text color
2024-06-26 17:25:26 +08:00
Jason Lee
a4601782f8
Add keyboard support for Picker.
2024-06-26 16:20:21 +08:00
Jason Lee
5c93282e1d
Add Picker
2024-06-26 16:16:08 +08:00
Jason Lee
1f21469e7b
Split story into a crate.
2024-06-26 14:38:06 +08:00
Jason Lee
4945be5a36
Chnage TextField to impl Render
2024-06-26 13:43:28 +08:00
Jason Lee
e4fcd24382
Add label to Switch
2024-06-26 10:25:51 +08:00
Jason Lee
2f2203b45b
Add Switch.
2024-06-25 23:01:29 +08:00
Jason Lee
4ae4cd615b
Fix windows max, min, close icon.
2024-06-25 21:35:25 +08:00
Jason Lee
5e4a16b62d
Fix windows startup.
2024-06-25 21:28:08 +08:00
Jason Lee
08a99217a2
Add TabBar
2024-06-25 19:07:05 +08:00
Jason Lee
8440df938a
Add checkbox, title_bar.
2024-06-25 17:16:04 +08:00
Jason Lee
22674e84c4
Fix input focus border.
2024-06-24 19:26:36 +08:00
Jason Lee
5c1f71a176
Add border to button
2024-06-24 19:14:11 +08:00
Jason Lee
3a745d2abe
Add invert method to Hsla.
2024-06-24 19:01:11 +08:00
Jason Lee
dad6f4c431
Update input new method
2024-06-24 17:39:56 +08:00
Jason Lee
94cb714ebf
Update to use shadcn ui theme
2024-06-24 15:39:26 +08:00
Jason Lee
11af9900eb
Fix stories switch.
2024-06-24 14:27:07 +08:00
Jason Lee
b70f5d6dc7
Add cursor_layout
2024-06-24 11:21:30 +08:00
Jason Lee
ae5e4f6149
Update input
2024-06-22 21:47:04 +08:00
Jason Lee
ae8c0ab657
Update input
2024-06-22 17:42:42 +08:00
Jason Lee
b503d5f7e3
Add input
2024-06-14 19:47:03 +08:00
Jason Lee
537edcae99
Add input
2024-06-14 10:20:29 +08:00
Jason Lee
0d1b1aa784
Add more example for buttons.
2024-06-13 22:12:10 +08:00
Jason Lee
9ffea5798e
First commit, with Button UI.
2024-06-13 21:46:28 +08:00