sellmate-design-system-react 1.0.0 → 1.1.0
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/components/STableBar/STableBar.cjs +93 -0
- package/dist/components/STableBar/STableBar.cjs.map +1 -0
- package/dist/components/STableBar/STableBar.d.ts +17 -0
- package/dist/components/STableBar/STableBar.js +91 -0
- package/dist/components/STableBar/STableBar.js.map +1 -0
- package/dist/components/STableBar/index.d.ts +1 -0
- package/dist/index.cjs +56 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +56 -1
- package/dist/index.js.map +1 -1
- package/dist/styles.css +35 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export * from './components/STabs';
|
|
|
34
34
|
export * from './components/SPagination';
|
|
35
35
|
export * from './components/SStepper';
|
|
36
36
|
export * from './components/STable';
|
|
37
|
+
export * from './components/STableBar';
|
|
37
38
|
export * from './components/SKeyValueTable';
|
|
38
39
|
export * from './components/SToast';
|
|
39
40
|
export * from './components/SForm';
|
package/dist/index.js
CHANGED
|
@@ -7806,6 +7806,61 @@ var STable = forwardRef(function STable2({
|
|
|
7806
7806
|
}
|
|
7807
7807
|
);
|
|
7808
7808
|
});
|
|
7809
|
+
var COUNT_NULL = "var(--cmp-table-bar-count-null)";
|
|
7810
|
+
var totalColor = (n) => n > 0 ? "var(--cmp-table-bar-count-total)" : COUNT_NULL;
|
|
7811
|
+
var selectedColor = (n) => n > 0 ? "var(--color-brilliantblue-75)" : COUNT_NULL;
|
|
7812
|
+
var STableBar = forwardRef(function STableBar2({ total, selected, actions, rightActions, className, ...rest }, ref) {
|
|
7813
|
+
const hasTotal = total != null;
|
|
7814
|
+
const hasSelected = selected != null;
|
|
7815
|
+
const hasCount = hasTotal || hasSelected;
|
|
7816
|
+
return /* @__PURE__ */ jsxs(
|
|
7817
|
+
"div",
|
|
7818
|
+
{
|
|
7819
|
+
ref,
|
|
7820
|
+
role: actions || rightActions ? "toolbar" : void 0,
|
|
7821
|
+
className: cn(
|
|
7822
|
+
"flex w-full items-center gap-[var(--cmp-table-bar-section-gap)] px-[var(--sys-space-table-padding-md)]",
|
|
7823
|
+
"h-[var(--cmp-table-bar-height)] shrink-0",
|
|
7824
|
+
"rounded-[var(--cmp-table-radius)] border-[length:var(--cmp-table-border-width)] border-solid border-[var(--cmp-table-border-color)] bg-white",
|
|
7825
|
+
className
|
|
7826
|
+
),
|
|
7827
|
+
...rest,
|
|
7828
|
+
children: [
|
|
7829
|
+
hasCount && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--cmp-table-content-gap)]", children: [
|
|
7830
|
+
hasTotal && /* @__PURE__ */ jsxs("span", { className: "typo-table-accent whitespace-nowrap text-[var(--sys-color-fg-primary)]", children: [
|
|
7831
|
+
"\uCD1D ",
|
|
7832
|
+
/* @__PURE__ */ jsx("b", { style: { color: totalColor(total) }, children: total.toLocaleString() }),
|
|
7833
|
+
" \uAC74"
|
|
7834
|
+
] }),
|
|
7835
|
+
hasTotal && hasSelected && /* @__PURE__ */ jsx(
|
|
7836
|
+
"span",
|
|
7837
|
+
{
|
|
7838
|
+
"aria-hidden": "true",
|
|
7839
|
+
className: "typo-table-body text-[var(--sys-color-fg-tertiary)]",
|
|
7840
|
+
children: "/"
|
|
7841
|
+
}
|
|
7842
|
+
),
|
|
7843
|
+
hasSelected && /* @__PURE__ */ jsxs("span", { className: "typo-table-body whitespace-nowrap text-[var(--sys-color-fg-primary)]", children: [
|
|
7844
|
+
/* @__PURE__ */ jsx("b", { style: { color: selectedColor(selected) }, children: selected.toLocaleString() }),
|
|
7845
|
+
" \uAC74 \uC120\uD0DD"
|
|
7846
|
+
] })
|
|
7847
|
+
] }),
|
|
7848
|
+
actions && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-[var(--cmp-table-bar-section-gap)] has-[>div:empty]:hidden", children: [
|
|
7849
|
+
hasCount && /* @__PURE__ */ jsx(
|
|
7850
|
+
SDivider,
|
|
7851
|
+
{
|
|
7852
|
+
vertical: true,
|
|
7853
|
+
className: "h-[var(--cmp-table-bar-divider-height)] self-center",
|
|
7854
|
+
style: { backgroundColor: "var(--cmp-table-border-color)" }
|
|
7855
|
+
}
|
|
7856
|
+
),
|
|
7857
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center gap-[var(--cmp-table-content-gap)]", children: actions })
|
|
7858
|
+
] }),
|
|
7859
|
+
rightActions && /* @__PURE__ */ jsx("div", { className: "ml-auto flex items-center gap-[var(--cmp-table-content-gap)] empty:hidden", children: rightActions })
|
|
7860
|
+
]
|
|
7861
|
+
}
|
|
7862
|
+
);
|
|
7863
|
+
});
|
|
7809
7864
|
var FONT = {
|
|
7810
7865
|
sm: { fontSize: 12, lineHeight: 20, paddingX: "var(--cmp-textinput-sm-paddingX)" },
|
|
7811
7866
|
md: { fontSize: 14, lineHeight: 24, paddingX: "var(--cmp-textinput-md-paddingX)" }
|
|
@@ -11827,6 +11882,6 @@ function STimeRangePicker({
|
|
|
11827
11882
|
);
|
|
11828
11883
|
}
|
|
11829
11884
|
|
|
11830
|
-
export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, PAGE_BACKGROUNDS, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDropdownButton, SExpansionItem, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLayout, SLayoutContext, SLinearProgress, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SScrollArea, SSelect, SStepper, SSwitch, STEPPER_SIZES, STable, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, findGnbAncestors, findGnbRailValue, isColorKey, loading, resolveColor, useSLayout };
|
|
11885
|
+
export { BADGE_COLORS, BUTTON_COLORS, BUTTON_SIZES, COLOR_KEYS, GNB_COLORS, GNB_COMMON, GNB_FOLD_MS, GNB_HEADER, GNB_MENU, GNB_MENU_WIDTH, GNB_RAIL, GNB_RAIL_WIDTH, ICONS, PAGE_BACKGROUNDS, SActionModal, SBadge, SBarcodeInput, SButton, SCROLL_AREA_AXES, SCalendar, SCallout, SCard, SCheckbox, SChip, SChipInput, SCircleProgress, SConfirmModal, SDatePicker, SDateRangePicker, SDivider, SDropdownButton, SExpansionItem, SField, SFilePicker, SForm, SGhostButton, SGnb, SGuide, SIcon, SInput, SKeyValueTable, SLayout, SLayoutContext, SLinearProgress, SLoadingContainer, SLoadingModal, SLoadingViewport, SModal, SNumberInput, SPage, SPagination, SPopover, SPopup, SPortal, SRadio, SRadioButton, SRadioGroup, SScrollArea, SSelect, SStepper, SSwitch, STEPPER_SIZES, STable, STableBar, STabs, STag, STextLink, STextarea, STimePicker, STimeRangePicker, SToast, SToastContainer, SToggle, STooltip, TAG_COLORS, TAG_SHAPES, TAG_SIZES, TIMEPICKER_SIZES, TIMEPICKER_SIZE_CONFIG, buttonPreset, cn, findGnbAncestors, findGnbRailValue, isColorKey, loading, resolveColor, useSLayout };
|
|
11831
11886
|
//# sourceMappingURL=index.js.map
|
|
11832
11887
|
//# sourceMappingURL=index.js.map
|