Releases: lpotthast/leptonic
Releases · lpotthast/leptonic
v0.5.0
Leptonic now supports Leptos in version 0.6!
Changed
- Leptos dependencies were update to v0.6.
- The
Icon' component no longer wraps an Icon from
leptos-icons. It now expects v0.3
icondata` icons. Documentation of the component was updated.
Added
- Dependency on the
icondata
crate. Leptonic provides a re-export throughuse leptonic::prelude::*;
. You do not have to depend on this yourself.
Removed
- Dependency on the
leptos-icons
crate. You can remove the dependency from you Cargo.toml as well if you have not used it outside of the Leptonic context.
Compare: v0.4.0...v0.5.0
v0.4.0
Leptonic now supports server-side-rendering (SSR). This book is now deployed with SSR enabled.
The leptonic-template-ssr and leptonic-template-csr templates were created. Use them to get started quickly.
Changed
- Getting started instructions were consolidated.
- Installation instructions are now much more straight-forward.
- Modals are now SSR compatible. The
ModalFn
component was dropped. If you used it, just rename all occurrences toModal
. If you previously usedModal
, you might see some 'requires Fn but is FnOnce error's. Storing values moved intoModal
s children throughstore_value
should be a quick fix. - Tabs are now SSR compatible. Rendering order changed to make this possible. This should not affect anyone.
- Toggles are now SSR compatible. Rendering of the (optional) icons changed. This should only affect you if custom styling is in play.
- Tables are now SSR compatible. Components were renamed to
TableHeader
,TableBody
,TableRow
,TableHeaderCell
andTableCell
. - The
build.rs
script, which previously had to be create by the consumer is now longer required. It was moved into leptonic itself and will automatically take care of copying files required for a build. - The
Code
block component now has aCopy to clipboard
button (thanks to https://github.com/wt). - A
SelectOption
no longer requires to beEq
. - The
uuid
dependency was bumped to version 1.6. - A
RwSignal
can act as anOut
type - Modals now support the
on_escape
prop, letting you handle escape key presses. - The Tiptap-Editor functionality is now gated through the new
tiptap
feature. Enabling it will alter the build to automatically include required JS files.
Fixed
- Fixed a bug which led to buttons not getting disabled properly.
What's Changed
- Allow converting RwSignal to Out by @Jobarion in #21
- Add a clipboard copy button to the block code component. by @wt in #23
- docs: Remove (ignored) parameter from "title" closure of Alert by @ja-he in #31
- Add search_filter_provider to select components by @tordynnar in #24
- Fix nesting of multiple tabs by @mondeja in #28
New Contributors
- @Jobarion made their first contribution in #21
- @wt made their first contribution in #23
- @ja-he made their first contribution in #31
- @tordynnar made their first contribution in #24
- @mondeja made their first contribution in #28
Cmpare: v0.3.0...v0.4.0
v0.3.0
Added
- The
Consumer
type. UseConsumer<In>
when you would otherwise writeCallback<In, ()>
. - The
Producer
type. UseProducer<Out>
when you would otherwise writeCallback<(), Out>
. - The
ViewProducer
type. UseViewProducer
when you would otherwise writeCallback<(), leptos::View>
. - The
ViewCallback
type. UseViewCallback<In>
when you would otherwise writeCallback<In, leptos::View>
.
Changed
- Updated to leptos 0.5.1. No more
cx
! - The
render_option
prop for select inputs no longer requires you to call.into_view()
on whatever your closure returns. - Collapsibles now use the slot approach.
Fixed
- Fixed a bug which prevented progress bars in their indeterminate state to animate.
Removed
- The
Callback
andCallable
types moved into leptos itself! They should still be accessible on most use-sites as they are now imported withuse leptos::*
, which should already be present in most places the leptonic Callback was used before.
v0.2.0
Added
- Added the
Out
type. An enum abstracting overCallback
s andWriteSignal
s. Components can use this type when it is equally likely that a user will provide either of the previously mentioned types. In case of the WriteSignal, the user just wants a new value to be stored. In case of a callback, the user wants fine control over how a new value is handled. The input component is the first one using it, as mentioned in theChanged
section. - The Select, OptionalSelect and Multiselect components now accept a
class
prop with which custom classes can be attached to a rendered element. - The
Kbd
component together withKbdShortcut
, displaying keyboard keys and shortcuts. - The
Chip
component now accepts customid
,class
andstyle
props. - You can now use the new
--slider-bar-background-image
CSS variable to style the bar of aSlider
with more control. Defaults tonone
.--slider-bar-background-color
is still the preferred way to style the bar if no image is needed. The image property will overwrite the color. - Also added
--slider-range-background-color
,--slider-range-background-image
,--slider-knob-border-width
,--slider-knob-border-color
,--slider-knob-border-style
,--slider-knob-background-color
and--slider-knob-halo-background-color
. - The background color/image of the selection of a
Slider
can now be styled using--slider-range-background-color
, defaulting tovar(--brand-color)
, and--slider-range-background-image
, defaulting tonone
. - Initial version of a
ColorPicker
component.
Changed
- The DateSelector components on_change prop now takes a Callback instead of a generic function.
- Buttons of type
outlined
now use --button-outlined-[color]-... variables for their styling. - Buttons of type
filled
now use --button-filled-[color]-... variables for their styling. - Buttons of type
outlined
and colorprimary
now use a dark text color, contrasting the default bright background. - When using an input of type
Number
, you now have to supply optionalmin
,max
andstep
values which are propagated to the underlying input element. - The Input
set
prop is now optional. - The Input
set
prop is no longer generic. It now expects anOut<String>
, which can either be aWriteSignal
or a customCallback
. - The Slider and RangerSlider
set_value
props are no longer generic. They now expect anOut<f64>
, which can either be aWriteSignal
or a customCallback
. - The Toggle
on_toggle
prop is now calledset_value
and is no longer generic. It now expect anOut<bool>
, which can either be aWriteSignal
or a customCallback
. - The TiptapEditor
set_value
prop is no longer generic. It now expect anOption<Out<TiptapContent>>
, which can either be aWriteSignal
or a customCallback
. - All components using custom attributes now render them with a "data-" prefix, allowing them to be standard-compliant and distinguishable from well-known / standard attributes.
leptonic-theme
styling changed appropriately. - Prop
max
of the ProgressBar is now a MaybeSignal. - Prop
progress
of the ProgressBar is now a MaybeSignal. - Prop
title
of the Alert is now a Callback instead of a generic Fn closure. Expect the now necessarycreate_callback(move |()| {})
when instantiating a component with a callback prop to become a simplemove || {}
after a migration to leptos 0.5! - The Slider
step
prop is now optional, making continuous sliders with maximum precision easier to set up. - The
Input
component was split intoTextInput
,PasswordInput
andNumberInput
. Theirlabel
prop was renamed toplaceholder
. - TheInputType
enum was removed. - All
Select
components now require asearch_text_provider
prop. TheSelectOption
trait no longer enforcesDisplay
to be implemented.
Fixed
- A button with variants now properly respects its disabled state.
- A button with variants now only triggers one of its actions (either main or variant) per interaction.
- Buttons of type
flat
and colorinfo
now receive correct styling. - The installation instructions now include a section describing how to enable the required web_sys_unstable_apis opt-in.
v0.1.0
This is the initial release of leptonic targeting the current 0.4 release of leptos
. One or two patch releases may come, but most new work will be on the leptos-0.5
branch of this repo. When leptos 0.5 is released, the 0.2 release of leptonic will follow.
New Features
Added utilities:
- Callback types
- OptionalMaybeSignal type
- Global event listener contexts
Added components:
- Root component
- Skeleton component and styles
- Stack component and styles
- Grid component and styles
- Separator component and styles
- Tab components and styles
- Collapsible components and styles
- AppBar components and styles
- Drawer components and styles
- Button component and styles
- Input component and styles
- Date selector component and styles
- Slider component and styles
- Select component and styles
- Toggle component and styles
- Alert component and styles
- Toast component and styles
- Modal components and styles
- Progress component and styles
- Popover component and styles
- Chip component and styles
- Icon component and styles
- Link component and styles
- Anchor component and styles
- Typography components and styles
- Transition components and styles