From f88121d0a2bc87f071f97fb6e64fa3009ac9c934 Mon Sep 17 00:00:00 2001 From: Felix Thape <67233923+DasProffi@users.noreply.github.com> Date: Mon, 6 Jul 2026 16:40:20 +0200 Subject: [PATCH 1/3] feat: update date components --- CHANGELOG.md | 29 +++--- src/components/form/FieldLayout.tsx | 8 +- .../user-interaction/date/DatePicker.tsx | 88 +++++++++---------- .../user-interaction/date/DateTimePicker.tsx | 8 +- .../date/DateTimePickerDialog.tsx | 20 +++-- .../user-interaction/date/TimeInput.tsx | 8 +- .../user-interaction/input/DateTimeInput.tsx | 3 +- src/hooks/useStepperHold.ts | 4 +- src/style/theme/components/date-picker.css | 13 +++ .../theme/components/date-time-input.css | 12 ++- .../components/date-time-picker-dialog.css | 2 +- .../theme/components/date-time-picker.css | 5 ++ src/style/theme/components/form-field.css | 2 +- src/style/theme/components/index.css | 3 + src/utils/math.ts | 20 ++--- .../DateTimePickerDialog.stories.tsx | 55 ++++++++++++ 16 files changed, 189 insertions(+), 91 deletions(-) create mode 100644 src/style/theme/components/date-picker.css create mode 100644 src/style/theme/components/date-time-picker.css create mode 100644 stories/User Interaction/Date and Time Input/DateTimePickerDialog.stories.tsx diff --git a/CHANGELOG.md b/CHANGELOG.md index 713eb740..7c365afe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,7 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [0.14.4] - 2026-07-06 - -### Changed - -- Updated readme.md - -## [0.14.3] - 2026-07-06 +## [0.14.5] - 2026-07-06 ### Added @@ -22,17 +16,30 @@ and adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - `DateTimeInput` popup `data-mode` attribute for mode-specific dialog sizing - `TabPanel` `data-in-custom-tab-view` attribute so panels skip default padding when portaled into a custom `TabView` - `DateTimePickerDialog` Storybook story -- `TabSwitcher` `tabSwitcherWithTabView` Storybook story demonstrating a custom `TabView` layout -- `Browser Compatibility/Safari` Storybook story with demos for CSS that requires WebKit prefixes (`sticky`, `user-select`, `appearance`, `touch-action`, `transform`, `::-webkit-scrollbar`) ### Changed - Date/time picker family (`DatePicker`, `DateTimePicker`, `DateTimePickerDialog`, `DayPicker`, `YearMonthPicker`, `DateTimeField`, `DateTimeInput`) migrated from `data-name` selectors to class-based CSS -- `FormFieldLayout` migrated from `data-name` to class-based CSS (`.form-field-container`, `.form-field-label`, `.form-field-description`, `.form-field-error`) -- `TabSwitcher` (`TabList`, `TabListItem`, `TabPanel`) migrated from `data-name` to class-based CSS - `DatePicker` always shows today/previous/next navigation buttons (disabled outside day view); month label uses short month format - `DateTimeInput` dialog popup uses a viewport-capped `min-width` and applies the wider tablet width only for `dateTime` mode - `FormFieldLayout` error message moved from absolute positioning to in-flow layout with padding + +## [0.14.4] - 2026-07-06 + +### Changed + +- Updated readme.md + +## [0.14.3] - 2026-07-06 + +### Added + +- `TabSwitcher` `tabSwitcherWithTabView` Storybook story demonstrating a custom `TabView` layout +- `Browser Compatibility/Safari` Storybook story with demos for CSS that requires WebKit prefixes (`sticky`, `user-select`, `appearance`, `touch-action`, `transform`, `::-webkit-scrollbar`) + +### Changed + +- `TabSwitcher` (`TabList`, `TabListItem`, `TabPanel`) migrated from `data-name` to class-based CSS - `TabPanel` default padding only applied when not rendered inside a custom `TabView` - `TimeInput` layout no longer wraps stepper segments - `NumberStepperInput` increment/decrement buttons use `tabIndex={-1}` diff --git a/src/components/form/FieldLayout.tsx b/src/components/form/FieldLayout.tsx index d1e34795..91ff86e9 100644 --- a/src/components/form/FieldLayout.tsx +++ b/src/components/form/FieldLayout.tsx @@ -92,14 +92,14 @@ export const FormFieldLayout = forwardRef( {...props} ref={ref} - data-name={props['data-name'] ?? 'form-field-container'} + data-name="form-field-container" > {label && (