@cyclone-ui/helpers 0.3.14 → 0.3.15

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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  # Changelog for Cyclone UI - Helpers
4
4
 
5
+ ## [0.3.15](https://github.com/storm-software/cyclone-ui/releases/tag/helpers%400.3.15) (10/12/2026)
6
+
7
+ ### Bug Fixes
8
+
9
+ - **tokens:** Updates to background token structure ([913fc3c9](https://github.com/storm-software/cyclone-ui/commit/913fc3c9))
10
+
5
11
  ## [0.3.14](https://github.com/storm-software/cyclone-ui/releases/tag/helpers%400.3.14) (10/12/2026)
6
12
 
7
13
  ### Bug Fixes
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./form-size.cjs"),t=require("./get-sized.cjs");let n=require("@tamagui/core"),r=require("react"),i=require("react/jsx-runtime");const a=(0,r.createContext)(void 0),o=()=>(0,r.use)(a),s=e=>{let t=o()?.setLabelDefaults;(0,r.useLayoutEffect)(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},c=e=>{let t=o()?.setControlOptions;(0,r.useLayoutEffect)(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},l=Symbol(`field-placeholder-unset`),u=(e=l)=>{let t=o(),n=t?.setHasPlaceholder,i=e===l?l:!!e;return(0,r.useLayoutEffect)(()=>{if(i!==l&&n)return n(i),()=>n(!1)},[i,n]),t?.variant??`outlined`},d=()=>o()?.hasStartIcon??!1,f=()=>o()?.hasValidationMessage??!1,p=()=>{let e=o();return e?.labelVariant===`floating`?e.variant===`outlined`?`border`:`inset`:void 0},m=(t,n)=>t?t===`border`?3:13*e.getFormSizeScale(n):0,h=e=>e!=null&&e!==``,g=e=>{let t=o();return t?.labelVariant!==`floating`||!h(e)&&!!t.focused},_=e=>{let t=o();return(e??t?.labelVariant)===`floating`&&(h(t?.formattedValue)||!!t?.focused)},v=()=>{let e=o(),t=e?.disabled,n=e?.focused,r=e?.theme,i=(!r||r===`base`)&&!e?.hasValidationMessage,a=t?i?`borderDisabled`:`disabled`:i?n?`borderActive`:`border`:n?`active`:`accent`,s=t?i?`borderDisabled`:`disabled`:i?`borderActive`:`active`;return{iconColor:e?.hovered?s:a,hoverIconColor:s,isNeutral:i}},y=(0,n.styled)(n.View,{displayName:`FieldNotchedOutline`,render:`fieldset`,transition:`200ms`,position:`absolute`,top:0,right:0,bottom:0,left:0,margin:0,padding:0,minWidth:0,borderWidth:1,borderStyle:`solid`,borderRadius:`control`,pointerEvents:`none`}),b=(0,n.styled)(n.View,{displayName:`FieldNotchedOutline`,render:`legend`,transition:`100ms`,height:0,padding:0,overflow:`hidden`}),x=(0,n.createStyledHOC)(y,(a,s)=>{let c=o(),l=c?.labelContentRef,u=c?.labelVariant,d=c?.size,f=_(u),p=(0,r.useRef)(null),m=(0,n.useComposedRefs)(s,p),[h,g]=(0,r.useState)();(0,r.useLayoutEffect)(()=>{let e=p.current,t=l?.current;if(!e||!t)return;let n=()=>{let n=t.getBoundingClientRect().left-e.getBoundingClientRect().left,r=t.getBoundingClientRect().width;g(e=>e?.left===n&&e.width===r?e:{left:n,width:r})};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[l,u]);let v=t.getSpaced(`sm`)*e.getFormSizeScale(d);return/* @__PURE__ */ (0,i.jsx)(y,{ref:m,"aria-hidden":!0,...a,children:/* @__PURE__ */ (0,i.jsx)(b,{marginLeft:Math.max(0,(h?.left??0)-v),width:f&&h?h.width+v*2:0})})},{displayName:`FieldNotchedOutline`});exports.FieldNotchedOutline=x,exports.FormControlContext=a,exports.getFieldLabelInset=m,exports.useFieldHasStartIcon=d,exports.useFieldHasValidationMessage=f,exports.useFieldIconColor=v,exports.useFieldLabelDefaults=s,exports.useFieldLabelFloated=_,exports.useFieldLabelPlacement=p,exports.useFieldOptions=c,exports.useFieldShouldShowPlaceholder=g,exports.useFieldVariant=u,exports.useFormControl=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./form-size.cjs"),t=require("./get-sized.cjs");let n=require("@tamagui/core"),r=require("react"),i=require("react/jsx-runtime");const a=(0,r.createContext)(void 0),o=()=>(0,r.use)(a),s=e=>{let t=o()?.setLabelDefaults;(0,r.useLayoutEffect)(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},c=e=>{let t=o()?.setControlOptions;(0,r.useLayoutEffect)(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},l=Symbol(`field-placeholder-unset`),u=(e=l)=>{let t=o(),n=t?.setHasPlaceholder,i=e===l?l:!!e;return(0,r.useLayoutEffect)(()=>{if(i!==l&&n)return n(i),()=>n(!1)},[i,n]),t?.variant??`outlined`},d=()=>o()?.hasStartIcon??!1,f=()=>o()?.hasValidationMessage??!1,p=()=>{let e=o();return e?.labelVariant===`floating`?e.variant===`outlined`?`border`:`inset`:void 0},m=(t,n)=>t?t===`border`?3:13*e.getFormSizeScale(n):0,h=e=>e!=null&&e!==``,g=e=>{let t=o();return t?.labelVariant!==`floating`||!h(e)&&!!t.focused},_=e=>{let t=o();return(e??t?.labelVariant)===`floating`&&(h(t?.formattedValue)||!!t?.focused)},v=()=>{let e=o(),t=e?.disabled,n=e?.focused,r=e?.theme,i=(!r||r===`base`)&&!e?.hasValidationMessage,a=t?i?`hairlineDisabled`:`primaryDisabled`:i?n?`hairlineActive`:`hairline`:n?`primaryActive`:`primary`,s=t?i?`hairlineDisabled`:`primaryDisabled`:i?`hairlineActive`:`primaryActive`;return{iconColor:e?.hovered?s:a,hoverIconColor:s,isNeutral:i}},y=(0,n.styled)(n.View,{displayName:`FieldNotchedOutline`,render:`fieldset`,transition:`200ms`,position:`absolute`,top:0,right:0,bottom:0,left:0,margin:0,padding:0,minWidth:0,borderWidth:1,borderStyle:`solid`,borderRadius:`control`,pointerEvents:`none`}),b=(0,n.styled)(n.View,{displayName:`FieldNotchedOutline`,render:`legend`,transition:`100ms`,height:0,padding:0,overflow:`hidden`}),x=(0,n.createStyledHOC)(y,(a,s)=>{let c=o(),l=c?.labelContentRef,u=c?.labelVariant,d=c?.size,f=_(u),p=(0,r.useRef)(null),m=(0,n.useComposedRefs)(s,p),[h,g]=(0,r.useState)();(0,r.useLayoutEffect)(()=>{let e=p.current,t=l?.current;if(!e||!t)return;let n=()=>{let n=t.getBoundingClientRect().left-e.getBoundingClientRect().left,r=t.getBoundingClientRect().width;g(e=>e?.left===n&&e.width===r?e:{left:n,width:r})};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[l,u]);let v=t.getSpaced(`sm`)*e.getFormSizeScale(d);return/* @__PURE__ */ (0,i.jsx)(y,{ref:m,"aria-hidden":!0,...a,children:/* @__PURE__ */ (0,i.jsx)(b,{marginLeft:Math.max(0,(h?.left??0)-v),width:f&&h?h.width+v*2:0})})},{displayName:`FieldNotchedOutline`});exports.FieldNotchedOutline=x,exports.FormControlContext=a,exports.getFieldLabelInset=m,exports.useFieldHasStartIcon=d,exports.useFieldHasValidationMessage=f,exports.useFieldIconColor=v,exports.useFieldLabelDefaults=s,exports.useFieldLabelFloated=_,exports.useFieldLabelPlacement=p,exports.useFieldOptions=c,exports.useFieldShouldShowPlaceholder=g,exports.useFieldVariant=u,exports.useFormControl=o;
@@ -177,9 +177,9 @@ declare const useFieldShouldShowPlaceholder: (value: unknown) => boolean;
177
177
  */
178
178
  declare const useFieldLabelFloated: (labelVariant?: FieldLabelVariant) => boolean;
179
179
  /**
180
- * Resolves the color tokens used by field icons (and their dividers): `accent`
180
+ * Resolves the color tokens used by field icons (and their dividers): `primary`
181
181
  * when the field has a non-base theme or a validation message, otherwise
182
- * `border`. `iconColor` is a single theme key so it can be passed directly
182
+ * `hairline`. `iconColor` is a single theme key so it can be passed directly
183
183
  * to Tamagui v3 icons, which do not resolve flat `group-hover/` values.
184
184
  */
185
185
  declare const useFieldIconColor: () => {
@@ -177,9 +177,9 @@ declare const useFieldShouldShowPlaceholder: (value: unknown) => boolean;
177
177
  */
178
178
  declare const useFieldLabelFloated: (labelVariant?: FieldLabelVariant) => boolean;
179
179
  /**
180
- * Resolves the color tokens used by field icons (and their dividers): `accent`
180
+ * Resolves the color tokens used by field icons (and their dividers): `primary`
181
181
  * when the field has a non-base theme or a validation message, otherwise
182
- * `border`. `iconColor` is a single theme key so it can be passed directly
182
+ * `hairline`. `iconColor` is a single theme key so it can be passed directly
183
183
  * to Tamagui v3 icons, which do not resolve flat `group-hover/` values.
184
184
  */
185
185
  declare const useFieldIconColor: () => {
@@ -1,2 +1,2 @@
1
- import{getFormSizeScale as e}from"./form-size.mjs";import{getSpaced as t}from"./get-sized.mjs";import{View as n,createStyledHOC as r,styled as i,useComposedRefs as a}from"@tamagui/core";import{createContext as o,use as s,useLayoutEffect as c,useRef as l,useState as u}from"react";import{jsx as d}from"react/jsx-runtime";const f=o(void 0),p=()=>s(f),m=e=>{let t=p()?.setLabelDefaults;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},h=e=>{let t=p()?.setControlOptions;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},g=Symbol(`field-placeholder-unset`),_=(e=g)=>{let t=p(),n=t?.setHasPlaceholder,r=e===g?g:!!e;return c(()=>{if(r!==g&&n)return n(r),()=>n(!1)},[r,n]),t?.variant??`outlined`},v=()=>p()?.hasStartIcon??!1,y=()=>p()?.hasValidationMessage??!1,b=()=>{let e=p();return e?.labelVariant===`floating`?e.variant===`outlined`?`border`:`inset`:void 0},x=(t,n)=>t?t===`border`?3:13*e(n):0,S=e=>e!=null&&e!==``,C=e=>{let t=p();return t?.labelVariant!==`floating`||!S(e)&&!!t.focused},w=e=>{let t=p();return(e??t?.labelVariant)===`floating`&&(S(t?.formattedValue)||!!t?.focused)},T=()=>{let e=p(),t=e?.disabled,n=e?.focused,r=e?.theme,i=(!r||r===`base`)&&!e?.hasValidationMessage,a=t?i?`borderDisabled`:`disabled`:i?n?`borderActive`:`border`:n?`active`:`accent`,o=t?i?`borderDisabled`:`disabled`:i?`borderActive`:`active`;return{iconColor:e?.hovered?o:a,hoverIconColor:o,isNeutral:i}},E=i(n,{displayName:`FieldNotchedOutline`,render:`fieldset`,transition:`200ms`,position:`absolute`,top:0,right:0,bottom:0,left:0,margin:0,padding:0,minWidth:0,borderWidth:1,borderStyle:`solid`,borderRadius:`control`,pointerEvents:`none`}),D=i(n,{displayName:`FieldNotchedOutline`,render:`legend`,transition:`100ms`,height:0,padding:0,overflow:`hidden`}),O=r(E,(n,r)=>{let i=p(),o=i?.labelContentRef,s=i?.labelVariant,f=i?.size,m=w(s),h=l(null),g=a(r,h),[_,v]=u();c(()=>{let e=h.current,t=o?.current;if(!e||!t)return;let n=()=>{let n=t.getBoundingClientRect().left-e.getBoundingClientRect().left,r=t.getBoundingClientRect().width;v(e=>e?.left===n&&e.width===r?e:{left:n,width:r})};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[o,s]);let y=t(`sm`)*e(f);return/* @__PURE__ */ d(E,{ref:g,"aria-hidden":!0,...n,children:/* @__PURE__ */ d(D,{marginLeft:Math.max(0,(_?.left??0)-y),width:m&&_?_.width+y*2:0})})},{displayName:`FieldNotchedOutline`});export{O as FieldNotchedOutline,f as FormControlContext,x as getFieldLabelInset,v as useFieldHasStartIcon,y as useFieldHasValidationMessage,T as useFieldIconColor,m as useFieldLabelDefaults,w as useFieldLabelFloated,b as useFieldLabelPlacement,h as useFieldOptions,C as useFieldShouldShowPlaceholder,_ as useFieldVariant,p as useFormControl};
1
+ import{getFormSizeScale as e}from"./form-size.mjs";import{getSpaced as t}from"./get-sized.mjs";import{View as n,createStyledHOC as r,styled as i,useComposedRefs as a}from"@tamagui/core";import{createContext as o,use as s,useLayoutEffect as c,useRef as l,useState as u}from"react";import{jsx as d}from"react/jsx-runtime";const f=o(void 0),p=()=>s(f),m=e=>{let t=p()?.setLabelDefaults;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},h=e=>{let t=p()?.setControlOptions;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},g=Symbol(`field-placeholder-unset`),_=(e=g)=>{let t=p(),n=t?.setHasPlaceholder,r=e===g?g:!!e;return c(()=>{if(r!==g&&n)return n(r),()=>n(!1)},[r,n]),t?.variant??`outlined`},v=()=>p()?.hasStartIcon??!1,y=()=>p()?.hasValidationMessage??!1,b=()=>{let e=p();return e?.labelVariant===`floating`?e.variant===`outlined`?`border`:`inset`:void 0},x=(t,n)=>t?t===`border`?3:13*e(n):0,S=e=>e!=null&&e!==``,C=e=>{let t=p();return t?.labelVariant!==`floating`||!S(e)&&!!t.focused},w=e=>{let t=p();return(e??t?.labelVariant)===`floating`&&(S(t?.formattedValue)||!!t?.focused)},T=()=>{let e=p(),t=e?.disabled,n=e?.focused,r=e?.theme,i=(!r||r===`base`)&&!e?.hasValidationMessage,a=t?i?`hairlineDisabled`:`primaryDisabled`:i?n?`hairlineActive`:`hairline`:n?`primaryActive`:`primary`,o=t?i?`hairlineDisabled`:`primaryDisabled`:i?`hairlineActive`:`primaryActive`;return{iconColor:e?.hovered?o:a,hoverIconColor:o,isNeutral:i}},E=i(n,{displayName:`FieldNotchedOutline`,render:`fieldset`,transition:`200ms`,position:`absolute`,top:0,right:0,bottom:0,left:0,margin:0,padding:0,minWidth:0,borderWidth:1,borderStyle:`solid`,borderRadius:`control`,pointerEvents:`none`}),D=i(n,{displayName:`FieldNotchedOutline`,render:`legend`,transition:`100ms`,height:0,padding:0,overflow:`hidden`}),O=r(E,(n,r)=>{let i=p(),o=i?.labelContentRef,s=i?.labelVariant,f=i?.size,m=w(s),h=l(null),g=a(r,h),[_,v]=u();c(()=>{let e=h.current,t=o?.current;if(!e||!t)return;let n=()=>{let n=t.getBoundingClientRect().left-e.getBoundingClientRect().left,r=t.getBoundingClientRect().width;v(e=>e?.left===n&&e.width===r?e:{left:n,width:r})};if(n(),typeof ResizeObserver>`u`)return;let r=new ResizeObserver(n);return r.observe(e),r.observe(t),()=>r.disconnect()},[o,s]);let y=t(`sm`)*e(f);return/* @__PURE__ */ d(E,{ref:g,"aria-hidden":!0,...n,children:/* @__PURE__ */ d(D,{marginLeft:Math.max(0,(_?.left??0)-y),width:m&&_?_.width+y*2:0})})},{displayName:`FieldNotchedOutline`});export{O as FieldNotchedOutline,f as FormControlContext,x as getFieldLabelInset,v as useFieldHasStartIcon,y as useFieldHasValidationMessage,T as useFieldIconColor,m as useFieldLabelDefaults,w as useFieldLabelFloated,b as useFieldLabelPlacement,h as useFieldOptions,C as useFieldShouldShowPlaceholder,_ as useFieldVariant,p as useFormControl};
2
2
  //# sourceMappingURL=form-control.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclone-ui/helpers",
3
- "version": "0.3.14",
3
+ "version": "0.3.15",
4
4
  "private": false,
5
5
  "description": "A repository containing the core front-end components used by Storm Software across many platforms",
6
6
  "repository": {
@@ -171,8 +171,8 @@
171
171
  "dependencies": {
172
172
  "@stryke/type-checks": "^0.6.49",
173
173
  "@stryke/types": "^0.12.44",
174
- "@tamagui/constants": "3.0.2",
175
- "@tamagui/core": "3.0.2",
174
+ "@tamagui/constants": "^3.0.2",
175
+ "@tamagui/core": "^3.0.2",
176
176
  "chroma-js": "^2.6.0"
177
177
  },
178
178
  "devDependencies": {
@@ -185,5 +185,5 @@
185
185
  "publishConfig": { "access": "public" },
186
186
  "module": "./dist/index.mjs",
187
187
  "peerDependencies": { "react": "^19.3.0" },
188
- "gitHead": "24b06b5e5a3a45f478582542e6274a1db77ae22a"
188
+ "gitHead": "46c136e63209ac8baacbc9d23aae4675aa68093a"
189
189
  }