@draftbit/core 43.7.2-0fdea1.0 → 43.7.2-244baf.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/Accordion/index.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -19
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/mappings/Switch.js.map +1 -1
- package/lib/module/mappings/Card.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.
|
|
1
|
+
{"version":3,"sources":["index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;AACA","sourcesContent":["export { default as AccordionGroup } from \"./AccordionGroup\";\nexport { default as AccordionItem } from \"./AccordionItem\";\n"]}
|
|
@@ -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 || 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,22 +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.map
|
|
174
|
-
minWidth: 64,
|
|
175
|
-
borderStyle: "solid"
|
|
176
|
-
},
|
|
177
|
-
content: {
|
|
178
|
-
flexDirection: "row",
|
|
179
|
-
alignItems: "center",
|
|
180
|
-
justifyContent: "center"
|
|
181
|
-
},
|
|
182
|
-
icon: {
|
|
183
|
-
width: _Config.default.buttonIconSize
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
var _default = (0, _theming.withTheme)(Button);
|
|
188
|
-
|
|
189
174
|
exports.default = _default;
|
|
190
175
|
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["DeprecatedButton.
|
|
1
|
+
{"version":3,"sources":["DeprecatedButton.tsx"],"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"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAqDA,MAAMA,MAAuB,GAAG,QAc1B;AAAA,MAd2B;AAC/BC,IAAAA,IAD+B;AAE/BC,IAAAA,IAF+B;AAG/BC,IAAAA,QAAQ,GAAG,KAHoB;AAI/BC,IAAAA,IAAI,GAAG,OAJwB;AAK/BC,IAAAA,OAAO,GAAG,KALqB;AAM/BC,IAAAA,UAN+B;AAO/BC,IAAAA,KAAK,EAAEC,aAPwB;AAQ/BC,IAAAA,QAR+B;AAS/BC,IAAAA,OAT+B;AAU/BC,IAAAA,SAAS,GAAG,CAVmB;AAW/BC,IAAAA,KAX+B;AAY/BC,IAAAA,KAAK,EAAE;AAAEC,MAAAA,MAAF;AAAUC,MAAAA,eAAV;AAA2BC,MAAAA,SAA3B;AAAsCC,MAAAA;AAAtC,KAZwB;AAa/B,OAAGC;AAb4B,GAc3B;AACJ,MAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;AACA,QAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;AAEA,MAAIpB,IAAI,KAAK,OAAb,EAAsB;AACpBe,IAAAA,eAAe,GAAGI,WAAlB;;AAEA,QAAIpB,QAAJ,EAAc;AACZkB,MAAAA,SAAS,GAAG,oBAAMP,MAAM,CAACW,OAAb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,IAAA,IAAI,EAAC,OADP;AAEE,IAAA,KAAK,EAAEgB,SAFT;AAGE,IAAA,KAAK,EAAEgB;AAHT,IADM,GAMJ,IAhBN,eAiBE,oBAAC,iBAAD;AAAM,IAAA,aAAa,EAAE,CAArB;AAAwB,IAAA,KAAK,EAAE,CAACJ,SAAD,EAAYhB,UAAU,CAACmC,MAAvB;AAA/B,KACG3C,QADH,CAjBF,CARF,CADF,CADF;AAkCD,CAhID;;AAkIA,MAAM6B,MAAM,GAAGT,wBAAWyB,MAAX,CAAkB;AAC/BF,EAAAA,MAAM,EAAE;AACNG,IAAAA,QAAQ,EAAE,EADJ;AAENC,IAAAA,WAAW,EAAE;AAFP,GADuB;AAK/BH,EAAAA,OAAO,EAAE;AACPI,IAAAA,aAAa,EAAE,KADR;AAEPC,IAAAA,UAAU,EAAE,QAFL;AAGPC,IAAAA,cAAc,EAAE;AAHT,GALsB;AAU/BzD,EAAAA,IAAI,EAAE;AACJuC,IAAAA,KAAK,EAAEC,gBAAOC;AADV;AAVyB,CAAlB,CAAf;;eAee,wBAAU3C,MAAV,C","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<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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Switch.
|
|
1
|
+
{"version":3,"sources":["Switch.ts"],"names":["SEED_DATA_TRIGGERS","Triggers","OnValueChange","SEED_DATA","name","tag","category","COMPONENT_TYPES","input","layout","triggers","props","disabled","label","description","fieldName","handlerPropName","valuePropName","defaultValue","activeTrackColor","inactiveTrackColor","activeThumbColor","inactiveThumbColor","marginLeft","marginRight","required","direction","group","GROUPS","data"],"mappings":";;;;;;;AAAA;;AAUA,MAAMA,kBAAkB,GAAG,CAACC,gBAASC,aAAV,CAA3B;AACO,MAAMC,SAAS,GAAG,CACvB;AACEC,EAAAA,IAAI,EAAE,QADR;AAEEC,EAAAA,GAAG,EAAE,QAFP;AAGEC,EAAAA,QAAQ,EAAEC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BAAe;AACvBC,MAAAA,KAAK,EAAE,UADgB;AAEvBC,MAAAA,WAAW,EAAE,wCAFU;AAGvBa,MAAAA,KAAK,EAAEC,cAAOC;AAHS,KAAf,CARL;AAaLd,IAAAA,SAAS,EAAE,gCAAoB;AAC7BC,MAAAA,eAAe,EAAE,eADY;AAE7BC,MAAAA,aAAa,EAAE,OAFc;AAG7BC,MAAAA,YAAY,EAAE;AAHe,KAApB,CAbN;AAkBLC,IAAAA,gBAAgB,EAAE,4BAAgB;AAChCN,MAAAA,KAAK,EAAE;AADyB,KAAhB,CAlBb;AAqBLO,IAAAA,kBAAkB,EAAE,4BAAgB;AAClCP,MAAAA,KAAK,EAAE;AAD2B,KAAhB,CArBf;AAwBLQ,IAAAA,gBAAgB,EAAE,4BAAgB;AAChCR,MAAAA,KAAK,EAAE;AADyB,KAAhB,CAxBb;AA2BLS,IAAAA,kBAAkB,EAAE,4BAAgB;AAClCT,MAAAA,KAAK,EAAE;AAD2B,KAAhB;AA3Bf;AATT,CA/BuB,CAAlB","sourcesContent":["import {\n COMPONENT_TYPES,\n GROUPS,\n createBoolProp,\n createColorProp,\n createFieldNameProp,\n createTextProp,\n createRowDirectionProp,\n Triggers,\n} from \"@draftbit/types\";\nconst SEED_DATA_TRIGGERS = [Triggers.OnValueChange];\nexport const SEED_DATA = [\n {\n name: \"Switch\",\n tag: \"Switch\",\n category: COMPONENT_TYPES.input,\n layout: {},\n triggers: SEED_DATA_TRIGGERS,\n props: {\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Boolean to handle disabling the switch\",\n }),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"switchValue\",\n }),\n activeTrackColor: createColorProp({\n label: \"Active Track Color\",\n }),\n inactiveTrackColor: createColorProp({\n label: \"Inactive Track Color\",\n }),\n activeThumbColor: createColorProp({\n label: \"Active Thumb Color\",\n }),\n inactiveThumbColor: createColorProp({\n label: \"Inactive Thumb Color\",\n }),\n },\n },\n {\n name: \"Switch Row\",\n tag: \"SwitchRow\",\n category: COMPONENT_TYPES.input,\n layout: {\n marginLeft: 0,\n marginRight: 0,\n },\n triggers: SEED_DATA_TRIGGERS,\n props: {\n label: createTextProp({\n label: \"Label\",\n description: \"Label to show with the checkbox\",\n required: true,\n defaultValue: \"First Option\",\n }),\n direction: createRowDirectionProp(),\n disabled: createBoolProp({\n label: \"Disabled\",\n description: \"Boolean to handle disabling the switch\",\n group: GROUPS.data,\n }),\n fieldName: createFieldNameProp({\n handlerPropName: \"onValueChange\",\n valuePropName: \"value\",\n defaultValue: \"switchValue\",\n }),\n activeTrackColor: createColorProp({\n label: \"Active Track Color\",\n }),\n inactiveTrackColor: createColorProp({\n label: \"Inactive Track Color\",\n }),\n activeThumbColor: createColorProp({\n label: \"Active Thumb Color\",\n }),\n inactiveThumbColor: createColorProp({\n label: \"Inactive Thumb Color\",\n }),\n },\n },\n];\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Card.
|
|
1
|
+
{"version":3,"sources":["Card.js"],"names":["COMPONENT_TYPES","createElevationType","createTextProp","createImageProp","createIconProp","createAspectRatioProp","createStaticBoolProp","createTextStyle","createActionProp","Triggers","SEED_DATA","name","tag","description","category","card","triggers","OnPress","OnPressIcon","props","onPress","onPressIcon","handlerPropName","elevation","image","title","label","defaultValue","titleStyle","subtitle","subtitleStyle","descriptionStyle","icon","aspectRatio","textCentered"],"mappings":"AAAA,SAASA,eAAT,EAA0BC,mBAA1B,EAA+CC,cAA/C,EAA+DC,eAA/D,EAAgFC,cAAhF,EAAgGC,qBAAhG,EAAuHC,oBAAvH,EAA6IC,eAA7I,EAA8JC,gBAA9J,EAAgLC,QAAhL,QAAiM,iBAAjM;AACA,OAAO,MAAMC,SAAS,GAAG;AACrBC,EAAAA,IAAI,EAAE,MADe;AAErBC,EAAAA,GAAG,EAAE,MAFgB;AAGrBC,EAAAA,WAAW,EAAE,6CAHQ;AAIrBC,EAAAA,QA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AC;AAC/BsB,MAAAA,YAAY,EAAE;AADiB,KAAD,CApC/B;AAuCHO,IAAAA,YAAY,EAAE5B,oBAAoB,CAAC;AAC/BoB,MAAAA,KAAK,EAAE,eADwB;AAE/Bb,MAAAA,WAAW,EAAE;AAFkB,KAAD;AAvC/B;AANc,CAAlB","sourcesContent":["import { COMPONENT_TYPES, createElevationType, createTextProp, createImageProp, createIconProp, createAspectRatioProp, createStaticBoolProp, createTextStyle, createActionProp, Triggers, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Card\",\n tag: \"Card\",\n description: \"A card you can customize however you'd like\",\n category: COMPONENT_TYPES.card,\n triggers: [Triggers.OnPress, Triggers.OnPressIcon],\n props: {\n onPress: createActionProp(),\n onPressIcon: createActionProp({\n handlerPropName: \"onPressIcon\",\n }),\n elevation: createElevationType(3),\n image: createImageProp(),\n title: createTextProp({\n label: \"Title\",\n description: \"Large title text\",\n // defaultValue: \"Title\",\n defaultValue: null,\n }),\n titleStyle: createTextStyle({\n label: \"Title Style\",\n }),\n subtitle: createTextProp({\n label: \"Subtitle\",\n description: \"Text underneath the title\",\n defaultValue: null,\n // defaultValue: \"Edit me in the props panel on the right\",\n }),\n subtitleStyle: createTextStyle({\n label: \"Subtitle Style\",\n }),\n description: createTextProp({\n label: \"Description\",\n description: \"Smallest text underneath subtitle\",\n // defaultValue:\n // \"This bottom text is optional, but shows up to make your life a little easier!\",\n defaultValue: null,\n }),\n descriptionStyle: createTextStyle({\n label: \"Description Style\",\n }),\n icon: createIconProp(),\n aspectRatio: createAspectRatioProp({\n defaultValue: 1.5,\n }),\n textCentered: createStaticBoolProp({\n label: \"Centered Text\",\n description: \"Places your title and subtitle in the center\",\n }),\n },\n};\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "43.7.2-
|
|
3
|
+
"version": "43.7.2-244baf.0+244baf2c",
|
|
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": "^43.7.2-
|
|
44
|
+
"@draftbit/types": "^43.7.2-244baf.0+244baf2c",
|
|
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": "244baf2c91d696402ecc6603d69b0e4f0cbb12cb"
|
|
84
84
|
}
|