@draftbit/core 44.0.6-a68a67.1 → 44.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/ActionSheet/ActionSheetItem.js.map +1 -1
- package/lib/commonjs/components/HeaderMedium.js.map +1 -1
- package/lib/commonjs/components/IconButton.js +20 -5
- package/lib/commonjs/components/IconButton.js.map +1 -1
- package/lib/commonjs/components/Slider.js +22 -5
- package/lib/commonjs/hooks.js.map +1 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/FAB.js.map +1 -1
- package/lib/commonjs/mappings/HeaderOverline.js.map +1 -1
- package/lib/commonjs/mappings/Surface.js.map +1 -1
- package/lib/commonjs/styles/fonts.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.web.js +7 -10
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["ActionSheetItem.
|
|
1
|
+
{"version":3,"sources":["ActionSheetItem.tsx"],"names":["ActionSheetItem","label","style","color","onPress","textStyles","viewStyles","styles","wrapper","StyleSheet","create","borderBottomWidth","hairlineWidth","borderBottomColor","backgroundColor","minHeight","overflow","display","justifyContent","fontSize","textAlign","fontWeight","paddingHorizontal","paddingVertical","alignSelf"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;;;AASA,MAAMA,eAAgC,GAAG,QAAsC;AAAA,MAArC;AAAEC,IAAAA,KAAF;AAASC,IAAAA,KAAT;AAAgBC,IAAAA,KAAhB;AAAuBC,IAAAA;AAAvB,GAAqC;AAC7E,QAAM;AAAEC,IAAAA,UAAF;AAAcC,IAAAA;AAAd,MAA6B,8BAAcJ,KAAd,CAAnC;AACA,sBACE,6BAAC,6BAAD;AACE,IAAA,aAAa,EAAE,GADjB;AAEE,IAAA,KAAK,EAAE,CAACK,MAAM,CAACC,OAAR,EAAiBF,UAAjB,CAFT;AAGE,IAAA,OAAO,EAAEF;AAHX,kBAKE,6BAAC,iBAAD;AAAM,IAAA,KAAK,EAAE,CAACG,MAAM,CAACN,KAAR,EAAeI,UAAf,EAA2B;AAAEF,MAAAA;AAAF,KAA3B;AAAb,KAAqDF,KAArD,CALF,CADF;AASD,CAXD;;AAaA,MAAMM,MAAM,GAAGE,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,OAAO,EAAE;AACPG,IAAAA,iBAAiB,EAAEF,wBAAWG,aADvB;AAEPC,IAAAA,iBAAiB,EAAE,SAFZ;AAGPC,IAAAA,eAAe,EAAE,SAHV;AAIPC,IAAAA,SAAS,EAAE,EAJJ;AAKPC,IAAAA,QAAQ,EAAE,QALH;AAMPC,IAAAA,OAAO,EAAE,MANF;AAOPC,IAAAA,cAAc,EAAE;AAPT,GADsB;AAU/BjB,EAAAA,KAAK,EAAE;AACLkB,IAAAA,QAAQ,EAAE,EADL;AAELC,IAAAA,SAAS,EAAE,QAFN;AAGLjB,IAAAA,KAAK,EAAE,SAHF;AAILkB,IAAAA,UAAU,EAAE,KAJP;AAKLL,IAAAA,QAAQ,EAAE,QALL;AAMLM,IAAAA,iBAAiB,EAAE,EANd;AAOLC,IAAAA,eAAe,EAAE,EAPZ;AAQLC,IAAAA,SAAS,EAAE;AARN;AAVwB,CAAlB,CAAf;;eAsBexB,e","sourcesContent":["import React from \"react\";\nimport {\n Text,\n StyleSheet,\n StyleProp,\n TouchableOpacity,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport { extractStyles } from \"../../utilities\";\n\ntype Props = {\n label: string;\n color: string;\n style?: StyleProp<ViewStyle | TextStyle>;\n onPress?: () => void;\n};\n\nconst ActionSheetItem: React.FC<Props> = ({ label, style, color, onPress }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (\n <TouchableOpacity\n activeOpacity={0.7}\n style={[styles.wrapper, viewStyles]}\n onPress={onPress}\n >\n <Text style={[styles.label, textStyles, { color }]}>{label}</Text>\n </TouchableOpacity>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n borderBottomWidth: StyleSheet.hairlineWidth,\n borderBottomColor: \"#CCCCCC\",\n backgroundColor: \"#F1F1F1\",\n minHeight: 50,\n overflow: \"hidden\",\n display: \"flex\",\n justifyContent: \"center\",\n },\n label: {\n fontSize: 16,\n textAlign: \"center\",\n color: \"#0A84FF\",\n fontWeight: \"500\",\n overflow: \"hidden\",\n paddingHorizontal: 20,\n paddingVertical: 10,\n alignSelf: \"center\",\n },\n});\n\nexport default ActionSheetItem;\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["HeaderMedium.
|
|
1
|
+
{"version":3,"sources":["HeaderMedium.js"],"names":["HeaderMedium","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","React","createElement","Header","titleTypeStyle","headline6","titleColor","strong"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,YAAY,GAAG,QAAmG;AAAA,MAAlG;AAAEC,IAAAA,IAAF;AAAQC,IAAAA,KAAR;AAAeC,IAAAA,UAAf;AAA2BC,IAAAA,IAA3B;AAAiCC,IAAAA,OAAO,GAAG,MAAM,CAAG,CAApD;AAAsDC,IAAAA,KAAtD;AAA6DC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA;AAAV;AAApE,GAAkG;AACpH,sBAAQC,KAAK,CAACC,aAAN,CAAoBC,eAApB,EAA4B;AAAEX,IAAAA,IAAI,EAAEA,IAAR;AAAcY,IAAAA,cAAc,EAAEJ,UAAU,CAACK,SAAzC;AAAoDC,IAAAA,UAAU,EAAEP,MAAM,CAACQ,MAAvE;AAA+Ed,IAAAA,KAAK,EAAEA,KAAtF;AAA6FC,IAAAA,UAAU,EAAEA,UAAzG;AAAqHC,IAAAA,IAAI,EAAEA,IAA3H;AAAiIC,IAAAA,OAAO,EAAEA,OAA1I;AAAmJC,IAAAA,KAAK,EAAEA;AAA1J,GAA5B,CAAR;AACH,CAFD;;eAGe,wBAAUN,YAAV,C","sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Header from \"./Header\";\nconst HeaderMedium = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {\n return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.headline6, titleColor: colors.strong, title: title, buttonText: buttonText, icon: icon, onPress: onPress, style: style }));\n};\nexport default withTheme(HeaderMedium);\n"]}
|
|
@@ -15,8 +15,6 @@ 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 || 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
18
|
const IconButton = _ref => {
|
|
21
19
|
let {
|
|
22
20
|
Icon,
|
|
@@ -31,7 +29,7 @@ const IconButton = _ref => {
|
|
|
31
29
|
...props
|
|
32
30
|
} = _ref;
|
|
33
31
|
const iconColor = customColor || theme.colors.primary;
|
|
34
|
-
return /*#__PURE__*/React.createElement(_reactNative.Pressable,
|
|
32
|
+
return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
|
|
35
33
|
onPress: onPress,
|
|
36
34
|
disabled: disabled || loading,
|
|
37
35
|
style: _ref2 => {
|
|
@@ -45,8 +43,9 @@ const IconButton = _ref => {
|
|
|
45
43
|
alignItems: "center",
|
|
46
44
|
justifyContent: "center"
|
|
47
45
|
}, style];
|
|
48
|
-
}
|
|
49
|
-
|
|
46
|
+
},
|
|
47
|
+
...props
|
|
48
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, null, icon && !loading ? /*#__PURE__*/React.createElement(Icon, {
|
|
50
49
|
name: icon,
|
|
51
50
|
size: size - 2,
|
|
52
51
|
color: iconColor
|
|
@@ -71,5 +70,21 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
71
70
|
|
|
72
71
|
var _default = (0, _theming.withTheme)(IconButton);
|
|
73
72
|
|
|
73
|
+
exports.default = _default;
|
|
74
|
+
//# sourceMappingURL=IconButton.js.map({
|
|
75
|
+
container: {
|
|
76
|
+
alignItems: "center",
|
|
77
|
+
justifyContent: "center",
|
|
78
|
+
..._reactNative.Platform.select({
|
|
79
|
+
web: {
|
|
80
|
+
cursor: "pointer",
|
|
81
|
+
userSelect: "none"
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
var _default = (0, _theming.withTheme)(IconButton);
|
|
88
|
+
|
|
74
89
|
exports.default = _default;
|
|
75
90
|
//# sourceMappingURL=IconButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["IconButton.
|
|
1
|
+
{"version":3,"sources":["IconButton.js"],"names":["IconButton","Icon","icon","color","customColor","size","disabled","loading","onPress","theme","style","props","iconColor","colors","primary","React","createElement","Pressable","pressed","styles","container","opacity","width","height","alignItems","justifyContent","View","name","ActivityIndicator","StyleSheet","create","Platform","select","web","cursor","userSelect"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AACA,MAAMA,UAAU,GAAG,QAAuH;AAAA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B,EAAuC;AAAEvB,IAAAA,IAAI,EAAE,OAAR;AAAiBF,IAAAA,KAAK,EAAES;AAAxB,GAAvC,CAAH,GAAiF,IAF5F,CAbI,CAAR;AAgBH,CAlBD;;AAmBA,MAAMO,MAAM,GAAGU,wBAAWC,MAAX,CAAkB;AAC7BV,EAAAA,SAAS,EAAE;AACPI,IAAAA,UAAU,EAAE,QADL;AAEPC,IAAAA,cAAc,EAAE,QAFT;AAGP,OAAGM,sBAASC,MAAT,CAAgB;AACfC,MAAAA,GAAG,EAAE;AACDC,QAAAA,MAAM,EAAE,SADP;AAEDC,QAAAA,UAAU,EAAE;AAFX;AADU,KAAhB;AAHI;AADkB,CAAlB,CAAf;;eAYe,wBAAUnC,UAAV,C","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet, ActivityIndicator, Pressable, Platform, } from \"react-native\";\nimport { withTheme } from \"../theming\";\nconst IconButton = ({ Icon, icon, color: customColor, size = 32, disabled = false, loading = false, onPress, theme, style, ...props }) => {\n const iconColor = customColor || theme.colors.primary;\n return (React.createElement(Pressable, { onPress: onPress, disabled: disabled || loading, style: ({ pressed }) => {\n return [\n styles.container,\n {\n opacity: pressed || disabled ? 0.75 : 1,\n width: size,\n height: size,\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n style,\n ];\n }, ...props },\n React.createElement(View, null,\n icon && !loading ? (React.createElement(Icon, { name: icon, size: size - 2, color: iconColor })) : null,\n loading ? React.createElement(ActivityIndicator, { size: \"small\", color: iconColor }) : null)));\n};\nconst styles = StyleSheet.create({\n container: {\n alignItems: \"center\",\n justifyContent: \"center\",\n ...Platform.select({\n web: {\n cursor: \"pointer\",\n userSelect: \"none\",\n },\n }),\n },\n});\nexport default withTheme(IconButton);\n"]}
|
|
@@ -23,8 +23,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
23
23
|
|
|
24
24
|
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; }
|
|
25
25
|
|
|
26
|
-
function _extends() { _extends = Object.assign || 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); }
|
|
27
|
-
|
|
28
26
|
function maybeParseValue(value) {
|
|
29
27
|
if (value === undefined) {
|
|
30
28
|
return undefined;
|
|
@@ -91,9 +89,10 @@ function Slider(_ref) {
|
|
|
91
89
|
onValueChange(newValue);
|
|
92
90
|
};
|
|
93
91
|
|
|
94
|
-
return /*#__PURE__*/React.createElement(_reactNative.View,
|
|
95
|
-
style: [styles.container, style]
|
|
96
|
-
|
|
92
|
+
return /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
93
|
+
style: [styles.container, style],
|
|
94
|
+
...rest
|
|
95
|
+
}, leftIcon ? /*#__PURE__*/React.createElement(Icon, {
|
|
97
96
|
color: leftIconThemeColor,
|
|
98
97
|
name: leftIcon,
|
|
99
98
|
size: 24
|
|
@@ -129,5 +128,23 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
129
128
|
|
|
130
129
|
var _default = (0, _theming.withTheme)(Slider);
|
|
131
130
|
|
|
131
|
+
exports.default = _default;
|
|
132
|
+
//# sourceMappingURL=Slider.js.map }) : null);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
const styles = _reactNative.StyleSheet.create({
|
|
136
|
+
container: {
|
|
137
|
+
height: 40,
|
|
138
|
+
flexDirection: "row",
|
|
139
|
+
alignItems: "center"
|
|
140
|
+
},
|
|
141
|
+
slider: {
|
|
142
|
+
flex: 1,
|
|
143
|
+
marginHorizontal: 12
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
var _default = (0, _theming.withTheme)(Slider);
|
|
148
|
+
|
|
132
149
|
exports.default = _default;
|
|
133
150
|
//# sourceMappingURL=Slider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["hooks.
|
|
1
|
+
{"version":3,"sources":["hooks.js"],"names":["usePrevious","value","ref","React","useRef","useEffect","current"],"mappings":";;;;;;;AAAA;;;;AACO,SAASA,WAAT,CAAqBC,KAArB,EAA4B;AAC/B;AACA;AACA,QAAMC,GAAG,GAAGC,eAAMC,MAAN,EAAZ,CAH+B,CAI/B;;;AACAD,iBAAME,SAAN,CAAgB,MAAM;AAClBH,IAAAA,GAAG,CAACI,OAAJ,GAAcL,KAAd;AACH,GAFD,EAEG,CAACA,KAAD,CAFH,EAL+B,CAQ/B;;;AACA,SAAOC,GAAG,CAACI,OAAX;AACH","sourcesContent":["import React from \"react\";\nexport function usePrevious(value) {\n // The ref object is a generic container whose current property is mutable\n // and can hold any value, similar to an instance property on a class\n const ref = React.useRef();\n // Store current value in ref\n React.useEffect(() => {\n ref.current = value;\n }, [value]);\n // Return previous value (happens before update in useEffect above)\n return ref.current;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAKA;;AAEA;;AASA;;AAQA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA","sourcesContent":["export { injectIcon } from \"./interfaces/Icon\";\nexport { withTheme, ThemeProvider } from \"./theming\";\nexport { default as Provider } from \"./Provider\";\nexport { default as DefaultTheme } from \"./styles/DefaultTheme\";\n\nexport { Link } from \"./components/Text\";\nexport { default as Banner } from \"./components/Banner\";\nexport { ButtonSolid, ButtonOutline } from \"./components/Button\";\nexport { default as Avatar } from \"./components/CircleImage\";\nexport { default as AvatarEdit } from \"./components/AvatarEdit\";\nexport { default as Card } from \"./components/Card\";\nexport { default as Carousel } from \"./components/Carousel\";\nexport { Checkbox, CheckboxGroup, CheckboxRow } from \"./components/Checkbox\";\nexport { default as CircleImage } from \"./components/CircleImage\";\nexport { default as Container } from \"./components/Container\";\nexport { default as Divider } from \"./components/Divider\";\nexport { default as FAB } from \"./components/FAB\";\nexport { default as FieldSearchBarFull } from \"./components/FieldSearchBarFull\";\nexport { default as IconButton } from \"./components/IconButton\";\nexport { default as Image } from \"./components/Image\";\nexport { default as NumberInput } from \"./components/NumberInput\";\nexport { default as ScreenContainer } from \"./components/ScreenContainer\";\nexport { default as StarRating } from \"./components/StarRating\";\nexport { default as Surface } from \"./components/Surface\";\nexport { default as Switch, SwitchRow } from \"./components/Switch\";\nexport { default as TextField } from \"./components/TextField\";\nexport { default as ToggleButton } from \"./components/ToggleButton\";\nexport { default as Touchable } from \"./components/Touchable\";\nexport { AccordionGroup, AccordionItem } from \"./components/Accordion\";\nexport {\n ActionSheet,\n ActionSheetItem,\n ActionSheetCancel,\n} from \"./components/ActionSheet\";\nexport { Swiper, SwiperItem } from \"./components/Swiper\";\n\nexport {\n Center,\n Circle,\n Square,\n Row,\n Stack,\n Spacer,\n} from \"./components/Layout\";\n\nexport {\n RadioButton,\n RadioButtonGroup,\n RadioButtonRow,\n RadioButtonFieldGroup,\n} from \"./components/RadioButton/index\";\n\n/* Deprecated: Fix or Delete! */\nexport { default as Button } from \"./components/DeprecatedButton\";\nexport { default as CardBlock } from \"./components/CardBlock\";\nexport { default as CardContainer } from \"./components/CardContainer\";\nexport { default as CardContainerRating } from \"./components/CardContainerRating\";\nexport { default as CardInline } from \"./components/CardInline\";\nexport { default as DatePicker } from \"./components/DatePicker/DatePicker\";\nexport { default as HeaderLarge } from \"./components/HeaderLarge\";\nexport { default as HeaderMedium } from \"./components/HeaderMedium\";\nexport { default as HeaderOverline } from \"./components/HeaderOverline\";\nexport { default as Picker } from \"./components/Picker/Picker\";\nexport { default as ProgressBar } from \"./components/ProgressBar\";\nexport { default as ProgressCircle } from \"./components/ProgressCircle\";\nexport { default as RowBodyIcon } from \"./components/RowBodyIcon\";\nexport { default as RowHeadlineImageCaption } from \"./components/RowHeadlineImageCaption\";\nexport { default as RowHeadlineImageIcon } from \"./components/RowHeadlineImageIcon\";\nexport { default as Slider } from \"./components/Slider\";\nexport { default as Stepper } from \"./components/Stepper\";\nexport { useAuthState } from \"./components/useAuthState\";\n\n// a comment to fix sourcemap comment issue\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["FAB.
|
|
1
|
+
{"version":3,"sources":["FAB.js"],"names":["SEED_DATA","name","tag","category","COMPONENT_TYPES","button","description","layout","triggers","Triggers","OnPress","props","onPress","disabled","label","group","GROUPS","basic","loading","iconName","defaultValue","iconColor","bgColor","size"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,KADe;AAErBC,EAAAA,GAAG,EAAE,KAFgB;AAGrBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAHL;AAIrBC,EAAAA,WAAW,EAAE,uBAJQ;AAKrBC,EAAAA,MAAM,EAAE,EALa;AAMrBC,EAAAA,QAAQ,EAAE,CAACC,gBAASC,OAAV,CANW;AAOrBC,EAAAA,KAAK,EAAE;AACHC,IAAAA,OAAO,EAAE,8BADN;AAEHC,IAAAA,QAAQ,EAAE,2BAAe;AACrBC,MAAAA,KAAK,EAAE,UADc;AAErBC,MAAAA,KAAK,EAAEC,cAAOC;AAFO,KAAf,CAFP;AAMHC,IAAAA,OAAO,EAAE,2BAAe;AACpBJ,MAAAA,KAAK,EAAE,SADa;AAEpBC,MAAAA,KAAK,EAAEC,cAAOC;AAFM,KAAf,CANN;AAUHE,IAAAA,QAAQ,EAAE,2BAAe;AACrBL,MAAAA,KAAK,EAAE,MADc;AAErBM,MAAAA,YAAY,EAAE,IAFO;AAGrBL,MAAAA,KAAK,EAAEC,cAAOC;AAHO,KAAf,CAVP;AAeHI,IAAAA,SAAS,EAAE,4BAAgB;AACvBP,MAAAA,KAAK,EAAE,YADgB;AAEvBM,MAAAA,YAAY,EAAE,IAFS;AAGvBL,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAhB,CAfR;AAoBHK,IAAAA,OAAO,EAAE,4BAAgB;AACrBR,MAAAA,KAAK,EAAE,kBADc;AAErBM,MAAAA,YAAY,EAAE,IAFO;AAGrBL,MAAAA,KAAK,EAAEC,cAAOC;AAHO,KAAhB,CApBN;AAyBHM,IAAAA,IAAI,EAAE;AAzBH;AAPc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createIconProp, createColorProp, GROUPS, createBoolProp, createIconSizeProp, createActionProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"FAB\",\n tag: \"FAB\",\n category: COMPONENT_TYPES.button,\n description: \"A mini round icon FAB\",\n layout: {},\n triggers: [Triggers.OnPress],\n props: {\n onPress: createActionProp(),\n disabled: createBoolProp({\n label: \"Disabled\",\n group: GROUPS.basic,\n }),\n loading: createBoolProp({\n label: \"Loading\",\n group: GROUPS.basic,\n }),\n iconName: createIconProp({\n label: \"Icon\",\n defaultValue: null,\n group: GROUPS.basic,\n }),\n iconColor: createColorProp({\n label: \"Icon color\",\n defaultValue: null,\n group: GROUPS.basic,\n }),\n bgColor: createColorProp({\n label: \"Background color\",\n defaultValue: null,\n group: GROUPS.basic,\n }),\n size: createIconSizeProp(),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["HeaderOverline.
|
|
1
|
+
{"version":3,"sources":["HeaderOverline.js"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","header","preview_image_url","supports_list_render","props","title","group","GROUPS","data","label","formType","FORM_TYPES","string","propType","PROP_TYPES","STRING","defaultValue","editable","required","buttonText","icon","basic","ASSET","onPress","action","layout"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG,CACrB;AACIC,EAAAA,IAAI,EAAE,iBADV;AAEIC,EAAAA,GAAG,EAAE,gBAFT;AAGIC,EAAAA,WAAW,EAAE,wEAHjB;AAIIC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJ9B;AAKIC,EAAAA,iBAAiB,EAAE,8CALvB;AAMIC,EAAAA,oBAAoB,EAAE,KAN1B;AAOIC,EAAAA,KAAK,EAAE;AACHC,IAAAA,KAAK,EAAE;AACHC,MAAAA,KAAK,EAAEC,cAAOC,IADX;AAEHC,MAAAA,KAAK,EAAE,OAFJ;AAGHX,MAAAA,WAAW,EAAE,iBAHV;AA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S, COMPONENT_TYPES, FORM_TYPES, PROP_TYPES, } from \"@draftbit/types\";\nexport const SEED_DATA = [\n {\n name: \"Header Overline\",\n tag: \"HeaderOverline\",\n description: \"A small header with an optional touchable right aligned text and icon.\",\n category: COMPONENT_TYPES.header,\n preview_image_url: \"{CLOUDINARY_URL}/Header_OverlineIconText.png\",\n supports_list_render: false,\n props: {\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: \"Title\",\n editable: true,\n required: false,\n },\n buttonText: {\n group: GROUPS.data,\n label: \"Button text\",\n description: \"Right aligned button text to display\",\n formType: FORM_TYPES.string,\n propType: PROP_TYPES.STRING,\n defaultValue: \"See All\",\n editable: true,\n required: false,\n },\n icon: {\n group: GROUPS.basic,\n label: \"Icon\",\n description: \"Name of icon to display\",\n formType: FORM_TYPES.icon,\n propType: PROP_TYPES.ASSET,\n defaultValue: null,\n editable: true,\n required: false,\n },\n onPress: {\n group: GROUPS.basic,\n label: \"Action\",\n description: \"Action to execute when button pressed\",\n editable: true,\n required: false,\n formType: FORM_TYPES.action,\n propType: PROP_TYPES.STRING,\n defaultValue: null,\n },\n },\n layout: {},\n },\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Surface.
|
|
1
|
+
{"version":3,"sources":["Surface.ts"],"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","layout","minHeight","props","elevation"],"mappings":";;;;;;;AAAA;;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAE,SADiB;AAEvBC,EAAAA,GAAG,EAAE,SAFkB;AAGvBC,EAAAA,WAAW,EAAE,uBAHU;AAIvBC,EAAAA,QAAQ,EAAEC,uBAAgBC,MAJH;AAKvBA,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AADL,GALe;AAQvBC,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,gCAAoB,CAApB;AADN;AARgB,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createElevationType } from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Surface\",\n tag: \"Surface\",\n description: \"An elevated container\",\n category: COMPONENT_TYPES.layout,\n layout: {\n minHeight: 40,\n },\n props: {\n elevation: createElevationType(0),\n },\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["fonts.
|
|
1
|
+
{"version":3,"sources":["fonts.tsx"],"names":["fontConfig","web","regular","fontFamily","fontWeight","medium","light","thin","ios","default","configureFonts","config","fonts","Platform","select"],"mappings":";;;;;;;AACA;;AADA;AAIA,MAAMA,UAAU,GAAG;AACjBC,EAAAA,GAAG,EAAE;AACHC,IAAAA,OAAO,EAAE;AACPC,MAAAA,UAAU,EAAE,wDADL;AAEPC,MAAAA,UAAU,EAAE;AAFL,KADN;AAKHC,IAAAA,MAAM,EAAE;AACNF,MAAAA,UAAU,EAAE,wDADN;AAENC,MAAAA,UAAU,EAAE;AAFN,KALL;AASHE,IAAAA,KAAK,EAAE;AACLH,MAAAA,UAAU,EAAE,wDADP;AAELC,MAAAA,UAAU,EAAE;AAFP,KATJ;AAaHG,IAAAA,IAAI,EAAE;AACJJ,MAAAA,UAAU,EAAE,wDADR;AAEJC,MAAAA,UAAU,EAAE;AAFR;AAbH,GADY;AAmBjBI,EAAAA,GAAG,EAAE;AACHN,IAAAA,OAAO,EAAE;AACPC,MAAAA,UAAU,EAAE,QADL;AAEPC,MAAAA,UAAU,EAAE;AAFL,KADN;AAKHC,IAAAA,MAAM,EAAE;AACNF,MAAAA,UAAU,EAAE,QADN;AAENC,MAAAA,UAAU,EAAE;AAFN,KALL;AASHE,IAAAA,KAAK,EAAE;AACLH,MAAAA,UAAU,EAAE,QADP;AAELC,MAAAA,UAAU,EAAE;AAFP,KATJ;AAaHG,IAAAA,IAAI,EAAE;AACJJ,MAAAA,UAAU,EAAE,QADR;AAEJC,MAAAA,UAAU,EAAE;AAFR;AAbH,GAnBY;AAqCjBK,EAAAA,OAAO,EAAE;AACPP,IAAAA,OAAO,EAAE;AACPC,MAAAA,UAAU,EAAE,YADL;AAEPC,MAAAA,UAAU,EAAE;AAFL,KADF;AAKPC,IAAAA,MAAM,EAAE;AACNF,MAAAA,UAAU,EAAE,mBADN;AAENC,MAAAA,UAAU,EAAE;AAFN,KALD;AASPE,IAAAA,KAAK,EAAE;AACLH,MAAAA,UAAU,EAAE,kBADP;AAELC,MAAAA,UAAU,EAAE;AAFP,KATA;AAaPG,IAAAA,IAAI,EAAE;AACJJ,MAAAA,UAAU,EAAE,iBADR;AAEJC,MAAAA,UAAU,EAAE;AAFR;AAbC;AArCQ,CAAnB;;AAyDe,SAASM,cAAT,CAAwBC,MAAxB,EAEL;AACR,QAAMC,KAAK,GAAGC,sBAASC,MAAT,CAAgB,EAAE,GAAGd,UAAL;AAAiB,OAAGW;AAApB,GAAhB,CAAd;;AACA,SAAOC,KAAP;AACD","sourcesContent":["/* https://github.com/callstack/react-native-paper/blob/main/src/styles/fonts.tsx */\nimport { Platform, PlatformOSType } from \"react-native\";\nimport type { Fonts } from \"@draftbit/types\";\n\nconst fontConfig = {\n web: {\n regular: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"400\" as \"400\",\n },\n medium: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"500\" as \"500\",\n },\n light: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"300\" as \"300\",\n },\n thin: {\n fontFamily: 'Roboto, \"Helvetica Neue\", Helvetica, Arial, sans-serif',\n fontWeight: \"100\" as \"100\",\n },\n },\n ios: {\n regular: {\n fontFamily: \"System\",\n fontWeight: \"400\" as \"400\",\n },\n medium: {\n fontFamily: \"System\",\n fontWeight: \"500\" as \"500\",\n },\n light: {\n fontFamily: \"System\",\n fontWeight: \"300\" as \"300\",\n },\n thin: {\n fontFamily: \"System\",\n fontWeight: \"100\" as \"100\",\n },\n },\n default: {\n regular: {\n fontFamily: \"sans-serif\",\n fontWeight: \"normal\" as \"normal\",\n },\n medium: {\n fontFamily: \"sans-serif-medium\",\n fontWeight: \"normal\" as \"normal\",\n },\n light: {\n fontFamily: \"sans-serif-light\",\n fontWeight: \"normal\" as \"normal\",\n },\n thin: {\n fontFamily: \"sans-serif-thin\",\n fontWeight: \"normal\" as \"normal\",\n },\n },\n};\n\nexport default function configureFonts(config?: {\n [platform in PlatformOSType | \"default\"]?: Fonts;\n}): Fonts {\n const fonts = Platform.select({ ...fontConfig, ...config }) as Fonts;\n return fonts;\n}\n"]}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign || 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); }
|
|
2
|
-
|
|
3
1
|
import * as React from "react";
|
|
4
2
|
import { View, StyleSheet } from "react-native";
|
|
5
3
|
import { Picker as NativePicker } from "@react-native-picker/picker";
|
|
@@ -92,16 +90,15 @@ const Picker = _ref => {
|
|
|
92
90
|
key: o.value
|
|
93
91
|
}))), /*#__PURE__*/React.createElement(View, {
|
|
94
92
|
pointerEvents: "none"
|
|
95
|
-
}, /*#__PURE__*/React.createElement(TextField,
|
|
93
|
+
}, /*#__PURE__*/React.createElement(TextField, { ...props,
|
|
96
94
|
value: selectedLabel,
|
|
97
|
-
placeholder: placeholder
|
|
98
|
-
|
|
99
|
-
ref: textField
|
|
100
|
-
,
|
|
101
|
-
|
|
102
|
-
,
|
|
95
|
+
placeholder: placeholder,
|
|
96
|
+
// @ts-ignore
|
|
97
|
+
ref: textField,
|
|
98
|
+
disabled: disabled,
|
|
99
|
+
// @ts-expect-error
|
|
103
100
|
style: stylesWithoutMargin
|
|
104
|
-
}))))
|
|
101
|
+
}))));
|
|
105
102
|
};
|
|
106
103
|
|
|
107
104
|
const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["PickerComponent.web.
|
|
1
|
+
{"version":3,"sources":["PickerComponent.web.js"],"names":["React","View","StyleSheet","Picker","NativePicker","omit","withTheme","extractStyles","TextField","Touchable","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","textField","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","flatten","selectedLabel","find","o","value","label","createElement","onPress","styles","container","enabled","flex","opacity","position","top","left","right","bottom","width","map","Item","key","pointerEvents","ref","create","alignSelf"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,EAAeC,UAAf,QAAiC,cAAjC;AACA,SAASC,MAAM,IAAIC,YAAnB,QAAuC,6BAAvC;AACA,OAAOC,IAAP,MAAiB,aAAjB;AACA,SAASC,SAAT,QAA0B,eAA1B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,OAAOC,SAAP,MAAsB,cAAtB;AACA,OAAOC,SAAP,MAAsB,cAAtB;;AACA,MAAMN,MAAM,GAAG,QAAkI;AAAA;;AAAA,MAAjI;AAAEO,IAAAA,KAAF;AAASC,IAAAA,OAAT;AAAkBC,IAAAA,WAAlB;AAA+BC,IAAAA,aAA/B;AAA8CC,IAAAA,QAAQ,GAAG,KAAzD;AAAgEC,IAAAA,aAAa,EAAEC,qBAAqB,GAAG,MAAM,CAAG,CAAhH;AAAkH,OAAGC;AAArH,GAAiI;AAC7I,QAAM;AAAEC,IAAAA,UAAU,EAAE;AAAEC,MAAAA,YAAF;AAAgB;AACpCC,MAAAA,WADoB;AACP;AACbC,MAAAA,cAFoB;AAEJ;AAChBC,MAAAA,gBAHoB;AAGF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;;AAuDA,MAAMS,MAAM,GAAG9C,UAAU,CAAC8D,MAAX,CAAkB;AAC7Bf,EAAAA,SAAS,EAAE;AACPgB,IAAAA,SAAS,EAAE;AADJ;AADkB,CAAlB,CAAf;AAKA,eAAe3D,SAAS,CAACH,MAAD,CAAxB","sourcesContent":["import * as React from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport { Picker as NativePicker } from \"@react-native-picker/picker\";\nimport omit from \"lodash.omit\";\nimport { withTheme } from \"../../theming\";\nimport { extractStyles } from \"../../utilities\";\nimport TextField from \"../TextField\";\nimport Touchable from \"../Touchable\";\nconst Picker = ({ style, options, placeholder, selectedValue, disabled = false, onValueChange: onValueChangeOverride = () => { }, ...props }) => {\n const { viewStyles: { borderRadius, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderTopWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderRightWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderBottomWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderLeftWidth, // eslint-disable-line @typescript-eslint/no-unused-vars\n borderColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n backgroundColor, // eslint-disable-line @typescript-eslint/no-unused-vars\n padding, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingTop, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingRight, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingBottom, // eslint-disable-line @typescript-eslint/no-unused-vars\n paddingLeft, // eslint-disable-line @typescript-eslint/no-unused-vars\n ...viewStyles }, } = extractStyles(style);\n const textField = React.useRef(undefined);\n const onValueChange = (itemValue, itemIndex) => {\n toggleFocus();\n onValueChangeOverride(itemValue, itemIndex);\n };\n const toggleFocus = () => {\n if (!disabled) {\n // @ts-ignore\n textField.current.toggleFocus(); // cannot determine if method exists due to component being wrapped in a withTheme()\n }\n };\n const stylesWithoutMargin = style &&\n omit(StyleSheet.flatten(style), [\n \"margin\",\n \"marginTop\",\n \"marginRight\",\n \"marginBottom\",\n \"marginLeft\",\n ]);\n const selectedLabel = selectedValue &&\n (options.find((o) => o.value === selectedValue)?.label ?? selectedValue);\n return (React.createElement(Touchable, { disabled: disabled, onPress: toggleFocus, style: [styles.container, viewStyles] },\n React.createElement(View, null,\n React.createElement(NativePicker, { enabled: !disabled, selectedValue: selectedValue, onValueChange: onValueChange, style: {\n flex: 1,\n opacity: 0,\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n width: \"100%\",\n } }, options.map((o) => (React.createElement(NativePicker.Item, { label: o.label, value: o.value, key: o.value })))),\n React.createElement(View, { pointerEvents: \"none\" },\n React.createElement(TextField, { ...props, value: selectedLabel, placeholder: placeholder, \n // @ts-ignore\n ref: textField, disabled: disabled, \n // @ts-expect-error\n style: stylesWithoutMargin })))));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n});\nexport default withTheme(Picker);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "44.0
|
|
3
|
+
"version": "44.1.0",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/types": "^44.0
|
|
44
|
+
"@draftbit/types": "^44.1.0",
|
|
45
45
|
"@material-ui/core": "^4.11.0",
|
|
46
46
|
"@material-ui/pickers": "^3.2.10",
|
|
47
47
|
"@react-native-community/slider": "4.1.7",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
]
|
|
81
81
|
]
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "08f431a0301ba8d14d4c87c37c5df67d3eaa6f8a"
|
|
84
84
|
}
|