@optimum-intelligence/opti-ui 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -0
- package/dist/components/accordion/Accordion.d.ts +12 -0
- package/dist/components/accordion/Accordion.js +12 -0
- package/dist/components/accordion/Accordion.js.map +1 -1
- package/dist/components/alert/Alert.d.ts +4 -0
- package/dist/components/alert/Alert.js.map +1 -1
- package/dist/components/app-shell/AppShell.d.ts +22 -0
- package/dist/components/app-shell/AppShell.js +6 -0
- package/dist/components/app-shell/AppShell.js.map +1 -1
- package/dist/components/avatar/Avatar.d.ts +8 -0
- package/dist/components/avatar/Avatar.js +2 -0
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/badge/Badge.d.ts +9 -0
- package/dist/components/badge/Badge.js +6 -0
- package/dist/components/badge/Badge.js.map +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js.map +1 -1
- package/dist/components/button/Button.d.ts +8 -0
- package/dist/components/button/Button.js +6 -0
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/calendar/Calendar.d.ts +3 -0
- package/dist/components/calendar/Calendar.js.map +1 -1
- package/dist/components/card/Card.d.ts +13 -0
- package/dist/components/card/Card.js +13 -0
- package/dist/components/card/Card.js.map +1 -1
- package/dist/components/choice/Choice.d.ts +13 -0
- package/dist/components/choice/Choice.js +10 -0
- package/dist/components/choice/Choice.js.map +1 -1
- package/dist/components/combobox/Combobox.d.ts +12 -0
- package/dist/components/combobox/Combobox.js.map +1 -1
- package/dist/components/command-palette/CommandPalette.d.ts +10 -0
- package/dist/components/command-palette/CommandPalette.js.map +1 -1
- package/dist/components/data-table/DataTable.d.ts +4 -0
- package/dist/components/data-table/DataTable.js.map +1 -1
- package/dist/components/data-table/DataTableContent.d.ts +1 -0
- package/dist/components/data-table/DataTableContent.js.map +1 -1
- package/dist/components/data-table/DataTableFilters.d.ts +3 -0
- package/dist/components/data-table/DataTableFilters.js.map +1 -1
- package/dist/components/data-table/types.d.ts +16 -0
- package/dist/components/date-picker/DateRangePicker.d.ts +1 -0
- package/dist/components/date-picker/DateRangePicker.js.map +1 -1
- package/dist/components/date-picker/PickerField.d.ts +13 -0
- package/dist/components/date-picker/PickerField.js.map +1 -1
- package/dist/components/dialog/Dialog.d.ts +5 -0
- package/dist/components/dialog/Dialog.js.map +1 -1
- package/dist/components/drawer/Drawer.d.ts +10 -0
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/empty-state/EmptyState.d.ts +5 -0
- package/dist/components/empty-state/EmptyState.js.map +1 -1
- package/dist/components/file-upload/FileUpload.d.ts +21 -0
- package/dist/components/file-upload/FileUpload.js.map +1 -1
- package/dist/components/input/Input.d.ts +7 -0
- package/dist/components/input/Input.js +3 -0
- package/dist/components/input/Input.js.map +1 -1
- package/dist/components/link/Link.d.ts +1 -0
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/menu/Menu.d.ts +6 -0
- package/dist/components/menu/Menu.js.map +1 -1
- package/dist/components/number-field/NumberField.d.ts +7 -0
- package/dist/components/number-field/NumberField.js.map +1 -1
- package/dist/components/pagination/Pagination.d.ts +4 -0
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/popover/Popover.d.ts +4 -0
- package/dist/components/popover/Popover.js.map +1 -1
- package/dist/components/preview-card/PreviewCard.d.ts +4 -0
- package/dist/components/preview-card/PreviewCard.js.map +1 -1
- package/dist/components/progress/Progress.d.ts +8 -0
- package/dist/components/progress/Progress.js.map +1 -1
- package/dist/components/scroll-area/ScrollArea.d.ts +1 -0
- package/dist/components/scroll-area/ScrollArea.js.map +1 -1
- package/dist/components/search-input/SearchInput.d.ts +2 -0
- package/dist/components/search-input/SearchInput.js.map +1 -1
- package/dist/components/select/Select.d.ts +11 -0
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/separator/Separator.d.ts +1 -0
- package/dist/components/separator/Separator.js +1 -0
- package/dist/components/separator/Separator.js.map +1 -1
- package/dist/components/skeleton/Skeleton.d.ts +7 -0
- package/dist/components/skeleton/Skeleton.js +1 -0
- package/dist/components/skeleton/Skeleton.js.map +1 -1
- package/dist/components/slider/Slider.d.ts +1 -0
- package/dist/components/slider/Slider.js.map +1 -1
- package/dist/components/spinner/Spinner.d.ts +2 -0
- package/dist/components/spinner/Spinner.js +1 -0
- package/dist/components/spinner/Spinner.js.map +1 -1
- package/dist/components/stat-card/StatCard.d.ts +4 -0
- package/dist/components/stat-card/StatCard.js.map +1 -1
- package/dist/components/stepper/Stepper.d.ts +4 -0
- package/dist/components/stepper/Stepper.js.map +1 -1
- package/dist/components/table/Table.d.ts +23 -0
- package/dist/components/table/Table.js +17 -0
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/tabs/Tabs.d.ts +1 -0
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tag/Tag.d.ts +3 -0
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/toast/Toast.d.ts +2 -0
- package/dist/components/toast/Toast.js.map +1 -1
- package/dist/components/toggle/Toggle.d.ts +7 -0
- package/dist/components/toggle/Toggle.js +1 -0
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components/tooltip/Tooltip.d.ts +8 -0
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/typography/Typography.d.ts +5 -0
- package/dist/components/typography/Typography.js +2 -0
- package/dist/components/typography/Typography.js.map +1 -1
- package/dist/components.json +5375 -0
- package/dist/llms-full.txt +2590 -0
- package/dist/llms.txt +175 -0
- package/dist/theme/ThemeProvider.d.ts +1 -0
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/utils/portal.d.ts +4 -0
- package/dist/utils/portal.js +4 -0
- package/dist/utils/portal.js.map +1 -1
- package/package.json +7 -3
|
@@ -5,6 +5,7 @@ export type ButtonShape = 'pill' | 'rounded';
|
|
|
5
5
|
export interface ButtonProps extends BaseButton.Props {
|
|
6
6
|
/** Visual emphasis. */
|
|
7
7
|
variant?: ButtonVariant;
|
|
8
|
+
/** Height and padding. */
|
|
8
9
|
size?: ButtonSize;
|
|
9
10
|
/** `pill` (default) or `rounded` corners. Override with `--oui-button-radius`. */
|
|
10
11
|
shape?: ButtonShape;
|
|
@@ -13,10 +14,17 @@ export interface ButtonProps extends BaseButton.Props {
|
|
|
13
14
|
/** Shows a spinner and blocks interaction while keeping focus. */
|
|
14
15
|
loading?: boolean;
|
|
15
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Action button. Use `render={<a href="…" />}` with `nativeButton={false}` to style a link as a button.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <Button variant="secondary" loading={saving} onClick={save}>Save</Button>
|
|
22
|
+
*/
|
|
16
23
|
export declare function Button({ variant, size, shape, fullWidth, loading, disabled, className, children, ref, ...props }: ButtonProps): import("react").JSX.Element;
|
|
17
24
|
export interface IconButtonProps extends Omit<ButtonProps, 'shape' | 'fullWidth'> {
|
|
18
25
|
/** Required: icon-only buttons need an accessible name. */
|
|
19
26
|
'aria-label': string;
|
|
27
|
+
/** `rounded` square (default) or `circle`. */
|
|
20
28
|
shape?: 'rounded' | 'circle';
|
|
21
29
|
}
|
|
22
30
|
/** Square button for a single icon. Defaults to the compact ghost style. */
|
|
@@ -5,6 +5,12 @@ import { c } from "react/compiler-runtime";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Button } from "@base-ui/react/button";
|
|
7
7
|
//#region src/components/button/Button.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Action button. Use `render={<a href="…" />}` with `nativeButton={false}` to style a link as a button.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <Button variant="secondary" loading={saving} onClick={save}>Save</Button>
|
|
13
|
+
*/
|
|
8
14
|
function Button$1(t0) {
|
|
9
15
|
const $ = c(29);
|
|
10
16
|
let children;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","names":["Button","BaseButton","withClass","Spinner","ButtonVariant","ButtonSize","ButtonShape","ButtonProps","Props","variant","size","shape","fullWidth","loading","t0","$","_c","children","className","disabled","props","ref","t1","t2","t3","undefined","t4","t5","t6","t7","t8","t9","t10","IconButtonProps","Omit","IconButton","Button","_c","BaseButton"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import { Button as BaseButton } from '@base-ui/react/button';\nimport { withClass } from '../../utils/cx';\nimport { Spinner } from '../spinner/Spinner';\n\nexport type ButtonVariant = 'primary' | 'accent' | 'secondary' | 'soft' | 'ghost' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\nexport type ButtonShape = 'pill' | 'rounded';\n\nexport interface ButtonProps extends BaseButton.Props {\n /** Visual emphasis. */\n variant?: ButtonVariant;\n size?: ButtonSize;\n /** `pill` (default) or `rounded` corners. Override with `--oui-button-radius`. */\n shape?: ButtonShape;\n /** Stretch to the container width. */\n fullWidth?: boolean;\n /** Shows a spinner and blocks interaction while keeping focus. */\n loading?: boolean;\n}\n\nexport function Button({\n variant = 'primary',\n size = 'md',\n shape = 'pill',\n fullWidth,\n loading,\n disabled,\n className,\n children,\n ref,\n ...props\n}: ButtonProps) {\n return (\n <BaseButton\n ref={ref}\n className={withClass('oui-button', className)}\n data-variant={variant}\n data-size={size}\n data-shape={shape}\n data-full-width={fullWidth || undefined}\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n disabled={disabled || loading}\n focusableWhenDisabled={loading}\n {...props}\n >\n {loading && <Spinner className=\"oui-button__spinner\" label={null} />}\n {children}\n </BaseButton>\n );\n}\n\nexport interface IconButtonProps extends Omit<ButtonProps, 'shape' | 'fullWidth'> {\n /** Required: icon-only buttons need an accessible name. */\n 'aria-label': string;\n shape?: 'rounded' | 'circle';\n}\n\n/** Square button for a single icon. Defaults to the compact ghost style. */\nexport function IconButton({\n variant = 'ghost',\n size = 'md',\n shape = 'rounded',\n className,\n ref,\n ...props\n}: IconButtonProps) {\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={withClass('oui-icon-button', className)}\n data-shape={shape}\n {...(props as ButtonProps)}\n />\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","names":["Button","BaseButton","withClass","Spinner","ButtonVariant","ButtonSize","ButtonShape","ButtonProps","Props","variant","size","shape","fullWidth","loading","t0","$","_c","children","className","disabled","props","ref","t1","t2","t3","undefined","t4","t5","t6","t7","t8","t9","t10","IconButtonProps","Omit","IconButton","Button","_c","BaseButton"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["import { Button as BaseButton } from '@base-ui/react/button';\nimport { withClass } from '../../utils/cx';\nimport { Spinner } from '../spinner/Spinner';\n\nexport type ButtonVariant = 'primary' | 'accent' | 'secondary' | 'soft' | 'ghost' | 'danger';\nexport type ButtonSize = 'sm' | 'md' | 'lg';\nexport type ButtonShape = 'pill' | 'rounded';\n\nexport interface ButtonProps extends BaseButton.Props {\n /** Visual emphasis. */\n variant?: ButtonVariant;\n /** Height and padding. */\n size?: ButtonSize;\n /** `pill` (default) or `rounded` corners. Override with `--oui-button-radius`. */\n shape?: ButtonShape;\n /** Stretch to the container width. */\n fullWidth?: boolean;\n /** Shows a spinner and blocks interaction while keeping focus. */\n loading?: boolean;\n}\n\n/**\n * Action button. Use `render={<a href=\"…\" />}` with `nativeButton={false}` to style a link as a button.\n *\n * @example\n * <Button variant=\"secondary\" loading={saving} onClick={save}>Save</Button>\n */\nexport function Button({\n variant = 'primary',\n size = 'md',\n shape = 'pill',\n fullWidth,\n loading,\n disabled,\n className,\n children,\n ref,\n ...props\n}: ButtonProps) {\n return (\n <BaseButton\n ref={ref}\n className={withClass('oui-button', className)}\n data-variant={variant}\n data-size={size}\n data-shape={shape}\n data-full-width={fullWidth || undefined}\n data-loading={loading || undefined}\n aria-busy={loading || undefined}\n disabled={disabled || loading}\n focusableWhenDisabled={loading}\n {...props}\n >\n {loading && <Spinner className=\"oui-button__spinner\" label={null} />}\n {children}\n </BaseButton>\n );\n}\n\nexport interface IconButtonProps extends Omit<ButtonProps, 'shape' | 'fullWidth'> {\n /** Required: icon-only buttons need an accessible name. */\n 'aria-label': string;\n /** `rounded` square (default) or `circle`. */\n shape?: 'rounded' | 'circle';\n}\n\n/** Square button for a single icon. Defaults to the compact ghost style. */\nexport function IconButton({\n variant = 'ghost',\n size = 'md',\n shape = 'rounded',\n className,\n ref,\n ...props\n}: IconButtonProps) {\n return (\n <Button\n ref={ref}\n variant={variant}\n size={size}\n className={withClass('oui-icon-button', className)}\n data-shape={shape}\n {...(props as ButtonProps)}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA2BA,SAAOA,SAAAc,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAP;CAAA,IAAAC;CAAA,IAAAO;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAT,EAAA,OAAAD,IAAA;EAAgB,CAAA,CAAAL,SAAAa,IAAAZ,MAAAa,IAAAZ,OAAAa,IAAAZ,WAAAC,SAAAM,UAAAD,WAAAD,UAAAI,KAAA,GAAAD,SAAAN;EAWTC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAG;EAAAH,EAAA,KAAAI;EAAAJ,EAAA,KAAAH;EAAAG,EAAA,KAAAF;EAAAE,EAAA,KAAAK;EAAAL,EAAA,KAAAM;EAAAN,EAAA,KAAAO;EAAAP,EAAA,KAAAQ;EAAAR,EAAA,MAAAS;CAAA,OAAA;EAAAP,WAAAF,EAAA;EAAAG,YAAAH,EAAA;EAAAI,WAAAJ,EAAA;EAAAH,YAAAG,EAAA;EAAAF,UAAAE,EAAA;EAAAK,QAAAL,EAAA;EAAAM,MAAAN,EAAA;EAAAO,KAAAP,EAAA;EAAAQ,KAAAR,EAAA;EAAAS,KAAAT,EAAA;CAAA;CAVZ,MAA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QAAAN,SAAA;EAN3BmB,KAAA,oBAACQ,UAAD;GACOf;GACIZ;GACHC;GACK,WAAAgB;GACCf,cAAAA;GAAK,GACZgB;EAAoB,CAAA;EACzBZ,EAAA,KAAAM;EAAAN,EAAA,MAAAJ;EAAAI,EAAA,MAAAL;EAAAK,EAAA,MAAAW;EAAAX,EAAA,MAAAY;EAAAZ,EAAA,MAAAN;EAAAM,EAAA,MAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OAPFa;AAOE"}
|
|
@@ -35,7 +35,9 @@ interface CalendarOptions extends Omit<React.HTMLAttributes<HTMLDivElement>, 'de
|
|
|
35
35
|
export interface CalendarProps extends CalendarOptions {
|
|
36
36
|
/** Selected day as an ISO date (`"2026-03-09"`). */
|
|
37
37
|
value?: string | null;
|
|
38
|
+
/** Initially selected day (ISO date) when uncontrolled. */
|
|
38
39
|
defaultValue?: string | null;
|
|
40
|
+
/** Called with the picked day as an ISO date. */
|
|
39
41
|
onValueChange?: (value: string) => void;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
@@ -47,6 +49,7 @@ export declare function Calendar({ value, defaultValue, onValueChange, ...props
|
|
|
47
49
|
export interface RangeCalendarProps extends CalendarOptions {
|
|
48
50
|
/** Selected days as ISO dates; both ends are inclusive. */
|
|
49
51
|
value?: DateRange | null;
|
|
52
|
+
/** Initially selected range when uncontrolled. */
|
|
50
53
|
defaultValue?: DateRange | null;
|
|
51
54
|
/** Called once both ends are picked, with `start` on or before `end`. */
|
|
52
55
|
onValueChange?: (value: DateRange) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.js","names":["React","cx","ChevronLeftIcon","ChevronRightIcon","addDays","addMonths","clampDate","datePart","formatDate","formatDateLong","monthGrid","pad","startOfMonth","toRange","toUtcDate","todayIso","weekday","DateRange","CalendarLabels","previousMonth","nextMonth","previousYear","nextYear","previousYears","nextYears","chooseMonth","chooseYear","defaultLabels","Chooser","index","mode","cursor","YEARS","yearOf","date","Number","slice","monthNumber","CalendarOptions","Omit","HTMLAttributes","HTMLDivElement","ref","Ref","min","max","isDateDisabled","defaultMonth","locale","weekStartsOn","numberOfMonths","autoFocus","labels","Partial","DayState","selected","inRange","rangeStart","rangeEnd","CalendarViewProps","target","dayState","onPick","onPreview","multiselectable","reveal","view","count","month","chooserItems","year","Array","from","length","_","start","Math","floor","offset","filter","item","map","CalendarView","t0","$","_c","className","props","t1","t2","undefined","t3","text","today","useState","t4","focused","setFocused","t5","setView","monthsRef","useRef","moveFocus","Boolean","titleId","useId","chooser","setChooser","seen","setSeen","t6","Symbol","for","current","months","querySelector","focus","t7","useEffect","t8","disabled","t10","t11","t12","t13","t14","t15","t9","formats","monthLong","Intl","DateTimeFormat","timeZone","weekdayShort","weekdayLong","yearText","_temp","go","date_1","next","page","amount","next_0","select","date_2","onKeyDown","event","next_1","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","shiftKey","PageDown","move","key","preventDefault","day","earliest","latest","openChooser","closeChooser","moveChooser","amount_0","step","choose","current_0","date_3","next_2","onChooserKeyDown","current_1","event_0","stopPropagation","amount_1","months_0","index_0","previous","following","first","index_1","days","weeks","__0","week","choosing","choices","format","date_4","unit","unavailable","shown","date_5","week_0","date_6","outside","state","t16","t17","date_0","String","CalendarProps","value","defaultValue","onValueChange","Calendar","inner","setInner","RangeCalendarProps","rangeKey","range","end","RangeCalendar","anchor","setAnchor","preview","setPreview","setTarget","_c","_Fragment"],"sources":["../../../src/components/calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../../icons';\nimport {\n addDays,\n addMonths,\n clampDate,\n datePart,\n formatDate,\n formatDateLong,\n monthGrid,\n pad,\n startOfMonth,\n toRange,\n toUtcDate,\n todayIso,\n weekday,\n type DateRange,\n} from './date-utils';\n\nexport type { DateRange };\nexport { formatDate, formatDateLong };\n\nexport interface CalendarLabels {\n previousMonth: string;\n nextMonth: string;\n previousYear: string;\n nextYear: string;\n previousYears: string;\n nextYears: string;\n chooseMonth: string;\n chooseYear: string;\n}\n\nconst defaultLabels: CalendarLabels = {\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n previousYears: 'Previous years',\n nextYears: 'Next years',\n chooseMonth: 'Choose month',\n chooseYear: 'Choose year',\n};\n\n/** The month or year list that replaces one month's day grid. */\ninterface Chooser {\n /** Which of the visible months it was opened from. */\n index: number;\n mode: 'months' | 'years';\n /** First day of the month that owns the list's tab stop. */\n cursor: string;\n}\n\n/** Years listed per page, in rows of three like the months. */\nconst YEARS = 12;\n\nconst yearOf = (date: string) => Number(date.slice(0, 4));\nconst monthNumber = (date: string) => yearOf(date) * 12 + Number(date.slice(5, 7));\n\ninterface CalendarOptions extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {\n ref?: React.Ref<HTMLDivElement>;\n /** Earliest selectable day (ISO date). */\n min?: string;\n /** Latest selectable day (ISO date). */\n max?: string;\n /** Return true to make a day unselectable. */\n isDateDisabled?: (date: string) => boolean;\n /** Month shown first when there is no value (any ISO date in that month). */\n defaultMonth?: string;\n /** BCP 47 locale for month and weekday names. Defaults to the browser's. */\n locale?: string;\n /** First column: 0 = Sunday, 1 = Monday (default). */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /** Months shown side by side (default 1). */\n numberOfMonths?: number;\n /** Move focus to the selected day (or today) on mount, e.g. inside a popover. */\n autoFocus?: boolean;\n labels?: Partial<CalendarLabels>;\n}\n\ninterface DayState {\n selected?: boolean;\n inRange?: boolean;\n rangeStart?: boolean;\n rangeEnd?: boolean;\n}\n\ninterface CalendarViewProps extends CalendarOptions {\n /** Day the view opens on, and follows whenever it changes. */\n target: string | null;\n dayState: (date: string) => DayState;\n onPick: (date: string) => void;\n /** Reports the hovered or keyboard-focused day, and `null` when the pointer leaves. */\n onPreview?: (date: string | null) => void;\n multiselectable?: boolean;\n}\n\n/** The first visible month after moving `view` just enough to show `date`. */\nfunction reveal(view: string, date: string, count: number): string {\n const month = startOfMonth(date);\n if (month < view) return month;\n return month > addMonths(view, count - 1) ? addMonths(month, 1 - count) : view;\n}\n\n/** The months of the cursor's year, or the page of years around it. */\nfunction chooserItems({ mode, cursor }: Chooser): string[] {\n const year = yearOf(cursor);\n if (mode === 'months') return Array.from({ length: 12 }, (_, month) => `${cursor.slice(0, 5)}${pad(month + 1)}-01`);\n const start = Math.floor((year - 1) / YEARS) * YEARS + 1;\n return Array.from({ length: YEARS }, (_, offset) => start + offset)\n .filter((item) => item <= 9999)\n .map((item) => `${pad(item, 4)}${cursor.slice(4, 8)}01`);\n}\n\n/** Month grids, navigation and keyboard handling shared by Calendar and RangeCalendar. */\nfunction CalendarView({\n target,\n dayState,\n onPick,\n onPreview,\n multiselectable,\n min,\n max,\n isDateDisabled,\n defaultMonth,\n locale,\n weekStartsOn = 1,\n numberOfMonths = 1,\n autoFocus,\n labels,\n className,\n ref,\n ...props\n}: CalendarViewProps) {\n const text = { ...defaultLabels, ...labels };\n const count = Math.max(1, Math.floor(numberOfMonths));\n const [today] = React.useState(todayIso);\n\n // The day that owns the grid's tab stop.\n const [focused, setFocused] = React.useState(() => clampDate(target ?? datePart(defaultMonth) ?? today, min, max));\n // The first visible month; it moves just enough to keep the focused day on screen.\n const [view, setView] = React.useState(() => startOfMonth(focused));\n const monthsRef = React.useRef<HTMLDivElement>(null);\n const moveFocus = React.useRef(Boolean(autoFocus));\n const titleId = React.useId();\n const [chooser, setChooser] = React.useState<Chooser | null>(null);\n\n // Follow the target when it changes from outside.\n const [seen, setSeen] = React.useState(target);\n if (target !== seen) {\n setSeen(target);\n if (target) {\n setFocused(target);\n setView(reveal(view, target, count));\n }\n }\n\n React.useEffect(() => {\n if (!moveFocus.current) return;\n moveFocus.current = false;\n const months = monthsRef.current;\n (\n months?.querySelector<HTMLElement>('.oui-calendar__choice[tabindex=\"0\"]') ??\n months?.querySelector<HTMLElement>('[tabindex=\"0\"]')\n )?.focus();\n }, [focused, chooser]);\n\n const disabled = (date: string) =>\n Boolean((min && date < min) || (max && date > max) || isDateDisabled?.(date));\n\n const formats = {\n monthLong: new Intl.DateTimeFormat(locale, { month: 'long', timeZone: 'UTC' }),\n month: new Intl.DateTimeFormat(locale, { month: 'short', timeZone: 'UTC' }),\n weekdayShort: new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' }),\n weekdayLong: new Intl.DateTimeFormat(locale, { weekday: 'long', timeZone: 'UTC' }),\n };\n\n const yearText = (date: string) => String(yearOf(date));\n\n const go = (date: string) => {\n const next = clampDate(date, min, max);\n moveFocus.current = true;\n setFocused(next);\n setView(reveal(view, next, count));\n return next;\n };\n\n // The navigation buttons page the view and carry the tab stop along without moving focus.\n const page = (amount: number) => {\n const next = clampDate(addMonths(focused, amount), min, max);\n setFocused(next);\n setView(reveal(addMonths(view, amount), next, count));\n };\n\n const select = (date: string) => {\n if (disabled(date)) return;\n go(date);\n onPick(date);\n };\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n const offset = (weekday(focused) - weekStartsOn + 7) % 7;\n const next: Record<string, () => string> = {\n ArrowLeft: () => addDays(focused, -1),\n ArrowRight: () => addDays(focused, 1),\n ArrowUp: () => addDays(focused, -7),\n ArrowDown: () => addDays(focused, 7),\n Home: () => addDays(focused, -offset),\n End: () => addDays(focused, 6 - offset),\n PageUp: () => addMonths(focused, event.shiftKey ? -12 : -1),\n PageDown: () => addMonths(focused, event.shiftKey ? 12 : 1),\n };\n const move = next[event.key];\n if (!move) return;\n event.preventDefault();\n // Not inline: an absent onPreview would skip evaluating its argument, and with it the move.\n const day = go(move());\n onPreview?.(day);\n };\n\n // The months the chooser can reach.\n const earliest = startOfMonth(min ?? '0001-01-01');\n const latest = startOfMonth(max ?? '9999-12-01');\n\n const openChooser = (index: number, mode: Chooser['mode'], cursor: string) => {\n moveFocus.current = true;\n setChooser({ index, mode, cursor: clampDate(cursor, earliest, latest) });\n };\n\n const closeChooser = () => {\n moveFocus.current = true;\n setChooser(null);\n };\n\n const moveChooser = (current: Chooser, amount: number, focus: boolean) => {\n const step = current.mode === 'months' ? amount : amount * 12;\n // Stay within the years an ISO date can spell.\n if (monthNumber(current.cursor) + step < 13 || monthNumber(current.cursor) + step > 9999 * 12 + 12) return;\n moveFocus.current = focus;\n setChooser({ ...current, cursor: clampDate(addMonths(current.cursor, step), earliest, latest) });\n };\n\n const choose = (current: Chooser, date: string) => {\n if (current.mode === 'years') {\n openChooser(current.index, 'months', date);\n return;\n }\n // Keep the day of the month, and put the chosen month where the chooser was opened.\n const next = clampDate(addMonths(focused, monthNumber(date) - monthNumber(focused)), min, max);\n moveFocus.current = true;\n setFocused(next);\n setView(reveal(addMonths(date, -current.index), next, count));\n setChooser(null);\n };\n\n const onChooserKeyDown = (current: Chooser) => (event: React.KeyboardEvent) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n event.stopPropagation();\n closeChooser();\n return;\n }\n const amount = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -3, ArrowDown: 3, PageUp: -YEARS, PageDown: YEARS }[event.key];\n if (!amount) return;\n event.preventDefault();\n moveChooser(current, amount, true);\n };\n\n const months = Array.from({ length: count }, (_, index) => addMonths(view, index));\n const previous = addDays(view, -1);\n const following = addMonths(view, count);\n\n return (\n <div ref={ref} className={cx('oui-calendar', className)} {...props}>\n <div\n ref={monthsRef}\n className=\"oui-calendar__months\"\n onPointerLeave={onPreview ? () => onPreview(null) : undefined}\n >\n {months.map((first, index) => {\n const days = monthGrid(first, weekStartsOn);\n const month = first.slice(0, 7);\n const weeks = Array.from({ length: 6 }, (_, week) => days.slice(week * 7, week * 7 + 7));\n const choosing = chooser?.index === index ? chooser : null;\n const choices = choosing ? chooserItems(choosing) : [];\n return (\n <div key={month} className=\"oui-calendar__month\">\n <div className=\"oui-calendar__header\">\n {choosing ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={choosing.mode === 'months' ? text.previousYear : text.previousYears}\n disabled={choices[0].slice(0, 4) <= earliest.slice(0, 4)}\n onClick={() => moveChooser(choosing, -YEARS, false)}\n >\n <ChevronLeftIcon />\n </button>\n ) : index === 0 ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={text.previousMonth}\n disabled={Boolean(min && previous < min)}\n onClick={() => page(-1)}\n >\n <ChevronLeftIcon />\n </button>\n ) : (\n <span className=\"oui-calendar__nav-spacer\" />\n )}\n <div id={`${titleId}-${index}`} className=\"oui-calendar__title\" aria-live=\"polite\">\n {!choosing ? (\n // Year first, as in the written date format: \"2026. March\".\n <>\n <button\n type=\"button\"\n className=\"oui-calendar__title-button\"\n title={text.chooseYear}\n onClick={() => openChooser(index, 'years', first)}\n >\n {yearText(first)}\n </button>\n {'. '}\n <button\n type=\"button\"\n className=\"oui-calendar__title-button\"\n title={text.chooseMonth}\n onClick={() => openChooser(index, 'months', first)}\n >\n {formats.monthLong.format(toUtcDate(first))}\n </button>\n </>\n ) : choosing.mode === 'months' ? (\n <button\n type=\"button\"\n className=\"oui-calendar__title-button\"\n title={text.chooseYear}\n onClick={() => openChooser(index, 'years', choosing.cursor)}\n >\n {yearText(choosing.cursor)}\n </button>\n ) : (\n `${yearText(choices[0])} – ${yearText(choices[choices.length - 1])}`\n )}\n </div>\n {choosing ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={choosing.mode === 'months' ? text.nextYear : text.nextYears}\n disabled={choices[choices.length - 1].slice(0, 4) >= latest.slice(0, 4)}\n onClick={() => moveChooser(choosing, YEARS, false)}\n >\n <ChevronRightIcon />\n </button>\n ) : index === count - 1 ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={text.nextMonth}\n disabled={Boolean(max && following > max)}\n onClick={() => page(1)}\n >\n <ChevronRightIcon />\n </button>\n ) : (\n <span className=\"oui-calendar__nav-spacer\" />\n )}\n </div>\n {choosing ? (\n <div\n role=\"group\"\n aria-labelledby={`${titleId}-${index}`}\n className=\"oui-calendar__choices\"\n onKeyDown={onChooserKeyDown(choosing)}\n >\n {choices.map((date) => {\n const unit = choosing.mode === 'months' ? 7 : 4;\n const key = date.slice(0, unit);\n const unavailable = key < earliest.slice(0, unit) || key > latest.slice(0, unit);\n const shown = key === first.slice(0, unit);\n return (\n <button\n key={date}\n type=\"button\"\n className=\"oui-calendar__choice\"\n tabIndex={key === choosing.cursor.slice(0, unit) ? 0 : -1}\n aria-pressed={shown}\n aria-disabled={unavailable || undefined}\n data-selected={shown ? '' : undefined}\n data-today={key === today.slice(0, unit) ? '' : undefined}\n data-disabled={unavailable ? '' : undefined}\n onClick={unavailable ? undefined : () => choose(choosing, date)}\n >\n {choosing.mode === 'months' ? formats.month.format(toUtcDate(date)) : yearText(date)}\n </button>\n );\n })}\n </div>\n ) : (\n <div\n role=\"grid\"\n aria-labelledby={`${titleId}-${index}`}\n aria-multiselectable={multiselectable || undefined}\n className=\"oui-calendar__grid\"\n onKeyDown={onKeyDown}\n >\n <div role=\"row\" className=\"oui-calendar__row\">\n {days.slice(0, 7).map((date) => (\n <span\n key={date}\n role=\"columnheader\"\n className=\"oui-calendar__weekday\"\n aria-label={formats.weekdayLong.format(toUtcDate(date))}\n >\n {formats.weekdayShort.format(toUtcDate(date))}\n </span>\n ))}\n </div>\n {weeks.map((week) => (\n <div key={week[0]} role=\"row\" className=\"oui-calendar__row\">\n {week.map((date) => {\n const outside = date.slice(0, 7) !== month;\n // Side by side, each day appears once: in its own month.\n if (outside && count > 1) return <span key={date} role=\"gridcell\" className=\"oui-calendar__blank\" />;\n const state = dayState(date);\n return (\n <button\n key={date}\n type=\"button\"\n role=\"gridcell\"\n className=\"oui-calendar__day\"\n tabIndex={date === focused ? 0 : -1}\n aria-label={`${formatDateLong(date, locale)}, ${formats.weekdayLong.format(toUtcDate(date))}`}\n aria-selected={Boolean(state.selected || state.inRange)}\n aria-current={date === today ? 'date' : undefined}\n aria-disabled={disabled(date) || undefined}\n data-selected={state.selected ? '' : undefined}\n data-in-range={state.inRange ? '' : undefined}\n data-range-start={state.rangeStart ? '' : undefined}\n data-range-end={state.rangeEnd ? '' : undefined}\n data-today={date === today ? '' : undefined}\n data-outside={outside ? '' : undefined}\n data-disabled={disabled(date) ? '' : undefined}\n onClick={() => select(date)}\n onPointerEnter={onPreview ? () => onPreview(date) : undefined}\n >\n {Number(date.slice(8))}\n </button>\n );\n })}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport interface CalendarProps extends CalendarOptions {\n /** Selected day as an ISO date (`\"2026-03-09\"`). */\n value?: string | null;\n defaultValue?: string | null;\n onValueChange?: (value: string) => void;\n}\n\n/**\n * Month grid for picking one day. Keyboard: arrows move by day / week,\n * Home / End jump within the week, PageUp / PageDown change month (with Shift: year).\n * The month and year in the title open a list to jump straight to another one.\n */\nexport function Calendar({ value, defaultValue = null, onValueChange, ...props }: CalendarProps) {\n const [inner, setInner] = React.useState(() => datePart(defaultValue));\n const selected = value === undefined ? inner : datePart(value);\n return (\n <CalendarView\n target={selected}\n dayState={(date) => ({ selected: date === selected })}\n {...props}\n onPick={(date) => {\n setInner(date);\n onValueChange?.(date);\n }}\n />\n );\n}\n\nexport interface RangeCalendarProps extends CalendarOptions {\n /** Selected days as ISO dates; both ends are inclusive. */\n value?: DateRange | null;\n defaultValue?: DateRange | null;\n /** Called once both ends are picked, with `start` on or before `end`. */\n onValueChange?: (value: DateRange) => void;\n}\n\nconst rangeKey = (range: DateRange | null) => (range ? `${range.start}/${range.end}` : '');\n\n/**\n * Month grid for picking a range of days: the first pick sets one end, the\n * second completes the range (in either order). Same keyboard as Calendar.\n * Disabled days cannot be picked as an end but may fall inside a range.\n */\nexport function RangeCalendar({ value, defaultValue = null, onValueChange, ...props }: RangeCalendarProps) {\n const [inner, setInner] = React.useState(() => toRange(defaultValue?.start, defaultValue?.end));\n const range = value === undefined ? inner : toRange(value?.start, value?.end);\n // While one end is picked, the range runs from it to the hovered or focused day.\n const [anchor, setAnchor] = React.useState<string | null>(null);\n const [preview, setPreview] = React.useState<string | null>(null);\n const shown = anchor ? toRange(anchor, preview ?? anchor) : range;\n\n // Bring the range into view when it changes from outside, but not after a pick made here.\n const [seen, setSeen] = React.useState(() => rangeKey(range));\n const [target, setTarget] = React.useState(range?.start ?? null);\n if (rangeKey(range) !== seen) {\n setSeen(rangeKey(range));\n setTarget(range?.start ?? null);\n }\n\n const select = (date: string) => {\n if (!anchor) {\n setAnchor(date);\n setPreview(date);\n return;\n }\n const next = toRange(anchor, date);\n setAnchor(null);\n setPreview(null);\n if (!next) return;\n setInner(next);\n setSeen(rangeKey(next));\n onValueChange?.(next);\n };\n\n return (\n <CalendarView\n multiselectable\n data-selecting={anchor ? '' : undefined}\n target={target}\n dayState={(date) =>\n shown\n ? {\n selected: date === shown.start || date === shown.end,\n inRange: date >= shown.start && date <= shown.end,\n rangeStart: date === shown.start,\n rangeEnd: date === shown.end,\n }\n : {}\n }\n {...props}\n onPick={select}\n onPreview={(date) => {\n if (anchor) setPreview(date);\n }}\n />\n );\n}\n"],"mappings":";;;;;;;;AAkCA,IAAM2B,gBAAgC;CACpCR,eAAe;CACfC,WAAW;CACXC,cAAc;CACdC,UAAU;CACVC,eAAe;CACfC,WAAW;CACXC,aAAa;CACbC,YAAY;AACd;;AAYA,IAAMM,QAAQ;AAEd,IAAMC,UAAUC,SAAiBC,OAAOD,KAAKE,MAAM,GAAG,CAAC,CAAC;AACxD,IAAMC,eAAeH,SAAiBD,OAAOC,IAAI,IAAI,KAAKC,OAAOD,KAAKE,MAAM,GAAG,CAAC,CAAC;;AAyCjF,SAAS6B,OAAOC,MAAchC,MAAciC,OAAuB;CACjE,MAAMC,QAAQxD,aAAasB,IAAI;CAC/B,IAAIkC,QAAQF,MAAM,OAAOE;CACzB,OAAOA,QAAQ/D,UAAU6D,MAAMC,QAAQ,CAAC,IAAI9D,UAAU+D,OAAO,IAAID,KAAK,IAAID;AAC5E;;A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D;GACE,UAAA2D;GAQF,GAEJhC;GACIwD,QAAAA;GACG,WAAAhB;EAEV,CAAA;EACD3C,EAAA,MAAAG;EAAAH,EAAA,MAAA2D;EAAA3D,EAAA,MAAAiC;EAAAjC,EAAA,MAAAmC;EAAAnC,EAAA,MAAA2C;EAAA3C,EAAA,MAAAxB;EAAAwB,EAAA,MAAAqC;CAAA,OAAAA,MAAArC,EAAA;CAAA,OAnBFqC;AAmBE"}
|
|
1
|
+
{"version":3,"file":"Calendar.js","names":["React","cx","ChevronLeftIcon","ChevronRightIcon","addDays","addMonths","clampDate","datePart","formatDate","formatDateLong","monthGrid","pad","startOfMonth","toRange","toUtcDate","todayIso","weekday","DateRange","CalendarLabels","previousMonth","nextMonth","previousYear","nextYear","previousYears","nextYears","chooseMonth","chooseYear","defaultLabels","Chooser","index","mode","cursor","YEARS","yearOf","date","Number","slice","monthNumber","CalendarOptions","Omit","HTMLAttributes","HTMLDivElement","ref","Ref","min","max","isDateDisabled","defaultMonth","locale","weekStartsOn","numberOfMonths","autoFocus","labels","Partial","DayState","selected","inRange","rangeStart","rangeEnd","CalendarViewProps","target","dayState","onPick","onPreview","multiselectable","reveal","view","count","month","chooserItems","year","Array","from","length","_","start","Math","floor","offset","filter","item","map","CalendarView","t0","$","_c","className","props","t1","t2","undefined","t3","text","today","useState","t4","focused","setFocused","t5","setView","monthsRef","useRef","moveFocus","Boolean","titleId","useId","chooser","setChooser","seen","setSeen","t6","Symbol","for","current","months","querySelector","focus","t7","useEffect","t8","disabled","t10","t11","t12","t13","t14","t15","t9","formats","monthLong","Intl","DateTimeFormat","timeZone","weekdayShort","weekdayLong","yearText","_temp","go","date_1","next","page","amount","next_0","select","date_2","onKeyDown","event","next_1","ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End","PageUp","shiftKey","PageDown","move","key","preventDefault","day","earliest","latest","openChooser","closeChooser","moveChooser","amount_0","step","choose","current_0","date_3","next_2","onChooserKeyDown","current_1","event_0","stopPropagation","amount_1","months_0","index_0","previous","following","first","index_1","days","weeks","__0","week","choosing","choices","format","date_4","unit","unavailable","shown","date_5","week_0","date_6","outside","state","t16","t17","date_0","String","CalendarProps","value","defaultValue","onValueChange","Calendar","inner","setInner","RangeCalendarProps","rangeKey","range","end","RangeCalendar","anchor","setAnchor","preview","setPreview","setTarget","_c","_Fragment"],"sources":["../../../src/components/calendar/Calendar.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cx } from '../../utils/cx';\nimport { ChevronLeftIcon, ChevronRightIcon } from '../../icons';\nimport {\n addDays,\n addMonths,\n clampDate,\n datePart,\n formatDate,\n formatDateLong,\n monthGrid,\n pad,\n startOfMonth,\n toRange,\n toUtcDate,\n todayIso,\n weekday,\n type DateRange,\n} from './date-utils';\n\nexport type { DateRange };\nexport { formatDate, formatDateLong };\n\nexport interface CalendarLabels {\n previousMonth: string;\n nextMonth: string;\n previousYear: string;\n nextYear: string;\n previousYears: string;\n nextYears: string;\n chooseMonth: string;\n chooseYear: string;\n}\n\nconst defaultLabels: CalendarLabels = {\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n previousYears: 'Previous years',\n nextYears: 'Next years',\n chooseMonth: 'Choose month',\n chooseYear: 'Choose year',\n};\n\n/** The month or year list that replaces one month's day grid. */\ninterface Chooser {\n /** Which of the visible months it was opened from. */\n index: number;\n mode: 'months' | 'years';\n /** First day of the month that owns the list's tab stop. */\n cursor: string;\n}\n\n/** Years listed per page, in rows of three like the months. */\nconst YEARS = 12;\n\nconst yearOf = (date: string) => Number(date.slice(0, 4));\nconst monthNumber = (date: string) => yearOf(date) * 12 + Number(date.slice(5, 7));\n\ninterface CalendarOptions extends Omit<React.HTMLAttributes<HTMLDivElement>, 'defaultValue' | 'onChange'> {\n ref?: React.Ref<HTMLDivElement>;\n /** Earliest selectable day (ISO date). */\n min?: string;\n /** Latest selectable day (ISO date). */\n max?: string;\n /** Return true to make a day unselectable. */\n isDateDisabled?: (date: string) => boolean;\n /** Month shown first when there is no value (any ISO date in that month). */\n defaultMonth?: string;\n /** BCP 47 locale for month and weekday names. Defaults to the browser's. */\n locale?: string;\n /** First column: 0 = Sunday, 1 = Monday (default). */\n weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;\n /** Months shown side by side (default 1). */\n numberOfMonths?: number;\n /** Move focus to the selected day (or today) on mount, e.g. inside a popover. */\n autoFocus?: boolean;\n labels?: Partial<CalendarLabels>;\n}\n\ninterface DayState {\n selected?: boolean;\n inRange?: boolean;\n rangeStart?: boolean;\n rangeEnd?: boolean;\n}\n\ninterface CalendarViewProps extends CalendarOptions {\n /** Day the view opens on, and follows whenever it changes. */\n target: string | null;\n dayState: (date: string) => DayState;\n onPick: (date: string) => void;\n /** Reports the hovered or keyboard-focused day, and `null` when the pointer leaves. */\n onPreview?: (date: string | null) => void;\n multiselectable?: boolean;\n}\n\n/** The first visible month after moving `view` just enough to show `date`. */\nfunction reveal(view: string, date: string, count: number): string {\n const month = startOfMonth(date);\n if (month < view) return month;\n return month > addMonths(view, count - 1) ? addMonths(month, 1 - count) : view;\n}\n\n/** The months of the cursor's year, or the page of years around it. */\nfunction chooserItems({ mode, cursor }: Chooser): string[] {\n const year = yearOf(cursor);\n if (mode === 'months') return Array.from({ length: 12 }, (_, month) => `${cursor.slice(0, 5)}${pad(month + 1)}-01`);\n const start = Math.floor((year - 1) / YEARS) * YEARS + 1;\n return Array.from({ length: YEARS }, (_, offset) => start + offset)\n .filter((item) => item <= 9999)\n .map((item) => `${pad(item, 4)}${cursor.slice(4, 8)}01`);\n}\n\n/** Month grids, navigation and keyboard handling shared by Calendar and RangeCalendar. */\nfunction CalendarView({\n target,\n dayState,\n onPick,\n onPreview,\n multiselectable,\n min,\n max,\n isDateDisabled,\n defaultMonth,\n locale,\n weekStartsOn = 1,\n numberOfMonths = 1,\n autoFocus,\n labels,\n className,\n ref,\n ...props\n}: CalendarViewProps) {\n const text = { ...defaultLabels, ...labels };\n const count = Math.max(1, Math.floor(numberOfMonths));\n const [today] = React.useState(todayIso);\n\n // The day that owns the grid's tab stop.\n const [focused, setFocused] = React.useState(() => clampDate(target ?? datePart(defaultMonth) ?? today, min, max));\n // The first visible month; it moves just enough to keep the focused day on screen.\n const [view, setView] = React.useState(() => startOfMonth(focused));\n const monthsRef = React.useRef<HTMLDivElement>(null);\n const moveFocus = React.useRef(Boolean(autoFocus));\n const titleId = React.useId();\n const [chooser, setChooser] = React.useState<Chooser | null>(null);\n\n // Follow the target when it changes from outside.\n const [seen, setSeen] = React.useState(target);\n if (target !== seen) {\n setSeen(target);\n if (target) {\n setFocused(target);\n setView(reveal(view, target, count));\n }\n }\n\n React.useEffect(() => {\n if (!moveFocus.current) return;\n moveFocus.current = false;\n const months = monthsRef.current;\n (\n months?.querySelector<HTMLElement>('.oui-calendar__choice[tabindex=\"0\"]') ??\n months?.querySelector<HTMLElement>('[tabindex=\"0\"]')\n )?.focus();\n }, [focused, chooser]);\n\n const disabled = (date: string) =>\n Boolean((min && date < min) || (max && date > max) || isDateDisabled?.(date));\n\n const formats = {\n monthLong: new Intl.DateTimeFormat(locale, { month: 'long', timeZone: 'UTC' }),\n month: new Intl.DateTimeFormat(locale, { month: 'short', timeZone: 'UTC' }),\n weekdayShort: new Intl.DateTimeFormat(locale, { weekday: 'short', timeZone: 'UTC' }),\n weekdayLong: new Intl.DateTimeFormat(locale, { weekday: 'long', timeZone: 'UTC' }),\n };\n\n const yearText = (date: string) => String(yearOf(date));\n\n const go = (date: string) => {\n const next = clampDate(date, min, max);\n moveFocus.current = true;\n setFocused(next);\n setView(reveal(view, next, count));\n return next;\n };\n\n // The navigation buttons page the view and carry the tab stop along without moving focus.\n const page = (amount: number) => {\n const next = clampDate(addMonths(focused, amount), min, max);\n setFocused(next);\n setView(reveal(addMonths(view, amount), next, count));\n };\n\n const select = (date: string) => {\n if (disabled(date)) return;\n go(date);\n onPick(date);\n };\n\n const onKeyDown = (event: React.KeyboardEvent) => {\n const offset = (weekday(focused) - weekStartsOn + 7) % 7;\n const next: Record<string, () => string> = {\n ArrowLeft: () => addDays(focused, -1),\n ArrowRight: () => addDays(focused, 1),\n ArrowUp: () => addDays(focused, -7),\n ArrowDown: () => addDays(focused, 7),\n Home: () => addDays(focused, -offset),\n End: () => addDays(focused, 6 - offset),\n PageUp: () => addMonths(focused, event.shiftKey ? -12 : -1),\n PageDown: () => addMonths(focused, event.shiftKey ? 12 : 1),\n };\n const move = next[event.key];\n if (!move) return;\n event.preventDefault();\n // Not inline: an absent onPreview would skip evaluating its argument, and with it the move.\n const day = go(move());\n onPreview?.(day);\n };\n\n // The months the chooser can reach.\n const earliest = startOfMonth(min ?? '0001-01-01');\n const latest = startOfMonth(max ?? '9999-12-01');\n\n const openChooser = (index: number, mode: Chooser['mode'], cursor: string) => {\n moveFocus.current = true;\n setChooser({ index, mode, cursor: clampDate(cursor, earliest, latest) });\n };\n\n const closeChooser = () => {\n moveFocus.current = true;\n setChooser(null);\n };\n\n const moveChooser = (current: Chooser, amount: number, focus: boolean) => {\n const step = current.mode === 'months' ? amount : amount * 12;\n // Stay within the years an ISO date can spell.\n if (monthNumber(current.cursor) + step < 13 || monthNumber(current.cursor) + step > 9999 * 12 + 12) return;\n moveFocus.current = focus;\n setChooser({ ...current, cursor: clampDate(addMonths(current.cursor, step), earliest, latest) });\n };\n\n const choose = (current: Chooser, date: string) => {\n if (current.mode === 'years') {\n openChooser(current.index, 'months', date);\n return;\n }\n // Keep the day of the month, and put the chosen month where the chooser was opened.\n const next = clampDate(addMonths(focused, monthNumber(date) - monthNumber(focused)), min, max);\n moveFocus.current = true;\n setFocused(next);\n setView(reveal(addMonths(date, -current.index), next, count));\n setChooser(null);\n };\n\n const onChooserKeyDown = (current: Chooser) => (event: React.KeyboardEvent) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n event.stopPropagation();\n closeChooser();\n return;\n }\n const amount = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -3, ArrowDown: 3, PageUp: -YEARS, PageDown: YEARS }[event.key];\n if (!amount) return;\n event.preventDefault();\n moveChooser(current, amount, true);\n };\n\n const months = Array.from({ length: count }, (_, index) => addMonths(view, index));\n const previous = addDays(view, -1);\n const following = addMonths(view, count);\n\n return (\n <div ref={ref} className={cx('oui-calendar', className)} {...props}>\n <div\n ref={monthsRef}\n className=\"oui-calendar__months\"\n onPointerLeave={onPreview ? () => onPreview(null) : undefined}\n >\n {months.map((first, index) => {\n const days = monthGrid(first, weekStartsOn);\n const month = first.slice(0, 7);\n const weeks = Array.from({ length: 6 }, (_, week) => days.slice(week * 7, week * 7 + 7));\n const choosing = chooser?.index === index ? chooser : null;\n const choices = choosing ? chooserItems(choosing) : [];\n return (\n <div key={month} className=\"oui-calendar__month\">\n <div className=\"oui-calendar__header\">\n {choosing ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={choosing.mode === 'months' ? text.previousYear : text.previousYears}\n disabled={choices[0].slice(0, 4) <= earliest.slice(0, 4)}\n onClick={() => moveChooser(choosing, -YEARS, false)}\n >\n <ChevronLeftIcon />\n </button>\n ) : index === 0 ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={text.previousMonth}\n disabled={Boolean(min && previous < min)}\n onClick={() => page(-1)}\n >\n <ChevronLeftIcon />\n </button>\n ) : (\n <span className=\"oui-calendar__nav-spacer\" />\n )}\n <div id={`${titleId}-${index}`} className=\"oui-calendar__title\" aria-live=\"polite\">\n {!choosing ? (\n // Year first, as in the written date format: \"2026. March\".\n <>\n <button\n type=\"button\"\n className=\"oui-calendar__title-button\"\n title={text.chooseYear}\n onClick={() => openChooser(index, 'years', first)}\n >\n {yearText(first)}\n </button>\n {'. '}\n <button\n type=\"button\"\n className=\"oui-calendar__title-button\"\n title={text.chooseMonth}\n onClick={() => openChooser(index, 'months', first)}\n >\n {formats.monthLong.format(toUtcDate(first))}\n </button>\n </>\n ) : choosing.mode === 'months' ? (\n <button\n type=\"button\"\n className=\"oui-calendar__title-button\"\n title={text.chooseYear}\n onClick={() => openChooser(index, 'years', choosing.cursor)}\n >\n {yearText(choosing.cursor)}\n </button>\n ) : (\n `${yearText(choices[0])} – ${yearText(choices[choices.length - 1])}`\n )}\n </div>\n {choosing ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={choosing.mode === 'months' ? text.nextYear : text.nextYears}\n disabled={choices[choices.length - 1].slice(0, 4) >= latest.slice(0, 4)}\n onClick={() => moveChooser(choosing, YEARS, false)}\n >\n <ChevronRightIcon />\n </button>\n ) : index === count - 1 ? (\n <button\n type=\"button\"\n className=\"oui-calendar__nav\"\n aria-label={text.nextMonth}\n disabled={Boolean(max && following > max)}\n onClick={() => page(1)}\n >\n <ChevronRightIcon />\n </button>\n ) : (\n <span className=\"oui-calendar__nav-spacer\" />\n )}\n </div>\n {choosing ? (\n <div\n role=\"group\"\n aria-labelledby={`${titleId}-${index}`}\n className=\"oui-calendar__choices\"\n onKeyDown={onChooserKeyDown(choosing)}\n >\n {choices.map((date) => {\n const unit = choosing.mode === 'months' ? 7 : 4;\n const key = date.slice(0, unit);\n const unavailable = key < earliest.slice(0, unit) || key > latest.slice(0, unit);\n const shown = key === first.slice(0, unit);\n return (\n <button\n key={date}\n type=\"button\"\n className=\"oui-calendar__choice\"\n tabIndex={key === choosing.cursor.slice(0, unit) ? 0 : -1}\n aria-pressed={shown}\n aria-disabled={unavailable || undefined}\n data-selected={shown ? '' : undefined}\n data-today={key === today.slice(0, unit) ? '' : undefined}\n data-disabled={unavailable ? '' : undefined}\n onClick={unavailable ? undefined : () => choose(choosing, date)}\n >\n {choosing.mode === 'months' ? formats.month.format(toUtcDate(date)) : yearText(date)}\n </button>\n );\n })}\n </div>\n ) : (\n <div\n role=\"grid\"\n aria-labelledby={`${titleId}-${index}`}\n aria-multiselectable={multiselectable || undefined}\n className=\"oui-calendar__grid\"\n onKeyDown={onKeyDown}\n >\n <div role=\"row\" className=\"oui-calendar__row\">\n {days.slice(0, 7).map((date) => (\n <span\n key={date}\n role=\"columnheader\"\n className=\"oui-calendar__weekday\"\n aria-label={formats.weekdayLong.format(toUtcDate(date))}\n >\n {formats.weekdayShort.format(toUtcDate(date))}\n </span>\n ))}\n </div>\n {weeks.map((week) => (\n <div key={week[0]} role=\"row\" className=\"oui-calendar__row\">\n {week.map((date) => {\n const outside = date.slice(0, 7) !== month;\n // Side by side, each day appears once: in its own month.\n if (outside && count > 1) return <span key={date} role=\"gridcell\" className=\"oui-calendar__blank\" />;\n const state = dayState(date);\n return (\n <button\n key={date}\n type=\"button\"\n role=\"gridcell\"\n className=\"oui-calendar__day\"\n tabIndex={date === focused ? 0 : -1}\n aria-label={`${formatDateLong(date, locale)}, ${formats.weekdayLong.format(toUtcDate(date))}`}\n aria-selected={Boolean(state.selected || state.inRange)}\n aria-current={date === today ? 'date' : undefined}\n aria-disabled={disabled(date) || undefined}\n data-selected={state.selected ? '' : undefined}\n data-in-range={state.inRange ? '' : undefined}\n data-range-start={state.rangeStart ? '' : undefined}\n data-range-end={state.rangeEnd ? '' : undefined}\n data-today={date === today ? '' : undefined}\n data-outside={outside ? '' : undefined}\n data-disabled={disabled(date) ? '' : undefined}\n onClick={() => select(date)}\n onPointerEnter={onPreview ? () => onPreview(date) : undefined}\n >\n {Number(date.slice(8))}\n </button>\n );\n })}\n </div>\n ))}\n </div>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport interface CalendarProps extends CalendarOptions {\n /** Selected day as an ISO date (`\"2026-03-09\"`). */\n value?: string | null;\n /** Initially selected day (ISO date) when uncontrolled. */\n defaultValue?: string | null;\n /** Called with the picked day as an ISO date. */\n onValueChange?: (value: string) => void;\n}\n\n/**\n * Month grid for picking one day. Keyboard: arrows move by day / week,\n * Home / End jump within the week, PageUp / PageDown change month (with Shift: year).\n * The month and year in the title open a list to jump straight to another one.\n */\nexport function Calendar({ value, defaultValue = null, onValueChange, ...props }: CalendarProps) {\n const [inner, setInner] = React.useState(() => datePart(defaultValue));\n const selected = value === undefined ? inner : datePart(value);\n return (\n <CalendarView\n target={selected}\n dayState={(date) => ({ selected: date === selected })}\n {...props}\n onPick={(date) => {\n setInner(date);\n onValueChange?.(date);\n }}\n />\n );\n}\n\nexport interface RangeCalendarProps extends CalendarOptions {\n /** Selected days as ISO dates; both ends are inclusive. */\n value?: DateRange | null;\n /** Initially selected range when uncontrolled. */\n defaultValue?: DateRange | null;\n /** Called once both ends are picked, with `start` on or before `end`. */\n onValueChange?: (value: DateRange) => void;\n}\n\nconst rangeKey = (range: DateRange | null) => (range ? `${range.start}/${range.end}` : '');\n\n/**\n * Month grid for picking a range of days: the first pick sets one end, the\n * second completes the range (in either order). Same keyboard as Calendar.\n * Disabled days cannot be picked as an end but may fall inside a range.\n */\nexport function RangeCalendar({ value, defaultValue = null, onValueChange, ...props }: RangeCalendarProps) {\n const [inner, setInner] = React.useState(() => toRange(defaultValue?.start, defaultValue?.end));\n const range = value === undefined ? inner : toRange(value?.start, value?.end);\n // While one end is picked, the range runs from it to the hovered or focused day.\n const [anchor, setAnchor] = React.useState<string | null>(null);\n const [preview, setPreview] = React.useState<string | null>(null);\n const shown = anchor ? toRange(anchor, preview ?? anchor) : range;\n\n // Bring the range into view when it changes from outside, but not after a pick made here.\n const [seen, setSeen] = React.useState(() => rangeKey(range));\n const [target, setTarget] = React.useState(range?.start ?? null);\n if (rangeKey(range) !== seen) {\n setSeen(rangeKey(range));\n setTarget(range?.start ?? null);\n }\n\n const select = (date: string) => {\n if (!anchor) {\n setAnchor(date);\n setPreview(date);\n return;\n }\n const next = toRange(anchor, date);\n setAnchor(null);\n setPreview(null);\n if (!next) return;\n setInner(next);\n setSeen(rangeKey(next));\n onValueChange?.(next);\n };\n\n return (\n <CalendarView\n multiselectable\n data-selecting={anchor ? '' : undefined}\n target={target}\n dayState={(date) =>\n shown\n ? {\n selected: date === shown.start || date === shown.end,\n inRange: date >= shown.start && date <= shown.end,\n rangeStart: date === shown.start,\n rangeEnd: date === shown.end,\n }\n : {}\n }\n {...props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AQ+J,MAAKtH,SAAUzC,UAAQ+J,MAAKoB;GAAI5J,YACrCvB,WAAS+J,MAAKtH;GAAMjB,UACtBxB,WAAS+J,MAAKoB;EAEzB,IAPL,CAOK;EAACjI,EAAA,MAAA6G;EAAA7G,EAAA,MAAAmC;CAAA,OAAAA,KAAAnC,EAAA;CAAA,IAAA2C;CAAA,IAAA3C,EAAA,QAAAmI,QAAA;EAIGxF,MAAAW,WAAA;GACT,IAAI6E,QAAQG,WAAWxL,MAAI;EAAE;EAC9BkD,EAAA,MAAAmI;EAAAnI,EAAA,MAAA2C;CAAA,OAAAA,KAAA3C,EAAA;CAAA,IAAAqC;CAAA,IAAArC,EAAA,QAAAG,SAAAH,EAAA,QAAA2D,UAAA3D,EAAA,QAAAiC,MAAAjC,EAAA,QAAAmC,MAAAnC,EAAA,QAAA2C,MAAA3C,EAAA,QAAAxB,QAAA;EAlBH6D,MAAA,oBAAC,cAAD;GACE,iBAAA;GACgB,kBAAAJ;GACRzD;GACE,UAAA2D;GAQF,GAEJhC;GACIwD,QAAAA;GACG,WAAAhB;EAEV,CAAA;EACD3C,EAAA,MAAAG;EAAAH,EAAA,MAAA2D;EAAA3D,EAAA,MAAAiC;EAAAjC,EAAA,MAAAmC;EAAAnC,EAAA,MAAA2C;EAAA3C,EAAA,MAAAxB;EAAAwB,EAAA,MAAAqC;CAAA,OAAAA,MAAArC,EAAA;CAAA,OAnBFqC;AAmBE"}
|
|
@@ -14,6 +14,19 @@ export interface CardProps extends useRender.ComponentProps<'div', CardState> {
|
|
|
14
14
|
/** Adds hover and focus states — use with `render={<a href=… />}` or a click handler. */
|
|
15
15
|
interactive?: boolean;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Surface that groups related content. Compose with `CardHeader` (`CardTitle`, `CardDescription`,
|
|
19
|
+
* `CardActions`), `CardContent` and `CardFooter`.
|
|
20
|
+
*
|
|
21
|
+
* @example
|
|
22
|
+
* <Card variant="elevated">
|
|
23
|
+
* <CardHeader>
|
|
24
|
+
* <CardTitle>Monthly energy</CardTitle>
|
|
25
|
+
* <CardDescription>Last 30 days</CardDescription>
|
|
26
|
+
* </CardHeader>
|
|
27
|
+
* <CardContent>…</CardContent>
|
|
28
|
+
* </Card>
|
|
29
|
+
*/
|
|
17
30
|
export declare function Card({ variant, padding, interactive, render, ref, ...props }: CardProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
18
31
|
export declare const CardHeader: {
|
|
19
32
|
(props: import("../../utils/primitive").PrimitiveProps<"div">): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -4,6 +4,19 @@ import { c } from "react/compiler-runtime";
|
|
|
4
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
5
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
6
|
//#region src/components/card/Card.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Surface that groups related content. Compose with `CardHeader` (`CardTitle`, `CardDescription`,
|
|
9
|
+
* `CardActions`), `CardContent` and `CardFooter`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <Card variant="elevated">
|
|
13
|
+
* <CardHeader>
|
|
14
|
+
* <CardTitle>Monthly energy</CardTitle>
|
|
15
|
+
* <CardDescription>Last 30 days</CardDescription>
|
|
16
|
+
* </CardHeader>
|
|
17
|
+
* <CardContent>…</CardContent>
|
|
18
|
+
* </Card>
|
|
19
|
+
*/
|
|
7
20
|
function Card(t0) {
|
|
8
21
|
const $ = c(17);
|
|
9
22
|
let t1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Card.js","names":["useRender","mergeProps","createPrimitive","CardVariant","CardPadding","CardState","variant","padding","interactive","CardProps","ComponentProps","Card","t0","$","_c","t1","t2","t3","t4","t5","t6","t7","t8","t9","render","ref","props","undefined","t10","state","className","defaultTagName","CardHeader","CardTitle","CardDescription","CardActions","CardContent","CardFooter","_c"],"sources":["../../../src/components/card/Card.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { createPrimitive } from '../../utils/primitive';\n\nexport type CardVariant = 'outlined' | 'elevated' | 'filled' | 'ghost';\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\n\nexport type CardState = {\n variant: CardVariant;\n padding: CardPadding;\n interactive: boolean;\n};\n\nexport interface CardProps extends useRender.ComponentProps<'div', CardState> {\n /** `outlined` (default) uses the card border, `elevated` a soft shadow. */\n variant?: CardVariant;\n /** Inner spacing. Override with `--oui-card-padding`. */\n padding?: CardPadding;\n /** Adds hover and focus states — use with `render={<a href=… />}` or a click handler. */\n interactive?: boolean;\n}\n\nexport function Card({ variant = 'outlined', padding = 'md', interactive = false, render, ref, ...props }: CardProps) {\n const state: CardState = { variant, padding, interactive };\n return useRender({\n defaultTagName: 'div',\n render,\n ref,\n state,\n props: mergeProps<'div'>({ className: 'oui-card' }, props),\n });\n}\n\nexport const CardHeader = createPrimitive('div', 'oui-card__header', 'CardHeader');\nexport const CardTitle = createPrimitive('h3', 'oui-card__title', 'CardTitle');\nexport const CardDescription = createPrimitive('p', 'oui-card__description', 'CardDescription');\n/** Right-aligned slot inside CardHeader for icon buttons or menus. */\nexport const CardActions = createPrimitive('div', 'oui-card__actions', 'CardActions');\nexport const CardContent = createPrimitive('div', 'oui-card__content', 'CardContent');\nexport const CardFooter = createPrimitive('div', 'oui-card__footer', 'CardFooter');\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Card.js","names":["useRender","mergeProps","createPrimitive","CardVariant","CardPadding","CardState","variant","padding","interactive","CardProps","ComponentProps","Card","t0","$","_c","t1","t2","t3","t4","t5","t6","t7","t8","t9","render","ref","props","undefined","t10","state","className","defaultTagName","CardHeader","CardTitle","CardDescription","CardActions","CardContent","CardFooter","_c"],"sources":["../../../src/components/card/Card.tsx"],"sourcesContent":["import { useRender } from '@base-ui/react/use-render';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { createPrimitive } from '../../utils/primitive';\n\nexport type CardVariant = 'outlined' | 'elevated' | 'filled' | 'ghost';\nexport type CardPadding = 'none' | 'sm' | 'md' | 'lg';\n\nexport type CardState = {\n variant: CardVariant;\n padding: CardPadding;\n interactive: boolean;\n};\n\nexport interface CardProps extends useRender.ComponentProps<'div', CardState> {\n /** `outlined` (default) uses the card border, `elevated` a soft shadow. */\n variant?: CardVariant;\n /** Inner spacing. Override with `--oui-card-padding`. */\n padding?: CardPadding;\n /** Adds hover and focus states — use with `render={<a href=… />}` or a click handler. */\n interactive?: boolean;\n}\n\n/**\n * Surface that groups related content. Compose with `CardHeader` (`CardTitle`, `CardDescription`,\n * `CardActions`), `CardContent` and `CardFooter`.\n *\n * @example\n * <Card variant=\"elevated\">\n * <CardHeader>\n * <CardTitle>Monthly energy</CardTitle>\n * <CardDescription>Last 30 days</CardDescription>\n * </CardHeader>\n * <CardContent>…</CardContent>\n * </Card>\n */\nexport function Card({ variant = 'outlined', padding = 'md', interactive = false, render, ref, ...props }: CardProps) {\n const state: CardState = { variant, padding, interactive };\n return useRender({\n defaultTagName: 'div',\n render,\n ref,\n state,\n props: mergeProps<'div'>({ className: 'oui-card' }, props),\n });\n}\n\nexport const CardHeader = createPrimitive('div', 'oui-card__header', 'CardHeader');\nexport const CardTitle = createPrimitive('h3', 'oui-card__title', 'CardTitle');\nexport const CardDescription = createPrimitive('p', 'oui-card__description', 'CardDescription');\n/** Right-aligned slot inside CardHeader for icon buttons or menus. */\nexport const CardActions = createPrimitive('div', 'oui-card__actions', 'CardActions');\nexport const CardContent = createPrimitive('div', 'oui-card__content', 'CardContent');\nexport const CardFooter = createPrimitive('div', 'oui-card__footer', 'CardFooter');\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAmCA,SAAOW,KAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAC;CAAA,IAAAP,E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AAL,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANMb,GAAUqB,EAMhB;AAAC;AAGJ,IAAaW,aAAa9B,gBAAgB,OAAO,oBAAoB,YAAY;AACjF,IAAa+B,YAAY/B,gBAAgB,MAAM,mBAAmB,WAAW;AAC7E,IAAagC,kBAAkBhC,gBAAgB,KAAK,yBAAyB,iBAAiB;;AAE9F,IAAaiC,cAAcjC,gBAAgB,OAAO,qBAAqB,aAAa;AACpF,IAAakC,cAAclC,gBAAgB,OAAO,qBAAqB,aAAa;AACpF,IAAamC,aAAanC,gBAAgB,OAAO,oBAAoB,YAAY"}
|
|
@@ -10,23 +10,36 @@ interface ChoiceLabelProps {
|
|
|
10
10
|
label?: React.ReactNode;
|
|
11
11
|
/** Secondary text under the label. */
|
|
12
12
|
description?: React.ReactNode;
|
|
13
|
+
/** Control size. */
|
|
13
14
|
size?: ChoiceSize;
|
|
14
15
|
}
|
|
15
16
|
export interface CheckboxProps extends BaseCheckbox.Root.Props, ChoiceLabelProps {
|
|
16
17
|
}
|
|
18
|
+
/** Checkbox with optional `label` and `description`. Supports `indeterminate`. */
|
|
17
19
|
export declare function Checkbox({ label, description, size, className, ref, ...props }: CheckboxProps): React.JSX.Element;
|
|
18
20
|
export interface CheckboxGroupProps extends BaseCheckboxGroup.Props {
|
|
21
|
+
/** Layout direction of the checkboxes. */
|
|
19
22
|
orientation?: 'vertical' | 'horizontal';
|
|
20
23
|
}
|
|
24
|
+
/** Manages the checked values of several `Checkbox` children (`value` / `onValueChange`). */
|
|
21
25
|
export declare function CheckboxGroup({ orientation, className, ref, ...props }: CheckboxGroupProps): React.JSX.Element;
|
|
22
26
|
export interface RadioGroupProps extends BaseRadioGroup.Props {
|
|
27
|
+
/** Layout direction of the radios. */
|
|
23
28
|
orientation?: 'vertical' | 'horizontal';
|
|
24
29
|
}
|
|
30
|
+
/** Single-choice group for `Radio` children (`value` / `onValueChange`). */
|
|
25
31
|
export declare function RadioGroup({ orientation, className, ref, ...props }: RadioGroupProps): React.JSX.Element;
|
|
26
32
|
export interface RadioProps extends BaseRadio.Root.Props, ChoiceLabelProps {
|
|
27
33
|
}
|
|
34
|
+
/** Radio button with optional `label` and `description`. Use inside `RadioGroup`; each needs a `value`. */
|
|
28
35
|
export declare function Radio({ label, description, size, className, ref, ...props }: RadioProps): React.JSX.Element;
|
|
29
36
|
export interface SwitchProps extends BaseSwitch.Root.Props, ChoiceLabelProps {
|
|
30
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* On/off switch with optional `label` and `description`.
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* <Switch label="Email alerts" checked={on} onCheckedChange={setOn} />
|
|
43
|
+
*/
|
|
31
44
|
export declare function Switch({ label, description, size, className, ref, ...props }: SwitchProps): React.JSX.Element;
|
|
32
45
|
export {};
|
|
@@ -59,6 +59,7 @@ function ChoiceLabel(t0) {
|
|
|
59
59
|
} else t5 = $[11];
|
|
60
60
|
return t5;
|
|
61
61
|
}
|
|
62
|
+
/** Checkbox with optional `label` and `description`. Supports `indeterminate`. */
|
|
62
63
|
function Checkbox$1(t0) {
|
|
63
64
|
const $ = c(21);
|
|
64
65
|
let className;
|
|
@@ -139,6 +140,7 @@ function _temp(indicatorProps, state) {
|
|
|
139
140
|
children: state.indeterminate ? /* @__PURE__ */ jsx(MinusIcon, { strokeWidth: 3 }) : /* @__PURE__ */ jsx(CheckIcon, { strokeWidth: 3 })
|
|
140
141
|
});
|
|
141
142
|
}
|
|
143
|
+
/** Manages the checked values of several `Checkbox` children (`value` / `onValueChange`). */
|
|
142
144
|
function CheckboxGroup$1(t0) {
|
|
143
145
|
const $ = c(12);
|
|
144
146
|
let className;
|
|
@@ -181,6 +183,7 @@ function CheckboxGroup$1(t0) {
|
|
|
181
183
|
} else t3 = $[11];
|
|
182
184
|
return t3;
|
|
183
185
|
}
|
|
186
|
+
/** Single-choice group for `Radio` children (`value` / `onValueChange`). */
|
|
184
187
|
function RadioGroup$1(t0) {
|
|
185
188
|
const $ = c(12);
|
|
186
189
|
let className;
|
|
@@ -223,6 +226,7 @@ function RadioGroup$1(t0) {
|
|
|
223
226
|
} else t3 = $[11];
|
|
224
227
|
return t3;
|
|
225
228
|
}
|
|
229
|
+
/** Radio button with optional `label` and `description`. Use inside `RadioGroup`; each needs a `value`. */
|
|
226
230
|
function Radio$1(t0) {
|
|
227
231
|
const $ = c(21);
|
|
228
232
|
let className;
|
|
@@ -294,6 +298,12 @@ function Radio$1(t0) {
|
|
|
294
298
|
} else t5 = $[20];
|
|
295
299
|
return t5;
|
|
296
300
|
}
|
|
301
|
+
/**
|
|
302
|
+
* On/off switch with optional `label` and `description`.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* <Switch label="Email alerts" checked={on} onCheckedChange={setOn} />
|
|
306
|
+
*/
|
|
297
307
|
function Switch$1(t0) {
|
|
298
308
|
const $ = c(21);
|
|
299
309
|
let className;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Choice.js","names":["React","Checkbox","BaseCheckbox","CheckboxGroup","BaseCheckboxGroup","Radio","BaseRadio","RadioGroup","BaseRadioGroup","Switch","BaseSwitch","withClass","CheckIcon","MinusIcon","ChoiceSize","ChoiceLabelProps","label","ReactNode","description","size","ChoiceLabel","t0","$","_c","control","disabled","t1","undefined","t2","t3","t4","t5","CheckboxProps","Root","Props","className","props","ref","Symbol","for","_temp","indicatorProps","state","indeterminate","CheckboxGroupProps","orientation","RadioGroupProps","RadioProps","SwitchProps","_c","Checkbox","BaseCheckbox","CheckboxGroup","BaseCheckboxGroup","RadioGroup","BaseRadioGroup","Radio","BaseRadio","Switch","BaseSwitch"],"sources":["../../../src/components/choice/Choice.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { CheckboxGroup as BaseCheckboxGroup } from '@base-ui/react/checkbox-group';\nimport { Radio as BaseRadio } from '@base-ui/react/radio';\nimport { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';\nimport { Switch as BaseSwitch } from '@base-ui/react/switch';\nimport { withClass } from '../../utils/cx';\nimport { CheckIcon, MinusIcon } from '../../icons';\n\nexport type ChoiceSize = 'sm' | 'md';\n\ninterface ChoiceLabelProps {\n /** Visible label. Wraps the control in a `<label>` when set. */\n label?: React.ReactNode;\n /** Secondary text under the label. */\n description?: React.ReactNode;\n size?: ChoiceSize;\n}\n\nfunction ChoiceLabel({\n control,\n label,\n description,\n size,\n disabled,\n}: ChoiceLabelProps & { control: React.ReactElement; disabled?: boolean }) {\n if (label == null && description == null) return control;\n return (\n <label className=\"oui-choice\" data-size={size} data-disabled={disabled || undefined}>\n {control}\n <span className=\"oui-choice__text\">\n {label != null && <span className=\"oui-choice__label\">{label}</span>}\n {description != null && <span className=\"oui-choice__description\">{description}</span>}\n </span>\n </label>\n );\n}\n\n// ─── Checkbox ────────────────────────────────────────────────────────────────\n\nexport interface CheckboxProps extends BaseCheckbox.Root.Props, ChoiceLabelProps {}\n\nexport function Checkbox({ label, description, size = 'md', className, ref, ...props }: CheckboxProps) {\n const control = (\n <BaseCheckbox.Root ref={ref} className={withClass('oui-checkbox', className)} data-size={size} {...props}>\n <BaseCheckbox.Indicator\n className=\"oui-checkbox__indicator\"\n render={(indicatorProps, state) => (\n <span {...indicatorProps}>{state.indeterminate ? <MinusIcon strokeWidth={3} /> : <CheckIcon strokeWidth={3} />}</span>\n )}\n />\n </BaseCheckbox.Root>\n );\n return <ChoiceLabel control={control} label={label} description={description} size={size} disabled={props.disabled} />;\n}\n\nexport interface CheckboxGroupProps extends BaseCheckboxGroup.Props {\n orientation?: 'vertical' | 'horizontal';\n}\n\nexport function CheckboxGroup({ orientation = 'vertical', className, ref, ...props }: CheckboxGroupProps) {\n return (\n <BaseCheckboxGroup\n ref={ref}\n className={withClass('oui-choice-group', className)}\n data-orientation={orientation}\n {...props}\n />\n );\n}\n\n// ─── Radio ───────────────────────────────────────────────────────────────────\n\nexport interface RadioGroupProps extends BaseRadioGroup.Props {\n orientation?: 'vertical' | 'horizontal';\n}\n\nexport function RadioGroup({ orientation = 'vertical', className, ref, ...props }: RadioGroupProps) {\n return (\n <BaseRadioGroup\n ref={ref}\n className={withClass('oui-choice-group', className)}\n data-orientation={orientation}\n {...props}\n />\n );\n}\n\nexport interface RadioProps extends BaseRadio.Root.Props, ChoiceLabelProps {}\n\nexport function Radio({ label, description, size = 'md', className, ref, ...props }: RadioProps) {\n const control = (\n <BaseRadio.Root ref={ref} className={withClass('oui-radio', className)} data-size={size} {...props}>\n <BaseRadio.Indicator className=\"oui-radio__indicator\" />\n </BaseRadio.Root>\n );\n return <ChoiceLabel control={control} label={label} description={description} size={size} disabled={props.disabled} />;\n}\n\n// ─── Switch ──────────────────────────────────────────────────────────────────\n\nexport interface SwitchProps extends BaseSwitch.Root.Props, ChoiceLabelProps {}\n\nexport function Switch({ label, description, size = 'md', className, ref, ...props }: SwitchProps) {\n const control = (\n <BaseSwitch.Root ref={ref} className={withClass('oui-switch', className)} data-size={size} {...props}>\n <BaseSwitch.Thumb className=\"oui-switch__thumb\" />\n </BaseSwitch.Root>\n );\n return (\n <ChoiceLabel\n control={control}\n label={label}\n description={description}\n size={size}\n disabled={props.disabled}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,SAAAoB,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAqB,MAAA,EAAAC,SAAAR,OAAAE,aAAAC,MAAAM,aAAAJ;CAOnB,IAAIL,SAAS,QAAQE,eAAe,MAAI,OAASM;CAEe,MAAAE,KAAAD,YAAAE,KAAAA;CAAqB,IAAAC;CAAA,IAAAN,EAAA,OAAAN,OAAA;EAG9EY,KAAAZ,SAAS,QAAQ,oBAAA,QAAA;GAAgB,WAAA;GAAqBA,UAAAA;EAAa,CAAA;EAAAM,EAAA,KAAAN;EAAAM,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IA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A,MAAA;GAAsBtB;GAAgB,WAAAT;GAA+CT,aAAAA;GAAI,GAAMiB;GAC7FP,UAAAA;EACF,CAAA;EAAkBP,EAAA,MAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAH;EAAAG,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAHpB,MAAAE,UACEM;CAGA,IAAAC;CAAA,IAAAT,EAAA,QAAAE,WAAAF,EAAA,QAAAJ,eAAAI,EAAA,QAAAN,SAAAM,EAAA,QAAAc,MAAAX,YAAAH,EAAA,QAAAH,MAAA;EAEAY,KAAA,oBAAC,aAAD;GACWP;GACFR;GACME;GACPC;GACI,UAAAiB,MAAKX;EAAS,CAAA;EACxBH,EAAA,MAAAE;EAAAF,EAAA,MAAAJ;EAAAI,EAAA,MAAAN;EAAAM,EAAA,MAAAc,MAAAX;EAAAH,EAAA,MAAAH;EAAAG,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OANFS;AAME"}
|
|
1
|
+
{"version":3,"file":"Choice.js","names":["React","Checkbox","BaseCheckbox","CheckboxGroup","BaseCheckboxGroup","Radio","BaseRadio","RadioGroup","BaseRadioGroup","Switch","BaseSwitch","withClass","CheckIcon","MinusIcon","ChoiceSize","ChoiceLabelProps","label","ReactNode","description","size","ChoiceLabel","t0","$","_c","control","disabled","t1","undefined","t2","t3","t4","t5","CheckboxProps","Root","Props","className","props","ref","Symbol","for","_temp","indicatorProps","state","indeterminate","CheckboxGroupProps","orientation","RadioGroupProps","RadioProps","SwitchProps","_c","Checkbox","BaseCheckbox","CheckboxGroup","BaseCheckboxGroup","RadioGroup","BaseRadioGroup","Radio","BaseRadio","Switch","BaseSwitch"],"sources":["../../../src/components/choice/Choice.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Checkbox as BaseCheckbox } from '@base-ui/react/checkbox';\nimport { CheckboxGroup as BaseCheckboxGroup } from '@base-ui/react/checkbox-group';\nimport { Radio as BaseRadio } from '@base-ui/react/radio';\nimport { RadioGroup as BaseRadioGroup } from '@base-ui/react/radio-group';\nimport { Switch as BaseSwitch } from '@base-ui/react/switch';\nimport { withClass } from '../../utils/cx';\nimport { CheckIcon, MinusIcon } from '../../icons';\n\nexport type ChoiceSize = 'sm' | 'md';\n\ninterface ChoiceLabelProps {\n /** Visible label. Wraps the control in a `<label>` when set. */\n label?: React.ReactNode;\n /** Secondary text under the label. */\n description?: React.ReactNode;\n /** Control size. */\n size?: ChoiceSize;\n}\n\nfunction ChoiceLabel({\n control,\n label,\n description,\n size,\n disabled,\n}: ChoiceLabelProps & { control: React.ReactElement; disabled?: boolean }) {\n if (label == null && description == null) return control;\n return (\n <label className=\"oui-choice\" data-size={size} data-disabled={disabled || undefined}>\n {control}\n <span className=\"oui-choice__text\">\n {label != null && <span className=\"oui-choice__label\">{label}</span>}\n {description != null && <span className=\"oui-choice__description\">{description}</span>}\n </span>\n </label>\n );\n}\n\n// ─── Checkbox ────────────────────────────────────────────────────────────────\n\nexport interface CheckboxProps extends BaseCheckbox.Root.Props, ChoiceLabelProps {}\n\n/** Checkbox with optional `label` and `description`. Supports `indeterminate`. */\nexport function Checkbox({ label, description, size = 'md', className, ref, ...props }: CheckboxProps) {\n const control = (\n <BaseCheckbox.Root ref={ref} className={withClass('oui-checkbox', className)} data-size={size} {...props}>\n <BaseCheckbox.Indicator\n className=\"oui-checkbox__indicator\"\n render={(indicatorProps, state) => (\n <span {...indicatorProps}>{state.indeterminate ? <MinusIcon strokeWidth={3} /> : <CheckIcon strokeWidth={3} />}</span>\n )}\n />\n </BaseCheckbox.Root>\n );\n return <ChoiceLabel control={control} label={label} description={description} size={size} disabled={props.disabled} />;\n}\n\nexport interface CheckboxGroupProps extends BaseCheckboxGroup.Props {\n /** Layout direction of the checkboxes. */\n orientation?: 'vertical' | 'horizontal';\n}\n\n/** Manages the checked values of several `Checkbox` children (`value` / `onValueChange`). */\nexport function CheckboxGroup({ orientation = 'vertical', className, ref, ...props }: CheckboxGroupProps) {\n return (\n <BaseCheckboxGroup\n ref={ref}\n className={withClass('oui-choice-group', className)}\n data-orientation={orientation}\n {...props}\n />\n );\n}\n\n// ─── Radio ───────────────────────────────────────────────────────────────────\n\nexport interface RadioGroupProps extends BaseRadioGroup.Props {\n /** Layout direction of the radios. */\n orientation?: 'vertical' | 'horizontal';\n}\n\n/** Single-choice group for `Radio` children (`value` / `onValueChange`). */\nexport function RadioGroup({ orientation = 'vertical', className, ref, ...props }: RadioGroupProps) {\n return (\n <BaseRadioGroup\n ref={ref}\n className={withClass('oui-choice-group', className)}\n data-orientation={orientation}\n {...props}\n />\n );\n}\n\nexport interface RadioProps extends BaseRadio.Root.Props, ChoiceLabelProps {}\n\n/** Radio button with optional `label` and `description`. Use inside `RadioGroup`; each needs a `value`. */\nexport function Radio({ label, description, size = 'md', className, ref, ...props }: RadioProps) {\n const control = (\n <BaseRadio.Root ref={ref} className={withClass('oui-radio', className)} data-size={size} {...props}>\n <BaseRadio.Indicator className=\"oui-radio__indicator\" />\n </BaseRadio.Root>\n );\n return <ChoiceLabel control={control} label={label} description={description} size={size} disabled={props.disabled} />;\n}\n\n// ─── Switch ──────────────────────────────────────────────────────────────────\n\nexport interface SwitchProps extends BaseSwitch.Root.Props, ChoiceLabelProps {}\n\n/**\n * On/off switch with optional `label` and `description`.\n *\n * @example\n * <Switch label=\"Email alerts\" checked={on} onCheckedChange={setOn} />\n */\nexport function Switch({ label, description, size = 'md', className, ref, ...props }: SwitchProps) {\n const control = (\n <BaseSwitch.Root ref={ref} className={withClass('oui-switch', className)} data-size={size} {...props}>\n <BaseSwitch.Thumb className=\"oui-switch__thumb\" />\n </BaseSwitch.Root>\n );\n return (\n <ChoiceLabel\n control={control}\n label={label}\n description={description}\n size={size}\n disabled={props.disabled}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;AAoBA,SAAAoB,YAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAqB,MAAA,EAAAC,SAAAR,OAA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AN,EAAA;CAAA,IAAAO;CAAA,IAAAP,EAAA,OAAAgB,OAAAC,IAAA,2BAAA,GAAA;EACtEV,KAAA,oBAAA8B,OAAA,OAAA,EAA4B,WAAA,oBAAmB,CAAA;EAAGrC,EAAA,KAAAO;CAAA,OAAAA,KAAAP,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,QAAAc,SAAAd,EAAA,QAAAe,OAAAf,EAAA,QAAAH,QAAAG,EAAA,QAAAM,IAAA;EADpDE,KAAA,oBAAA6B,OAAA,MAAA;GAAsBtB;GAAgB,WAAAT;GAA+CT,aAAAA;GAAI,GAAMiB;GAC7FP,UAAAA;EACF,CAAA;EAAkBP,EAAA,MAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAH;EAAAG,EAAA,MAAAM;EAAAN,EAAA,MAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAHpB,MAAAE,UACEM;CAGA,IAAAC;CAAA,IAAAT,EAAA,QAAAE,WAAAF,EAAA,QAAAJ,eAAAI,EAAA,QAAAN,SAAAM,EAAA,QAAAc,MAAAX,YAAAH,EAAA,QAAAH,MAAA;EAEAY,KAAA,oBAAC,aAAD;GACWP;GACFR;GACME;GACPC;GACI,UAAAiB,MAAKX;EAAS,CAAA;EACxBH,EAAA,MAAAE;EAAAF,EAAA,MAAAJ;EAAAI,EAAA,MAAAN;EAAAM,EAAA,MAAAc,MAAAX;EAAAH,EAAA,MAAAH;EAAAG,EAAA,MAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OANFS;AAME"}
|
|
@@ -2,6 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { Combobox as BaseCombobox } from '@base-ui/react/combobox';
|
|
3
3
|
import type { ControlSize } from '../input/Input';
|
|
4
4
|
export interface ComboboxInputGroupProps extends BaseCombobox.InputGroup.Props {
|
|
5
|
+
/** Control height. */
|
|
5
6
|
size?: ControlSize;
|
|
6
7
|
}
|
|
7
8
|
declare function ComboboxInputGroup({ size, className, ref, ...props }: ComboboxInputGroupProps): React.JSX.Element;
|
|
@@ -9,9 +10,13 @@ declare function ComboboxInput({ className, ref, ...props }: BaseCombobox.Input.
|
|
|
9
10
|
declare function ComboboxTrigger({ className, children, ref, ...props }: BaseCombobox.Trigger.Props): React.JSX.Element;
|
|
10
11
|
declare function ComboboxClear({ className, children, ref, ...props }: BaseCombobox.Clear.Props): React.JSX.Element;
|
|
11
12
|
export interface ComboboxContentProps extends BaseCombobox.Popup.Props {
|
|
13
|
+
/** Which side of the input the list opens on. */
|
|
12
14
|
side?: BaseCombobox.Positioner.Props['side'];
|
|
15
|
+
/** Alignment along that side. */
|
|
13
16
|
align?: BaseCombobox.Positioner.Props['align'];
|
|
17
|
+
/** Distance from the input in px. */
|
|
14
18
|
sideOffset?: BaseCombobox.Positioner.Props['sideOffset'];
|
|
19
|
+
/** Props for the positioner element that places the popup. */
|
|
15
20
|
positionerProps?: BaseCombobox.Positioner.Props;
|
|
16
21
|
}
|
|
17
22
|
declare function ComboboxContent({ side, align, sideOffset, positionerProps, className, ref, ...props }: ComboboxContentProps): React.JSX.Element;
|
|
@@ -30,16 +35,23 @@ export interface ComboboxOption {
|
|
|
30
35
|
}
|
|
31
36
|
type RootProps = Omit<BaseCombobox.Root.Props<ComboboxOption, boolean | undefined>, 'items' | 'children'>;
|
|
32
37
|
export interface ComboboxProps extends RootProps {
|
|
38
|
+
/** Options to choose from. */
|
|
33
39
|
items: ComboboxOption[];
|
|
40
|
+
/** Visible field label. */
|
|
34
41
|
label?: React.ReactNode;
|
|
42
|
+
/** Help text under the input. */
|
|
35
43
|
description?: React.ReactNode;
|
|
44
|
+
/** Error message. When set, the field is marked invalid. */
|
|
36
45
|
error?: React.ReactNode;
|
|
46
|
+
/** Placeholder shown while nothing is typed or selected. */
|
|
37
47
|
placeholder?: string;
|
|
38
48
|
/** Shown when the filter matches nothing. */
|
|
39
49
|
emptyText?: React.ReactNode;
|
|
50
|
+
/** Control height. */
|
|
40
51
|
size?: ControlSize;
|
|
41
52
|
/** Hide the clear button. */
|
|
42
53
|
hideClear?: boolean;
|
|
54
|
+
/** Props for the text input. */
|
|
43
55
|
inputProps?: BaseCombobox.Input.Props;
|
|
44
56
|
}
|
|
45
57
|
declare function ComboboxComponent({ items, label, description, error, placeholder, emptyText, size, hideClear, inputProps, name, disabled, required, multiple, ...rootProps }: ComboboxProps): React.JSX.Element;
|