sevago-library 1.0.2 → 1.0.6

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/index.esm.js CHANGED
@@ -73691,6 +73691,68 @@ const TextFieldElement = ({
73691
73691
  )
73692
73692
  ] });
73693
73693
  };
73694
+ const TagElement = ({
73695
+ type,
73696
+ content,
73697
+ width: width2 = "fit-content",
73698
+ variation = "caption",
73699
+ size = "medium",
73700
+ variant = "contained",
73701
+ sx,
73702
+ color: color2,
73703
+ iconProps
73704
+ }) => {
73705
+ const TAG_VARIANT = {
73706
+ contained: {
73707
+ backgroundColor: type,
73708
+ color: color2 || "white"
73709
+ },
73710
+ outlined: {
73711
+ backgroundColor: lightenColor(type, 0.8),
73712
+ color: type
73713
+ },
73714
+ "outlined-border": {
73715
+ backgroundColor: lightenColor(type, 0.8),
73716
+ border: `1px solid ${type}`,
73717
+ color: type
73718
+ }
73719
+ };
73720
+ return /* @__PURE__ */ jsx(Fragment, { children: iconProps ? /* @__PURE__ */ jsxs(
73721
+ Stack,
73722
+ {
73723
+ sx: {
73724
+ borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
73725
+ width: width2,
73726
+ textAlign: "center",
73727
+ textWrap: "nowrap",
73728
+ ...TAG_SIZE[size],
73729
+ ...TAG_VARIANT[variant],
73730
+ ...sx
73731
+ },
73732
+ children: [
73733
+ iconProps && iconProps,
73734
+ /* @__PURE__ */ jsx(Typography$1, { variant: variation, children: content })
73735
+ ]
73736
+ }
73737
+ ) : /* @__PURE__ */ jsx(
73738
+ Typography$1,
73739
+ {
73740
+ variant: variation,
73741
+ sx: {
73742
+ borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
73743
+ width: width2,
73744
+ textAlign: "center",
73745
+ textWrap: "nowrap",
73746
+ justifyContent: "center",
73747
+ ...getLimitLineCss(1),
73748
+ ...TAG_SIZE[size],
73749
+ ...TAG_VARIANT[variant],
73750
+ ...sx
73751
+ },
73752
+ children: content
73753
+ }
73754
+ ) });
73755
+ };
73694
73756
  const TypographyInfoUser = ({
73695
73757
  items,
73696
73758
  columns = 2,
@@ -73700,7 +73762,8 @@ const TypographyInfoUser = ({
73700
73762
  showEmptyAsDots = true,
73701
73763
  gridTemplateColumns: gridTemplateColumns2 = "1.75fr 2fr",
73702
73764
  highlightQuery,
73703
- direction = "row"
73765
+ direction = "row",
73766
+ color: color2
73704
73767
  }) => {
73705
73768
  return /* @__PURE__ */ jsx(
73706
73769
  StackRow,
@@ -73716,37 +73779,27 @@ const TypographyInfoUser = ({
73716
73779
  Stack$1,
73717
73780
  {
73718
73781
  sx: {
73719
- display: direction === "row" ? "grid" : "flex",
73720
73782
  gridTemplateColumns: direction === "row" ? columns === 1 ? "1fr 3fr" : gridTemplateColumns2 : "unset",
73721
73783
  height: "fit-content",
73722
- flexDirection: direction === "column" ? "column" : "row"
73784
+ flexDirection: direction === "column" ? "column" : "row",
73785
+ gap: 0
73723
73786
  },
73724
73787
  children: [
73725
- /* @__PURE__ */ jsxs(
73726
- Typography$1,
73788
+ /* @__PURE__ */ jsxs(Typography$1, { sx: { ...TYPOGRAPHY.textSm.regular, color: COMMON.gray6, flex: 1 }, children: [
73789
+ highlightYellow(item.label, highlightQuery ?? "", showEmptyAsDots),
73790
+ ":"
73791
+ ] }),
73792
+ item.statusTag ? /* @__PURE__ */ jsx(
73793
+ TagElement,
73727
73794
  {
73728
- sx: {
73729
- ...TYPOGRAPHY.textSm.regular,
73730
- color: COMMON.gray6,
73731
- flex: 1
73732
- },
73733
- children: [
73734
- highlightYellow(item.label, highlightQuery ?? "", showEmptyAsDots),
73735
- ":"
73736
- ]
73795
+ sx: { textTransform: "none", width: "100%", ...sx },
73796
+ content: item.value,
73797
+ type: color2 || "inherit"
73737
73798
  }
73738
- ),
73739
- /* @__PURE__ */ jsx(
73799
+ ) : /* @__PURE__ */ jsx(
73740
73800
  Typography$1,
73741
73801
  {
73742
- sx: {
73743
- ...TYPOGRAPHY.textSm.regular,
73744
- color: COMMON.black,
73745
- flex: 1,
73746
- borderBottom: `1px solid ${COMMON.gray8}`,
73747
- textAlign: "right",
73748
- ...item.sxValue
73749
- },
73802
+ sx: { ...TYPOGRAPHY.textSm.regular, color: COMMON.black, flex: 1, ...item.sxValue },
73750
73803
  children: highlightYellow(item.value, highlightQuery ?? "", showEmptyAsDots)
73751
73804
  }
73752
73805
  )
@@ -75971,68 +76024,6 @@ const tableArgTypes = {
75971
76024
  getRowMenu: { control: false },
75972
76025
  onDisabled: { control: false }
75973
76026
  };
75974
- const TagElement = ({
75975
- type,
75976
- content,
75977
- width: width2 = "fit-content",
75978
- variation = "caption",
75979
- size = "medium",
75980
- variant = "contained",
75981
- sx,
75982
- color: color2,
75983
- iconProps
75984
- }) => {
75985
- const TAG_VARIANT = {
75986
- contained: {
75987
- backgroundColor: type,
75988
- color: color2 || "white"
75989
- },
75990
- outlined: {
75991
- backgroundColor: lightenColor(type, 0.8),
75992
- color: type
75993
- },
75994
- "outlined-border": {
75995
- backgroundColor: lightenColor(type, 0.8),
75996
- border: `1px solid ${type}`,
75997
- color: type
75998
- }
75999
- };
76000
- return /* @__PURE__ */ jsx(Fragment, { children: iconProps ? /* @__PURE__ */ jsxs(
76001
- Stack,
76002
- {
76003
- sx: {
76004
- borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
76005
- width: width2,
76006
- textAlign: "center",
76007
- textWrap: "nowrap",
76008
- ...TAG_SIZE[size],
76009
- ...TAG_VARIANT[variant],
76010
- ...sx
76011
- },
76012
- children: [
76013
- iconProps && iconProps,
76014
- /* @__PURE__ */ jsx(Typography$1, { variant: variation, children: content })
76015
- ]
76016
- }
76017
- ) : /* @__PURE__ */ jsx(
76018
- Typography$1,
76019
- {
76020
- variant: variation,
76021
- sx: {
76022
- borderRadius: BORDER_RADIUS_ELEMENT_SMALL,
76023
- width: width2,
76024
- textAlign: "center",
76025
- textWrap: "nowrap",
76026
- justifyContent: "center",
76027
- ...getLimitLineCss(1),
76028
- ...TAG_SIZE[size],
76029
- ...TAG_VARIANT[variant],
76030
- ...sx
76031
- },
76032
- children: content
76033
- }
76034
- ) });
76035
- };
76036
76027
  const UserInfo = ({
76037
76028
  name = "Hệ thống",
76038
76029
  department = "Hệ thống",