@audira/carbon-react-native 1.0.0-beta.3 → 1.0.0-beta.4
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/lib/commonjs/_internal/style-sheets/common-style-sheet.js +3 -0
- package/lib/commonjs/_internal/style-sheets/common-style-sheet.js.map +1 -1
- package/lib/commonjs/components/accordion/Accordion.js.map +1 -1
- package/lib/commonjs/components/accordion/_Header.js +24 -22
- package/lib/commonjs/components/accordion/_Header.js.map +1 -1
- package/lib/commonjs/components/accordion/_Item.js +8 -4
- package/lib/commonjs/components/accordion/_Item.js.map +1 -1
- package/lib/commonjs/components/accordion/_styles.js +3 -3
- package/lib/commonjs/components/accordion/_styles.js.map +1 -1
- package/lib/commonjs/components/button/base/Base.js +24 -48
- package/lib/commonjs/components/button/base/Base.js.map +1 -1
- package/lib/commonjs/components/button/ghost/Ghost.js +24 -22
- package/lib/commonjs/components/button/ghost/Ghost.js.map +1 -1
- package/lib/commonjs/components/button/ghost-danger/GhostDanger.js +24 -22
- package/lib/commonjs/components/button/ghost-danger/GhostDanger.js.map +1 -1
- package/lib/commonjs/components/button/ghost-icon/GhostIcon.js +21 -30
- package/lib/commonjs/components/button/ghost-icon/GhostIcon.js.map +1 -1
- package/lib/commonjs/components/button/primary/Primary.js +24 -22
- package/lib/commonjs/components/button/primary/Primary.js.map +1 -1
- package/lib/commonjs/components/button/primary-danger/PrimaryDanger.js +24 -22
- package/lib/commonjs/components/button/primary-danger/PrimaryDanger.js.map +1 -1
- package/lib/commonjs/components/button/secondary/Secondary.js +24 -22
- package/lib/commonjs/components/button/secondary/Secondary.js.map +1 -1
- package/lib/commonjs/components/button/tertiary/Tertiary.js +24 -22
- package/lib/commonjs/components/button/tertiary/Tertiary.js.map +1 -1
- package/lib/commonjs/components/button/tertiary-danger/TertiaryDanger.js +24 -22
- package/lib/commonjs/components/button/tertiary-danger/TertiaryDanger.js.map +1 -1
- package/lib/commonjs/components/button-group/ButtonGroup.js +9 -12
- package/lib/commonjs/components/button-group/ButtonGroup.js.map +1 -1
- package/lib/commonjs/components/checkbox/Checkbox.js +23 -19
- package/lib/commonjs/components/checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/components/checkbox-group/CheckboxGroup.js +16 -12
- package/lib/commonjs/components/checkbox-group/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/form-helper-text/FormHelperText.js +14 -10
- package/lib/commonjs/components/form-helper-text/FormHelperText.js.map +1 -1
- package/lib/commonjs/components/form-label/FormLabel.js +8 -4
- package/lib/commonjs/components/form-label/FormLabel.js.map +1 -1
- package/lib/commonjs/components/inline-loading/InlineLoading.js +15 -11
- package/lib/commonjs/components/inline-loading/InlineLoading.js.map +1 -1
- package/lib/commonjs/components/modal/Modal.js +31 -23
- package/lib/commonjs/components/modal/Modal.js.map +1 -1
- package/lib/commonjs/components/modal-content/ModalContent.js +49 -45
- package/lib/commonjs/components/modal-content/ModalContent.js.map +1 -1
- package/lib/commonjs/components/notification/base/Base.js +46 -50
- package/lib/commonjs/components/notification/base/Base.js.map +1 -1
- package/lib/commonjs/components/radio-button/RadioButton.js +22 -18
- package/lib/commonjs/components/radio-button/RadioButton.js.map +1 -1
- package/lib/commonjs/components/switch/Switch.js +26 -17
- package/lib/commonjs/components/switch/Switch.js.map +1 -1
- package/lib/commonjs/components/text/Text.js +41 -27
- package/lib/commonjs/components/text/Text.js.map +1 -1
- package/lib/commonjs/components/text/index.js.map +1 -1
- package/lib/commonjs/components/text-area/TextArea.js +1 -1
- package/lib/commonjs/components/text-area/TextArea.js.map +1 -1
- package/lib/commonjs/components/text-input/TextInput.js +1 -1
- package/lib/commonjs/components/text-input/TextInput.js.map +1 -1
- package/lib/commonjs/components/text-input-field/_rn-text-input/RNTextInput.js +10 -3
- package/lib/commonjs/components/text-input-field/_rn-text-input/RNTextInput.js.map +1 -1
- package/lib/commonjs/components/toggle/base/Base.js +28 -14
- package/lib/commonjs/components/toggle/base/Base.js.map +1 -1
- package/lib/module/_internal/style-sheets/common-style-sheet.js +3 -0
- package/lib/module/_internal/style-sheets/common-style-sheet.js.map +1 -1
- package/lib/module/components/accordion/Accordion.js.map +1 -1
- package/lib/module/components/accordion/_Header.js +24 -22
- package/lib/module/components/accordion/_Header.js.map +1 -1
- package/lib/module/components/accordion/_Item.js +6 -2
- package/lib/module/components/accordion/_Item.js.map +1 -1
- package/lib/module/components/accordion/_styles.js +3 -3
- package/lib/module/components/accordion/_styles.js.map +1 -1
- package/lib/module/components/button/base/Base.js +24 -48
- package/lib/module/components/button/base/Base.js.map +1 -1
- package/lib/module/components/button/ghost/Ghost.js +24 -22
- package/lib/module/components/button/ghost/Ghost.js.map +1 -1
- package/lib/module/components/button/ghost-danger/GhostDanger.js +24 -22
- package/lib/module/components/button/ghost-danger/GhostDanger.js.map +1 -1
- package/lib/module/components/button/ghost-icon/GhostIcon.js +21 -30
- package/lib/module/components/button/ghost-icon/GhostIcon.js.map +1 -1
- package/lib/module/components/button/primary/Primary.js +24 -22
- package/lib/module/components/button/primary/Primary.js.map +1 -1
- package/lib/module/components/button/primary-danger/PrimaryDanger.js +24 -22
- package/lib/module/components/button/primary-danger/PrimaryDanger.js.map +1 -1
- package/lib/module/components/button/secondary/Secondary.js +24 -22
- package/lib/module/components/button/secondary/Secondary.js.map +1 -1
- package/lib/module/components/button/tertiary/Tertiary.js +24 -22
- package/lib/module/components/button/tertiary/Tertiary.js.map +1 -1
- package/lib/module/components/button/tertiary-danger/TertiaryDanger.js +24 -22
- package/lib/module/components/button/tertiary-danger/TertiaryDanger.js.map +1 -1
- package/lib/module/components/button-group/ButtonGroup.js +10 -13
- package/lib/module/components/button-group/ButtonGroup.js.map +1 -1
- package/lib/module/components/checkbox/Checkbox.js +7 -3
- package/lib/module/components/checkbox/Checkbox.js.map +1 -1
- package/lib/module/components/checkbox-group/CheckboxGroup.js +6 -2
- package/lib/module/components/checkbox-group/CheckboxGroup.js.map +1 -1
- package/lib/module/components/form-helper-text/FormHelperText.js +6 -2
- package/lib/module/components/form-helper-text/FormHelperText.js.map +1 -1
- package/lib/module/components/form-label/FormLabel.js +7 -3
- package/lib/module/components/form-label/FormLabel.js.map +1 -1
- package/lib/module/components/inline-loading/InlineLoading.js +7 -3
- package/lib/module/components/inline-loading/InlineLoading.js.map +1 -1
- package/lib/module/components/modal/Modal.js +32 -24
- package/lib/module/components/modal/Modal.js.map +1 -1
- package/lib/module/components/modal-content/ModalContent.js +48 -44
- package/lib/module/components/modal-content/ModalContent.js.map +1 -1
- package/lib/module/components/notification/base/Base.js +34 -38
- package/lib/module/components/notification/base/Base.js.map +1 -1
- package/lib/module/components/radio-button/RadioButton.js +6 -2
- package/lib/module/components/radio-button/RadioButton.js.map +1 -1
- package/lib/module/components/switch/Switch.js +16 -7
- package/lib/module/components/switch/Switch.js.map +1 -1
- package/lib/module/components/text/Text.js +36 -22
- package/lib/module/components/text/Text.js.map +1 -1
- package/lib/module/components/text/index.js.map +1 -1
- package/lib/module/components/text-area/TextArea.js +1 -1
- package/lib/module/components/text-area/TextArea.js.map +1 -1
- package/lib/module/components/text-input/TextInput.js +1 -1
- package/lib/module/components/text-input/TextInput.js.map +1 -1
- package/lib/module/components/text-input-field/_rn-text-input/RNTextInput.js +9 -2
- package/lib/module/components/text-input-field/_rn-text-input/RNTextInput.js.map +1 -1
- package/lib/module/components/toggle/base/Base.js +17 -3
- package/lib/module/components/toggle/base/Base.js.map +1 -1
- package/lib/typescript/commonjs/_internal/style-sheets/common-style-sheet.d.ts +5 -2
- package/lib/typescript/commonjs/_internal/style-sheets/common-style-sheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/_internal/style-sheets/text-style-sheet.d.ts +14 -14
- package/lib/typescript/commonjs/components/accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/accordion/_Item.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/accordion/_styles.d.ts +3 -3
- package/lib/typescript/commonjs/components/button/base/Base.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/checkbox-group/CheckboxGroup.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/form-helper-text/FormHelperText.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/form-label/FormLabel.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/inline-loading/InlineLoading.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/modal/Modal.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/modal-content/ModalContent.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/notification/base/Base.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/radio-button/RadioButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/switch/Switch.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/text/Text.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/text/TextProps.d.ts +5 -1
- package/lib/typescript/commonjs/components/text/TextProps.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/text/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/text-input-field/_rn-text-input/RNTextInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/toggle/base/Base.d.ts.map +1 -1
- package/lib/typescript/module/_internal/style-sheets/common-style-sheet.d.ts +5 -2
- package/lib/typescript/module/_internal/style-sheets/common-style-sheet.d.ts.map +1 -1
- package/lib/typescript/module/_internal/style-sheets/text-style-sheet.d.ts +14 -14
- package/lib/typescript/module/components/accordion/Accordion.d.ts.map +1 -1
- package/lib/typescript/module/components/accordion/_Item.d.ts.map +1 -1
- package/lib/typescript/module/components/accordion/_styles.d.ts +3 -3
- package/lib/typescript/module/components/button/base/Base.d.ts.map +1 -1
- package/lib/typescript/module/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/lib/typescript/module/components/checkbox/Checkbox.d.ts.map +1 -1
- package/lib/typescript/module/components/checkbox-group/CheckboxGroup.d.ts.map +1 -1
- package/lib/typescript/module/components/form-helper-text/FormHelperText.d.ts.map +1 -1
- package/lib/typescript/module/components/form-label/FormLabel.d.ts.map +1 -1
- package/lib/typescript/module/components/inline-loading/InlineLoading.d.ts.map +1 -1
- package/lib/typescript/module/components/modal/Modal.d.ts.map +1 -1
- package/lib/typescript/module/components/modal-content/ModalContent.d.ts.map +1 -1
- package/lib/typescript/module/components/notification/base/Base.d.ts.map +1 -1
- package/lib/typescript/module/components/radio-button/RadioButton.d.ts.map +1 -1
- package/lib/typescript/module/components/switch/Switch.d.ts.map +1 -1
- package/lib/typescript/module/components/text/Text.d.ts.map +1 -1
- package/lib/typescript/module/components/text/TextProps.d.ts +5 -1
- package/lib/typescript/module/components/text/TextProps.d.ts.map +1 -1
- package/lib/typescript/module/components/text/index.d.ts.map +1 -1
- package/lib/typescript/module/components/text-input-field/_rn-text-input/RNTextInput.d.ts.map +1 -1
- package/lib/typescript/module/components/toggle/base/Base.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -22,18 +22,18 @@ const TertiaryDanger = exports.TertiaryDanger = /*#__PURE__*/(0, _react.forwardR
|
|
|
22
22
|
android_rippleEffectColor: mapAndroidRippleEffectColor[themeContext.colorScheme],
|
|
23
23
|
colorStateStyle: {
|
|
24
24
|
background: {
|
|
25
|
-
default:
|
|
26
|
-
focused:
|
|
27
|
-
hovered:
|
|
28
|
-
pressed:
|
|
29
|
-
disabled:
|
|
25
|
+
default: backgroundStyleSheet.default,
|
|
26
|
+
focused: backgroundStyleSheet.focused,
|
|
27
|
+
hovered: backgroundStyleSheet.hovered,
|
|
28
|
+
pressed: backgroundStyleSheet.pressed,
|
|
29
|
+
disabled: backgroundStyleSheet.disabled
|
|
30
30
|
},
|
|
31
31
|
text: {
|
|
32
|
-
default:
|
|
33
|
-
focused:
|
|
34
|
-
hovered:
|
|
35
|
-
pressed:
|
|
36
|
-
disabled:
|
|
32
|
+
default: textStyleSheet.default,
|
|
33
|
+
focused: textStyleSheet.focused,
|
|
34
|
+
hovered: textStyleSheet.hovered,
|
|
35
|
+
pressed: textStyleSheet.pressed,
|
|
36
|
+
disabled: textStyleSheet.disabled
|
|
37
37
|
},
|
|
38
38
|
icon: mapIconColor[themeContext.colorScheme]
|
|
39
39
|
},
|
|
@@ -45,40 +45,42 @@ const baseStyle = _reactNative.StyleSheet.create({
|
|
|
45
45
|
borderWidth: 1
|
|
46
46
|
}
|
|
47
47
|
}),
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
backgroundStyleSheet = _index.CarbonStyleSheet.create({
|
|
49
|
+
default: {
|
|
50
50
|
backgroundColor: 'transparent',
|
|
51
51
|
borderColor: _index.CarbonStyleSheet.color.button_danger_secondary
|
|
52
52
|
},
|
|
53
|
-
|
|
53
|
+
focused: {
|
|
54
54
|
backgroundColor: 'transparent',
|
|
55
55
|
borderColor: _index.CarbonStyleSheet.color.focus
|
|
56
56
|
},
|
|
57
|
-
|
|
57
|
+
hovered: {
|
|
58
58
|
backgroundColor: _index.CarbonStyleSheet.color.button_danger_hover,
|
|
59
59
|
borderColor: _index.CarbonStyleSheet.color.button_danger_hover
|
|
60
60
|
},
|
|
61
|
-
|
|
61
|
+
pressed: {
|
|
62
62
|
backgroundColor: _index.CarbonStyleSheet.color.button_danger_active,
|
|
63
63
|
borderColor: _index.CarbonStyleSheet.color.button_danger_active
|
|
64
64
|
},
|
|
65
|
-
|
|
65
|
+
disabled: {
|
|
66
66
|
backgroundColor: 'transparent',
|
|
67
67
|
borderColor: _index.CarbonStyleSheet.color.button_disabled
|
|
68
|
-
}
|
|
69
|
-
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
textStyleSheet = _index.CarbonStyleSheet.create({
|
|
71
|
+
default: {
|
|
70
72
|
color: _index.CarbonStyleSheet.color.button_danger_secondary
|
|
71
73
|
},
|
|
72
|
-
|
|
74
|
+
focused: {
|
|
73
75
|
color: _index.CarbonStyleSheet.color.button_danger_secondary
|
|
74
76
|
},
|
|
75
|
-
|
|
77
|
+
hovered: {
|
|
76
78
|
color: _index.CarbonStyleSheet.color.text_on_color
|
|
77
79
|
},
|
|
78
|
-
|
|
80
|
+
pressed: {
|
|
79
81
|
color: _index.CarbonStyleSheet.color.text_on_color
|
|
80
82
|
},
|
|
81
|
-
|
|
83
|
+
disabled: {
|
|
82
84
|
color: _index.CarbonStyleSheet.color.text_disabled
|
|
83
85
|
}
|
|
84
86
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_index","_index2","_index3","_jsxRuntime","TertiaryDanger","exports","forwardRef","style","props","ref","themeContext","useContext","ThemeContext","jsx","BaseColor","android_rippleEffectColor","mapAndroidRippleEffectColor","colorScheme","colorStateStyle","background","default","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_index","_index2","_index3","_jsxRuntime","TertiaryDanger","exports","forwardRef","style","props","ref","themeContext","useContext","ThemeContext","jsx","BaseColor","android_rippleEffectColor","mapAndroidRippleEffectColor","colorScheme","colorStateStyle","background","default","backgroundStyleSheet","focused","hovered","pressed","disabled","text","textStyleSheet","icon","mapIconColor","baseStyle","tertiaryDanger","StyleSheet","create","borderWidth","CarbonStyleSheet","backgroundColor","borderColor","color","button_danger_secondary","focus","button_danger_hover","button_danger_active","button_disabled","text_on_color","text_disabled","gray_10","Color","Token","icon_on_color","icon_disabled","gray_100"],"sourceRoot":"../../../../../src","sources":["components/button/tertiary-danger/TertiaryDanger.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,0BAAA,GAAAF,OAAA;AAIA,IAAAG,MAAA,GAAAH,OAAA;AAIA,IAAAI,OAAA,GAAAJ,OAAA;AAIA,IAAAK,OAAA,GAAAL,OAAA;AAIsB,IAAAM,WAAA,GAAAN,OAAA;AAUf,MAAMO,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,iBAAU,EACvC,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AK,CAACC,KAAK,CAACF,OAAO,CAACI;IAC/B,CAAC;IACDC,QAAQ,EAAE;MACT/B,OAAO,EAAE2B,gCAAK,CAACC,KAAK,CAACG,QAAQ,CAACZ,uBAAuB;MACrDjB,OAAO,EAAEyB,gCAAK,CAACC,KAAK,CAACG,QAAQ,CAACZ,uBAAuB;MACrDhB,OAAO,EAAEwB,gCAAK,CAACC,KAAK,CAACG,QAAQ,CAACF,aAAa;MAC3CzB,OAAO,EAAEuB,gCAAK,CAACC,KAAK,CAACG,QAAQ,CAACF,aAAa;MAC3CxB,QAAQ,EAAEsB,gCAAK,CAACC,KAAK,CAACG,QAAQ,CAACD;IAChC;EACD,CAAC;EAEFlC,2BAAwE,GACvE;IACC8B,OAAO,EAAEC,gCAAK,CAACC,KAAK,CAACF,OAAO,CAACJ,oBAAoB;IACjDS,QAAQ,EAAEJ,gCAAK,CAACC,KAAK,CAACG,QAAQ,CAACT;EAChC,CAAC","ignoreList":[]}
|
|
@@ -19,11 +19,13 @@ const ButtonGroup = exports.ButtonGroup = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
19
19
|
fluid,
|
|
20
20
|
vertical,
|
|
21
21
|
style,
|
|
22
|
+
dir,
|
|
22
23
|
...props
|
|
23
24
|
}, ref) {
|
|
24
25
|
const globalConfigContext = (0, _react.useContext)(_index.GlobalConfigContext),
|
|
25
|
-
styleFlexDir = mapStyleFlexDir[`${!!vertical}`]
|
|
26
|
-
styleFluid = mapStyleFluid[`${!!fluid}`]
|
|
26
|
+
styleFlexDir = mapStyleFlexDir[`${!!vertical}`],
|
|
27
|
+
styleFluid = mapStyleFluid[`${!!fluid}`],
|
|
28
|
+
rtlStyle = globalConfigContext.rtl && !vertical ? _index2.CommonStyleSheet.rtl : undefined;
|
|
27
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.ButtonGroupContext.Provider, {
|
|
28
30
|
value: {
|
|
29
31
|
size,
|
|
@@ -33,7 +35,8 @@ const ButtonGroup = exports.ButtonGroup = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
33
35
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
34
36
|
ref: ref,
|
|
35
37
|
...props,
|
|
36
|
-
|
|
38
|
+
dir: dir ?? globalConfigContext.rtl ? 'rtl' : undefined,
|
|
39
|
+
style: [styleFlexDir, styleFluid, oneAlone ? _index2.FlexStyleSheet.justify_between : undefined, rtlStyle, style],
|
|
37
40
|
children: !oneAlone || vertical ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
38
41
|
children: [button1, button2, button3]
|
|
39
42
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -41,7 +44,7 @@ const ButtonGroup = exports.ButtonGroup = /*#__PURE__*/(0, _react.forwardRef)(fu
|
|
|
41
44
|
style: [styleSheet.firstButtonContainer],
|
|
42
45
|
children: button1
|
|
43
46
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
44
|
-
style: [styleFlexDir, styleFluid, styleSheet.lastTwoButttonContainer, _index2.FlexStyleSheet.justify_end],
|
|
47
|
+
style: [styleFlexDir, styleFluid, styleSheet.lastTwoButttonContainer, _index2.FlexStyleSheet.justify_end, rtlStyle],
|
|
45
48
|
children: [button2, button3]
|
|
46
49
|
})]
|
|
47
50
|
})
|
|
@@ -63,14 +66,8 @@ const styleSheet = _reactNative.StyleSheet.create({
|
|
|
63
66
|
}
|
|
64
67
|
}),
|
|
65
68
|
mapStyleFlexDir = {
|
|
66
|
-
false:
|
|
67
|
-
|
|
68
|
-
true: _index2.FlexStyleSheet.flex_row_reverse
|
|
69
|
-
},
|
|
70
|
-
true: {
|
|
71
|
-
false: _index2.FlexStyleSheet.flex_col_reverse,
|
|
72
|
-
true: _index2.FlexStyleSheet.flex_col_reverse
|
|
73
|
-
}
|
|
69
|
+
false: _index2.FlexStyleSheet.flex_row,
|
|
70
|
+
true: _index2.FlexStyleSheet.flex_col_reverse
|
|
74
71
|
},
|
|
75
72
|
mapStyleFluid = {
|
|
76
73
|
false: styleSheet.fixedGroup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_index","_index2","_jsxRuntime","ButtonGroup","exports","forwardRef","button1","button2","button3","oneAlone","size","fluid","vertical","style","props","ref","globalConfigContext","useContext","GlobalConfigContext","styleFlexDir","mapStyleFlexDir","rtl","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_index","_index2","_jsxRuntime","ButtonGroup","exports","forwardRef","button1","button2","button3","oneAlone","size","fluid","vertical","style","dir","props","ref","globalConfigContext","useContext","GlobalConfigContext","styleFlexDir","mapStyleFlexDir","styleFluid","mapStyleFluid","rtlStyle","rtl","CommonStyleSheet","undefined","jsx","ButtonGroupContext","Provider","value","children","View","FlexStyleSheet","justify_between","jsxs","Fragment","styleSheet","firstButtonContainer","lastTwoButttonContainer","justify_end","StyleSheet","create","fixedGroup","gap","Spacing","spacing_05","fluidGroup","width","false","flex_row","true","flex_col_reverse"],"sourceRoot":"../../../../src","sources":["components/button-group/ButtonGroup.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,0BAAA,GAAAF,OAAA;AAIA,IAAAG,MAAA,GAAAH,OAAA;AAKA,IAAAI,OAAA,GAAAJ,OAAA;AAGqC,IAAAK,WAAA,GAAAL,OAAA;AAU9B,MAAMM,WAAW,GAAAC,OAAA,CAAAD,WAAA,gBAAG,IAAAE,iBAAU,EACpC,SAASF,WAAWA,CACnB;EACCG,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC,QAAQ;EACRC,IAAI,GAAG,kBAAkB;EACzBC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,GAAG;EACH,GAAGC;AACJ,CAAC,EACDC,GAAG,EACF;E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EAACtC,YAAA,CAAAmC,IAAI;UACJpB,KAAK,EAAG,CACPO,YAAY,EACZE,UAAU,EACVgB,UAAU,CAACE,uBAAuB,EAClCN,sBAAc,CAACO,WAAW,EAC1BjB,QAAQ,CACN;UAAAQ,QAAA,GAEDzB,OAAO,EACPC,OAAO;QAAA,CACJ,CAAC;MAAA,CACN;IAAE,CACC;EAAC,CACqB,CAAC;AAGhC,CACD,CAAC;AAED,MACC8B,UAAU,GACTI,uBAAU,CAACC,MAAM,CAAC;IACjBC,UAAU,EAAE;MACXC,GAAG,EAAEC,kCAAO,CAACC;IACd,CAAC;IACDC,UAAU,EAAE;MACXH,GAAG,EAAE;IACN,CAAC;IACDN,oBAAoB,EAAE;MACrBU,KAAK,EAAE;IACR,CAAC;IACDT,uBAAuB,EAAE;MACxBS,KAAK,EAAE;IACR;EACD,CAAC,CAAC;EAEH5B,eAEC,GACA;IACC6B,KAAK,EAAEhB,sBAAc,CAACiB,QAAQ;IAC9BC,IAAI,EAAElB,sBAAc,CAACmB;EACtB,CAAC;EAEF9B,aAAuD,GACtD;IACC2B,KAAK,EAAEZ,UAAU,CAACM,UAAU;IAC5BQ,IAAI,EAAEd,UAAU,CAACU;EAClB,CAAC","ignoreList":[]}
|
|
@@ -7,11 +7,12 @@ exports.Checkbox = void 0;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _carbonReactNativeElements = require("@audira/carbon-react-native-elements");
|
|
10
|
-
var _index = require("../../_internal/
|
|
11
|
-
var _index2 = require("../../
|
|
12
|
-
var _index3 = require("../../
|
|
13
|
-
var _index4 = require("
|
|
14
|
-
var _index5 = require("../
|
|
10
|
+
var _index = require("../../_internal/contexts/index.js");
|
|
11
|
+
var _index2 = require("../../_internal/style-sheets/index.js");
|
|
12
|
+
var _index3 = require("../../carbon-style-sheet/index.js");
|
|
13
|
+
var _index4 = require("../../contexts/index.js");
|
|
14
|
+
var _index5 = require("../checkbox-input/index.js");
|
|
15
|
+
var _index6 = require("../form-label/index.js");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
const Checkbox = exports.Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function Checkbox({
|
|
17
18
|
defaultValue,
|
|
@@ -26,10 +27,12 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
26
27
|
formLabelProps,
|
|
27
28
|
pressableProps,
|
|
28
29
|
style,
|
|
30
|
+
dir,
|
|
29
31
|
...props
|
|
30
32
|
}, forwardedRef) {
|
|
31
|
-
(0, _react.useContext)(
|
|
32
|
-
const
|
|
33
|
+
(0, _react.useContext)(_index4.ThemeContext);
|
|
34
|
+
const globalConfigContext = (0, _react.useContext)(_index.GlobalConfigContext),
|
|
35
|
+
checkboxInputRef = (0, _react.useRef)(null),
|
|
33
36
|
viewRef = (0, _react.useRef)(null),
|
|
34
37
|
pressHandler = (0, _react.useCallback)(event => {
|
|
35
38
|
onPress?.(event);
|
|
@@ -50,7 +53,8 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
50
53
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
51
54
|
...props,
|
|
52
55
|
"aria-label": ariaLabel || label,
|
|
53
|
-
|
|
56
|
+
dir: dir ?? globalConfigContext.rtl ? 'rtl' : undefined,
|
|
57
|
+
style: [_index2.FlexStyleSheet.flex_row, globalConfigContext.rtl ? _index2.CommonStyleSheet.rtl : undefined, style],
|
|
54
58
|
ref: viewRef,
|
|
55
59
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
56
60
|
...pressableProps,
|
|
@@ -58,8 +62,8 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
58
62
|
disabled: interactiveState === 'disabled',
|
|
59
63
|
"aria-label": pressableProps?.['aria-label'] ?? label,
|
|
60
64
|
onPress: pressHandler,
|
|
61
|
-
style: [
|
|
62
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
65
|
+
style: [_index2.CommonStyleSheet.absolute, _index2.CommonStyleSheet.w_full, _index2.CommonStyleSheet.h_full, baseStyle.pressable, pressableProps?.style]
|
|
66
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index5.CheckboxInput, {
|
|
63
67
|
...checkboxInputProps,
|
|
64
68
|
role: "none",
|
|
65
69
|
defaultValue: defaultValue,
|
|
@@ -69,7 +73,7 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
69
73
|
onPress: onPress,
|
|
70
74
|
style: [baseStyle.checkboxInput, checkboxInputProps?.style],
|
|
71
75
|
ref: checkboxInputRef
|
|
72
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
76
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index6.FormLabel, {
|
|
73
77
|
...formLabelProps,
|
|
74
78
|
label: label,
|
|
75
79
|
textProps: {
|
|
@@ -77,7 +81,7 @@ const Checkbox = exports.Checkbox = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
77
81
|
type: formLabelProps?.textProps?.type || 'body_compact_01',
|
|
78
82
|
style: [textColorStyle[interactiveState], formLabelProps?.textProps?.style]
|
|
79
83
|
},
|
|
80
|
-
style: [
|
|
84
|
+
style: [_index2.FlexStyleSheet.flex_1, baseStyle.label, formLabelProps?.style]
|
|
81
85
|
})]
|
|
82
86
|
});
|
|
83
87
|
});
|
|
@@ -89,24 +93,24 @@ const baseStyle = _reactNative.StyleSheet.create({
|
|
|
89
93
|
zIndex: 2
|
|
90
94
|
},
|
|
91
95
|
label: {
|
|
92
|
-
|
|
96
|
+
marginStart: _carbonReactNativeElements.Spacing.spacing_03
|
|
93
97
|
}
|
|
94
98
|
}),
|
|
95
|
-
textColorStyle =
|
|
99
|
+
textColorStyle = _index3.CarbonStyleSheet.create({
|
|
96
100
|
normal: {
|
|
97
|
-
color:
|
|
101
|
+
color: _index3.CarbonStyleSheet.color.text_primary
|
|
98
102
|
},
|
|
99
103
|
disabled: {
|
|
100
|
-
color:
|
|
104
|
+
color: _index3.CarbonStyleSheet.color.text_disabled
|
|
101
105
|
},
|
|
102
106
|
error: {
|
|
103
|
-
color:
|
|
107
|
+
color: _index3.CarbonStyleSheet.color.text_primary
|
|
104
108
|
},
|
|
105
109
|
read_only: {
|
|
106
|
-
color:
|
|
110
|
+
color: _index3.CarbonStyleSheet.color.text_primary
|
|
107
111
|
},
|
|
108
112
|
warning: {
|
|
109
|
-
color:
|
|
113
|
+
color: _index3.CarbonStyleSheet.color.text_primary
|
|
110
114
|
}
|
|
111
115
|
});
|
|
112
116
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_index","_index2","_index3","_index4","_index5","_jsxRuntime","Checkbox","exports","forwardRef","defaultValue","value","interactiveState","label","role","ariaLabel","onChange","onPress","checkboxInputProps","formLabelProps","pressableProps","style","props","forwardedRef","useContext","ThemeContext","checkboxInputRef","useRef","viewRef","pressHandler","useCallback","event","current","setValue","useImperativeHandle","Object","assign","value_","jsxs","View","FlexStyleSheet","flex_row","ref","children","jsx","Pressable","disabled","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_index","_index2","_index3","_index4","_index5","_index6","_jsxRuntime","Checkbox","exports","forwardRef","defaultValue","value","interactiveState","label","role","ariaLabel","onChange","onPress","checkboxInputProps","formLabelProps","pressableProps","style","dir","props","forwardedRef","useContext","ThemeContext","globalConfigContext","GlobalConfigContext","checkboxInputRef","useRef","viewRef","pressHandler","useCallback","event","current","setValue","useImperativeHandle","Object","assign","value_","jsxs","View","rtl","undefined","FlexStyleSheet","flex_row","CommonStyleSheet","ref","children","jsx","Pressable","disabled","absolute","w_full","h_full","baseStyle","pressable","CheckboxInput","checkboxInput","FormLabel","textProps","type","textColorStyle","flex_1","StyleSheet","create","zIndex","marginStart","Spacing","spacing_03","CarbonStyleSheet","normal","color","text_primary","text_disabled","error","read_only","warning"],"sourceRoot":"../../../../src","sources":["components/checkbox/Checkbox.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAQA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,0BAAA,GAAAF,OAAA;AAIA,IAAAG,MAAA,GAAAH,OAAA;AAIA,IAAAI,OAAA,GAAAJ,OAAA;AAKA,IAAAK,OAAA,GAAAL,OAAA;AAIA,IAAAM,OAAA,GAAAN,OAAA;AAIA,IAAAO,OAAA,GAAAP,OAAA;AAMA,IAAAQ,OAAA,GAAAR,OAAA;AAEsB,IAAAS,WAAA,GAAAT,OAAA;AAef,MAAMU,QAAQ,GAAAC,OAAA,CAAAD,QAAA,gBAAG,IAAAE,iBAAU,EACjC,SAASF,QAAQA,CAChB;EACCG,YAAY;EACZC,KAAK;EACLC,gBAAgB,GAAG,QAAQ;EAC3BC,KAAK;EACLC,IAAI,GAAG,UAAU;EACjB,YAAY,EAAEC,SAAS;EACvBC,QAAQ;EACRC,OAAO;EACPC,kBAAkB;EAClBC,cAAc;EACdC,cAAc;EACdC,KAAK;EACLC,GAAG;EACH,GAAGC;AACJ,CAAC,EACDC,YAAY,EACX;EAED,IAAAC,iBAAU,EAACC,oBAAY,CAAC;EAExB,MACCC,mBAAmB,GAClB,IAAAF,iBAAU,EAACG,0BAAmB,CAAC;IAEhCC,gBAAgB,GACf,IAAAC,aAAM,EAAmB,IAAI,CAAC;IAE/BC,OAAO,GACN,IAAAD,aAAM,EAAO,IAAI,CAAC;IAEnBE,YAAoD,GACnD,IAAAC,kBAAW,EAACC,KAAK,IAAI;MACpBjB,OAAO,GAAGiB,KAAK,CAAC;MAChB,IAAGL,gBAAgB,CAACM,OAAO,EAAE;QAC5BN,gBAAgB,CAACM,OAAO,CAACC,QAAQ,CAChCP,gBAAgB,CAACM,OAAO,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AgB,CAACE,KAAK,CAACC;IAC/B,CAAC;IACDtB,QAAQ,EAAE;MACTqB,KAAK,EAAEF,wBAAgB,CAACE,KAAK,CAACE;IAC/B,CAAC;IACDC,KAAK,EAAE;MACNH,KAAK,EAAEF,wBAAgB,CAACE,KAAK,CAACC;IAC/B,CAAC;IACDG,SAAS,EAAE;MACVJ,KAAK,EAAEF,wBAAgB,CAACE,KAAK,CAACC;IAC/B,CAAC;IACDI,OAAO,EAAE;MACRL,KAAK,EAAEF,wBAAgB,CAACE,KAAK,CAACC;IAC/B;EACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,11 +9,12 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _carbonReactNativeElements = require("@audira/carbon-react-native-elements");
|
|
10
10
|
var _warningAltFilled = _interopRequireDefault(require("@carbon/icons/svg/32/warning--alt--filled.svg"));
|
|
11
11
|
var _warningFilled = _interopRequireDefault(require("@carbon/icons/svg/32/warning--filled.svg"));
|
|
12
|
-
var _index = require("../../_internal/
|
|
13
|
-
var _index2 = require("../../
|
|
14
|
-
var _index3 = require("
|
|
15
|
-
var _index4 = require("../
|
|
16
|
-
var _index5 = require("../form-
|
|
12
|
+
var _index = require("../../_internal/contexts/index.js");
|
|
13
|
+
var _index2 = require("../../_internal/style-sheets/index.js");
|
|
14
|
+
var _index3 = require("../../contexts/index.js");
|
|
15
|
+
var _index4 = require("../checkbox/index.js");
|
|
16
|
+
var _index5 = require("../form-helper-text/index.js");
|
|
17
|
+
var _index6 = require("../form-label/index.js");
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
20
|
const Component = /*#__PURE__*/(0, _react.forwardRef)(function CheckboxGroup({
|
|
@@ -25,19 +26,22 @@ const Component = /*#__PURE__*/(0, _react.forwardRef)(function CheckboxGroup({
|
|
|
25
26
|
formHelperTextProps,
|
|
26
27
|
children,
|
|
27
28
|
style,
|
|
29
|
+
dir,
|
|
28
30
|
...props
|
|
29
31
|
}, ref) {
|
|
32
|
+
const globalConfigContext = (0, _react.useContext)(_index.GlobalConfigContext);
|
|
30
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
31
34
|
...props,
|
|
32
|
-
|
|
35
|
+
dir: dir ?? globalConfigContext.rtl ? 'rtl' : undefined,
|
|
36
|
+
style: [globalConfigContext.rtl ? _index2.CommonStyleSheet.rtl : undefined, style],
|
|
33
37
|
ref: ref,
|
|
34
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
38
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index6.FormLabel, {
|
|
35
39
|
label: legend,
|
|
36
40
|
style: baseStyle.legend
|
|
37
41
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
38
42
|
style: [baseStyle.wrapper, wrapperOrientationStyle[orientation]],
|
|
39
43
|
children: children
|
|
40
|
-
}), !!helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
44
|
+
}), !!helperText && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index5.FormHelperText, {
|
|
41
45
|
...formHelperTextProps,
|
|
42
46
|
error: helperTextMode === 'error',
|
|
43
47
|
text: helperText,
|
|
@@ -47,7 +51,7 @@ const Component = /*#__PURE__*/(0, _react.forwardRef)(function CheckboxGroup({
|
|
|
47
51
|
});
|
|
48
52
|
});
|
|
49
53
|
const CheckboxGroup = exports.CheckboxGroup = Object.assign(Component, {
|
|
50
|
-
Item:
|
|
54
|
+
Item: _index4.Checkbox
|
|
51
55
|
});
|
|
52
56
|
const baseStyle = _reactNative.StyleSheet.create({
|
|
53
57
|
wrapper: {
|
|
@@ -66,7 +70,7 @@ const baseStyle = _reactNative.StyleSheet.create({
|
|
|
66
70
|
flexDirection: 'column'
|
|
67
71
|
},
|
|
68
72
|
horizontal: {
|
|
69
|
-
...
|
|
73
|
+
..._index2.FlexStyleSheet.flex_wrap,
|
|
70
74
|
flexDirection: 'row'
|
|
71
75
|
}
|
|
72
76
|
}),
|
|
@@ -83,7 +87,7 @@ const baseStyle = _reactNative.StyleSheet.create({
|
|
|
83
87
|
gray_100: _carbonReactNativeElements.Color.Token.gray_100.support_warning
|
|
84
88
|
};
|
|
85
89
|
function IconErrorRenderer(props) {
|
|
86
|
-
const themeContext = (0, _react.useContext)(
|
|
90
|
+
const themeContext = (0, _react.useContext)(_index3.ThemeContext);
|
|
87
91
|
|
|
88
92
|
// return (
|
|
89
93
|
// <Icon
|
|
@@ -107,7 +111,7 @@ function IconErrorRenderer(props) {
|
|
|
107
111
|
// // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
108
112
|
// IconWarningAltFilled.content[0].attrs.fill = 'black'
|
|
109
113
|
function IconWarningRenderer(props) {
|
|
110
|
-
const themeContext = (0, _react.useContext)(
|
|
114
|
+
const themeContext = (0, _react.useContext)(_index3.ThemeContext);
|
|
111
115
|
|
|
112
116
|
// return (
|
|
113
117
|
// <Icon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_warningAltFilled","_interopRequireDefault","_warningFilled","_index","_index2","_index3","_index4","_index5","_jsxRuntime","e","__esModule","default","Component","forwardRef","CheckboxGroup","orientation","legend","helperText","helperTextMode","helperTextModeIcon","formHelperTextProps","children","style","props","ref","jsxs","View","jsx","FormLabel","label","baseStyle","wrapper","wrapperOrientationStyle","FormHelperText","error","text","textLeading","IconErrorRenderer","IconWarningRenderer","formHelperText","exports","Object","assign","Item","Checkbox","StyleSheet","create","columnGap","Spacing","spacing_05","rowGap","spacing_03","marginBottom","marginTop","vertical","flexDirection","horizontal","FlexStyleSheet","flex_wrap","mapIconErrorFillColor","gray_10","Color","Token","support_error","gray_100","mapIconErrorStrokeColor","background","mapIconWarningFillColor","support_warning","themeContext","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_carbonReactNativeElements","_warningAltFilled","_interopRequireDefault","_warningFilled","_index","_index2","_index3","_index4","_index5","_index6","_jsxRuntime","e","__esModule","default","Component","forwardRef","CheckboxGroup","orientation","legend","helperText","helperTextMode","helperTextModeIcon","formHelperTextProps","children","style","dir","props","ref","globalConfigContext","useContext","GlobalConfigContext","jsxs","View","rtl","undefined","CommonStyleSheet","jsx","FormLabel","label","baseStyle","wrapper","wrapperOrientationStyle","FormHelperText","error","text","textLeading","IconErrorRenderer","IconWarningRenderer","formHelperText","exports","Object","assign","Item","Checkbox","StyleSheet","create","columnGap","Spacing","spacing_05","rowGap","spacing_03","marginBottom","marginTop","vertical","flexDirection","horizontal","FlexStyleSheet","flex_wrap","mapIconErrorFillColor","gray_10","Color","Token","support_error","gray_100","mapIconErrorStrokeColor","background","mapIconWarningFillColor","support_warning","themeContext","ThemeContext","fill","colorScheme","stroke","width","height"],"sourceRoot":"../../../../src","sources":["components/checkbox-group/CheckboxGroup.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,0BAAA,GAAAF,OAAA;AAKA,IAAAG,iBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAMA,IAAAM,MAAA,GAAAN,OAAA;AAIA,IAAAO,OAAA,GAAAP,OAAA;AAKA,IAAAQ,OAAA,GAAAR,OAAA;AAIA,IAAAS,OAAA,GAAAT,OAAA;AAIA,IAAAU,OAAA,GAAAV,OAAA;AAIA,IAAAW,OAAA,GAAAX,OAAA;AAEsB,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAI,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAUtB,MAAMG,SAAS,gBAAG,IAAAC,iBAAU,EAC3B,SAASC,aAAaA,CACrB;EACCC,WAAW,GAAG,UAAU;EACxBC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,KAAK,CAACE,QAAQ,CAACI;EAChC,CAAC;AAKH,SAAS/B,iBAAiBA,CAACpB,KAAwB,EAAE;EAEpD,MAAMoD,YAAY,GAAG,IAAAjD,iBAAU,EAACkD,oBAAY,CAAC;;EAE7C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBACC,IAAArE,WAAA,CAAA0B,GAAA,EAACjC,cAAA,CAAAU,OAAiB;IAAA,GACZa,KAAK;IACVsD,IAAI,EAAGZ,qBAAqB,CAACU,YAAY,CAACG,WAAW,CAAG;IACxDC,MAAM,EAAGR,uBAAuB,CAACI,YAAY,CAACG,WAAW,CAAG;IAC5DE,KAAK,EAAG,EAAI;IACZC,MAAM,EAAG;EAAI,CACb,CAAC;AAGJ;;AAEA;AACA;AACA,SAASrC,mBAAmBA,CAACrB,KAAwB,EAAE;EAEtD,MAAMoD,YAAY,GAAG,IAAAjD,iBAAU,EAACkD,oBAAY,CAAC;;EAE7C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBACC,IAAArE,WAAA,CAAA0B,GAAA,EAACnC,iBAAA,CAAAY,OAAoB;IAAA,GACfa,KAAK;IACVsD,IAAI,EAAGJ,uBAAuB,CAACE,YAAY,CAACG,WAAW,CAAG;IAC1DE,KAAK,EAAG,EAAI;IACZC,MAAM,EAAG;EAAI,CACb,CAAC;AAGJ","ignoreList":[]}
|
|
@@ -6,10 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.FormHelperText = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _index = require("../../_internal/
|
|
10
|
-
var _index2 = require("../../
|
|
11
|
-
var _index3 = require("../../
|
|
12
|
-
var _index4 = require("
|
|
9
|
+
var _index = require("../../_internal/contexts/index.js");
|
|
10
|
+
var _index2 = require("../../_internal/style-sheets/index.js");
|
|
11
|
+
var _index3 = require("../../carbon-style-sheet/index.js");
|
|
12
|
+
var _index4 = require("../../contexts/index.js");
|
|
13
|
+
var _index5 = require("../text/index.js");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
const FormHelperText = exports.FormHelperText = /*#__PURE__*/(0, _react.forwardRef)(function FormHelperText({
|
|
15
16
|
error,
|
|
@@ -18,14 +19,17 @@ const FormHelperText = exports.FormHelperText = /*#__PURE__*/(0, _react.forwardR
|
|
|
18
19
|
textTrailing,
|
|
19
20
|
textProps,
|
|
20
21
|
style,
|
|
22
|
+
dir,
|
|
21
23
|
...props
|
|
22
24
|
}, ref) {
|
|
23
|
-
(0, _react.useContext)(
|
|
25
|
+
(0, _react.useContext)(_index4.ThemeContext);
|
|
26
|
+
const globalConfigContext = (0, _react.useContext)(_index.GlobalConfigContext);
|
|
24
27
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
25
28
|
...props,
|
|
26
29
|
ref: ref,
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
dir: dir ?? globalConfigContext.rtl ? 'rtl' : undefined,
|
|
31
|
+
style: [_index2.FlexStyleSheet.flex_row, baseStyle.container, globalConfigContext.rtl ? _index2.CommonStyleSheet.rtl : undefined, style],
|
|
32
|
+
children: [textLeading, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index5.Text, {
|
|
29
33
|
...textProps,
|
|
30
34
|
type: textProps?.type || 'helper_text_01',
|
|
31
35
|
style: [error ? carbonStyle.textError : carbonStyle.text, textProps?.style],
|
|
@@ -38,12 +42,12 @@ const baseStyle = _reactNative.StyleSheet.create({
|
|
|
38
42
|
gap: 8
|
|
39
43
|
}
|
|
40
44
|
}),
|
|
41
|
-
carbonStyle =
|
|
45
|
+
carbonStyle = _index3.CarbonStyleSheet.create({
|
|
42
46
|
text: {
|
|
43
|
-
color:
|
|
47
|
+
color: _index3.CarbonStyleSheet.color.text_primary
|
|
44
48
|
},
|
|
45
49
|
textError: {
|
|
46
|
-
color:
|
|
50
|
+
color: _index3.CarbonStyleSheet.color.text_error
|
|
47
51
|
}
|
|
48
52
|
});
|
|
49
53
|
//# sourceMappingURL=FormHelperText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_index","_index2","_index3","_index4","_jsxRuntime","FormHelperText","exports","forwardRef","error","text","textLeading","textTrailing","textProps","style","props","ref","useContext","ThemeContext","jsxs","View","FlexStyleSheet","flex_row","baseStyle","container","children","jsx","Text","type","carbonStyle","textError","StyleSheet","create","gap","CarbonStyleSheet","color","text_primary","text_error"],"sourceRoot":"../../../../src","sources":["components/form-helper-text/FormHelperText.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_index","_index2","_index3","_index4","_index5","_jsxRuntime","FormHelperText","exports","forwardRef","error","text","textLeading","textTrailing","textProps","style","dir","props","ref","useContext","ThemeContext","globalConfigContext","GlobalConfigContext","jsxs","View","rtl","undefined","FlexStyleSheet","flex_row","baseStyle","container","CommonStyleSheet","children","jsx","Text","type","carbonStyle","textError","StyleSheet","create","gap","CarbonStyleSheet","color","text_primary","text_error"],"sourceRoot":"../../../../src","sources":["components/form-helper-text/FormHelperText.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,OAAA,GAAAJ,OAAA;AAIA,IAAAK,OAAA,GAAAL,OAAA;AAIA,IAAAM,OAAA,GAAAN,OAAA;AAEgB,IAAAO,WAAA,GAAAP,OAAA;AAUT,MAAMQ,cAAc,GAAAC,OAAA,CAAAD,cAAA,gBAAG,IAAAE,iBAAU,EACvC,SAASF,cAAcA,CACtB;EACC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K,CAACE;IAC/B;EACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.FormLabel = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
|
-
var _index = require("../../_internal/
|
|
10
|
-
var _index2 = require("
|
|
9
|
+
var _index = require("../../_internal/contexts/index.js");
|
|
10
|
+
var _index2 = require("../../_internal/style-sheets/index.js");
|
|
11
|
+
var _index3 = require("../text/index.js");
|
|
11
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
13
|
const FormLabel = exports.FormLabel = /*#__PURE__*/(0, _react.forwardRef)(function FormLabel({
|
|
13
14
|
label,
|
|
@@ -15,13 +16,16 @@ const FormLabel = exports.FormLabel = /*#__PURE__*/(0, _react.forwardRef)(functi
|
|
|
15
16
|
labelTrailing,
|
|
16
17
|
textProps,
|
|
17
18
|
style,
|
|
19
|
+
dir,
|
|
18
20
|
...props
|
|
19
21
|
}, ref) {
|
|
22
|
+
const globalConfigContext = (0, _react.useContext)(_index.GlobalConfigContext);
|
|
20
23
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
21
24
|
...props,
|
|
22
25
|
ref: ref,
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
dir: dir ?? globalConfigContext.rtl ? 'rtl' : undefined,
|
|
27
|
+
style: [_index2.FlexStyleSheet.flex_row, baseStyle.gap, globalConfigContext.rtl ? _index2.CommonStyleSheet.rtl : undefined, style],
|
|
28
|
+
children: [labelLeading, /*#__PURE__*/(0, _jsxRuntime.jsx)(_index3.Text, {
|
|
25
29
|
...textProps,
|
|
26
30
|
type: textProps?.type || 'label_01',
|
|
27
31
|
"aria-label": label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_index","_index2","_jsxRuntime","FormLabel","exports","forwardRef","label","labelLeading","labelTrailing","textProps","style","props","ref","jsxs","View","FlexStyleSheet","flex_row","baseStyle","gap","children","jsx","Text","type","StyleSheet","create","columnGap"],"sourceRoot":"../../../../src","sources":["components/form-label/FormLabel.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_index","_index2","_index3","_jsxRuntime","FormLabel","exports","forwardRef","label","labelLeading","labelTrailing","textProps","style","dir","props","ref","globalConfigContext","useContext","GlobalConfigContext","jsxs","View","rtl","undefined","FlexStyleSheet","flex_row","baseStyle","gap","CommonStyleSheet","children","jsx","Text","type","StyleSheet","create","columnGap"],"sourceRoot":"../../../../src","sources":["components/form-label/FormLabel.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAKA,IAAAC,YAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AAIA,IAAAG,OAAA,GAAAH,OAAA;AAKA,IAAAI,OAAA,GAAAJ,OAAA;AAEgB,IAAAK,WAAA,GAAAL,OAAA;AAUT,MAAMM,SAAS,GAAAC,OAAA,CAAAD,SAAA,gBAAG,IAAAE,iBAAU,EAClC,SAASF,SAASA,CACjB;EACCG,KAAK;EACLC,YAAY;EACZC,aAAa;EACbC,SAAS;EACTC,KAAK;EACLC,GAAG;EACH,GAAGC;AACJ,CAAC,EACDC,GAAG,EACF;EAED,MACCC,mBAAmB,GAClB,IAAAC,iBAAU,EAACC,0BAAmB,CAAC;EAEjC,oBACC,IAAAd,WAAA,CAAAe,IAAA,EAACnB,YAAA,CAAAoB,IAAI;IAAA,GACCN,KAAK;IACVC,GAAG,EAAGA,GAAK;IACXF,GAAG,EAAGA,GAAG,IAAIG,mBAAmB,CAACK,GAAG,GAAG,KAAK,GAAGC,SAAW;IAC1DV,KAAK,EAAG,CACPW,sBAAc,CAACC,QAAQ,EACvBC,SAAS,CAACC,GAAG,EACbV,mBAAmB,CAACK,GAAG,GAAGM,wBAAgB,CAACN,GAAG,GAAGC,SAAS,EAC1DV,KAAK,CACH;IAAAgB,QAAA,GAEDnB,YAAY,eAEd,IAAAL,WAAA,CAAAyB,GAAA,EAAC1B,OAAA,CAAA2B,IAAI;MAAA,GACCnB,SAAS;MACdoB,IAAI,EAAGpB,SAAS,EAAEoB,IAAI,IAAI,UAAY;MACtC,cAAavB,KAAO;MAAAoB,QAAA,EAElBpB;IAAK,CACF,CAAC,EAELE,aAAa;EAAA,CACV,CAAC;AAGT,CACD,CAAC;AAED,MACCe,SAAS,GACRO,uBAAU,CAACC,MAAM,CAAC;EACjBP,GAAG,EAAE;IACJQ,SAAS,EAAE;EACZ;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -9,11 +9,12 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _carbonReactNativeElements = require("@audira/carbon-react-native-elements");
|
|
10
10
|
var _checkmarkFilled = _interopRequireDefault(require("@carbon/icons/svg/32/checkmark--filled.svg"));
|
|
11
11
|
var _errorFilled = _interopRequireDefault(require("@carbon/icons/svg/32/error--filled.svg"));
|
|
12
|
-
var _index = require("../../_internal/
|
|
13
|
-
var _index2 = require("../../
|
|
14
|
-
var _index3 = require("../../
|
|
15
|
-
var _index4 = require("
|
|
16
|
-
var _index5 = require("../
|
|
12
|
+
var _index = require("../../_internal/contexts/index.js");
|
|
13
|
+
var _index2 = require("../../_internal/style-sheets/index.js");
|
|
14
|
+
var _index3 = require("../../carbon-style-sheet/index.js");
|
|
15
|
+
var _index4 = require("../../contexts/index.js");
|
|
16
|
+
var _index5 = require("../loading/index.js");
|
|
17
|
+
var _index6 = require("../text/index.js");
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
20
|
const InlineLoading = exports.InlineLoading = /*#__PURE__*/(0, _react.forwardRef)(function InlineLoading({
|
|
@@ -22,15 +23,18 @@ const InlineLoading = exports.InlineLoading = /*#__PURE__*/(0, _react.forwardRef
|
|
|
22
23
|
style,
|
|
23
24
|
'aria-label': ariaLabel,
|
|
24
25
|
textProps,
|
|
26
|
+
dir,
|
|
25
27
|
...props
|
|
26
28
|
}, ref) {
|
|
27
|
-
const themeContext = (0, _react.useContext)(
|
|
29
|
+
const themeContext = (0, _react.useContext)(_index4.ThemeContext),
|
|
30
|
+
globalConfigContext = (0, _react.useContext)(_index.GlobalConfigContext);
|
|
28
31
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
29
32
|
ref: ref,
|
|
30
33
|
...props,
|
|
31
34
|
"aria-label": ariaLabel ?? text,
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
dir: dir ?? globalConfigContext.rtl ? 'rtl' : undefined,
|
|
36
|
+
style: [_index2.FlexStyleSheet.flex_row, _index2.FlexStyleSheet.items_center, styleSheet.inlineLoading, globalConfigContext.rtl ? _index2.CommonStyleSheet.rtl : undefined, style],
|
|
37
|
+
children: [state == 'active' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_index5.Loading, {
|
|
34
38
|
type: "small"
|
|
35
39
|
}) : state == 'error' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_errorFilled.default, {
|
|
36
40
|
width: 16,
|
|
@@ -40,7 +44,7 @@ const InlineLoading = exports.InlineLoading = /*#__PURE__*/(0, _react.forwardRef
|
|
|
40
44
|
width: 16,
|
|
41
45
|
height: 16,
|
|
42
46
|
fill: mapIconCheckmarkColor[themeContext.colorScheme]
|
|
43
|
-
}) : null, !!text && /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
47
|
+
}) : null, !!text && /*#__PURE__*/(0, _jsxRuntime.jsx)(_index6.Text, {
|
|
44
48
|
...textProps,
|
|
45
49
|
type: "body_compact_01",
|
|
46
50
|
style: [carbonStyleSheet.text, textProps?.style],
|
|
@@ -53,9 +57,9 @@ const styleSheet = _reactNative.StyleSheet.create({
|
|
|
53
57
|
columnGap: 8
|
|
54
58
|
}
|
|
55
59
|
}),
|
|
56
|
-
carbonStyleSheet =
|
|
60
|
+
carbonStyleSheet = _index3.CarbonStyleSheet.create({
|
|
57
61
|
text: {
|
|
58
|
-
color:
|
|
62
|
+
color: _index3.CarbonStyleSheet.color.text_secondary
|
|
59
63
|
}
|
|
60
64
|
}),
|
|
61
65
|
mapIconErrorColor = {
|