Changelog#

v0.6.0 (main branch)#

Overview

Added:

  • `Checkbox` component, styling and documentation.
  • `Radio` and `RadioGroup` components, styling and documentation.

Changed:

  • Reworked the `Popover` component. It now allows for much greater flexibility. Documentation was updated.

Removed:

  • Buttons no longer support `variations`. They resulted in non compliant code.
  • The `OptionalSignal` prop type, which was never used in our public API. You may want to use `OptMaybeSignal` instead.

0.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 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.
  • Lepton

0.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 to `Modal`. If you previously used `Modal`, you might see some 'requires Fn but is FnOnce error's. Storing values moved into `Modal`s 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.

0.3.0#

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.

0.2.0#

Added:

  • Added the `Out` type. An enum abstracting over `Callback`s and `WriteSignal`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 the `Changed` section.
  • The Select, OptionalSelect and Multiselect components now accept a `class` prop with which custom classes can be attached to a rendered <leptonic-select> 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.

0.1.0#

Initial release.

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