sellmate-design-system-react 0.3.0 → 0.5.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.
Files changed (48) hide show
  1. package/README.md +84 -21
  2. package/dist/components/SGnb/SGnb.cjs +238 -79
  3. package/dist/components/SGnb/SGnb.cjs.map +1 -1
  4. package/dist/components/SGnb/SGnb.d.ts +17 -4
  5. package/dist/components/SGnb/SGnb.js +238 -79
  6. package/dist/components/SGnb/SGnb.js.map +1 -1
  7. package/dist/components/SGnb/gnb.config.d.ts +46 -12
  8. package/dist/components/SGnb/index.d.ts +1 -1
  9. package/dist/components/SLayout/SLayout.cjs +20 -19
  10. package/dist/components/SLayout/SLayout.cjs.map +1 -1
  11. package/dist/components/SLayout/SLayout.d.ts +4 -0
  12. package/dist/components/SLayout/SLayout.js +20 -19
  13. package/dist/components/SLayout/SLayout.js.map +1 -1
  14. package/dist/components/SPage/SPage.cjs +21 -20
  15. package/dist/components/SPage/SPage.cjs.map +1 -1
  16. package/dist/components/SPage/SPage.js +21 -20
  17. package/dist/components/SPage/SPage.js.map +1 -1
  18. package/dist/components/STable/STable.cjs +1 -1
  19. package/dist/components/STable/STable.cjs.map +1 -1
  20. package/dist/components/STable/STable.js +1 -1
  21. package/dist/components/STable/STable.js.map +1 -1
  22. package/dist/components/STabs/STabs.cjs +15 -26
  23. package/dist/components/STabs/STabs.cjs.map +1 -1
  24. package/dist/components/STabs/STabs.d.ts +1 -1
  25. package/dist/components/STabs/STabs.js +15 -26
  26. package/dist/components/STabs/STabs.js.map +1 -1
  27. package/dist/components/STimePicker/STimePicker.cjs +3834 -0
  28. package/dist/components/STimePicker/STimePicker.cjs.map +1 -0
  29. package/dist/components/STimePicker/STimePicker.d.ts +50 -0
  30. package/dist/components/STimePicker/STimePicker.js +3811 -0
  31. package/dist/components/STimePicker/STimePicker.js.map +1 -0
  32. package/dist/components/STimePicker/index.d.ts +2 -0
  33. package/dist/components/STimePicker/timepicker.config.d.ts +23 -0
  34. package/dist/components/STimeRangePicker/STimeRangePicker.cjs +3910 -0
  35. package/dist/components/STimeRangePicker/STimeRangePicker.cjs.map +1 -0
  36. package/dist/components/STimeRangePicker/STimeRangePicker.d.ts +53 -0
  37. package/dist/components/STimeRangePicker/STimeRangePicker.js +3887 -0
  38. package/dist/components/STimeRangePicker/STimeRangePicker.js.map +1 -0
  39. package/dist/components/STimeRangePicker/index.d.ts +1 -0
  40. package/dist/components/STimeRangePicker/time-range-picker.config.d.ts +9 -0
  41. package/dist/index.cjs +1114 -108
  42. package/dist/index.cjs.map +1 -1
  43. package/dist/index.d.ts +3 -0
  44. package/dist/index.js +1107 -109
  45. package/dist/index.js.map +1 -1
  46. package/dist/styles.css +143 -72
  47. package/dist/theme.css +81 -69
  48. package/package.json +4 -1
@@ -11,7 +11,7 @@ export interface STabsProps {
11
11
  size?: STabSize;
12
12
  /** 서브 탭(밑줄형) 스타일 */
13
13
  isSub?: boolean;
14
- /** 세로 배치 */
14
+ /** 세로 배치 (sub 전용 — main 폴더형은 항상 가로) */
15
15
  vertical?: boolean;
16
16
  className?: string;
17
17
  style?: CSSProperties;
@@ -2965,6 +2965,7 @@ function STabs({
2965
2965
  }) {
2966
2966
  const s = TAB_MAIN_SIZE[size];
2967
2967
  const blue = TAB_MAIN_COLORS.selected.border;
2968
+ const isVertical = isSub && vertical;
2968
2969
  const tabRefs = useRef([]);
2969
2970
  const moveTo = (target) => {
2970
2971
  if (target < 0 || target >= tabs.length) return;
@@ -2972,19 +2973,17 @@ function STabs({
2972
2973
  tabRefs.current[target]?.focus();
2973
2974
  };
2974
2975
  const containerStyle = { ...style };
2975
- if (!isSub) {
2976
- if (vertical) containerStyle.borderRight = `1px solid ${blue}`;
2977
- else containerStyle.borderBottom = `1px solid ${blue}`;
2978
- }
2976
+ if (!isSub) containerStyle.borderBottom = `1px solid ${blue}`;
2979
2977
  return /* @__PURE__ */ jsx(
2980
2978
  "div",
2981
2979
  {
2982
2980
  role: "tablist",
2983
- "aria-orientation": vertical ? "vertical" : "horizontal",
2981
+ "aria-orientation": isVertical ? "vertical" : "horizontal",
2984
2982
  className: cn(
2985
- "inline-flex w-fit",
2986
- vertical ? "flex-col items-stretch" : "flex-row",
2987
- isSub ? vertical ? "gap-[16px]" : "gap-[24px]" : "gap-[4px]",
2983
+ // main(가로): baseline(하단 divider)이 100% 너비로 채워지도록 w-full
2984
+ isSub ? "inline-flex w-fit" : "flex w-full",
2985
+ isVertical ? "flex-col items-stretch" : "flex-row",
2986
+ isSub ? isVertical ? "gap-[16px]" : "gap-[24px]" : "gap-[4px]",
2988
2987
  className
2989
2988
  ),
2990
2989
  style: containerStyle,
@@ -3013,22 +3012,12 @@ function STabs({
3013
3012
  color: selected ? TAB_MAIN_COLORS.selected.text : TAB_MAIN_COLORS.default.text,
3014
3013
  border: `1px solid ${border}`,
3015
3014
  // 폴더형: 미선택 탭은 baseline 위에, 선택 탭은 baseline(파란선)을 1px 덮어 연결된 것처럼 보이게
3016
- ...vertical ? {
3017
- borderTopLeftRadius: 6,
3018
- borderBottomLeftRadius: 6,
3019
- borderTopRightRadius: 0,
3020
- borderBottomRightRadius: 0,
3021
- justifyContent: "flex-start",
3022
- borderRight: selected ? `1px solid ${selectedBg}` : "none",
3023
- marginRight: selected ? -1 : 0
3024
- } : {
3025
- borderTopLeftRadius: 6,
3026
- borderTopRightRadius: 6,
3027
- borderBottomLeftRadius: 0,
3028
- borderBottomRightRadius: 0,
3029
- borderBottom: selected ? `1px solid ${selectedBg}` : "none",
3030
- marginBottom: selected ? -1 : 0
3031
- }
3015
+ borderTopLeftRadius: 6,
3016
+ borderTopRightRadius: 6,
3017
+ borderBottomLeftRadius: 0,
3018
+ borderBottomRightRadius: 0,
3019
+ borderBottom: selected ? `1px solid ${selectedBg}` : "none",
3020
+ marginBottom: selected ? -1 : 0
3032
3021
  };
3033
3022
  }
3034
3023
  return /* @__PURE__ */ jsxs(
@@ -3048,8 +3037,8 @@ function STabs({
3048
3037
  select();
3049
3038
  return;
3050
3039
  }
3051
- const nextKey = vertical ? "ArrowDown" : "ArrowRight";
3052
- const prevKey = vertical ? "ArrowUp" : "ArrowLeft";
3040
+ const nextKey = isVertical ? "ArrowDown" : "ArrowRight";
3041
+ const prevKey = isVertical ? "ArrowUp" : "ArrowLeft";
3053
3042
  if (e.key === nextKey) {
3054
3043
  e.preventDefault();
3055
3044
  moveTo((i + 1) % tabs.length);