@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/es/index.js
CHANGED
|
@@ -2278,27 +2278,26 @@ function RlsConfirmation({ approved, content, reject, rlsTheme, subtitle, title,
|
|
|
2278
2278
|
const className = useMemo(() => {
|
|
2279
2279
|
return renderClassStatus('rls-confirmation', { visible });
|
|
2280
2280
|
}, [visible]);
|
|
2281
|
-
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:
|
|
2281
|
+
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" })] }));
|
|
2282
2282
|
}
|
|
2283
2283
|
function useConfirmation() {
|
|
2284
2284
|
const [config, setConfig] = useState({});
|
|
2285
2285
|
const [visible, setVisible] = useState(false);
|
|
2286
|
-
const
|
|
2286
|
+
const component = ReactDOM.createPortal(jsxRuntimeExports.jsx(RlsConfirmation, { ...config, visible: visible }), document.body);
|
|
2287
2287
|
const confirmation = useCallback((options) => {
|
|
2288
2288
|
return new Promise((resolve) => {
|
|
2289
|
-
const {
|
|
2289
|
+
const { approved, reject } = options;
|
|
2290
2290
|
setConfig({
|
|
2291
|
-
|
|
2292
|
-
rlsTheme,
|
|
2293
|
-
subtitle,
|
|
2294
|
-
title,
|
|
2291
|
+
...options,
|
|
2295
2292
|
approved: {
|
|
2296
2293
|
label: approved?.label ?? reactI18n('confirmationActionApproved'),
|
|
2297
2294
|
onClick: () => {
|
|
2298
2295
|
setVisible(false);
|
|
2299
2296
|
resolve(ConfirmationResult.approved());
|
|
2300
2297
|
},
|
|
2301
|
-
identifier: approved?.identifier
|
|
2298
|
+
identifier: approved?.identifier,
|
|
2299
|
+
rlsTheme: approved?.rlsTheme,
|
|
2300
|
+
type: approved?.type ?? 'raised'
|
|
2302
2301
|
},
|
|
2303
2302
|
reject: reject
|
|
2304
2303
|
? {
|
|
@@ -2307,7 +2306,9 @@ function useConfirmation() {
|
|
|
2307
2306
|
setVisible(false);
|
|
2308
2307
|
resolve(ConfirmationResult.reject());
|
|
2309
2308
|
},
|
|
2310
|
-
identifier: reject.identifier
|
|
2309
|
+
identifier: reject.identifier,
|
|
2310
|
+
rlsTheme: reject.rlsTheme,
|
|
2311
|
+
type: reject?.type ?? 'classic'
|
|
2311
2312
|
}
|
|
2312
2313
|
: undefined
|
|
2313
2314
|
});
|
|
@@ -2315,7 +2316,7 @@ function useConfirmation() {
|
|
|
2315
2316
|
});
|
|
2316
2317
|
}, []);
|
|
2317
2318
|
return {
|
|
2318
|
-
RlsConfirmation:
|
|
2319
|
+
RlsConfirmation: component,
|
|
2319
2320
|
confirmation
|
|
2320
2321
|
};
|
|
2321
2322
|
}
|