ingred-ui 23.15.0 → 23.16.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.
@@ -0,0 +1,61 @@
1
+ /**
2
+ * iOSデバイスかどうかを検出するカスタムフック
3
+ *
4
+ * @returns {boolean} iOSデバイス(iPad、iPhone)の場合true、それ以外はfalse
5
+ *
6
+ * @example
7
+ * ```tsx
8
+ * const MyComponent = () => {
9
+ * const isIOS = useIOSDetection();
10
+ *
11
+ * return (
12
+ * <input
13
+ * data-ios={isIOS}
14
+ * style={{ fontSize: isIOS ? '16px' : '13px' }}
15
+ * />
16
+ * );
17
+ * };
18
+ * ```
19
+ */
20
+ export declare const useIOSDetection: () => boolean;
21
+ /**
22
+ * iOS用のフォントサイズを取得するヘルパー関数
23
+ *
24
+ * @param defaultSize デフォルトのフォントサイズ
25
+ * @param isIOS iOSデバイスかどうか
26
+ * @returns iOSの場合は'16px'、それ以外はdefaultSizeを返す
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * const MyComponent = () => {
31
+ * const isIOS = useIOSDetection();
32
+ *
33
+ * return (
34
+ * <input
35
+ * style={{ fontSize: getIOSFontSize('13px', isIOS) }}
36
+ * />
37
+ * );
38
+ * };
39
+ * ```
40
+ */
41
+ export declare const getIOSFontSize: (defaultSize: string, isIOS: boolean) => string;
42
+ /**
43
+ * iOS用のデータ属性を取得するヘルパー関数
44
+ *
45
+ * @param isIOS iOSデバイスかどうか
46
+ * @returns data-ios属性のオブジェクト
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * const MyComponent = () => {
51
+ * const isIOS = useIOSDetection();
52
+ *
53
+ * return (
54
+ * <input {...getIOSDataAttributes(isIOS)} />
55
+ * );
56
+ * };
57
+ * ```
58
+ */
59
+ export declare const getIOSDataAttributes: (isIOS: boolean) => {
60
+ "data-ios": boolean;
61
+ };
package/dist/index.es.js CHANGED
@@ -1013,7 +1013,7 @@ var wa=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[hr
1013
1013
  `,wd=v.div`
1014
1014
  flex-grow: 1;
1015
1015
  pointer-events: ${({isGhost:e})=>e?"none":"auto"};
1016
- `,Cd=({id:e,disabled:n,children:r})=>{const{setNodeRef:i,setActivatorNodeRef:a,attributes:o,listeners:l,transform:s,transition:c,isDragging:d}=md({id:e}),{isGhost:u}=h(fd),p=P();return t.createElement(xd,{ref:i,isGhost:u,style:{transform:ts.Transform.toString(s),transition:c,opacity:d?.25:1}},t.createElement(yd,Object.assign({ref:a,isGhost:u,isDragging:d,disabled:n},o,l),t.createElement(J,{name:"braille",size:"lg",color:p.palette.black})),t.createElement(wd,{isGhost:u},r))};Cd.displayName="ContextMenu2SortableItem";const Ed=n(((e,n)=>{var{className:i,onEnter:o,onKeyDown:l,onCompositionStart:s,onCompositionEnd:c}=e,u=H(e,["className","onEnter","onKeyDown","onCompositionStart","onCompositionEnd"]);const{activeIndex:p,maxActiveIndex:m,setActiveIndex:g}=h(fl),[f,b]=r(!1),[v,x]=r(!1),y=d((e=>{if((e=>{e.stopPropagation()})(e),null==l||l(e),!v)if("Enter"!==e.key)if("ArrowDown"!==e.key)if("ArrowUp"!==e.key);else{e.preventDefault();const t=null===p?1:p-1;g(t<0?m:t)}else{e.preventDefault();const t=null===p?1:p+1;g(t>m?null:t)}else null==o||o()}),[v,p,m,o,l,g]),w=d((e=>{null==s||s(e),x(!0)}),[s]),C=d((e=>{null==c||c(e),x(!1)}),[c]);return a((()=>{b(/iPad|iPhone/.test(navigator.userAgent))}),[]),t.createElement("div",{className:i},t.createElement("input",Object.assign({},u,{ref:n,"data-ios":f,onKeyDown:y,onCompositionStart:w,onCompositionEnd:C})))}));Ed.displayName="ContextMenu2TextInputItem";const Id=v(Ed)`
1016
+ `,Cd=({id:e,disabled:n,children:r})=>{const{setNodeRef:i,setActivatorNodeRef:a,attributes:o,listeners:l,transform:s,transition:c,isDragging:d}=md({id:e}),{isGhost:u}=h(fd),p=P();return t.createElement(xd,{ref:i,isGhost:u,style:{transform:ts.Transform.toString(s),transition:c,opacity:d?.25:1}},t.createElement(yd,Object.assign({ref:a,isGhost:u,isDragging:d,disabled:n},o,l),t.createElement(J,{name:"braille",size:"lg",color:p.palette.black})),t.createElement(wd,{isGhost:u},r))};Cd.displayName="ContextMenu2SortableItem";const Ed=n(((e,n)=>{var{className:i,onEnter:o,onKeyDown:l,onCompositionStart:s,onCompositionEnd:c}=e,u=H(e,["className","onEnter","onKeyDown","onCompositionStart","onCompositionEnd"]);const{activeIndex:p,maxActiveIndex:m,setActiveIndex:g}=h(fl),f=(()=>{const[e,t]=r(!1);return a((()=>{const e=navigator.userAgent,n=/iPad|iPhone/.test(e);t(n)}),[]),e})(),[b,v]=r(!1),x=d((e=>{if((e=>{e.stopPropagation()})(e),null==l||l(e),!b)if("Enter"!==e.key)if("ArrowDown"!==e.key)if("ArrowUp"!==e.key);else{e.preventDefault();const t=null===p?1:p-1;g(t<0?m:t)}else{e.preventDefault();const t=null===p?1:p+1;g(t>m?null:t)}else null==o||o()}),[b,p,m,o,l,g]),y=d((e=>{null==s||s(e),v(!0)}),[s]),w=d((e=>{null==c||c(e),v(!1)}),[c]);return t.createElement("div",{className:i},t.createElement("input",Object.assign({},u,{ref:n,"data-ios":f,onKeyDown:x,onCompositionStart:y,onCompositionEnd:w})))}));Ed.displayName="ContextMenu2TextInputItem";const Id=v(Ed)`
1017
1017
  input {
1018
1018
  display: block;
1019
1019
  box-sizing: border-box;