Skip to content

Releases: lpotthast/leptonic

v0.5.0

19 Feb 11:58
b5517ec
Compare
Choose a tag to compare

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 through use 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

19 Feb 11:56
Compare
Choose a tag to compare

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 to Modal. If you previously used Modal, you might see some 'requires Fn but is FnOnce error's. Storing values moved into Modals children through store_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 and TableCell.
  • 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 a Copy to clipboard button (thanks to https://github.com/wt).
  • A SelectOption no longer requires to be Eq.
  • The uuid dependency was bumped to version 1.6.
  • A RwSignal can act as an Out 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

Cmpare: v0.3.0...v0.4.0

v0.3.0

24 Oct 20:06
Compare
Choose a tag to compare

Added

  • The Consumer type. Use Consumer<In> when you would otherwise write Callback<In, ()>.
  • The Producer type. Use Producer<Out> when you would otherwise write Callback<(), Out>.
  • The ViewProducer type. Use ViewProducer when you would otherwise write Callback<(), leptos::View>.
  • The ViewCallback type. Use ViewCallback<In> when you would otherwise write Callback<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 and Callable types moved into leptos itself! They should still be accessible on most use-sites as they are now imported with use leptos::*, which should already be present in most places the leptonic Callback was used before.

v0.2.0

05 Sep 07:02
Compare
Choose a tag to compare

Added

  • Added the Out type. An enum abstracting over Callbacks and WriteSignals. 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 the Changed 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 with KbdShortcut, displaying keyboard keys and shortcuts.
  • The Chip component now accepts custom id, class and style props.
  • You can now use the new --slider-bar-background-image CSS variable to style the bar of a Slider with more control. Defaults to none. --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 to var(--brand-color), and --slider-range-background-image, defaulting to none.
  • 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 color primary now use a dark text color, contrasting the default bright background.
  • When using an input of type Number, you now have to supply optional min, max and step 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 an Out<String>, which can either be a WriteSignal or a custom Callback.
  • The Slider and RangerSlider set_value props are no longer generic. They now expect an Out<f64>, which can either be a WriteSignal or a custom Callback.
  • The Toggle on_toggle prop is now called set_value and is no longer generic. It now expect an Out<bool>, which can either be a WriteSignal or a custom Callback.
  • The TiptapEditor set_value prop is no longer generic. It now expect an Option<Out<TiptapContent>>, which can either be a WriteSignal or a custom Callback.
  • 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 necessary create_callback(move |()| {}) when instantiating a component with a callback prop to become a simple move || {} 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 into TextInput, PasswordInput and NumberInput. Their label prop was renamed to placeholder. - The InputType enum was removed.
  • All Select components now require a search_text_provider prop. The SelectOption trait no longer enforces Display 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 color info 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

03 Aug 10:47
Compare
Choose a tag to compare

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