@rolster/react-components 18.26.1 → 18.26.2
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-Ds0DvsiS.css → index-Da99wzhq.css} +41 -1
- package/dist/cjs/index.js +28 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/es/assets/{index-Ds0DvsiS.css → index-Da99wzhq.css} +41 -1
- package/dist/es/index.js +28 -1
- package/dist/es/index.js.map +1 -1
- package/dist/esm/components/atoms/Button/Button.css +1 -1
- package/dist/esm/components/molecules/Tabs/Tabs.css +39 -0
- package/dist/esm/components/molecules/Tabs/Tabs.css.map +1 -0
- package/dist/esm/components/molecules/Tabs/Tabs.d.ts +14 -0
- package/dist/esm/components/molecules/Tabs/Tabs.js +31 -0
- package/dist/esm/components/molecules/Tabs/Tabs.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -310,7 +310,7 @@
|
|
|
310
310
|
height: var(--rls-sizing-x20);
|
|
311
311
|
padding: var(--rlc-button-content-padding, 0rem var(--rls-sizing-x4));
|
|
312
312
|
box-sizing: border-box;
|
|
313
|
-
border-radius: var(--rlc-button-content-radius, var(--rls-sizing-
|
|
313
|
+
border-radius: var(--rlc-button-content-radius, var(--rls-sizing-x2));
|
|
314
314
|
box-shadow: var(--pvt-button-content-box-shadow);
|
|
315
315
|
color: var(--pvt-button-content-font-color);
|
|
316
316
|
border: var(--pvt-button-content-border);
|
|
@@ -2001,6 +2001,46 @@
|
|
|
2001
2001
|
transition: left 200ms 0ms var(--rls-standard-curve);
|
|
2002
2002
|
} /*# sourceMappingURL=Slider.css.map */
|
|
2003
2003
|
|
|
2004
|
+
.rls-tabs {
|
|
2005
|
+
--pvt-background: var(--rls-app-color-100);
|
|
2006
|
+
--pvt-border: var(--rls-app-border-1-200);
|
|
2007
|
+
--pvt-children-font-color: var(--rls-app-color-700);
|
|
2008
|
+
display: flex;
|
|
2009
|
+
background: var(--pvt-background);
|
|
2010
|
+
padding: var(--rls-sizing-x2);
|
|
2011
|
+
box-sizing: border-box;
|
|
2012
|
+
border-radius: var(--rls-sizing-x4);
|
|
2013
|
+
border: var(--pvt-border);
|
|
2014
|
+
}
|
|
2015
|
+
.rls-tabs__children {
|
|
2016
|
+
height: var(--rls-sizing-x12);
|
|
2017
|
+
line-height: var(--rls-sizing-x12);
|
|
2018
|
+
border-radius: var(--rls-sizing-x4);
|
|
2019
|
+
color: var(--rls-app-color-500);
|
|
2020
|
+
font-size: var(--rls-smalltext-font-size);
|
|
2021
|
+
font-weight: var(--rls-font-weight-medium);
|
|
2022
|
+
letter-spacing: var(--rls-smalltext-letter-spacing);
|
|
2023
|
+
text-align: center;
|
|
2024
|
+
cursor: pointer;
|
|
2025
|
+
transition: all 240ms var(--rls-standard-curve);
|
|
2026
|
+
}
|
|
2027
|
+
.rls-tabs__children--active {
|
|
2028
|
+
color: var(--pvt-children-font-color);
|
|
2029
|
+
font-weight: var(--rls-font-weight-semibold);
|
|
2030
|
+
background: var(--rls-app-color-050);
|
|
2031
|
+
}
|
|
2032
|
+
.rls-tabs__children--disabled {
|
|
2033
|
+
color: var(--rls-app-color-400);
|
|
2034
|
+
font-weight: var(--rls-font-weight-regular);
|
|
2035
|
+
background: rgba(0, 0, 0, 0);
|
|
2036
|
+
cursor: not-allowed;
|
|
2037
|
+
}
|
|
2038
|
+
.rls-tabs[rls-theme] {
|
|
2039
|
+
--pvt-background: var(--rls-theme-color-050);
|
|
2040
|
+
--pvt-border: var(--rls-theme-border-1-200);
|
|
2041
|
+
--pvt-children-font-color: var(--rls-theme-color-600);
|
|
2042
|
+
} /*# sourceMappingURL=Tabs.css.map */
|
|
2043
|
+
|
|
2004
2044
|
.rls-toolbar {
|
|
2005
2045
|
display: flex;
|
|
2006
2046
|
justify-content: space-between;
|
package/dist/cjs/index.js
CHANGED
|
@@ -2436,6 +2436,33 @@ function RlsSlider(props) {
|
|
|
2436
2436
|
return (jsxRuntimeExports.jsxs("div", { className: className, children: [props.children && (jsxRuntimeExports.jsx("span", { className: "rls-slider__label", children: props.children })), jsxRuntimeExports.jsxs("div", { className: "rls-slider__body", children: [props.prefixIcon && jsxRuntimeExports.jsx(RlsIcon, { value: props.prefixIcon }), jsxRuntimeExports.jsxs("div", { ref: refComponent, className: "rls-slider__component", children: [jsxRuntimeExports.jsx("div", { ref: refTrack, className: "rls-slider__track", onClick: onClickTrack, children: jsxRuntimeExports.jsx("div", { ref: refTrackOn, className: "rls-slider__track__on" }) }), jsxRuntimeExports.jsxs("div", { ref: refThumb, className: "rls-slider__thumb", children: [rate, "%"] })] })] })] }));
|
|
2437
2437
|
}
|
|
2438
2438
|
|
|
2439
|
+
function RlsTab({ onSelect, tab, value }) {
|
|
2440
|
+
const className = require$$0.useMemo(() => {
|
|
2441
|
+
return renderClassStatus('rls-tabs__children', {
|
|
2442
|
+
active: tab.value === value,
|
|
2443
|
+
disabled: tab.disabled
|
|
2444
|
+
});
|
|
2445
|
+
}, [value, tab.disabled]);
|
|
2446
|
+
const onClick = require$$0.useCallback(() => {
|
|
2447
|
+
!tab.disabled && onSelect(tab.value);
|
|
2448
|
+
}, [tab.disabled]);
|
|
2449
|
+
return (jsxRuntimeExports.jsx("div", { className: className, onClick: onClick, children: jsxRuntimeExports.jsx("span", { children: tab.label }) }));
|
|
2450
|
+
}
|
|
2451
|
+
function RlsTabs({ tabs, onValue, rlsTheme }) {
|
|
2452
|
+
const [value, setValue] = require$$0.useState();
|
|
2453
|
+
const onSelect = require$$0.useCallback((value) => {
|
|
2454
|
+
setValue(value);
|
|
2455
|
+
onValue && onValue(value);
|
|
2456
|
+
}, [onValue]);
|
|
2457
|
+
require$$0.useEffect(() => {
|
|
2458
|
+
const initial = tabs.find((tab) => tab.defaultActive) ?? tabs[0];
|
|
2459
|
+
initial && onSelect(initial.value);
|
|
2460
|
+
}, []);
|
|
2461
|
+
return (jsxRuntimeExports.jsx("div", { className: "rls-tabs", "rls-theme": rlsTheme, children: tabs.map((tab, index) => {
|
|
2462
|
+
return (jsxRuntimeExports.jsx(RlsTab, { tab: tab, value: value, onSelect: onSelect }, index));
|
|
2463
|
+
}) }));
|
|
2464
|
+
}
|
|
2465
|
+
|
|
2439
2466
|
function RlsToolbar({ actions, children, subtitle }) {
|
|
2440
2467
|
return (jsxRuntimeExports.jsxs("div", { className: "rls-toolbar", children: [jsxRuntimeExports.jsxs("div", { className: "rls-toolbar__description", children: [children && jsxRuntimeExports.jsx("label", { className: "rls-toolbar__title", children: children }), subtitle && (jsxRuntimeExports.jsx("label", { className: "rls-toolbar__subtitle smalltext-semibold", children: subtitle }))] }), actions && (jsxRuntimeExports.jsx("div", { className: "rls-toolbar__actions", children: actions.map((action, index) => (jsxRuntimeExports.jsx("div", { children: action }, index))) }))] }));
|
|
2441
2468
|
}
|
|
@@ -3945,6 +3972,7 @@ exports.RlsSlider = RlsSlider;
|
|
|
3945
3972
|
exports.RlsSnackbar = RlsSnackbar;
|
|
3946
3973
|
exports.RlsSwitch = RlsSwitch;
|
|
3947
3974
|
exports.RlsSwitchControl = RlsSwitchControl;
|
|
3975
|
+
exports.RlsTabs = RlsTabs;
|
|
3948
3976
|
exports.RlsTabularText = RlsTabularText;
|
|
3949
3977
|
exports.RlsToolbar = RlsToolbar;
|
|
3950
3978
|
exports.calculateImgDimension = calculateImgDimension;
|