@cyclone-ui/helpers 0.3.51 → 0.3.53
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 +6 -0
- package/dist/form-control.cjs +1 -1
- package/dist/form-control.d.cts +1 -1
- package/dist/form-control.d.mts +1 -1
- package/dist/form-control.mjs +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Cyclone UI - Helpers
|
|
4
4
|
|
|
5
|
+
## [0.3.52](https://github.com/storm-software/cyclone-ui/releases/tag/helpers%400.3.52) (11/06/2026)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Reduced the amount of tokens by removing extra theme border colors ([f01400d25](https://github.com/storm-software/cyclone-ui/commit/f01400d25))
|
|
10
|
+
|
|
5
11
|
## [0.3.46](https://github.com/storm-software/cyclone-ui/releases/tag/helpers%400.3.46) (11/04/2026)
|
|
6
12
|
|
|
7
13
|
### Miscellaneous
|
package/dist/form-control.cjs
CHANGED
|
@@ -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=e?.hasValidationMessage,s=a?`primary`:`
|
|
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=e?.hasValidationMessage,s=a?`primary`:`hairline`,c=a?`primary-active`:`hairline-active`,l=a?`primary-hovered`:`hairline-hovered`,u=a?`primary-disabled`:`hairline-disabled`;return{iconColor:t?u:n?c:s,hoverIconColor:t?u:n?c:l,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`,width:0,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=(0,r.useRef)(null),p=(0,r.useRef)(null),m=(0,n.useComposedRefs)(s,f),h=t.getSpaced(`sm`)*e.getFormSizeScale(d);return(0,r.useLayoutEffect)(()=>{let e=f.current,t=p.current,n=l?.current;if(!e||!t||!n||u!==`floating`)return;let r=()=>{let r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),a=i.height>0?Math.min(1,Math.max(0,(r.top-i.top)/(i.height*.2))):0;t.style.marginLeft=`${Math.max(0,i.left-r.left-h)}px`,t.style.width=`${(i.width+h*2)*a}px`};r();let i=e.ownerDocument,a=e=>{e.target.contains(n)&&r()};i.addEventListener(`transitionend`,a,!0),i.addEventListener(`transitioncancel`,a,!0);let o=typeof ResizeObserver>`u`?void 0:new ResizeObserver(r);return o?.observe(e),o?.observe(n),()=>{o?.disconnect(),i.removeEventListener(`transitionend`,a,!0),i.removeEventListener(`transitioncancel`,a,!0)}},[h,l,u]),/* @__PURE__ */ (0,i.jsx)(y,{ref:m,"aria-hidden":!0,...a,children:/* @__PURE__ */ (0,i.jsx)(b,{ref:p})})},{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;
|
package/dist/form-control.d.cts
CHANGED
|
@@ -172,7 +172,7 @@ declare const useFieldShouldShowPlaceholder: (value: unknown) => boolean;
|
|
|
172
172
|
declare const useFieldLabelFloated: (labelVariant?: FieldLabelVariant) => boolean;
|
|
173
173
|
/**
|
|
174
174
|
* Resolves the color tokens used by field icons (and their dividers): `primary`
|
|
175
|
-
* when the field has a validation message, otherwise `
|
|
175
|
+
* when the field has a validation message, otherwise `hairline`, matching the
|
|
176
176
|
* field border. Pair `iconColor` with `group-hover/field:${hoverIconColor}` on
|
|
177
177
|
* an element whose CSS color the icon inherits through `currentColor`, since
|
|
178
178
|
* Tamagui v3 icons do not resolve flat `group-hover/` values.
|
package/dist/form-control.d.mts
CHANGED
|
@@ -172,7 +172,7 @@ declare const useFieldShouldShowPlaceholder: (value: unknown) => boolean;
|
|
|
172
172
|
declare const useFieldLabelFloated: (labelVariant?: FieldLabelVariant) => boolean;
|
|
173
173
|
/**
|
|
174
174
|
* Resolves the color tokens used by field icons (and their dividers): `primary`
|
|
175
|
-
* when the field has a validation message, otherwise `
|
|
175
|
+
* when the field has a validation message, otherwise `hairline`, matching the
|
|
176
176
|
* field border. Pair `iconColor` with `group-hover/field:${hoverIconColor}` on
|
|
177
177
|
* an element whose CSS color the icon inherits through `currentColor`, since
|
|
178
178
|
* Tamagui v3 icons do not resolve flat `group-hover/` values.
|
package/dist/form-control.mjs
CHANGED
|
@@ -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}from"react";import{jsx as u}from"react/jsx-runtime";const d=o(void 0),f=()=>s(d),p=e=>{let t=f()?.setLabelDefaults;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},m=e=>{let t=f()?.setControlOptions;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},h=Symbol(`field-placeholder-unset`),g=(e=h)=>{let t=f(),n=t?.setHasPlaceholder,r=e===h?h:!!e;return c(()=>{if(r!==h&&n)return n(r),()=>n(!1)},[r,n]),t?.variant??`outlined`},_=()=>f()?.hasStartIcon??!1,v=()=>f()?.hasValidationMessage??!1,y=()=>{let e=f();return e?.labelVariant===`floating`?e.variant===`outlined`?`border`:`inset`:void 0},b=(t,n)=>t?t===`border`?3:13*e(n):0,x=e=>e!=null&&e!==``,S=e=>{let t=f();return t?.labelVariant!==`floating`||!x(e)&&!!t.focused},C=e=>{let t=f();return(e??t?.labelVariant)===`floating`&&(x(t?.formattedValue)||!!t?.focused)},w=()=>{let e=f(),t=e?.disabled,n=e?.focused,r=e?.theme,i=(!r||r===`base`)&&!e?.hasValidationMessage,a=e?.hasValidationMessage,o=a?`primary`:`
|
|
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}from"react";import{jsx as u}from"react/jsx-runtime";const d=o(void 0),f=()=>s(d),p=e=>{let t=f()?.setLabelDefaults;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},m=e=>{let t=f()?.setControlOptions;c(()=>{if(t)return t(e),()=>t(void 0)},[e,t])},h=Symbol(`field-placeholder-unset`),g=(e=h)=>{let t=f(),n=t?.setHasPlaceholder,r=e===h?h:!!e;return c(()=>{if(r!==h&&n)return n(r),()=>n(!1)},[r,n]),t?.variant??`outlined`},_=()=>f()?.hasStartIcon??!1,v=()=>f()?.hasValidationMessage??!1,y=()=>{let e=f();return e?.labelVariant===`floating`?e.variant===`outlined`?`border`:`inset`:void 0},b=(t,n)=>t?t===`border`?3:13*e(n):0,x=e=>e!=null&&e!==``,S=e=>{let t=f();return t?.labelVariant!==`floating`||!x(e)&&!!t.focused},C=e=>{let t=f();return(e??t?.labelVariant)===`floating`&&(x(t?.formattedValue)||!!t?.focused)},w=()=>{let e=f(),t=e?.disabled,n=e?.focused,r=e?.theme,i=(!r||r===`base`)&&!e?.hasValidationMessage,a=e?.hasValidationMessage,o=a?`primary`:`hairline`,s=a?`primary-active`:`hairline-active`,c=a?`primary-hovered`:`hairline-hovered`,l=a?`primary-disabled`:`hairline-disabled`;return{iconColor:t?l:n?s:o,hoverIconColor:t?l:n?s:c,isNeutral:i}},T=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`}),E=i(n,{displayName:`FieldNotchedOutline`,render:`legend`,width:0,height:0,padding:0,overflow:`hidden`}),D=r(T,(n,r)=>{let i=f(),o=i?.labelContentRef,s=i?.labelVariant,d=i?.size,p=l(null),m=l(null),h=a(r,p),g=t(`sm`)*e(d);return c(()=>{let e=p.current,t=m.current,n=o?.current;if(!e||!t||!n||s!==`floating`)return;let r=()=>{let r=e.getBoundingClientRect(),i=n.getBoundingClientRect(),a=i.height>0?Math.min(1,Math.max(0,(r.top-i.top)/(i.height*.2))):0;t.style.marginLeft=`${Math.max(0,i.left-r.left-g)}px`,t.style.width=`${(i.width+g*2)*a}px`};r();let i=e.ownerDocument,a=e=>{e.target.contains(n)&&r()};i.addEventListener(`transitionend`,a,!0),i.addEventListener(`transitioncancel`,a,!0);let c=typeof ResizeObserver>`u`?void 0:new ResizeObserver(r);return c?.observe(e),c?.observe(n),()=>{c?.disconnect(),i.removeEventListener(`transitionend`,a,!0),i.removeEventListener(`transitioncancel`,a,!0)}},[g,o,s]),/* @__PURE__ */ u(T,{ref:h,"aria-hidden":!0,...n,children:/* @__PURE__ */ u(E,{ref:m})})},{displayName:`FieldNotchedOutline`});export{D as FieldNotchedOutline,d as FormControlContext,b as getFieldLabelInset,_ as useFieldHasStartIcon,v as useFieldHasValidationMessage,w as useFieldIconColor,p as useFieldLabelDefaults,C as useFieldLabelFloated,y as useFieldLabelPlacement,m as useFieldOptions,S as useFieldShouldShowPlaceholder,g as useFieldVariant,f 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.
|
|
3
|
+
"version": "0.3.53",
|
|
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": {
|
|
@@ -183,5 +183,5 @@
|
|
|
183
183
|
"publishConfig": { "access": "public" },
|
|
184
184
|
"module": "./dist/index.mjs",
|
|
185
185
|
"peerDependencies": { "react": "^19.3.1" },
|
|
186
|
-
"gitHead": "
|
|
186
|
+
"gitHead": "d4ac4401264a498e955ad97849e2c5fba2e313b4"
|
|
187
187
|
}
|