@descope/flow-components 2.0.63 → 2.0.65
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/dist/index.cjs.js +18 -13
- package/dist/index.d.ts +0 -1
- package/dist/index.esm.js +18 -13
- package/package.json +3 -4
package/dist/index.cjs.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
5
4
|
var webComponentsUi = require('@descope/web-components-ui');
|
|
6
5
|
|
|
7
6
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -106,22 +105,29 @@ const Code = React__default.default.forwardRef((props, ref) => React__default.de
|
|
|
106
105
|
|
|
107
106
|
const justifyContent = {
|
|
108
107
|
start: 'flex-start',
|
|
109
|
-
center: 'center',
|
|
108
|
+
center: 'safe center',
|
|
110
109
|
end: 'flex-end',
|
|
111
110
|
between: 'space-between',
|
|
112
111
|
around: 'space-around',
|
|
113
112
|
evenly: 'space-evenly'
|
|
114
113
|
};
|
|
114
|
+
const alignItems = {
|
|
115
|
+
start: 'start',
|
|
116
|
+
end: 'end',
|
|
117
|
+
center: 'safe center',
|
|
118
|
+
baseline: 'baseline',
|
|
119
|
+
stretch: 'stretch'
|
|
120
|
+
};
|
|
115
121
|
const Container = React__default.default.forwardRef(({ background, justify, paddingX = '0', paddingY = '0', shadow, width, align, spaceBetween, ...props }, ref) => {
|
|
116
122
|
const mergedProps = {
|
|
117
123
|
...props,
|
|
118
124
|
shadow,
|
|
119
125
|
'st-horizontal-padding': `${Number.parseInt(paddingX, 10) / 4}rem`,
|
|
120
126
|
'st-vertical-padding': `${Number.parseInt(paddingY, 10) / 4}rem`,
|
|
121
|
-
'st-align-items': align,
|
|
127
|
+
'st-align-items': alignItems[align],
|
|
122
128
|
'st-justify-content': justifyContent[justify],
|
|
123
129
|
'st-background-color': background,
|
|
124
|
-
'st-width': width,
|
|
130
|
+
'st-host-width': width,
|
|
125
131
|
'st-gap': spaceBetween && `${Number.parseInt(spaceBetween, 10) / 4}rem`
|
|
126
132
|
};
|
|
127
133
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -204,15 +210,14 @@ Textarea.defaultProps = {
|
|
|
204
210
|
size: 'md'
|
|
205
211
|
};
|
|
206
212
|
|
|
207
|
-
const CssVarImage = React__default.default.forwardRef(({
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
});
|
|
213
|
+
const CssVarImage = React__default.default.forwardRef(({ width, height, varName, fallback = '', style }, ref) => (React__default.default.createElement("div", {
|
|
214
|
+
// className={divClasses}
|
|
215
|
+
ref: ref, style: {
|
|
216
|
+
...style,
|
|
217
|
+
content: `var(--${varName}, ${fallback})`,
|
|
218
|
+
width: width || 'initial',
|
|
219
|
+
height: height || 'initial'
|
|
220
|
+
} })));
|
|
216
221
|
|
|
217
222
|
// The reason we define TOTPImage as a component, and not injecting the style from another place,
|
|
218
223
|
// is to restrict the dependency between the code that injects this variable style (web-component) to this place only
|
package/dist/index.d.ts
CHANGED
|
@@ -333,7 +333,6 @@ type Props$2 = {
|
|
|
333
333
|
fallback?: string;
|
|
334
334
|
width?: number;
|
|
335
335
|
height?: number;
|
|
336
|
-
className?: string;
|
|
337
336
|
};
|
|
338
337
|
declare const CssVarImage: React.ForwardRefExoticComponent<Props$2 & React.HTMLAttributes<HTMLImageElement> & React.RefAttributes<HTMLDivElement>>;
|
|
339
338
|
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
|
-
import { twMerge } from 'tailwind-merge';
|
|
3
2
|
export * from '@descope/web-components-ui';
|
|
4
3
|
|
|
5
4
|
const Checkbox = React.forwardRef((props, ref) => React.createElement("descope-checkbox", { ...props, ref: ref }));
|
|
@@ -100,22 +99,29 @@ const Code = React.forwardRef((props, ref) => React.createElement("descope-passc
|
|
|
100
99
|
|
|
101
100
|
const justifyContent = {
|
|
102
101
|
start: 'flex-start',
|
|
103
|
-
center: 'center',
|
|
102
|
+
center: 'safe center',
|
|
104
103
|
end: 'flex-end',
|
|
105
104
|
between: 'space-between',
|
|
106
105
|
around: 'space-around',
|
|
107
106
|
evenly: 'space-evenly'
|
|
108
107
|
};
|
|
108
|
+
const alignItems = {
|
|
109
|
+
start: 'start',
|
|
110
|
+
end: 'end',
|
|
111
|
+
center: 'safe center',
|
|
112
|
+
baseline: 'baseline',
|
|
113
|
+
stretch: 'stretch'
|
|
114
|
+
};
|
|
109
115
|
const Container = React.forwardRef(({ background, justify, paddingX = '0', paddingY = '0', shadow, width, align, spaceBetween, ...props }, ref) => {
|
|
110
116
|
const mergedProps = {
|
|
111
117
|
...props,
|
|
112
118
|
shadow,
|
|
113
119
|
'st-horizontal-padding': `${Number.parseInt(paddingX, 10) / 4}rem`,
|
|
114
120
|
'st-vertical-padding': `${Number.parseInt(paddingY, 10) / 4}rem`,
|
|
115
|
-
'st-align-items': align,
|
|
121
|
+
'st-align-items': alignItems[align],
|
|
116
122
|
'st-justify-content': justifyContent[justify],
|
|
117
123
|
'st-background-color': background,
|
|
118
|
-
'st-width': width,
|
|
124
|
+
'st-host-width': width,
|
|
119
125
|
'st-gap': spaceBetween && `${Number.parseInt(spaceBetween, 10) / 4}rem`
|
|
120
126
|
};
|
|
121
127
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -198,15 +204,14 @@ Textarea.defaultProps = {
|
|
|
198
204
|
size: 'md'
|
|
199
205
|
};
|
|
200
206
|
|
|
201
|
-
const CssVarImage = React.forwardRef(({
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
});
|
|
207
|
+
const CssVarImage = React.forwardRef(({ width, height, varName, fallback = '', style }, ref) => (React.createElement("div", {
|
|
208
|
+
// className={divClasses}
|
|
209
|
+
ref: ref, style: {
|
|
210
|
+
...style,
|
|
211
|
+
content: `var(--${varName}, ${fallback})`,
|
|
212
|
+
width: width || 'initial',
|
|
213
|
+
height: height || 'initial'
|
|
214
|
+
} })));
|
|
210
215
|
|
|
211
216
|
// The reason we define TOTPImage as a component, and not injecting the style from another place,
|
|
212
217
|
// is to restrict the dependency between the code that injects this variable style (web-component) to this place only
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@descope/flow-components",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.65",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -99,9 +99,8 @@
|
|
|
99
99
|
"typescript": "^4.5.3"
|
|
100
100
|
},
|
|
101
101
|
"dependencies": {
|
|
102
|
-
"@descope/web-components-ui": "1.0.
|
|
103
|
-
"rollup-plugin-dts": "^5.3.0"
|
|
104
|
-
"tailwind-merge": "1.14.0"
|
|
102
|
+
"@descope/web-components-ui": "1.0.116",
|
|
103
|
+
"rollup-plugin-dts": "^5.3.0"
|
|
105
104
|
},
|
|
106
105
|
"peerDependencies": {
|
|
107
106
|
"react": ">=17"
|