@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
@@ -13,7 +13,7 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { forwardRef, useRef } from 'react';
16
- import { useLink } from 'react-aria';
16
+ import { mergeProps, useFocusRing, useLink } from 'react-aria';
17
17
  import { ArrowRightIcon } from '../icon/index.js';
18
18
  import { styles as linkStyles } from './link.styles.js';
19
19
  export function BaseLink({ className , children , href , iconBefore: IconBefore , iconAfter: IconAfter , iconSize ='small' , target , type ='standalone' , underline =true , ...props }, propRef) {
@@ -21,14 +21,16 @@ export function BaseLink({ className , children , href , iconBefore: IconBefore
21
21
  const { linkProps } = useLink({
22
22
  ...props
23
23
  }, ref);
24
+ const { isFocusVisible , focusProps } = useFocusRing();
24
25
  const styles = linkStyles({
25
26
  type,
26
- underline
27
+ underline,
28
+ isFocusVisible
27
29
  });
28
30
  if (type === 'standalone' && !IconBefore && !IconAfter) {
29
31
  IconBefore = ArrowRightIcon;
30
32
  }
31
- return React.createElement("a", _extends({}, linkProps, {
33
+ return React.createElement("a", _extends({}, mergeProps(linkProps, focusProps), {
32
34
  ref: propRef,
33
35
  href: href,
34
36
  target: target,
@@ -12,6 +12,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
12
12
  underline: {
13
13
  true: string;
14
14
  };
15
+ isFocusVisible: {
16
+ true: {
17
+ base: string;
18
+ };
19
+ false: {
20
+ base: string;
21
+ };
22
+ };
15
23
  }, {
16
24
  base: string;
17
25
  text: string;
@@ -33,6 +41,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
33
41
  underline: {
34
42
  true: string;
35
43
  };
44
+ isFocusVisible: {
45
+ true: {
46
+ base: string;
47
+ };
48
+ false: {
49
+ base: string;
50
+ };
51
+ };
36
52
  }, {
37
53
  base: string;
38
54
  text: string;
@@ -1,7 +1,7 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
- base: 'inline-flex bg-[transparent] hover:underline focus:focus-outline',
4
+ base: 'inline-flex bg-[transparent] hover:underline',
5
5
  text: 'typography-body-10',
6
6
  iconBefore: 'mr-1',
7
7
  iconAfter: 'ml-1'
@@ -9,16 +9,24 @@ export const styles = tv({
9
9
  variants: {
10
10
  type: {
11
11
  inline: {
12
- base: 'items-baseline text-link',
12
+ base: 'text-link items-baseline',
13
13
  iconBefore: 'self-center',
14
14
  iconAfter: 'self-center'
15
15
  },
16
16
  standalone: {
17
- base: 'items-center text-text'
17
+ base: 'text-text items-center'
18
18
  }
19
19
  },
20
20
  underline: {
21
21
  true: ''
22
+ },
23
+ isFocusVisible: {
24
+ true: {
25
+ base: 'focus-outline'
26
+ },
27
+ false: {
28
+ base: 'outline-none'
29
+ }
22
30
  }
23
31
  },
24
32
  compoundSlots: [
@@ -4,7 +4,7 @@ export declare function BaseItem({ className, children, href, look, type, spacin
4
4
  export declare const Item: React.ForwardRefExoticComponent<{
5
5
  href?: string | undefined;
6
6
  icon?: ((props: import("../../../icon/icon.types.js").IconProps) => JSX.Element) | undefined;
7
- look?: "link" | "success" | "danger" | "hero" | "neutral" | "primary" | undefined;
7
+ look?: "link" | "primary" | "hero" | "success" | "danger" | "neutral" | undefined;
8
8
  nested?: number | undefined;
9
9
  spacing?: "medium" | "large" | undefined;
10
10
  type?: "link" | "icon" | "bullet" | "tick" | "cross" | "unstyled" | "ordered" | undefined;
@@ -13,6 +13,7 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { forwardRef, useContext } from 'react';
16
+ import { useFocusRing } from 'react-aria';
16
17
  import { ListContext } from '../../list.component.js';
17
18
  import { getStateValues } from '../../list.utils.js';
18
19
  import { styles as itemStyles } from './item.styles.js';
@@ -28,12 +29,14 @@ export function BaseItem({ className , children , href , look , type , spacing ,
28
29
  look = stateValues.look;
29
30
  type = stateValues.type;
30
31
  const Icon = stateValues.icon;
32
+ const { isFocusVisible , focusProps } = useFocusRing();
31
33
  const styles = itemStyles({
32
34
  look,
33
35
  type,
34
36
  spacing: stateValues.spacing,
35
37
  icon: !!Icon,
36
- nested: state.nested && state.nested > 0 || false
38
+ nested: state.nested && state.nested > 0 || false,
39
+ isFocusVisible
37
40
  });
38
41
  const bulletToRender = ()=>{
39
42
  if (type === 'ordered' || type === 'unstyled') {
@@ -59,10 +62,10 @@ export function BaseItem({ className , children , href , look , type , spacing ,
59
62
  className: styles.base({
60
63
  className
61
64
  })
62
- }, props), type === 'link' ? React.createElement("a", {
65
+ }, props), type === 'link' ? React.createElement("a", _extends({
63
66
  href: href,
64
67
  className: styles.link(),
65
68
  ref: ref
66
- }, children) : children));
69
+ }, focusProps), children) : children));
67
70
  }
68
71
  export const Item = forwardRef(BaseItem);
@@ -60,6 +60,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
60
60
  bullet: string;
61
61
  };
62
62
  };
63
+ isFocusVisible: {
64
+ true: {
65
+ link: string;
66
+ };
67
+ };
63
68
  }, {
64
69
  base: string;
65
70
  bullet: string;
@@ -129,6 +134,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
129
134
  bullet: string;
130
135
  };
131
136
  };
137
+ isFocusVisible: {
138
+ true: {
139
+ link: string;
140
+ };
141
+ };
132
142
  }, {
133
143
  base: string;
134
144
  bullet: string;
@@ -3,7 +3,7 @@ export const styles = tv({
3
3
  slots: {
4
4
  base: 'pl-[1.1875rem]',
5
5
  bullet: 'absolute block border',
6
- link: 'text-text hover:cursor-pointer hover:underline focus:focus-outline',
6
+ link: 'text-text hover:cursor-pointer hover:underline',
7
7
  wrapper: 'relative'
8
8
  },
9
9
  variants: {
@@ -67,6 +67,11 @@ export const styles = tv({
67
67
  true: {
68
68
  bullet: 'bg-[transparent]'
69
69
  }
70
+ },
71
+ isFocusVisible: {
72
+ true: {
73
+ link: 'focus-outline'
74
+ }
70
75
  }
71
76
  },
72
77
  compoundSlots: [
@@ -6,7 +6,7 @@ export declare namespace List {
6
6
  var Item: React.ForwardRefExoticComponent<{
7
7
  href?: string | undefined;
8
8
  icon?: ((props: import("../icon/icon.types.js").IconProps) => JSX.Element) | undefined;
9
- look?: "link" | "success" | "danger" | "hero" | "neutral" | "primary" | undefined;
9
+ look?: "link" | "primary" | "hero" | "success" | "danger" | "neutral" | undefined;
10
10
  nested?: number | undefined;
11
11
  spacing?: "medium" | "large" | undefined;
12
12
  type?: "link" | "icon" | "bullet" | "tick" | "cross" | "unstyled" | "ordered" | undefined;
@@ -50,7 +50,13 @@ export const ListTypes = ()=>TYPES.map((type)=>React.createElement("div", {
50
50
  }, type), React.createElement(List, {
51
51
  type: type,
52
52
  icon: type === 'icon' ? AndroidIcon : undefined
53
- }, React.createElement(List.Item, null, "Styled ", type, " list"), React.createElement(List.Item, null, "Styled ", type, " list"), React.createElement(List.Item, null, "Styled ", type, " list"), React.createElement(List, {
53
+ }, React.createElement(List.Item, {
54
+ href: type === 'link' ? '#' : undefined
55
+ }, "Styled ", type, " list"), React.createElement(List.Item, {
56
+ href: type === 'link' ? '#' : undefined
57
+ }, "Styled ", type, " list"), React.createElement(List.Item, {
58
+ href: type === 'link' ? '#' : undefined
59
+ }, "Styled ", type, " list"), React.createElement(List, {
54
60
  icon: type === 'link' ? AndroidIcon : undefined
55
61
  }, React.createElement(List.Item, null, "Styled ", type, " list"), React.createElement(List.Item, null, "Styled ", type, " list"), React.createElement(List.Item, null, "Styled ", type, " list")), React.createElement(List.Item, null, "Styled ", type, " list"))));
56
62
  export const ListLooks = ()=>LOOKS.map((look)=>React.createElement("div", {
@@ -2,7 +2,7 @@
2
2
  import { GetStateValuesProps } from './list.types.js';
3
3
  export declare const getStateValues: (props: GetStateValuesProps) => {
4
4
  type: "link" | "icon" | "bullet" | "tick" | "cross" | "unstyled" | "ordered";
5
- look: "link" | "success" | "danger" | "hero" | "neutral" | "primary";
5
+ look: "link" | "primary" | "hero" | "success" | "danger" | "neutral";
6
6
  spacing: "medium" | "large";
7
7
  icon: ((props: import("../icon/icon.types.js").IconProps) => JSX.Element) | undefined;
8
8
  };
@@ -1,7 +1,7 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
- base: 'fixed inset-0 z-50 flex animate-fadeIn justify-center overflow-y-auto bg-black/50 p-2',
5
- modal: 'relative top-5 z-10 h-fit w-full animate-fadeInDown focus:outline-none'
4
+ base: 'animate-fadeIn fixed inset-0 z-50 flex justify-center overflow-y-auto bg-black/50 p-2',
5
+ modal: 'animate-fadeInDown relative top-5 z-10 h-fit w-full'
6
6
  }
7
7
  });
@@ -13,27 +13,29 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { useRef } from 'react';
16
- import { useDialog } from 'react-aria';
16
+ import { useDialog, useFocusRing } from 'react-aria';
17
17
  import { CloseIcon } from '../../../../components/icon/index.js';
18
18
  import { DialogBody } from './components/dialog-body/index.js';
19
19
  import { DialogFooter } from './components/dialog-footer/index.js';
20
20
  import { styles as dialogStyles } from './dialog.styles.js';
21
21
  export function Dialog({ className , body , onClose , size ='md' , ...props }) {
22
22
  const { children } = props;
23
+ const { isFocusVisible , focusProps } = useFocusRing();
23
24
  const styles = dialogStyles({
24
25
  className,
25
- size
26
+ size,
27
+ isFocusVisible
26
28
  });
27
29
  const ref = useRef(null);
28
30
  const { dialogProps , titleProps } = useDialog(props, ref);
29
31
  return React.createElement("div", _extends({}, dialogProps, {
30
32
  ref: ref,
31
33
  className: styles.base()
32
- }), onClose && React.createElement("button", {
34
+ }), onClose && React.createElement("button", _extends({
33
35
  className: styles.close(),
34
36
  onClick: onClose,
35
37
  "aria-label": "Close modal"
36
- }, React.createElement(CloseIcon, {
38
+ }, focusProps), React.createElement(CloseIcon, {
37
39
  className: "block",
38
40
  size: "small"
39
41
  })), props.title && React.createElement("h3", _extends({}, titleProps, {
@@ -10,6 +10,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
10
10
  base: string;
11
11
  };
12
12
  };
13
+ isFocusVisible: {
14
+ true: {
15
+ close: string;
16
+ };
17
+ false: {
18
+ close: string;
19
+ };
20
+ };
13
21
  }, {
14
22
  base: string;
15
23
  title: string;
@@ -28,6 +36,14 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
28
36
  base: string;
29
37
  };
30
38
  };
39
+ isFocusVisible: {
40
+ true: {
41
+ close: string;
42
+ };
43
+ false: {
44
+ close: string;
45
+ };
46
+ };
31
47
  }, {
32
48
  base: string;
33
49
  title: string;
@@ -1,9 +1,9 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
- base: 'relative mx-auto max-w-full overflow-hidden rounded-[0.1875rem] bg-white focus:focus-outline',
5
- title: 'border-b border-b-heading pb-2 pl-4 pr-5 pt-3 text-lg font-medium',
6
- close: 'absolute right-1 top-1 block p-1 focus:focus-outline'
4
+ base: 'relative mx-auto max-w-full overflow-hidden rounded-[0.1875rem] bg-white outline-none',
5
+ title: 'border-b-heading border-b pb-2 pl-4 pr-5 pt-3 text-lg font-medium',
6
+ close: 'absolute right-1 top-1 block p-1'
7
7
  },
8
8
  variants: {
9
9
  size: {
@@ -16,6 +16,14 @@ export const styles = tv({
16
16
  sm: {
17
17
  base: 'w-[18.75rem]'
18
18
  }
19
+ },
20
+ isFocusVisible: {
21
+ true: {
22
+ close: 'focus-outline'
23
+ },
24
+ false: {
25
+ close: 'outline-none'
26
+ }
19
27
  }
20
28
  }
21
29
  }, {
@@ -4,7 +4,7 @@ export const styles = tv({
4
4
  base: '',
5
5
  popover: 'border-muted absolute z-[999] rounded-[3px] border bg-white shadow-[0_5px_10px_rgba(0,0,0,0.2)]',
6
6
  arrow: 'border-t-muted absolute h-0 w-0 border-x-[8px] border-t-[12px] border-x-[transparent] after:absolute after:h-0 after:w-0 after:border-x-[7px] after:border-t-[11px] after:border-x-[transparent] after:border-t-white',
7
- closeBtn: 'focus:focus-outline absolute right-1 top-1 m-1 p-0 hover:opacity-80',
7
+ closeBtn: 'absolute right-1 top-1 m-1 p-0 hover:opacity-80',
8
8
  content: 'w-[17.625rem] py-4 pl-3 pr-5',
9
9
  heading: 'typography-body-9 mb-2 font-bold',
10
10
  body: 'typography-body-10'
@@ -36,7 +36,6 @@ export function Popover({ children , className , headingTag , content , heading
36
36
  }, React.createElement(Button, {
37
37
  look: icon && !children ? 'link' : look,
38
38
  iconAfter: icon,
39
- className: styles.button(),
40
39
  "aria-expanded": state.isOpen,
41
40
  "aria-controls": panelId,
42
41
  onClick: handleClick
@@ -1,9 +1,7 @@
1
1
  export declare const styles: import("tailwind-variants").TVReturnType<{}, {
2
2
  base: string;
3
- button: string;
4
3
  }, undefined, {
5
4
  responsiveVariants: string[];
6
5
  }, {}, {
7
6
  base: string;
8
- button: string;
9
7
  }>;
@@ -1,8 +1,7 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
3
  slots: {
4
- base: 'relative inline-block',
5
- button: 'focus:focus-outline'
4
+ base: 'relative inline-block'
6
5
  },
7
6
  variants: {}
8
7
  }, {
@@ -24,11 +24,11 @@ function BaseRadio({ className , hint , children , ...props }, ref) {
24
24
  ...props,
25
25
  children
26
26
  }, state, localRef);
27
- const { isFocusVisible , focusProps } = useFocusRing();
27
+ const { isFocused , focusProps } = useFocusRing();
28
28
  const styles = radioStyles({
29
29
  isDisabled,
30
30
  isSelected,
31
- isFocusVisible,
31
+ isFocused,
32
32
  size,
33
33
  orientation
34
34
  });
@@ -13,7 +13,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
13
13
  selector: string;
14
14
  };
15
15
  };
16
- isFocusVisible: {
16
+ isFocused: {
17
17
  true: {
18
18
  selector: string;
19
19
  };
@@ -59,7 +59,7 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
59
59
  selector: string;
60
60
  };
61
61
  };
62
- isFocusVisible: {
62
+ isFocused: {
63
63
  true: {
64
64
  selector: string;
65
65
  };
@@ -4,8 +4,8 @@ export const styles = tv({
4
4
  base: 'flex',
5
5
  textWrapper: 'flex flex-col justify-center',
6
6
  labelText: 'typography-body-10 py-[2px] pl-1',
7
- hintText: 'typography-body-10 pl-1 text-muted',
8
- selector: 'flex h-4 w-4 items-center justify-center rounded-full border border-hero'
7
+ hintText: 'typography-body-10 text-muted pl-1',
8
+ selector: 'border-hero flex h-4 w-4 items-center justify-center rounded-full border'
9
9
  },
10
10
  variants: {
11
11
  isDisabled: {
@@ -19,12 +19,12 @@ export const styles = tv({
19
19
  },
20
20
  isSelected: {
21
21
  true: {
22
- selector: 'before:block before:h-2 before:w-2 before:rounded-full before:bg-hero'
22
+ selector: 'before:bg-hero before:block before:h-2 before:w-2 before:rounded-full'
23
23
  }
24
24
  },
25
- isFocusVisible: {
25
+ isFocused: {
26
26
  true: {
27
- selector: 'rounded-full focus-outline'
27
+ selector: 'focus-outline'
28
28
  }
29
29
  },
30
30
  orientation: {
@@ -14,6 +14,7 @@ function _extends() {
14
14
  }
15
15
  import { AnimatePresence, LazyMotion, m } from 'framer-motion';
16
16
  import React, { useCallback, useEffect, useRef, useState } from 'react';
17
+ import { useFocusRing } from 'react-aria';
17
18
  import { generateID } from '../../utils/index.js';
18
19
  import { Button } from '../button/index.js';
19
20
  import { AddCircleIcon, RemoveCircleIcon } from '../icon/index.js';
@@ -32,6 +33,7 @@ export function Repeater({ addText ='Add another item' , indexTag: ItemIndex = '
32
33
  });
33
34
  const [status, setStatus] = useState('');
34
35
  const refArr = useRef([]);
36
+ const { isFocused , focusProps } = useFocusRing();
35
37
  const handleAdd = useCallback(()=>{
36
38
  setItems([
37
39
  ...items,
@@ -76,7 +78,8 @@ export function Repeater({ addText ='Add another item' , indexTag: ItemIndex = '
76
78
  ]);
77
79
  const Tag = separator ? 'ol' : 'ul';
78
80
  const styles = repeaterStyles({
79
- separator
81
+ separator,
82
+ isFocused
80
83
  });
81
84
  return React.createElement("div", {
82
85
  className: styles.base({
@@ -101,13 +104,13 @@ export function Repeater({ addText ='Add another item' , indexTag: ItemIndex = '
101
104
  duration: 0.15
102
105
  },
103
106
  key: index
104
- }, React.createElement("div", {
107
+ }, React.createElement("div", _extends({
105
108
  ref: (el)=>{
106
109
  refArr.current[index] = el;
107
110
  },
108
111
  tabIndex: -1,
109
112
  className: styles.item()
110
- }, separator && React.createElement(ItemIndex, {
113
+ }, focusProps), separator && React.createElement(ItemIndex, {
111
114
  className: styles.itemIndex()
112
115
  }, index + 1, "."), React.createElement("div", {
113
116
  className: styles.content()
@@ -7,6 +7,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
7
7
  footer: string;
8
8
  };
9
9
  };
10
+ isFocused: {
11
+ true: {
12
+ item: string;
13
+ };
14
+ };
10
15
  }, {
11
16
  base: string;
12
17
  list: string;
@@ -27,6 +32,11 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
27
32
  footer: string;
28
33
  };
29
34
  };
35
+ isFocused: {
36
+ true: {
37
+ item: string;
38
+ };
39
+ };
30
40
  }, {
31
41
  base: string;
32
42
  list: string;
@@ -3,7 +3,7 @@ export const styles = tv({
3
3
  slots: {
4
4
  base: '',
5
5
  list: 'm-0 list-none pl-0',
6
- item: 'relative focus:outline-none',
6
+ item: 'relative',
7
7
  itemIndex: 'mb-[1.125rem] font-bold',
8
8
  content: '',
9
9
  removeBtn: 'absolute right-0 top-0 h-auto p-0 no-underline hover:underline',
@@ -18,6 +18,11 @@ export const styles = tv({
18
18
  removeBtn: 'relative m-[0_0_1.875rem_1.125rem]',
19
19
  footer: 'border-neutral border-t-2 pt-[0.875rem]'
20
20
  }
21
+ },
22
+ isFocused: {
23
+ true: {
24
+ item: 'outline-none'
25
+ }
21
26
  }
22
27
  }
23
28
  }, {
@@ -10,7 +10,12 @@ export declare const Select: React.ForwardRefExoticComponent<import("tailwind-va
10
10
  true: string;
11
11
  false: string;
12
12
  };
13
- }, undefined, "form-control bg-no-repeat select-caret disabled:form-control-disabled focus:focus-outline group-[.add-on-after]:rounded-l-none group-[.add-on-before]:rounded-r-none", {
13
+ isFocused: {
14
+ true: {
15
+ base: string;
16
+ };
17
+ };
18
+ }, undefined, "form-control select-caret disabled:form-control-disabled bg-no-repeat group-[.add-on-after]:rounded-l-none group-[.add-on-before]:rounded-r-none", {
14
19
  responsiveVariants: string[];
15
20
  }, {
16
21
  size: {
@@ -23,4 +28,9 @@ export declare const Select: React.ForwardRefExoticComponent<import("tailwind-va
23
28
  true: string;
24
29
  false: string;
25
30
  };
31
+ isFocused: {
32
+ true: {
33
+ base: string;
34
+ };
35
+ };
26
36
  }, undefined>> & Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "size"> & React.RefAttributes<HTMLSelectElement>>;
@@ -13,15 +13,18 @@ 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 './select.styles.js';
17
18
  function BaseSelect({ className , size ='medium' , invalid =false , children , ...props }, ref) {
19
+ const { isFocused , focusProps } = useFocusRing();
18
20
  return React.createElement("select", _extends({
19
21
  ref: ref,
20
22
  className: styles({
21
23
  className,
22
24
  size,
23
- invalid
25
+ invalid,
26
+ isFocused
24
27
  })
25
- }, props), children);
28
+ }, mergeProps(props, focusProps)), children);
26
29
  }
27
30
  export const Select = forwardRef(BaseSelect);
@@ -9,7 +9,12 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
9
9
  true: string;
10
10
  false: string;
11
11
  };
12
- }, undefined, "form-control bg-no-repeat select-caret disabled:form-control-disabled focus:focus-outline group-[.add-on-after]:rounded-l-none group-[.add-on-before]:rounded-r-none", {
12
+ isFocused: {
13
+ true: {
14
+ base: string;
15
+ };
16
+ };
17
+ }, undefined, "form-control select-caret disabled:form-control-disabled bg-no-repeat group-[.add-on-after]:rounded-l-none group-[.add-on-before]:rounded-r-none", {
13
18
  responsiveVariants: string[];
14
19
  }, {
15
20
  size: {
@@ -22,4 +27,9 @@ export declare const styles: import("tailwind-variants").TVReturnType<{
22
27
  true: string;
23
28
  false: string;
24
29
  };
30
+ isFocused: {
31
+ true: {
32
+ base: string;
33
+ };
34
+ };
25
35
  }, undefined>;
@@ -1,6 +1,6 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
  export const styles = tv({
3
- base: 'form-control bg-no-repeat select-caret disabled:form-control-disabled focus:focus-outline group-[.add-on-after]:rounded-l-none group-[.add-on-before]:rounded-r-none',
3
+ base: 'form-control select-caret disabled:form-control-disabled bg-no-repeat group-[.add-on-after]:rounded-l-none group-[.add-on-before]:rounded-r-none',
4
4
  variants: {
5
5
  size: {
6
6
  small: 'form-control-small bg-[right_0.5625rem_center] pr-[calc(0.5rem+14px+0.5625rem)]',
@@ -11,6 +11,11 @@ export const styles = tv({
11
11
  invalid: {
12
12
  true: 'border-danger',
13
13
  false: 'border-borderDark'
14
+ },
15
+ isFocused: {
16
+ true: {
17
+ base: 'focus-outline'
18
+ }
14
19
  }
15
20
  }
16
21
  }, {
@@ -13,7 +13,7 @@ function _extends() {
13
13
  return _extends.apply(this, arguments);
14
14
  }
15
15
  import React, { forwardRef, useContext, useRef } from 'react';
16
- import { VisuallyHidden, useCheckboxGroupItem, useFocusRing } from 'react-aria';
16
+ import { VisuallyHidden, mergeProps, useCheckboxGroupItem, useFocusRing } from 'react-aria';
17
17
  import { FlexiCellAdornment, FlexiCellBody, FlexiCellButton, FlexiCellCircle, FlexiCellFooter, FlexiCellHint, FlexiCellLabel } from '../../../../../../components/flexi-cell/index.js';
18
18
  import { ArrowRightIcon, TickIcon } from '../../../../../../components/icon/index.js';
19
19
  import { FlexiCell } from '../../../../../../components/index.js';
@@ -27,11 +27,11 @@ function BaseSelectorCheckboxGroupOption({ className , children , value , withBo
27
27
  value,
28
28
  children
29
29
  }, state, localRef);
30
- const { isFocusVisible , focusProps } = useFocusRing();
30
+ const { isFocused , focusProps } = useFocusRing();
31
31
  const styles = selectorCheckboxGroupOptionStyles({
32
32
  className,
33
33
  isSelected,
34
- isFocusVisible,
34
+ isFocused,
35
35
  isDisabled,
36
36
  checkIcon
37
37
  });
@@ -53,7 +53,7 @@ function BaseSelectorCheckboxGroupOption({ className , children , value , withBo
53
53
  ref: ref,
54
54
  withHoverEffect: true,
55
55
  className: styles.base({})
56
- }, React.createElement(VisuallyHidden, null, React.createElement("input", _extends({}, inputProps, focusProps, {
56
+ }, React.createElement(VisuallyHidden, null, React.createElement("input", _extends({}, mergeProps(inputProps, focusProps), {
57
57
  ref: localRef
58
58
  }))), children);
59
59
  }