ar-design 0.4.58 → 0.4.60

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.
@@ -126,6 +126,11 @@
126
126
  z-index: 3;
127
127
  }
128
128
 
129
+ &.subrow-col {
130
+ width: 2rem;
131
+ z-index: 3;
132
+ }
133
+
129
134
  &.type-of-number {
130
135
  text-align: right;
131
136
  }
@@ -561,6 +566,11 @@
561
566
  z-index: 3;
562
567
  }
563
568
 
569
+ &.subrow-col {
570
+ width: 2rem;
571
+ z-index: 3;
572
+ }
573
+
564
574
  &.type-of-number {
565
575
  text-align: right;
566
576
  }
@@ -234,7 +234,7 @@ const Gantt = ({ title, description, data, pagination, config = { isSearchable:
234
234
  React.createElement("text", { x: "10", y: y + ROW_HEIGHT / 2, className: "label-text" }, textContent.length * 7 > maxTextWidth
235
235
  ? `${textContent.substring(0, Math.floor(maxTextWidth / 7) - 3)}...`
236
236
  : textContent),
237
- React.createElement("line", { x1: "0", y1: y + ROW_HEIGHT, x2: LABEL_WIDTH, y2: y + ROW_HEIGHT, stroke: "var(--black)", strokeWidth: "0.5", opacity: 0.25 }),
237
+ React.createElement("line", { x1: 0, y1: y + ROW_HEIGHT, x2: LABEL_WIDTH, y2: y + ROW_HEIGHT, opacity: 0.15, stroke: "var(--black)", strokeWidth: "0.5" }),
238
238
  React.createElement("line", { x1: LABEL_WIDTH, y1: y + ROW_HEIGHT, x2: LABEL_WIDTH + TIMELINE.days.length * DAY_WIDTH, y2: y + ROW_HEIGHT, opacity: 0.25, stroke: "var(--black)", strokeWidth: STROKE_WIDTH, strokeDasharray: "5,5" })));
239
239
  }))))),
240
240
  React.createElement("div", { className: "footer" },
@@ -27,7 +27,7 @@ function TBody({ data, columns, refs, methods, states, config }) {
27
27
  }, ...(methods.rowBackgroundColor ? { style: { backgroundColor: methods.rowBackgroundColor(item) } } : {}), ...(methods.onDnD && data.length > 1 ? { className: "draggable", draggable: true } : {}) },
28
28
  methods.selections && (React.createElement("td", { ref: (element) => {
29
29
  _tHeadTH.current[index] = element;
30
- }, className: "flex justify-content-center sticky-left", style: { display: "flex", alignItems: "center", height: rowHeights[index] ?? 0 }, "data-sticky-position": "left" },
30
+ }, className: "flex justify-content-center sticky sticky-left", "data-sticky-position": "left" },
31
31
  React.createElement(Checkbox, { key: Date.now(), ref: (element) => {
32
32
  if (!element)
33
33
  return;
@@ -45,7 +45,7 @@ function TBody({ data, columns, refs, methods, states, config }) {
45
45
  methods.selections?.(refs._selectionItems.current);
46
46
  setTriggerForRender((prev) => !prev);
47
47
  } }))),
48
- isHasSubitems && _subrowButton ? (React.createElement("td", null, item[_subrowSelector] && (React.createElement("div", { className: "subitem-open-button-wrapper" },
48
+ isHasSubitems && _subrowButton ? (React.createElement("td", { className: "subrow-col sticky sticky-left", "data-sticky-position": "left" }, item[_subrowSelector] && (React.createElement("div", { className: "subitem-open-button-wrapper" },
49
49
  React.createElement("span", { className: `subitem-open-button ${(states.showSubitems.get[key] && "opened") ?? ""}`, onClick: () => {
50
50
  states.showSubitems.set((prev) => ({
51
51
  ...prev,
@@ -606,8 +606,7 @@ const Table = forwardRef(({ children, trackBy, title, description, data, columns
606
606
  React.createElement("table", { ref: _innerRef },
607
607
  React.createElement("thead", null,
608
608
  React.createElement("tr", { key: "selection" },
609
- data.some((item) => _subrowSelector in item) && _subrowButton && (React.createElement("td", { style: { width: 0, minWidth: 0 } })),
610
- selections && (React.createElement("th", { className: "selection-col sticky-left", "data-sticky-position": "left", style: { bottom: 0 } },
609
+ selections && (React.createElement("th", { className: "selection-col sticky sticky-left", "data-sticky-position": "left", style: { bottom: 0 } },
611
610
  React.createElement(Checkbox, { variant: "filled", color: "green", checked: selectAll, onChange: (event) => {
612
611
  if (_checkboxItems.current.length > 0) {
613
612
  setSelectAll(event.target.checked);
@@ -619,6 +618,7 @@ const Table = forwardRef(({ children, trackBy, title, description, data, columns
619
618
  });
620
619
  }
621
620
  } }))),
621
+ data.some((item) => _subrowSelector in item) && _subrowButton && (React.createElement("th", { className: "subrow-col sticky sticky-left", "data-sticky-position": "left", style: { bottom: 0 } })),
622
622
  React.createElement(THeadCell, { refs: {
623
623
  propertiesButton: _propertiesButton,
624
624
  }, states: {
@@ -629,6 +629,7 @@ const Table = forwardRef(({ children, trackBy, title, description, data, columns
629
629
  }, methods: { handleScroll }, columns: columns, config: config })),
630
630
  config?.isSearchable && (React.createElement("tr", { key: "isSearchable" },
631
631
  selections && (React.createElement("th", { key: `column-selections`, className: "selection-col sticky-left", "data-sticky-position": "left" })),
632
+ data.some((item) => _subrowSelector in item) && _subrowButton && (React.createElement("th", { key: `column-selections`, className: "subrow-col sticky sticky-left", "data-sticky-position": "left" })),
632
633
  columns.map((c, cIndex) => {
633
634
  let _className = [];
634
635
  const key = typeof c.key !== "object" ? String(c.key) : String(c.key.field);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ar-design",
3
- "version": "0.4.58",
3
+ "version": "0.4.60",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -42,11 +42,11 @@
42
42
  "react-dom": ">=18.0.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@types/node": "^25.5.2",
46
- "@types/react": "^19.2.14",
45
+ "@types/node": "^25.9.2",
46
+ "@types/react": "^19.2.17",
47
47
  "@types/react-dom": "^19.2.3",
48
48
  "ts-node": "^10.9.2",
49
49
  "tslib": "^2.8.1",
50
- "typescript": "^6.0.2"
50
+ "typescript": "^6.0.3"
51
51
  }
52
52
  }