@threekit-tools/treble 0.0.15 → 0.0.19

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.
@@ -11,7 +11,7 @@ exports.CardWrapper = exports.CardPrice = exports.CardDescription = exports.Card
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
12
  exports.CardsWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n transition: all 0.2s;\n\n & > div {\n margin-bottom: 5px;\n }\n\n & > div:not(:last-child) {\n margin-right: 5px;\n }\n"], ["\n width: 100%;\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n transition: all 0.2s;\n\n & > div {\n margin-bottom: 5px;\n }\n\n & > div:not(:last-child) {\n margin-right: 5px;\n }\n"])));
13
13
  exports.CardWrapperStyles = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n /* min-height: 234px; */\n width: 170px;\n border-radius: ", ";\n border: 1px solid lightgrey;\n\n background: #fff;\n\n padding: 14px;\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n cursor: pointer;\n"], ["\n /* min-height: 234px; */\n width: 170px;\n border-radius: ", ";\n border: 1px solid lightgrey;\n\n background: #fff;\n\n padding: 14px;\n\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n\n cursor: pointer;\n"])), function (props) { return props.theme.borderRadius; });
14
- exports.CardThumbnail = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 120px;\n width: 100%;\n margin-bottom: 5px;\n text-align: center;\n\n ", "\n\n img {\n height: 120px;\n width: auto;\n object-fit: cover;\n }\n"], ["\n height: 120px;\n width: 100%;\n margin-bottom: 5px;\n text-align: center;\n\n ", "\n\n img {\n height: 120px;\n width: auto;\n object-fit: cover;\n }\n"])), function (props) { return (props.color ? "background: ".concat(props.color, ";") : ''); });
14
+ exports.CardThumbnail = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 120px;\n width: 100%;\n margin-bottom: 5px;\n text-align: center;\n display: block;\n\n ", "\n\n img {\n height: 120px;\n width: auto;\n object-fit: cover;\n }\n"], ["\n height: 120px;\n width: 100%;\n margin-bottom: 5px;\n text-align: center;\n display: block;\n\n ", "\n\n img {\n height: 120px;\n width: auto;\n object-fit: cover;\n }\n"])), function (props) { return (props.color ? "background: ".concat(props.color, ";") : ''); });
15
15
  exports.CardTitle = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n color: ", ";\n font-weight: 400;\n font-size: 14px;\n font-family: ", ";\n line-height: 20px;\n text-align: center;\n transition: all 0.2s;\n"], ["\n color: ", ";\n font-weight: 400;\n font-size: 14px;\n font-family: ", ";\n line-height: 20px;\n text-align: center;\n transition: all 0.2s;\n"])), function (props) { return props.theme.textColor; }, function (props) { return props.theme.fontFamily; });
16
16
  exports.CardDescription = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n font-weight: 400;\n font-size: 13px;\n font-family: ", ";\n line-height: 20px;\n text-align: center;\n padding-bottom: 5px;\n transition: all 0.2s;\n"], ["\n color: ", ";\n font-weight: 400;\n font-size: 13px;\n font-family: ", ";\n line-height: 20px;\n text-align: center;\n padding-bottom: 5px;\n transition: all 0.2s;\n"])), function (props) { return props.theme.textColorSecondary; }, function (props) { return props.theme.fontFamily; });
17
17
  exports.CardPrice = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n color: ", ";\n font-weight: 600;\n font-size: 14px;\n font-family: ", ";\n line-height: 20px;\n text-align: center;\n transition: all 0.2s;\n"], ["\n color: ", ";\n font-weight: 600;\n font-size: 14px;\n font-family: ", ";\n line-height: 20px;\n text-align: center;\n transition: all 0.2s;\n"])), function (props) { return props.theme.textColorSecondary; }, function (props) { return props.theme.fontFamily; });
@@ -17,7 +17,7 @@ var Thumbnail = function (props) {
17
17
  var imageUrl = props.imageUrl, color = props.color, name = props.name, className = props.className;
18
18
  if (!imageUrl && !color)
19
19
  return null;
20
- return (react_1.default.createElement(cards_styles_1.CardThumbnail, { className: "".concat(className, " option-thumbnail"), color: color }, imageUrl ? react_1.default.createElement("img", { src: imageUrl, alt: name || '' }) : null));
20
+ return (react_1.default.createElement(cards_styles_1.CardThumbnail, { className: "".concat(className, " option-thumbnail"), color: color }, imageUrl ? react_1.default.createElement("img", { src: imageUrl, alt: name || '' }) : react_1.default.createElement("span", null)));
21
21
  };
22
22
  var Title = function (props) {
23
23
  var name = props.name, className = props.className;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import PropTypes from 'prop-types';
2
3
  interface FlatFormProps {
3
4
  title?: string;
@@ -17,7 +17,7 @@ var Thumbnail = function (props) {
17
17
  var imageUrl = props.imageUrl, color = props.color, name = props.name, className = props.className;
18
18
  if (!imageUrl && !color)
19
19
  return null;
20
- return (react_1.default.createElement(strips_styles_1.StripThumbnail, { className: "".concat(className, " option-thumbnail"), color: color }, imageUrl ? react_1.default.createElement("img", { src: imageUrl, alt: name || '' }) : null));
20
+ return (react_1.default.createElement(strips_styles_1.StripThumbnail, { className: "".concat(className, " option-thumbnail"), color: color }, imageUrl ? react_1.default.createElement("img", { src: imageUrl, alt: name || '' }) : react_1.default.createElement("span", null)));
21
21
  };
22
22
  var Title = function (props) {
23
23
  var name = props.name, className = props.className;
@@ -11,7 +11,7 @@ exports.StripWrapper = exports.StripPrice = exports.StripDescription = exports.S
11
11
  var styled_components_1 = __importDefault(require("styled-components"));
12
12
  exports.StripsWrapper = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n & > div:not(:first-child) {\n margin-top: 8px;\n }\n"], ["\n display: flex;\n flex-direction: column;\n\n & > div:not(:first-child) {\n margin-top: 8px;\n }\n"])));
13
13
  exports.StripWrapperStyles = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: max-content;\n width: 100%;\n border-radius: ", ";\n border: 1px solid lightgrey;\n background: #fff;\n\n padding: 5px 12px;\n\n display: grid;\n grid-template-columns: max-content auto max-content;\n grid-gap: 8px;\n\n cursor: pointer;\n\n & > div:nth-child(2) {\n height: max-content;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n }\n"], ["\n height: max-content;\n width: 100%;\n border-radius: ", ";\n border: 1px solid lightgrey;\n background: #fff;\n\n padding: 5px 12px;\n\n display: grid;\n grid-template-columns: max-content auto max-content;\n grid-gap: 8px;\n\n cursor: pointer;\n\n & > div:nth-child(2) {\n height: max-content;\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n }\n"])), function (props) { return props.theme.borderRadius || '2px'; });
14
- exports.StripThumbnail = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 48px;\n width: 48px;\n margin-right: 5px;\n\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"], ["\n height: 48px;\n width: 48px;\n margin-right: 5px;\n\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"])), function (props) {
14
+ exports.StripThumbnail = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 48px;\n width: 48px;\n margin-right: 5px;\n display: block;\n\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"], ["\n height: 48px;\n width: 48px;\n margin-right: 5px;\n display: block;\n\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"])), function (props) {
15
15
  return props.color
16
16
  ? "background: ".concat(props.color, "; border-radius: ").concat(props.theme.borderRadius, ";")
17
17
  : '';
@@ -27,7 +27,7 @@ var Thumbnail = function (props) {
27
27
  var imageUrl = props.imageUrl, color = props.color, name = props.name, shape = props.shape, className = props.className;
28
28
  if (!imageUrl && !color)
29
29
  return react_1.default.createElement("div", null);
30
- return (react_1.default.createElement(swatch_styles_1.OptionThumbnail, { className: "".concat(className, " option-thumbnail"), color: color, shape: shape }, imageUrl ? react_1.default.createElement("img", { src: imageUrl, alt: name || '' }) : null));
30
+ return (react_1.default.createElement(swatch_styles_1.OptionThumbnail, { className: "".concat(className, " option-thumbnail"), color: color, shape: shape }, imageUrl ? react_1.default.createElement("img", { src: imageUrl, alt: name || '' }) : react_1.default.createElement("span", null)));
31
31
  };
32
32
  var Swatch = function (props) {
33
33
  var _a = Object.assign({ shape: 'round' }, props), title = _a.title, shape = _a.shape, description = _a.description, options = _a.options, value = _a.value, onClick = _a.onClick, customClassName = _a.className, showThumbnail = _a.showThumbnail, showPrice = _a.showPrice, showDescription = _a.showDescription;
@@ -19,7 +19,7 @@ exports.OptionWrapperStyles = styled_components_1.default.div(templateObject_2 |
19
19
  ? ''
20
20
  : "border: 2px solid ".concat(props.theme.primaryColor, "55;");
21
21
  });
22
- exports.OptionThumbnail = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 52px;\n width: 52px;\n text-align: center;\n\n border-radius: ", ";\n overflow: hidden;\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"], ["\n height: 52px;\n width: 52px;\n text-align: center;\n\n border-radius: ", ";\n overflow: hidden;\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"])), function (props) {
22
+ exports.OptionThumbnail = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 52px;\n width: 52px;\n text-align: center;\n display: block;\n\n border-radius: ", ";\n overflow: hidden;\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"], ["\n height: 52px;\n width: 52px;\n text-align: center;\n display: block;\n\n border-radius: ", ";\n overflow: hidden;\n\n ", "\n\n img {\n height: 100%;\n width: auto;\n object-fit: cover;\n }\n"])), function (props) {
23
23
  return props.shape === 'round' ? '50%' : props.theme.borderRadius;
24
24
  }, function (props) { return (props.color ? "background: ".concat(props.color, ";") : ''); });
25
25
  exports.SwatchInfoWrapper = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: max-content;\n position: relative;\n top: -100%;\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n padding-bottom: 4px;\n color: white;\n font-family: ", ";\n\n display: none;\n\n & > div:nth-child(1) {\n background: rgba(0, 0, 0, 0.6);\n padding: 4px 6px;\n border-radius: ", ";\n max-width: 250px;\n }\n\n & > div:nth-child(2) {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n\n & > div {\n width: 0;\n height: 0;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n\n border-top: 8px solid rgba(0, 0, 0, 0.6);\n\n overflow: hidden;\n pointer-events: none;\n }\n }\n"], ["\n width: max-content;\n position: relative;\n top: -100%;\n left: 50%;\n transform: translateX(-50%) translateY(-100%);\n padding-bottom: 4px;\n color: white;\n font-family: ", ";\n\n display: none;\n\n & > div:nth-child(1) {\n background: rgba(0, 0, 0, 0.6);\n padding: 4px 6px;\n border-radius: ", ";\n max-width: 250px;\n }\n\n & > div:nth-child(2) {\n display: flex;\n flex-direction: row;\n justify-content: space-around;\n\n & > div {\n width: 0;\n height: 0;\n border-left: 8px solid transparent;\n border-right: 8px solid transparent;\n\n border-top: 8px solid rgba(0, 0, 0, 0.6);\n\n overflow: hidden;\n pointer-events: none;\n }\n }\n"])), function (props) { return props.theme.fontFamily; }, function (props) { return props.theme.borderRadius; });
@@ -45,7 +45,7 @@ interface IPrepAttributeConfig {
45
45
  sort?: string;
46
46
  }
47
47
  export declare const prepAttributeForComponent: (attribute: IThreekitDisplayAttribute, config: IPrepAttributeConfig) => {
48
- selected: string | number | import("../../threekit").IConfigurationAsset | import("../../threekit").IConfigurationColor;
48
+ selected: string | number | import("../../threekit").IConfigurationColor | import("../../threekit").IConfigurationAsset;
49
49
  options: IDisplayAttributeAssetValue[] | {
50
50
  name: string;
51
51
  label: string;
@@ -1,13 +1,13 @@
1
1
  import { TypedUseSelectorHook } from 'react-redux';
2
2
  declare const store: import("@reduxjs/toolkit").EnhancedStore<{
3
3
  threekit: import("./threekit").ThreekitState;
4
- }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<import("redux-thunk").ThunkMiddleware<{
4
+ }, import("redux").AnyAction, import("@reduxjs/toolkit").MiddlewareArray<import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>> | import("redux-thunk").ThunkMiddleware<{
5
5
  threekit: import("./threekit").ThreekitState;
6
6
  }, import("redux").AnyAction, null> | import("redux-thunk").ThunkMiddleware<{
7
7
  threekit: import("./threekit").ThreekitState;
8
8
  }, import("redux").AnyAction, undefined> | import("redux").Middleware<{}, {
9
9
  threekit: import("./threekit").ThreekitState;
10
- }, import("redux").Dispatch<import("redux").AnyAction>> | import("redux").Middleware<{}, any, import("redux").Dispatch<import("redux").AnyAction>>>>;
10
+ }, import("redux").Dispatch<import("redux").AnyAction>>>>;
11
11
  export declare type RootState = ReturnType<typeof store.getState>;
12
12
  export declare type ThreekitDispatch = typeof store.dispatch;
13
13
  export declare const useThreekitDispatch: () => import("@reduxjs/toolkit").ThunkDispatch<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threekit-tools/treble",
3
- "version": "0.0.15",
3
+ "version": "0.0.19",
4
4
  "author": "Amaan Saeed",
5
5
  "license": "MIT",
6
6
  "files": [