@cambly/syntax-core 4.1.0 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -166,7 +166,7 @@ var margin_module_default = { "marginBottom-12": "_marginBottom-12_1whn1_2", "ma
166
166
  var padding_module_default = { "paddingX0": "_paddingX0_1aqye_2", "paddingX1": "_paddingX1_1aqye_7", "paddingX2": "_paddingX2_1aqye_12", "paddingX3": "_paddingX3_1aqye_17", "paddingX4": "_paddingX4_1aqye_22", "paddingX5": "_paddingX5_1aqye_27", "paddingX6": "_paddingX6_1aqye_32", "paddingX7": "_paddingX7_1aqye_37", "paddingX8": "_paddingX8_1aqye_42", "paddingX9": "_paddingX9_1aqye_47", "paddingX10": "_paddingX10_1aqye_52", "paddingX11": "_paddingX11_1aqye_57", "paddingX12": "_paddingX12_1aqye_62", "paddingY0": "_paddingY0_1aqye_67", "paddingY1": "_paddingY1_1aqye_72", "paddingY2": "_paddingY2_1aqye_77", "paddingY3": "_paddingY3_1aqye_82", "paddingY4": "_paddingY4_1aqye_87", "paddingY5": "_paddingY5_1aqye_92", "paddingY6": "_paddingY6_1aqye_97", "paddingY7": "_paddingY7_1aqye_102", "paddingY8": "_paddingY8_1aqye_107", "paddingY9": "_paddingY9_1aqye_112", "paddingY10": "_paddingY10_1aqye_117", "paddingY11": "_paddingY11_1aqye_122", "paddingY12": "_paddingY12_1aqye_127", "paddingX0Small": "_paddingX0Small_1aqye_134", "paddingX1Small": "_paddingX1Small_1aqye_139", "paddingX2Small": "_paddingX2Small_1aqye_144", "paddingX3Small": "_paddingX3Small_1aqye_149", "paddingX4Small": "_paddingX4Small_1aqye_154", "paddingX5Small": "_paddingX5Small_1aqye_159", "paddingX6Small": "_paddingX6Small_1aqye_164", "paddingX7Small": "_paddingX7Small_1aqye_169", "paddingX8Small": "_paddingX8Small_1aqye_174", "paddingX9Small": "_paddingX9Small_1aqye_179", "paddingX10Small": "_paddingX10Small_1aqye_184", "paddingX11Small": "_paddingX11Small_1aqye_189", "paddingX12Small": "_paddingX12Small_1aqye_194", "paddingY0Small": "_paddingY0Small_1aqye_199", "paddingY1Small": "_paddingY1Small_1aqye_204", "paddingY2Small": "_paddingY2Small_1aqye_209", "paddingY3Small": "_paddingY3Small_1aqye_214", "paddingY4Small": "_paddingY4Small_1aqye_219", "paddingY5Small": "_paddingY5Small_1aqye_224", "paddingY6Small": "_paddingY6Small_1aqye_229", "paddingY7Small": "_paddingY7Small_1aqye_234", "paddingY8Small": "_paddingY8Small_1aqye_239", "paddingY9Small": "_paddingY9Small_1aqye_244", "paddingY10Small": "_paddingY10Small_1aqye_249", "paddingY11Small": "_paddingY11Small_1aqye_254", "paddingY12Small": "_paddingY12Small_1aqye_259", "paddingX0Large": "_paddingX0Large_1aqye_267", "paddingX1Large": "_paddingX1Large_1aqye_272", "paddingX2Large": "_paddingX2Large_1aqye_277", "paddingX3Large": "_paddingX3Large_1aqye_282", "paddingX4Large": "_paddingX4Large_1aqye_287", "paddingX5Large": "_paddingX5Large_1aqye_292", "paddingX6Large": "_paddingX6Large_1aqye_297", "paddingX7Large": "_paddingX7Large_1aqye_302", "paddingX8Large": "_paddingX8Large_1aqye_307", "paddingX9Large": "_paddingX9Large_1aqye_312", "paddingX10Large": "_paddingX10Large_1aqye_317", "paddingX11Large": "_paddingX11Large_1aqye_322", "paddingX12Large": "_paddingX12Large_1aqye_327", "paddingY0Large": "_paddingY0Large_1aqye_332", "paddingY1Large": "_paddingY1Large_1aqye_337", "paddingY2Large": "_paddingY2Large_1aqye_342", "paddingY3Large": "_paddingY3Large_1aqye_347", "paddingY4Large": "_paddingY4Large_1aqye_352", "paddingY5Large": "_paddingY5Large_1aqye_357", "paddingY6Large": "_paddingY6Large_1aqye_362", "paddingY7Large": "_paddingY7Large_1aqye_367", "paddingY8Large": "_paddingY8Large_1aqye_372", "paddingY9Large": "_paddingY9Large_1aqye_377", "paddingY10Large": "_paddingY10Large_1aqye_382", "paddingY11Large": "_paddingY11Large_1aqye_387", "paddingY12Large": "_paddingY12Large_1aqye_392" };
167
167
 
168
168
  // css-module:../colors/colors.module.css#css-module
169
- var colors_module_default = { "inheritColor": "_inheritColor_j1pwm_2", "destructive700Color": "_destructive700Color_j1pwm_6", "gray700Color": "_gray700Color_j1pwm_10", "gray900Color": "_gray900Color_j1pwm_14", "primary700Color": "_primary700Color_j1pwm_18", "whiteColor": "_whiteColor_j1pwm_22", "blackBackgroundColor": "_blackBackgroundColor_j1pwm_27", "destructive100BackgroundColor": "_destructive100BackgroundColor_j1pwm_31", "destructive200BackgroundColor": "_destructive200BackgroundColor_j1pwm_35", "destructive300BackgroundColor": "_destructive300BackgroundColor_j1pwm_39", "destructive700BackgroundColor": "_destructive700BackgroundColor_j1pwm_43", "destructive800BackgroundColor": "_destructive800BackgroundColor_j1pwm_47", "destructive900BackgroundColor": "_destructive900BackgroundColor_j1pwm_51", "gray10BackgroundColor": "_gray10BackgroundColor_j1pwm_55", "gray30BackgroundColor": "_gray30BackgroundColor_j1pwm_59", "gray80BackgroundColor": "_gray80BackgroundColor_j1pwm_63", "gray100BackgroundColor": "_gray100BackgroundColor_j1pwm_67", "gray200BackgroundColor": "_gray200BackgroundColor_j1pwm_71", "gray300BackgroundColor": "_gray300BackgroundColor_j1pwm_75", "gray700BackgroundColor": "_gray700BackgroundColor_j1pwm_79", "gray800BackgroundColor": "_gray800BackgroundColor_j1pwm_83", "gray900BackgroundColor": "_gray900BackgroundColor_j1pwm_87", "orange100BackgroundColor": "_orange100BackgroundColor_j1pwm_91", "orange200BackgroundColor": "_orange200BackgroundColor_j1pwm_95", "orange300BackgroundColor": "_orange300BackgroundColor_j1pwm_99", "orange700BackgroundColor": "_orange700BackgroundColor_j1pwm_103", "orange800BackgroundColor": "_orange800BackgroundColor_j1pwm_107", "orange900BackgroundColor": "_orange900BackgroundColor_j1pwm_111", "primary100BackgroundColor": "_primary100BackgroundColor_j1pwm_115", "primary200BackgroundColor": "_primary200BackgroundColor_j1pwm_119", "primary300BackgroundColor": "_primary300BackgroundColor_j1pwm_123", "primary700BackgroundColor": "_primary700BackgroundColor_j1pwm_127", "primary800BackgroundColor": "_primary800BackgroundColor_j1pwm_131", "primary900BackgroundColor": "_primary900BackgroundColor_j1pwm_135", "success100BackgroundColor": "_success100BackgroundColor_j1pwm_139", "success200BackgroundColor": "_success200BackgroundColor_j1pwm_143", "success300BackgroundColor": "_success300BackgroundColor_j1pwm_147", "success700BackgroundColor": "_success700BackgroundColor_j1pwm_151", "success800BackgroundColor": "_success800BackgroundColor_j1pwm_155", "success900BackgroundColor": "_success900BackgroundColor_j1pwm_159", "purple100BackgroundColor": "_purple100BackgroundColor_j1pwm_163", "purple200BackgroundColor": "_purple200BackgroundColor_j1pwm_167", "purple300BackgroundColor": "_purple300BackgroundColor_j1pwm_171", "purple700BackgroundColor": "_purple700BackgroundColor_j1pwm_175", "purple800BackgroundColor": "_purple800BackgroundColor_j1pwm_179", "purple900BackgroundColor": "_purple900BackgroundColor_j1pwm_183", "whiteBackgroundColor": "_whiteBackgroundColor_j1pwm_187", "yellow100BackgroundColor": "_yellow100BackgroundColor_j1pwm_191", "yellow200BackgroundColor": "_yellow200BackgroundColor_j1pwm_195", "yellow300BackgroundColor": "_yellow300BackgroundColor_j1pwm_199", "yellow700BackgroundColor": "_yellow700BackgroundColor_j1pwm_203", "yellow800BackgroundColor": "_yellow800BackgroundColor_j1pwm_207", "yellow900BackgroundColor": "_yellow900BackgroundColor_j1pwm_211" };
169
+ var colors_module_default = { "inheritColor": "_inheritColor_11wj3_2", "destructive700Color": "_destructive700Color_11wj3_6", "gray700Color": "_gray700Color_11wj3_10", "gray900Color": "_gray900Color_11wj3_14", "primary700Color": "_primary700Color_11wj3_18", "whiteColor": "_whiteColor_11wj3_22", "blackBackgroundColor": "_blackBackgroundColor_11wj3_27", "destructive100BackgroundColor": "_destructive100BackgroundColor_11wj3_31", "destructive200BackgroundColor": "_destructive200BackgroundColor_11wj3_35", "destructive300BackgroundColor": "_destructive300BackgroundColor_11wj3_39", "destructive700BackgroundColor": "_destructive700BackgroundColor_11wj3_43", "destructive800BackgroundColor": "_destructive800BackgroundColor_11wj3_47", "destructive900BackgroundColor": "_destructive900BackgroundColor_11wj3_51", "gray10BackgroundColor": "_gray10BackgroundColor_11wj3_55", "gray30BackgroundColor": "_gray30BackgroundColor_11wj3_59", "gray60BackgroundColor": "_gray60BackgroundColor_11wj3_63", "gray80BackgroundColor": "_gray80BackgroundColor_11wj3_67", "gray100BackgroundColor": "_gray100BackgroundColor_11wj3_71", "gray200BackgroundColor": "_gray200BackgroundColor_11wj3_75", "gray300BackgroundColor": "_gray300BackgroundColor_11wj3_79", "gray700BackgroundColor": "_gray700BackgroundColor_11wj3_83", "gray800BackgroundColor": "_gray800BackgroundColor_11wj3_87", "gray900BackgroundColor": "_gray900BackgroundColor_11wj3_91", "orange100BackgroundColor": "_orange100BackgroundColor_11wj3_95", "orange200BackgroundColor": "_orange200BackgroundColor_11wj3_99", "orange300BackgroundColor": "_orange300BackgroundColor_11wj3_103", "orange700BackgroundColor": "_orange700BackgroundColor_11wj3_107", "orange800BackgroundColor": "_orange800BackgroundColor_11wj3_111", "orange900BackgroundColor": "_orange900BackgroundColor_11wj3_115", "primary100BackgroundColor": "_primary100BackgroundColor_11wj3_119", "primary200BackgroundColor": "_primary200BackgroundColor_11wj3_123", "primary300BackgroundColor": "_primary300BackgroundColor_11wj3_127", "primary700BackgroundColor": "_primary700BackgroundColor_11wj3_131", "primary800BackgroundColor": "_primary800BackgroundColor_11wj3_135", "primary900BackgroundColor": "_primary900BackgroundColor_11wj3_139", "success100BackgroundColor": "_success100BackgroundColor_11wj3_143", "success200BackgroundColor": "_success200BackgroundColor_11wj3_147", "success300BackgroundColor": "_success300BackgroundColor_11wj3_151", "success700BackgroundColor": "_success700BackgroundColor_11wj3_155", "success800BackgroundColor": "_success800BackgroundColor_11wj3_159", "success900BackgroundColor": "_success900BackgroundColor_11wj3_163", "purple100BackgroundColor": "_purple100BackgroundColor_11wj3_167", "purple200BackgroundColor": "_purple200BackgroundColor_11wj3_171", "purple300BackgroundColor": "_purple300BackgroundColor_11wj3_175", "purple700BackgroundColor": "_purple700BackgroundColor_11wj3_179", "purple800BackgroundColor": "_purple800BackgroundColor_11wj3_183", "purple900BackgroundColor": "_purple900BackgroundColor_11wj3_187", "whiteBackgroundColor": "_whiteBackgroundColor_11wj3_191", "yellow100BackgroundColor": "_yellow100BackgroundColor_11wj3_195", "yellow200BackgroundColor": "_yellow200BackgroundColor_11wj3_199", "yellow300BackgroundColor": "_yellow300BackgroundColor_11wj3_203", "yellow700BackgroundColor": "_yellow700BackgroundColor_11wj3_207", "yellow800BackgroundColor": "_yellow800BackgroundColor_11wj3_211", "yellow900BackgroundColor": "_yellow900BackgroundColor_11wj3_215" };
170
170
 
171
171
  // src/Box/Box.tsx
172
172
  var import_jsx_runtime2 = require("react/jsx-runtime");
@@ -361,7 +361,7 @@ function Box(props) {
361
361
  var import_classnames3 = __toESM(require_classnames());
362
362
 
363
363
  // css-module:./colors.module.css#css-module
364
- var colors_module_default2 = { "inheritColor": "_inheritColor_j1pwm_2", "destructive700Color": "_destructive700Color_j1pwm_6", "gray700Color": "_gray700Color_j1pwm_10", "gray900Color": "_gray900Color_j1pwm_14", "primary700Color": "_primary700Color_j1pwm_18", "whiteColor": "_whiteColor_j1pwm_22", "blackBackgroundColor": "_blackBackgroundColor_j1pwm_27", "destructive100BackgroundColor": "_destructive100BackgroundColor_j1pwm_31", "destructive200BackgroundColor": "_destructive200BackgroundColor_j1pwm_35", "destructive300BackgroundColor": "_destructive300BackgroundColor_j1pwm_39", "destructive700BackgroundColor": "_destructive700BackgroundColor_j1pwm_43", "destructive800BackgroundColor": "_destructive800BackgroundColor_j1pwm_47", "destructive900BackgroundColor": "_destructive900BackgroundColor_j1pwm_51", "gray10BackgroundColor": "_gray10BackgroundColor_j1pwm_55", "gray30BackgroundColor": "_gray30BackgroundColor_j1pwm_59", "gray80BackgroundColor": "_gray80BackgroundColor_j1pwm_63", "gray100BackgroundColor": "_gray100BackgroundColor_j1pwm_67", "gray200BackgroundColor": "_gray200BackgroundColor_j1pwm_71", "gray300BackgroundColor": "_gray300BackgroundColor_j1pwm_75", "gray700BackgroundColor": "_gray700BackgroundColor_j1pwm_79", "gray800BackgroundColor": "_gray800BackgroundColor_j1pwm_83", "gray900BackgroundColor": "_gray900BackgroundColor_j1pwm_87", "orange100BackgroundColor": "_orange100BackgroundColor_j1pwm_91", "orange200BackgroundColor": "_orange200BackgroundColor_j1pwm_95", "orange300BackgroundColor": "_orange300BackgroundColor_j1pwm_99", "orange700BackgroundColor": "_orange700BackgroundColor_j1pwm_103", "orange800BackgroundColor": "_orange800BackgroundColor_j1pwm_107", "orange900BackgroundColor": "_orange900BackgroundColor_j1pwm_111", "primary100BackgroundColor": "_primary100BackgroundColor_j1pwm_115", "primary200BackgroundColor": "_primary200BackgroundColor_j1pwm_119", "primary300BackgroundColor": "_primary300BackgroundColor_j1pwm_123", "primary700BackgroundColor": "_primary700BackgroundColor_j1pwm_127", "primary800BackgroundColor": "_primary800BackgroundColor_j1pwm_131", "primary900BackgroundColor": "_primary900BackgroundColor_j1pwm_135", "success100BackgroundColor": "_success100BackgroundColor_j1pwm_139", "success200BackgroundColor": "_success200BackgroundColor_j1pwm_143", "success300BackgroundColor": "_success300BackgroundColor_j1pwm_147", "success700BackgroundColor": "_success700BackgroundColor_j1pwm_151", "success800BackgroundColor": "_success800BackgroundColor_j1pwm_155", "success900BackgroundColor": "_success900BackgroundColor_j1pwm_159", "purple100BackgroundColor": "_purple100BackgroundColor_j1pwm_163", "purple200BackgroundColor": "_purple200BackgroundColor_j1pwm_167", "purple300BackgroundColor": "_purple300BackgroundColor_j1pwm_171", "purple700BackgroundColor": "_purple700BackgroundColor_j1pwm_175", "purple800BackgroundColor": "_purple800BackgroundColor_j1pwm_179", "purple900BackgroundColor": "_purple900BackgroundColor_j1pwm_183", "whiteBackgroundColor": "_whiteBackgroundColor_j1pwm_187", "yellow100BackgroundColor": "_yellow100BackgroundColor_j1pwm_191", "yellow200BackgroundColor": "_yellow200BackgroundColor_j1pwm_195", "yellow300BackgroundColor": "_yellow300BackgroundColor_j1pwm_199", "yellow700BackgroundColor": "_yellow700BackgroundColor_j1pwm_203", "yellow800BackgroundColor": "_yellow800BackgroundColor_j1pwm_207", "yellow900BackgroundColor": "_yellow900BackgroundColor_j1pwm_211" };
364
+ var colors_module_default2 = { "inheritColor": "_inheritColor_11wj3_2", "destructive700Color": "_destructive700Color_11wj3_6", "gray700Color": "_gray700Color_11wj3_10", "gray900Color": "_gray900Color_11wj3_14", "primary700Color": "_primary700Color_11wj3_18", "whiteColor": "_whiteColor_11wj3_22", "blackBackgroundColor": "_blackBackgroundColor_11wj3_27", "destructive100BackgroundColor": "_destructive100BackgroundColor_11wj3_31", "destructive200BackgroundColor": "_destructive200BackgroundColor_11wj3_35", "destructive300BackgroundColor": "_destructive300BackgroundColor_11wj3_39", "destructive700BackgroundColor": "_destructive700BackgroundColor_11wj3_43", "destructive800BackgroundColor": "_destructive800BackgroundColor_11wj3_47", "destructive900BackgroundColor": "_destructive900BackgroundColor_11wj3_51", "gray10BackgroundColor": "_gray10BackgroundColor_11wj3_55", "gray30BackgroundColor": "_gray30BackgroundColor_11wj3_59", "gray60BackgroundColor": "_gray60BackgroundColor_11wj3_63", "gray80BackgroundColor": "_gray80BackgroundColor_11wj3_67", "gray100BackgroundColor": "_gray100BackgroundColor_11wj3_71", "gray200BackgroundColor": "_gray200BackgroundColor_11wj3_75", "gray300BackgroundColor": "_gray300BackgroundColor_11wj3_79", "gray700BackgroundColor": "_gray700BackgroundColor_11wj3_83", "gray800BackgroundColor": "_gray800BackgroundColor_11wj3_87", "gray900BackgroundColor": "_gray900BackgroundColor_11wj3_91", "orange100BackgroundColor": "_orange100BackgroundColor_11wj3_95", "orange200BackgroundColor": "_orange200BackgroundColor_11wj3_99", "orange300BackgroundColor": "_orange300BackgroundColor_11wj3_103", "orange700BackgroundColor": "_orange700BackgroundColor_11wj3_107", "orange800BackgroundColor": "_orange800BackgroundColor_11wj3_111", "orange900BackgroundColor": "_orange900BackgroundColor_11wj3_115", "primary100BackgroundColor": "_primary100BackgroundColor_11wj3_119", "primary200BackgroundColor": "_primary200BackgroundColor_11wj3_123", "primary300BackgroundColor": "_primary300BackgroundColor_11wj3_127", "primary700BackgroundColor": "_primary700BackgroundColor_11wj3_131", "primary800BackgroundColor": "_primary800BackgroundColor_11wj3_135", "primary900BackgroundColor": "_primary900BackgroundColor_11wj3_139", "success100BackgroundColor": "_success100BackgroundColor_11wj3_143", "success200BackgroundColor": "_success200BackgroundColor_11wj3_147", "success300BackgroundColor": "_success300BackgroundColor_11wj3_151", "success700BackgroundColor": "_success700BackgroundColor_11wj3_155", "success800BackgroundColor": "_success800BackgroundColor_11wj3_159", "success900BackgroundColor": "_success900BackgroundColor_11wj3_163", "purple100BackgroundColor": "_purple100BackgroundColor_11wj3_167", "purple200BackgroundColor": "_purple200BackgroundColor_11wj3_171", "purple300BackgroundColor": "_purple300BackgroundColor_11wj3_175", "purple700BackgroundColor": "_purple700BackgroundColor_11wj3_179", "purple800BackgroundColor": "_purple800BackgroundColor_11wj3_183", "purple900BackgroundColor": "_purple900BackgroundColor_11wj3_187", "whiteBackgroundColor": "_whiteBackgroundColor_11wj3_191", "yellow100BackgroundColor": "_yellow100BackgroundColor_11wj3_195", "yellow200BackgroundColor": "_yellow200BackgroundColor_11wj3_199", "yellow300BackgroundColor": "_yellow300BackgroundColor_11wj3_203", "yellow700BackgroundColor": "_yellow700BackgroundColor_11wj3_207", "yellow800BackgroundColor": "_yellow800BackgroundColor_11wj3_211", "yellow900BackgroundColor": "_yellow900BackgroundColor_11wj3_215" };
365
365
 
366
366
  // src/colors/backgroundColor.ts
367
367
  function backgroundColor(color) {
@@ -643,11 +643,98 @@ var IconButton = ({
643
643
  var IconButton_default = IconButton;
644
644
 
645
645
  // src/Checkbox/Checkbox.tsx
646
- var import_react = require("react");
646
+ var import_react2 = require("react");
647
647
  var import_classnames7 = __toESM(require_classnames());
648
648
 
649
+ // src/useFocusVisible.tsx
650
+ var import_react = require("react");
651
+ var hasSetupGlobalListeners = false;
652
+ var currentModality = null;
653
+ var changeHandlers = /* @__PURE__ */ new Set();
654
+ var hasEventBeforeFocus = false;
655
+ var isMac = typeof window !== "undefined" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : false;
656
+ function isValidKey(e) {
657
+ return !(e.metaKey || !isMac && e.altKey || e.ctrlKey);
658
+ }
659
+ function triggerChangeHandlers(modality, e) {
660
+ changeHandlers.forEach((handler) => {
661
+ handler(modality, e);
662
+ });
663
+ }
664
+ function handleKeyboardEvent(e) {
665
+ hasEventBeforeFocus = true;
666
+ if (isValidKey(e)) {
667
+ currentModality = "keyboard";
668
+ triggerChangeHandlers("keyboard", e);
669
+ }
670
+ }
671
+ function handlePointerEvent(e) {
672
+ currentModality = "pointer";
673
+ if (e.type === "mousedown" || e.type === "pointerdown") {
674
+ hasEventBeforeFocus = true;
675
+ triggerChangeHandlers("pointer", e);
676
+ }
677
+ }
678
+ function handleFocusEvent(e) {
679
+ if (e.target === window || e.target === document) {
680
+ return;
681
+ }
682
+ if (!hasEventBeforeFocus) {
683
+ currentModality = "keyboard";
684
+ triggerChangeHandlers("keyboard", e);
685
+ }
686
+ hasEventBeforeFocus = false;
687
+ }
688
+ function handleWindowBlur() {
689
+ hasEventBeforeFocus = false;
690
+ }
691
+ function isFocusVisible() {
692
+ return currentModality !== "pointer";
693
+ }
694
+ function setupGlobalFocusEvents() {
695
+ if (typeof window === "undefined" || hasSetupGlobalListeners) {
696
+ return;
697
+ }
698
+ const { focus } = HTMLElement.prototype;
699
+ HTMLElement.prototype.focus = function focusElement(...args) {
700
+ hasEventBeforeFocus = true;
701
+ focus.apply(this, args);
702
+ };
703
+ document.addEventListener("keydown", handleKeyboardEvent, true);
704
+ document.addEventListener("keyup", handleKeyboardEvent, true);
705
+ window.addEventListener("focus", handleFocusEvent, true);
706
+ window.addEventListener("blur", handleWindowBlur, false);
707
+ if (typeof PointerEvent !== "undefined") {
708
+ document.addEventListener("pointerdown", handlePointerEvent, true);
709
+ document.addEventListener("pointermove", handlePointerEvent, true);
710
+ document.addEventListener("pointerup", handlePointerEvent, true);
711
+ } else {
712
+ document.addEventListener("mousedown", handlePointerEvent, true);
713
+ document.addEventListener("mousemove", handlePointerEvent, true);
714
+ document.addEventListener("mouseup", handlePointerEvent, true);
715
+ }
716
+ hasSetupGlobalListeners = true;
717
+ }
718
+ function useFocusVisible() {
719
+ setupGlobalFocusEvents();
720
+ const [isFocusVisibleState, setFocusVisible] = (0, import_react.useState)(isFocusVisible());
721
+ (0, import_react.useEffect)(() => {
722
+ const handler = () => {
723
+ setFocusVisible(isFocusVisible());
724
+ };
725
+ changeHandlers.add(handler);
726
+ return () => {
727
+ changeHandlers.delete(handler);
728
+ };
729
+ }, []);
730
+ return { isFocusVisible: isFocusVisibleState };
731
+ }
732
+
649
733
  // css-module:./Checkbox.module.css#css-module
650
- var Checkbox_module_default = { "mainContainer": "_mainContainer_p0un4_1", "checkboxContainer": "_checkboxContainer_p0un4_8", "inputOverlay": "_inputOverlay_p0un4_13", "focusedCheckbox": "_focusedCheckbox_p0un4_21", "checkbox": "_checkbox_p0un4_8", "uncheckedBox": "_uncheckedBox_p0un4_35", "uncheckedBorder": "_uncheckedBorder_p0un4_39", "uncheckedErrorBorder": "_uncheckedErrorBorder_p0un4_43", "checkedBox": "_checkedBox_p0un4_47", "checkedNonError": "_checkedNonError_p0un4_51", "checkedError": "_checkedError_p0un4_55", "sm": "_sm_p0un4_59", "md": "_md_p0un4_65" };
734
+ var Checkbox_module_default = { "mainContainer": "_mainContainer_1jq7b_1", "checkboxContainer": "_checkboxContainer_1jq7b_8", "inputOverlay": "_inputOverlay_1jq7b_13", "checkbox": "_checkbox_1jq7b_8", "uncheckedBox": "_uncheckedBox_1jq7b_30", "uncheckedBorder": "_uncheckedBorder_1jq7b_34", "uncheckedErrorBorder": "_uncheckedErrorBorder_1jq7b_38", "checkedBox": "_checkedBox_1jq7b_42", "checkedNonError": "_checkedNonError_1jq7b_46", "checkedError": "_checkedError_1jq7b_50", "sm": "_sm_1jq7b_54", "md": "_md_1jq7b_60" };
735
+
736
+ // css-module:../Focus.module.css#css-module
737
+ var Focus_module_default = { "accessibilityOutlineFocus": "_accessibilityOutlineFocus_1h8bq_1" };
651
738
 
652
739
  // src/Checkbox/Checkbox.tsx
653
740
  var import_jsx_runtime10 = require("react/jsx-runtime");
@@ -667,17 +754,18 @@ var Checkbox = ({
667
754
  error = false,
668
755
  onChange
669
756
  }) => {
670
- const [isFocused, setIsFocused] = (0, import_react.useState)(false);
757
+ const [isFocused, setIsFocused] = (0, import_react2.useState)(false);
758
+ const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
671
759
  const checkboxStyling = (0, import_classnames7.default)(Checkbox_module_default.checkbox, Checkbox_module_default[size]);
672
760
  const uncheckedStyling = (0, import_classnames7.default)(checkboxStyling, Checkbox_module_default.uncheckedBox, {
673
761
  [Checkbox_module_default.uncheckedBorder]: !error,
674
762
  [Checkbox_module_default.uncheckedErrorBorder]: error,
675
- [Checkbox_module_default.focusedCheckbox]: isFocused
763
+ [Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
676
764
  });
677
765
  const checkedStyling = (0, import_classnames7.default)(checkboxStyling, Checkbox_module_default.checkedBox, {
678
766
  [Checkbox_module_default.checkedNonError]: !error,
679
767
  [Checkbox_module_default.checkedError]: error,
680
- [Checkbox_module_default.focusedCheckbox]: isFocused
768
+ [Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
681
769
  });
682
770
  return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("label", { className: (0, import_classnames7.default)(Checkbox_module_default.mainContainer), children: [
683
771
  /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: Checkbox_module_default.checkboxContainer, children: [
@@ -732,91 +820,7 @@ var import_react3 = require("react");
732
820
  var import_classnames8 = __toESM(require_classnames());
733
821
 
734
822
  // css-module:./RadioButton.module.css#css-module
735
- var RadioButton_module_default = { "radioBaseContainer": "_radioBaseContainer_x6och_1", "smBase": "_smBase_x6och_8", "mdBase": "_mdBase_x6och_13", "radioStyleOverride": "_radioStyleOverride_x6och_18", "smOverride": "_smOverride_x6och_23", "mdOverride": "_mdOverride_x6och_28", "background": "_background_x6och_33", "sm": "_sm_x6och_8", "md": "_md_x6och_13", "neutralBorder": "_neutralBorder_x6och_50", "smCheckedBorder": "_smCheckedBorder_x6och_54", "mdCheckedBorder": "_mdCheckedBorder_x6och_58", "errorBorderColor": "_errorBorderColor_x6och_62", "borderColor": "_borderColor_x6och_66", "focusedRadioButton": "_focusedRadioButton_x6och_70" };
736
-
737
- // src/useFocusVisible.tsx
738
- var import_react2 = require("react");
739
- var hasSetupGlobalListeners = false;
740
- var currentModality = null;
741
- var changeHandlers = /* @__PURE__ */ new Set();
742
- var hasEventBeforeFocus = false;
743
- var isMac = typeof window !== "undefined" && window.navigator != null ? /^Mac/.test(window.navigator.platform) : false;
744
- function isValidKey(e) {
745
- return !(e.metaKey || !isMac && e.altKey || e.ctrlKey);
746
- }
747
- function triggerChangeHandlers(modality, e) {
748
- changeHandlers.forEach((handler) => {
749
- handler(modality, e);
750
- });
751
- }
752
- function handleKeyboardEvent(e) {
753
- hasEventBeforeFocus = true;
754
- if (isValidKey(e)) {
755
- currentModality = "keyboard";
756
- triggerChangeHandlers("keyboard", e);
757
- }
758
- }
759
- function handlePointerEvent(e) {
760
- currentModality = "pointer";
761
- if (e.type === "mousedown" || e.type === "pointerdown") {
762
- hasEventBeforeFocus = true;
763
- triggerChangeHandlers("pointer", e);
764
- }
765
- }
766
- function handleFocusEvent(e) {
767
- if (e.target === window || e.target === document) {
768
- return;
769
- }
770
- if (!hasEventBeforeFocus) {
771
- currentModality = "keyboard";
772
- triggerChangeHandlers("keyboard", e);
773
- }
774
- hasEventBeforeFocus = false;
775
- }
776
- function handleWindowBlur() {
777
- hasEventBeforeFocus = false;
778
- }
779
- function isFocusVisible() {
780
- return currentModality !== "pointer";
781
- }
782
- function setupGlobalFocusEvents() {
783
- if (typeof window === "undefined" || hasSetupGlobalListeners) {
784
- return;
785
- }
786
- const { focus } = HTMLElement.prototype;
787
- HTMLElement.prototype.focus = function focusElement(...args) {
788
- hasEventBeforeFocus = true;
789
- focus.apply(this, args);
790
- };
791
- document.addEventListener("keydown", handleKeyboardEvent, true);
792
- document.addEventListener("keyup", handleKeyboardEvent, true);
793
- window.addEventListener("focus", handleFocusEvent, true);
794
- window.addEventListener("blur", handleWindowBlur, false);
795
- if (typeof PointerEvent !== "undefined") {
796
- document.addEventListener("pointerdown", handlePointerEvent, true);
797
- document.addEventListener("pointermove", handlePointerEvent, true);
798
- document.addEventListener("pointerup", handlePointerEvent, true);
799
- } else {
800
- document.addEventListener("mousedown", handlePointerEvent, true);
801
- document.addEventListener("mousemove", handlePointerEvent, true);
802
- document.addEventListener("mouseup", handlePointerEvent, true);
803
- }
804
- hasSetupGlobalListeners = true;
805
- }
806
- function useFocusVisible() {
807
- setupGlobalFocusEvents();
808
- const [isFocusVisibleState, setFocusVisible] = (0, import_react2.useState)(isFocusVisible());
809
- (0, import_react2.useEffect)(() => {
810
- const handler = () => {
811
- setFocusVisible(isFocusVisible());
812
- };
813
- changeHandlers.add(handler);
814
- return () => {
815
- changeHandlers.delete(handler);
816
- };
817
- }, []);
818
- return { isFocusVisible: isFocusVisibleState };
819
- }
823
+ var RadioButton_module_default = { "radioBaseContainer": "_radioBaseContainer_144ms_1", "smBase": "_smBase_144ms_8", "mdBase": "_mdBase_144ms_13", "radioStyleOverride": "_radioStyleOverride_144ms_18", "smOverride": "_smOverride_144ms_23", "mdOverride": "_mdOverride_144ms_28", "background": "_background_144ms_33", "sm": "_sm_144ms_8", "md": "_md_144ms_13", "neutralBorder": "_neutralBorder_144ms_50", "smCheckedBorder": "_smCheckedBorder_144ms_54", "mdCheckedBorder": "_mdCheckedBorder_144ms_58", "errorBorderColor": "_errorBorderColor_144ms_62", "borderColor": "_borderColor_144ms_66" };
820
824
 
821
825
  // src/RadioButton/RadioButton.tsx
822
826
  var import_jsx_runtime12 = require("react/jsx-runtime");
@@ -835,7 +839,7 @@ var RadioButton = ({
835
839
  const sharedStyles = (0, import_classnames8.default)(RadioButton_module_default.background, RadioButton_module_default[size], {
836
840
  [RadioButton_module_default.errorBorderColor]: error,
837
841
  [RadioButton_module_default.borderColor]: !error,
838
- [RadioButton_module_default.focusedRadioButton]: isFocused && isFocusVisible2
842
+ [Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2
839
843
  });
840
844
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
841
845
  "label",
@@ -898,7 +902,7 @@ var ColorBaseDestructive700 = "#d32a4b";
898
902
  var ColorBaseGray800 = "#353535";
899
903
 
900
904
  // css-module:./SelectList.module.css#css-module
901
- var SelectList_module_default = { "selectContainer": "_selectContainer_1y5p4_1", "opacityOverlay": "_opacityOverlay_1y5p4_7", "outerTextContainer": "_outerTextContainer_1y5p4_11", "selectWrapper": "_selectWrapper_1y5p4_16", "selectBox": "_selectBox_1y5p4_21", "unselected": "_unselected_1y5p4_40", "selected": "_selected_1y5p4_44", "arrowIcon": "_arrowIcon_1y5p4_48", "sm": "_sm_1y5p4_62", "md": "_md_1y5p4_67", "lg": "_lg_1y5p4_72", "selectError": "_selectError_1y5p4_77" };
905
+ var SelectList_module_default = { "selectContainer": "_selectContainer_1e7f9_1", "opacityOverlay": "_opacityOverlay_1e7f9_7", "outerTextContainer": "_outerTextContainer_1e7f9_11", "selectWrapper": "_selectWrapper_1e7f9_16", "selectBox": "_selectBox_1e7f9_21", "seletBoxMouseFocusStyling": "_seletBoxMouseFocusStyling_1e7f9_35", "unselected": "_unselected_1e7f9_40", "selected": "_selected_1e7f9_44", "arrowIcon": "_arrowIcon_1e7f9_48", "sm": "_sm_1e7f9_62", "md": "_md_1e7f9_67", "lg": "_lg_1e7f9_72", "selectError": "_selectError_1e7f9_77" };
902
906
 
903
907
  // src/SelectList/SelectOption.tsx
904
908
  var import_jsx_runtime13 = require("react/jsx-runtime");
@@ -936,6 +940,8 @@ var SelectList = ({
936
940
  size = "md"
937
941
  }) => {
938
942
  const id = (0, import_react4.useId)();
943
+ const { isFocusVisible: isFocusVisible2 } = useFocusVisible();
944
+ const [isFocused, setIsFocused] = (0, import_react4.useState)(false);
939
945
  return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
940
946
  "div",
941
947
  {
@@ -954,10 +960,16 @@ var SelectList = ({
954
960
  className: (0, import_classnames9.default)(SelectList_module_default.selectBox, SelectList_module_default[size], {
955
961
  [SelectList_module_default.unselected]: !selectedValue && !errorText,
956
962
  [SelectList_module_default.selected]: selectedValue && !errorText,
957
- [SelectList_module_default.selectError]: errorText
963
+ [SelectList_module_default.selectError]: errorText,
964
+ [Focus_module_default.accessibilityOutlineFocus]: isFocused && isFocusVisible2,
965
+ // for focus keyboard
966
+ [SelectList_module_default.seletBoxMouseFocusStyling]: isFocused && !isFocusVisible2
967
+ // for focus mouse
958
968
  }),
959
969
  onChange,
960
970
  value: placeholderText && !selectedValue ? placeholderText : selectedValue,
971
+ onFocus: () => setIsFocused(true),
972
+ onBlur: () => setIsFocused(false),
961
973
  children: [
962
974
  placeholderText && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("option", { disabled: true, value: placeholderText, children: placeholderText }),
963
975
  children