@tamagui/label 2.0.0-rc.4 → 2.0.0-rc.40
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/dist/cjs/Label.cjs +139 -113
- package/dist/cjs/Label.native.js +144 -122
- package/dist/cjs/Label.native.js.map +1 -1
- package/dist/cjs/index.cjs +7 -5
- package/dist/cjs/index.native.js +7 -5
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Label.mjs +105 -81
- package/dist/esm/Label.mjs.map +1 -1
- package/dist/esm/Label.native.js +110 -90
- package/dist/esm/Label.native.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -6
- package/dist/jsx/Label.mjs +105 -81
- package/dist/jsx/Label.mjs.map +1 -1
- package/dist/jsx/Label.native.js +144 -122
- package/dist/jsx/Label.native.js.map +1 -1
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +7 -5
- package/package.json +14 -17
- package/dist/cjs/Label.js +0 -107
- package/dist/cjs/Label.js.map +0 -6
- package/dist/cjs/index.js +0 -15
- package/dist/cjs/index.js.map +0 -6
- package/dist/esm/Label.js +0 -92
- package/dist/esm/Label.js.map +0 -6
- package/dist/jsx/Label.js +0 -92
- package/dist/jsx/Label.js.map +0 -6
package/dist/jsx/Label.mjs
CHANGED
|
@@ -8,99 +8,123 @@ import { SizableText } from "@tamagui/text";
|
|
|
8
8
|
import { styled } from "@tamagui/web";
|
|
9
9
|
import * as React from "react";
|
|
10
10
|
import { jsx } from "react/jsx-runtime";
|
|
11
|
-
const NAME = "Label"
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
size: {
|
|
37
|
-
"...size": (val, extras) => {
|
|
38
|
-
const buttonHeight = getButtonSized(val, extras)?.height;
|
|
39
|
-
return {
|
|
40
|
-
...getFontSized(val, extras),
|
|
41
|
-
lineHeight: buttonHeight ? extras.tokens.size[buttonHeight] : void 0
|
|
42
|
-
};
|
|
11
|
+
const NAME = "Label";
|
|
12
|
+
const [LabelProvider, useLabelContextImpl] = createContext(NAME, {
|
|
13
|
+
id: void 0,
|
|
14
|
+
controlRef: {
|
|
15
|
+
current: null
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const LabelFrame = styled(SizableText, {
|
|
19
|
+
name: "Label",
|
|
20
|
+
render: "label",
|
|
21
|
+
variants: {
|
|
22
|
+
unstyled: {
|
|
23
|
+
false: {
|
|
24
|
+
size: "$true",
|
|
25
|
+
color: "$color",
|
|
26
|
+
backgroundColor: "transparent",
|
|
27
|
+
display: "flex",
|
|
28
|
+
alignItems: "center",
|
|
29
|
+
userSelect: "none",
|
|
30
|
+
cursor: "default",
|
|
31
|
+
pressStyle: {
|
|
32
|
+
color: "$colorPress"
|
|
43
33
|
}
|
|
44
34
|
}
|
|
45
35
|
},
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
size: {
|
|
37
|
+
"...size": (val, extras) => {
|
|
38
|
+
const buttonStyle = getButtonSized(val, extras);
|
|
39
|
+
const buttonHeight = buttonStyle?.height;
|
|
40
|
+
const fontStyle = getFontSized(val, extras);
|
|
41
|
+
return {
|
|
42
|
+
...fontStyle,
|
|
43
|
+
lineHeight: buttonHeight ? extras.tokens.size[buttonHeight] : void 0
|
|
44
|
+
};
|
|
45
|
+
}
|
|
48
46
|
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
47
|
+
},
|
|
48
|
+
defaultVariants: {
|
|
49
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
const Label = LabelFrame.styleable(function Label2(props, forwardedRef) {
|
|
53
|
+
const {
|
|
54
|
+
htmlFor,
|
|
55
|
+
id: idProp,
|
|
56
|
+
...labelProps
|
|
57
|
+
} = props;
|
|
58
|
+
const controlRef = React.useRef(null);
|
|
59
|
+
const ref = React.useRef(null);
|
|
60
|
+
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
61
|
+
const backupId = React.useId();
|
|
62
|
+
const id = idProp ?? backupId;
|
|
63
|
+
if (isWeb) {
|
|
64
|
+
React.useEffect(() => {
|
|
62
65
|
if (htmlFor) {
|
|
63
66
|
const element = document.getElementById(htmlFor);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
const label = ref.current;
|
|
68
|
+
if (label && element) {
|
|
69
|
+
const getAriaLabel = () => element.getAttribute("aria-labelledby");
|
|
70
|
+
const ariaLabelledBy = [id, getAriaLabel()].filter(Boolean).join(" ");
|
|
71
|
+
element.setAttribute("aria-labelledby", ariaLabelledBy);
|
|
72
|
+
controlRef.current = element;
|
|
73
|
+
return () => {
|
|
68
74
|
if (!id) return;
|
|
69
75
|
const ariaLabelledBy2 = getAriaLabel()?.replace(id, "");
|
|
70
|
-
ariaLabelledBy2 === ""
|
|
76
|
+
if (ariaLabelledBy2 === "") {
|
|
77
|
+
element.removeAttribute("aria-labelledby");
|
|
78
|
+
} else if (ariaLabelledBy2) {
|
|
79
|
+
element.setAttribute("aria-labelledby", ariaLabelledBy2);
|
|
80
|
+
}
|
|
71
81
|
};
|
|
72
82
|
}
|
|
73
83
|
}
|
|
74
|
-
}, [id, htmlFor])
|
|
84
|
+
}, [id, htmlFor]);
|
|
85
|
+
}
|
|
86
|
+
return /* @__PURE__ */jsx(LabelProvider, {
|
|
87
|
+
id,
|
|
88
|
+
controlRef,
|
|
89
|
+
children: /* @__PURE__ */jsx(LabelFrame, {
|
|
75
90
|
id,
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
props.onMouseDown?.(event), !event.defaultPrevented && event.detail > 1 && event.preventDefault();
|
|
84
|
-
},
|
|
85
|
-
onPress: event => {
|
|
86
|
-
if (props.onPress?.(event), isWeb) {
|
|
87
|
-
if (htmlFor || !controlRef.current || event.defaultPrevented) return;
|
|
88
|
-
const isClickingControl = controlRef.current.contains(event.target),
|
|
89
|
-
isUserClick = event.isTrusted === !0;
|
|
90
|
-
!isClickingControl && isUserClick && (controlRef.current.click(), controlRef.current.focus());
|
|
91
|
-
} else props.htmlFor && focusFocusable(props.htmlFor);
|
|
91
|
+
htmlFor,
|
|
92
|
+
...labelProps,
|
|
93
|
+
ref: composedRefs,
|
|
94
|
+
onMouseDown: event => {
|
|
95
|
+
props.onMouseDown?.(event);
|
|
96
|
+
if (!event.defaultPrevented && event.detail > 1) {
|
|
97
|
+
event.preventDefault();
|
|
92
98
|
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
99
|
+
},
|
|
100
|
+
onPress: event => {
|
|
101
|
+
props.onPress?.(event);
|
|
102
|
+
if (isWeb) {
|
|
103
|
+
if (htmlFor || !controlRef.current || event.defaultPrevented) return;
|
|
104
|
+
const isClickingControl = controlRef.current.contains(event.target);
|
|
105
|
+
const isUserClick = event.isTrusted === true;
|
|
106
|
+
if (!isClickingControl && isUserClick) {
|
|
107
|
+
controlRef.current.click();
|
|
108
|
+
controlRef.current.focus();
|
|
109
|
+
}
|
|
110
|
+
} else {
|
|
111
|
+
if (props.htmlFor) {
|
|
112
|
+
focusFocusable(props.htmlFor);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
const useLabelContext = element => {
|
|
120
|
+
const context = useLabelContextImpl("LabelConsumer");
|
|
121
|
+
const {
|
|
122
|
+
controlRef
|
|
123
|
+
} = context;
|
|
124
|
+
React.useEffect(() => {
|
|
125
|
+
if (element) controlRef.current = element;
|
|
126
|
+
}, [element, controlRef]);
|
|
127
|
+
return context.id;
|
|
128
|
+
};
|
|
105
129
|
export { Label, LabelFrame, useLabelContext };
|
|
106
130
|
//# sourceMappingURL=Label.mjs.map
|
package/dist/jsx/Label.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useComposedRefs","isWeb","createContext","focusFocusable","getButtonSized","getFontSized","SizableText","styled","React","jsx","NAME","LabelProvider","useLabelContextImpl","id","controlRef","current","LabelFrame","name","render","variants","unstyled","false","size","color","backgroundColor","display","alignItems","userSelect","cursor","pressStyle","...size","val","extras","buttonHeight","height","lineHeight","tokens","defaultVariants","process","env","TAMAGUI_HEADLESS","Label","styleable","props","forwardedRef","htmlFor","idProp","labelProps","useRef","ref","composedRefs","backupId","useId","useEffect","element","document","getElementById","getAriaLabel","getAttribute","ariaLabelledBy","filter","Boolean","join","setAttribute","ariaLabelledBy2","replace","removeAttribute","children","onMouseDown","event","defaultPrevented","detail","preventDefault","onPress","isClickingControl","contains","target","isUserClick","isTrusted","click","focus","useLabelContext","context"],"sources":["../../src/Label.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAChC,SAASC,KAAA,QAAa;AACtB,SAASC,aAAA,QAAqB;AAC9B,SAASC,cAAA,QAAsB;AAC/B,SAASC,cAAA,QAAsB;AAC/B,SAASC,YAAA,QAAoB;AAC7B,SAASC,WAAA,QAAmB;AAE5B,SAASC,MAAA,QAAc;AACvB,YAAYC,KAAA,MAAW;AA8FjB,SAAAC,GAAA;AA5FN,MAAMC,IAAA,GAAO;
|
|
1
|
+
{"version":3,"names":["useComposedRefs","isWeb","createContext","focusFocusable","getButtonSized","getFontSized","SizableText","styled","React","jsx","NAME","LabelProvider","useLabelContextImpl","id","controlRef","current","LabelFrame","name","render","variants","unstyled","false","size","color","backgroundColor","display","alignItems","userSelect","cursor","pressStyle","...size","val","extras","buttonStyle","buttonHeight","height","fontStyle","lineHeight","tokens","defaultVariants","process","env","TAMAGUI_HEADLESS","Label","styleable","Label2","props","forwardedRef","htmlFor","idProp","labelProps","useRef","ref","composedRefs","backupId","useId","useEffect","element","document","getElementById","label","getAriaLabel","getAttribute","ariaLabelledBy","filter","Boolean","join","setAttribute","ariaLabelledBy2","replace","removeAttribute","children","onMouseDown","event","defaultPrevented","detail","preventDefault","onPress","isClickingControl","contains","target","isUserClick","isTrusted","click","focus","useLabelContext","context"],"sources":["../../src/Label.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,eAAA,QAAuB;AAChC,SAASC,KAAA,QAAa;AACtB,SAASC,aAAA,QAAqB;AAC9B,SAASC,cAAA,QAAsB;AAC/B,SAASC,cAAA,QAAsB;AAC/B,SAASC,YAAA,QAAoB;AAC7B,SAASC,WAAA,QAAmB;AAE5B,SAASC,MAAA,QAAc;AACvB,YAAYC,KAAA,MAAW;AA8FjB,SAAAC,GAAA;AA5FN,MAAMC,IAAA,GAAO;AAOb,MAAM,CAACC,aAAA,EAAeC,mBAAmB,IAAIV,aAAA,CAAiCQ,IAAA,EAAM;EAClFG,EAAA,EAAI;EACJC,UAAA,EAAY;IAAEC,OAAA,EAAS;EAAK;AAC9B,CAAC;AAEM,MAAMC,UAAA,GAAaT,MAAA,CAAOD,WAAA,EAAa;EAC5CW,IAAA,EAAM;EACNC,MAAA,EAAQ;EAERC,QAAA,EAAU;IACRC,QAAA,EAAU;MACRC,KAAA,EAAO;QACLC,IAAA,EAAM;QACNC,KAAA,EAAO;QACPC,eAAA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AAA,IAAW0D,KAAA,CAAMC,gBAAA,EAAkB;UAC9D,MAAMI,iBAAA,GAAoBhE,UAAA,CAAWC,OAAA,CAAQgE,QAAA,CAC3CN,KAAA,CAAMO,MACR;UAGA,MAAMC,WAAA,GAAcR,KAAA,CAAMS,SAAA,KAAc;UAMxC,IAAI,CAACJ,iBAAA,IAAqBG,WAAA,EAAa;YACrCnE,UAAA,CAAWC,OAAA,CAAQoE,KAAA,CAAM;YACzBrE,UAAA,CAAWC,OAAA,CAAQqE,KAAA,CAAM;UAC3B;QACF,OAAO;UACL,IAAItC,KAAA,CAAME,OAAA,EAAS;YACjB7C,cAAA,CAAe2C,KAAA,CAAME,OAAO;UAC9B;QACF;MACF;IAAA,CACF;EAAA,CACF;AAEJ,CAAC;AAEM,MAAMqC,eAAA,GAAmB5B,OAAA,IAAiC;EAC/D,MAAM6B,OAAA,GAAU1E,mBAAA,CAAoB,eAAe;EACnD,MAAM;IAAEE;EAAW,IAAIwE,OAAA;EAEvB9E,KAAA,CAAMgD,SAAA,CAAU,MAAM;IACpB,IAAIC,OAAA,EAAS3C,UAAA,CAAWC,OAAA,GAAU0C,OAAA;EACpC,GAAG,CAACA,OAAA,EAAS3C,UAAU,CAAC;EAExB,OAAOwE,OAAA,CAAQzE,EAAA;AACjB","ignoreList":[]}
|
package/dist/jsx/Label.native.js
CHANGED
|
@@ -4,33 +4,35 @@ var __create = Object.create;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
8
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
18
|
get: () => from[key],
|
|
18
19
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
34
36
|
var Label_exports = {};
|
|
35
37
|
__export(Label_exports, {
|
|
36
38
|
Label: () => Label,
|
|
@@ -38,118 +40,138 @@ __export(Label_exports, {
|
|
|
38
40
|
useLabelContext: () => useLabelContext
|
|
39
41
|
});
|
|
40
42
|
module.exports = __toCommonJS(Label_exports);
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
size: {
|
|
77
|
-
"...size": function (val, extras) {
|
|
78
|
-
var buttonStyle = (0, import_get_button_sized.getButtonSized)(val, extras),
|
|
79
|
-
buttonHeight = buttonStyle?.height,
|
|
80
|
-
fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
81
|
-
return {
|
|
82
|
-
...fontStyle,
|
|
83
|
-
lineHeight: buttonHeight ? extras.tokens.size[buttonHeight] : void 0
|
|
84
|
-
};
|
|
43
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
+
var import_compose_refs = require("@tamagui/compose-refs");
|
|
45
|
+
var import_constants = require("@tamagui/constants");
|
|
46
|
+
var import_create_context = require("@tamagui/create-context");
|
|
47
|
+
var import_focusable = require("@tamagui/focusable");
|
|
48
|
+
var import_get_button_sized = require("@tamagui/get-button-sized");
|
|
49
|
+
var import_get_font_sized = require("@tamagui/get-font-sized");
|
|
50
|
+
var import_text = require("@tamagui/text");
|
|
51
|
+
var import_web = require("@tamagui/web");
|
|
52
|
+
var React = __toESM(require("react"), 1);
|
|
53
|
+
var NAME = "Label";
|
|
54
|
+
var [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
|
|
55
|
+
id: void 0,
|
|
56
|
+
controlRef: {
|
|
57
|
+
current: null
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
var LabelFrame = (0, import_web.styled)(import_text.SizableText, {
|
|
61
|
+
name: "Label",
|
|
62
|
+
render: "label",
|
|
63
|
+
variants: {
|
|
64
|
+
unstyled: {
|
|
65
|
+
false: {
|
|
66
|
+
size: "$true",
|
|
67
|
+
color: "$color",
|
|
68
|
+
backgroundColor: "transparent",
|
|
69
|
+
display: "flex",
|
|
70
|
+
alignItems: "center",
|
|
71
|
+
userSelect: "none",
|
|
72
|
+
cursor: "default",
|
|
73
|
+
pressStyle: {
|
|
74
|
+
color: "$colorPress"
|
|
85
75
|
}
|
|
86
76
|
}
|
|
87
77
|
},
|
|
88
|
-
|
|
89
|
-
|
|
78
|
+
size: {
|
|
79
|
+
"...size": function (val, extras) {
|
|
80
|
+
var buttonStyle = (0, import_get_button_sized.getButtonSized)(val, extras);
|
|
81
|
+
var buttonHeight = buttonStyle === null || buttonStyle === void 0 ? void 0 : buttonStyle.height;
|
|
82
|
+
var fontStyle = (0, import_get_font_sized.getFontSized)(val, extras);
|
|
83
|
+
return {
|
|
84
|
+
...fontStyle,
|
|
85
|
+
lineHeight: buttonHeight ? extras.tokens.size[buttonHeight] : void 0
|
|
86
|
+
};
|
|
87
|
+
}
|
|
90
88
|
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
89
|
+
},
|
|
90
|
+
defaultVariants: {
|
|
91
|
+
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
var Label = LabelFrame.styleable(function Label2(props, forwardedRef) {
|
|
95
|
+
var {
|
|
96
|
+
htmlFor,
|
|
97
|
+
id: idProp,
|
|
98
|
+
...labelProps
|
|
99
|
+
} = props;
|
|
100
|
+
var controlRef = React.useRef(null);
|
|
101
|
+
var ref = React.useRef(null);
|
|
102
|
+
var composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref);
|
|
103
|
+
var backupId = React.useId();
|
|
104
|
+
var id = idProp !== null && idProp !== void 0 ? idProp : backupId;
|
|
105
|
+
if (import_constants.isWeb) {
|
|
106
|
+
React.useEffect(function () {
|
|
104
107
|
if (htmlFor) {
|
|
105
|
-
var element = document.getElementById(htmlFor)
|
|
106
|
-
|
|
108
|
+
var element = document.getElementById(htmlFor);
|
|
109
|
+
var label = ref.current;
|
|
107
110
|
if (label && element) {
|
|
108
111
|
var getAriaLabel = function () {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
112
|
+
return element.getAttribute("aria-labelledby");
|
|
113
|
+
};
|
|
114
|
+
var ariaLabelledBy = [id, getAriaLabel()].filter(Boolean).join(" ");
|
|
115
|
+
element.setAttribute("aria-labelledby", ariaLabelledBy);
|
|
116
|
+
controlRef.current = element;
|
|
117
|
+
return function () {
|
|
113
118
|
var _getAriaLabel;
|
|
114
|
-
if (id)
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
if (!id) return;
|
|
120
|
+
var ariaLabelledBy2 = (_getAriaLabel = getAriaLabel()) === null || _getAriaLabel === void 0 ? void 0 : _getAriaLabel.replace(id, "");
|
|
121
|
+
if (ariaLabelledBy2 === "") {
|
|
122
|
+
element.removeAttribute("aria-labelledby");
|
|
123
|
+
} else if (ariaLabelledBy2) {
|
|
124
|
+
element.setAttribute("aria-labelledby", ariaLabelledBy2);
|
|
117
125
|
}
|
|
118
126
|
};
|
|
119
127
|
}
|
|
120
128
|
}
|
|
121
|
-
}, [id, htmlFor])
|
|
129
|
+
}, [id, htmlFor]);
|
|
130
|
+
}
|
|
131
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(LabelProvider, {
|
|
132
|
+
id,
|
|
133
|
+
controlRef,
|
|
134
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(LabelFrame, {
|
|
122
135
|
id,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
(_props_onMouseDown = props.onMouseDown) === null || _props_onMouseDown === void 0 || _props_onMouseDown.call(props, event), !event.defaultPrevented && event.detail > 1 && event.preventDefault();
|
|
133
|
-
},
|
|
134
|
-
onPress: function (event) {
|
|
135
|
-
var _props_onPress;
|
|
136
|
-
if ((_props_onPress = props.onPress) === null || _props_onPress === void 0 || _props_onPress.call(props, event), import_constants.isWeb) {
|
|
137
|
-
if (htmlFor || !controlRef.current || event.defaultPrevented) return;
|
|
138
|
-
var isClickingControl = controlRef.current.contains(event.target),
|
|
139
|
-
isUserClick = event.isTrusted === !0;
|
|
140
|
-
!isClickingControl && isUserClick && (controlRef.current.click(), controlRef.current.focus());
|
|
141
|
-
} else props.htmlFor && (0, import_focusable.focusFocusable)(props.htmlFor);
|
|
136
|
+
// @ts-ignore
|
|
137
|
+
htmlFor,
|
|
138
|
+
...labelProps,
|
|
139
|
+
ref: composedRefs,
|
|
140
|
+
onMouseDown: function (event) {
|
|
141
|
+
var _props_onMouseDown;
|
|
142
|
+
(_props_onMouseDown = props.onMouseDown) === null || _props_onMouseDown === void 0 ? void 0 : _props_onMouseDown.call(props, event);
|
|
143
|
+
if (!event.defaultPrevented && event.detail > 1) {
|
|
144
|
+
event.preventDefault();
|
|
142
145
|
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
146
|
+
},
|
|
147
|
+
onPress: function (event) {
|
|
148
|
+
var _props_onPress;
|
|
149
|
+
(_props_onPress = props.onPress) === null || _props_onPress === void 0 ? void 0 : _props_onPress.call(props, event);
|
|
150
|
+
if (import_constants.isWeb) {
|
|
151
|
+
if (htmlFor || !controlRef.current || event.defaultPrevented) return;
|
|
152
|
+
var isClickingControl = controlRef.current.contains(event.target);
|
|
153
|
+
var isUserClick = event.isTrusted === true;
|
|
154
|
+
if (!isClickingControl && isUserClick) {
|
|
155
|
+
controlRef.current.click();
|
|
156
|
+
controlRef.current.focus();
|
|
157
|
+
}
|
|
158
|
+
} else {
|
|
159
|
+
if (props.htmlFor) {
|
|
160
|
+
(0, import_focusable.focusFocusable)(props.htmlFor);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
})
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
var useLabelContext = function (element) {
|
|
168
|
+
var context = useLabelContextImpl("LabelConsumer");
|
|
169
|
+
var {
|
|
170
|
+
controlRef
|
|
171
|
+
} = context;
|
|
172
|
+
React.useEffect(function () {
|
|
173
|
+
if (element) controlRef.current = element;
|
|
174
|
+
}, [element, controlRef]);
|
|
175
|
+
return context.id;
|
|
176
|
+
};
|
|
155
177
|
//# sourceMappingURL=Label.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","Label_exports","Label","LabelFrame","useLabelContext","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_create_context","import_focusable","import_get_button_sized","import_get_font_sized","import_text","import_web","React","NAME","LabelProvider","useLabelContextImpl","createContext","id","controlRef","current","styled","SizableText","render","variants","unstyled","false","size","color","backgroundColor","display","alignItems","userSelect","cursor","pressStyle","...size","val","extras","buttonStyle","getButtonSized","buttonHeight","height","fontStyle","getFontSized","lineHeight","tokens","defaultVariants","process","env","TAMAGUI_HEADLESS","styleable","props","forwardedRef","htmlFor","idProp","labelProps","useRef","ref","composedRefs","useComposedRefs","backupId","useId","isWeb","useEffect","element","document","getElementById","label","getAriaLabel","getAttribute","ariaLabelledBy","filter","Boolean","join","setAttribute","_getAriaLabel","ariaLabelledBy2","replace","removeAttribute"],"sources":["../../src/Label.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,QAAS,GAAAC,MAAA,CAAaC,MAAA;AACtB,IAAAC,SAAS,GAAAF,MAAA,CAAAG,cAAqB;AAC9B,IAAAC,gBAAS,GAAAJ,MAAA,CAAAK,wBAAsB;AAC/B,IAAAC,iBAAS,GAAAN,MAAA,CAAsBO,mBAAA;AAC/B,IAAAC,YAAS,GAAAR,MAAA,CAAAS,cAAoB;
|
|
1
|
+
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","Label_exports","Label","LabelFrame","useLabelContext","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_create_context","import_focusable","import_get_button_sized","import_get_font_sized","import_text","import_web","React","NAME","LabelProvider","useLabelContextImpl","createContext","id","controlRef","current","styled","SizableText","render","variants","unstyled","false","size","color","backgroundColor","display","alignItems","userSelect","cursor","pressStyle","...size","val","extras","buttonStyle","getButtonSized","buttonHeight","height","fontStyle","getFontSized","lineHeight","tokens","defaultVariants","process","env","TAMAGUI_HEADLESS","styleable","Label2","props","forwardedRef","htmlFor","idProp","labelProps","useRef","ref","composedRefs","useComposedRefs","backupId","useId","isWeb","useEffect","element","document","getElementById","label","getAriaLabel","getAttribute","ariaLabelledBy","filter","Boolean","join","setAttribute","_getAriaLabel","ariaLabelledBy2","replace","removeAttribute"],"sources":["../../src/Label.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,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AAA,CAAAK,YAAqB,kBAAa;UACrC;UACA,IAAAC,cAAW,GAAQ,CACrBrD,EAAA,EACFmD,YAAO,GACL,CAAAG,MAAI,CAAAC,OAAM,EAAAC,IAAS;UACjBT,OAAA,CAAAU,YAAe,kBAAa,EAAAJ,cAAA;UAC9BpD,UAAA,CAAAC,OAAA,GAAA6C,OAAA;UACF;YACF,IAAAW,aAAA;YAAA,KAAA1D,EAAA;YAEJ,IAAA2D,eAAA,IAAAD,aAAA,GAAAP,YAAA,gBAAAO,aAAA,uBAAAA,aAAA,CAAAE,OAAA,CAAA5D,EAAA;YAEH,IAAA2D,eAAA;cAEYZ,OAAA,CAAAc,eAAoD;YACzD,OAAU,IAAAF,eAAoB;cAC5BZ,OAAW,CAAAU,YAAI,oBAAAE,eAAA;YAEjB;UACA;QACF;MAEJ;IACF,I","ignoreList":[]}
|
package/dist/jsx/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./Label";
|
|
1
|
+
export * from "./Label.mjs";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/jsx/index.js.map
CHANGED
package/dist/jsx/index.native.js
CHANGED
|
@@ -5,15 +5,17 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
9
10
|
get: () => from[key],
|
|
10
11
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
12
|
});
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
17
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
-
value:
|
|
18
|
+
value: true
|
|
17
19
|
}), mod);
|
|
18
20
|
var index_exports = {};
|
|
19
21
|
module.exports = __toCommonJS(index_exports);
|