@westpac/ui 0.5.0 → 0.6.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.
Files changed (129) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/components/accordion/accordion.component.d.ts +2 -2
  3. package/dist/components/accordion/components/accordion-item/accordion-item.component.js +5 -3
  4. package/dist/components/accordion/components/accordion-item/accordion-item.styles.d.ts +16 -0
  5. package/dist/components/accordion/components/accordion-item/accordion-item.styles.js +17 -9
  6. package/dist/components/autocomplete/autocomplete.styles.js +3 -3
  7. package/dist/components/button/button.component.d.ts +18 -2
  8. package/dist/components/button/button.component.js +6 -6
  9. package/dist/components/button/button.styles.d.ts +16 -0
  10. package/dist/components/button/button.styles.js +8 -0
  11. package/dist/components/button-dropdown/button-dropdown.styles.js +1 -1
  12. package/dist/components/button-dropdown/components/panel/panel.component.js +6 -3
  13. package/dist/components/button-dropdown/components/panel/panel.styles.d.ts +14 -2
  14. package/dist/components/button-dropdown/components/panel/panel.styles.js +8 -2
  15. package/dist/components/checkbox-group/components/checkbox/checkbox.component.js +2 -2
  16. package/dist/components/checkbox-group/components/checkbox/checkbox.styles.d.ts +2 -2
  17. package/dist/components/checkbox-group/components/checkbox/checkbox.styles.js +4 -4
  18. package/dist/components/collapsible/collapsible.styles.js +1 -1
  19. package/dist/components/compacta/compacta.styles.js +1 -1
  20. package/dist/components/flexi-cell/flexi-cell.component.js +5 -2
  21. package/dist/components/flexi-cell/flexi-cell.styles.d.ts +10 -0
  22. package/dist/components/flexi-cell/flexi-cell.styles.js +7 -2
  23. package/dist/components/input/input.component.d.ts +7 -1
  24. package/dist/components/input/input.component.js +5 -2
  25. package/dist/components/input/input.styles.d.ts +7 -1
  26. package/dist/components/input/input.styles.js +4 -1
  27. package/dist/components/link/link.component.d.ts +1 -1
  28. package/dist/components/link/link.component.js +5 -3
  29. package/dist/components/link/link.styles.d.ts +16 -0
  30. package/dist/components/link/link.styles.js +11 -3
  31. package/dist/components/list/components/item/item.component.d.ts +1 -1
  32. package/dist/components/list/components/item/item.component.js +6 -3
  33. package/dist/components/list/components/item/item.styles.d.ts +10 -0
  34. package/dist/components/list/components/item/item.styles.js +6 -1
  35. package/dist/components/list/list.component.d.ts +1 -1
  36. package/dist/components/list/list.stories.js +7 -1
  37. package/dist/components/list/list.utils.d.ts +1 -1
  38. package/dist/components/modal/components/backdrop/backdrop.styles.js +2 -2
  39. package/dist/components/modal/components/dialog/dialog.component.js +6 -4
  40. package/dist/components/modal/components/dialog/dialog.styles.d.ts +16 -0
  41. package/dist/components/modal/components/dialog/dialog.styles.js +11 -3
  42. package/dist/components/popover/components/panel/panel.styles.js +1 -1
  43. package/dist/components/popover/popover.component.js +0 -1
  44. package/dist/components/popover/popover.styles.d.ts +0 -2
  45. package/dist/components/popover/popover.styles.js +1 -2
  46. package/dist/components/radio-group/components/radio/radio.component.js +2 -2
  47. package/dist/components/radio-group/components/radio/radio.styles.d.ts +2 -2
  48. package/dist/components/radio-group/components/radio/radio.styles.js +5 -5
  49. package/dist/components/repeater/repeater.component.js +6 -3
  50. package/dist/components/repeater/repeater.styles.d.ts +10 -0
  51. package/dist/components/repeater/repeater.styles.js +6 -1
  52. package/dist/components/select/select.component.d.ts +11 -1
  53. package/dist/components/select/select.component.js +5 -2
  54. package/dist/components/select/select.styles.d.ts +11 -1
  55. package/dist/components/select/select.styles.js +6 -1
  56. package/dist/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.js +4 -4
  57. package/dist/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.styles.d.ts +2 -2
  58. package/dist/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.styles.js +1 -1
  59. package/dist/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.js +4 -4
  60. package/dist/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.styles.d.ts +2 -2
  61. package/dist/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.styles.js +2 -2
  62. package/dist/components/switch/switch.component.d.ts +1 -1
  63. package/dist/components/switch/switch.component.js +11 -7
  64. package/dist/components/switch/switch.stories.js +1 -1
  65. package/dist/components/switch/switch.styles.d.ts +2 -2
  66. package/dist/components/switch/switch.styles.js +2 -2
  67. package/dist/components/switch/switch.types.d.ts +5 -1
  68. package/dist/components/tabs/components/tab/tab.component.js +5 -3
  69. package/dist/components/tabs/components/tab/tab.styles.d.ts +9 -1
  70. package/dist/components/tabs/components/tab/tab.styles.js +12 -8
  71. package/dist/components/tabs/components/tab-panel/tab-panel.component.js +5 -3
  72. package/dist/components/tabs/components/tab-panel/tab-panel.styles.d.ts +7 -1
  73. package/dist/components/tabs/components/tab-panel/tab-panel.styles.js +5 -2
  74. package/dist/components/textarea/textarea.component.d.ts +7 -1
  75. package/dist/components/textarea/textarea.component.js +5 -2
  76. package/dist/components/textarea/textarea.styles.d.ts +7 -1
  77. package/dist/components/textarea/textarea.styles.js +4 -1
  78. package/dist/css/westpac-ui.css +15 -3
  79. package/dist/css/westpac-ui.min.css +15 -3
  80. package/dist/tailwind/constants/colors.d.ts +9 -9
  81. package/dist/tailwind/themes/index.d.ts +11 -11
  82. package/package.json +1 -1
  83. package/src/components/accordion/components/accordion-item/accordion-item.component.tsx +4 -3
  84. package/src/components/accordion/components/accordion-item/accordion-item.styles.ts +17 -9
  85. package/src/components/autocomplete/autocomplete.styles.ts +3 -3
  86. package/src/components/button/button.component.tsx +9 -10
  87. package/src/components/button/button.styles.ts +4 -0
  88. package/src/components/button-dropdown/button-dropdown.styles.ts +1 -1
  89. package/src/components/button-dropdown/components/panel/panel.component.tsx +4 -3
  90. package/src/components/button-dropdown/components/panel/panel.styles.ts +8 -2
  91. package/src/components/checkbox-group/components/checkbox/checkbox.component.tsx +2 -2
  92. package/src/components/checkbox-group/components/checkbox/checkbox.styles.ts +4 -4
  93. package/src/components/collapsible/collapsible.styles.ts +1 -1
  94. package/src/components/compacta/compacta.styles.ts +1 -1
  95. package/src/components/flexi-cell/flexi-cell.component.tsx +4 -2
  96. package/src/components/flexi-cell/flexi-cell.styles.ts +5 -2
  97. package/src/components/input/input.component.tsx +10 -1
  98. package/src/components/input/input.styles.ts +4 -1
  99. package/src/components/link/link.component.tsx +10 -3
  100. package/src/components/link/link.styles.ts +7 -3
  101. package/src/components/list/components/item/item.component.tsx +4 -1
  102. package/src/components/list/components/item/item.styles.ts +4 -1
  103. package/src/components/list/list.stories.tsx +3 -3
  104. package/src/components/modal/components/backdrop/backdrop.styles.ts +2 -2
  105. package/src/components/modal/components/dialog/dialog.component.tsx +4 -3
  106. package/src/components/modal/components/dialog/dialog.styles.ts +7 -3
  107. package/src/components/popover/components/panel/panel.styles.ts +1 -1
  108. package/src/components/popover/popover.component.tsx +0 -1
  109. package/src/components/popover/popover.styles.ts +0 -1
  110. package/src/components/radio-group/components/radio/radio.component.tsx +2 -2
  111. package/src/components/radio-group/components/radio/radio.styles.ts +5 -5
  112. package/src/components/repeater/repeater.component.tsx +4 -1
  113. package/src/components/repeater/repeater.styles.ts +6 -1
  114. package/src/components/select/select.component.tsx +3 -1
  115. package/src/components/select/select.styles.ts +6 -1
  116. package/src/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.tsx +4 -4
  117. package/src/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.styles.ts +1 -1
  118. package/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.tsx +4 -4
  119. package/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.styles.ts +2 -2
  120. package/src/components/switch/switch.component.tsx +19 -7
  121. package/src/components/switch/switch.stories.tsx +1 -1
  122. package/src/components/switch/switch.styles.ts +2 -2
  123. package/src/components/switch/switch.types.ts +5 -1
  124. package/src/components/tabs/components/tab/tab.component.tsx +4 -3
  125. package/src/components/tabs/components/tab/tab.styles.ts +12 -8
  126. package/src/components/tabs/components/tab-panel/tab-panel.component.tsx +3 -2
  127. package/src/components/tabs/components/tab-panel/tab-panel.styles.ts +5 -2
  128. package/src/components/textarea/textarea.component.tsx +9 -1
  129. package/src/components/textarea/textarea.styles.ts +4 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @westpac/ui
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 240f606: fixes keyboard focus style in several components
8
+
3
9
  ## 0.5.0
4
10
 
5
11
  ### Minor Changes
@@ -24,8 +24,8 @@ declare const _Accordion: {
24
24
  default: string;
25
25
  };
26
26
  }, undefined>> & {
27
- color?: "hero" | "primary" | ({
28
- [x: string]: "hero" | "primary" | undefined;
27
+ color?: "primary" | "hero" | ({
28
+ [x: string]: "primary" | "hero" | undefined;
29
29
  } & string) | undefined;
30
30
  justify?: boolean | undefined;
31
31
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "color"> & {
@@ -15,7 +15,7 @@ function _extends() {
15
15
  import { useAccordionItem } from '@react-aria/accordion';
16
16
  import { AnimatePresence, LazyMotion, m } from 'framer-motion';
17
17
  import React, { useRef } from 'react';
18
- import { mergeProps, useHover, useLocale } from 'react-aria';
18
+ import { mergeProps, useFocusRing, useHover, useLocale } from 'react-aria';
19
19
  import { ArrowLeftIcon, ArrowRightIcon } from '../../../icon/index.js';
20
20
  import { styles as accordionItemStyles } from './accordion-item.styles.js';
21
21
  const loadAnimations = ()=>import('./accordion-item.utils.js').then((res)=>res.default);
@@ -23,6 +23,7 @@ export function AccordionItem({ className , tag: Tag = 'div' , color , look ='de
23
23
  const ref = useRef(null);
24
24
  const { state , item } = props;
25
25
  const { buttonProps , regionProps } = useAccordionItem(props, state, ref);
26
+ const { isFocusVisible , focusProps } = useFocusRing();
26
27
  const isOpen = state.expandedKeys.has(item.key);
27
28
  const isDisabled = state.disabledKeys.has(item.key);
28
29
  const { hoverProps } = useHover({
@@ -34,11 +35,12 @@ export function AccordionItem({ className , tag: Tag = 'div' , color , look ='de
34
35
  isDisabled,
35
36
  className,
36
37
  color,
37
- look
38
+ look,
39
+ isFocusVisible
38
40
  });
39
41
  return React.createElement(Tag, {
40
42
  className: styles.base()
41
- }, React.createElement("h3", null, React.createElement("button", _extends({}, mergeProps(buttonProps, hoverProps), {
43
+ }, React.createElement("h3", null, React.createElement("button", _extends({}, mergeProps(buttonProps, hoverProps, focusProps), {
42
44
  ref: ref,
43
45
  className: styles.itemHeader()
44
46
  }), React.createElement("span", null, item.props.title), look === 'material' && React.createElement("div", {
@@ -29,6 +29,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
29
29
  true: string;
30
30
  false: string;
31
31
  };
32
+ isFocusVisible: {
33
+ true: {
34
+ itemHeader: string;
35
+ };
36
+ false: {
37
+ itemHeader: string;
38
+ };
39
+ };
32
40
  }, {
33
41
  base: string;
34
42
  itemHeader: string;
@@ -67,6 +75,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
67
75
  true: string;
68
76
  false: string;
69
77
  };
78
+ isFocusVisible: {
79
+ true: {
80
+ itemHeader: string;
81
+ };
82
+ false: {
83
+ itemHeader: string;
84
+ };
85
+ };
70
86
  }, {
71
87
  base: string;
72
88
  itemHeader: string;
@@ -2,32 +2,32 @@ import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
4
  base: '',
5
- itemHeader: 'typography-body-9 flex w-full items-center justify-between px-3 py-2 focus:focus-outline',
5
+ itemHeader: 'typography-body-9 flex w-full items-center justify-between px-3 py-2',
6
6
  indicator: '',
7
7
  content: 'hidden'
8
8
  },
9
9
  variants: {
10
10
  look: {
11
11
  material: {
12
- itemHeader: 'bg-white transition-colors hover:bg-light',
13
- indicator: 'relative h-2 w-2 before:absolute before:left-1/2 before:top-1/2 before:block before:h-[2px] before:w-full before:-translate-x-1/2 before:-translate-y-1/2 before:bg-muted after:absolute after:left-1/2 after:top-1/2 after:block after:h-full after:w-[2px] after:-translate-x-1/2 after:-translate-y-1/2 after:bg-muted after:transition-transform'
12
+ itemHeader: 'hover:bg-light bg-white transition-colors',
13
+ indicator: 'before:bg-muted after:bg-muted relative h-2 w-2 before:absolute before:left-1/2 before:top-1/2 before:block before:h-[2px] before:w-full before:-translate-x-1/2 before:-translate-y-1/2 after:absolute after:left-1/2 after:top-1/2 after:block after:h-full after:w-[2px] after:-translate-x-1/2 after:-translate-y-1/2 after:transition-transform'
14
14
  },
15
15
  default: {
16
- itemHeader: 'border-t border-border bg-light',
16
+ itemHeader: 'border-border bg-light border-t',
17
17
  indicator: 'h-3 w-3 -rotate-90 transition-transform'
18
18
  }
19
19
  },
20
20
  color: {
21
21
  hero: {
22
- itemHeader: 'border-l-[0.375rem] border-l-border transition-colors'
22
+ itemHeader: 'border-l-border border-l-[0.375rem] transition-colors'
23
23
  },
24
24
  primary: {
25
- itemHeader: 'border-l-[0.375rem] border-l-border transition-colors'
25
+ itemHeader: 'border-l-border border-l-[0.375rem] transition-colors'
26
26
  }
27
27
  },
28
28
  isOpen: {
29
29
  true: {
30
- content: 'block border-t border-border p-3'
30
+ content: 'border-border block border-t p-3'
31
31
  },
32
32
  false: {
33
33
  base: ''
@@ -36,6 +36,14 @@ export const styles = tv({
36
36
  isDisabled: {
37
37
  true: '',
38
38
  false: ''
39
+ },
40
+ isFocusVisible: {
41
+ true: {
42
+ itemHeader: 'focus-outline'
43
+ },
44
+ false: {
45
+ itemHeader: 'outline-none'
46
+ }
39
47
  }
40
48
  },
41
49
  compoundSlots: [
@@ -76,14 +84,14 @@ export const styles = tv({
76
84
  'content'
77
85
  ],
78
86
  color: 'hero',
79
- className: 'border-l-[0.375rem] border-l-border'
87
+ className: 'border-l-border border-l-[0.375rem]'
80
88
  },
81
89
  {
82
90
  slots: [
83
91
  'content'
84
92
  ],
85
93
  color: 'primary',
86
- className: 'border-l-[0.375rem] border-l-border'
94
+ className: 'border-l-border border-l-[0.375rem]'
87
95
  }
88
96
  ]
89
97
  }, {
@@ -2,10 +2,10 @@ import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
4
  base: 'relative flex flex-col',
5
- label: 'block text-left text-sm font-medium text-text',
6
- outerWrapper: 'form-control relative flex w-full flex-row items-center overflow-hidden pr-2 disabled:form-control-disabled focus:focus-outline',
5
+ label: 'text-text block text-left text-sm font-medium',
6
+ outerWrapper: 'form-control disabled:form-control-disabled relative flex w-full flex-row items-center overflow-hidden pr-2',
7
7
  input: 'w-full appearance-none bg-[transparent] outline-none',
8
- clearButton: 'flex cursor-default items-center justify-center text-text-50 hover:text-border-60'
8
+ clearButton: 'text-text-50 hover:text-border-60 flex cursor-default items-center justify-center'
9
9
  },
10
10
  variants: {
11
11
  invalid: {
@@ -2,8 +2,8 @@ import React from 'react';
2
2
  export declare const Button: React.ForwardRefExoticComponent<{
3
3
  iconAfter?: ((props: import("../icon/icon.types.js").IconProps) => JSX.Element) | undefined;
4
4
  iconBefore?: ((props: import("../icon/icon.types.js").IconProps) => JSX.Element) | undefined;
5
- iconColor?: "link" | "text" | "border" | "heading" | "success" | "info" | "warning" | "danger" | "system" | "white" | "black" | "background" | "borderDark" | "focus" | "hero" | "light" | "muted" | "neutral" | "pop" | "primary" | (string & {
6
- [x: string]: "link" | "text" | "border" | "heading" | "success" | "info" | "warning" | "danger" | "system" | "white" | "black" | "background" | "borderDark" | "focus" | "hero" | "light" | "muted" | "neutral" | "pop" | "primary" | undefined;
5
+ iconColor?: "link" | "text" | "border" | "heading" | "primary" | "hero" | "success" | "info" | "warning" | "danger" | "system" | "white" | "black" | "background" | "borderDark" | "focus" | "light" | "muted" | "neutral" | "pop" | (string & {
6
+ [x: string]: "link" | "text" | "border" | "heading" | "primary" | "hero" | "success" | "info" | "warning" | "danger" | "system" | "white" | "black" | "background" | "borderDark" | "focus" | "light" | "muted" | "neutral" | "pop" | undefined;
7
7
  }) | undefined;
8
8
  tag?: "a" | "button" | "div" | "span" | undefined;
9
9
  } & React.ButtonHTMLAttributes<Element> & React.AnchorHTMLAttributes<Element> & import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
@@ -53,6 +53,14 @@ export declare const Button: React.ForwardRefExoticComponent<{
53
53
  hasChildren: {
54
54
  true: string;
55
55
  };
56
+ isFocusVisible: {
57
+ true: {
58
+ base: string;
59
+ };
60
+ false: {
61
+ base: string;
62
+ };
63
+ };
56
64
  }, {
57
65
  base: string;
58
66
  iconBefore: string;
@@ -108,6 +116,14 @@ export declare const Button: React.ForwardRefExoticComponent<{
108
116
  hasChildren: {
109
117
  true: string;
110
118
  };
119
+ isFocusVisible: {
120
+ true: {
121
+ base: string;
122
+ };
123
+ false: {
124
+ base: string;
125
+ };
126
+ };
111
127
  }, {
112
128
  base: string;
113
129
  iconBefore: string;
@@ -13,10 +13,11 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { forwardRef, useMemo } from 'react';
16
- import { FocusRing } from 'react-aria';
16
+ import { mergeProps, useFocusRing } from 'react-aria';
17
17
  import { styles as buttonStyles } from './button.styles.js';
18
18
  import { getIconSize } from './button.utils.js';
19
19
  function BaseButton({ className , size ='medium' , look ='hero' , soft , block , justify , tag: Tag = 'button' , iconBefore: IconBefore , iconAfter: IconAfter , iconColor , children , ...props }, ref) {
20
+ const { isFocusVisible , focusProps } = useFocusRing();
20
21
  const iconSize = useMemo(()=>getIconSize(size), [
21
22
  size
22
23
  ]);
@@ -26,16 +27,15 @@ function BaseButton({ className , size ='medium' , look ='hero' , soft , block ,
26
27
  soft,
27
28
  block,
28
29
  justify,
30
+ isFocusVisible,
29
31
  hasChildren: !!children
30
32
  });
31
- return React.createElement(FocusRing, {
32
- focusRingClass: "focus-outline"
33
- }, React.createElement(Tag, _extends({
33
+ return React.createElement(Tag, _extends({
34
34
  ref: ref,
35
35
  className: styles.base({
36
36
  className
37
37
  })
38
- }, props), IconBefore && React.createElement(IconBefore, {
38
+ }, mergeProps(props, focusProps)), IconBefore && React.createElement(IconBefore, {
39
39
  size: iconSize,
40
40
  className: styles.iconBefore(),
41
41
  color: iconColor
@@ -45,6 +45,6 @@ function BaseButton({ className , size ='medium' , look ='hero' , soft , block ,
45
45
  size: iconSize,
46
46
  className: styles.iconAfter(),
47
47
  color: iconColor
48
- })));
48
+ }));
49
49
  }
50
50
  export const Button = forwardRef(BaseButton);
@@ -48,6 +48,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
48
48
  hasChildren: {
49
49
  true: string;
50
50
  };
51
+ isFocusVisible: {
52
+ true: {
53
+ base: string;
54
+ };
55
+ false: {
56
+ base: string;
57
+ };
58
+ };
51
59
  }, {
52
60
  base: string;
53
61
  iconBefore: string;
@@ -103,6 +111,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
103
111
  hasChildren: {
104
112
  true: string;
105
113
  };
114
+ isFocusVisible: {
115
+ true: {
116
+ base: string;
117
+ };
118
+ false: {
119
+ base: string;
120
+ };
121
+ };
106
122
  }, {
107
123
  base: string;
108
124
  iconBefore: string;
@@ -53,6 +53,14 @@ export const styles = tv({
53
53
  },
54
54
  hasChildren: {
55
55
  true: ''
56
+ },
57
+ isFocusVisible: {
58
+ true: {
59
+ base: 'focus-outline'
60
+ },
61
+ false: {
62
+ base: 'outline-none'
63
+ }
56
64
  }
57
65
  },
58
66
  compoundSlots: [
@@ -1,7 +1,7 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
- base: 'focus:focus-outline',
4
+ base: '',
5
5
  panel: 'overflow-hidden'
6
6
  },
7
7
  variants: {
@@ -13,7 +13,7 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { useCallback, useEffect, useRef } from 'react';
16
- import { DismissButton, Overlay, mergeProps, useOverlay, usePopover } from 'react-aria';
16
+ import { DismissButton, Overlay, mergeProps, useFocusRing, useOverlay, usePopover } from 'react-aria';
17
17
  import { styles as panelStyles } from './panel.styles.js';
18
18
  export function Panel({ className , children , state , block , id , ...props }) {
19
19
  var _props_triggerRef_current;
@@ -27,7 +27,10 @@ export function Panel({ className , children , state , block , id , ...props })
27
27
  shouldFlip: false,
28
28
  ...props
29
29
  }, state);
30
- const styles = panelStyles({});
30
+ const { isFocused , focusProps } = useFocusRing();
31
+ const styles = panelStyles({
32
+ isFocused
33
+ });
31
34
  const width = (_props_triggerRef_current = props.triggerRef.current) === null || _props_triggerRef_current === void 0 ? void 0 : _props_triggerRef_current.getBoundingClientRect().width;
32
35
  const focusHandler = useCallback((event)=>{
33
36
  if (event.target && popoverRef.current && !popoverRef.current.contains(event.target) && state.isOpen) state.close();
@@ -40,7 +43,7 @@ export function Panel({ className , children , state , block , id , ...props })
40
43
  window.document.removeEventListener('focusin', focusHandler);
41
44
  };
42
45
  }, []);
43
- return React.createElement(Overlay, null, React.createElement("div", _extends({}, mergeProps(popoverProps, overlayProps), {
46
+ return React.createElement(Overlay, null, React.createElement("div", _extends({}, mergeProps(popoverProps, overlayProps, focusProps), {
44
47
  id: id,
45
48
  "data-testid": "panel-dialog",
46
49
  style: {
@@ -1,9 +1,21 @@
1
- export declare const styles: import("tailwind-variants").TVReturnType<{}, {
1
+ export declare const styles: import("tailwind-variants").TVReturnType<{
2
+ isFocused: {
3
+ true: {
4
+ dialog: string;
5
+ };
6
+ };
7
+ }, {
2
8
  base: string;
3
9
  dialog: string;
4
10
  }, undefined, {
5
11
  responsiveVariants: string[];
6
- }, {}, {
12
+ }, {
13
+ isFocused: {
14
+ true: {
15
+ dialog: string;
16
+ };
17
+ };
18
+ }, {
7
19
  base: string;
8
20
  dialog: string;
9
21
  }>;
@@ -2,9 +2,15 @@ import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
4
  base: 'border-border mt-[0.1875rem] rounded-[3px] border bg-white p-2 shadow-[0_0.375rem_0.75rem_rgba(0,0,0,0.175)]',
5
- dialog: 'focus:outline-none'
5
+ dialog: ''
6
6
  },
7
- variants: {}
7
+ variants: {
8
+ isFocused: {
9
+ true: {
10
+ dialog: 'outline-none'
11
+ }
12
+ }
13
+ }
8
14
  }, {
9
15
  responsiveVariants: [
10
16
  'xsl',
@@ -34,12 +34,12 @@ function BaseCheckbox({ className , hint , children , value , ...props }, ref) {
34
34
  value,
35
35
  children
36
36
  }, state, localRef);
37
- const { isFocusVisible , focusProps } = useFocusRing();
37
+ const { isFocused , focusProps } = useFocusRing();
38
38
  const styles = checkboxItemStyles({
39
39
  isDisabled,
40
40
  size,
41
41
  orientation,
42
- isFocusVisible
42
+ isFocused
43
43
  });
44
44
  return React.createElement("label", {
45
45
  className: styles.base({
@@ -8,7 +8,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
8
8
  base: string;
9
9
  };
10
10
  };
11
- isFocusVisible: {
11
+ isFocused: {
12
12
  true: {
13
13
  checkbox: string;
14
14
  };
@@ -52,7 +52,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
52
52
  base: string;
53
53
  };
54
54
  };
55
- isFocusVisible: {
55
+ isFocused: {
56
56
  true: {
57
57
  checkbox: string;
58
58
  };
@@ -5,8 +5,8 @@ export const styles = tv({
5
5
  checkIcon: 'overflow-visible',
6
6
  textWrapper: 'flex flex-col justify-center',
7
7
  labelText: 'typography-body-10 py-[2px] pl-1',
8
- hintText: 'typography-body-10 pl-1 text-muted',
9
- checkbox: 'flex h-4 w-4 items-center justify-center rounded border border-hero'
8
+ hintText: 'typography-body-10 text-muted pl-1',
9
+ checkbox: 'border-hero flex h-4 w-4 items-center justify-center rounded border'
10
10
  },
11
11
  variants: {
12
12
  isDisabled: {
@@ -18,9 +18,9 @@ export const styles = tv({
18
18
  base: 'hover:cursor-pointer'
19
19
  }
20
20
  },
21
- isFocusVisible: {
21
+ isFocused: {
22
22
  true: {
23
- checkbox: 'rounded focus-outline'
23
+ checkbox: 'focus-outline'
24
24
  }
25
25
  },
26
26
  orientation: {
@@ -1,7 +1,7 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
- base: 'px-0 text-text no-underline hover:underline focus:focus-outline',
4
+ base: 'text-text px-0 no-underline hover:underline',
5
5
  content: 'typography-body-10 mb-2 block'
6
6
  },
7
7
  variants: {
@@ -10,7 +10,7 @@ export const styles = tv({
10
10
  itemIndex: 'mr-2 w-4 flex-none font-bold',
11
11
  removeBtn: 'mt-[0.875rem] h-auto p-0 no-underline hover:underline',
12
12
  addBtn: 'h-auto p-0 no-underline hover:underline',
13
- toggleBtn: 'focus:outline-focus ml-auto p-0',
13
+ toggleBtn: 'ml-auto p-0',
14
14
  collapsible: '',
15
15
  content: 'xsl:pl-[3.375rem] p-[0_1.125rem_1.875rem]',
16
16
  footer: 'pt-[0.5rem]',
@@ -13,14 +13,17 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { forwardRef } from 'react';
16
+ import { mergeProps, useFocusRing } from 'react-aria';
16
17
  import { ArrowRightIcon } from '../icon/index.js';
17
18
  import { FlexiCellAdornment, FlexiCellBody, FlexiCellButton, FlexiCellCircle, FlexiCellFooter, FlexiCellHint, FlexiCellLabel } from './components/index.js';
18
19
  import { styles as flexiCellStyles } from './flexi-cell.styles.js';
19
20
  function FlexiCellBase({ className , tag: Tag = 'div' , children , badge , before , body , after , withArrow , withBorder =false , href , withHoverEffect =false , ...props }, ref) {
21
+ const { isFocusVisible , focusProps } = useFocusRing();
20
22
  const styles = flexiCellStyles({
21
23
  className,
22
24
  withBorder,
23
- isLink: !!href || withHoverEffect
25
+ isLink: !!href || withHoverEffect,
26
+ isFocusVisible
24
27
  });
25
28
  return React.createElement(Tag, _extends({}, {
26
29
  ref
@@ -29,7 +32,7 @@ function FlexiCellBase({ className , tag: Tag = 'div' , children , badge , befor
29
32
  className
30
33
  }),
31
34
  href: href
32
- }, props), badge && React.createElement("div", {
35
+ }, mergeProps(props, focusProps)), badge && React.createElement("div", {
33
36
  className: styles.badge()
34
37
  }, badge), before, React.createElement("div", {
35
38
  className: styles.bodyWrapper()
@@ -11,6 +11,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
11
11
  };
12
12
  false: {};
13
13
  };
14
+ isFocusVisible: {
15
+ true: {
16
+ base: string;
17
+ };
18
+ };
14
19
  }, {
15
20
  base: string;
16
21
  bodyWrapper: string;
@@ -30,6 +35,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
30
35
  };
31
36
  false: {};
32
37
  };
38
+ isFocusVisible: {
39
+ true: {
40
+ base: string;
41
+ };
42
+ };
33
43
  }, {
34
44
  base: string;
35
45
  bodyWrapper: string;
@@ -1,14 +1,14 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
- base: 'relative flex gap-2 bg-white p-2 transition-colors focus:focus-outline md:p-3',
4
+ base: 'relative flex gap-2 bg-white p-2 transition-colors md:p-3',
5
5
  bodyWrapper: 'flex flex-1 flex-col',
6
6
  badge: 'absolute right-0 top-0'
7
7
  },
8
8
  variants: {
9
9
  withBorder: {
10
10
  true: {
11
- base: 'rounded border border-borderDark'
11
+ base: 'border-borderDark rounded border'
12
12
  },
13
13
  false: {}
14
14
  },
@@ -17,6 +17,11 @@ export const styles = tv({
17
17
  base: 'hover:border-hero'
18
18
  },
19
19
  false: {}
20
+ },
21
+ isFocusVisible: {
22
+ true: {
23
+ base: 'focus-outline'
24
+ }
20
25
  }
21
26
  }
22
27
  }, {
@@ -14,7 +14,10 @@ export declare const Input: React.ForwardRefExoticComponent<{
14
14
  true: string;
15
15
  false: string;
16
16
  };
17
- }, undefined, "form-control flex-1 read-only:form-control-disabled disabled:form-control-disabled focus:focus-outline group-[.input-field-after]:rounded-r-none group-[.input-field-before]:rounded-l-none group-[.input-field-after]:border-r-0 group-[.input-field-before]:border-l-0", {
17
+ isFocused: {
18
+ true: string;
19
+ };
20
+ }, undefined, "form-control read-only:form-control-disabled disabled:form-control-disabled flex-1 group-[.input-field-after]:rounded-r-none group-[.input-field-before]:rounded-l-none group-[.input-field-after]:border-r-0 group-[.input-field-before]:border-l-0", {
18
21
  responsiveVariants: string[];
19
22
  }, {
20
23
  size: {
@@ -27,4 +30,7 @@ export declare const Input: React.ForwardRefExoticComponent<{
27
30
  true: string;
28
31
  false: string;
29
32
  };
33
+ isFocused: {
34
+ true: string;
35
+ };
30
36
  }, undefined>>, "invalid"> & Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & React.RefAttributes<HTMLInputElement>>;
@@ -13,16 +13,19 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { forwardRef } from 'react';
16
+ import { mergeProps, useFocusRing } from 'react-aria';
16
17
  import { styles } from './input.styles.js';
17
18
  export function BaseInput({ className , size ='medium' , invalid =false , ...props }, ref) {
19
+ const { isFocused , focusProps } = useFocusRing();
18
20
  return React.createElement("input", _extends({
19
21
  ref: ref,
20
22
  className: styles({
21
23
  className,
22
24
  size,
23
- invalid
25
+ invalid,
26
+ isFocused
24
27
  }),
25
28
  "aria-invalid": invalid
26
- }, props));
29
+ }, mergeProps(props, focusProps)));
27
30
  }
28
31
  export const Input = forwardRef(BaseInput);
@@ -9,7 +9,10 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
9
9
  true: string;
10
10
  false: string;
11
11
  };
12
- }, undefined, "form-control flex-1 read-only:form-control-disabled disabled:form-control-disabled focus:focus-outline group-[.input-field-after]:rounded-r-none group-[.input-field-before]:rounded-l-none group-[.input-field-after]:border-r-0 group-[.input-field-before]:border-l-0", {
12
+ isFocused: {
13
+ true: string;
14
+ };
15
+ }, undefined, "form-control read-only:form-control-disabled disabled:form-control-disabled flex-1 group-[.input-field-after]:rounded-r-none group-[.input-field-before]:rounded-l-none group-[.input-field-after]:border-r-0 group-[.input-field-before]:border-l-0", {
13
16
  responsiveVariants: string[];
14
17
  }, {
15
18
  size: {
@@ -22,4 +25,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
22
25
  true: string;
23
26
  false: string;
24
27
  };
28
+ isFocused: {
29
+ true: string;
30
+ };
25
31
  }, undefined>;
@@ -1,6 +1,6 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
- base: 'form-control flex-1 read-only:form-control-disabled disabled:form-control-disabled focus:focus-outline group-[.input-field-after]:rounded-r-none group-[.input-field-before]:rounded-l-none group-[.input-field-after]:border-r-0 group-[.input-field-before]:border-l-0',
3
+ base: 'form-control read-only:form-control-disabled disabled:form-control-disabled flex-1 group-[.input-field-after]:rounded-r-none group-[.input-field-before]:rounded-l-none group-[.input-field-after]:border-r-0 group-[.input-field-before]:border-l-0',
4
4
  variants: {
5
5
  size: {
6
6
  small: 'form-control-small group-[.input-field-inset-after]:pr-6 group-[.input-field-inset-before]:pl-6',
@@ -11,6 +11,9 @@ export const styles = tv({
11
11
  invalid: {
12
12
  true: 'border-danger',
13
13
  false: 'border-borderDark'
14
+ },
15
+ isFocused: {
16
+ true: 'focus-outline'
14
17
  }
15
18
  }
16
19
  }, {
@@ -6,7 +6,7 @@ export declare const Link: React.ForwardRefExoticComponent<{
6
6
  className?: string | undefined;
7
7
  iconAfter?: ((props: import("../icon/icon.types.js").IconProps) => JSX.Element) | undefined;
8
8
  iconBefore?: ((props: import("../icon/icon.types.js").IconProps) => JSX.Element) | undefined;
9
- iconSize?: "small" | "xsmall" | "medium" | "large" | "xlarge" | undefined;
9
+ iconSize?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
10
10
  type?: "inline" | "standalone" | undefined;
11
11
  underline?: boolean | undefined;
12
12
  } & Omit<import("react-aria").AriaLinkOptions, "isDisabled" | "elementType"> & React.AnchorHTMLAttributes<Element> & React.RefAttributes<unknown>>;