@box-kite/react 2.2.6 → 2.2.8

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 (122) hide show
  1. package/.claude/rules/box-kite-rules.md +2 -0
  2. package/.claude/skills/box-kite/SKILL.md +2 -0
  3. package/.claude/skills/box-kite/references/extending.md +10 -0
  4. package/.claude/skills/box-kite/references/styling.md +3 -2
  5. package/.cursor/rules/box-kite.mdc +2 -0
  6. package/AGENTS.md +2 -0
  7. package/BOX_AI_CONTEXT.md +128 -2
  8. package/BOX_KITE_AI_CONTEXT.md +128 -2
  9. package/analytics.cjs +1 -0
  10. package/analytics.d.ts +10 -0
  11. package/analytics.mjs +121 -0
  12. package/behavior.cjs +1 -1
  13. package/behavior.mjs +42 -38
  14. package/box.cjs +1 -1
  15. package/box.d.ts +14 -0
  16. package/box.mjs +17 -16
  17. package/catalog.cjs +1 -1
  18. package/catalog.mjs +8 -0
  19. package/client.cjs +1 -1
  20. package/client.mjs +144 -113
  21. package/components/accordion.cjs +1 -1
  22. package/components/accordion.mjs +19 -10
  23. package/components/agent.cjs +1 -1
  24. package/components/agent.mjs +21 -8
  25. package/components/calendar.cjs +1 -1
  26. package/components/calendar.d.ts +3 -1
  27. package/components/calendar.mjs +154 -142
  28. package/components/combobox.cjs +1 -1
  29. package/components/combobox.mjs +184 -174
  30. package/components/dashboard.cjs +1 -1
  31. package/components/dashboard.mjs +183 -170
  32. package/components/dataGrid/models/columnModel.d.ts +1 -0
  33. package/components/dataGrid/models/gridModel.d.ts +18 -0
  34. package/components/dataGrid/models/headerCellModel.d.ts +1 -0
  35. package/components/dataGrid/models/rangeModel.d.ts +3 -0
  36. package/components/dataGrid.cjs +3 -3
  37. package/components/dataGrid.mjs +1015 -923
  38. package/components/dateField.cjs +1 -1
  39. package/components/dateField.mjs +165 -159
  40. package/components/datePicker.cjs +1 -1
  41. package/components/datePicker.mjs +198 -183
  42. package/components/dialog.cjs +1 -1
  43. package/components/dialog.mjs +38 -33
  44. package/components/dropdown.cjs +1 -1
  45. package/components/dropdown.mjs +107 -93
  46. package/components/form.cjs +1 -1
  47. package/components/form.mjs +22 -18
  48. package/components/menu.cjs +1 -1
  49. package/components/menu.d.ts +2 -0
  50. package/components/menu.mjs +196 -175
  51. package/components/overlay.cjs +1 -1
  52. package/components/overlay.mjs +7 -7
  53. package/components/popover.cjs +1 -1
  54. package/components/popover.mjs +4 -0
  55. package/components/radioGroup.cjs +1 -1
  56. package/components/radioGroup.mjs +10 -5
  57. package/components/semantics.d.ts +29 -29
  58. package/components/slider.cjs +1 -1
  59. package/components/slider.mjs +84 -83
  60. package/components/sortableList.cjs +1 -1
  61. package/components/sortableList.mjs +158 -150
  62. package/components/swipeItem.cjs +1 -1
  63. package/components/swipeItem.mjs +92 -84
  64. package/components/tabs.cjs +1 -1
  65. package/components/tabs.mjs +10 -5
  66. package/components/timeZoneSelect.cjs +1 -1
  67. package/components/timeZoneSelect.mjs +40 -35
  68. package/components/toaster.cjs +1 -1
  69. package/components/toaster.mjs +151 -113
  70. package/create/src/index.d.ts +1 -0
  71. package/create/src/options.d.ts +27 -0
  72. package/create/src/options.test.d.ts +1 -0
  73. package/create/src/packageManager.d.ts +5 -0
  74. package/create/src/project.d.ts +25 -0
  75. package/create/src/project.test.d.ts +1 -0
  76. package/create/templates/ts/designs/azure.d.ts +5 -0
  77. package/create/templates/ts/designs/ember.d.ts +5 -0
  78. package/create/templates/ts/designs/mono.d.ts +5 -0
  79. package/create/templates/ts/src/App.d.ts +2 -0
  80. package/create/templates/ts/src/design.d.ts +5 -0
  81. package/create/templates/ts/src/main.d.ts +0 -0
  82. package/dataGridDateParts.cjs +1 -1
  83. package/dataGridDateParts.mjs +56 -55
  84. package/dataGridList.cjs +1 -1
  85. package/dataGridList.mjs +437 -436
  86. package/docs/props.md +19 -19
  87. package/effects.cjs +1 -1
  88. package/effects.mjs +1 -1
  89. package/interactionListening.cjs +1 -0
  90. package/interactionListening.mjs +117 -0
  91. package/interactions.cjs +1 -0
  92. package/interactions.mjs +25 -0
  93. package/layer.cjs +1 -1
  94. package/layer.mjs +68 -66
  95. package/package.json +139 -70
  96. package/placement.cjs +1 -1
  97. package/placement.mjs +10 -10
  98. package/platform.cjs +1 -1
  99. package/platform.mjs +44 -25
  100. package/react/interactions/interactions.d.ts +30 -0
  101. package/react/popover/usePopoverLayer.d.ts +3 -0
  102. package/react/theme/theme.d.ts +9 -0
  103. package/react/theme/themeContext.d.ts +2 -0
  104. package/react/useStyles.d.ts +8 -1
  105. package/react-shared.cjs +1 -1
  106. package/react-shared.mjs +49 -48
  107. package/reporting.cjs +1 -0
  108. package/reporting.mjs +51 -0
  109. package/rsc.cjs +1 -1
  110. package/rsc.d.ts +3 -0
  111. package/rsc.mjs +1 -1
  112. package/scrolling.cjs +1 -1
  113. package/scrolling.mjs +1 -1
  114. package/supabase/functions/collect/index.d.ts +30 -0
  115. package/supabase/functions/collect/index.test.d.ts +1 -0
  116. package/utils/analytics/analytics.d.ts +72 -0
  117. package/utils/analytics/analyticsIdentity.d.ts +13 -0
  118. package/utils/interactions/componentAttribute.d.ts +6 -0
  119. package/utils/interactions/interactionChannel.d.ts +35 -0
  120. package/utils/interactions/interactionJson.d.ts +6 -0
  121. package/utils/interactions/interactionListening.d.ts +6 -0
  122. package/utils/interactions/interactionTypes.d.ts +224 -0
@@ -1 +1 @@
1
- "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../behavior.cjs"),t=require("../identity.cjs"),n=require("./flex.cjs"),r=require("./semantics.cjs"),i=require("./radioButton.cjs");let a=require("react"),o=require("react/jsx-runtime");var s=(0,a.createContext)(null);function c(e){return[...e?.querySelectorAll(`input[type="radio"]`)??[]].filter(e=>!e.disabled)}function l(e){return e===`ArrowDown`||e===`ArrowRight`?1:e===`ArrowUp`||e===`ArrowLeft`?-1:0}function u(i){let{label:u,name:d,value:f,defaultValue:p,onValueChange:m,onChange:h,orientation:g=`vertical`,children:_,props:v,...y}=i,b=t.t(`radiogroup`),x=(0,a.useRef)(null),S=(0,a.useRef)(`click`),C=e.a((e,t)=>{m?.(e,t),h?.(e,t)}),[w,T]=e.i({value:f,defaultValue:p,onChange:C}),E=e.a(e=>{let t=l(e.key);if(t===0||e.defaultPrevented)return;let n=c(x.current),r=n.indexOf(document.activeElement);if(r===-1)return;e.preventDefault();let i=n[(r+t+n.length)%n.length];i!==n[r]&&(S.current=`keyboard`,i.focus(),i.click(),S.current=`click`)}),D=`${b}-label`,O=u!=null,k=(0,a.useMemo)(()=>({name:d??b,value:w,select:(e,t)=>T(e,{reason:S.current,event:t})}),[b,d,w,T]);return(0,o.jsx)(s.Provider,{value:k,children:(0,o.jsxs)(n.default,{ref:x,component:`radioGroup`,variant:{horizontal:g===`horizontal`},...y,props:{role:`radiogroup`,"aria-labelledby":O?D:void 0,...v,onKeyDown:E},children:[O&&(0,o.jsx)(r.Span,{component:`radioGroup.label`,id:D,children:u}),_]})})}function d(t){let n=(0,a.useContext)(s),{value:r,...c}=t,l=e.a(e=>n?.select(r,e));return n?(0,o.jsx)(i.default,{name:n.name,value:r,checked:n.value===r,onChange:l,...c}):(0,o.jsx)(i.default,{value:r,...c})}d.displayName=`RadioGroup.Item`;var f=u;f.Item=d,f.displayName=`RadioGroup`,exports.default=f;
1
+ "use client";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});const e=require("../behavior.cjs"),t=require("../identity.cjs"),n=require("../reporting.cjs"),r=require("./flex.cjs"),i=require("./semantics.cjs"),a=require("./radioButton.cjs");let o=require("react"),s=require("react/jsx-runtime");var c=(0,o.createContext)(null);function l(e){return[...e?.querySelectorAll(`input[type="radio"]`)??[]].filter(e=>!e.disabled)}function u(e){return e===`ArrowDown`||e===`ArrowRight`?1:e===`ArrowUp`||e===`ArrowLeft`?-1:0}function d(a){let{label:d,name:f,value:p,defaultValue:m,onValueChange:h,onChange:g,orientation:_=`vertical`,children:v,props:y,...b}=a,x=t.t(`radiogroup`),S=(0,o.useRef)(null),C=(0,o.useRef)(`click`),w=e.a((e,t)=>{h?.(e,t),g?.(e,t)}),[T,E]=n.a({value:p,defaultValue:m,onChange:w,interaction:{component:`radioGroup`,type:`valueChange`}}),D=e.a(e=>{let t=u(e.key);if(t===0||e.defaultPrevented)return;let n=l(S.current),r=n.indexOf(document.activeElement);if(r===-1)return;e.preventDefault();let i=n[(r+t+n.length)%n.length];i!==n[r]&&(C.current=`keyboard`,i.focus(),i.click(),C.current=`click`)}),O=`${x}-label`,k=d!=null,A=(0,o.useMemo)(()=>({name:f??x,value:T,select:(e,t)=>E(e,{reason:C.current,event:t})}),[x,f,T,E]);return(0,s.jsx)(c.Provider,{value:A,children:(0,s.jsxs)(r.default,{ref:S,component:`radioGroup`,variant:{horizontal:_===`horizontal`},...b,props:{role:`radiogroup`,"aria-labelledby":k?O:void 0,...y,onKeyDown:D},children:[k&&(0,s.jsx)(i.Span,{component:`radioGroup.label`,id:O,children:d}),v]})})}function f(t){let n=(0,o.useContext)(c),{value:r,...i}=t,l=e.a(e=>n?.select(r,e));return n?(0,s.jsx)(a.default,{name:n.name,value:r,checked:n.value===r,onChange:l,...i}):(0,s.jsx)(a.default,{value:r,...i})}f.displayName=`RadioGroup.Item`;var p=d;p.Item=f,p.displayName=`RadioGroup`,exports.default=p;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
- import { a as e, i as t } from "../behavior.mjs";
3
- import { t as n } from "../identity.mjs";
2
+ import { a as e } from "../behavior.mjs";
3
+ import { t } from "../identity.mjs";
4
+ import { a as n } from "../reporting.mjs";
4
5
  import r from "./flex.mjs";
5
6
  import { Span as i } from "./semantics.mjs";
6
7
  import a from "./radioButton.mjs";
@@ -15,12 +16,16 @@ function m(e) {
15
16
  return e === "ArrowDown" || e === "ArrowRight" ? 1 : e === "ArrowUp" || e === "ArrowLeft" ? -1 : 0;
16
17
  }
17
18
  function h(a) {
18
- let { label: o, name: s, value: h, defaultValue: g, onValueChange: _, onChange: v, orientation: y = "vertical", children: b, props: x, ...S } = a, C = n("radiogroup"), w = l(null), T = l("click"), E = e((e, t) => {
19
+ let { label: o, name: s, value: h, defaultValue: g, onValueChange: _, onChange: v, orientation: y = "vertical", children: b, props: x, ...S } = a, C = t("radiogroup"), w = l(null), T = l("click"), E = e((e, t) => {
19
20
  _?.(e, t), v?.(e, t);
20
- }), [D, O] = t({
21
+ }), [D, O] = n({
21
22
  value: h,
22
23
  defaultValue: g,
23
- onChange: E
24
+ onChange: E,
25
+ interaction: {
26
+ component: "radioGroup",
27
+ type: "valueChange"
28
+ }
24
29
  }), k = e((e) => {
25
30
  let t = m(e.key);
26
31
  if (t === 0 || e.defaultPrevented) return;