@elliemae/ds-system 2.0.0-rc.11 → 2.0.0-rc.15

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/cjs/index.js CHANGED
@@ -47,7 +47,7 @@ exports.iconColor = utils.iconColor;
47
47
  exports.keyframes = utils.keyframes;
48
48
  exports.onlyFirefox = utils.onlyFirefox;
49
49
  exports.onlySafari = utils.onlySafari;
50
- exports.onlySafariAndFiredox = utils.onlySafariAndFiredox;
50
+ exports.onlySafariAndFirefox = utils.onlySafariAndFirefox;
51
51
  exports.safariAndFirefoxBold = utils.safariAndFirefoxBold;
52
52
  exports.textStyle = utils.textStyle;
53
53
  exports.transition = utils.transition;
@@ -0,0 +1,2 @@
1
+ 'use strict';
2
+
@@ -93,11 +93,21 @@ const styledFunction = function (tag) {
93
93
  }));
94
94
  }
95
95
 
96
- const Component = /*#__PURE__*/styled_component__default["default"](tag).attrs({
97
- className: "".concat(componentName, "-").concat(componentSlot)
98
- }).withConfig({
99
- componentId: "sc-rjg4in-0"
100
- })(transformedStyleArg, ...expressionsWithDefaultTheme);
96
+ let Component = /*#__PURE__*/styled_component__default["default"](tag);
97
+ const displayName = componentName !== null && componentSlot !== null ? "".concat(componentName).concat(componentSlot) : null;
98
+
99
+ if (displayName !== null) {
100
+ Component = Component.attrs({
101
+ className: "".concat(componentName).concat(componentSlot)
102
+ });
103
+ }
104
+
105
+ Component = Component(transformedStyleArg, ...expressionsWithDefaultTheme);
106
+
107
+ if (displayName !== null) {
108
+ Component.displayName = displayName;
109
+ }
110
+
101
111
  return Component;
102
112
  };
103
113
 
package/cjs/utils.js CHANGED
@@ -130,18 +130,10 @@ function transition() {
130
130
  let t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all 1s ease';
131
131
  return "\n transition: ".concat(t, ";\n ");
132
132
  }
133
- function onlySafariAndFiredox(styles) {
134
- return styled_component.css(["@media not all and (min-resolution:0.001dpcm){", "}@media screen and (min--moz-device-pixel-ratio:0){", "}"], styles, styles);
135
- }
136
- function onlySafari(styles) {
137
- return styled_component.css(["@media not all and (min-resolution:0.001dpcm){", "}"], styles);
138
- }
139
- function onlyFirefox(styles) {
140
- return styled_component.css(["@media screen and (min--moz-device-pixel-ratio:0){", "}"], styles);
141
- }
142
- function safariAndFirefoxBold(color) {
143
- return styled_component.css(["@media not all and (min-resolution:0.001dpcm){font-weight:400;-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}@media screen and (min--moz-device-pixel-ratio:0){font-weight:400;-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}"], color, color);
144
- }
133
+ const onlySafariAndFirefox = styles => styled_component.css(["@media not all and (min-resolution:0.001dpcm){", "}@media screen and (min--moz-device-pixel-ratio:0){", "}"], styles, styles);
134
+ const onlySafari = styles => "\n @media not all and (min-resolution: 0.001dpcm) {\n ".concat(styles, "\n }\n ");
135
+ const onlyFirefox = styles => "\n @media screen and (min--moz-device-pixel-ratio: 0) {\n ".concat(styles, "\n }\n ");
136
+ const safariAndFirefoxBold = color => "\n @media not all and (min-resolution: 0.001dpcm) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ".concat(color, ";\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ").concat(color, ";\n }\n");
145
137
 
146
138
  Object.defineProperty(exports, 'rgba', {
147
139
  enumerable: true,
@@ -185,7 +177,7 @@ exports.iconColor = iconColor;
185
177
  exports.keyframes = keyframes;
186
178
  exports.onlyFirefox = onlyFirefox;
187
179
  exports.onlySafari = onlySafari;
188
- exports.onlySafariAndFiredox = onlySafariAndFiredox;
180
+ exports.onlySafariAndFirefox = onlySafariAndFirefox;
189
181
  exports.safariAndFirefoxBold = safariAndFirefoxBold;
190
182
  exports.textStyle = textStyle;
191
183
  exports.transition = transition;
package/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { GlobalStyles } from './globalStyles.js';
2
2
  export { fixSpace, fixSpaceGutter, mapGap, mapGrid, mapGutter, mapSpace, mapTemplateGrid, numbersToFr } from './spaceUtilities.js';
3
3
  export { __UNSAFE_SPACE_TO_DIMSUM, isMobile, toMobile, useIsMobile } from './mobileUtilities.js';
4
- export { active, animation, border, boxShadow, buttonLink, clearFocus, color, disabled, fakeActive, fakeBorder, flexCenter, focus, focusAfter, hover, iconColor, keyframes, onlyFirefox, onlySafari, onlySafariAndFiredox, safariAndFirefoxBold, textStyle, transition, truncate } from './utils.js';
4
+ export { active, animation, border, boxShadow, buttonLink, clearFocus, color, disabled, fakeActive, fakeBorder, flexCenter, focus, focusAfter, hover, iconColor, keyframes, onlyFirefox, onlySafari, onlySafariAndFirefox, safariAndFirefoxBold, textStyle, transition, truncate } from './utils.js';
5
5
  export { getNumberAndUnit, op } from './arithmetic.js';
6
6
  export { th } from './th.js';
7
7
  export { theme } from './theme.js';
@@ -0,0 +1 @@
1
+
@@ -84,11 +84,21 @@ const styledFunction = function (tag) {
84
84
  }));
85
85
  }
86
86
 
87
- const Component = /*#__PURE__*/styled_component(tag).attrs({
88
- className: "".concat(componentName, "-").concat(componentSlot)
89
- }).withConfig({
90
- componentId: "sc-rjg4in-0"
91
- })(transformedStyleArg, ...expressionsWithDefaultTheme);
87
+ let Component = /*#__PURE__*/styled_component(tag);
88
+ const displayName = componentName !== null && componentSlot !== null ? "".concat(componentName).concat(componentSlot) : null;
89
+
90
+ if (displayName !== null) {
91
+ Component = Component.attrs({
92
+ className: "".concat(componentName).concat(componentSlot)
93
+ });
94
+ }
95
+
96
+ Component = Component(transformedStyleArg, ...expressionsWithDefaultTheme);
97
+
98
+ if (displayName !== null) {
99
+ Component.displayName = displayName;
100
+ }
101
+
92
102
  return Component;
93
103
  };
94
104
 
package/esm/utils.js CHANGED
@@ -128,17 +128,9 @@ function transition() {
128
128
  let t = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'all 1s ease';
129
129
  return "\n transition: ".concat(t, ";\n ");
130
130
  }
131
- function onlySafariAndFiredox(styles) {
132
- return css(["@media not all and (min-resolution:0.001dpcm){", "}@media screen and (min--moz-device-pixel-ratio:0){", "}"], styles, styles);
133
- }
134
- function onlySafari(styles) {
135
- return css(["@media not all and (min-resolution:0.001dpcm){", "}"], styles);
136
- }
137
- function onlyFirefox(styles) {
138
- return css(["@media screen and (min--moz-device-pixel-ratio:0){", "}"], styles);
139
- }
140
- function safariAndFirefoxBold(color) {
141
- return css(["@media not all and (min-resolution:0.001dpcm){font-weight:400;-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}@media screen and (min--moz-device-pixel-ratio:0){font-weight:400;-webkit-font-smoothing:subpixel-antialiased;-webkit-text-stroke:0.4px ", ";}"], color, color);
142
- }
131
+ const onlySafariAndFirefox = styles => css(["@media not all and (min-resolution:0.001dpcm){", "}@media screen and (min--moz-device-pixel-ratio:0){", "}"], styles, styles);
132
+ const onlySafari = styles => "\n @media not all and (min-resolution: 0.001dpcm) {\n ".concat(styles, "\n }\n ");
133
+ const onlyFirefox = styles => "\n @media screen and (min--moz-device-pixel-ratio: 0) {\n ".concat(styles, "\n }\n ");
134
+ const safariAndFirefoxBold = color => "\n @media not all and (min-resolution: 0.001dpcm) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ".concat(color, ";\n }\n @media screen and (min--moz-device-pixel-ratio: 0) {\n font-weight: 400;\n -webkit-font-smoothing: subpixel-antialiased;\n -webkit-text-stroke: 0.4px ").concat(color, ";\n }\n");
143
135
 
144
- export { active, animation, border, boxShadow, buttonLink, clearFocus, color, disabled, fakeActive, fakeBorder, flexCenter, focus, focusAfter, hover, iconColor, keyframes, onlyFirefox, onlySafari, onlySafariAndFiredox, safariAndFirefoxBold, textStyle, transition, truncate };
136
+ export { active, animation, border, boxShadow, buttonLink, clearFocus, color, disabled, fakeActive, fakeBorder, flexCenter, focus, focusAfter, hover, iconColor, keyframes, onlyFirefox, onlySafari, onlySafariAndFirefox, safariAndFirefoxBold, textStyle, transition, truncate };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-system",
3
- "version": "2.0.0-rc.11",
3
+ "version": "2.0.0-rc.15",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - System",
6
6
  "module": "./esm/index.js",
@@ -89,6 +89,7 @@
89
89
  "generateSubmodules": true
90
90
  },
91
91
  "dependencies": {
92
+ "@elliemae/ds-utilities": "2.0.0-rc.15",
92
93
  "polished": "~3.6.7"
93
94
  },
94
95
  "devDependencies": {
@@ -1,5 +1,5 @@
1
- export declare function getNumberAndUnit(numberStrWithUnit: string): {
1
+ export declare function getNumberAndUnit(numberStrWithUnit: string | number): {
2
2
  number: string;
3
3
  unit: string;
4
4
  };
5
- export declare function op(operator: string, n1: string, n2: string): string;
5
+ export declare function op(operator: string, n1: string, n2: string | number): string;
package/types/utils.d.ts CHANGED
@@ -2,7 +2,7 @@ import { rgba } from 'polished';
2
2
  import { Keyframes } from 'styled-components';
3
3
  import { css, withTheme, keyframes as kfrm, createGlobalStyle, useTheme } from 'styled-components';
4
4
  export { withTheme, createGlobalStyle, rgba, useTheme, kfrm, css };
5
- export declare function truncate(width: string): (props: any) => import("styled-components").FlattenSimpleInterpolation;
5
+ export declare function truncate(width?: string): (props: any) => import("styled-components").FlattenSimpleInterpolation;
6
6
  export declare function flexCenter(): string;
7
7
  export declare function disabled(): string;
8
8
  export declare function keyframes(obj: Record<string, unknown>): Keyframes;
@@ -21,7 +21,7 @@ export declare function fakeActive(): import("styled-components").FlattenInterpo
21
21
  export declare function clearFocus(): string;
22
22
  export declare function buttonLink(): string;
23
23
  export declare function transition(t?: string): string;
24
- export declare function onlySafariAndFiredox(styles: string): string;
25
- export declare function onlySafari(styles: string): string;
26
- export declare function onlyFirefox(styles: string): string;
27
- export declare function safariAndFirefoxBold(color: string): string;
24
+ export declare const onlySafariAndFirefox: (styles: string) => string;
25
+ export declare const onlySafari: (styles: string) => string;
26
+ export declare const onlyFirefox: (styles: string) => string;
27
+ export declare const safariAndFirefoxBold: (color: string) => string;