From 7254ab65a3566d2d6999f60a9d14cfa11dc2279e Mon Sep 17 00:00:00 2001 From: Rohan Chakraborty Date: Tue, 20 Oct 2026 02:53:18 +0530 Subject: [PATCH 1/3] refactor: use one naming rule for boolean props --- apps/www/src/components/dataview-demo.tsx | 14 +++--- .../src/components/demo/demo-playground.tsx | 4 +- .../src/content/docs/(overview)/upgrading.mdx | 44 +++++++++++++++++++ .../docs/components/alert-dialog/props.ts | 6 +-- .../content/docs/components/button/index.mdx | 7 +-- .../content/docs/components/button/props.ts | 5 ++- .../docs/components/calendar-preview/demo.ts | 16 +++---- .../components/calendar-preview/index.mdx | 1 - .../docs/components/calendar-preview/props.ts | 4 +- .../content/docs/components/calendar/demo.ts | 6 +-- .../content/docs/components/calendar/props.ts | 18 ++++---- .../src/content/docs/components/chip/demo.ts | 8 ++-- .../content/docs/components/chip/index.mdx | 6 +-- .../src/content/docs/components/chip/props.ts | 2 +- .../docs/components/copy-button/index.mdx | 2 +- .../docs/components/copy-button/props.ts | 8 +--- .../content/docs/components/dialog/index.mdx | 2 +- .../content/docs/components/dialog/props.ts | 12 ++--- .../content/docs/components/drawer/demo.ts | 4 +- .../content/docs/components/drawer/index.mdx | 2 +- .../content/docs/components/drawer/props.ts | 7 ++- .../content/docs/components/editor/props.ts | 6 +-- .../docs/components/floating-actions/demo.ts | 16 +++---- .../components/floating-actions/index.mdx | 2 +- .../content/docs/components/skeleton/demo.ts | 7 +-- .../content/docs/components/skeleton/props.ts | 6 +-- apps/www/src/content/docs/dataview/demo.ts | 8 ++-- apps/www/src/content/docs/dataview/index.mdx | 2 +- apps/www/src/content/docs/dataview/list.mdx | 6 +-- apps/www/src/content/docs/dataview/props.ts | 30 ++++++------- .../src/content/docs/dataview/timeline.mdx | 8 ++-- .../alert-dialog/alert-dialog-content.tsx | 10 ++--- .../button/__tests__/button.test.tsx | 16 +++++++ packages/react/components/button/button.tsx | 2 +- .../calendar-preview-body.tsx | 13 ++++-- .../calendar/__tests__/calendar.test.tsx | 2 +- .../calendar/__tests__/date-picker.test.tsx | 4 +- .../calendar/__tests__/range-picker.test.tsx | 2 +- .../react/components/calendar/calendar.tsx | 22 +++++----- .../react/components/calendar/date-picker.tsx | 10 +++-- .../components/calendar/range-picker.tsx | 12 +++-- .../components/chip/__tests__/chip.test.tsx | 14 +++--- .../chip/__tests__/data-slots.test.tsx | 2 +- packages/react/components/chip/chip.tsx | 8 ++-- .../__tests__/copy-button.test.tsx | 19 +++++++- .../components/copy-button/copy-button.tsx | 19 ++++---- .../data-view/__tests__/data-slots.test.tsx | 4 +- .../data-view/__tests__/data-view.test.tsx | 20 ++++----- .../data-view/__tests__/timeline.test.tsx | 8 ++-- .../components/data-view/components/list.tsx | 6 +-- .../data-view/components/timeline.tsx | 28 ++++++------ .../react/components/data-view/data-view.tsx | 8 ++-- .../components/data-view/data-view.types.tsx | 24 +++++----- .../dialog/__tests__/data-slots.test.tsx | 6 +-- .../components/dialog/dialog-content.tsx | 20 +++++---- .../react/components/dialog/dialog.module.css | 6 +-- .../drawer/__tests__/data-slots.test.tsx | 6 +-- .../drawer/__tests__/drawer.test.tsx | 16 +++---- .../components/drawer/drawer-content.tsx | 10 +++-- .../components/editor/editor-control.tsx | 10 ++--- .../components/editor/editor-link-button.tsx | 4 +- .../components/editor/editor-menu-control.tsx | 4 +- packages/react/components/input/input.tsx | 2 +- .../skeleton/__tests__/skeleton.test.tsx | 2 +- .../react/components/skeleton/skeleton.tsx | 6 +-- packages/react/figma/chip.figma.ts | 6 +-- 66 files changed, 358 insertions(+), 262 deletions(-) diff --git a/apps/www/src/components/dataview-demo.tsx b/apps/www/src/components/dataview-demo.tsx index 473258d9b..be0d383bf 100644 --- a/apps/www/src/components/dataview-demo.tsx +++ b/apps/www/src/components/dataview-demo.tsx @@ -492,7 +492,7 @@ export function DataViewVirtualizedGroupingDemo() { // --------------------------------------------------------------------------- export function DataViewLoadingDemo() { - const [isLoading, setIsLoading] = useState(true); + const [loading, setLoading] = useState(true); return ( @@ -500,20 +500,20 @@ export function DataViewLoadingDemo() { size='small' variant='outline' color='neutral' - onClick={() => setIsLoading(v => !v)} + onClick={() => setLoading(v => !v)} > - {isLoading ? 'Stop loading' : 'Show skeletons'} + {loading ? 'Stop loading' : 'Show skeletons'} - Skeleton rows render while `isLoading` is true. + Skeleton rows render while `loading` is true.
@@ -628,7 +628,7 @@ function SelectionBar() { size='large' color='neutral' leadingIcon={} - isDismissible + dismissible onDismiss={() => table.resetRowSelection()} > {selectedCount} selected diff --git a/apps/www/src/components/demo/demo-playground.tsx b/apps/www/src/components/demo/demo-playground.tsx index d501e6329..e26d6fac6 100644 --- a/apps/www/src/components/demo/demo-playground.tsx +++ b/apps/www/src/components/demo/demo-playground.tsx @@ -109,8 +109,8 @@ export default function DemoPlayground({ diff --git a/apps/www/src/content/docs/(overview)/upgrading.mdx b/apps/www/src/content/docs/(overview)/upgrading.mdx index 82f756aad..b4648e9c8 100644 --- a/apps/www/src/content/docs/(overview)/upgrading.mdx +++ b/apps/www/src/content/docs/(overview)/upgrading.mdx @@ -7,6 +7,50 @@ One section per release, newest first, with only the changes that need action from you. The full record of every release, features and fixes included, is on [GitHub releases](https://github.com/raystack/apsara/releases). +## Unreleased: boolean props use one naming rule + +A boolean prop that removes a part which shows by default is `hide`. A +prop that turns off a behavior which is on by default is `disable`. +Each flipped prop defaults to `false`, so a component looks and behaves the +same when you do not pass it. TypeScript reports each old name. + +| Component | Before | After | +|---|---|---| +| `Dialog.Content`, `Drawer.Content` | `showCloseButton={false}` | `hideCloseButton` | +| `Dialog.Content`, `AlertDialog.Content` | `showNestedAnimation={false}` | `disableNestedAnimation` | +| `Editor` toolbar controls | `tooltip={false}` | `hideTooltip` | +| `DatePicker`, `RangePicker` | `showCalendarIcon={false}` | `hideCalendarIcon` | +| `CalendarPreview.Body` | `showIcon` | `showCalendarIcon` | +| `DataView.List`, `DataView.Timeline` | `showGroupHeaders={false}` | `hideGroupHeaders` | +| `DataView.Timeline` | `showGridlines={false}` | `hideGridlines` | +| `DataView.Timeline` | `showCursorLine={false}` | `hideCursorLine` | +| `Skeleton` | `enableAnimation={false}` | `disableAnimation` | +| `Chip` | `isDismissible` | `dismissible` | +| `DataView` | `isLoading` | `loading` | +| `Calendar` | `loadingData` | `loading` | +| `CopyButton` | `resetIcon={false}` | `resetTimeout={Infinity}` | + +```tsx +// Before + + +Label + +// After + + +Label +``` + +`useDataView().isLoading` keeps its name. + +### A loading `Button` is disabled + +`Button` with `loading` ignores clicks and sets `aria-disabled="true"`, as +`IconButton` does. The button stays focusable, and it keeps its loading style. +If your code let a user click a loading button, for example to cancel, render +a separate cancel button. + ## Unreleased: date filters compare whole days `DataView`, `DataTable` and `FilterChip` read and compare dates as calendar diff --git a/apps/www/src/content/docs/components/alert-dialog/props.ts b/apps/www/src/content/docs/components/alert-dialog/props.ts index 9c81028dc..bb2573dc5 100644 --- a/apps/www/src/content/docs/components/alert-dialog/props.ts +++ b/apps/www/src/content/docs/components/alert-dialog/props.ts @@ -8,10 +8,10 @@ export interface AlertDialogProps { export interface AlertDialogContentProps { /** - * Toggle nested dialog animation (scaling and translation) - * @default true + * Turns off the scale and offset of a dialog that has a nested dialog open. + * @default false */ - showNestedAnimation?: boolean; + disableNestedAnimation?: boolean; /** Overlay configuration including blur, className, and style */ overlay?: { diff --git a/apps/www/src/content/docs/components/button/index.mdx b/apps/www/src/content/docs/components/button/index.mdx index 9728d7560..3d96e7f52 100644 --- a/apps/www/src/content/docs/components/button/index.mdx +++ b/apps/www/src/content/docs/components/button/index.mdx @@ -98,8 +98,9 @@ Every rendered part carries a stable `data-slot` attribute for [styling and test - Uses the native ` diff --git a/apps/www/src/content/docs/components/skeleton/demo.ts b/apps/www/src/content/docs/components/skeleton/demo.ts index 573c3c594..550be46fb 100644 --- a/apps/www/src/content/docs/components/skeleton/demo.ts +++ b/apps/www/src/content/docs/components/skeleton/demo.ts @@ -22,10 +22,7 @@ export const playground = { type: 'number', initialValue: 3 }, - enableAnimation: { - type: 'checkbox', - initialValue: true - }, + disableAnimation: { type: 'checkbox', defaultValue: false }, duration: { type: 'number', initialValue: 1.5 @@ -72,7 +69,7 @@ export const animationDemo = { code: ` - + ` }; diff --git a/apps/www/src/content/docs/components/skeleton/props.ts b/apps/www/src/content/docs/components/skeleton/props.ts index 412955b17..c0194d8a3 100644 --- a/apps/www/src/content/docs/components/skeleton/props.ts +++ b/apps/www/src/content/docs/components/skeleton/props.ts @@ -42,10 +42,10 @@ export interface SkeletonProps { duration?: number; /** - * Whether to enable the shimmer animation - * @defaultValue true + * Turns off the shimmer animation. + * @defaultValue false */ - enableAnimation?: boolean; + disableAnimation?: boolean; /** * Number of skeleton elements to render diff --git a/apps/www/src/content/docs/dataview/demo.ts b/apps/www/src/content/docs/dataview/demo.ts index f5d51bbb1..1482646fe 100644 --- a/apps/www/src/content/docs/dataview/demo.ts +++ b/apps/www/src/content/docs/dataview/demo.ts @@ -209,13 +209,13 @@ export const loadingPreview = { label: 'index.tsx', code: ` /* \`DataView.List\` renders \`loadingRowCount\` skeleton rows while - \`isLoading\` is true. Existing rows render alongside skeletons in + \`loading\` is true. Existing rows render alongside skeletons in server mode (load-more). */ @@ -387,7 +387,7 @@ function SelectionBar() { size="large" color="neutral" leadingIcon={} - isDismissible + dismissible onDismiss={() => table.resetRowSelection()} > {selectedCount} selected @@ -495,7 +495,7 @@ export const timelineGroupingPreview = { } /> ` diff --git a/apps/www/src/content/docs/dataview/index.mdx b/apps/www/src/content/docs/dataview/index.mdx index aea5ac047..1cf607d5f 100644 --- a/apps/www/src/content/docs/dataview/index.mdx +++ b/apps/www/src/content/docs/dataview/index.mdx @@ -170,7 +170,7 @@ In client mode `DataView` derives everything locally: filter predicates, sort, g setQuery(q)} diff --git a/apps/www/src/content/docs/dataview/list.mdx b/apps/www/src/content/docs/dataview/list.mdx index 2919fef24..3443f235d 100644 --- a/apps/www/src/content/docs/dataview/list.mdx +++ b/apps/www/src/content/docs/dataview/list.mdx @@ -77,11 +77,11 @@ In virtualized mode, a single sticky-anchor element swaps its content as the use ### Loading -While `isLoading` is `true`, `DataView.List` renders `loadingRowCount` skeleton rows at the tail. Behaviour is identical in virtualized and non-virtualized mode, and during initial load (skeletons fill the row pane) as well as during paginated load-more (skeletons render below the last loaded row). +While `loading` is `true`, `DataView.List` renders `loadingRowCount` skeleton rows at the tail. Behaviour is identical in virtualized and non-virtualized mode, and during initial load (skeletons fill the row pane) as well as during paginated load-more (skeletons render below the last loaded row). -In [server mode](/docs/dataview#server-mode), infinite scroll triggers via a single sentinel and an `IntersectionObserver`, so there are no scroll-distance knobs to tune. While `isLoading` is true the sentinel is suppressed so your `onLoadMore` isn't fired again during a fetch. +In [server mode](/docs/dataview#server-mode), infinite scroll triggers via a single sentinel and an `IntersectionObserver`, so there are no scroll-distance knobs to tune. While `loading` is true the sentinel is suppressed so your `onLoadMore` isn't fired again during a fetch. ### Row selection @@ -124,7 +124,7 @@ Every rendered part carries a stable `data-slot` attribute for [styling and test | `data-view-list-row` | Data row | | `data-view-list-cell` | Cell (data and loader rows) | | `data-view-list-group-header` | Group header (incl. the sticky anchor) | -| `data-view-list-loader-row` | Skeleton row while `isLoading` | +| `data-view-list-loader-row` | Skeleton row while `loading` | | `data-view-list-sentinel` | Infinite-scroll sentinel | Header cells, body cells, and loader cells also carry `data-column="{accessorKey}"`, so a single column can be targeted without a per-column `classNames` entry: diff --git a/apps/www/src/content/docs/dataview/props.ts b/apps/www/src/content/docs/dataview/props.ts index 39513c39b..25f4ddd5f 100644 --- a/apps/www/src/content/docs/dataview/props.ts +++ b/apps/www/src/content/docs/dataview/props.ts @@ -22,10 +22,10 @@ export interface DataViewProps { mode?: 'client' | 'server'; /** - * Loading state. + * Shows skeleton rows and holds back `onLoadMore`. * @defaultValue false */ - isLoading?: boolean; + loading?: boolean; /** Initial query state. */ query?: DataViewQuery; @@ -158,8 +158,8 @@ export interface DataViewListProps { /** Render dividers between rows (default true for table). */ showDividers?: boolean; - /** Render group section headers when grouping is active. Default true. */ - showGroupHeaders?: boolean; + /** Hide group section headers when grouping is active. Default false. */ + hideGroupHeaders?: boolean; /** When true, the active group header sticks under the table header while scrolling. */ stickyGroupHeader?: boolean; @@ -241,10 +241,10 @@ export interface DataViewTimelineProps { markers?: TimelineMarker[]; /** - * Vertical gridlines at axis ticks. - * @defaultValue true + * Hides the vertical gridlines at axis ticks. + * @defaultValue false */ - showGridlines?: boolean; + hideGridlines?: boolean; /** Label every Nth `scale` unit on the axis. Labels never render closer than the collision floor. Default: densest interval that fits. */ tickInterval?: number; @@ -256,10 +256,10 @@ export interface DataViewTimelineProps { gridlineInterval?: number; /** - * Hover crosshair snapped to the unit under the pointer, with a date badge on the axis. - * @defaultValue true + * Hides the hover crosshair snapped to the unit under the pointer, with a date badge on the axis. + * @defaultValue false */ - showCursorLine?: boolean; + hideCursorLine?: boolean; // The literals are named in the description because the rendered type // column can't show them — TS collapses them into TimelineDateInput's @@ -331,12 +331,12 @@ export interface DataViewTimelineProps { virtualized?: boolean; /** - * Render the group header band above each swim-lane section while `group_by` - * is active. False hides the bands only — rows stay grouped into sections - * (same contract as `DataViewListProps.showGroupHeaders`). - * @defaultValue true + * Hides the group header band above each swim-lane section while `group_by` + * is active. Rows stay grouped into sections + * (same contract as `DataViewListProps.hideGroupHeaders`). + * @defaultValue false */ - showGroupHeaders?: boolean; + hideGroupHeaders?: boolean; } export interface TimelineCardContext { diff --git a/apps/www/src/content/docs/dataview/timeline.mdx b/apps/www/src/content/docs/dataview/timeline.mdx index 019ecc686..caf5e4afb 100644 --- a/apps/www/src/content/docs/dataview/timeline.mdx +++ b/apps/www/src/content/docs/dataview/timeline.mdx @@ -138,7 +138,7 @@ Section order is the field's `groupOrder` where it declares one (`['High', 'Medi - **Packing is per section.** A card only ever shares a lane with cards in its own group, and `context.laneIndex` is section-relative. Every section starts at lane 0. `lanePacking="one-per-row"` and `"one-per-sort-value"` apply within each section too. - **Bands pin while their section is in view.** The active band sticks directly under the time axis and is pushed off by the next section's band; its label sticks to the left edge so it stays readable while you pan to a distant month. Always on, in pure CSS, with no prop. - **Empty sections disappear.** A group whose cards all fall outside an explicit `range`, or that has no valid `startField` values, renders nothing: no band, no empty strip. A band that *does* render shows the full group count, even when some of its cards are culled, matching List. -- **`showGroupHeaders={false}`** hides the bands but keeps the sections, the same semantics as the prop on `DataView.List`. Style a band with `classNames.groupHeader`. +- **`hideGroupHeaders`** hides the bands but keeps the sections, the same semantics as the prop on `DataView.List`. Style a band with `classNames.groupHeader`. Bands are labels only in this release: no chevron, no collapsing. @@ -217,13 +217,13 @@ Offset pagination doesn't fit a 2-D time canvas. The natural unit of fetching is ```tsx const [orders, setOrders] = useState([]); -const [isLoading, setIsLoading] = useState(true); // initial fetch in flight +const [loading, setLoading] = useState(true); // initial fetch in flight o.id} > @@ -238,7 +238,7 @@ const [isLoading, setIsLoading] = useState(true); // initial fetch in flight ``` -Start with `isLoading={true}` and fire an initial fetch on mount. With no data and no loading flag the timeline renders `null` and the zero state takes over, so `onVisibleRangeChange` would never fire to bootstrap the first window. +Start with `loading` set to `true` and fire an initial fetch on mount. With no data and no loading flag the timeline renders `null` and the zero state takes over, so `onVisibleRangeChange` would never fire to bootstrap the first window. Keep the row model **cumulative**. The domain is stable, so previously fetched cards stay mounted and scrolling back is instant. Scroll position is anchored by *time*, not pixels: if the domain shifts (a `range` extension, or rows prepended by a fetch), the date under the viewport's left edge stays put instead of the content jumping. diff --git a/packages/react/components/alert-dialog/alert-dialog-content.tsx b/packages/react/components/alert-dialog/alert-dialog-content.tsx index 55443adfe..e5d861d03 100644 --- a/packages/react/components/alert-dialog/alert-dialog-content.tsx +++ b/packages/react/components/alert-dialog/alert-dialog-content.tsx @@ -10,10 +10,10 @@ export interface AlertDialogContentProps extends AlertDialogPrimitive.Popup.Props { overlay?: AlertDialogPrimitive.Backdrop.Props & { blur?: boolean }; /** - * Toggles nested dialog animation (scaling and translation) - * `@default` true + * Turns off the scale and offset of a dialog that has a nested dialog open. + * @default false */ - showNestedAnimation?: boolean; + disableNestedAnimation?: boolean; /** Corner radius for this dialog only. Overrides the theme's `radius`. */ radius?: Radius; } @@ -22,7 +22,7 @@ export const AlertDialogContent = ({ className, children, overlay, - showNestedAnimation = true, + disableNestedAnimation = false, radius, ...props }: AlertDialogContentProps) => { @@ -46,7 +46,7 @@ export const AlertDialogContent = ({ {...theme} className={cx( styles.dialogContent, - showNestedAnimation && styles.showNestedAnimation, + !disableNestedAnimation && styles.nestedAnimation, theme?.className, radiusStyle({ radius }), className diff --git a/packages/react/components/button/__tests__/button.test.tsx b/packages/react/components/button/__tests__/button.test.tsx index dbafbd9ad..c5f828ef2 100644 --- a/packages/react/components/button/__tests__/button.test.tsx +++ b/packages/react/components/button/__tests__/button.test.tsx @@ -186,6 +186,22 @@ describe('Button', () => { expect(handleClick).not.toHaveBeenCalled(); }); + it('blocks clicks and stays focusable when loading', () => { + const handleClick = vi.fn(); + render( + + ); + const button = screen.getByRole('button'); + expect(button).not.toBeDisabled(); + expect(button).toHaveAttribute('aria-disabled', 'true'); + button.focus(); + expect(button).toHaveFocus(); + fireEvent.click(button); + expect(handleClick).not.toHaveBeenCalled(); + }); + it('handles focus events', () => { const handleFocus = vi.fn(); render(); diff --git a/packages/react/components/button/button.tsx b/packages/react/components/button/button.tsx index bfdb654e1..2a8034cb8 100644 --- a/packages/react/components/button/button.tsx +++ b/packages/react/components/button/button.tsx @@ -157,7 +157,7 @@ export const Button = ({ button({ variant, size, color, radius, disabled, loading, className }), isLoaderOnly && getLoaderOnlyClass(size) )} - disabled={disabled} + disabled={disabled || loading} render={render} nativeButton={!render} focusableWhenDisabled={loading} diff --git a/packages/react/components/calendar-preview/calendar-preview-body.tsx b/packages/react/components/calendar-preview/calendar-preview-body.tsx index 64454b373..610b0f8e6 100644 --- a/packages/react/components/calendar-preview/calendar-preview-body.tsx +++ b/packages/react/components/calendar-preview/calendar-preview-body.tsx @@ -13,13 +13,16 @@ import { CalendarPreviewSeparator } from './calendar-preview-separator'; export interface CalendarPreviewBodyProps extends useRender.ComponentProps<'div'> { label?: ReactNode; - /** @defaultValue false */ - showIcon?: boolean; + /** + * Shows the calendar icon in the date input. + * @default false + */ + showCalendarIcon?: boolean; } export function CalendarPreviewBody({ label, - showIcon = false, + showCalendarIcon = false, className, children, render, @@ -45,7 +48,9 @@ export function CalendarPreviewBody({ children: children ?? ( <> {label} - + {scale !== 'day' && } diff --git a/packages/react/components/calendar/__tests__/calendar.test.tsx b/packages/react/components/calendar/__tests__/calendar.test.tsx index f2c57f42e..bdb55c2ae 100644 --- a/packages/react/components/calendar/__tests__/calendar.test.tsx +++ b/packages/react/components/calendar/__tests__/calendar.test.tsx @@ -30,7 +30,7 @@ describe('Calendar', () => { expect(screen.getByLabelText('Next month')).toBeInTheDocument(); }); it('disables navigation when loading', () => { - render(); + render(); const prevButton = screen.getByLabelText('Previous month'); const nextButton = screen.getByLabelText('Next month'); diff --git a/packages/react/components/calendar/__tests__/date-picker.test.tsx b/packages/react/components/calendar/__tests__/date-picker.test.tsx index 1a3f37329..b121e527f 100644 --- a/packages/react/components/calendar/__tests__/date-picker.test.tsx +++ b/packages/react/components/calendar/__tests__/date-picker.test.tsx @@ -40,7 +40,7 @@ describe('DatePicker', () => { * Two regressions on the picker's `calendarProps` type: * - Original type required `mode`/`selected`/`onSelect`, which the picker * overrides after the spread, so consumer values were silently ignored. - * - CalendarPropsExtended fields (tooltipMessages, dateInfo, loadingData, + * - CalendarPropsExtended fields (tooltipMessages, dateInfo, loading, * showTooltip) were unreachable because the type didn't include them. */ it('accepts CalendarPropsExtended fields via calendarProps without type cast', () => { @@ -53,7 +53,7 @@ describe('DatePicker', () => { endMonth: new Date(2030, 0, 1), tooltipMessages: { '15-06-2025': 'Sample tooltip' }, dateInfo: { '15-06-2025': 'i' }, - loadingData: false, + loading: false, showTooltip: true }} /> diff --git a/packages/react/components/calendar/__tests__/range-picker.test.tsx b/packages/react/components/calendar/__tests__/range-picker.test.tsx index 2c4884867..d1657a457 100644 --- a/packages/react/components/calendar/__tests__/range-picker.test.tsx +++ b/packages/react/components/calendar/__tests__/range-picker.test.tsx @@ -96,7 +96,7 @@ describe('RangePicker', () => { endMonth: new Date(2030, 0, 1), tooltipMessages: { '15-06-2025': 'Sample tooltip' }, dateInfo: { '15-06-2025': 'i' }, - loadingData: false, + loading: false, showTooltip: true }} /> diff --git a/packages/react/components/calendar/calendar.tsx b/packages/react/components/calendar/calendar.tsx index ad3817e9c..ca8c741db 100644 --- a/packages/react/components/calendar/calendar.tsx +++ b/packages/react/components/calendar/calendar.tsx @@ -30,7 +30,7 @@ export interface CalendarPropsExtended { * (consumer must apply `timeZone` themselves to stay consistent). */ dateInfo?: Record | ((date: Date) => ReactNode | null); - loadingData?: boolean; + loading?: boolean; timeZone?: string; } @@ -118,7 +118,7 @@ export const Calendar = function ({ showTooltip = false, tooltipMessages = {}, dateInfo = {}, - loadingData = false, + loading = false, timeZone, ...props }: CalendarProps) { @@ -130,8 +130,8 @@ export const Calendar = function ({ PreviousMonthButton: ({ children, ...props }) => ( ( ), DayButton: props => { @@ -177,12 +177,12 @@ export const Calendar = function ({ const hasDateInfo = Boolean(dateComponent); return ( - +