@noxickon/onyx 4.1.6 → 5.0.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 (140) hide show
  1. package/AI-README.md +467 -103
  2. package/dist/_internal/styles/checkbox.variants.d.ts +5 -0
  3. package/dist/_internal/styles/index.d.ts +3 -0
  4. package/dist/_internal/styles/radio.variants.d.ts +5 -0
  5. package/dist/_internal/styles/switch.variants.d.ts +9 -0
  6. package/dist/_internal/types.d.ts +1 -0
  7. package/dist/chunks/hooks-B58X4Fdh.js +46 -0
  8. package/dist/chunks/hooks-iUUmqFrq.js +7056 -0
  9. package/dist/chunks/ui-Bz7A98Kq.js +13 -0
  10. package/dist/chunks/ui-CezxuKW0.js +22994 -0
  11. package/dist/contexts/contexts.cjs.js +2 -2
  12. package/dist/contexts/contexts.es.js +55 -55
  13. package/dist/forms/Checkbox/Checkbox.stories.d.ts +10 -3
  14. package/dist/forms/Checkbox/index.d.ts +3 -3
  15. package/dist/forms/Checkbox/src/Checkbox.d.ts +1 -1
  16. package/dist/forms/Checkbox/src/Checkbox.types.d.ts +11 -4
  17. package/dist/forms/Checkbox/src/CheckboxGroup.d.ts +1 -1
  18. package/dist/forms/Checkbox/src/CheckboxGroupItem.d.ts +1 -1
  19. package/dist/forms/Checkbox/src/context/CheckboxGroupContext.types.d.ts +5 -2
  20. package/dist/forms/Input/Date/src/useDateInput.d.ts +2 -2
  21. package/dist/forms/Input/Number/src/Number.types.d.ts +4 -4
  22. package/dist/forms/Input/Number/src/context/NumberContext.types.d.ts +2 -2
  23. package/dist/forms/Input/Time/src/useTimeInput.d.ts +2 -2
  24. package/dist/forms/Radio/Radio.stories.d.ts +14 -3
  25. package/dist/forms/Radio/index.d.ts +2 -2
  26. package/dist/forms/Radio/src/Radio.types.d.ts +9 -7
  27. package/dist/forms/Radio/src/RadioGroup.d.ts +1 -1
  28. package/dist/forms/Radio/src/RadioGroupItem.d.ts +1 -1
  29. package/dist/forms/Radio/src/context/RadioGroupContext.types.d.ts +5 -2
  30. package/dist/forms/Select/Select.stories.d.ts +53 -4
  31. package/dist/forms/Select/index.d.ts +1 -1
  32. package/dist/forms/Select/src/Select.d.ts +1 -1
  33. package/dist/forms/Select/src/Select.types.d.ts +17 -5
  34. package/dist/forms/Switch/Switch.stories.d.ts +1 -0
  35. package/dist/forms/Switch/src/Switch.d.ts +1 -1
  36. package/dist/forms/Switch/src/Switch.types.d.ts +2 -0
  37. package/dist/hooks/hooks.cjs.js +1 -1
  38. package/dist/hooks/hooks.es.js +11 -10
  39. package/dist/hooks/index.d.ts +1 -0
  40. package/dist/hooks/useControllableState/src/useControllableState.types.d.ts +3 -6
  41. package/dist/hooks/useSort/UseSort.stories.d.ts +6 -0
  42. package/dist/hooks/useSort/index.d.ts +2 -0
  43. package/dist/hooks/useSort/src/useSort.d.ts +3 -0
  44. package/dist/hooks/useSort/src/useSort.types.d.ts +20 -0
  45. package/dist/hooks/useSort/test/useSort.test.d.ts +1 -0
  46. package/dist/layouts/layouts.cjs.js +1 -1
  47. package/dist/layouts/layouts.es.js +31 -32
  48. package/dist/legacy/index.d.ts +1 -0
  49. package/dist/legacy/legacy.cjs.js +1 -1
  50. package/dist/legacy/legacy.es.js +766 -604
  51. package/dist/legacy/ui/Floating/Floating.stories.d.ts +1 -1
  52. package/dist/legacy/ui/Floating/index.d.ts +1 -1
  53. package/dist/legacy/ui/Floating/src/Floating.types.d.ts +1 -1
  54. package/dist/legacy/ui/Floating/src/FloatingTrigger.d.ts +1 -1
  55. package/dist/legacy/ui/Toast/Toast.stories.d.ts +9 -0
  56. package/dist/legacy/ui/Toast/index.d.ts +5 -0
  57. package/dist/legacy/ui/Toast/src/Toast.d.ts +2 -0
  58. package/dist/legacy/ui/Toast/src/Toast.types.d.ts +29 -0
  59. package/dist/legacy/ui/Toast/src/ToastItem.d.ts +2 -0
  60. package/dist/legacy/ui/Toast/src/context/ToastContext.d.ts +2 -0
  61. package/dist/legacy/ui/Toast/src/context/ToastContext.types.d.ts +28 -0
  62. package/dist/legacy/ui/Toast/src/context/ToastProvider.d.ts +2 -0
  63. package/dist/legacy/ui/Toast/src/context/useToast.d.ts +2 -0
  64. package/dist/legacy/ui/Toast/test/Toast.test.d.ts +1 -0
  65. package/dist/onyx.cjs.js +1 -1
  66. package/dist/onyx.es.js +19 -18
  67. package/dist/pages/pages.cjs.js +1 -1
  68. package/dist/pages/pages.es.js +37 -37
  69. package/dist/routes/routes.cjs.js +1 -1
  70. package/dist/routes/routes.es.js +3 -3
  71. package/dist/styles.css +1 -0
  72. package/dist/ui/Breadcrumb/Breadcrumb.stories.d.ts +1 -1
  73. package/dist/ui/Breadcrumb/index.d.ts +1 -1
  74. package/dist/ui/Breadcrumb/src/Breadcrumb.types.d.ts +1 -1
  75. package/dist/ui/Breadcrumb/src/BreadcrumbLink.d.ts +1 -1
  76. package/dist/ui/Button/Button.stories.d.ts +2 -2
  77. package/dist/ui/Button/src/Button.d.ts +1 -1
  78. package/dist/ui/Button/src/Button.types.d.ts +1 -1
  79. package/dist/ui/Dropdown/Dropdown.stories.d.ts +23 -3
  80. package/dist/ui/Dropdown/index.d.ts +8 -2
  81. package/dist/ui/Dropdown/src/Dropdown.types.d.ts +31 -4
  82. package/dist/ui/Dropdown/src/DropdownCheckboxItem.d.ts +2 -0
  83. package/dist/ui/Dropdown/src/DropdownGroup.d.ts +2 -0
  84. package/dist/ui/Dropdown/src/DropdownRadioGroup.d.ts +2 -0
  85. package/dist/ui/Dropdown/src/DropdownRadioItem.d.ts +2 -0
  86. package/dist/ui/Dropdown/src/DropdownSubMenu.d.ts +2 -0
  87. package/dist/ui/Dropdown/src/DropdownSubMenuContent.d.ts +2 -0
  88. package/dist/ui/Dropdown/src/DropdownSubMenuTrigger.d.ts +2 -0
  89. package/dist/ui/Dropdown/src/DropdownTrigger.d.ts +1 -1
  90. package/dist/ui/Dropdown/src/context/DropdownContext.types.d.ts +2 -0
  91. package/dist/ui/Dropdown/src/context/DropdownRadioContext.d.ts +2 -0
  92. package/dist/ui/Dropdown/src/context/DropdownRadioContext.types.d.ts +5 -0
  93. package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.d.ts +2 -0
  94. package/dist/ui/Dropdown/src/context/DropdownSubMenuContext.types.d.ts +14 -0
  95. package/dist/ui/Dropdown/src/context/useDropdownRadioContext.d.ts +1 -0
  96. package/dist/ui/Dropdown/src/context/useDropdownSubMenuContext.d.ts +1 -0
  97. package/dist/ui/HoverCard/HoverCard.stories.d.ts +1 -1
  98. package/dist/ui/HoverCard/index.d.ts +1 -1
  99. package/dist/ui/HoverCard/src/HoverCard.types.d.ts +1 -1
  100. package/dist/ui/HoverCard/src/HoverCardTrigger.d.ts +1 -1
  101. package/dist/ui/Link/Link.stories.d.ts +1 -1
  102. package/dist/ui/Link/src/Link.d.ts +1 -1
  103. package/dist/ui/Link/src/Link.types.d.ts +1 -1
  104. package/dist/ui/Pagination/Pagination.stories.d.ts +3 -3
  105. package/dist/ui/Pagination/index.d.ts +3 -3
  106. package/dist/ui/Pagination/src/Pagination.types.d.ts +3 -3
  107. package/dist/ui/Pagination/src/PaginationLink.d.ts +1 -1
  108. package/dist/ui/Pagination/src/PaginationNext.d.ts +1 -1
  109. package/dist/ui/Pagination/src/PaginationPrevious.d.ts +1 -1
  110. package/dist/ui/Popover/Popover.stories.d.ts +1 -1
  111. package/dist/ui/Popover/index.d.ts +1 -1
  112. package/dist/ui/Popover/src/Popover.types.d.ts +1 -1
  113. package/dist/ui/Popover/src/PopoverTrigger.d.ts +1 -1
  114. package/dist/ui/Popper/index.d.ts +1 -1
  115. package/dist/ui/Popper/src/Popper.types.d.ts +1 -1
  116. package/dist/ui/Popper/src/PopperAnchor.d.ts +1 -1
  117. package/dist/ui/Table/Table.stories.d.ts +7 -4
  118. package/dist/ui/Table/index.d.ts +3 -3
  119. package/dist/ui/Table/src/Table.d.ts +1 -1
  120. package/dist/ui/Table/src/Table.types.d.ts +8 -0
  121. package/dist/ui/Table/src/TableHead.d.ts +1 -1
  122. package/dist/ui/Table/src/TableRow.d.ts +1 -1
  123. package/dist/ui/Table/src/context/TableContext.types.d.ts +6 -0
  124. package/dist/ui/Toast/Toast.stories.d.ts +4 -2
  125. package/dist/ui/Toast/index.d.ts +1 -1
  126. package/dist/ui/Toast/src/Toast.d.ts +2 -2
  127. package/dist/ui/Toast/src/Toast.types.d.ts +23 -23
  128. package/dist/ui/Toast/src/context/ToastContext.types.d.ts +15 -23
  129. package/dist/ui/Toast/src/context/ToastProvider.d.ts +2 -2
  130. package/dist/ui/Toast/src/context/useToast.d.ts +2 -1
  131. package/dist/ui.css +1 -1
  132. package/dist/utils/utils.cjs.js +1 -1
  133. package/dist/utils/utils.es.js +6 -6
  134. package/package.json +17 -16
  135. package/dist/chunks/hooks-BMXCuU2h.js +0 -7318
  136. package/dist/chunks/hooks-H39lCrRt.js +0 -31
  137. package/dist/chunks/ui-BBpe54MX.js +0 -9
  138. package/dist/chunks/ui-DaY9hD0b.js +0 -20924
  139. package/dist/ui/Dropdown/src/DropdownLabel.d.ts +0 -2
  140. package/dist/ui/Toast/src/ToastItem.d.ts +0 -2
@@ -1,5 +1,5 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../chunks/ui-BBpe54MX.js"),y=require("react/jsx-runtime"),s=require("react"),j=require("@apollo/client"),w=require("../chunks/hooks-H39lCrRt.js");function T(r={}){const{checks:e={}}=r,d=s.createContext(void 0);function l({children:a,fetcher:o,pollInterval:f=300*1e3}){const[n,i]=s.useState(null),[u,_]=s.useState(!0),[v,p]=s.useState(null),O=s.useRef(null),D=s.useRef(!0),E=s.useRef(o);E.current=o;const m=s.useCallback(async()=>{try{const t=await E.current();D.current&&(i(t),p(null))}catch(t){D.current&&(p(t instanceof Error?t:new Error("Unknown error")),i(null))}finally{D.current&&_(!1)}},[]);s.useEffect(()=>(D.current=!0,m(),f>0&&(O.current=setInterval(m,f)),()=>{D.current=!1,O.current&&clearInterval(O.current)}),[m,f]);const h=s.useMemo(()=>{const t={};for(const[g,b]of Object.entries(e))t[g]=b(n);return t},[n]),F=!!n,c=s.useMemo(()=>({checks:h,error:v,isLoggedIn:F,loading:u,refreshUser:m,user:n}),[h,v,F,u,m,n]);return y.jsx(d.Provider,{value:c,children:a})}function x(){const a=s.useContext(d);if(!a)throw new Error("useOxAuth must be used within an OxAuthProvider");return a}return{OxAuthProvider:l,useOxAuth:x}}const k=j.gql`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../chunks/ui-Bz7A98Kq.js"),S=require("@apollo/client"),y=require("react/jsx-runtime"),s=require("react"),j=require("../chunks/hooks-B58X4Fdh.js");function T(r={}){const{checks:e={}}=r,d=s.createContext(void 0);function l({children:a,fetcher:o,pollInterval:f=300*1e3}){const[n,i]=s.useState(null),[u,w]=s.useState(!0),[p,D]=s.useState(null),O=s.useRef(null),E=s.useRef(!0),F=s.useRef(o);F.current=o;const m=s.useCallback(async()=>{try{const t=await F.current();E.current&&(i(t),D(null))}catch(t){E.current&&(D(t instanceof Error?t:new Error("Unknown error")),i(null))}finally{E.current&&w(!1)}},[]);s.useEffect(()=>(E.current=!0,m(),f>0&&(O.current=setInterval(m,f)),()=>{E.current=!1,O.current&&clearInterval(O.current)}),[m,f]);const h=s.useMemo(()=>{const t={};for(const[g,_]of Object.entries(e))t[g]=_(n);return t},[n]),b=!!n,c=s.useMemo(()=>({checks:h,error:p,isLoggedIn:b,loading:u,refreshUser:m,user:n}),[h,p,b,u,m,n]);return y.jsx(d.Provider,{value:c,children:a})}function x(){const a=s.useContext(d);if(!a)throw new Error("useOxAuth must be used within an OxAuthProvider");return a}return{OxAuthProvider:l,useOxAuth:x}}const A=S.gql`
2
2
  query getFeatures {
3
3
  features
4
4
  }
5
- `,C=s.createContext(void 0);function q({children:r,enableDevMode:e=!1,getFeaturesQuery:d=k,options:l={},pollInterval:x=300*1e3}){const{data:a,error:o,loading:f,refetch:n}=w.useQuery(d,{fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first",errorPolicy:"all",pollInterval:x,skip:e,...l}),i=a?.features||{},u=_=>e?!0:i[_]??!1;return y.jsx(C.Provider,{value:{features:i,isEnabled:u,loading:f,error:o??null,refreshFeatures:n,enableDevMode:e},children:r})}function R(){const r=s.useContext(C);if(!r)throw new Error("useOxFeature must be used within an OxFeatureProvider");return r}const U=r=>{const e=w.compilerRuntimeExports.c(8),{children:d,className:l,fallback:x,name:a}=r,o=x===void 0?null:x,{isEnabled:f}=R();if(!f(a)){let u;return e[0]!==l||e[1]!==o?(u=o?y.jsx("div",{className:A.cn("contents",l),children:o}):null,e[0]=l,e[1]=o,e[2]=u):u=e[2],u}let n;e[3]!==l?(n=A.cn("contents",l),e[3]=l,e[4]=n):n=e[4];let i;return e[5]!==d||e[6]!==n?(i=y.jsx("div",{className:n,children:d}),e[5]=d,e[6]=n,e[7]=i):i=e[7],i},S=s.createContext(null),L=r=>{const e=w.compilerRuntimeExports.c(17),{children:d,maxDialogs:l}=r,x=l===void 0?3:l;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[o,f]=s.useState(a);let n,i;e[1]!==o?(n=()=>{const c=o.some(M);return document.body.classList.toggle("overflow-hidden",c),I},i=[o],e[1]=o,e[2]=n,e[3]=i):(n=e[2],i=e[3]),s.useEffect(n,i);let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{let c=null;f(t=>{const g=t.filter(N),b=w.head(g);return b?(c=b.id,t.map(P=>P.id===b.id?{...P,isOpen:!1}:P)):t}),c&&setTimeout(()=>{f(t=>w.reject(t,g=>g.id===c))},200)},e[4]=u):u=e[4];const _=u;let v;e[5]!==x?(v=(c,t)=>{const g=w.uniqueId(),b={id:g,content:c,isOpen:!0,options:t};return f(P=>[b,...P].slice(0,x)),g},e[5]=x,e[6]=v):v=e[6];const p=v;let O;e[7]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{f($),setTimeout(()=>{f([])},200)},e[7]=O):O=e[7];const D=O;let E;e[8]!==p?(E=Object.assign((c,t)=>p(c,t),{open:p,dismiss:_,dismissAll:D}),e[8]=p,e[9]=E):E=e[9];const m=E;let h;if(e[10]!==o){let c;e[12]===Symbol.for("react.memo_cache_sentinel")?(c=t=>y.jsx(A.OxDialog,{isOpen:t.isOpen,onClose:_,...t.options,children:t.content},t.id),e[12]=c):c=e[12],h=o.map(c),e[10]=o,e[11]=h}else h=e[11];let F;return e[13]!==d||e[14]!==m||e[15]!==h?(F=y.jsxs(S.Provider,{value:m,children:[d,h]}),e[13]=d,e[14]=m,e[15]=h,e[16]=F):F=e[16],F};function M(r){return r.isOpen}function I(){document.body.classList.remove("overflow-hidden")}function N(r){return r.isOpen}function G(r){return{...r,isOpen:!1}}function $(r){return r.map(G)}const Q=()=>{const r=s.useContext(S);if(!r)throw new Error("useOxDialog must be used within a DialogProvider");return r};exports.DEFAULT_GET_FEATURES=k;exports.OxDialogProvider=L;exports.OxFeatureFlag=U;exports.OxFeatureProvider=q;exports.createOxAuth=T;exports.useOxDialog=Q;exports.useOxFeature=R;
5
+ `,k=s.createContext(void 0);function q({children:r,enableDevMode:e=!1,getFeaturesQuery:d=A,options:l={},pollInterval:x=300*1e3}){const{data:a,error:o,loading:f,refetch:n}=j.useQuery(d,{fetchPolicy:"cache-and-network",nextFetchPolicy:"cache-first",errorPolicy:"all",pollInterval:x,skip:e,...l}),i=a?.features||{},u=w=>e?!0:i[w]??!1;return y.jsx(k.Provider,{value:{features:i,isEnabled:u,loading:f,error:o??null,refreshFeatures:n,enableDevMode:e},children:r})}function C(){const r=s.useContext(k);if(!r)throw new Error("useOxFeature must be used within an OxFeatureProvider");return r}const U=r=>{const e=v.compilerRuntimeExports.c(8),{children:d,className:l,fallback:x,name:a}=r,o=x===void 0?null:x,{isEnabled:f}=C();if(!f(a)){let u;return e[0]!==l||e[1]!==o?(u=o?y.jsx("div",{className:v.cn("contents",l),children:o}):null,e[0]=l,e[1]=o,e[2]=u):u=e[2],u}let n;e[3]!==l?(n=v.cn("contents",l),e[3]=l,e[4]=n):n=e[4];let i;return e[5]!==d||e[6]!==n?(i=y.jsx("div",{className:n,children:d}),e[5]=d,e[6]=n,e[7]=i):i=e[7],i},R=s.createContext(null),L=r=>{const e=v.compilerRuntimeExports.c(17),{children:d,maxDialogs:l}=r,x=l===void 0?3:l;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=[],e[0]=a):a=e[0];const[o,f]=s.useState(a);let n,i;e[1]!==o?(n=()=>{const c=o.some(M);return document.body.classList.toggle("overflow-hidden",c),I},i=[o],e[1]=o,e[2]=n,e[3]=i):(n=e[2],i=e[3]),s.useEffect(n,i);let u;e[4]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{let c=null;f(t=>{const g=t.filter(N),_=v.head(g);return _?(c=_.id,t.map(P=>P.id===_.id?{...P,isOpen:!1}:P)):t}),c&&setTimeout(()=>{f(t=>v.reject(t,g=>g.id===c))},200)},e[4]=u):u=e[4];const w=u;let p;e[5]!==x?(p=(c,t)=>{const g=v.uniqueId(),_={id:g,content:c,isOpen:!0,options:t};return f(P=>[_,...P].slice(0,x)),g},e[5]=x,e[6]=p):p=e[6];const D=p;let O;e[7]===Symbol.for("react.memo_cache_sentinel")?(O=()=>{f($),setTimeout(()=>{f([])},200)},e[7]=O):O=e[7];const E=O;let F;e[8]!==D?(F=Object.assign((c,t)=>D(c,t),{open:D,dismiss:w,dismissAll:E}),e[8]=D,e[9]=F):F=e[9];const m=F;let h;if(e[10]!==o){let c;e[12]===Symbol.for("react.memo_cache_sentinel")?(c=t=>y.jsx(v.OxDialog,{isOpen:t.isOpen,onClose:w,...t.options,children:t.content},t.id),e[12]=c):c=e[12],h=o.map(c),e[10]=o,e[11]=h}else h=e[11];let b;return e[13]!==d||e[14]!==m||e[15]!==h?(b=y.jsxs(R.Provider,{value:m,children:[d,h]}),e[13]=d,e[14]=m,e[15]=h,e[16]=b):b=e[16],b};function M(r){return r.isOpen}function I(){document.body.classList.remove("overflow-hidden")}function N(r){return r.isOpen}function G(r){return{...r,isOpen:!1}}function $(r){return r.map(G)}const Q=()=>{const r=s.useContext(R);if(!r)throw new Error("useOxDialog must be used within a DialogProvider");return r};exports.DEFAULT_GET_FEATURES=A;exports.OxDialogProvider=L;exports.OxFeatureFlag=U;exports.OxFeatureProvider=q;exports.createOxAuth=T;exports.useOxDialog=Q;exports.useOxFeature=C;
@@ -1,30 +1,30 @@
1
- import { ag as C, y as T } from "../chunks/ui-DaY9hD0b.js";
2
- import { jsx as E, jsxs as q } from "react/jsx-runtime";
3
- import { createContext as k, useContext as A, useState as F, useRef as P, useCallback as I, useEffect as S, useMemo as R } from "react";
4
- import { gql as N } from "@apollo/client";
5
- import { C as M, d as U, D as $, x as z, z as G } from "../chunks/hooks-BMXCuU2h.js";
1
+ import { c as S, av as C, aw as T, ax as q, B as I, ay as N } from "../chunks/ui-CezxuKW0.js";
2
+ import { gql as M } from "@apollo/client";
3
+ import { jsx as E, jsxs as $ } from "react/jsx-runtime";
4
+ import { createContext as P, useContext as A, useState as F, useRef as k, useCallback as B, useEffect as U, useMemo as R } from "react";
5
+ import { k as G } from "../chunks/hooks-iUUmqFrq.js";
6
6
  function ne(r = {}) {
7
7
  const {
8
8
  checks: e = {}
9
- } = r, f = k(void 0);
9
+ } = r, f = P(void 0);
10
10
  function l({
11
11
  children: u,
12
12
  fetcher: s,
13
13
  pollInterval: a = 300 * 1e3
14
14
  }) {
15
- const [n, i] = F(null), [c, y] = F(!0), [O, p] = F(null), x = P(null), v = P(!0), D = P(s);
16
- D.current = s;
17
- const m = I(async () => {
15
+ const [n, c] = F(null), [i, y] = F(!0), [O, p] = F(null), x = k(null), v = k(!0), w = k(s);
16
+ w.current = s;
17
+ const m = B(async () => {
18
18
  try {
19
- const t = await D.current();
20
- v.current && (i(t), p(null));
19
+ const t = await w.current();
20
+ v.current && (c(t), p(null));
21
21
  } catch (t) {
22
- v.current && (p(t instanceof Error ? t : new Error("Unknown error")), i(null));
22
+ v.current && (p(t instanceof Error ? t : new Error("Unknown error")), c(null));
23
23
  } finally {
24
24
  v.current && y(!1);
25
25
  }
26
26
  }, []);
27
- S(() => (v.current = !0, m(), a > 0 && (x.current = setInterval(m, a)), () => {
27
+ U(() => (v.current = !0, m(), a > 0 && (x.current = setInterval(m, a)), () => {
28
28
  v.current = !1, x.current && clearInterval(x.current);
29
29
  }), [m, a]);
30
30
  const h = R(() => {
@@ -32,14 +32,14 @@ function ne(r = {}) {
32
32
  for (const [g, b] of Object.entries(e))
33
33
  t[g] = b(n);
34
34
  return t;
35
- }, [n]), w = !!n, o = R(() => ({
35
+ }, [n]), D = !!n, o = R(() => ({
36
36
  checks: h,
37
37
  error: O,
38
- isLoggedIn: w,
39
- loading: c,
38
+ isLoggedIn: D,
39
+ loading: i,
40
40
  refreshUser: m,
41
41
  user: n
42
- }), [h, O, w, c, m, n]);
42
+ }), [h, O, D, i, m, n]);
43
43
  return /* @__PURE__ */ E(f.Provider, { value: o, children: u });
44
44
  }
45
45
  function d() {
@@ -53,11 +53,11 @@ function ne(r = {}) {
53
53
  useOxAuth: d
54
54
  };
55
55
  }
56
- const Q = N`
56
+ const Q = M`
57
57
  query getFeatures {
58
58
  features
59
59
  }
60
- `, j = k(void 0);
60
+ `, j = P(void 0);
61
61
  function se({
62
62
  children: r,
63
63
  enableDevMode: e = !1,
@@ -70,76 +70,76 @@ function se({
70
70
  error: s,
71
71
  loading: a,
72
72
  refetch: n
73
- } = M(f, {
73
+ } = G(f, {
74
74
  fetchPolicy: "cache-and-network",
75
75
  nextFetchPolicy: "cache-first",
76
76
  errorPolicy: "all",
77
77
  pollInterval: d,
78
78
  skip: e,
79
79
  ...l
80
- }), i = u?.features || {}, c = (y) => e ? !0 : i[y] ?? !1;
80
+ }), c = u?.features || {}, i = (y) => e ? !0 : c[y] ?? !1;
81
81
  return /* @__PURE__ */ E(j.Provider, { value: {
82
- features: i,
83
- isEnabled: c,
82
+ features: c,
83
+ isEnabled: i,
84
84
  loading: a,
85
85
  error: s ?? null,
86
86
  refreshFeatures: n,
87
87
  enableDevMode: e
88
88
  }, children: r });
89
89
  }
90
- function B() {
90
+ function z() {
91
91
  const r = A(j);
92
92
  if (!r)
93
93
  throw new Error("useOxFeature must be used within an OxFeatureProvider");
94
94
  return r;
95
95
  }
96
96
  const oe = (r) => {
97
- const e = U.c(8), {
97
+ const e = S.c(8), {
98
98
  children: f,
99
99
  className: l,
100
100
  fallback: d,
101
101
  name: u
102
102
  } = r, s = d === void 0 ? null : d, {
103
103
  isEnabled: a
104
- } = B();
104
+ } = z();
105
105
  if (!a(u)) {
106
- let c;
107
- return e[0] !== l || e[1] !== s ? (c = s ? /* @__PURE__ */ E("div", { className: C("contents", l), children: s }) : null, e[0] = l, e[1] = s, e[2] = c) : c = e[2], c;
106
+ let i;
107
+ return e[0] !== l || e[1] !== s ? (i = s ? /* @__PURE__ */ E("div", { className: C("contents", l), children: s }) : null, e[0] = l, e[1] = s, e[2] = i) : i = e[2], i;
108
108
  }
109
109
  let n;
110
110
  e[3] !== l ? (n = C("contents", l), e[3] = l, e[4] = n) : n = e[4];
111
- let i;
112
- return e[5] !== f || e[6] !== n ? (i = /* @__PURE__ */ E("div", { className: n, children: f }), e[5] = f, e[6] = n, e[7] = i) : i = e[7], i;
113
- }, L = k(null), ie = (r) => {
114
- const e = U.c(17), {
111
+ let c;
112
+ return e[5] !== f || e[6] !== n ? (c = /* @__PURE__ */ E("div", { className: n, children: f }), e[5] = f, e[6] = n, e[7] = c) : c = e[7], c;
113
+ }, L = P(null), ce = (r) => {
114
+ const e = S.c(17), {
115
115
  children: f,
116
116
  maxDialogs: l
117
117
  } = r, d = l === void 0 ? 3 : l;
118
118
  let u;
119
- e[0] === Symbol.for("react.memo_cache_sentinel") ? (u = [], e[0] = u) : u = e[0];
119
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (u = [], e[0] = u) : u = e[0];
120
120
  const [s, a] = F(u);
121
- let n, i;
121
+ let n, c;
122
122
  e[1] !== s ? (n = () => {
123
123
  const o = s.some(H);
124
124
  return document.body.classList.toggle("overflow-hidden", o), J;
125
- }, i = [s], e[1] = s, e[2] = n, e[3] = i) : (n = e[2], i = e[3]), S(n, i);
126
- let c;
127
- e[4] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
125
+ }, c = [s], e[1] = s, e[2] = n, e[3] = c) : (n = e[2], c = e[3]), U(n, c);
126
+ let i;
127
+ e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = () => {
128
128
  let o = null;
129
129
  a((t) => {
130
- const g = t.filter(K), b = $(g);
130
+ const g = t.filter(K), b = T(g);
131
131
  return b ? (o = b.id, t.map((_) => _.id === b.id ? {
132
132
  ..._,
133
133
  isOpen: !1
134
134
  } : _)) : t;
135
135
  }), o && setTimeout(() => {
136
- a((t) => z(t, (g) => g.id === o));
136
+ a((t) => q(t, (g) => g.id === o));
137
137
  }, 200);
138
- }, e[4] = c) : c = e[4];
139
- const y = c;
138
+ }, e[4] = i) : i = e[4];
139
+ const y = i;
140
140
  let O;
141
141
  e[5] !== d ? (O = (o, t) => {
142
- const g = G(), b = {
142
+ const g = N(), b = {
143
143
  id: g,
144
144
  content: o,
145
145
  isOpen: !0,
@@ -149,30 +149,30 @@ const oe = (r) => {
149
149
  }, e[5] = d, e[6] = O) : O = e[6];
150
150
  const p = O;
151
151
  let x;
152
- e[7] === Symbol.for("react.memo_cache_sentinel") ? (x = () => {
152
+ e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = () => {
153
153
  a(W), setTimeout(() => {
154
154
  a([]);
155
155
  }, 200);
156
156
  }, e[7] = x) : x = e[7];
157
157
  const v = x;
158
- let D;
159
- e[8] !== p ? (D = Object.assign((o, t) => p(o, t), {
158
+ let w;
159
+ e[8] !== p ? (w = Object.assign((o, t) => p(o, t), {
160
160
  open: p,
161
161
  dismiss: y,
162
162
  dismissAll: v
163
- }), e[8] = p, e[9] = D) : D = e[9];
164
- const m = D;
163
+ }), e[8] = p, e[9] = w) : w = e[9];
164
+ const m = w;
165
165
  let h;
166
166
  if (e[10] !== s) {
167
167
  let o;
168
- e[12] === Symbol.for("react.memo_cache_sentinel") ? (o = (t) => /* @__PURE__ */ E(T, { isOpen: t.isOpen, onClose: y, ...t.options, children: t.content }, t.id), e[12] = o) : o = e[12], h = s.map(o), e[10] = s, e[11] = h;
168
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = (t) => /* @__PURE__ */ E(I, { isOpen: t.isOpen, onClose: y, ...t.options, children: t.content }, t.id), e[12] = o) : o = e[12], h = s.map(o), e[10] = s, e[11] = h;
169
169
  } else
170
170
  h = e[11];
171
- let w;
172
- return e[13] !== f || e[14] !== m || e[15] !== h ? (w = /* @__PURE__ */ q(L.Provider, { value: m, children: [
171
+ let D;
172
+ return e[13] !== f || e[14] !== m || e[15] !== h ? (D = /* @__PURE__ */ $(L.Provider, { value: m, children: [
173
173
  f,
174
174
  h
175
- ] }), e[13] = f, e[14] = m, e[15] = h, e[16] = w) : w = e[16], w;
175
+ ] }), e[13] = f, e[14] = m, e[15] = h, e[16] = D) : D = e[16], D;
176
176
  };
177
177
  function H(r) {
178
178
  return r.isOpen;
@@ -192,7 +192,7 @@ function V(r) {
192
192
  function W(r) {
193
193
  return r.map(V);
194
194
  }
195
- const ce = () => {
195
+ const ie = () => {
196
196
  const r = A(L);
197
197
  if (!r)
198
198
  throw new Error("useOxDialog must be used within a DialogProvider");
@@ -200,10 +200,10 @@ const ce = () => {
200
200
  };
201
201
  export {
202
202
  Q as DEFAULT_GET_FEATURES,
203
- ie as OxDialogProvider,
203
+ ce as OxDialogProvider,
204
204
  oe as OxFeatureFlag,
205
205
  se as OxFeatureProvider,
206
206
  ne as createOxAuth,
207
- ce as useOxDialog,
208
- B as useOxFeature
207
+ ie as useOxDialog,
208
+ z as useOxFeature
209
209
  };
@@ -2,9 +2,9 @@ import { ComponentType } from 'react';
2
2
  import { StoryObj } from '@storybook/react-vite';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: (({ checked, className, defaultChecked, disabled, error, id: propertyId, name, onChange, onCheckedChange, required, value, ...domProps }: import('..').OxCheckboxProps) => import("react/jsx-runtime").JSX.Element) & {
6
- Group: ({ children, className, disabled, name, onChange, value, ...domProps }: import('..').OxCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
7
- GroupItem: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, required, value, ...domProps }: import('..').OxCheckboxGroupItemProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: (({ checked, className, defaultChecked, disabled, error, id: propertyId, name, onChange, onCheckedChange, required, size, value, ...domProps }: import('..').OxCheckboxProps) => import("react/jsx-runtime").JSX.Element) & {
6
+ Group: ({ children, className, defaultValue, disabled, error, name, onValueChange, orientation, size, value, ...domProps }: import('..').OxCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
7
+ GroupItem: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, required, size, value, ...domProps }: import('..').OxCheckboxGroupItemProps) => import("react/jsx-runtime").JSX.Element;
8
8
  };
9
9
  subcomponents: {
10
10
  'OxCheckbox.Group': ComponentType<unknown>;
@@ -43,6 +43,11 @@ declare const meta: {
43
43
  control: "boolean";
44
44
  description: string;
45
45
  };
46
+ size: {
47
+ control: "select";
48
+ options: string[];
49
+ description: string;
50
+ };
46
51
  value: {
47
52
  control: "text";
48
53
  description: string;
@@ -75,6 +80,8 @@ declare const meta: {
75
80
  export default meta;
76
81
  type Story = StoryObj<typeof meta>;
77
82
  export declare const Playground: Story;
83
+ export declare const Sizes: Story;
78
84
  export declare const States: Story;
79
85
  export declare const Controlled: Story;
80
86
  export declare const Group: Story;
87
+ export declare const Orientation: Story;
@@ -1,5 +1,5 @@
1
1
  export type * from './src/Checkbox.types';
2
- export declare const OxCheckbox: (({ checked, className, defaultChecked, disabled, error, id: propertyId, name, onChange, onCheckedChange, required, value, ...domProps }: import('.').OxCheckboxProps) => import("react/jsx-runtime").JSX.Element) & {
3
- Group: ({ children, className, disabled, name, onChange, value, ...domProps }: import('.').OxCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
4
- GroupItem: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, required, value, ...domProps }: import('.').OxCheckboxGroupItemProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OxCheckbox: (({ checked, className, defaultChecked, disabled, error, id: propertyId, name, onChange, onCheckedChange, required, size, value, ...domProps }: import('.').OxCheckboxProps) => import("react/jsx-runtime").JSX.Element) & {
3
+ Group: ({ children, className, defaultValue, disabled, error, name, onValueChange, orientation, size, value, ...domProps }: import('.').OxCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
4
+ GroupItem: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, required, size, value, ...domProps }: import('.').OxCheckboxGroupItemProps) => import("react/jsx-runtime").JSX.Element;
5
5
  };
@@ -1,2 +1,2 @@
1
1
  import { OxCheckboxProps } from './Checkbox.types';
2
- export declare const OxCheckbox: ({ checked, className, defaultChecked, disabled, error, id: propertyId, name, onChange, onCheckedChange, required, value, ...domProps }: OxCheckboxProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OxCheckbox: ({ checked, className, defaultChecked, disabled, error, id: propertyId, name, onChange, onCheckedChange, required, size, value, ...domProps }: OxCheckboxProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,27 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
+ import { OxComponentSize } from '../../../_internal/types';
2
3
  export type OxCheckedState = boolean | 'indeterminate';
3
4
  export interface OxCheckboxProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'value' | 'children' | 'checked' | 'size' | 'defaultChecked'> {
4
5
  checked?: OxCheckedState;
5
6
  defaultChecked?: OxCheckedState;
6
7
  error?: boolean;
7
8
  onCheckedChange?: (checked: OxCheckedState) => void;
9
+ size?: OxComponentSize;
8
10
  value?: string;
9
11
  }
10
- export interface OxCheckboxGroupProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
12
+ export interface OxCheckboxGroupProps extends Omit<ComponentPropsWithoutRef<'div'>, 'defaultValue' | 'onChange'> {
11
13
  children: ReactNode;
14
+ defaultValue?: string[];
12
15
  disabled?: boolean;
16
+ error?: boolean;
13
17
  name: string;
14
- onChange?: (value: (string | number)[]) => void;
15
- value?: (string | number)[];
18
+ onValueChange?: (value: string[]) => void;
19
+ orientation?: 'horizontal' | 'vertical';
20
+ size?: OxComponentSize;
21
+ value?: string[];
16
22
  }
17
23
  export interface OxCheckboxGroupItemProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'size' | 'children' | 'checked' | 'defaultChecked' | 'value'> {
18
24
  error?: boolean;
19
- value: string | number;
25
+ size?: OxComponentSize;
26
+ value: string;
20
27
  }
@@ -1,2 +1,2 @@
1
1
  import { OxCheckboxGroupProps } from './Checkbox.types';
2
- export declare const OxCheckboxGroup: ({ children, className, disabled, name, onChange, value, ...domProps }: OxCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OxCheckboxGroup: ({ children, className, defaultValue, disabled, error, name, onValueChange, orientation, size, value, ...domProps }: OxCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { OxCheckboxGroupItemProps } from './Checkbox.types';
2
- export declare const OxCheckboxGroupItem: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, required, value, ...domProps }: OxCheckboxGroupItemProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OxCheckboxGroupItem: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, required, size, value, ...domProps }: OxCheckboxGroupItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,9 @@
1
+ import { OxComponentSize } from '../../../../_internal/types';
1
2
  export interface CheckboxGroupContextValue {
2
3
  disabled?: boolean;
4
+ error?: boolean;
3
5
  name: string;
4
- onChange?: (value: (string | number)[]) => void;
5
- value: (string | number)[];
6
+ onValueChange?: (value: string[]) => void;
7
+ size?: OxComponentSize;
8
+ value: string[];
6
9
  }
@@ -1,12 +1,12 @@
1
1
  import { OxUseDateInputProps } from './Date.types';
2
2
  export declare const useDateInput: ({ defaultValue, onChange, value }: OxUseDateInputProps) => {
3
3
  autoCompleteYear: (yearInput: string) => string;
4
- dateValue: string | undefined;
4
+ dateValue: string;
5
5
  day: string;
6
6
  getMaxDayForMonth: (month: string, year: string) => number;
7
7
  isValidCompleteDate: (day: string, month: string, year: string) => boolean;
8
8
  month: string;
9
- setDateValue: (value: string | ((prev: string | undefined) => string | undefined) | undefined) => void;
9
+ setDateValue: (value: string | ((prev: string) => string)) => void;
10
10
  setValue: (updates: {
11
11
  day?: string;
12
12
  month?: string;
@@ -8,8 +8,8 @@ export interface OxNumberInputProps {
8
8
  id?: string;
9
9
  placeholder?: string;
10
10
  }
11
- export interface OxNumberContainerProps extends Omit<ComponentPropsWithRef<'div'>, 'onChange'> {
12
- defaultValue?: number;
11
+ export interface OxNumberContainerProps extends Omit<ComponentPropsWithRef<'div'>, 'defaultValue' | 'onChange'> {
12
+ defaultValue?: number | null;
13
13
  disabled?: boolean;
14
14
  error?: boolean;
15
15
  locale?: string;
@@ -17,10 +17,10 @@ export interface OxNumberContainerProps extends Omit<ComponentPropsWithRef<'div'
17
17
  maximumFractionDigits?: number;
18
18
  min?: number;
19
19
  minimumFractionDigits?: number;
20
- onChange?: (value: number | undefined) => void;
20
+ onChange?: (value: number | null) => void;
21
21
  required?: boolean;
22
22
  steps?: number;
23
23
  useGrouping?: boolean;
24
24
  validationMessage?: string;
25
- value?: number;
25
+ value?: number | null;
26
26
  }
@@ -5,11 +5,11 @@ export interface NumberContextType {
5
5
  handleDecrement: () => void;
6
6
  handleIncrement: () => void;
7
7
  inputId: string;
8
- internalValue: number | undefined;
8
+ internalValue: number | null;
9
9
  max?: number;
10
10
  min?: number;
11
11
  parse: (value: string) => number | undefined;
12
12
  setDisplayValue: (value: string) => void;
13
- setInternalValue: (value: number | undefined) => void;
13
+ setInternalValue: (value: number | null) => void;
14
14
  steps: number;
15
15
  }
@@ -4,6 +4,6 @@ export declare const useTimeInput: ({ defaultValue, onChange, value }: OxUseTime
4
4
  minutes: string;
5
5
  setHours: (newHours: string) => void;
6
6
  setMinutes: (newMinutes: string) => void;
7
- timeValue: string | undefined;
8
- setTimeValue: (value: string | ((prev: string | undefined) => string | undefined) | undefined) => void;
7
+ timeValue: string;
8
+ setTimeValue: (value: string | ((prev: string) => string)) => void;
9
9
  };
@@ -2,7 +2,7 @@ import { ComponentType } from 'react';
2
2
  import { StoryObj } from '@storybook/react-vite';
3
3
  declare const meta: {
4
4
  title: string;
5
- component: ({ children, className, defaultValue, disabled, error, name, onChange, required, value: controlledValue, ...domProps }: import('..').OxRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
5
+ component: ({ children, className, defaultValue, disabled, error, name, onValueChange, orientation, required, size, value, ...domProps }: import('..').OxRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
6
6
  subcomponents: {
7
7
  'OxRadio.Group': ComponentType<unknown>;
8
8
  'OxRadio.Item': ComponentType<unknown>;
@@ -34,6 +34,16 @@ declare const meta: {
34
34
  control: "text";
35
35
  description: string;
36
36
  };
37
+ orientation: {
38
+ control: "radio";
39
+ options: string[];
40
+ description: string;
41
+ };
42
+ size: {
43
+ control: "select";
44
+ options: string[];
45
+ description: string;
46
+ };
37
47
  disabled: {
38
48
  control: "boolean";
39
49
  description: string;
@@ -46,7 +56,7 @@ declare const meta: {
46
56
  control: "boolean";
47
57
  description: string;
48
58
  };
49
- onChange: {
59
+ onValueChange: {
50
60
  action: string;
51
61
  description: string;
52
62
  };
@@ -56,6 +66,7 @@ declare const meta: {
56
66
  export default meta;
57
67
  type Story = StoryObj<typeof meta>;
58
68
  export declare const Playground: Story;
59
- export declare const FormLayout: Story;
69
+ export declare const Orientation: Story;
60
70
  export declare const ControlledGroup: Story;
71
+ export declare const Sizes: Story;
61
72
  export declare const States: Story;
@@ -1,6 +1,6 @@
1
1
  export type * from './src/Radio.types';
2
2
  declare const OxRadio: {
3
- Group: ({ children, className, defaultValue, disabled, error, name, onChange, required, value: controlledValue, ...domProps }: import('.').OxRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
4
- Item: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, value, ...domProps }: import('.').OxRadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
3
+ Group: ({ children, className, defaultValue, disabled, error, name, onValueChange, orientation, required, size, value, ...domProps }: import('.').OxRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
4
+ Item: ({ className, disabled: ownDisabled, id: propertyId, onChange, size, value, ...domProps }: import('.').OxRadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
5
5
  };
6
6
  export { OxRadio };
@@ -1,16 +1,18 @@
1
1
  import { ComponentPropsWithoutRef, ReactNode } from 'react';
2
- export interface OxRadioGroupItemProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'size' | 'required'> {
3
- error?: boolean;
4
- onCheckedChange?: (checked: boolean) => void;
5
- value?: string | number;
2
+ import { OxComponentSize } from '../../../_internal/types';
3
+ export interface OxRadioGroupItemProps extends Omit<ComponentPropsWithoutRef<'input'>, 'type' | 'size' | 'required' | 'value' | 'name'> {
4
+ size?: OxComponentSize;
5
+ value: string;
6
6
  }
7
7
  export interface OxRadioGroupProps extends Omit<ComponentPropsWithoutRef<'div'>, 'onChange'> {
8
8
  children: ReactNode;
9
- defaultValue?: string | number;
9
+ defaultValue?: string;
10
10
  disabled?: boolean;
11
11
  error?: boolean;
12
12
  name?: string;
13
- onChange?: (value: string | number) => void;
13
+ onValueChange?: (value: string) => void;
14
+ orientation?: 'horizontal' | 'vertical';
14
15
  required?: boolean;
15
- value?: string | number;
16
+ size?: OxComponentSize;
17
+ value?: string;
16
18
  }
@@ -1,2 +1,2 @@
1
1
  import { OxRadioGroupProps } from './Radio.types';
2
- export declare const OxRadioGroup: ({ children, className, defaultValue, disabled, error, name, onChange, required, value: controlledValue, ...domProps }: OxRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OxRadioGroup: ({ children, className, defaultValue, disabled, error, name, onValueChange, orientation, required, size, value, ...domProps }: OxRadioGroupProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { OxRadioGroupItemProps } from './Radio.types';
2
- export declare const OxRadioGroupItem: ({ className, disabled: ownDisabled, error, id: propertyId, name: ownName, onChange, value, ...domProps }: OxRadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OxRadioGroupItem: ({ className, disabled: ownDisabled, id: propertyId, onChange, size, value, ...domProps }: OxRadioGroupItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,9 @@
1
+ import { OxComponentSize } from '../../../../_internal/types';
1
2
  export interface RadioGroupContextValue {
2
3
  disabled: boolean;
4
+ error: boolean;
3
5
  name?: string;
4
- onChange?: (value: string | number) => void;
5
- value?: string | number;
6
+ onValueChange?: (value: string) => void;
7
+ size?: OxComponentSize;
8
+ value?: string;
6
9
  }
@@ -1,8 +1,57 @@
1
- import { Meta, StoryObj } from '@storybook/react-vite';
2
- import { OxSelect } from '..';
3
- declare const meta: Meta<typeof OxSelect>;
1
+ import { ComponentType } from 'react';
2
+ import { StoryObj } from '@storybook/react-vite';
3
+ import { OxSelectProps } from '..';
4
+ declare const meta: {
5
+ title: string;
6
+ component: ComponentType<OxSelectProps>;
7
+ subcomponents: {
8
+ 'OxSelect.Trigger': ComponentType<unknown>;
9
+ 'OxSelect.Content': ComponentType<unknown>;
10
+ 'OxSelect.Item': ComponentType<unknown>;
11
+ 'OxSelect.Group': ComponentType<unknown>;
12
+ };
13
+ parameters: {
14
+ layout: string;
15
+ docs: {
16
+ description: {
17
+ component: string;
18
+ };
19
+ };
20
+ };
21
+ tags: string[];
22
+ argTypes: {
23
+ children: {
24
+ control: {
25
+ disable: boolean;
26
+ };
27
+ description: string;
28
+ };
29
+ multiple: {
30
+ control: string;
31
+ description: string;
32
+ };
33
+ disabled: {
34
+ control: string;
35
+ description: string;
36
+ };
37
+ error: {
38
+ control: string;
39
+ description: string;
40
+ };
41
+ defaultValue: {
42
+ control: {
43
+ disable: boolean;
44
+ };
45
+ description: string;
46
+ };
47
+ onValueChange: {
48
+ action: string;
49
+ description: string;
50
+ };
51
+ };
52
+ };
4
53
  export default meta;
5
- type Story = StoryObj<typeof meta>;
54
+ type Story = StoryObj<OxSelectProps>;
6
55
  export declare const Playground: Story;
7
56
  export declare const WithError: Story;
8
57
  export declare const Disabled: Story;
@@ -1,5 +1,5 @@
1
1
  export type * from './src/Select.types';
2
- export declare const OxSelect: (({ children, className, defaultOpen, defaultValue, disabled, error, id: propertyId, isLoading, multiple, onChange, onOpenChange, open: controlledOpen, required, value, }: import('.').OxSelectProps) => import("react/jsx-runtime").JSX.Element) & {
2
+ export declare const OxSelect: (({ children, className, defaultOpen, defaultValue, disabled, error, id: propertyId, isLoading, multiple, onOpenChange, onValueChange, open: controlledOpen, required, value, }: import('.').OxSelectProps) => import("react/jsx-runtime").JSX.Element) & {
3
3
  Content: ({ children, className, ...domProps }: import('.').OxSelectContentProps) => import("react/jsx-runtime").JSX.Element | null;
4
4
  Group: ({ children, className, label, ...domProps }: import('.').OxSelectGroupProps) => import("react/jsx-runtime").JSX.Element;
5
5
  Item: ({ children, className, disabled, value, ...domProps }: import('.').OxSelectItemProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { OxSelectProps } from './Select.types';
2
- export declare const OxSelect: ({ children, className, defaultOpen, defaultValue, disabled, error, id: propertyId, isLoading, multiple, onChange, onOpenChange, open: controlledOpen, required, value, }: OxSelectProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const OxSelect: ({ children, className, defaultOpen, defaultValue, disabled, error, id: propertyId, isLoading, multiple, onOpenChange, onValueChange, open: controlledOpen, required, value, }: OxSelectProps) => import("react/jsx-runtime").JSX.Element;