Skip to content

0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Nov 17:00
e33befa

Added

  • The library is split into three artifacts. Pick one backend; both depend on uikit-core and expose the
    same API in ru.kode.uikit.components, so switching is a one-line dependency change:
    • uikit-core: configuration (UikitConfiguration, all *Configuration classes), shared state types and the
      Material3-free components (TextField, TextFieldArea, PageIndicator, shimmer).
    • uikit-components: the Material3 backend (same artifact id as before, so existing apps just bump the version).
    • uikit-components-foundation: a Compose Foundation backend with no Material3 or Accompanist dependency.
      Adding both backends fails the build with duplicate classes.
  • Slots for overriding a component's visual part on either backend:
    Checkbox(box = { state: CheckboxSlotState -> … }), RadioButton(indicator = { state: RadioButtonSlotState -> … }),
    Button(loadingIndicator = { … }), ModalBottomSheet(dragHandle = { … } or null),
    TextFieldDatePicker(title = { configuration -> … }, headline = { date -> … }).
    Defaults live in UikitCheckboxDefaults, UikitRadioButtonDefaults, UikitButtonDefaults,
    UikitBottomSheetDefaults and UikitDatePickerDefaults.Title / .Headline.
  • Both backends render pixel-identically; CI verifies each against the same screenshot goldens.
  • Kotlin Multiplatform: all three artifacts now publish for Android, iOS (iosArm64, iosSimulatorArm64),
    JVM desktop, js and wasmJs. Android consumers keep the same coordinates; Gradle module metadata picks the
    Android variant.
  • The Material3 backend uses androidx Material3 1.4.0 on Android (unchanged) and JetBrains Compose
    Multiplatform Material3 on the other targets. The foundation backend is pure Compose Foundation everywhere.

Changed (breaking)

  • Slider: the thumb/track/startThumb/endThumb slot lambdas now receive the library's own
    UikitSliderState / UikitRangeSliderState instead of Material3 SliderState / RangeSliderState.
  • DatePicker: rememberDatePickerState(selectableDates = …) and DatePickerState.selectableDates now use
    the library's own SelectableDates interface (with UikitDatePickerDefaults.AllDates / .YearRange)
    instead of Material3's SelectableDates / DatePickerDefaults.
  • Dates are kotlinx.datetime.LocalDate instead of java.time.LocalDate: rememberDatePickerState,
    DatePickerState.selectedDate, onDateConfirm, the headline slot and UikitDatePickerDefaults.Headline.
  • Android resource ids in the date picker configuration are replaced by composable lambdas:
    TextFieldDatePickerConfiguration.leadingIcon/trailingIcon/errorIcon, InlineDatePickerConfiguration.icon
    (@Composable () -> Painter) and ModalDatePickerConfiguration.title/confirmButtonText/cancelButtonText
    (@Composable () -> String). Migration:
    // before
    TextFieldDatePickerConfiguration(leadingIconRes = R.drawable.ic_calendar, /* … */)
    ModalDatePickerConfiguration(titleRes = R.string.pick_date, /* … */)
    rememberDatePickerState(initialSelectedDate = java.time.LocalDate.of(2026, 1, 15))
    // after
    TextFieldDatePickerConfiguration(leadingIcon = { painterResource(R.drawable.ic_calendar) }, /* … */)
    ModalDatePickerConfiguration(title = { stringResource(R.string.pick_date) }, /* … */)
    rememberDatePickerState(initialSelectedDate = kotlinx.datetime.LocalDate(2026, 1, 15))

Deprecated

  • ModalBottomSheet(showHandle = …): use dragHandle (null hides the handle).

Known differences

  • The foundation ModalBottomSheet does not provide Material3's LocalContentColor, so Material3 Text without
    an explicit color renders black inside it.
  • The foundation sliders size the thumb gap from SliderConfiguration, not from a custom thumb slot, and draw
    no step ticks (the Material3 backend draws none with the current configuration either).

Notes

  • The libraries no longer enable core library desugaring themselves. kotlinx-datetime uses java.time on
    Android, so apps with minSdk < 26 need coreLibraryDesugaring enabled.
  • No iosX64 (Intel simulator) target: Compose Multiplatform 1.11 no longer publishes it.