@sesamehr/react-design-system 2.0.0-beta.4 → 2.0.0-beta.6

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.
Files changed (36) hide show
  1. package/dist/Button/IconButton/IconButton.d.ts +32 -0
  2. package/dist/Button/IconButton/index.d.ts +27 -0
  3. package/dist/Data/Table/Table.d.ts +1 -1
  4. package/dist/Data/Table/TableSelectCell/TableSelectCell.d.ts +8 -0
  5. package/dist/Data/Table/hooks/useTableVirtual/useTableVirtual.d.ts +1 -1
  6. package/dist/Data/Table/hooks/useTableVirtual/useTableVirtual.types.d.ts +15 -3
  7. package/dist/Data/Table/index.d.ts +0 -1
  8. package/dist/Display/AvatarDetails/AvatarDetails.d.ts +31 -0
  9. package/dist/Display/AvatarDetails/index.d.ts +1 -0
  10. package/dist/Display/Chip/Chip.d.ts +7 -1
  11. package/dist/Display/Chip/index.d.ts +9 -4
  12. package/dist/Feedback/Loader/Loader.d.ts +16 -0
  13. package/dist/Feedback/Loader/index.d.ts +2 -0
  14. package/dist/Feedback/Progress/Progress.d.ts +3 -0
  15. package/dist/Feedback/Progress/index.d.ts +17 -0
  16. package/dist/Forms/Inputs/Calendar/Calendar.d.ts +60 -0
  17. package/dist/Forms/Inputs/Calendar/CalendarDay.d.ts +37 -0
  18. package/dist/Forms/Inputs/Calendar/CalendarRange.d.ts +61 -0
  19. package/dist/Forms/Inputs/Calendar/constraints.d.ts +19 -0
  20. package/dist/Forms/Inputs/Calendar/index.d.ts +20 -0
  21. package/dist/Forms/Inputs/Calendar/testids.d.ts +25 -0
  22. package/dist/Forms/Inputs/Calendar/useCalendarLocale.d.ts +22 -0
  23. package/dist/Forms/Inputs/Combobox/ComboboxCancel.d.ts +14 -0
  24. package/dist/Forms/Inputs/Combobox/ComboboxChipsInput.d.ts +4 -0
  25. package/dist/Forms/Inputs/Combobox/index.d.ts +1 -0
  26. package/dist/Forms/Inputs/Combobox/useChipOverflow.d.ts +30 -0
  27. package/dist/Forms/Inputs/SearchBar/SearchBar.d.ts +35 -0
  28. package/dist/Forms/Inputs/SearchBar/index.d.ts +22 -0
  29. package/dist/Forms/Inputs/SearchBar/useSearchDelay.d.ts +24 -0
  30. package/dist/Forms/Inputs/index.d.ts +2 -0
  31. package/dist/main.d.ts +5 -2
  32. package/dist/react-design-system.css +1 -1
  33. package/dist/react-design-system.js +13560 -9624
  34. package/dist/react-design-system.umd.cjs +58 -48
  35. package/package.json +3 -1
  36. package/dist/Data/Table/TableAvatar/TableAvatar.d.ts +0 -14
@@ -0,0 +1,22 @@
1
+ import { VariantProps } from 'class-variance-authority';
2
+ export { SearchBar } from './SearchBar.tsx';
3
+ export type { SearchBarProps } from './SearchBar.tsx';
4
+ export { useSearchDelay } from './useSearchDelay.ts';
5
+ export type { UseSearchDelayReturn } from './useSearchDelay.ts';
6
+ /**
7
+ * Class names, not utilities — see `Button/index.ts` for why the package
8
+ * cannot publish `.h-10` and `.rounded-lg` of its own. `SearchBar.module.css`
9
+ * gives each of these names its declarations, and `moduleClasses` does the
10
+ * lookup.
11
+ *
12
+ * Only two axes here. Figma models a third, `State`, with `Default | Focus |
13
+ * Filled`, and none of it belongs in a prop: focus is `:focus-within` and
14
+ * filled is "the input has a value". Both are things the component can see for
15
+ * itself, and a `state` prop would be asking the caller to keep telling it
16
+ * something it already knows — wrong the moment the two disagree.
17
+ */
18
+ export declare const searchBarVariants: (props?: ({
19
+ variant?: "default" | "ghost" | null | undefined;
20
+ size?: "sm" | "md" | null | undefined;
21
+ } & import('class-variance-authority/types').ClassProp) | undefined) => string;
22
+ export type SearchBarVariants = VariantProps<typeof searchBarVariants>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * The quiet period between typing and searching — mirrors
3
+ * `@sesame/orxata-core` `useSearchDelay`.
4
+ *
5
+ * A search field that emits on every keystroke turns "María" into five
6
+ * requests, four of which are already stale by the time they land. Waiting for
7
+ * typing to stop collapses them into one.
8
+ *
9
+ * Two ways in, because the two are not the same event. `schedule` is typing:
10
+ * every keystroke restarts the clock, so only the pause at the end fires.
11
+ * `immediately` is an explicit request — the clear button, Enter — where the
12
+ * user has said what they want and there is nothing left to wait for; it also
13
+ * drops whatever `schedule` had pending, which would otherwise fire a moment
14
+ * later with a term the user has already moved on from.
15
+ */
16
+ export interface UseSearchDelayReturn {
17
+ /** Restart the quiet period; emit when it elapses. */
18
+ schedule: (term: string) => void;
19
+ /** Emit now, dropping anything pending. */
20
+ immediately: (term: string) => void;
21
+ /** Drop anything pending without emitting. */
22
+ cancel: () => void;
23
+ }
24
+ export declare const useSearchDelay: (delay: number, emit: (term: string) => void) => UseSearchDelayReturn;
@@ -3,6 +3,8 @@ export { InputText, type InputTextProps } from './InputText/InputText.tsx';
3
3
  export * from './InputNumber/index.ts';
4
4
  export * from './InputPassword/index.ts';
5
5
  export * from './InputOtp/index.ts';
6
+ export * from './Calendar/index.ts';
6
7
  export * from './Combobox/index.ts';
8
+ export * from './SearchBar/index.ts';
7
9
  export * from './Select/index.ts';
8
10
  export * from './Toggle/index.ts';
package/dist/main.d.ts CHANGED
@@ -6,6 +6,7 @@ export { TransitionSlideY as OxTransitionSlideY } from './Transitions/Transition
6
6
  export { TransitionExpand as OxTransitionExpand } from './Transitions/TransitionExpand/TransitionExpand.tsx';
7
7
  export { TransitionFlip as OxTransitionFlip } from './Transitions/TransitionFlip/TransitionFlip.tsx';
8
8
  export { Button as OxButton, buttonVariants, type ButtonVariants, } from './Button/index.ts';
9
+ export { IconButton as OxIconButton, iconButtonVariants, type IconButtonVariants, } from './Button/IconButton/index.ts';
9
10
  export { Card as OxCard, cardVariants, type CardVariants, } from './Layout/Card/index.ts';
10
11
  export { CardStack as OxCardStack, CARD_STACK_DECK, } from './Layout/CardStack/index.ts';
11
12
  export { Divider as OxDivider, type DividerProps, } from './Layout/Divider/index.ts';
@@ -13,6 +14,7 @@ export { Resizable as OxResizable, ResizablePanel as OxResizablePanel, Resizable
13
14
  export { LocaleProvider as OxLocaleProvider } from './Locale/index.ts';
14
15
  export { normalizeLocale, useLocale } from './Locale/index.ts';
15
16
  export { AvatarRounded as OxAvatarRounded, AvatarSquare as OxAvatarSquare, avatarRoundedVariants, avatarSquareVariants, type AvatarRoundedVariants, type AvatarSize, type AvatarSquareVariants, type AvatarTone, } from './Display/Avatar/index.ts';
17
+ export { AvatarDetails as OxAvatarDetails } from './Display/AvatarDetails/index.ts';
16
18
  export { AvatarGroup as OxAvatarGroup, type AvatarItem, } from './Display/AvatarGroup/index.ts';
17
19
  export { Badge as OxBadge, badgeVariants, type BadgeVariants, } from './Display/Badge/index.ts';
18
20
  export { CalendarDate as OxCalendarDate, calendarDateVariants, type CalendarDateVariants, } from './Display/CalendarDate/index.ts';
@@ -24,6 +26,7 @@ export { Chip as OxChip, chipVariants, type ChipVariants, } from './Display/Chip
24
26
  export { PointMarker as OxPointMarker, pointMarkerVariants, type PointMarkerVariants, } from './Display/PointMarker/index.ts';
25
27
  export { StatusBadge as OxStatusBadge, statusBadgeVariants, indicatorVariants, type StatusBadgeVariants, } from './Feedback/StatusBadge/index.ts';
26
28
  export { Bullet as OxBullet, bulletVariants, type BulletVariants, } from './Feedback/Bullet/index.ts';
29
+ export { Loader as OxLoader } from './Feedback/Loader/index.ts';
27
30
  export { Progress as OxProgress } from './Feedback/Progress/index.ts';
28
31
  export { Alert as OxAlert, AlertClose as OxAlertClose, AlertDescription as OxAlertDescription, AlertIcon as OxAlertIcon, AlertTitle as OxAlertTitle, AlertToggle as OxAlertToggle, } from './Feedback/Alert/index.ts';
29
32
  export { Dialog as OxDialog, DialogContent as OxDialogContent, DialogTitle as OxDialogTitle, DialogDescription as OxDialogDescription, DialogOverlay as OxDialogOverlay, DialogTwoPanelContent as OxDialogTwoPanelContent, DialogTrigger as OxDialogTrigger, DialogClose as OxDialogClose, } from './Feedback/Dialog/index.ts';
@@ -35,6 +38,6 @@ export { PageControl as OxPageControl, pageControlDots, PAGE_CONTROL_WINDOW, typ
35
38
  export { Breadcrumb as OxBreadcrumb, BreadcrumbList as OxBreadcrumbList, BreadcrumbItem as OxBreadcrumbItem, BreadcrumbLink as OxBreadcrumbLink, BreadcrumbPage as OxBreadcrumbPage, BreadcrumbSeparator as OxBreadcrumbSeparator, BreadcrumbEllipsis as OxBreadcrumbEllipsis, } from './Navigation/Breadcrumb/index.ts';
36
39
  export { Counter as OxCounter, counterVariants, type CounterVariants, } from './Forms/Field/Counter/index.ts';
37
40
  export { FieldGroup as OxFieldGroup, FieldLabel as OxFieldLabel, FieldMessage as OxFieldMessage, type FieldGroupProps, } from './Forms/Field/index.ts';
38
- export { InputGroup as OxInputGroup, InputText as OxInputText, InputNumber as OxInputNumber, InputNumberContent as OxInputNumberContent, InputNumberDecrement as OxInputNumberDecrement, InputNumberIncrement as OxInputNumberIncrement, InputNumberInput as OxInputNumberInput, InputPassword as OxInputPassword, InputPasswordInput as OxInputPasswordInput, InputPasswordToggle as OxInputPasswordToggle, useInputPassword, InputOtp as OxInputOtp, InputOtpGroup as OxInputOtpGroup, InputOtpSlot as OxInputOtpSlot, InputOtpSeparator as OxInputOtpSeparator, useInputOtp, Combobox as OxCombobox, ComboboxInput as OxComboboxInput, ComboboxChipsInput as OxComboboxChipsInput, ComboboxContent as OxComboboxContent, ComboboxItem as OxComboboxItem, ComboboxEmpty as OxComboboxEmpty, ComboboxGroup as OxComboboxGroup, ComboboxSeparator as OxComboboxSeparator, Select as OxSelect, SelectTrigger as OxSelectTrigger, SelectContent as OxSelectContent, SelectItem as OxSelectItem, SelectGroup as OxSelectGroup, SelectSeparator as OxSelectSeparator, Switch as OxSwitch, Checkbox as OxCheckbox, RadioButton as OxRadioButton, RadioGroup as OxRadioGroup, ToggleGroup as OxToggleGroup, ToggleLabel as OxToggleLabel, ToggleDescription as OxToggleDescription, SWITCH_SIZES, type InputNumberProps, type InputPasswordProps, type InputPasswordContext, type InputOtpProps, type InputOtpSlotProps, type InputOtpContext, type ComboboxProps, type SelectProps, type RadioGroupProps, type ToggleGroupProps, type ToggleLabelProps, type ToggleDescriptionProps, } from './Forms/Inputs/index.ts';
39
- export { Table as OxTable, TableVirtualized as OxTableVirtualized, TableHead as OxTableHead, TableBody as OxTableBody, TableRow as OxTableRow, TableCell as OxTableCell, TableHeaderCell as OxTableHeaderCell, TableSelectCell as OxTableSelectCell, TableDragCell as OxTableDragCell, TableBulkHeader as OxTableBulkHeader, TablePagination as OxTablePagination, TableEmpty as OxTableEmpty, TableAvatar as OxTableAvatar, TableRowExpanded as OxTableRowExpanded, TableExpandCell as OxTableExpandCell, TableColumnVisibility as OxTableColumnVisibility, useTable, useTableSelection, useTableSorting, useTablePagination, useTableDetailRow, useTablePinning, useTableColumns, useScrollShadow, useDragToScroll, useFixedColumns, useTableVirtual, } from './Data/Table/index.ts';
41
+ export { InputGroup as OxInputGroup, InputText as OxInputText, InputNumber as OxInputNumber, InputNumberContent as OxInputNumberContent, InputNumberDecrement as OxInputNumberDecrement, InputNumberIncrement as OxInputNumberIncrement, InputNumberInput as OxInputNumberInput, InputPassword as OxInputPassword, InputPasswordInput as OxInputPasswordInput, InputPasswordToggle as OxInputPasswordToggle, useInputPassword, InputOtp as OxInputOtp, InputOtpGroup as OxInputOtpGroup, InputOtpSlot as OxInputOtpSlot, InputOtpSeparator as OxInputOtpSeparator, useInputOtp, Calendar as OxCalendar, CalendarRange as OxCalendarRange, CalendarDay as OxCalendarDay, calendarDayVariants, Combobox as OxCombobox, ComboboxCancel as OxComboboxCancel, ComboboxInput as OxComboboxInput, ComboboxChipsInput as OxComboboxChipsInput, ComboboxContent as OxComboboxContent, ComboboxItem as OxComboboxItem, ComboboxEmpty as OxComboboxEmpty, ComboboxGroup as OxComboboxGroup, ComboboxSeparator as OxComboboxSeparator, SearchBar as OxSearchBar, searchBarVariants, useSearchDelay, Select as OxSelect, SelectTrigger as OxSelectTrigger, SelectContent as OxSelectContent, SelectItem as OxSelectItem, SelectGroup as OxSelectGroup, SelectSeparator as OxSelectSeparator, Switch as OxSwitch, Checkbox as OxCheckbox, RadioButton as OxRadioButton, RadioGroup as OxRadioGroup, ToggleGroup as OxToggleGroup, ToggleLabel as OxToggleLabel, ToggleDescription as OxToggleDescription, SWITCH_SIZES, type InputNumberProps, type InputPasswordProps, type InputPasswordContext, type InputOtpProps, type InputOtpSlotProps, type InputOtpContext, type CalendarProps, type CalendarRangeProps, type CalendarDateRange, type CalendarDayProps, type CalendarDayState, type CalendarDayVariants, type CalendarConstraints, type ComboboxProps, type SearchBarVariants, type UseSearchDelayReturn, type SelectProps, type RadioGroupProps, type ToggleGroupProps, type ToggleLabelProps, type ToggleDescriptionProps, } from './Forms/Inputs/index.ts';
42
+ export { Table as OxTable, TableVirtualized as OxTableVirtualized, TableHead as OxTableHead, TableBody as OxTableBody, TableRow as OxTableRow, TableCell as OxTableCell, TableHeaderCell as OxTableHeaderCell, TableSelectCell as OxTableSelectCell, TableDragCell as OxTableDragCell, TableBulkHeader as OxTableBulkHeader, TablePagination as OxTablePagination, TableEmpty as OxTableEmpty, TableRowExpanded as OxTableRowExpanded, TableExpandCell as OxTableExpandCell, TableColumnVisibility as OxTableColumnVisibility, useTable, useTableSelection, useTableSorting, useTablePagination, useTableDetailRow, useTablePinning, useTableColumns, useScrollShadow, useDragToScroll, useFixedColumns, useTableVirtual, } from './Data/Table/index.ts';
40
43
  export type { UseTableOptions, UseTableReturn, UseTableSelectionReturn, UseTableSortingReturn, UseTablePaginationOptions, UseTablePaginationReturn, DetailRowInstance, DetailRowOptions, DetailRowPluginDef, UseTablePinningOptions, UseTablePinningReturn, CellInfo, HeaderInfo, UseTableVirtualOptions, UseTableVirtualReturn, UseTableColumnsOptions, UseTableColumnsReturn, UseScrollShadowOptions, UseScrollShadowReturn, UseDragToScrollOptions, UseDragToScrollReturn, UseFixedColumnsOptions, TableProps, TableMode, ColumnDef, ColumnAlign, CellContext, SortingState, PaginationState, PaginationChangePayload, SortingChangePayload, SelectionChangePayload, FilterChangePayload, ColumnResizeMode, ColumnVisibilityState, ColumnOrderState, ExpandedState, ColumnVisibilityChangePayload, ColumnOrderChangePayload, RowExpandChangePayload, ColumnResizePayload, ColumnPinningState, } from './Data/Table/index.ts';