xmlui 0.9.14 → 0.9.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/dist/{apiInterceptorWorker-B9XuRkxC.mjs → apiInterceptorWorker-DHw39GG3.mjs} +1 -1
- package/dist/{index-D82p1y9A.mjs → index-DFC3vDn-.mjs} +68 -31
- package/dist/index.css +33 -31
- package/dist/scripts/bin/build-lib.js +1 -1
- package/dist/scripts/src/components/List/List.js +10 -3
- package/dist/scripts/src/components/List/ListNative.js +8 -5
- package/dist/scripts/src/components/Tabs/Tabs.js +6 -5
- package/dist/scripts/src/components/Tabs/TabsNative.js +6 -3
- package/dist/scripts/src/components-core/theming/themes/root.js +4 -1
- package/dist/scripts/src/components-core/theming/transformThemeVars.js +8 -0
- package/dist/style.css +33 -23
- package/dist/xmlui-metadata.mjs +17 -8
- package/dist/xmlui-metadata.umd.js +17 -8
- package/dist/xmlui-standalone.umd.js +99 -60
- package/dist/xmlui.d.ts +24 -0
- package/dist/xmlui.mjs +6 -4
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "acce
|
|
|
12
12
|
var _executor, _DeferredPromise_instances, decorate_fn, _a2;
|
|
13
13
|
import { delay as delay$1, HttpResponse, http } from "msw";
|
|
14
14
|
import { isArray, isObject as isObject$1, mapValues } from "lodash-es";
|
|
15
|
-
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-
|
|
15
|
+
import { r as runEventHandlerCode, g as getDate, d as delay, m as miscellaneousUtils, a as dateFunctions, o as orderBy, T as ThrowStatementError } from "./index-DFC3vDn-.mjs";
|
|
16
16
|
import Dexie from "dexie";
|
|
17
17
|
var POSITIONALS_EXP = /(%?)(%([sdijo]))/g;
|
|
18
18
|
function serializePositional(positional, flag) {
|
|
@@ -8515,6 +8515,7 @@ function generateBaseTonesForColor(varName, theme2, options2 = { distributeEven:
|
|
|
8515
8515
|
return {};
|
|
8516
8516
|
}
|
|
8517
8517
|
const baseColor = Color(color);
|
|
8518
|
+
let color0;
|
|
8518
8519
|
let color50;
|
|
8519
8520
|
let color100;
|
|
8520
8521
|
let color200;
|
|
@@ -8526,7 +8527,9 @@ function generateBaseTonesForColor(varName, theme2, options2 = { distributeEven:
|
|
|
8526
8527
|
let color800;
|
|
8527
8528
|
let color900;
|
|
8528
8529
|
let color950;
|
|
8530
|
+
let color1000;
|
|
8529
8531
|
if (distributeEven) {
|
|
8532
|
+
color0 = baseColor.lightness(100);
|
|
8530
8533
|
color50 = baseColor.lightness(98);
|
|
8531
8534
|
color100 = baseColor.lightness(95);
|
|
8532
8535
|
color200 = baseColor.lightness(83);
|
|
@@ -8538,10 +8541,12 @@ function generateBaseTonesForColor(varName, theme2, options2 = { distributeEven:
|
|
|
8538
8541
|
color800 = baseColor.lightness(27);
|
|
8539
8542
|
color900 = baseColor.lightness(16);
|
|
8540
8543
|
color950 = baseColor.lightness(13);
|
|
8544
|
+
color1000 = baseColor.lightness(9);
|
|
8541
8545
|
} else {
|
|
8542
8546
|
const baseL = baseColor.hsl().l();
|
|
8543
8547
|
const darkStep = baseL / 5;
|
|
8544
8548
|
const lightStep = (100 - baseL) / 5;
|
|
8549
|
+
color0 = baseColor.lightness(100);
|
|
8545
8550
|
color50 = baseColor.lightness(baseL + lightStep * 4.5);
|
|
8546
8551
|
color100 = baseColor.lightness(baseL + lightStep * 4);
|
|
8547
8552
|
color200 = baseColor.lightness(baseL + lightStep * 3);
|
|
@@ -8553,8 +8558,10 @@ function generateBaseTonesForColor(varName, theme2, options2 = { distributeEven:
|
|
|
8553
8558
|
color800 = baseColor.lightness(baseL - darkStep * 3);
|
|
8554
8559
|
color900 = baseColor.lightness(baseL - darkStep * 4);
|
|
8555
8560
|
color950 = baseColor.lightness(baseL - darkStep * 4.5);
|
|
8561
|
+
color1000 = baseColor.lightness(baseL - darkStep * 5);
|
|
8556
8562
|
}
|
|
8557
8563
|
return {
|
|
8564
|
+
[`const-${varName}-0`]: color0.toString(),
|
|
8558
8565
|
[`const-${varName}-50`]: color50.toString(),
|
|
8559
8566
|
[`const-${varName}-100`]: color100.toString(),
|
|
8560
8567
|
[`const-${varName}-200`]: color200.toString(),
|
|
@@ -8565,7 +8572,8 @@ function generateBaseTonesForColor(varName, theme2, options2 = { distributeEven:
|
|
|
8565
8572
|
[`const-${varName}-700`]: color700.toString(),
|
|
8566
8573
|
[`const-${varName}-800`]: color800.toString(),
|
|
8567
8574
|
[`const-${varName}-900`]: color900.toString(),
|
|
8568
|
-
[`const-${varName}-950`]: color950.toString()
|
|
8575
|
+
[`const-${varName}-950`]: color950.toString(),
|
|
8576
|
+
[`const-${varName}-1000`]: color1000.toString()
|
|
8569
8577
|
};
|
|
8570
8578
|
} catch (e) {
|
|
8571
8579
|
console.error("Error generating base tones for color:", varName);
|
|
@@ -12783,6 +12791,7 @@ const ListNative = forwardRef(function DynamicHeightList({
|
|
|
12783
12791
|
});
|
|
12784
12792
|
}, [registerComponentApi, scrollToBottom, scrollToId, scrollToIndex, scrollToTop]);
|
|
12785
12793
|
const rowTypeContextValue = useCallback((index) => rows[index]._row_type, [rows]);
|
|
12794
|
+
const rowCount = (rows == null ? void 0 : rows.length) ?? 0;
|
|
12786
12795
|
return /* @__PURE__ */ jsx(ListItemTypeContext.Provider, { value: rowTypeContextValue, children: /* @__PURE__ */ jsx(ListContext.Provider, { value: expandContextValue, children: /* @__PURE__ */ jsxs(
|
|
12787
12796
|
"div",
|
|
12788
12797
|
{
|
|
@@ -12812,7 +12821,7 @@ const ListNative = forwardRef(function DynamicHeightList({
|
|
|
12812
12821
|
onScroll,
|
|
12813
12822
|
startMargin: hasOutsideScroll2 ? ((_a = parentRef.current) == null ? void 0 : _a.offsetTop) - ((_b = scrollRef.current) == null ? void 0 : _b.offsetTop) || 0 : 0,
|
|
12814
12823
|
item: Item,
|
|
12815
|
-
count:
|
|
12824
|
+
count: rowCount,
|
|
12816
12825
|
children: (rowIndex) => {
|
|
12817
12826
|
const row2 = rows[rowIndex];
|
|
12818
12827
|
const key = row2[idKey];
|
|
@@ -12822,7 +12831,7 @@ const ListNative = forwardRef(function DynamicHeightList({
|
|
|
12822
12831
|
case "SECTION_FOOTER":
|
|
12823
12832
|
return /* @__PURE__ */ jsx(Fragment$1, { children: (sectionFooterRenderer == null ? void 0 : sectionFooterRenderer(row2, key)) || /* @__PURE__ */ jsx("div", {}) }, key);
|
|
12824
12833
|
default:
|
|
12825
|
-
return /* @__PURE__ */ jsx(Fragment$1, { children: itemRenderer(row2, key) || /* @__PURE__ */ jsx("div", {}) }, key);
|
|
12834
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: itemRenderer(row2, key, rowIndex, rowCount) || /* @__PURE__ */ jsx("div", {}) }, key);
|
|
12826
12835
|
}
|
|
12827
12836
|
}
|
|
12828
12837
|
}
|
|
@@ -12836,7 +12845,8 @@ const ListNative = forwardRef(function DynamicHeightList({
|
|
|
12836
12845
|
function MemoizedSection({
|
|
12837
12846
|
node,
|
|
12838
12847
|
renderChild: renderChild2,
|
|
12839
|
-
item: item2
|
|
12848
|
+
item: item2,
|
|
12849
|
+
contextVars = EMPTY_OBJECT
|
|
12840
12850
|
}) {
|
|
12841
12851
|
const { isExpanded, toggleExpanded } = useContext(ListContext);
|
|
12842
12852
|
const id = item2.id;
|
|
@@ -12857,7 +12867,12 @@ function MemoizedSection({
|
|
|
12857
12867
|
item: item2,
|
|
12858
12868
|
context: sectionContext,
|
|
12859
12869
|
itemKey: "$group",
|
|
12860
|
-
contextKey: "$group"
|
|
12870
|
+
contextKey: "$group",
|
|
12871
|
+
contextVars: {
|
|
12872
|
+
...contextVars,
|
|
12873
|
+
$isFirst: item2.index === 0,
|
|
12874
|
+
$isLast: item2.index === item2.count - 1
|
|
12875
|
+
}
|
|
12861
12876
|
}
|
|
12862
12877
|
);
|
|
12863
12878
|
}
|
|
@@ -12940,7 +12955,12 @@ const ListMd = createMetadata({
|
|
|
12940
12955
|
)
|
|
12941
12956
|
},
|
|
12942
12957
|
contextVars: {
|
|
12943
|
-
$item: d(`This property represents the value of an item in the data list.`)
|
|
12958
|
+
$item: d(`This property represents the value of an item in the data list.`),
|
|
12959
|
+
$itemIndex: dComponent(
|
|
12960
|
+
"This integer value represents the current row index (zero-based) while rendering children."
|
|
12961
|
+
),
|
|
12962
|
+
$isFirst: dComponent("This boolean value indicates if the component renders its first item."),
|
|
12963
|
+
$isLast: dComponent("This boolean value indicates if the component renders its last item.")
|
|
12944
12964
|
},
|
|
12945
12965
|
themeVars: parseScssVar(styles$D.themeVars)
|
|
12946
12966
|
});
|
|
@@ -12978,14 +12998,19 @@ const dynamicHeightListComponentRenderer = createComponentRenderer(
|
|
|
12978
12998
|
groupsInitiallyExpanded: extractValue.asOptionalBoolean(node.props.groupsInitiallyExpanded),
|
|
12979
12999
|
defaultGroups: extractValue(node.props.defaultGroups),
|
|
12980
13000
|
borderCollapse: extractValue.asOptionalBoolean(node.props.borderCollapse, true),
|
|
12981
|
-
itemRenderer: itemTemplate && ((item2, key) => {
|
|
13001
|
+
itemRenderer: itemTemplate && ((item2, key, rowIndex, count) => {
|
|
12982
13002
|
return /* @__PURE__ */ jsx(
|
|
12983
13003
|
MemoizedItem,
|
|
12984
13004
|
{
|
|
12985
13005
|
node: itemTemplate,
|
|
12986
13006
|
item: item2,
|
|
12987
13007
|
renderChild: renderChild2,
|
|
12988
|
-
layoutContext
|
|
13008
|
+
layoutContext,
|
|
13009
|
+
contextVars: {
|
|
13010
|
+
$itemIndex: rowIndex,
|
|
13011
|
+
$isFirst: rowIndex === 0,
|
|
13012
|
+
$isLast: rowIndex === count - 1
|
|
13013
|
+
}
|
|
12989
13014
|
},
|
|
12990
13015
|
key
|
|
12991
13016
|
);
|
|
@@ -22533,6 +22558,7 @@ const RootThemeDefinition = {
|
|
|
22533
22558
|
"const-color-surface-800": "hsl(204, 30.3%, 27%)",
|
|
22534
22559
|
"const-color-surface-900": "hsl(204, 30.3%, 16%)",
|
|
22535
22560
|
"const-color-surface-950": "hsl(204, 30.3%, 13%)",
|
|
22561
|
+
"const-color-surface-1000": "hsl(204, 30.3%, 9%)",
|
|
22536
22562
|
"const-color-surface": "$const-color-surface-500",
|
|
22537
22563
|
// --- Primary color shades (bluish)
|
|
22538
22564
|
"const-color-primary-50": "hsl(212,71.9%,94.5%)",
|
|
@@ -22741,6 +22767,7 @@ const RootThemeDefinition = {
|
|
|
22741
22767
|
"color-surface-800": "$const-color-surface-800",
|
|
22742
22768
|
"color-surface-900": "$const-color-surface-900",
|
|
22743
22769
|
"color-surface-950": "$const-color-surface-950",
|
|
22770
|
+
"color-surface-1000": "$const-color-surface-1000",
|
|
22744
22771
|
"color-surface": "$const-color-surface-500",
|
|
22745
22772
|
"color-surface-base": "$color-surface-0",
|
|
22746
22773
|
"color-surface-lower": "$color-surface-100",
|
|
@@ -22829,7 +22856,7 @@ const RootThemeDefinition = {
|
|
|
22829
22856
|
dark: {
|
|
22830
22857
|
themeVars: {
|
|
22831
22858
|
// --- Default surface color shades (form white to black)
|
|
22832
|
-
"color-surface-0": "$const-color-surface-
|
|
22859
|
+
"color-surface-0": "$const-color-surface-1000",
|
|
22833
22860
|
"color-surface-50": "$const-color-surface-950",
|
|
22834
22861
|
"color-surface-100": "$const-color-surface-900",
|
|
22835
22862
|
"color-surface-200": "$const-color-surface-800",
|
|
@@ -22841,6 +22868,7 @@ const RootThemeDefinition = {
|
|
|
22841
22868
|
"color-surface-800": "$const-color-surface-200",
|
|
22842
22869
|
"color-surface-900": "$const-color-surface-100",
|
|
22843
22870
|
"color-surface-950": "$const-color-surface-50",
|
|
22871
|
+
"color-surface-1000": "$const-color-surface-0",
|
|
22844
22872
|
"color-surface": "$const-color-surface-500",
|
|
22845
22873
|
"color-surface-base": "$color-surface-0",
|
|
22846
22874
|
"color-surface-lower": "$color-surface-0",
|
|
@@ -26181,17 +26209,19 @@ const redirectRenderer = createComponentRenderer(
|
|
|
26181
26209
|
return /* @__PURE__ */ jsx(Navigate, { to: createUrlWithQueryParams(extractValue(node.props.to)) });
|
|
26182
26210
|
}
|
|
26183
26211
|
);
|
|
26184
|
-
const themeVars$8 = `'{"backgroundColor-Tabs": "var(--xmlui-backgroundColor-Tabs)", "borderColor-Tabs": "var(--xmlui-borderColor-Tabs)", "borderWidth-Tabs": "var(--xmlui-borderWidth-Tabs)", "borderColor-active-Tabs": "var(--xmlui-borderColor-active-Tabs)", "backgroundColor-trigger-Tabs": "var(--xmlui-backgroundColor-trigger-Tabs)", "textColor-trigger-Tabs": "var(--xmlui-textColor-trigger-Tabs)", "backgroundColor-trigger-Tabs--hover": "var(--xmlui-backgroundColor-trigger-Tabs--hover)", "backgroundColor-list-Tabs": "var(--xmlui-backgroundColor-list-Tabs)"}'`;
|
|
26185
|
-
const tabs = "
|
|
26186
|
-
const filler = "
|
|
26187
|
-
const tabTrigger = "
|
|
26188
|
-
const
|
|
26189
|
-
const
|
|
26212
|
+
const themeVars$8 = `'{"padding-trigger-Tabs": "var(--xmlui-padding-trigger-Tabs)", "paddingHorizontal-trigger-Tabs": "var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs))", "paddingVertical-trigger-Tabs": "var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs))", "paddingLeft-trigger-Tabs": "var(--xmlui-paddingLeft-trigger-Tabs, var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "paddingRight-trigger-Tabs": "var(--xmlui-paddingRight-trigger-Tabs, var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "paddingTop-trigger-Tabs": "var(--xmlui-paddingTop-trigger-Tabs, var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "paddingBottom-trigger-Tabs": "var(--xmlui-paddingBottom-trigger-Tabs, var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "backgroundColor-Tabs": "var(--xmlui-backgroundColor-Tabs)", "borderColor-Tabs": "var(--xmlui-borderColor-Tabs)", "borderWidth-Tabs": "var(--xmlui-borderWidth-Tabs)", "borderColor-active-Tabs": "var(--xmlui-borderColor-active-Tabs)", "backgroundColor-trigger-Tabs": "var(--xmlui-backgroundColor-trigger-Tabs)", "borderRadius-trigger-Tabs": "var(--xmlui-borderRadius-trigger-Tabs)", "border-trigger-Tabs": "var(--xmlui-border-trigger-Tabs)", "textColor-trigger-Tabs": "var(--xmlui-textColor-trigger-Tabs)", "backgroundColor-trigger-Tabs--hover": "var(--xmlui-backgroundColor-trigger-Tabs--hover)", "backgroundColor-trigger-Tabs--active": "var(--xmlui-backgroundColor-trigger-Tabs--active)", "backgroundColor-list-Tabs": "var(--xmlui-backgroundColor-list-Tabs)", "borderRadius-list-Tabs": "var(--xmlui-borderRadius-list-Tabs)", "border-list-Tabs": "var(--xmlui-border-list-Tabs)"}'`;
|
|
26213
|
+
const tabs = "_tabs_1ggvi_13";
|
|
26214
|
+
const filler = "_filler_1ggvi_26";
|
|
26215
|
+
const tabTrigger = "_tabTrigger_1ggvi_40";
|
|
26216
|
+
const distributeEvenly = "_distributeEvenly_1ggvi_57";
|
|
26217
|
+
const tabsList = "_tabsList_1ggvi_89";
|
|
26218
|
+
const tabsContent = "_tabsContent_1ggvi_111";
|
|
26190
26219
|
const styles$f = {
|
|
26191
26220
|
themeVars: themeVars$8,
|
|
26192
26221
|
tabs,
|
|
26193
26222
|
filler,
|
|
26194
26223
|
tabTrigger,
|
|
26224
|
+
distributeEvenly,
|
|
26195
26225
|
tabsList,
|
|
26196
26226
|
tabsContent
|
|
26197
26227
|
};
|
|
@@ -26240,11 +26270,13 @@ function useTabContext() {
|
|
|
26240
26270
|
}
|
|
26241
26271
|
const Tabs = forwardRef(function Tabs2({
|
|
26242
26272
|
activeTab = 0,
|
|
26243
|
-
orientation = "
|
|
26273
|
+
orientation = "horizontal",
|
|
26244
26274
|
tabRenderer,
|
|
26245
26275
|
style: style2,
|
|
26246
26276
|
children,
|
|
26247
|
-
registerComponentApi
|
|
26277
|
+
registerComponentApi,
|
|
26278
|
+
className,
|
|
26279
|
+
distributeEvenly: distributeEvenly2 = false
|
|
26248
26280
|
}, forwardedRef) {
|
|
26249
26281
|
const { tabItems, tabContextValue } = useTabContextValue();
|
|
26250
26282
|
const [activeIndex, setActiveIndex] = useState(activeTab);
|
|
@@ -26279,7 +26311,7 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
26279
26311
|
RTabs.Root,
|
|
26280
26312
|
{
|
|
26281
26313
|
ref: forwardedRef,
|
|
26282
|
-
className: styles$f.tabs,
|
|
26314
|
+
className: classnames(styles$f.tabs, className),
|
|
26283
26315
|
value: `${currentTab}`,
|
|
26284
26316
|
onValueChange: (tab) => {
|
|
26285
26317
|
const newIndex = tabItems.findIndex((item2) => item2.id === tab);
|
|
@@ -26293,9 +26325,11 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
26293
26325
|
children: [
|
|
26294
26326
|
/* @__PURE__ */ jsxs(RTabs.List, { className: styles$f.tabsList, children: [
|
|
26295
26327
|
tabItems.map(
|
|
26296
|
-
(tab) => tabRenderer ? /* @__PURE__ */ jsx(RTabs.Trigger, { value: tab.id, children: tabRenderer({ label: tab.label, isActive: tab.id === currentTab }) }, tab.id) : /* @__PURE__ */ jsx(RTabs.Trigger, { className: styles$f.tabTrigger,
|
|
26328
|
+
(tab) => tabRenderer ? /* @__PURE__ */ jsx(RTabs.Trigger, { value: tab.id, asChild: true, children: tabRenderer({ label: tab.label, isActive: tab.id === currentTab }) }, tab.id) : /* @__PURE__ */ jsx(RTabs.Trigger, { className: classnames(styles$f.tabTrigger, {
|
|
26329
|
+
[styles$f.distributeEvenly]: distributeEvenly2
|
|
26330
|
+
}), value: tab.id, children: tab.label }, tab.id)
|
|
26297
26331
|
),
|
|
26298
|
-
/* @__PURE__ */ jsx("div", { className: styles$f.filler, "data-orientation": orientation })
|
|
26332
|
+
!distributeEvenly2 && !tabRenderer && /* @__PURE__ */ jsx("div", { className: styles$f.filler, "data-orientation": orientation })
|
|
26299
26333
|
] }),
|
|
26300
26334
|
children
|
|
26301
26335
|
]
|
|
@@ -26323,15 +26357,16 @@ const TabsMd = createMetadata({
|
|
|
26323
26357
|
},
|
|
26324
26358
|
themeVars: parseScssVar(styles$f.themeVars),
|
|
26325
26359
|
defaultThemeVars: {
|
|
26326
|
-
[`backgroundColor-${COMP
|
|
26360
|
+
// [`backgroundColor-${COMP}`]: "transparent",
|
|
26327
26361
|
[`borderStyle-${COMP$m}`]: "solid",
|
|
26328
26362
|
[`borderColor-${COMP$m}`]: "$borderColor",
|
|
26329
26363
|
[`borderColor-active-${COMP$m}`]: "$color-primary",
|
|
26330
26364
|
[`borderWidth-${COMP$m}`]: "2px",
|
|
26331
|
-
[`backgroundColor-trigger-${COMP
|
|
26332
|
-
[`backgroundColor-trigger-${COMP$m}--hover`]: "$color-
|
|
26333
|
-
[`
|
|
26334
|
-
[`
|
|
26365
|
+
// [`backgroundColor-trigger-${COMP}`]: "transparent",
|
|
26366
|
+
[`backgroundColor-trigger-${COMP$m}--hover`]: "$color-surface-100",
|
|
26367
|
+
[`padding-trigger-${COMP$m}`]: "$space-4"
|
|
26368
|
+
// [`backgroundColor-list-${COMP}`]: "$color-primary-50",
|
|
26369
|
+
// [`textColor-trigger-${COMP}`]: "$color-primary-100",
|
|
26335
26370
|
}
|
|
26336
26371
|
});
|
|
26337
26372
|
const tabsComponentRenderer = createComponentRenderer(
|
|
@@ -31561,7 +31596,7 @@ function IconProvider({ children }) {
|
|
|
31561
31596
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
31562
31597
|
] });
|
|
31563
31598
|
}
|
|
31564
|
-
const version = "0.9.
|
|
31599
|
+
const version = "0.9.15";
|
|
31565
31600
|
const ApiInterceptorContext = createContext(null);
|
|
31566
31601
|
function useApiInterceptorContext() {
|
|
31567
31602
|
return useContext(ApiInterceptorContext);
|
|
@@ -35746,7 +35781,7 @@ function ApiInterceptorProvider({
|
|
|
35746
35781
|
let interceptorWorker;
|
|
35747
35782
|
(async () => {
|
|
35748
35783
|
if (process.env.VITE_MOCK_ENABLED) {
|
|
35749
|
-
const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-
|
|
35784
|
+
const { createApiInterceptorWorker } = await import("./apiInterceptorWorker-DHw39GG3.mjs");
|
|
35750
35785
|
if (interceptor) {
|
|
35751
35786
|
interceptorWorker = await createApiInterceptorWorker(interceptor, apiWorker);
|
|
35752
35787
|
if (!apiWorker) {
|
|
@@ -36968,14 +37003,16 @@ export {
|
|
|
36968
37003
|
Stack as h,
|
|
36969
37004
|
Splitter as i,
|
|
36970
37005
|
getColor as j,
|
|
36971
|
-
|
|
36972
|
-
|
|
37006
|
+
TabItemComponent as k,
|
|
37007
|
+
Tabs as l,
|
|
36973
37008
|
miscellaneousUtils as m,
|
|
36974
|
-
|
|
37009
|
+
useColors as n,
|
|
36975
37010
|
orderBy as o,
|
|
36976
37011
|
parseScssVar as p,
|
|
37012
|
+
useDevTools as q,
|
|
36977
37013
|
runEventHandlerCode as r,
|
|
36978
37014
|
startApp as s,
|
|
36979
37015
|
toCssVar$1 as t,
|
|
36980
|
-
useTheme as u
|
|
37016
|
+
useTheme as u,
|
|
37017
|
+
useLogger as v
|
|
36981
37018
|
};
|
package/dist/index.css
CHANGED
|
@@ -78,23 +78,15 @@
|
|
|
78
78
|
}
|
|
79
79
|
button {
|
|
80
80
|
-webkit-appearance: button;
|
|
81
|
-
background-color: transparent;
|
|
82
|
-
background-image: none;
|
|
83
81
|
}
|
|
84
82
|
[type=button] {
|
|
85
83
|
-webkit-appearance: button;
|
|
86
|
-
background-color: transparent;
|
|
87
|
-
background-image: none;
|
|
88
84
|
}
|
|
89
85
|
[type=reset] {
|
|
90
86
|
-webkit-appearance: button;
|
|
91
|
-
background-color: transparent;
|
|
92
|
-
background-image: none;
|
|
93
87
|
}
|
|
94
88
|
[type=submit] {
|
|
95
89
|
-webkit-appearance: button;
|
|
96
|
-
background-color: transparent;
|
|
97
|
-
background-image: none;
|
|
98
90
|
}
|
|
99
91
|
:-moz-focusring {
|
|
100
92
|
outline: auto;
|
|
@@ -7132,76 +7124,86 @@ li .htmlOl {
|
|
|
7132
7124
|
* This function allows other CSS modules to get the value of the CSS variable specified in $componentVariable.
|
|
7133
7125
|
Optionally, you can provide a $fallbackValue to set the variable's value if that is not defined.
|
|
7134
7126
|
*/
|
|
7135
|
-
.
|
|
7127
|
+
._tabs_1ggvi_13 {
|
|
7136
7128
|
display: flex;
|
|
7137
|
-
flex: 1 1 auto;
|
|
7138
7129
|
width: 100%;
|
|
7139
7130
|
background-color: var(--xmlui-backgroundColor-Tabs);
|
|
7140
7131
|
overflow: hidden;
|
|
7141
7132
|
}
|
|
7142
|
-
.
|
|
7133
|
+
._tabs_1ggvi_13[data-orientation=vertical] {
|
|
7143
7134
|
flex-direction: row;
|
|
7144
7135
|
}
|
|
7145
|
-
.
|
|
7136
|
+
._tabs_1ggvi_13[data-orientation=horizontal] {
|
|
7146
7137
|
flex-direction: column;
|
|
7147
7138
|
}
|
|
7148
7139
|
|
|
7149
|
-
.
|
|
7140
|
+
._filler_1ggvi_26 {
|
|
7150
7141
|
flex: 1 1 auto;
|
|
7151
7142
|
}
|
|
7152
|
-
.
|
|
7143
|
+
._filler_1ggvi_26[data-orientation=vertical] {
|
|
7153
7144
|
border-right-width: var(--xmlui-borderWidth-Tabs);
|
|
7154
7145
|
border-right-style: solid;
|
|
7155
7146
|
border-right-color: var(--xmlui-borderColor-Tabs);
|
|
7156
7147
|
}
|
|
7157
|
-
.
|
|
7148
|
+
._filler_1ggvi_26[data-orientation=horizontal] {
|
|
7158
7149
|
border-bottom-width: var(--xmlui-borderWidth-Tabs);
|
|
7159
7150
|
border-bottom-style: solid;
|
|
7160
7151
|
border-bottom-color: var(--xmlui-borderColor-Tabs);
|
|
7161
7152
|
}
|
|
7162
7153
|
|
|
7163
|
-
.
|
|
7164
|
-
|
|
7154
|
+
._tabTrigger_1ggvi_40 {
|
|
7155
|
+
padding: var(--xmlui-padding-trigger-Tabs);
|
|
7156
|
+
padding-left: var(--xmlui-paddingLeft-trigger-Tabs, var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)));
|
|
7157
|
+
padding-right: var(--xmlui-paddingRight-trigger-Tabs, var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)));
|
|
7158
|
+
padding-top: var(--xmlui-paddingTop-trigger-Tabs, var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)));
|
|
7159
|
+
padding-bottom: var(--xmlui-paddingBottom-trigger-Tabs, var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)));
|
|
7165
7160
|
color: var(--xmlui-textColor-trigger-Tabs);
|
|
7166
7161
|
background-color: var(--xmlui-backgroundColor-trigger-Tabs);
|
|
7167
|
-
|
|
7162
|
+
border-radius: var(--xmlui-borderRadius-trigger-Tabs);
|
|
7168
7163
|
display: flex;
|
|
7169
7164
|
align-items: center;
|
|
7170
7165
|
justify-content: center;
|
|
7171
|
-
font-size:
|
|
7166
|
+
font-size: var(--xmlui-fontSize-normal);
|
|
7172
7167
|
line-height: 1;
|
|
7173
7168
|
user-select: none;
|
|
7174
|
-
border
|
|
7169
|
+
border: var(--xmlui-border-trigger-Tabs);
|
|
7170
|
+
}
|
|
7171
|
+
._tabTrigger_1ggvi_40._distributeEvenly_1ggvi_57 {
|
|
7172
|
+
flex: 1 1 auto;
|
|
7175
7173
|
}
|
|
7176
|
-
.
|
|
7174
|
+
._tabTrigger_1ggvi_40:hover {
|
|
7177
7175
|
background-color: var(--xmlui-backgroundColor-trigger-Tabs--hover);
|
|
7178
7176
|
}
|
|
7179
|
-
.
|
|
7177
|
+
._tabTrigger_1ggvi_40[data-orientation=vertical] {
|
|
7180
7178
|
border-right-width: var(--xmlui-borderWidth-Tabs);
|
|
7181
7179
|
border-right-style: solid;
|
|
7182
7180
|
border-right-color: var(--xmlui-borderColor-Tabs);
|
|
7183
7181
|
}
|
|
7184
|
-
.
|
|
7182
|
+
._tabTrigger_1ggvi_40[data-orientation=vertical][data-state=active] {
|
|
7185
7183
|
border-right-width: var(--xmlui-borderWidth-Tabs);
|
|
7186
7184
|
border-right-style: solid;
|
|
7187
7185
|
border-right-color: var(--xmlui-borderColor-active-Tabs);
|
|
7186
|
+
background-color: var(--xmlui-backgroundColor-trigger-Tabs--active);
|
|
7188
7187
|
}
|
|
7189
|
-
.
|
|
7188
|
+
._tabTrigger_1ggvi_40[data-orientation=horizontal] {
|
|
7190
7189
|
border-bottom-width: var(--xmlui-borderWidth-Tabs);
|
|
7191
7190
|
border-bottom-style: solid;
|
|
7192
7191
|
border-bottom-color: var(--xmlui-borderColor-Tabs);
|
|
7193
7192
|
}
|
|
7194
|
-
.
|
|
7193
|
+
._tabTrigger_1ggvi_40[data-orientation=horizontal][data-state=active] {
|
|
7195
7194
|
border-bottom-width: var(--xmlui-borderWidth-Tabs);
|
|
7196
7195
|
border-bottom-style: solid;
|
|
7197
7196
|
border-bottom-color: var(--xmlui-borderColor-active-Tabs);
|
|
7197
|
+
background-color: var(--xmlui-backgroundColor-trigger-Tabs--active);
|
|
7198
7198
|
}
|
|
7199
|
-
.
|
|
7199
|
+
._tabTrigger_1ggvi_40:hover {
|
|
7200
7200
|
cursor: pointer;
|
|
7201
7201
|
}
|
|
7202
7202
|
|
|
7203
|
-
.
|
|
7203
|
+
._tabsList_1ggvi_89 {
|
|
7204
7204
|
background-color: var(--xmlui-backgroundColor-list-Tabs);
|
|
7205
|
+
border-radius: var(--xmlui-borderRadius-list-Tabs);
|
|
7206
|
+
border: var(--xmlui-border-list-Tabs);
|
|
7205
7207
|
position: relative;
|
|
7206
7208
|
z-index: 99;
|
|
7207
7209
|
overflow: hidden;
|
|
@@ -7209,18 +7211,18 @@ li .htmlOl {
|
|
|
7209
7211
|
flex-shrink: 0;
|
|
7210
7212
|
scrollbar-width: thin;
|
|
7211
7213
|
}
|
|
7212
|
-
.
|
|
7214
|
+
._tabsList_1ggvi_89[data-orientation=vertical] {
|
|
7213
7215
|
flex-direction: column;
|
|
7214
7216
|
}
|
|
7215
|
-
.
|
|
7217
|
+
._tabsList_1ggvi_89[data-orientation=horizontal] {
|
|
7216
7218
|
flex-direction: row;
|
|
7217
7219
|
}
|
|
7218
7220
|
|
|
7219
|
-
.
|
|
7221
|
+
._tabsList_1ggvi_89:hover {
|
|
7220
7222
|
overflow: auto;
|
|
7221
7223
|
}
|
|
7222
7224
|
|
|
7223
|
-
.
|
|
7225
|
+
._tabsContent_1ggvi_111 {
|
|
7224
7226
|
flex-grow: 1;
|
|
7225
7227
|
outline: none;
|
|
7226
7228
|
}/*
|
|
@@ -99,7 +99,7 @@ const buildLib = (_a) => __awaiter(void 0, [_a], void 0, function* ({ watchMode,
|
|
|
99
99
|
output: {
|
|
100
100
|
footer: (chunk) => {
|
|
101
101
|
if (chunk.name === "index" && chunk.fileName === umdFileName) {
|
|
102
|
-
return `if(typeof window.xmlui !== "undefined"){window.xmlui.standalone.registerExtension(window['${env.npm_package_name}']);}`;
|
|
102
|
+
return `if(typeof window.xmlui !== "undefined"){window.xmlui.standalone.registerExtension(window['${env.npm_package_name}'].default || window['${env.npm_package_name}']);}`;
|
|
103
103
|
}
|
|
104
104
|
return "";
|
|
105
105
|
},
|
|
@@ -71,7 +71,7 @@ exports.ListMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
71
71
|
defaultValue: true,
|
|
72
72
|
},
|
|
73
73
|
},
|
|
74
|
-
childrenAsTemplate:
|
|
74
|
+
childrenAsTemplate: "itemTemplate",
|
|
75
75
|
apis: {
|
|
76
76
|
scrollToTop: (0, ComponentDefs_1.d)("This method scrolls the list to the top."),
|
|
77
77
|
scrollToBottom: (0, ComponentDefs_1.d)("This method scrolls the list to the bottom."),
|
|
@@ -80,6 +80,9 @@ exports.ListMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
80
80
|
},
|
|
81
81
|
contextVars: {
|
|
82
82
|
$item: (0, ComponentDefs_1.d)(`This property represents the value of an item in the data list.`),
|
|
83
|
+
$itemIndex: (0, metadata_helpers_1.dComponent)("This integer value represents the current row index (zero-based) while rendering children."),
|
|
84
|
+
$isFirst: (0, metadata_helpers_1.dComponent)("This boolean value indicates if the component renders its first item."),
|
|
85
|
+
$isLast: (0, metadata_helpers_1.dComponent)("This boolean value indicates if the component renders its last item."),
|
|
83
86
|
},
|
|
84
87
|
themeVars: (0, themeVars_1.parseScssVar)(List_module_scss_1.default.themeVars),
|
|
85
88
|
});
|
|
@@ -87,8 +90,12 @@ exports.dynamicHeightListComponentRenderer = (0, renderers_1.createComponentRend
|
|
|
87
90
|
const itemTemplate = node.props.itemTemplate;
|
|
88
91
|
const hideEmptyGroups = extractValue.asOptionalBoolean(node.props.hideEmptyGroups, true);
|
|
89
92
|
return ((0, jsx_runtime_1.jsx)(ListNative_1.ListNative, { registerComponentApi: registerComponentApi, style: layoutCss, loading: extractValue.asOptionalBoolean(node.props.loading), items: extractValue(node.props.items) || extractValue(node.props.data), limit: extractValue(node.props.limit), groupBy: extractValue(node.props.groupBy), orderBy: extractValue(node.props.orderBy), availableGroups: extractValue(node.props.availableGroups), scrollAnchor: node.props.scrollAnchor, pageInfo: extractValue(node.props.pageInfo), idKey: extractValue(node.props.idKey), requestFetchPrevPage: lookupEventHandler("requestFetchPrevPage"), requestFetchNextPage: lookupEventHandler("requestFetchNextPage"), emptyListPlaceholder: renderChild(node.props.emptyListTemplate), groupsInitiallyExpanded: extractValue.asOptionalBoolean(node.props.groupsInitiallyExpanded), defaultGroups: extractValue(node.props.defaultGroups), borderCollapse: extractValue.asOptionalBoolean(node.props.borderCollapse, true), itemRenderer: itemTemplate &&
|
|
90
|
-
((item, key) => {
|
|
91
|
-
return ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: itemTemplate, item: item, renderChild: renderChild, layoutContext: layoutContext
|
|
93
|
+
((item, key, rowIndex, count) => {
|
|
94
|
+
return ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: itemTemplate, item: item, renderChild: renderChild, layoutContext: layoutContext, contextVars: {
|
|
95
|
+
$itemIndex: rowIndex,
|
|
96
|
+
$isFirst: rowIndex === 0,
|
|
97
|
+
$isLast: rowIndex === count - 1,
|
|
98
|
+
} }, key));
|
|
92
99
|
}), sectionRenderer: node.props.groupBy
|
|
93
100
|
? (item, key) => {
|
|
94
101
|
var _a, _b, _c;
|
|
@@ -334,7 +334,7 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList({ items
|
|
|
334
334
|
if (rows.length) {
|
|
335
335
|
(_a = virtualizerRef.current) === null || _a === void 0 ? void 0 : _a.scrollToIndex(rows.length + 1, {
|
|
336
336
|
align: "end",
|
|
337
|
-
offset: scrollPaddingTop
|
|
337
|
+
offset: scrollPaddingTop,
|
|
338
338
|
});
|
|
339
339
|
}
|
|
340
340
|
});
|
|
@@ -367,6 +367,7 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList({ items
|
|
|
367
367
|
});
|
|
368
368
|
}, [registerComponentApi, scrollToBottom, scrollToId, scrollToIndex, scrollToTop]);
|
|
369
369
|
const rowTypeContextValue = (0, react_1.useCallback)((index) => rows[index]._row_type, [rows]);
|
|
370
|
+
const rowCount = (_a = rows === null || rows === void 0 ? void 0 : rows.length) !== null && _a !== void 0 ? _a : 0;
|
|
370
371
|
return ((0, jsx_runtime_1.jsx)(ListItemTypeContext.Provider, { value: rowTypeContextValue, children: (0, jsx_runtime_1.jsx)(exports.ListContext.Provider, { value: expandContextValue, children: (0, jsx_runtime_1.jsxs)("div", { ref: rootRef, style: style, className: (0, classnames_1.default)(List_module_scss_1.default.outerWrapper, {
|
|
371
372
|
[List_module_scss_1.default.hasOutsideScroll]: hasOutsideScroll,
|
|
372
373
|
}), children: [loading && rows.length === 0 && ((0, jsx_runtime_1.jsx)("div", { className: List_module_scss_1.default.loadingWrapper, children: (0, jsx_runtime_1.jsx)(SpinnerNative_1.Spinner, {}) })), !loading &&
|
|
@@ -375,7 +376,9 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList({ items
|
|
|
375
376
|
[List_module_scss_1.default.reverse]: scrollAnchor === "bottom",
|
|
376
377
|
[List_module_scss_1.default.borderCollapse]: borderCollapse,
|
|
377
378
|
[List_module_scss_1.default.sectioned]: groupBy !== undefined,
|
|
378
|
-
}), "data-list-container": true, children: (0, jsx_runtime_1.jsx)(virtua_1.Virtualizer, { ref: virtualizerRef, scrollRef: scrollElementRef, shift: shift, onScroll: onScroll, startMargin: hasOutsideScroll
|
|
379
|
+
}), "data-list-container": true, children: (0, jsx_runtime_1.jsx)(virtua_1.Virtualizer, { ref: virtualizerRef, scrollRef: scrollElementRef, shift: shift, onScroll: onScroll, startMargin: hasOutsideScroll
|
|
380
|
+
? ((_b = parentRef.current) === null || _b === void 0 ? void 0 : _b.offsetTop) - ((_c = scrollRef.current) === null || _c === void 0 ? void 0 : _c.offsetTop) || 0
|
|
381
|
+
: 0, item: Item, count: rowCount, children: (rowIndex) => {
|
|
379
382
|
const row = rows[rowIndex];
|
|
380
383
|
const key = row[idKey];
|
|
381
384
|
switch (row._row_type) {
|
|
@@ -384,12 +387,12 @@ exports.ListNative = (0, react_1.forwardRef)(function DynamicHeightList({ items
|
|
|
384
387
|
case RowType.SECTION_FOOTER:
|
|
385
388
|
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (sectionFooterRenderer === null || sectionFooterRenderer === void 0 ? void 0 : sectionFooterRenderer(row, key)) || (0, jsx_runtime_1.jsx)("div", {}) }, key));
|
|
386
389
|
default:
|
|
387
|
-
return (0, jsx_runtime_1.jsx)(react_1.Fragment, { children: itemRenderer(row, key) || (0, jsx_runtime_1.jsx)("div", {}) }, key);
|
|
390
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: itemRenderer(row, key, rowIndex, rowCount) || (0, jsx_runtime_1.jsx)("div", {}) }, key));
|
|
388
391
|
}
|
|
389
392
|
} }) }))] }) }) }));
|
|
390
393
|
});
|
|
391
394
|
// --- Helper function for List item rendering
|
|
392
|
-
function MemoizedSection({ node, renderChild, item, }) {
|
|
395
|
+
function MemoizedSection({ node, renderChild, item, contextVars = constants_1.EMPTY_OBJECT, }) {
|
|
393
396
|
const { isExpanded, toggleExpanded } = (0, react_1.useContext)(exports.ListContext);
|
|
394
397
|
const id = item.id;
|
|
395
398
|
const expanded = isExpanded(id);
|
|
@@ -401,5 +404,5 @@ function MemoizedSection({ node, renderChild, item, }) {
|
|
|
401
404
|
},
|
|
402
405
|
};
|
|
403
406
|
}, [expanded, id, toggleExpanded]);
|
|
404
|
-
return ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: node, renderChild: renderChild, item: item, context: sectionContext, itemKey: "$group", contextKey: "$group" }));
|
|
407
|
+
return ((0, jsx_runtime_1.jsx)(container_helpers_1.MemoizedItem, { node: node, renderChild: renderChild, item: item, context: sectionContext, itemKey: "$group", contextKey: "$group", contextVars: Object.assign(Object.assign({}, contextVars), { $isFirst: item.index === 0, $isLast: item.index === item.count - 1 }) }));
|
|
405
408
|
}
|
|
@@ -34,15 +34,16 @@ exports.TabsMd = (0, ComponentDefs_1.createMetadata)({
|
|
|
34
34
|
},
|
|
35
35
|
themeVars: (0, themeVars_1.parseScssVar)(Tabs_module_scss_1.default.themeVars),
|
|
36
36
|
defaultThemeVars: {
|
|
37
|
-
[`backgroundColor-${COMP}`]: "
|
|
37
|
+
// [`backgroundColor-${COMP}`]: "transparent",
|
|
38
38
|
[`borderStyle-${COMP}`]: "solid",
|
|
39
39
|
[`borderColor-${COMP}`]: "$borderColor",
|
|
40
40
|
[`borderColor-active-${COMP}`]: "$color-primary",
|
|
41
41
|
[`borderWidth-${COMP}`]: "2px",
|
|
42
|
-
[`backgroundColor-trigger-${COMP}`]: "
|
|
43
|
-
[`backgroundColor-trigger-${COMP}--hover`]: "$color-
|
|
44
|
-
[`
|
|
45
|
-
[`
|
|
42
|
+
// [`backgroundColor-trigger-${COMP}`]: "transparent",
|
|
43
|
+
[`backgroundColor-trigger-${COMP}--hover`]: "$color-surface-100",
|
|
44
|
+
[`padding-trigger-${COMP}`]: "$space-4",
|
|
45
|
+
// [`backgroundColor-list-${COMP}`]: "$color-primary-50",
|
|
46
|
+
// [`textColor-trigger-${COMP}`]: "$color-primary-100",
|
|
46
47
|
},
|
|
47
48
|
});
|
|
48
49
|
exports.tabsComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.TabsMd, ({ extractValue, node, renderChild, layoutCss, registerComponentApi }) => {
|
|
@@ -43,7 +43,8 @@ const RTabs = __importStar(require("@radix-ui/react-tabs"));
|
|
|
43
43
|
const Tabs_module_scss_1 = __importDefault(require("./Tabs.module.scss"));
|
|
44
44
|
const misc_1 = require("../../components-core/utils/misc");
|
|
45
45
|
const TabContext_1 = require("../Tabs/TabContext");
|
|
46
|
-
|
|
46
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
47
|
+
exports.Tabs = (0, react_1.forwardRef)(function Tabs({ activeTab = 0, orientation = "horizontal", tabRenderer, style, children, registerComponentApi, className, distributeEvenly = false, }, forwardedRef) {
|
|
47
48
|
const { tabItems, tabContextValue } = (0, TabContext_1.useTabContextValue)();
|
|
48
49
|
const [activeIndex, setActiveIndex] = (0, react_1.useState)(activeTab);
|
|
49
50
|
const currentTab = (0, react_1.useMemo)(() => {
|
|
@@ -73,11 +74,13 @@ exports.Tabs = (0, react_1.forwardRef)(function Tabs({ activeTab = 0, orientatio
|
|
|
73
74
|
next,
|
|
74
75
|
});
|
|
75
76
|
}, [next, registerComponentApi]);
|
|
76
|
-
return ((0, jsx_runtime_1.jsx)(TabContext_1.TabContext.Provider, { value: tabContextValue, children: (0, jsx_runtime_1.jsxs)(RTabs.Root, { ref: forwardedRef, className: Tabs_module_scss_1.default.tabs, value: `${currentTab}`, onValueChange: (tab) => {
|
|
77
|
+
return ((0, jsx_runtime_1.jsx)(TabContext_1.TabContext.Provider, { value: tabContextValue, children: (0, jsx_runtime_1.jsxs)(RTabs.Root, { ref: forwardedRef, className: (0, classnames_1.default)(Tabs_module_scss_1.default.tabs, className), value: `${currentTab}`, onValueChange: (tab) => {
|
|
77
78
|
const newIndex = tabItems.findIndex((item) => item.id === tab);
|
|
78
79
|
if (newIndex !== activeIndex) {
|
|
79
80
|
tabContextValue.setActiveTabId(tab);
|
|
80
81
|
setActiveIndex(newIndex);
|
|
81
82
|
}
|
|
82
|
-
}, orientation: orientation, style: style, children: [(0, jsx_runtime_1.jsxs)(RTabs.List, { className: Tabs_module_scss_1.default.tabsList, children: [tabItems.map((tab) => tabRenderer ? ((0, jsx_runtime_1.jsx)(RTabs.Trigger, { value: tab.id, children: tabRenderer({ label: tab.label, isActive: tab.id === currentTab }) }, tab.id)) : ((0, jsx_runtime_1.jsx)(RTabs.Trigger, { className:
|
|
83
|
+
}, orientation: orientation, style: style, children: [(0, jsx_runtime_1.jsxs)(RTabs.List, { className: Tabs_module_scss_1.default.tabsList, children: [tabItems.map((tab) => tabRenderer ? ((0, jsx_runtime_1.jsx)(RTabs.Trigger, { value: tab.id, asChild: true, children: tabRenderer({ label: tab.label, isActive: tab.id === currentTab }) }, tab.id)) : ((0, jsx_runtime_1.jsx)(RTabs.Trigger, { className: (0, classnames_1.default)(Tabs_module_scss_1.default.tabTrigger, {
|
|
84
|
+
[Tabs_module_scss_1.default.distributeEvenly]: distributeEvenly
|
|
85
|
+
}), value: tab.id, children: tab.label }, tab.id))), (!distributeEvenly && !tabRenderer) && (0, jsx_runtime_1.jsx)("div", { className: Tabs_module_scss_1.default.filler, "data-orientation": orientation })] }), children] }) }));
|
|
83
86
|
});
|
|
@@ -26,6 +26,7 @@ exports.RootThemeDefinition = {
|
|
|
26
26
|
"const-color-surface-800": "hsl(204, 30.3%, 27%)",
|
|
27
27
|
"const-color-surface-900": "hsl(204, 30.3%, 16%)",
|
|
28
28
|
"const-color-surface-950": "hsl(204, 30.3%, 13%)",
|
|
29
|
+
"const-color-surface-1000": "hsl(204, 30.3%, 9%)",
|
|
29
30
|
"const-color-surface": "$const-color-surface-500",
|
|
30
31
|
// --- Primary color shades (bluish)
|
|
31
32
|
"const-color-primary-50": "hsl(212,71.9%,94.5%)",
|
|
@@ -230,6 +231,7 @@ exports.RootThemeDefinition = {
|
|
|
230
231
|
"color-surface-800": "$const-color-surface-800",
|
|
231
232
|
"color-surface-900": "$const-color-surface-900",
|
|
232
233
|
"color-surface-950": "$const-color-surface-950",
|
|
234
|
+
"color-surface-1000": "$const-color-surface-1000",
|
|
233
235
|
"color-surface": "$const-color-surface-500",
|
|
234
236
|
"color-surface-base": "$color-surface-0",
|
|
235
237
|
"color-surface-lower": "$color-surface-100",
|
|
@@ -318,7 +320,7 @@ exports.RootThemeDefinition = {
|
|
|
318
320
|
dark: {
|
|
319
321
|
themeVars: {
|
|
320
322
|
// --- Default surface color shades (form white to black)
|
|
321
|
-
"color-surface-0": "$const-color-surface-
|
|
323
|
+
"color-surface-0": "$const-color-surface-1000",
|
|
322
324
|
"color-surface-50": "$const-color-surface-950",
|
|
323
325
|
"color-surface-100": "$const-color-surface-900",
|
|
324
326
|
"color-surface-200": "$const-color-surface-800",
|
|
@@ -330,6 +332,7 @@ exports.RootThemeDefinition = {
|
|
|
330
332
|
"color-surface-800": "$const-color-surface-200",
|
|
331
333
|
"color-surface-900": "$const-color-surface-100",
|
|
332
334
|
"color-surface-950": "$const-color-surface-50",
|
|
335
|
+
"color-surface-1000": "$const-color-surface-0",
|
|
333
336
|
"color-surface": "$const-color-surface-500",
|
|
334
337
|
"color-surface-base": "$color-surface-0",
|
|
335
338
|
"color-surface-lower": "$color-surface-0",
|