@rolster/react-components 18.21.19 → 18.21.20
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/cjs/assets/{index-KtbnpnSR.css → index-CiASINsv.css} +18 -5
- package/dist/cjs/index.js +11 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-KtbnpnSR.css → index-CiASINsv.css} +18 -5
- package/dist/es/index.js +11 -10
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.css +16 -1
- package/dist/esm/components/atoms/Button/Button.d.ts +1 -1
- package/dist/esm/components/atoms/Button/Button.js.map +1 -1
- package/dist/esm/components/organisms/Confirmation/Confirmation.d.ts +5 -0
- package/dist/esm/components/organisms/Confirmation/Confirmation.js +11 -10
- package/dist/esm/components/organisms/Confirmation/Confirmation.js.map +1 -1
- package/dist/esm/components/organisms/Snackbar/Snackbar.css +2 -4
- package/package.json +2 -2
|
@@ -162,6 +162,9 @@
|
|
|
162
162
|
--pvt-button-content-animation: none;
|
|
163
163
|
--pvt-button-content-visibility: hidden;
|
|
164
164
|
--pvt-button-ripple-background: var(--rls-theme-color-700);
|
|
165
|
+
--pvt-classic-background: var(--rls-app-color-200);
|
|
166
|
+
--pvt-classic-font-color: var(--rls-app-color-500);
|
|
167
|
+
--pvt-classic-border: none;
|
|
165
168
|
--pvt-raised-background: var(--rls-theme-color-500);
|
|
166
169
|
--pvt-raised-font-color: var(--rls-theme-font-500);
|
|
167
170
|
--pvt-raised-border: none;
|
|
@@ -194,11 +197,14 @@
|
|
|
194
197
|
--pvt-button-content-visibility: visible;
|
|
195
198
|
}
|
|
196
199
|
.rls-button:not(:disabled):hover {
|
|
200
|
+
--pvt-classic-background: var(--rls-theme-color-200);
|
|
201
|
+
--pvt-classic-font-color: var(--rls-theme-color-600);
|
|
202
|
+
--pvt-classic-border: none;
|
|
197
203
|
--pvt-raised-background: var(--rls-theme-color-700);
|
|
198
204
|
--pvt-raised-font-color: var(--rls-theme-font-900);
|
|
199
205
|
--pvt-raised-border: none;
|
|
200
206
|
--pvt-flat-background: var(--rls-theme-color-600);
|
|
201
|
-
--pvt-flat-font-color: var(--rls-theme-
|
|
207
|
+
--pvt-flat-font-color: var(--rls-theme-color-050);
|
|
202
208
|
--pvt-flat-border: none;
|
|
203
209
|
--pvt-stroked-background: var(--rls-theme-color-100);
|
|
204
210
|
--pvt-stroked-font-color: var(--rls-theme-color-700);
|
|
@@ -214,6 +220,9 @@
|
|
|
214
220
|
--pvt-gradient-border: none;
|
|
215
221
|
}
|
|
216
222
|
.rls-button:disabled {
|
|
223
|
+
--pvt-classic-background: var(--rls-app-color-100);
|
|
224
|
+
--pvt-classic-font-color: var(--rls-app-color-400);
|
|
225
|
+
--pvt-classic-border: none;
|
|
217
226
|
--pvt-raised-background: var(--rls-theme-color-200);
|
|
218
227
|
--pvt-raised-font-color: var(--rls-theme-color-400);
|
|
219
228
|
--pvt-raised-border: none;
|
|
@@ -266,6 +275,12 @@
|
|
|
266
275
|
animation: var(--pvt-button-content-animation);
|
|
267
276
|
visibility: var(--pvt-button-content-visibility);
|
|
268
277
|
}
|
|
278
|
+
.rls-button__content--classic {
|
|
279
|
+
--pvt-button-content-background: var(--pvt-classic-background);
|
|
280
|
+
--pvt-button-content-font-color: var(--pvt-classic-font-color);
|
|
281
|
+
--pvt-button-content-border: var(--pvt-classic-border);
|
|
282
|
+
--pvt-button-ripple-background: var(--rls-theme-font-900);
|
|
283
|
+
}
|
|
269
284
|
.rls-button__content--raised {
|
|
270
285
|
--pvt-button-content-background: var(--pvt-raised-background);
|
|
271
286
|
--pvt-button-content-font-color: var(--pvt-raised-font-color);
|
|
@@ -2283,9 +2298,7 @@
|
|
|
2283
2298
|
padding: var(--rls-sizing-x6);
|
|
2284
2299
|
box-sizing: border-box;
|
|
2285
2300
|
border-radius: var(--rls-sizing-x4);
|
|
2286
|
-
background: var(--rls-
|
|
2287
|
-
box-shadow: var(--rls-light-shadow-bottom-4);
|
|
2288
|
-
border: var(--rls-theme-border-1-300);
|
|
2301
|
+
background: var(--rls-theme-color-100);
|
|
2289
2302
|
transform: translate(-50%, 100%);
|
|
2290
2303
|
transition: transform 160ms 0ms var(--rls-standard-curve);
|
|
2291
2304
|
}
|
|
@@ -2293,7 +2306,7 @@
|
|
|
2293
2306
|
transform: translate(-50%, calc(0% - var(--rls-sizing-x8)));
|
|
2294
2307
|
}
|
|
2295
2308
|
.rls-snackbar__avatar {
|
|
2296
|
-
--rlc-icon-color: var(--rls-
|
|
2309
|
+
--rlc-icon-color: var(--rls-theme-color-050);
|
|
2297
2310
|
display: flex;
|
|
2298
2311
|
justify-content: center;
|
|
2299
2312
|
align-items: center;
|
package/dist/cjs/index.js
CHANGED
|
@@ -2280,27 +2280,26 @@ function RlsConfirmation({ approved, content, reject, rlsTheme, subtitle, title,
|
|
|
2280
2280
|
const className = require$$0.useMemo(() => {
|
|
2281
2281
|
return renderClassStatus('rls-confirmation', { visible });
|
|
2282
2282
|
}, [visible]);
|
|
2283
|
-
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__header", children: [title && jsxRuntimeExports.jsx("div", { className: "rls-confirmation__title", children: title }), subtitle && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__subtitle", children: subtitle }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__body", children: content && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__message", children: content })) }), (approved || reject) && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__actions", children: [approved && (jsxRuntimeExports.jsx(RlsButton, { identifier: approved.identifier, type:
|
|
2283
|
+
return (jsxRuntimeExports.jsxs("div", { className: className, "rls-theme": rlsTheme, children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__component", children: [jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__header", children: [title && jsxRuntimeExports.jsx("div", { className: "rls-confirmation__title", children: title }), subtitle && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__subtitle", children: subtitle }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__body", children: content && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__message", children: content })) }), (approved || reject) && (jsxRuntimeExports.jsx("div", { className: "rls-confirmation__footer", children: jsxRuntimeExports.jsxs("div", { className: "rls-confirmation__actions", children: [approved && (jsxRuntimeExports.jsx(RlsButton, { identifier: approved.identifier, type: approved.type, onClick: approved.onClick, rlsTheme: approved.rlsTheme, children: approved.label })), reject && (jsxRuntimeExports.jsx(RlsButton, { identifier: reject.identifier, type: reject.type, onClick: reject.onClick, rlsTheme: reject.rlsTheme, children: reject.label }))] }) }))] }), jsxRuntimeExports.jsx("div", { className: "rls-confirmation__backdrop" })] }));
|
|
2284
2284
|
}
|
|
2285
2285
|
function useConfirmation() {
|
|
2286
2286
|
const [config, setConfig] = require$$0.useState({});
|
|
2287
2287
|
const [visible, setVisible] = require$$0.useState(false);
|
|
2288
|
-
const
|
|
2288
|
+
const component = ReactDOM.createPortal(jsxRuntimeExports.jsx(RlsConfirmation, { ...config, visible: visible }), document.body);
|
|
2289
2289
|
const confirmation = require$$0.useCallback((options) => {
|
|
2290
2290
|
return new Promise((resolve) => {
|
|
2291
|
-
const {
|
|
2291
|
+
const { approved, reject } = options;
|
|
2292
2292
|
setConfig({
|
|
2293
|
-
|
|
2294
|
-
rlsTheme,
|
|
2295
|
-
subtitle,
|
|
2296
|
-
title,
|
|
2293
|
+
...options,
|
|
2297
2294
|
approved: {
|
|
2298
2295
|
label: approved?.label ?? reactI18n('confirmationActionApproved'),
|
|
2299
2296
|
onClick: () => {
|
|
2300
2297
|
setVisible(false);
|
|
2301
2298
|
resolve(ConfirmationResult.approved());
|
|
2302
2299
|
},
|
|
2303
|
-
identifier: approved?.identifier
|
|
2300
|
+
identifier: approved?.identifier,
|
|
2301
|
+
rlsTheme: approved?.rlsTheme,
|
|
2302
|
+
type: approved?.type ?? 'raised'
|
|
2304
2303
|
},
|
|
2305
2304
|
reject: reject
|
|
2306
2305
|
? {
|
|
@@ -2309,7 +2308,9 @@ function useConfirmation() {
|
|
|
2309
2308
|
setVisible(false);
|
|
2310
2309
|
resolve(ConfirmationResult.reject());
|
|
2311
2310
|
},
|
|
2312
|
-
identifier: reject.identifier
|
|
2311
|
+
identifier: reject.identifier,
|
|
2312
|
+
rlsTheme: reject.rlsTheme,
|
|
2313
|
+
type: reject?.type ?? 'classic'
|
|
2313
2314
|
}
|
|
2314
2315
|
: undefined
|
|
2315
2316
|
});
|
|
@@ -2317,7 +2318,7 @@ function useConfirmation() {
|
|
|
2317
2318
|
});
|
|
2318
2319
|
}, []);
|
|
2319
2320
|
return {
|
|
2320
|
-
RlsConfirmation:
|
|
2321
|
+
RlsConfirmation: component,
|
|
2321
2322
|
confirmation
|
|
2322
2323
|
};
|
|
2323
2324
|
}
|