@draftbit/core 46.2.0 → 46.2.1-327d47.2
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/components/CardBlock.js +15 -5
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +2 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -6
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +17 -3
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +7 -8
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -20
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js +21 -4
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +17 -5
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/Text.js +38 -11
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/mappings/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/mappings/BlurView.js.map +1 -1
- package/lib/commonjs/mappings/CardContainerRating.js.map +1 -1
- package/lib/commonjs/mappings/Checkbox.js.map +1 -1
- package/lib/commonjs/mappings/NumberInput.js +241 -0
- package/lib/commonjs/mappings/NumberInput.js.map +1 -0
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/Text.js +33 -26
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js +192 -2
- package/lib/commonjs/mappings/TextArea.js.map +1 -1
- package/lib/commonjs/mappings/TextField.js +191 -2
- package/lib/commonjs/mappings/TextField.js.map +1 -1
- package/lib/commonjs/mappings/TextInput.js +180 -29
- package/lib/commonjs/mappings/TextInput.js.map +1 -1
- package/lib/commonjs/mappings/Video.js.map +1 -1
- package/lib/commonjs/styles/DarkTheme.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/mappings/NumberInput.js +231 -0
- package/lib/module/mappings/NumberInput.js.map +1 -0
- package/lib/module/mappings/Surface.js.map +1 -1
- package/lib/module/mappings/Text.js +33 -26
- package/lib/module/mappings/Text.js.map +1 -1
- package/lib/module/mappings/TextArea.js +193 -3
- package/lib/module/mappings/TextArea.js.map +1 -1
- package/lib/module/mappings/TextField.js +192 -3
- package/lib/module/mappings/TextField.js.map +1 -1
- package/lib/module/mappings/TextInput.js +180 -29
- package/lib/module/mappings/TextInput.js.map +1 -1
- package/lib/typescript/src/mappings/NumberInput.d.ts +297 -0
- package/lib/typescript/src/mappings/Text.d.ts +24 -10
- package/lib/typescript/src/mappings/TextArea.d.ts +12 -11
- package/lib/typescript/src/mappings/TextField.d.ts +4 -4
- package/lib/typescript/src/mappings/TextInput.d.ts +3 -254
- package/package.json +2 -2
- package/src/mappings/NumberInput.js +248 -0
- package/src/mappings/NumberInput.ts +267 -0
- package/src/mappings/Text.js +33 -26
- package/src/mappings/Text.ts +34 -27
- package/src/mappings/TextArea.js +221 -3
- package/src/mappings/TextArea.ts +227 -3
- package/src/mappings/TextField.js +220 -3
- package/src/mappings/TextField.ts +227 -3
- package/src/mappings/TextInput.js +208 -31
- package/src/mappings/TextInput.ts +214 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DatePickerComponent","value","onChange","mode","toggleVisibility","isVisible","theme","internalTheme","createMuiTheme","palette","primary","main","colors","Theme","secondary","Picker","DatePicker","TimePicker","DateTimePicker","DateFnsUtils","d","withTheme"],"sources":["DatePickerComponent.web.
|
|
1
|
+
{"version":3,"names":["DatePickerComponent","value","onChange","mode","toggleVisibility","isVisible","theme","internalTheme","createMuiTheme","palette","primary","main","colors","Theme","secondary","Picker","DatePicker","TimePicker","DateTimePicker","React","createElement","MuiPickersUtilsProvider","utils","DateFnsUtils","ThemeProvider","open","d","onClose","variant","TextFieldComponent","withTheme"],"sources":["DatePickerComponent.web.js"],"sourcesContent":["import React from \"react\";\nimport DateFnsUtils from \"@date-io/date-fns\";\nimport { MuiPickersUtilsProvider, DatePicker, TimePicker, DateTimePicker, } from \"@material-ui/pickers\";\nimport { createMuiTheme, ThemeProvider } from \"@material-ui/core/styles\";\nimport { withTheme } from \"../../theming\";\nimport Theme from \"../../styles/DefaultTheme\";\nconst DatePickerComponent = ({ value, onChange, mode, toggleVisibility, isVisible, theme, }) => {\n const internalTheme = createMuiTheme({\n palette: {\n primary: {\n main: theme.colors.primary || Theme.colors.primary,\n },\n secondary: {\n main: theme.colors.secondary || Theme.colors.secondary,\n },\n },\n });\n const Picker = mode === \"date\"\n ? DatePicker\n : mode === \"time\"\n ? TimePicker\n : DateTimePicker;\n return (React.createElement(MuiPickersUtilsProvider, { utils: DateFnsUtils },\n React.createElement(ThemeProvider, { theme: internalTheme },\n React.createElement(Picker, { value: value, open: isVisible, onChange: (d) => {\n toggleVisibility();\n onChange(null, d);\n }, onClose: () => toggleVisibility(), variant: \"dialog\", TextFieldComponent: () => null }))));\n};\nexport default withTheme(DatePickerComponent);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;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|
+
{"version":3,"names":[],"sources":["DatePickerComponentType.js"],"sourcesContent":["export {};\n"],"mappings":""}
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
28
30
|
const Button = _ref => {
|
|
29
31
|
let {
|
|
30
32
|
Icon,
|
|
@@ -126,7 +128,7 @@ const Button = _ref => {
|
|
|
126
128
|
alignSelf: "stretch",
|
|
127
129
|
...margins
|
|
128
130
|
}
|
|
129
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
130
132
|
onPress: onPress,
|
|
131
133
|
accessibilityState: {
|
|
132
134
|
disabled
|
|
@@ -134,7 +136,7 @@ const Button = _ref => {
|
|
|
134
136
|
accessibilityRole: "button",
|
|
135
137
|
disabled: disabled || loading,
|
|
136
138
|
style: [styles.button, buttonStyle, innerStyles]
|
|
137
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
139
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
138
140
|
style: styles.content
|
|
139
141
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
142
|
style: iconStyle
|
|
@@ -169,23 +171,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
169
171
|
|
|
170
172
|
var _default = (0, _theming.withTheme)(Button);
|
|
171
173
|
|
|
172
|
-
exports.default = _default;
|
|
173
|
-
//# sourceMappingURL=DeprecatedButton.js.mapt.create({
|
|
174
|
-
button: {
|
|
175
|
-
minWidth: 64,
|
|
176
|
-
borderStyle: "solid"
|
|
177
|
-
},
|
|
178
|
-
content: {
|
|
179
|
-
flexDirection: "row",
|
|
180
|
-
alignItems: "center",
|
|
181
|
-
justifyContent: "center"
|
|
182
|
-
},
|
|
183
|
-
icon: {
|
|
184
|
-
width: _Config.default.buttonIconSize
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
var _default = (0, _theming.withTheme)(Button);
|
|
189
|
-
|
|
190
174
|
exports.default = _default;
|
|
191
175
|
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","
|
|
1
|
+
{"version":3,"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","alignSelf","button","content","create","minWidth","borderStyle","flexDirection","alignItems","justifyContent","withTheme"],"sources":["DeprecatedButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n Text,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A button is component that the user can press to trigger an action.\n *\n * <div class=\"screenshots\">\n * <figure>\n * <img src=\"screenshots/button-1.png\" />\n * <figcaption>Text button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-2.png\" />\n * <figcaption>Outlined button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-3.png\" />\n * <figcaption>Contained button</figcaption>\n * </figure>\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Button } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <Button icon=\"add-a-photo\" type=\"solid\" onPress={() => console.log('Pressed')}>\n * Press me\n * </Button>\n * );\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"outline\" | \"text\";\n loading?: boolean;\n icon?: string;\n labelColor?: string;\n color?: string;\n children?: React.ReactNode;\n onPress: () => void;\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst Button: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n labelColor,\n color: colorOverride,\n children,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n\n const {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n ...innerStyles\n } = StyleSheet.flatten(style || {});\n\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n\n return (\n <Elevation style={{ elevation, alignSelf: \"stretch\", ...margins }}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={[styles.button, buttonStyle, innerStyles]}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {children}\n </Text>\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n minWidth: 64,\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n width: Config.buttonIconSize,\n },\n});\n\nexport default withTheme(Button);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAqDA,MAAMA,MAAgD,GAAG,QAcnD;EAAA,IAdoD;IACxDC,IADwD;IAExDC,IAFwD;IAGxDC,QAAQ,GAAG,KAH6C;IAIxDC,IAAI,GAAG,OAJiD;IAKxDC,OAAO,GAAG,KAL8C;IAMxDC,UANwD;IAOxDC,KAAK,EAAEC,aAPiD;IAQxDC,QARwD;IASxDC,OATwD;IAUxDC,SAAS,GAAG,CAV4C;IAWxDC,KAXwD;IAYxDC,KAAK,EAAE;MAAEC,MAAF;MAAUC,eAAV;MAA2BC,SAA3B;MAAsCC;IAAtC,CAZiD;IAaxD,GAAGC;EAbqD,CAcpD;EACJ,IAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;EACA,MAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;EAEA,IAAIpB,IAAI,KAAK,OAAb,EAAsB;IACpBe,eAAe,GAAGI,WAAlB;;IAEA,IAAIpB,QAAJ,EAAc;MACZkB,SAAS,GAAG,IAAAd,cAAA,EAAMO,MAAM,CAACW,OAAb,EAAsBC,KAAtB,CAA4BX,eAA5B,EAA6CY,GAA7C,GAAmDC,MAAnD,EAAZ;IACD,CAFD,MAEO;MACLP,SAAS,GAAGf,UAAU,IAAIQ,MAAM,CAACW,OAAjC;IACD;EACF,CARD,MAQO;IACLN,eAAe,GAA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AHT,CALsB;EAU/BzD,IAAI,EAAE;IACJuC,KAAK,EAAEC,eAAA,CAAOC;EADV;AAVyB,CAAlB,CAAf;;eAee,IAAAiB,kBAAA,EAAU5D,MAAV,C"}
|
|
@@ -13,6 +13,8 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
16
18
|
const getWidth = numColumns => {
|
|
17
19
|
switch (numColumns) {
|
|
18
20
|
case 1:
|
|
@@ -35,20 +37,6 @@ const Card = _ref => {
|
|
|
35
37
|
...rest
|
|
36
38
|
} = _ref;
|
|
37
39
|
const width = getWidth(numColumns);
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
39
|
-
disabled: !onPress,
|
|
40
|
-
onPress: onPress,
|
|
41
|
-
style: [style, {
|
|
42
|
-
width
|
|
43
|
-
}],
|
|
44
|
-
...rest
|
|
45
|
-
}, children);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var _default = (0, _theming.withTheme)(Card);
|
|
49
|
-
|
|
50
|
-
exports.default = _default;
|
|
51
|
-
//# sourceMappingURL=DeprecatedCardWrapper.js.map = getWidth(numColumns);
|
|
52
40
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
53
41
|
disabled: !onPress,
|
|
54
42
|
onPress: onPress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","
|
|
1
|
+
{"version":3,"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","withTheme"],"sources":["DeprecatedCardWrapper.tsx"],"sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n numColumns?: number;\n children?: React.ReactNode;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst getWidth = (numColumns: number) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\n\nconst Card: React.FC<React.PropsWithChildren<Props>> = ({\n numColumns = 3,\n children,\n onPress,\n style,\n ...rest\n}) => {\n const width = getWidth(numColumns);\n return (\n <Touchable\n disabled={!onPress}\n onPress={onPress}\n style={[style, { width }]}\n {...rest}\n >\n {children}\n </Touchable>\n );\n};\n\nexport default withTheme(Card);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAYA,MAAMA,QAAQ,GAAIC,UAAD,IAAwB;EACvC,QAAQA,UAAR;IACE,KAAK,CAAL;MACE,OAAO,KAAP;;IACF,KAAK,CAAL;MACE,OAAO,KAAP;;IACF;MACE,OAAO,MAAP;EANJ;AAQD,CATD;;AAWA,MAAMC,IAA8C,GAAG,QAMjD;EAAA,IANkD;IACtDD,UAAU,GAAG,CADyC;IAEtDE,QAFsD;IAGtDC,OAHsD;IAItDC,KAJsD;IAKtD,GAAGC;EALmD,CAMlD;EACJ,MAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;EACA,oBACE,6BAAC,kBAAD;IACE,QAAQ,EAAE,CAACG,OADb;IAEE,OAAO,EAAEA,OAFX;IAGE,KAAK,EAAE,CAACC,KAAD,EAAQ;MAAEE;IAAF,CAAR;EAHT,GAIMD,IAJN,GAMGH,QANH,CADF;AAUD,CAlBD;;eAoBe,IAAAK,kBAAA,EAAUN,IAAV,C"}
|
|
@@ -27,8 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
-
|
|
32
30
|
const FAB = _ref => {
|
|
33
31
|
let {
|
|
34
32
|
Icon,
|
|
@@ -130,7 +128,7 @@ const FAB = _ref => {
|
|
|
130
128
|
style: [{
|
|
131
129
|
elevation
|
|
132
130
|
}, style]
|
|
133
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default,
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
134
132
|
onPress: onPress,
|
|
135
133
|
accessibilityState: {
|
|
136
134
|
disabled
|
|
@@ -138,7 +136,7 @@ const FAB = _ref => {
|
|
|
138
136
|
accessibilityRole: "button",
|
|
139
137
|
disabled: disabled || loading,
|
|
140
138
|
style: buttonStyles
|
|
141
|
-
}
|
|
139
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
140
|
style: styles.content
|
|
143
141
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
144
142
|
style: iconStyle
|
|
@@ -181,5 +179,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
181
179
|
|
|
182
180
|
var _default = (0, _theming.withTheme)(FAB);
|
|
183
181
|
|
|
182
|
+
exports.default = _default;
|
|
183
|
+
//# sourceMappingURL=DeprecatedFAB.js.mapifyContent: "center"
|
|
184
|
+
},
|
|
185
|
+
icon: {
|
|
186
|
+
alignItems: "center",
|
|
187
|
+
justifyContent: "center",
|
|
188
|
+
width: _Config.default.buttonIconSize
|
|
189
|
+
},
|
|
190
|
+
fixed: {
|
|
191
|
+
left: 0,
|
|
192
|
+
right: 0,
|
|
193
|
+
bottom: 0,
|
|
194
|
+
height: 64,
|
|
195
|
+
borderRadius: 0
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
var _default = (0, _theming.withTheme)(FAB);
|
|
200
|
+
|
|
184
201
|
exports.default = _default;
|
|
185
202
|
//# sourceMappingURL=DeprecatedFAB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","create","borderStyle","flexDirection","fixed","left","right","bottom","withTheme"],"sources":["DeprecatedFAB.
|
|
1
|
+
{"version":3,"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","React","createElement","Elevation","Touchable","accessibilityState","accessibilityRole","View","name","size","ActivityIndicator","Text","numberOfLines","create","borderStyle","flexDirection","fixed","left","right","bottom","withTheme"],"sources":["DeprecatedFAB.js"],"sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n const buttonStyles = [styles.button, buttonStyle];\n const contentStyle = [styles.content];\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n };\n const iconStyle = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n textStyle.margin = 16;\n }\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n return (React.createElement(Elevation, { style: [{ elevation }, style] },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: buttonStyles },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));\n};\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\nexport default withTheme(FAB);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,GAAG,GAAG,QAAuM;EAAA,IAAtM;IAAEC,IAAF;IAAQC,IAAR;IAAcC,QAAQ,GAAG,KAAzB;IAAgCC,IAAI,GAAG,OAAvC;IAAgDC,OAAO,GAAG,KAA1D;IAAiEC,KAAK,EAAEC,aAAxE;IAAuFC,KAAvF;IAA8FC,OAA9F;IAAuGC,SAAS,GAAG,CAAnH;IAAsHC,KAAtH;IAA6HC,KAAK,EAAE;MAAEC,MAAF;MAAUC,eAAV;MAA2BC,SAA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EAS7B/B,IAAI,EAAE;IACF8B,UAAU,EAAE,QADV;IAEFC,cAAc,EAAE,QAFd;IAGFS,KAAK,EAAEC,eAAA,CAAOC;EAHZ,CATuB;EAc7ByB,KAAK,EAAE;IACHC,IAAI,EAAE,CADH;IAEHC,KAAK,EAAE,CAFJ;IAGHC,MAAM,EAAE,CAHL;IAIH1B,MAAM,EAAE,EAJL;IAKHf,YAAY,EAAE;EALX;AAdsB,CAAlB,CAAf;;eAsBe,IAAA0C,kBAAA,EAAUzE,GAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HeaderLarge","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","headline4","strong","withTheme"],"sources":["HeaderLarge.
|
|
1
|
+
{"version":3,"names":["HeaderLarge","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","React","createElement","Header","titleTypeStyle","headline4","titleColor","strong","withTheme"],"sources":["HeaderLarge.js"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Header from \"./Header\";\nconst HeaderLarge = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {\n return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.headline4, titleColor: colors.strong, title: title, buttonText: buttonText, icon: icon, onPress: onPress, style: style }));\n};\nexport default withTheme(HeaderLarge);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,WAAW,GAAG,QAAmG;EAAA,IAAlG;IAAEC,IAAF;IAAQC,KAAR;IAAeC,UAAf;IAA2BC,IAA3B;IAAiCC,OAAO,GAAG,MAAM,CAAG,CAApD;IAAsDC,KAAtD;IAA6DC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAApE,CAAkG;EACnH,oBAAQC,KAAK,CAACC,aAAN,CAAoBC,eAApB,EAA4B;IAAEX,IAAI,EAAEA,IAAR;IAAcY,cAAc,EAAEJ,UAAU,CAACK,SAAzC;IAAoDC,UAAU,EAAEP,MAAM,CAACQ,MAAvE;IAA+Ed,KAAK,EAAEA,KAAtF;IAA6FC,UAAU,EAAEA,UAAzG;IAAqHC,IAAI,EAAEA,IAA3H;IAAiIC,OAAO,EAAEA,OAA1I;IAAmJC,KAAK,EAAEA;EAA1J,CAA5B,CAAR;AACH,CAFD;;eAGe,IAAAW,kBAAA,EAAUjB,WAAV,C"}
|
|
@@ -17,8 +17,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
19
|
|
|
20
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
21
|
-
|
|
22
20
|
const {
|
|
23
21
|
Provider
|
|
24
22
|
} = _context.radioButtonGroupContext;
|
|
@@ -63,11 +61,25 @@ const RadioButtonGroup = _ref => {
|
|
|
63
61
|
});
|
|
64
62
|
}
|
|
65
63
|
|
|
66
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
64
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
67
65
|
style: [{
|
|
68
66
|
minHeight: 40
|
|
69
|
-
}, style]
|
|
70
|
-
|
|
67
|
+
}, style],
|
|
68
|
+
...rest
|
|
69
|
+
}, /*#__PURE__*/React.createElement(Provider, {
|
|
70
|
+
value: {
|
|
71
|
+
value: internalValue,
|
|
72
|
+
onValueChange: handleValueChange,
|
|
73
|
+
direction
|
|
74
|
+
}
|
|
75
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
76
|
+
style: _containerStyle
|
|
77
|
+
}, children)));
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var _default = RadioButtonGroup;
|
|
81
|
+
exports.default = _default;
|
|
82
|
+
//# sourceMappingURL=RadioButtonGroup.js.mapt.createElement(Provider, {
|
|
71
83
|
value: {
|
|
72
84
|
value: internalValue,
|
|
73
85
|
onValueChange: handleValueChange,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","getValueForRadioButton","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","minHeight"],"sources":["RadioButtonGroup.
|
|
1
|
+
{"version":3,"names":["Provider","radioButtonGroupContext","RadioButtonGroup","direction","Direction","Vertical","value","onValueChange","defaultValue","style","children","rest","internalValue","setInternalValue","React","useState","useEffect","realValue","getValueForRadioButton","realDefaultValue","handleValueChange","newValue","realNewValue","_containerStyle","flexDirection","Horizontal","push","alignItems","createElement","View","minHeight"],"sources":["RadioButtonGroup.js"],"sourcesContent":["import * as React from \"react\";\nimport { View } from \"react-native\";\nimport { getValueForRadioButton } from \"../../utilities\";\nimport { radioButtonGroupContext, Direction } from \"./context\";\nconst { Provider } = radioButtonGroupContext;\nconst RadioButtonGroup = ({ direction = Direction.Vertical, value = \"\", onValueChange, defaultValue, style, children, ...rest }) => {\n const [internalValue, setInternalValue] = React.useState(\"\");\n React.useEffect(() => {\n if (value != null) {\n const realValue = getValueForRadioButton(value);\n setInternalValue(realValue);\n }\n }, [value]);\n React.useEffect(() => {\n if (defaultValue != null) {\n const realDefaultValue = getValueForRadioButton(defaultValue);\n setInternalValue(realDefaultValue);\n }\n }, [defaultValue]);\n const handleValueChange = (newValue) => {\n const realNewValue = getValueForRadioButton(newValue);\n setInternalValue(realNewValue);\n onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(realNewValue);\n };\n const _containerStyle = [\n {\n flexDirection: direction === Direction.Horizontal ? \"row\" : \"column\",\n },\n ];\n if (direction !== Direction.Vertical) {\n _containerStyle.push({\n alignItems: \"center\",\n });\n }\n return (React.createElement(View, { style: [{ minHeight: 40 }, style], ...rest },\n React.createElement(Provider, { value: {\n value: internalValue,\n onValueChange: handleValueChange,\n direction,\n } },\n React.createElement(View, { style: _containerStyle }, children))));\n};\nexport default RadioButtonGroup;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AACA,MAAM;EAAEA;AAAF,IAAeC,gCAArB;;AACA,MAAMC,gBAAgB,GAAG,QAA2G;EAAA,IAA1G;IAAEC,SAAS,GAAGC,kBAAA,CAAUC,QAAxB;IAAkCC,KAAK,GAAG,EAA1C;IAA8CC,aAA9C;IAA6DC,YAA7D;IAA2EC,KAA3E;IAAkFC,QAAlF;IAA4F,GAAGC;EAA/F,CAA0G;EAChI,MAAM,CAACC,aAAD,EAAgBC,gBAAhB,IAAoCC,KAAK,CAACC,QAAN,CAAe,EAAf,CAA1C;EACAD,KAAK,CAACE,SAAN,CAAgB,MAAM;IAClB,IAAIV,KAAK,IAAI,IAAb,EAAmB;MACf,MAAMW,SAAS,GAAG,IAAAC,iCAAA,EAAuBZ,KAAvB,CAAlB;MACAO,gBAAgB,CAACI,SAAD,CAAhB;IACH;EACJ,CALD,EAKG,CAACX,KAAD,CALH;EAMAQ,KAAK,CAACE,SAAN,CAAgB,MAAM;IAClB,IAAIR,YAAY,IAAI,IAApB,EAA0B;MACtB,MAAMW,gBAAgB,GAAG,IAAAD,iCAAA,EAAuBV,YAAvB,CAAzB;MACAK,gBAAgB,CAACM,gBAAD,CAAhB;IACH;EACJ,CALD,EAKG,CAACX,YAAD,CALH;;EAMA,MAAMY,iBAAiB,GAAIC,QAAD,IAAc;IACpC,MAAMC,YAAY,GAAG,IAAAJ,iCAAA,EAAuBG,QAAvB,CAArB;IACAR,gBAAgB,CAACS,YAAD,CAAhB;IACAf,aAAa,KAAK,IAAlB,IAA0BA,aAAa,KAAK,KAAK,CAAjD,GAAqD,KAAK,CAA1D,GAA8DA,aAAa,CAACe,YAAD,CAA3E;EACH,CAJD;;EAKA,MAAMC,eAAe,GAAG,CACpB;IACIC,aAAa,EAAErB,SAAS,KAAKC,kBAAA,CAAUqB,UAAxB,GAAqC,KAArC,GAA6C;EADhE,CADoB,CAAxB;;EAKA,IAAItB,SAAS,KAAKC,kBAAA,CAAUC,QAA5B,EAAsC;IAClCkB,eAAe,CAACG,IAAhB,CAAqB;MACjBC,UAAU,EAAE;IADK,CAArB;EAGH;;EACD,oBAAQb,KAAK,CAACc,aAAN,CAAoBC,iBAApB,EAA0B;IAAEpB,KAAK,EAAE,CAAC;MAAEqB,SAAS,EAAE;IAAb,CAAD,EAAoBrB,KAApB,CAAT;IAAqC,GAAGE;EAAxC,CAA1B,eACJG,KAAK,CAACc,aAAN,CAAoB5B,QAApB,EAA8B;IAAEM,KAAK,EAAE;MAC/BA,KAAK,EAAEM,aADwB;MAE/BL,aAAa,EAAEa,iBAFgB;MAG/BjB;IAH+B;EAAT,CAA9B,eAKIW,KAAK,CAACc,aAAN,CAAoBC,iBAApB,EAA0B;IAAEpB,KAAK,EAAEc;EAAT,CAA1B,EAAsDb,QAAtD,CALJ,CADI,CAAR;AAOH,CApCD;;eAqCeR,gB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style"],"sources":["SwiperItem.
|
|
1
|
+
{"version":3,"names":["styles","StyleSheet","create","wrapper","flex","SwiperItem","children","style","React","createElement","View"],"sources":["SwiperItem.js"],"sourcesContent":["import React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n },\n});\nconst SwiperItem = ({ children, style }) => (React.createElement(View, { style: [styles.wrapper, style] }, children));\nexport default SwiperItem;\n"],"mappings":";;;;;;;AAAA;;AACA;;;;AACA,MAAMA,MAAM,GAAGC,uBAAA,CAAWC,MAAX,CAAkB;EAC7BC,OAAO,EAAE;IACLC,IAAI,EAAE;EADD;AADoB,CAAlB,CAAf;;AAKA,MAAMC,UAAU,GAAG;EAAA,IAAC;IAAEC,QAAF;IAAYC;EAAZ,CAAD;EAAA,oBAA0BC,cAAA,CAAMC,aAAN,CAAoBC,iBAApB,EAA0B;IAAEH,KAAK,EAAE,CAACP,MAAM,CAACG,OAAR,EAAiBI,KAAjB;EAAT,CAA1B,EAA8DD,QAA9D,CAA1B;AAAA,CAAnB;;eACeD,U"}
|
|
@@ -15,17 +15,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
15
15
|
|
|
16
16
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
17
17
|
|
|
18
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
19
|
-
|
|
20
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
21
|
-
|
|
22
18
|
class Text extends React.Component {
|
|
23
|
-
constructor() {
|
|
24
|
-
super(...arguments);
|
|
25
|
-
|
|
26
|
-
_defineProperty(this, "_root", void 0);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
19
|
setNativeProps(args) {
|
|
30
20
|
return this._root && this._root.setNativeProps(args);
|
|
31
21
|
}
|
|
@@ -36,7 +26,44 @@ class Text extends React.Component {
|
|
|
36
26
|
...rest
|
|
37
27
|
} = this.props;
|
|
38
28
|
const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
|
|
39
|
-
return /*#__PURE__*/React.createElement(_reactNative.Text,
|
|
29
|
+
return /*#__PURE__*/React.createElement(_reactNative.Text, { ...rest,
|
|
30
|
+
ref: c => {
|
|
31
|
+
this._root = c;
|
|
32
|
+
},
|
|
33
|
+
style: [{
|
|
34
|
+
textAlign: "left",
|
|
35
|
+
writingDirection
|
|
36
|
+
}, style]
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const BaseLink = _ref => {
|
|
43
|
+
let {
|
|
44
|
+
style,
|
|
45
|
+
theme,
|
|
46
|
+
title,
|
|
47
|
+
...props
|
|
48
|
+
} = _ref;
|
|
49
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
50
|
+
hitSlop: 8,
|
|
51
|
+
style: [{
|
|
52
|
+
color: theme.colors.primary
|
|
53
|
+
}, style],
|
|
54
|
+
theme: theme,
|
|
55
|
+
...props
|
|
56
|
+
}, title);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
exports.BaseLink = BaseLink;
|
|
60
|
+
const Link = (0, _theming.withTheme)(BaseLink);
|
|
61
|
+
exports.Link = Link;
|
|
62
|
+
|
|
63
|
+
var _default = (0, _theming.withTheme)(Text);
|
|
64
|
+
|
|
65
|
+
exports.default = _default;
|
|
66
|
+
//# sourceMappingURL=Text.js.map.Text, _extends({}, rest, {
|
|
40
67
|
ref: c => {
|
|
41
68
|
this._root = c;
|
|
42
69
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","c","textAlign","BaseLink","theme","title","color","colors","primary","Link","withTheme"],"sources":["Text.
|
|
1
|
+
{"version":3,"names":["Text","React","Component","setNativeProps","args","_root","render","style","rest","props","writingDirection","I18nManager","isRTL","createElement","NativeText","ref","c","textAlign","BaseLink","theme","title","hitSlop","color","colors","primary","Link","withTheme"],"sources":["Text.js"],"sourcesContent":["import * as React from \"react\";\nimport { Text as NativeText, I18nManager } from \"react-native\";\nimport { withTheme } from \"../theming\";\nclass Text extends React.Component {\n setNativeProps(args) {\n return this._root && this._root.setNativeProps(args);\n }\n render() {\n const { style, ...rest } = this.props;\n const writingDirection = I18nManager.isRTL ? \"rtl\" : \"ltr\";\n return (React.createElement(NativeText, { ...rest, ref: (c) => {\n this._root = c;\n }, style: [\n {\n textAlign: \"left\",\n writingDirection,\n },\n style,\n ] }));\n }\n}\nexport const BaseLink = ({ style, theme, title, ...props }) => {\n return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary }, style], theme: theme, ...props }, title));\n};\nconst Link = withTheme(BaseLink);\nexport { Link };\nexport default withTheme(Text);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,IAAN,SAAmBC,KAAK,CAACC,SAAzB,CAAmC;EAC/BC,cAAc,CAACC,IAAD,EAAO;IACjB,OAAO,KAAKC,KAAL,IAAc,KAAKA,KAAL,CAAWF,cAAX,CAA0BC,IAA1B,CAArB;EACH;;EACDE,MAAM,GAAG;IACL,MAAM;MAAEC,KAAF;MAAS,GAAGC;IAAZ,IAAqB,KAAKC,KAAhC;IACA,MAAMC,gBAAgB,GAAGC,wBAAA,CAAYC,KAAZ,GAAoB,KAApB,GAA4B,KAArD;IACA,oBAAQX,KAAK,CAACY,aAAN,CAAoBC,iBAApB,EAAgC,EAAE,GAAGN,IAAL;MAAWO,GAAG,EAAGC,CAAD,IAAO;QACvD,KAAKX,KAAL,GAAaW,CAAb;MACH,CAFmC;MAEjCT,KAAK,EAAE,CACN;QACIU,SAAS,EAAE,MADf;QAEIP;MAFJ,CADM,EAKNH,KALM;IAF0B,CAAhC,CAAR;EASH;;AAhB8B;;AAkB5B,MAAMW,QAAQ,GAAG,QAAuC;EAAA,IAAtC;IAAEX,KAAF;IAASY,KAAT;IAAgBC,KAAhB;IAAuB,GAAGX;EAA1B,CAAsC;EAC3D,oBAAQR,KAAK,CAACY,aAAN,CAAoBb,IAApB,EAA0B;IAAEqB,OAAO,EAAE,CAAX;IAAcd,KAAK,EAAE,CAAC;MAAEe,KAAK,EAAEH,KAAK,CAACI,MAAN,CAAaC;IAAtB,CAAD,EAAkCjB,KAAlC,CAArB;IAA+DY,KAAK,EAAEA,KAAtE;IAA6E,GAAGV;EAAhF,CAA1B,EAAmHW,KAAnH,CAAR;AACH,CAFM;;;AAGP,MAAMK,IAAI,GAAG,IAAAC,kBAAA,EAAUR,QAAV,CAAb;;;eAEe,IAAAQ,kBAAA,EAAU1B,IAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","layout","textAlign","props","onPress","createActionProp","label","createTextProp","group","GROUPS","basic","defaultValue","color","createColorProp"],"sources":["ActionSheetItem.
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","button","triggers","Triggers","OnPress","layout","textAlign","props","onPress","createActionProp","label","createTextProp","group","GROUPS","basic","defaultValue","color","createColorProp"],"sources":["ActionSheetItem.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createActionProp,\n createColorProp,\n createTextProp,\n GROUPS,\n Triggers,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Action Sheet Item\",\n tag: \"ActionSheetItem\",\n description: \"Action Sheet item\",\n category: COMPONENT_TYPES.button,\n triggers: [Triggers.OnPress],\n layout: {\n textAlign: \"center\",\n },\n props: {\n onPress: createActionProp(),\n label: createTextProp({\n group: GROUPS.basic,\n label: \"Label\",\n defaultValue: \"Option\",\n }),\n color: createColorProp({\n label: \"Font Color\",\n defaultValue: \"strong\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,mBADiB;EAEvBC,GAAG,EAAE,iBAFkB;EAGvBC,WAAW,EAAE,mBAHU;EAIvBC,QAAQ,EAAEC,sBAAA,CAAgBC,MAJH;EAKvBC,QAAQ,EAAE,CAACC,eAAA,CAASC,OAAV,CALa;EAMvBC,MAAM,EAAE;IACNC,SAAS,EAAE;EADL,CANe;EASvBC,KAAK,EAAE;IACLC,OAAO,EAAE,IAAAC,uBAAA,GADJ;IAELC,KAAK,EAAE,IAAAC,qBAAA,EAAe;MACpBC,KAAK,EAAEC,aAAA,CAAOC,KADM;MAEpBJ,KAAK,EAAE,OAFa;MAGpBK,YAAY,EAAE;IAHM,CAAf,CAFF;IAOLC,KAAK,EAAE,IAAAC,sBAAA,EAAgB;MACrBP,KAAK,EAAE,YADc;MAErBK,YAAY,EAAE;IAFO,CAAhB;EAPF;AATgB,CAAlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","layout","flexGrow","flexShrink","flexBasis","props","tint","label","editable","required","defaultValue","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","group","GROUPS","basic","intensity","number","NUMBER","min","max","step","precision"],"sources":["BlurView.
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","description","doc_link","code_link","category","COMPONENT_TYPES","layout","flexGrow","flexShrink","flexBasis","props","tint","label","editable","required","defaultValue","formType","FORM_TYPES","flatArray","propType","PROP_TYPES","STRING","options","group","GROUPS","basic","intensity","number","NUMBER","min","max","step","precision"],"sources":["BlurView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n FORM_TYPES,\n PROP_TYPES,\n GROUPS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Blur View\",\n tag: \"BlurView\",\n description: \"Expo Blur View\",\n doc_link: \"https://docs.expo.io/versions/latest/sdk/blur-view/\",\n code_link:\n \"https://github.com/expo/expo/blob/master/packages/expo/src/effects/BlurView.d.ts\",\n category: COMPONENT_TYPES.layout,\n layout: {\n flexGrow: 1,\n flexShrink: 1,\n flexBasis: 0,\n },\n props: {\n tint: {\n label: \"Tint\",\n description: \"The tint of the blur view\",\n editable: true,\n required: true,\n defaultValue: \"default\",\n formType: FORM_TYPES.flatArray,\n propType: PROP_TYPES.STRING,\n options: [\"default\", \"light\", \"dark\"],\n group: GROUPS.basic,\n },\n intensity: {\n label: \"Intensity\",\n description:\n \"A number from 1 to 100 that controls the intensity of the blur effect\",\n editable: true,\n required: true,\n defaultValue: 50,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n min: 0,\n max: 100,\n step: 1,\n precision: 0,\n group: GROUPS.basic,\n },\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,WADiB;EAEvBC,GAAG,EAAE,UAFkB;EAGvBC,WAAW,EAAE,gBAHU;EAIvBC,QAAQ,EAAE,qDAJa;EAKvBC,SAAS,EACP,kFANqB;EAOvBC,QAAQ,EAAEC,sBAAA,CAAgBC,MAPH;EAQvBA,MAAM,EAAE;IACNC,QAAQ,EAAE,CADJ;IAENC,UAAU,EAAE,CAFN;IAGNC,SAAS,EAAE;EAHL,CARe;EAavBC,KAAK,EAAE;IACLC,IAAI,EAAE;MACJC,KAAK,EAAE,MADH;MAEJX,WAAW,EAAE,2BAFT;MAGJY,QAAQ,EAAE,IAHN;MAIJC,QAAQ,EAAE,IAJN;MAKJC,YAAY,EAAE,SALV;MAMJC,QAAQ,EAAEC,iBAAA,CAAWC,SANjB;MAOJC,QAAQ,EAAEC,iBAAA,CAAWC,MAPjB;MAQJC,OAAO,EAAE,CAAC,SAAD,EAAY,OAAZ,EAAqB,MAArB,CARL;MASJC,KAAK,EAAEC,aAAA,CAAOC;IATV,CADD;IAYLC,SAAS,EAAE;MACTd,KAAK,EAAE,WADE;MAETX,WAAW,EACT,uEAHO;MAITY,QAAQ,EAAE,IAJD;MAKTC,QAAQ,EAAE,IALD;MAMTC,YAAY,EAAE,EANL;MAOTC,QAAQ,EAAEC,iBAAA,CAAWU,MAPZ;MAQTR,QAAQ,EAAEC,iBAAA,CAAWQ,MARZ;MASTC,GAAG,EAAE,CATI;MAUTC,GAAG,EAAE,GAVI;MAWTC,IAAI,EAAE,CAXG;MAYTC,SAAS,EAAE,CAZF;MAaTT,KAAK,EAAEC,aAAA,CAAOC;IAbL;EAZN;AAbgB,CAAlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA_PROPS","image","group","GROUPS","data","label","description","formType","FORM_TYPES","propType","PROP_TYPES","ASSET","defaultValue","editable","required","title","string","STRING","leftDescription","rightDescription","icon","basic","aspectRatio","NUMBER","rating","number","min","max","step","precision","elevation","createElevationType","SEED_DATA","name","tag","category","COMPONENT_TYPES","card","preview_image_url","supports_list_render","props","numColumns","uncategorized","layout"],"sources":["CardContainerRating.
|
|
1
|
+
{"version":3,"names":["SEED_DATA_PROPS","image","group","GROUPS","data","label","description","formType","FORM_TYPES","propType","PROP_TYPES","ASSET","defaultValue","editable","required","title","string","STRING","leftDescription","rightDescription","icon","basic","aspectRatio","NUMBER","rating","number","min","max","step","precision","elevation","createElevationType","SEED_DATA","name","tag","category","COMPONENT_TYPES","card","preview_image_url","supports_list_render","props","numColumns","uncategorized","layout"],"sources":["CardContainerRating.js"],"sourcesContent":["import { GROUPS, FORM_TYPES, PROP_TYPES, COMPONENT_TYPES, createElevationType, } from \"@draftbit/types\";\nconst SEED_DATA_PROPS = {\n image: {\n group: GROUPS.data,\n label: \"Image\",\n description: \"Image\",\n formType: FORM_TYPES.image,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n title: {\n group: GROUPS.data,\n label: \"Title\",\n description: \"Text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"Beautiful West Coast Villa\",\n editable: true,\n required: false,\n },\n leftDescription: {\n group: GROUPS.data,\n label: \"Left description\",\n description: \"Text to display on the left\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"San Diego\",\n editable: true,\n required: false,\n },\n rightDescription: {\n group: GROUPS.data,\n label: \"Right description\",\n description: \"Text to display on the right\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"$100\",\n editable: true,\n required: false,\n },\n icon: {\n group: GROUPS.basic,\n label: \"Icon\",\n description: \"Icon to display on the top right\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n aspectRatio: {\n group: GROUPS.basic,\n label: \"Aspect ratio\",\n description: \"Aspect ratio of the image\",\n formType: FORM_TYPES.aspectRatio,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 1.5,\n editable: true,\n required: false,\n },\n rating: {\n group: GROUPS.data,\n label: \"Rating\",\n description: \"Number of stars to show. A number 0-5.\",\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 5,\n min: 0,\n max: 5,\n step: 1,\n precision: 0,\n editable: true,\n required: false,\n },\n elevation: createElevationType(2),\n};\nexport const SEED_DATA = [\n {\n name: \"Medium Card (Rating)\",\n tag: \"CardContainerRating\",\n description: \"An elevated card with a title and description, that takes up half of its container.\",\n category: COMPONENT_TYPES.card,\n preview_image_url: \"{CLOUDINARY_URL}/Card_ContainerRating_2col.png\",\n supports_list_render: true,\n props: {\n ...SEED_DATA_PROPS,\n numColumns: {\n label: \"Number of Columns\",\n description: \"Numbre of columns\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 2,\n editable: false,\n required: false,\n },\n },\n layout: {},\n },\n {\n name: \"Large Card (Rating)\",\n tag: \"CardContainerRating\",\n description: \"An elevated card with a title and description, that takes up its full container.\",\n category: COMPONENT_TYPES.card,\n preview_image_url: \"{CLOUDINARY_URL}/Card_ContainerRating_3col.png\",\n supports_list_render: true,\n props: {\n ...SEED_DATA_PROPS,\n numColumns: {\n label: \"Number of Columns\",\n description: \"Numbre of columns\",\n group: GROUPS.uncategorized,\n formType: FORM_TYPES.number,\n propType: PROP_TYPES.NUMBER,\n defaultValue: 3,\n editable: false,\n required: false,\n },\n },\n layout: {},\n },\n];\n"],"mappings":";;;;;;;AAAA;;AACA,MAAMA,eAAe,GAAG;EACpBC,KAAK,EAAE;IACHC,KAAK,EAAEC,aAAA,CAAOC,IADX;IAEHC,KAAK,EAAE,OAFJ;IAGHC,WAAW,EAAE,OAHV;IAIHC,QAAQ,EAAEC,iBAAA,CAAWP,KAJlB;IAKHQ,QAAQ,EAAEC,iBAAA,CAAWC,KALlB;IAMHC,YAAY,EAAE,IANX;IAOHC,QAAQ,EAAE,IAPP;IAQHC,QAAQ,EAAE;EARP,CADa;EAWpBC,KAAK,EAAE;IACHb,KAAK,EAAEC,aAAA,CAAOC,IADX;IAEHC,KAAK,EAAE,OAFJ;IAGHC,WAAW,EAAE,iBAHV;IAIHC,QAAQ,EAAEC,iBAAA,CAAWQ,MAJlB;IAKHP,QAAQ,EAAEC,iBAAA,CAAWO,MALlB;IAMHL,YAAY,EAA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