@draftbit/core 46.7.9-28aa70.2 → 46.7.9-5e8bea.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.
Files changed (52) hide show
  1. package/lib/commonjs/components/DeprecatedFAB.js +21 -3
  2. package/lib/commonjs/components/Divider.js +14 -1
  3. package/lib/commonjs/components/Shadow.js +42 -0
  4. package/lib/commonjs/index.js +7 -13
  5. package/lib/commonjs/mappings/Shadow.js +94 -0
  6. package/lib/module/components/Shadow.js +34 -0
  7. package/lib/module/components/StepIndicator.js +18 -58
  8. package/lib/module/index.js +1 -1
  9. package/lib/module/mappings/Shadow.js +87 -0
  10. package/lib/typescript/src/components/Shadow.d.ts +24 -0
  11. package/lib/typescript/src/components/Shadow.d.ts.map +1 -0
  12. package/lib/typescript/src/index.d.ts +1 -1
  13. package/lib/typescript/src/index.d.ts.map +1 -1
  14. package/lib/typescript/src/mappings/Shadow.d.ts +173 -0
  15. package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -0
  16. package/package.json +4 -4
  17. package/src/components/Shadow.js +16 -0
  18. package/src/components/Shadow.tsx +58 -0
  19. package/src/index.js +1 -1
  20. package/src/index.tsx +1 -1
  21. package/src/mappings/Shadow.js +87 -0
  22. package/src/mappings/Shadow.ts +95 -0
  23. package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +0 -73
  24. package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +0 -35
  25. package/lib/commonjs/components/DeckSwiper/index.js +0 -20
  26. package/lib/commonjs/mappings/DeckSwiper.js +0 -52
  27. package/lib/commonjs/mappings/DeckSwiperCard.js +0 -16
  28. package/lib/module/components/DeckSwiper/DeckSwiper.js +0 -65
  29. package/lib/module/components/DeckSwiper/DeckSwiperCard.js +0 -27
  30. package/lib/module/components/DeckSwiper/index.js +0 -2
  31. package/lib/module/mappings/DeckSwiper.js +0 -45
  32. package/lib/module/mappings/DeckSwiperCard.js +0 -9
  33. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts +0 -15
  34. package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts.map +0 -1
  35. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +0 -13
  36. package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts.map +0 -1
  37. package/lib/typescript/src/components/DeckSwiper/index.d.ts +0 -3
  38. package/lib/typescript/src/components/DeckSwiper/index.d.ts.map +0 -1
  39. package/lib/typescript/src/mappings/DeckSwiper.d.ts +0 -83
  40. package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +0 -1
  41. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts +0 -9
  42. package/lib/typescript/src/mappings/DeckSwiperCard.d.ts.map +0 -1
  43. package/src/components/DeckSwiper/DeckSwiper.js +0 -34
  44. package/src/components/DeckSwiper/DeckSwiper.tsx +0 -93
  45. package/src/components/DeckSwiper/DeckSwiperCard.js +0 -22
  46. package/src/components/DeckSwiper/DeckSwiperCard.tsx +0 -42
  47. package/src/components/DeckSwiper/index.js +0 -2
  48. package/src/components/DeckSwiper/index.tsx +0 -2
  49. package/src/mappings/DeckSwiper.js +0 -45
  50. package/src/mappings/DeckSwiper.ts +0 -54
  51. package/src/mappings/DeckSwiperCard.js +0 -9
  52. package/src/mappings/DeckSwiperCard.ts +0 -13
@@ -14,7 +14,6 @@ var _theming = require("../theming");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
15
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
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
- 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); }
18
17
  const FAB = _ref => {
19
18
  let {
20
19
  Icon,
@@ -106,7 +105,8 @@ const FAB = _ref => {
106
105
  style: [{
107
106
  elevation
108
107
  }, style]
109
- }, /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({}, rest, {
108
+ }, /*#__PURE__*/React.createElement(_reactNative.Pressable, {
109
+ ...rest,
110
110
  onPress: onPress,
111
111
  accessibilityState: {
112
112
  disabled
@@ -114,7 +114,7 @@ const FAB = _ref => {
114
114
  accessibilityRole: "button",
115
115
  disabled: disabled || loading,
116
116
  style: buttonStyles
117
- }), /*#__PURE__*/React.createElement(_reactNative.View, {
117
+ }, /*#__PURE__*/React.createElement(_reactNative.View, {
118
118
  style: styles.content
119
119
  }, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
120
120
  style: iconStyle
@@ -154,4 +154,22 @@ const styles = _reactNative.StyleSheet.create({
154
154
  }
155
155
  });
156
156
  var _default = (0, _theming.withTheme)(FAB);
157
+ exports.default = _default;ow",
158
+ alignItems: "center",
159
+ justifyContent: "center"
160
+ },
161
+ icon: {
162
+ alignItems: "center",
163
+ justifyContent: "center",
164
+ width: _Config.default.buttonIconSize
165
+ },
166
+ fixed: {
167
+ left: 0,
168
+ right: 0,
169
+ bottom: 0,
170
+ height: 64,
171
+ borderRadius: 0
172
+ }
173
+ });
174
+ var _default = (0, _theming.withTheme)(FAB);
157
175
  exports.default = _default;
@@ -9,7 +9,6 @@ var _reactNative = require("react-native");
9
9
  var _theming = require("../theming");
10
10
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
11
  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; }
12
- 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); }
13
12
  const Divider = _ref => {
14
13
  let {
15
14
  style,
@@ -19,6 +18,20 @@ const Divider = _ref => {
19
18
  },
20
19
  ...rest
21
20
  } = _ref;
21
+ return /*#__PURE__*/React.createElement(_reactNative.View, {
22
+ style: [{
23
+ backgroundColor: color || colors.divider,
24
+ height: _reactNative.StyleSheet.hairlineWidth
25
+ }, style],
26
+ ...rest
27
+ });
28
+ };
29
+ var _default = (0, _theming.withTheme)(Divider);
30
+ exports.default = _default;eme: {
31
+ colors
32
+ },
33
+ ...rest
34
+ } = _ref;
22
35
  return /*#__PURE__*/React.createElement(_reactNative.View, _extends({
23
36
  style: [{
24
37
  backgroundColor: color || colors.divider,
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeShadow = require("react-native-shadow-2");
9
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ 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); }
11
+ const Shadow = _ref => {
12
+ let {
13
+ offsetX = 0,
14
+ offsetY = 0,
15
+ showShadowSideStart = true,
16
+ showShadowSideEnd = true,
17
+ showShadowSideTop = true,
18
+ showShadowSideBottom = true,
19
+ showShadowCornerTopStart = true,
20
+ showShadowCornerTopEnd = true,
21
+ showShadowCornerBottomStart = true,
22
+ showShadowCornerBottomEnd = true,
23
+ ...rest
24
+ } = _ref;
25
+ return /*#__PURE__*/_react.default.createElement(_reactNativeShadow.Shadow, _extends({
26
+ offset: [offsetX, offsetY],
27
+ sides: {
28
+ start: showShadowSideStart,
29
+ end: showShadowSideEnd,
30
+ top: showShadowSideTop,
31
+ bottom: showShadowSideBottom
32
+ },
33
+ corners: {
34
+ topStart: showShadowCornerTopStart,
35
+ topEnd: showShadowCornerTopEnd,
36
+ bottomStart: showShadowCornerBottomStart,
37
+ bottomEnd: showShadowCornerBottomEnd
38
+ }
39
+ }, rest));
40
+ };
41
+ var _default = Shadow;
42
+ exports.default = _default;
@@ -123,18 +123,6 @@ Object.defineProperty(exports, "DatePicker", {
123
123
  return _DatePicker.default;
124
124
  }
125
125
  });
126
- Object.defineProperty(exports, "DeckSwiper", {
127
- enumerable: true,
128
- get: function () {
129
- return _DeckSwiper.DeckSwiper;
130
- }
131
- });
132
- Object.defineProperty(exports, "DeckSwiperCard", {
133
- enumerable: true,
134
- get: function () {
135
- return _DeckSwiper.DeckSwiperCard;
136
- }
137
- });
138
126
  Object.defineProperty(exports, "DefaultTheme", {
139
127
  enumerable: true,
140
128
  get: function () {
@@ -273,6 +261,12 @@ Object.defineProperty(exports, "ScreenContainer", {
273
261
  return _ScreenContainer.default;
274
262
  }
275
263
  });
264
+ Object.defineProperty(exports, "Shadow", {
265
+ enumerable: true,
266
+ get: function () {
267
+ return _Shadow.default;
268
+ }
269
+ });
276
270
  Object.defineProperty(exports, "Slider", {
277
271
  enumerable: true,
278
272
  get: function () {
@@ -413,7 +407,7 @@ var _ActionSheet = require("./components/ActionSheet");
413
407
  var _Swiper = require("./components/Swiper");
414
408
  var _Layout = require("./components/Layout");
415
409
  var _index = require("./components/RadioButton/index");
416
- var _DeckSwiper = require("./components/DeckSwiper");
410
+ var _Shadow = _interopRequireDefault(require("./components/Shadow"));
417
411
  var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
418
412
  var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
419
413
  var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SEED_DATA = void 0;
7
+ var _types = require("@draftbit/types");
8
+ const SEED_DATA = {
9
+ name: "Shadow",
10
+ tag: "Shadow View",
11
+ description: "A cross-platform, universal shadow.",
12
+ category: _types.COMPONENT_TYPES.view,
13
+ stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
14
+ props: {
15
+ disabled: (0, _types.createDisabledProp)({
16
+ description: "Disables the shadow."
17
+ }),
18
+ startColor: (0, _types.createColorProp)({
19
+ label: "Start Color",
20
+ description: "The initial gradient color of the shadow.",
21
+ defaultValue: null
22
+ }),
23
+ endColor: (0, _types.createColorProp)({
24
+ label: "End Color",
25
+ description: "The final gradient color of the shadow.",
26
+ defaultValue: null
27
+ }),
28
+ distance: (0, _types.createStaticNumberProp)({
29
+ label: "Distance",
30
+ description: "The distance of the shadow."
31
+ }),
32
+ paintInside: (0, _types.createStaticBoolProp)({
33
+ label: "Paint Inside",
34
+ description: "Apply the shadow below/inside the content.",
35
+ defaultValue: null
36
+ }),
37
+ stretch: (0, _types.createStaticBoolProp)({
38
+ label: "Stretch",
39
+ description: "Force children to occupy all available horizontal space.",
40
+ defaultValue: null
41
+ }),
42
+ offsetX: (0, _types.createStaticNumberProp)({
43
+ label: "Offset X",
44
+ description: "Moved the shadow in the x direction",
45
+ defeaultValue: 0
46
+ }),
47
+ offsetY: (0, _types.createStaticNumberProp)({
48
+ label: "Offset Y",
49
+ description: "Moved the shadow in the y direction",
50
+ defeaultValue: 0
51
+ }),
52
+ showShadowSideStart: (0, _types.createStaticBoolProp)({
53
+ label: "Show Shadow Start",
54
+ description: "Whether to show shadow on the start side or not",
55
+ defaultValue: true
56
+ }),
57
+ showShadowSideEnd: (0, _types.createStaticBoolProp)({
58
+ label: "Show Shadow End",
59
+ description: "Whether to show shadow on the end side or not",
60
+ defaultValue: true
61
+ }),
62
+ showShadowSideTop: (0, _types.createStaticBoolProp)({
63
+ label: "Show Shadow Top",
64
+ description: "Whether to show shadow on the top side or not",
65
+ defaultValue: true
66
+ }),
67
+ showShadowSideBottom: (0, _types.createStaticBoolProp)({
68
+ label: "Show Shadow Bottom",
69
+ description: "Whether to show shadow on the bottom side or not",
70
+ defaultValue: true
71
+ }),
72
+ showShadowCornerTopStart: (0, _types.createStaticBoolProp)({
73
+ label: "Show Shadow Top Start Corner",
74
+ description: "Whether to show shadow on the top start corner or not",
75
+ defaultValue: true
76
+ }),
77
+ showShadowCornerTopEnd: (0, _types.createStaticBoolProp)({
78
+ label: "Show Shadow Top End Corner",
79
+ description: "Whether to show shadow on the top end corner or not",
80
+ defaultValue: true
81
+ }),
82
+ showShadowCornerBottomStart: (0, _types.createStaticBoolProp)({
83
+ label: "Show Shadow Bottom Start Corner",
84
+ description: "Whether to show shadow on the bottom start corner or not",
85
+ defaultValue: true
86
+ }),
87
+ showShadowCornerBottomEnd: (0, _types.createStaticBoolProp)({
88
+ label: "Show Shadow Bottom End Corner",
89
+ description: "Whether to show shadow on the bottom end corner or not",
90
+ defaultValue: true
91
+ })
92
+ }
93
+ };
94
+ exports.SEED_DATA = SEED_DATA;
@@ -0,0 +1,34 @@
1
+ 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); }
2
+ import React from "react";
3
+ import { Shadow as ShadowComponent } from "react-native-shadow-2";
4
+ const Shadow = _ref => {
5
+ let {
6
+ offsetX = 0,
7
+ offsetY = 0,
8
+ showShadowSideStart = true,
9
+ showShadowSideEnd = true,
10
+ showShadowSideTop = true,
11
+ showShadowSideBottom = true,
12
+ showShadowCornerTopStart = true,
13
+ showShadowCornerTopEnd = true,
14
+ showShadowCornerBottomStart = true,
15
+ showShadowCornerBottomEnd = true,
16
+ ...rest
17
+ } = _ref;
18
+ return /*#__PURE__*/React.createElement(ShadowComponent, _extends({
19
+ offset: [offsetX, offsetY],
20
+ sides: {
21
+ start: showShadowSideStart,
22
+ end: showShadowSideEnd,
23
+ top: showShadowSideTop,
24
+ bottom: showShadowSideBottom
25
+ },
26
+ corners: {
27
+ topStart: showShadowCornerTopStart,
28
+ topEnd: showShadowCornerTopEnd,
29
+ bottomStart: showShadowCornerBottomStart,
30
+ bottomEnd: showShadowCornerBottomEnd
31
+ }
32
+ }, rest));
33
+ };
34
+ export default Shadow;
@@ -1,3 +1,6 @@
1
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1
4
  // @ts-nocheck
2
5
  import React, { Component } from "react";
3
6
  import { View, Text, StyleSheet, Animated, TouchableWithoutFeedback } from "react-native";
@@ -9,7 +12,7 @@ const STEP_STATUS = {
9
12
  export default class StepIndicator extends Component {
10
13
  constructor(props) {
11
14
  super(props);
12
- this.renderProgressBarBackground = () => {
15
+ _defineProperty(this, "renderProgressBarBackground", () => {
13
16
  const {
14
17
  stepCount,
15
18
  direction
@@ -52,8 +55,8 @@ export default class StepIndicator extends Component {
52
55
  },
53
56
  style: progressBarBackgroundStyle
54
57
  });
55
- };
56
- this.renderProgressBar = () => {
58
+ });
59
+ _defineProperty(this, "renderProgressBar", () => {
57
60
  const {
58
61
  stepCount,
59
62
  direction
@@ -83,8 +86,8 @@ export default class StepIndicator extends Component {
83
86
  return /*#__PURE__*/React.createElement(Animated.View, {
84
87
  style: progressBarStyle
85
88
  });
86
- };
87
- this.renderStepIndicator = () => {
89
+ });
90
+ _defineProperty(this, "renderStepIndicator", () => {
88
91
  let steps = [];
89
92
  const {
90
93
  stepCount,
@@ -115,8 +118,8 @@ export default class StepIndicator extends Component {
115
118
  height: this.state.customStyles.currentStepIndicatorSize
116
119
  }]
117
120
  }, steps);
118
- };
119
- this.renderStepLabels = () => {
121
+ });
122
+ _defineProperty(this, "renderStepLabels", () => {
120
123
  const {
121
124
  labels,
122
125
  direction,
@@ -158,8 +161,8 @@ export default class StepIndicator extends Component {
158
161
  alignItems: this.state.customStyles.labelAlign
159
162
  }]
160
163
  }, labelViews);
161
- };
162
- this.renderStep = position => {
164
+ });
165
+ _defineProperty(this, "renderStep", position => {
163
166
  const {
164
167
  renderStepIndicator
165
168
  } = this.props;
@@ -226,8 +229,8 @@ export default class StepIndicator extends Component {
226
229
  }) : /*#__PURE__*/React.createElement(Text, {
227
230
  style: indicatorLabelStyle
228
231
  }, "".concat(position + 1)));
229
- };
230
- this.getStepStatus = stepPosition => {
232
+ });
233
+ _defineProperty(this, "getStepStatus", stepPosition => {
231
234
  const {
232
235
  currentPosition
233
236
  } = this.props;
@@ -238,8 +241,8 @@ export default class StepIndicator extends Component {
238
241
  } else {
239
242
  return STEP_STATUS.UNFINISHED;
240
243
  }
241
- };
242
- this.onCurrentPositionChanged = position => {
244
+ });
245
+ _defineProperty(this, "onCurrentPositionChanged", position => {
243
246
  let {
244
247
  stepCount
245
248
  } = this.props;
@@ -259,7 +262,7 @@ export default class StepIndicator extends Component {
259
262
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
260
263
  duration: 100
261
264
  })])]).start();
262
- };
265
+ });
263
266
  const defaultStyles = {
264
267
  stepIndicatorSize: 30,
265
268
  currentStepIndicatorSize: 40,
@@ -325,6 +328,7 @@ export default class StepIndicator extends Component {
325
328
  // ),
326
329
  // }));
327
330
  // }
331
+
328
332
  if (prevProps.currentPosition !== this.props.currentPosition) {
329
333
  this.onCurrentPositionChanged(this.props.currentPosition);
330
334
  }
@@ -365,50 +369,6 @@ const styles = StyleSheet.create({
365
369
  justifyContent: "center"
366
370
  }
367
371
  });
368
- StepIndicator.defaultProps = {
369
- currentPosition: 0,
370
- stepCount: 5,
371
- customStyles: {},
372
- direction: "horizontal"
373
- };rrentPositionChanged(this.props.currentPosition);
374
- }
375
- }
376
- }
377
- const styles = StyleSheet.create({
378
- container: {
379
- backgroundColor: "transparent"
380
- },
381
- stepIndicatorContainer: {
382
- flexDirection: "row",
383
- alignItems: "center",
384
- justifyContent: "space-around",
385
- backgroundColor: "transparent"
386
- },
387
- stepLabelsContainer: {
388
- justifyContent: "space-around"
389
- },
390
- step: {
391
- alignItems: "center",
392
- justifyContent: "center",
393
- zIndex: 2
394
- },
395
- stepContainer: {
396
- flex: 1,
397
- flexDirection: "row",
398
- alignItems: "center",
399
- justifyContent: "center"
400
- },
401
- stepLabel: {
402
- fontSize: 12,
403
- textAlign: "center",
404
- fontWeight: "500"
405
- },
406
- stepLabelItem: {
407
- flex: 1,
408
- alignItems: "center",
409
- justifyContent: "center"
410
- }
411
- });
412
372
  StepIndicator.defaultProps = {
413
373
  currentPosition: 0,
414
374
  stepCount: 5,
@@ -31,7 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel } from "./components/Ac
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup } from "./components/RadioButton/index";
34
- export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
34
+ export { default as Shadow } from "./components/Shadow";
35
35
 
36
36
  /* Deprecated: Fix or Delete! */
37
37
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
@@ -0,0 +1,87 @@
1
+ import { COMPONENT_TYPES, CONTAINER_COMPONENT_STYLES_SECTIONS, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp } from "@draftbit/types";
2
+ export const SEED_DATA = {
3
+ name: "Shadow",
4
+ tag: "Shadow View",
5
+ description: "A cross-platform, universal shadow.",
6
+ category: COMPONENT_TYPES.view,
7
+ stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
8
+ props: {
9
+ disabled: createDisabledProp({
10
+ description: "Disables the shadow."
11
+ }),
12
+ startColor: createColorProp({
13
+ label: "Start Color",
14
+ description: "The initial gradient color of the shadow.",
15
+ defaultValue: null
16
+ }),
17
+ endColor: createColorProp({
18
+ label: "End Color",
19
+ description: "The final gradient color of the shadow.",
20
+ defaultValue: null
21
+ }),
22
+ distance: createStaticNumberProp({
23
+ label: "Distance",
24
+ description: "The distance of the shadow."
25
+ }),
26
+ paintInside: createStaticBoolProp({
27
+ label: "Paint Inside",
28
+ description: "Apply the shadow below/inside the content.",
29
+ defaultValue: null
30
+ }),
31
+ stretch: createStaticBoolProp({
32
+ label: "Stretch",
33
+ description: "Force children to occupy all available horizontal space.",
34
+ defaultValue: null
35
+ }),
36
+ offsetX: createStaticNumberProp({
37
+ label: "Offset X",
38
+ description: "Moved the shadow in the x direction",
39
+ defeaultValue: 0
40
+ }),
41
+ offsetY: createStaticNumberProp({
42
+ label: "Offset Y",
43
+ description: "Moved the shadow in the y direction",
44
+ defeaultValue: 0
45
+ }),
46
+ showShadowSideStart: createStaticBoolProp({
47
+ label: "Show Shadow Start",
48
+ description: "Whether to show shadow on the start side or not",
49
+ defaultValue: true
50
+ }),
51
+ showShadowSideEnd: createStaticBoolProp({
52
+ label: "Show Shadow End",
53
+ description: "Whether to show shadow on the end side or not",
54
+ defaultValue: true
55
+ }),
56
+ showShadowSideTop: createStaticBoolProp({
57
+ label: "Show Shadow Top",
58
+ description: "Whether to show shadow on the top side or not",
59
+ defaultValue: true
60
+ }),
61
+ showShadowSideBottom: createStaticBoolProp({
62
+ label: "Show Shadow Bottom",
63
+ description: "Whether to show shadow on the bottom side or not",
64
+ defaultValue: true
65
+ }),
66
+ showShadowCornerTopStart: createStaticBoolProp({
67
+ label: "Show Shadow Top Start Corner",
68
+ description: "Whether to show shadow on the top start corner or not",
69
+ defaultValue: true
70
+ }),
71
+ showShadowCornerTopEnd: createStaticBoolProp({
72
+ label: "Show Shadow Top End Corner",
73
+ description: "Whether to show shadow on the top end corner or not",
74
+ defaultValue: true
75
+ }),
76
+ showShadowCornerBottomStart: createStaticBoolProp({
77
+ label: "Show Shadow Bottom Start Corner",
78
+ description: "Whether to show shadow on the bottom start corner or not",
79
+ defaultValue: true
80
+ }),
81
+ showShadowCornerBottomEnd: createStaticBoolProp({
82
+ label: "Show Shadow Bottom End Corner",
83
+ description: "Whether to show shadow on the bottom end corner or not",
84
+ defaultValue: true
85
+ })
86
+ }
87
+ };
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { StyleProp, ViewStyle } from "react-native";
3
+ interface ShadowProps {
4
+ disabled?: boolean;
5
+ startColor?: string;
6
+ endColor?: string;
7
+ distance?: number;
8
+ paintInside?: boolean;
9
+ stretch?: boolean;
10
+ offsetX?: number;
11
+ offsetY?: number;
12
+ showShadowSideStart?: boolean;
13
+ showShadowSideEnd?: boolean;
14
+ showShadowSideTop?: boolean;
15
+ showShadowSideBottom?: boolean;
16
+ showShadowCornerTopStart?: boolean;
17
+ showShadowCornerTopEnd?: boolean;
18
+ showShadowCornerBottomStart?: boolean;
19
+ showShadowCornerBottomEnd?: boolean;
20
+ style?: StyleProp<ViewStyle>;
21
+ }
22
+ declare const Shadow: React.FC<React.PropsWithChildren<ShadowProps>>;
23
+ export default Shadow;
24
+ //# sourceMappingURL=Shadow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/components/Shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CA+B1D,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -31,7 +31,7 @@ export { ActionSheet, ActionSheetItem, ActionSheetCancel, } from "./components/A
31
31
  export { Swiper, SwiperItem } from "./components/Swiper";
32
32
  export { Center, Circle, Square, Row, Stack, Spacer, } from "./components/Layout";
33
33
  export { RadioButton, RadioButtonGroup, RadioButtonRow, RadioButtonFieldGroup, } from "./components/RadioButton/index";
34
- export { DeckSwiper, DeckSwiperCard } from "./components/DeckSwiper";
34
+ export { default as Shadow } from "./components/Shadow";
35
35
  export { default as DatePicker } from "./components/DatePicker/DatePicker";
36
36
  export { default as Picker } from "./components/Picker/Picker";
37
37
  export { default as ProgressBar } from "./components/ProgressBar";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAEhE,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC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