@sprinklrjs/spaceweb 14.16.1 → 14.16.3

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 (118) hide show
  1. package/_hds_internal_deprecations.d.ts +863 -0
  2. package/_hds_internal_deprecations.js +345 -0
  3. package/asyncSelect/hooks/useAsyncSelect.d.ts +3 -3
  4. package/asyncSelect/hooks/useGroupedAsyncSelect.d.ts +3 -3
  5. package/avatar/avatar.js +3 -3
  6. package/avatar/types.d.ts +1 -1
  7. package/banner/types.d.ts +1 -1
  8. package/baseui/datepicker/day.js +21 -8
  9. package/baseui/select/dropdown.d.ts +1 -1
  10. package/baseui/select/select-component.d.ts +1 -1
  11. package/button-group/ButtonGroup.d.ts +2 -2
  12. package/button-group/StatefulButtonGroup.d.ts +2 -2
  13. package/button-group/styled-components.d.ts +2 -2
  14. package/button-group/types.d.ts +6 -4
  15. package/checkbox/types.d.ts +4 -4
  16. package/date-input/DateInput.js +3 -0
  17. package/date-picker/types.d.ts +2 -6
  18. package/esm/_hds_internal_deprecations.d.ts +863 -0
  19. package/esm/_hds_internal_deprecations.js +342 -0
  20. package/esm/asyncSelect/hooks/useAsyncSelect.d.ts +3 -3
  21. package/esm/asyncSelect/hooks/useGroupedAsyncSelect.d.ts +3 -3
  22. package/esm/avatar/avatar.js +3 -3
  23. package/esm/avatar/types.d.ts +1 -1
  24. package/esm/banner/types.d.ts +1 -1
  25. package/esm/baseui/datepicker/day.js +21 -8
  26. package/esm/baseui/select/dropdown.d.ts +1 -1
  27. package/esm/baseui/select/select-component.d.ts +1 -1
  28. package/esm/button-group/ButtonGroup.d.ts +2 -2
  29. package/esm/button-group/StatefulButtonGroup.d.ts +2 -2
  30. package/esm/button-group/styled-components.d.ts +2 -2
  31. package/esm/button-group/types.d.ts +6 -4
  32. package/esm/checkbox/types.d.ts +4 -4
  33. package/esm/date-input/DateInput.js +3 -0
  34. package/esm/date-picker/types.d.ts +2 -6
  35. package/esm/form-control/types.d.ts +1 -1
  36. package/esm/image/types.d.ts +1 -1
  37. package/esm/input/number/base-input.d.ts +1 -1
  38. package/esm/input/types.d.ts +6 -13
  39. package/esm/menu/StatefulSubMenu.d.ts +1 -1
  40. package/esm/menu/SubMenu.d.ts +1 -1
  41. package/esm/menu/menu-item.d.ts +1 -1
  42. package/esm/menu/types.d.ts +1 -3
  43. package/esm/modal/types.d.ts +1 -6
  44. package/esm/popover/popover.d.ts +1 -1
  45. package/esm/progressSteps/types.d.ts +2 -0
  46. package/esm/radio/types.d.ts +8 -8
  47. package/esm/search/types.d.ts +6 -6
  48. package/esm/select/base-select.d.ts +1 -1
  49. package/esm/select/default-props.d.ts +1 -1
  50. package/esm/select/nested-select.d.ts +2 -2
  51. package/esm/select/select.d.ts +1 -1
  52. package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +1 -1
  53. package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +1 -1
  54. package/esm/select/stateful-select.d.ts +1 -1
  55. package/esm/select/types.d.ts +1 -1
  56. package/esm/slider/types.d.ts +2 -2
  57. package/esm/stack/stack.d.ts +5 -5
  58. package/esm/tabs/hooks/useScrollableTabs.d.ts +1 -1
  59. package/esm/tabs/types.d.ts +8 -9
  60. package/esm/tag/types.d.ts +7 -10
  61. package/esm/test-utils/keyboard/focusLock.d.ts +19 -0
  62. package/esm/test-utils/keyboard/focusLock.js +31 -0
  63. package/esm/test-utils/keyboard/index.d.ts +15 -0
  64. package/esm/test-utils/keyboard/index.js +15 -0
  65. package/esm/test-utils/keyboard/patterns.d.ts +63 -0
  66. package/esm/test-utils/keyboard/patterns.js +178 -0
  67. package/esm/test-utils/keyboard/press.d.ts +12 -0
  68. package/esm/test-utils/keyboard/press.js +22 -0
  69. package/esm/textarea/types.d.ts +10 -5
  70. package/esm/tooltip/disabled-tooltip-container.d.ts +1 -1
  71. package/esm/tooltip/stateful-tooltip-container.d.ts +1 -1
  72. package/esm/tooltip/stateful-tooltip.d.ts +1 -1
  73. package/esm/tooltip/types.d.ts +9 -21
  74. package/esm/types.d.ts +4 -1
  75. package/esm/typography/types.d.ts +63 -4
  76. package/form-control/types.d.ts +1 -1
  77. package/image/types.d.ts +1 -1
  78. package/input/number/base-input.d.ts +1 -1
  79. package/input/types.d.ts +6 -13
  80. package/menu/StatefulSubMenu.d.ts +1 -1
  81. package/menu/SubMenu.d.ts +1 -1
  82. package/menu/menu-item.d.ts +1 -1
  83. package/menu/types.d.ts +1 -3
  84. package/modal/types.d.ts +1 -6
  85. package/package.json +12 -2
  86. package/popover/popover.d.ts +1 -1
  87. package/progressSteps/types.d.ts +2 -0
  88. package/radio/types.d.ts +8 -8
  89. package/search/types.d.ts +6 -6
  90. package/select/base-select.d.ts +1 -1
  91. package/select/default-props.d.ts +1 -1
  92. package/select/nested-select.d.ts +2 -2
  93. package/select/select.d.ts +1 -1
  94. package/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +1 -1
  95. package/select/selectMenuAdapter/SelectMenuItem.d.ts +1 -1
  96. package/select/stateful-select.d.ts +1 -1
  97. package/select/types.d.ts +1 -1
  98. package/slider/types.d.ts +2 -2
  99. package/stack/stack.d.ts +5 -5
  100. package/tabs/hooks/useScrollableTabs.d.ts +1 -1
  101. package/tabs/types.d.ts +8 -9
  102. package/tag/types.d.ts +7 -10
  103. package/test-utils/keyboard/focusLock.d.ts +19 -0
  104. package/test-utils/keyboard/focusLock.js +35 -0
  105. package/test-utils/keyboard/index.d.ts +15 -0
  106. package/test-utils/keyboard/index.js +27 -0
  107. package/test-utils/keyboard/patterns.d.ts +63 -0
  108. package/test-utils/keyboard/patterns.js +185 -0
  109. package/test-utils/keyboard/press.d.ts +12 -0
  110. package/test-utils/keyboard/press.js +30 -0
  111. package/textarea/types.d.ts +10 -5
  112. package/tooltip/disabled-tooltip-container.d.ts +1 -1
  113. package/tooltip/stateful-tooltip-container.d.ts +1 -1
  114. package/tooltip/stateful-tooltip.d.ts +1 -1
  115. package/tooltip/types.d.ts +9 -21
  116. package/tsconfig.build.tsbuildinfo +1 -1
  117. package/types.d.ts +4 -1
  118. package/typography/types.d.ts +63 -4
@@ -74,13 +74,9 @@ export type StatelessDatePickerProps = Omit<BaseDatepickerProps, 'timeSelectStar
74
74
  formatString?: string;
75
75
  getDefaultTime?: (date: Date) => Date;
76
76
  weekStartsOn?: WeekStartsOn;
77
- /**
78
- * @deprecated This will be removed in next major release. Spaceweb will handle this prop.
79
- */
77
+ /** @deprecated Not supported in Hyperspace. */
80
78
  peekNextMonth?: boolean;
81
- /**
82
- * @deprecated This will be removed in next major release. Spaceweb will handle this prop.
83
- */
79
+ /** @deprecated Not supported in Hyperspace. */
84
80
  fixedHeight?: boolean;
85
81
  };
86
82
  export type StatefulContainerProps = {
@@ -33,7 +33,7 @@ export type FormControlProps = {
33
33
  error?: React.ReactNode;
34
34
  positive?: React.ReactNode;
35
35
  htmlFor?: string;
36
- /** @deprecated defaults to vertical */
36
+ /** @deprecated Not supported in Hyperspace. Defaults to 'vertical'. */
37
37
  layout?: layout;
38
38
  overrides?: FormControlOverrides;
39
39
  required?: boolean;
@@ -19,7 +19,7 @@ export type DefaultFallbackProps = SpacewebComponentProps & {
19
19
  height?: number;
20
20
  width?: number;
21
21
  isValidVideo?: boolean;
22
- /** @deprecated */
22
+ /** @deprecated Not supported in Hyperspace. */
23
23
  iconSize?: number;
24
24
  overrides?: {
25
25
  Root?: Override<{}>;
@@ -9,7 +9,7 @@ export declare const BaseNumberInput: import("react").ForwardRefExoticComponent<
9
9
  'aria-label'?: string | undefined;
10
10
  'aria-labelledby'?: string | undefined;
11
11
  'aria-describedby'?: string | undefined;
12
- adjoined?: "none" | "left" | "right" | "both" | undefined;
12
+ adjoined?: "right" | "none" | "left" | "both" | undefined;
13
13
  autoComplete?: string | undefined;
14
14
  disabled?: boolean | undefined;
15
15
  pattern?: string | undefined;
@@ -4,20 +4,10 @@ import type { SpacewebComponentProps, Intent } from '../types';
4
4
  import type { Override } from '../overrides';
5
5
  import type { Properties } from 'csstype';
6
6
  import type { STATE_CHANGE_TYPE, ADJOINED, ENHANCER_POSITION } from './constants';
7
- export type InputSize =
8
7
  /** @deprecated Use 'small' or 'medium' instead. */
9
- 'xxxs'
10
- /** @deprecated Use 'small' or 'medium' instead. */
11
- | 'xs'
12
- /** @deprecated Use 'small' or 'medium' instead. */
13
- | 'sm'
14
- /** @deprecated Use 'small' or 'medium' instead. */
15
- | 'md'
16
- /** @deprecated Use 'small' or 'medium' instead. */
17
- | 'lg' | 'small' | 'medium';
18
- export type InputVariant = 'default'
19
- /** @deprecated Use 'default' instead. */
20
- | 'line';
8
+ type DeprecatedInputSize = 'xxxs' | 'xs' | 'sm' | 'md' | 'lg';
9
+ export type InputSize = DeprecatedInputSize | 'small' | 'medium';
10
+ export type InputVariant = 'default' | 'line';
21
11
  /**
22
12
  * Position of the cursor when input element is focussed
23
13
  * 1. 'start' - beginning of input value
@@ -35,6 +25,7 @@ export type State = {
35
25
  export type StateReducer = (stateType: StateType, nextState: State, currentState: State) => State;
36
26
  export type SharedProps = {
37
27
  $size: InputSize;
28
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
38
29
  $variant: InputVariant;
39
30
  $intent: Intent;
40
31
  $type?: string;
@@ -82,6 +73,7 @@ export type BaseInputProps<T> = SpacewebComponentProps<{
82
73
  disabled?: boolean;
83
74
  pattern?: string;
84
75
  id?: string;
76
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
85
77
  variant?: InputVariant;
86
78
  intent?: Intent;
87
79
  inputMode?: string;
@@ -154,3 +146,4 @@ export interface MaskedInputProps extends InputProps {
154
146
  mask?: string;
155
147
  maskChar?: string;
156
148
  }
149
+ export {};
@@ -97,7 +97,7 @@ declare const StatefulSubMenu: import("react").ForwardRefExoticComponent<Omit<Me
97
97
  }) => ReactNode);
98
98
  targetElement?: HTMLElement | null | undefined;
99
99
  triggerType?: import("../popover").TriggerType | undefined;
100
- placement?: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
100
+ placement?: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
101
101
  innerRef?: import("react").Ref<HTMLElement> | undefined;
102
102
  viewportAsBoundary?: boolean | undefined;
103
103
  } & Record<string, any>> | undefined;
@@ -98,7 +98,7 @@ declare const SubMenu: import("react").ForwardRefExoticComponent<Omit<MenuProps,
98
98
  }) => ReactNode);
99
99
  targetElement?: HTMLElement | null | undefined;
100
100
  triggerType?: import("../popover").TriggerType | undefined;
101
- placement?: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
101
+ placement?: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
102
102
  innerRef?: import("react").Ref<HTMLElement> | undefined;
103
103
  viewportAsBoundary?: boolean | undefined;
104
104
  } & Record<string, any>> | undefined;
@@ -46,7 +46,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
46
46
  }) => React.ReactNode);
47
47
  targetElement?: HTMLElement | null | undefined;
48
48
  triggerType?: import("../popover").TriggerType | undefined;
49
- placement?: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
49
+ placement?: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
50
50
  innerRef?: React.Ref<HTMLElement> | undefined;
51
51
  viewportAsBoundary?: boolean | undefined;
52
52
  } & Record<string, any>> | undefined;
@@ -73,9 +73,7 @@ export type MenuProps = Omit<ListProps, 'overrides'> & {
73
73
  * If true, none of the MenuItem will be highlighted when mouse leaves the Menu.
74
74
  */
75
75
  resetMenuHighlightOnMouseLeave?: boolean;
76
- /**
77
- * @deprecated This prop will be removed. use resetMenuHighlightOnMouseLeave
78
- */
76
+ /** @deprecated Use resetMenuHighlightOnMouseLeave instead. */
79
77
  resetMenuOnMouseLeave?: boolean;
80
78
  reducer?: Reducer;
81
79
  captureScroll?: boolean;
@@ -2,9 +2,6 @@ import type { ReactNode } from 'react';
2
2
  import type { ModalOverrides, ModalProps as BaseModalProps, SharedStylePropsArg } from '../baseui/modal';
3
3
  import type { Override } from '../overrides';
4
4
  import type { Intent as BaseIntent, SpacewebComponentProps } from '../types';
5
- /**
6
- * @deprecated Only 'medium' is supported as a new default size.
7
- */
8
5
  export type Size = 'medium' | 'sm' | 'md' | 'lg' | 'fullPage';
9
6
  export type Role = 'dialog' | 'alertdialog';
10
7
  export type SharedProps = Omit<SharedStylePropsArg, '$size'> & {
@@ -19,9 +16,7 @@ export type ModalProps = Omit<BaseModalProps, 'overrides' | 'size' | 'role'> & {
19
16
  overrides?: {
20
17
  [key in keyof ModalOverrides]?: Override<SharedProps & Record<string, any>>;
21
18
  };
22
- /**
23
- * @deprecated 'size' is deprecated and the 'md' sizing is the new default.
24
- */
19
+ /** @deprecated Not supported in Hyperspace. Defaults to 'medium'. */
25
20
  size?: Size;
26
21
  role?: Role;
27
22
  /** Explicit accessible label for the dialog. Defaults to "dialog" when no labelled-by target is available. */
@@ -13,7 +13,7 @@ declare const Popover: React.ForwardRefExoticComponent<Omit<import("../baseui/po
13
13
  }) => React.ReactNode);
14
14
  targetElement?: HTMLElement | null | undefined;
15
15
  triggerType?: import("./types").TriggerType | undefined;
16
- placement?: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
16
+ placement?: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
17
17
  innerRef?: React.Ref<HTMLElement> | undefined;
18
18
  viewportAsBoundary?: boolean | undefined;
19
19
  } & React.RefAttributes<HTMLElement>>;
@@ -25,6 +25,7 @@ export type ProgressStepsProps = Omit<SpacewebComponentProps, 'onClick'> & {
25
25
  alwaysShowDescription?: boolean;
26
26
  orientation?: Orientation;
27
27
  onClick?: (event: MouseEvent<HTMLElement>, step?: number) => void;
28
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
28
29
  variant?: Variants;
29
30
  intent?: Intent;
30
31
  role?: AriaRole;
@@ -61,6 +62,7 @@ export type StepProps = Omit<SpacewebComponentProps, 'title'> & {
61
62
  orientation?: Orientation;
62
63
  childrenCount?: number;
63
64
  intent?: 'default' | 'error' | 'ai';
65
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
64
66
  variant?: Variants;
65
67
  role?: AriaRole;
66
68
  /** The step number (1-indexed) */
@@ -6,10 +6,10 @@ import type { OutlineProps } from '../helpers/commonStyles';
6
6
  export type Alignment = 'horizontal' | 'vertical';
7
7
  export type LabelPlacement = 'top' | 'right' | 'bottom' | 'left';
8
8
  export type Align = keyof typeof ALIGN;
9
- /** @deprecated */
9
+ /** @deprecated Use 'medium' or 'large' instead. */
10
10
  type DeprecatedSize = 'sm' | 'md' | 'lg';
11
11
  export type Size = 'medium' | 'large' | DeprecatedSize;
12
- /** @deprecated */
12
+ /** @deprecated Use 'default' or 'error' instead. */
13
13
  type DeprecatedRadioIntent = 'success' | 'warning' | 'ai';
14
14
  export type RadioIntent = Exclude<Intent, DeprecatedRadioIntent> | DeprecatedRadioIntent;
15
15
  export type Variant = 'default' | 'checked';
@@ -26,7 +26,7 @@ export type StatelessState = {
26
26
  focusedRadioIndex: number;
27
27
  };
28
28
  export type SharedProps = {
29
- /** @deprecated */
29
+ /** @deprecated Not supported in Hyperspace. Defaults to 'vertical'. */
30
30
  $align?: Alignment;
31
31
  $checked?: boolean;
32
32
  $disabled?: boolean;
@@ -36,7 +36,7 @@ export type SharedProps = {
36
36
  $isFocused?: boolean;
37
37
  $isFocusVisible?: boolean;
38
38
  $isHovered?: boolean;
39
- /** @deprecated */
39
+ /** @deprecated Not supported in Hyperspace. Defaults to 'right'. */
40
40
  $labelPlacement?: string;
41
41
  $required?: boolean;
42
42
  $value?: string;
@@ -56,7 +56,7 @@ export type RadioGroupOverrides = {
56
56
  };
57
57
  export type BaseRadioProps = {
58
58
  autoFocus?: boolean;
59
- /** @deprecated */
59
+ /** @deprecated Not supported in Hyperspace. Defaults to 'vertical'. */
60
60
  align?: Align;
61
61
  checked?: boolean;
62
62
  children?: React.ReactNode;
@@ -69,7 +69,7 @@ export type BaseRadioProps = {
69
69
  error?: boolean;
70
70
  isFocused?: boolean;
71
71
  isFocusVisible?: boolean;
72
- /** @deprecated */
72
+ /** @deprecated Not supported in Hyperspace. Defaults to 'right'. */
73
73
  labelPlacement?: 'top' | 'right' | 'bottom' | 'left';
74
74
  name?: string;
75
75
  onChange?: (e: React.ChangeEvent<HTMLInputElement>) => unknown;
@@ -98,10 +98,10 @@ export type BaseRadioGroupProps = {
98
98
  required?: boolean;
99
99
  error?: boolean;
100
100
  autoFocus?: boolean;
101
- /** @deprecated */
101
+ /** @deprecated Not supported in Hyperspace. Defaults to 'vertical'. */
102
102
  align?: Align;
103
103
  name?: string;
104
- /** @deprecated */
104
+ /** @deprecated Not supported in Hyperspace. Defaults to 'right'. */
105
105
  labelPlacement?: LabelPlacement;
106
106
  id?: string;
107
107
  size?: Size;
@@ -1,13 +1,12 @@
1
1
  import type { InputOverrides, InputProps, SharedProps as InputSharedProps } from '../input/types';
2
2
  import type { Override } from '../overrides';
3
- /** @deprecated */
3
+ /** @deprecated Use 'small', 'medium', 'large' or 'x-large' instead. */
4
4
  type DeprecatedSize = 'xxxs' | 'xxs' | 'xs' | 'sm' | 'md' | 'lg';
5
5
  export type Size = DeprecatedSize | 'small' | 'medium' | 'large' | 'x-large';
6
- /** @deprecated */
7
- export type Variant = 'default' | 'light';
8
- export type Intent = 'default'
9
- /** @deprecated Use 'default' instead. */
10
- | 'ai';
6
+ export type Variant = 'light'
7
+ /** @deprecated Use 'light' instead. */
8
+ | 'default';
9
+ export type Intent = 'default' | 'ai';
11
10
  export type Shape = 'default' | 'pill';
12
11
  export type SearchProps = Omit<InputProps, 'size' | 'type' | 'required' | 'variant' | 'intent' | 'startEnhancer' | 'endEnhancer' | 'overrides'> & {
13
12
  size?: Size;
@@ -15,6 +14,7 @@ export type SearchProps = Omit<InputProps, 'size' | 'type' | 'required' | 'varia
15
14
  debounceInterval?: number;
16
15
  debouncedOnChange?: InputProps['onChange'];
17
16
  variant?: Variant;
17
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
18
18
  intent?: Intent;
19
19
  shape?: Shape;
20
20
  overrides?: {
@@ -44,7 +44,7 @@ declare class BaseSelect extends Component<BaseSelectProps & typeof defaultProps
44
44
  type: "overlay" | import("./types").Type | "mobile";
45
45
  value: Value;
46
46
  valueKey: string;
47
- placement: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
47
+ placement: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
48
48
  virtual: boolean;
49
49
  popoverMinWidth: string;
50
50
  expandLimitTagsOnFocus: boolean;
@@ -35,7 +35,7 @@ declare const defaultProps: {
35
35
  type: "overlay" | Type | "mobile";
36
36
  value: Value;
37
37
  valueKey: string;
38
- placement: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
38
+ placement: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
39
39
  virtual: boolean;
40
40
  popoverMinWidth: string;
41
41
  expandLimitTagsOnFocus: boolean;
@@ -39,7 +39,7 @@ declare const NestedSelect: {
39
39
  type: "overlay" | import("./types").Type | "mobile";
40
40
  value: import("./types").Value;
41
41
  valueKey: string;
42
- placement: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
42
+ placement: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
43
43
  virtual: boolean;
44
44
  popoverMinWidth: string;
45
45
  expandLimitTagsOnFocus: boolean;
@@ -83,7 +83,7 @@ declare const NestedSelect: {
83
83
  type: "overlay" | import("./types").Type | "mobile";
84
84
  value: import("./types").Value;
85
85
  valueKey: string;
86
- placement: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
86
+ placement: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
87
87
  virtual: boolean;
88
88
  popoverMinWidth: string;
89
89
  expandLimitTagsOnFocus: boolean;
@@ -38,7 +38,7 @@ declare const Select: {
38
38
  type: "overlay" | import("./types").Type | "mobile";
39
39
  value: import("./types").Value;
40
40
  valueKey: string;
41
- placement: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
41
+ placement: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
42
42
  virtual: boolean;
43
43
  popoverMinWidth: string;
44
44
  expandLimitTagsOnFocus: boolean;
@@ -83,7 +83,7 @@ export declare const CollapsibleSelectMenu: ({ overrides, value, items: groupedI
83
83
  }) => ReactNode);
84
84
  targetElement?: HTMLElement | null | undefined;
85
85
  triggerType?: import("../../popover").TriggerType | undefined;
86
- placement?: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
86
+ placement?: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
87
87
  innerRef?: import("react").Ref<HTMLElement> | undefined;
88
88
  viewportAsBoundary?: boolean | undefined;
89
89
  } & Record<string, any>> | undefined;
@@ -54,7 +54,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
54
54
  }) => React.ReactNode);
55
55
  targetElement?: HTMLElement | null | undefined;
56
56
  triggerType?: import("../../tooltip").TriggerType | undefined;
57
- placement?: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
57
+ placement?: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
58
58
  innerRef?: React.Ref<HTMLElement> | undefined;
59
59
  viewportAsBoundary?: boolean | undefined;
60
60
  } & Record<string, any>> | undefined;
@@ -38,7 +38,7 @@ declare namespace StatefulSelect {
38
38
  type: "overlay" | import("./types").Type | "mobile";
39
39
  value: import("./types").Value;
40
40
  valueKey: string;
41
- placement: "auto" | "bottom" | "left" | "right" | "top" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
41
+ placement: "right" | "top" | "auto" | "bottom" | "left" | "topLeft" | "topRight" | "rightTop" | "rightBottom" | "bottomRight" | "bottomLeft" | "leftBottom" | "leftTop" | undefined;
42
42
  virtual: boolean;
43
43
  popoverMinWidth: string;
44
44
  expandLimitTagsOnFocus: boolean;
@@ -12,7 +12,7 @@ import type { Merge, SimpleUnionOmit } from '../type-utils';
12
12
  import type { ButtonProps } from '../button';
13
13
  import type { SubMenuItem, MenuItemActions } from '../menu/types';
14
14
  import type { NoResultsMessageProps } from './no-results-message';
15
- /** @deprecated */
15
+ /** @deprecated Use 'small' or 'medium' instead. */
16
16
  type DeprecatedSize = 'xxxs' | 'xs' | 'sm' | 'md' | 'lg';
17
17
  export type Size = 'small' | 'medium' | DeprecatedSize;
18
18
  export type Type = 'select' | 'search';
@@ -17,7 +17,7 @@ type CommonSliderProps = {
17
17
  'aria-label'?: string;
18
18
  'aria-labelledby'?: string;
19
19
  'aria-describedby'?: string;
20
- /** @deprecated */
20
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
21
21
  intent?: Intent;
22
22
  markLabel?: boolean;
23
23
  min?: number;
@@ -44,7 +44,7 @@ type CommonSliderProps = {
44
44
  onFinalChange?: (a: Params) => unknown;
45
45
  };
46
46
  export type SharedProps = {
47
- /** @deprecated */
47
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
48
48
  $intent?: Intent;
49
49
  $step: number;
50
50
  $disabled?: boolean;
@@ -5,23 +5,23 @@ declare const Stack: React.ForwardRefExoticComponent<Omit<React.AllHTMLAttribute
5
5
  className?: ClassName;
6
6
  style?: import("../types").Styles;
7
7
  } & {
8
- direction?: ("horizontal" | "vertical") | undefined;
8
+ direction?: ("vertical" | "horizontal") | undefined;
9
9
  gap: number;
10
10
  } & Partial<{
11
11
  sm: {
12
- direction?: ("horizontal" | "vertical") | undefined;
12
+ direction?: ("vertical" | "horizontal") | undefined;
13
13
  gap: number;
14
14
  };
15
15
  md: {
16
- direction?: ("horizontal" | "vertical") | undefined;
16
+ direction?: ("vertical" | "horizontal") | undefined;
17
17
  gap: number;
18
18
  };
19
19
  lg: {
20
- direction?: ("horizontal" | "vertical") | undefined;
20
+ direction?: ("vertical" | "horizontal") | undefined;
21
21
  gap: number;
22
22
  };
23
23
  xl: {
24
- direction?: ("horizontal" | "vertical") | undefined;
24
+ direction?: ("vertical" | "horizontal") | undefined;
25
25
  gap: number;
26
26
  };
27
27
  overrides: {
@@ -10,5 +10,5 @@ export interface UseScrollableTabsReturn {
10
10
  }
11
11
  export declare const useScrollableTabs: ({ onScroll, layout, }: {
12
12
  onScroll?: UIEventHandler<HTMLDivElement> | undefined;
13
- layout?: "horizontal" | "vertical" | undefined;
13
+ layout?: "vertical" | "horizontal" | undefined;
14
14
  }) => UseScrollableTabsReturn;
@@ -10,18 +10,17 @@ export type ChangEventHandler = (args: {
10
10
  }) => void;
11
11
  export type SharedPropsTab = {
12
12
  $selected?: boolean;
13
- /** @deprecated */
13
+ /** @deprecated Not supported in Hyperspace. Defaults to 'top'. */
14
14
  $position?: position;
15
- /** @deprecated */
15
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
16
16
  $variant?: variant;
17
17
  $disabled?: boolean;
18
18
  };
19
19
  export type SharedPropsTabs = {
20
- /** @deprecated */
20
+ /** @deprecated Not supported in Hyperspace. Defaults to 'top'. */
21
21
  $position?: position;
22
- /** @deprecated */
22
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
23
23
  $variant?: variant;
24
- /** @deprecated - derived from position */
25
24
  $layout?: 'vertical' | 'horizontal';
26
25
  };
27
26
  export type TabOverrides = {
@@ -42,9 +41,9 @@ export type TabListProps = Omit<SpacewebComponentProps, 'onChange'> & {
42
41
  activeTabId?: React.Key;
43
42
  children: React.ReactNode;
44
43
  onChange?: ChangEventHandler;
45
- /** @deprecated */
44
+ /** @deprecated Not supported in Hyperspace. Defaults to 'top'. */
46
45
  position?: position;
47
- /** @deprecated */
46
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
48
47
  variant?: variant;
49
48
  activateOnFocus?: boolean;
50
49
  overrides?: TabsOverrides;
@@ -58,9 +57,9 @@ export type TabsPanelProps = SpacewebComponentProps & {
58
57
  };
59
58
  export type TabProps = TabsPanelProps & {
60
59
  id?: React.Key;
61
- /** @deprecated */
60
+ /** @deprecated Not supported in Hyperspace. Defaults to 'top'. */
62
61
  position?: position;
63
- /** @deprecated */
62
+ /** @deprecated Not supported in Hyperspace. Defaults to 'default'. */
64
63
  variant?: variant;
65
64
  overrides?: TabOverrides;
66
65
  onClick?: (e: React.MouseEvent) => void;
@@ -5,7 +5,9 @@ import type { ClassName, SpacewebComponentProps } from '../types';
5
5
  export type Intent = 'success' | 'error' | 'warning' | 'info' | 'default' | 'ai';
6
6
  export type Appearance = 'gray' | 'white' | 'outline';
7
7
  export type Variant = 'solid' | 'light';
8
- export type Size = 'xxxs' | 'sm' | 'lg' | 'small' | 'medium' | 'large';
8
+ /** @deprecated Use 'small', 'medium' or 'large' instead. */
9
+ type DeprecatedSize = 'xxxs' | 'sm' | 'lg';
10
+ export type Size = DeprecatedSize | 'small' | 'medium' | 'large';
9
11
  export type Shape = 'default' | 'pill';
10
12
  export type TagOverrides = {
11
13
  Root?: Override<SharedProps & Record<string, any>>;
@@ -33,16 +35,12 @@ export type TagProps = SpacewebComponentProps<{
33
35
  $size: Size;
34
36
  $intent: Intent;
35
37
  $appearance: Appearance;
36
- /**
37
- * @deprecated: Check designs for HDS 2.0
38
- */
38
+ /** @deprecated Not supported in Hyperspace. Defaults to 'light'. */
39
39
  $variant: Variant;
40
40
  }) => React.ReactNode);
41
41
  intent?: Intent;
42
42
  appearance?: Appearance;
43
- /**
44
- * @deprecated: Check designs for HDS 2.0
45
- */
43
+ /** @deprecated Not supported in Hyperspace. Defaults to 'light'. */
46
44
  variant?: Variant;
47
45
  size?: Size;
48
46
  shape?: Shape;
@@ -64,11 +62,10 @@ export type SharedProps = {
64
62
  $withChildren: boolean;
65
63
  $intent?: Intent;
66
64
  $appearance?: Appearance;
67
- /**
68
- * @deprecated: Check designs for HDS 2.0
69
- */
65
+ /** @deprecated Not supported in Hyperspace. Defaults to 'light'. */
70
66
  $variant?: Variant;
71
67
  $size?: Size;
72
68
  $shape?: Shape;
73
69
  $addHoverStyles?: boolean;
74
70
  };
71
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Detects a focus trap between two controls.
3
+ *
4
+ * Moves focus. Tab from `last` must land on `first`, and Shift+Tab from `first`
5
+ * must land on `last`. Render the dialog or popover first, then pass the
6
+ * focusable ends inside it.
7
+ *
8
+ * ```ts
9
+ * import { isFocusLocked } from '@sprinklrjs/spaceweb/test-utils/keyboard';
10
+ *
11
+ * expect(isFocusLocked({ first, last })).toBe(true);
12
+ * ```
13
+ *
14
+ * Test-only. Requires `@testing-library/user-event` v13 and `@testing-library/react`.
15
+ */
16
+ export declare function isFocusLocked(ends: {
17
+ first: HTMLElement;
18
+ last: HTMLElement;
19
+ }): boolean;
@@ -0,0 +1,31 @@
1
+ import { act } from '@testing-library/react';
2
+ import { shiftTab, tab } from './press';
3
+ /**
4
+ * Detects a focus trap between two controls.
5
+ *
6
+ * Moves focus. Tab from `last` must land on `first`, and Shift+Tab from `first`
7
+ * must land on `last`. Render the dialog or popover first, then pass the
8
+ * focusable ends inside it.
9
+ *
10
+ * ```ts
11
+ * import { isFocusLocked } from '@sprinklrjs/spaceweb/test-utils/keyboard';
12
+ *
13
+ * expect(isFocusLocked({ first, last })).toBe(true);
14
+ * ```
15
+ *
16
+ * Test-only. Requires `@testing-library/user-event` v13 and `@testing-library/react`.
17
+ */
18
+ export function isFocusLocked(ends) {
19
+ var first = ends.first, last = ends.last;
20
+ act(function () {
21
+ last.focus();
22
+ });
23
+ tab();
24
+ var wrapsForward = document.activeElement === first;
25
+ act(function () {
26
+ first.focus();
27
+ });
28
+ shiftTab();
29
+ var wrapsBackward = document.activeElement === last;
30
+ return wrapsForward && wrapsBackward;
31
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Test-only keyboard helpers for Jest.
3
+ *
4
+ * ```ts
5
+ * import { isFocusLocked, press, tab } from '@sprinklrjs/spaceweb/test-utils/keyboard';
6
+ * ```
7
+ *
8
+ * Requires `@testing-library/user-event` v13 and `@testing-library/react`.
9
+ * The `describe*` suites also need `@testing-library/jest-dom` (`toHaveFocus`, `toBeChecked`).
10
+ * Dialog and radio suites assume the fixture names in their JSDoc (a button named
11
+ * `Second`, a button named `After`). Do not import this from application code.
12
+ */
13
+ export { isFocusLocked } from './focusLock';
14
+ export { press, shiftTab, tab, type, type KeyboardKey } from './press';
15
+ export { describeDialogKeyboard, describeRadioGroupKeyboard, describeRovingKeyboard, describeToggleKeyboard, } from './patterns';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Test-only keyboard helpers for Jest.
3
+ *
4
+ * ```ts
5
+ * import { isFocusLocked, press, tab } from '@sprinklrjs/spaceweb/test-utils/keyboard';
6
+ * ```
7
+ *
8
+ * Requires `@testing-library/user-event` v13 and `@testing-library/react`.
9
+ * The `describe*` suites also need `@testing-library/jest-dom` (`toHaveFocus`, `toBeChecked`).
10
+ * Dialog and radio suites assume the fixture names in their JSDoc (a button named
11
+ * `Second`, a button named `After`). Do not import this from application code.
12
+ */
13
+ export { isFocusLocked } from './focusLock';
14
+ export { press, shiftTab, tab, type } from './press';
15
+ export { describeDialogKeyboard, describeRadioGroupKeyboard, describeRovingKeyboard, describeToggleKeyboard, } from './patterns';