@grandbazar/ui-baza 1.5.0 → 1.5.1

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.cjs CHANGED
@@ -3271,10 +3271,10 @@ function TableCaption({ className, children, ...props }) {
3271
3271
  return /* @__PURE__ */ jsxRuntime.jsx("caption", { className: classNames(styles$8.tableCaption, className), ...props, children });
3272
3272
  }
3273
3273
 
3274
- const tableCell = "_tableCell_fsw3w_2";
3275
- const left$1 = "_left_fsw3w_6";
3276
- const center$1 = "_center_fsw3w_10";
3277
- const right$1 = "_right_fsw3w_14";
3274
+ const tableCell = "_tableCell_1lfet_2";
3275
+ const left$1 = "_left_1lfet_7";
3276
+ const center$1 = "_center_1lfet_11";
3277
+ const right$1 = "_right_1lfet_15";
3278
3278
  const styles$7 = {
3279
3279
  tableCell: tableCell,
3280
3280
  left: left$1,
@@ -3290,10 +3290,10 @@ function TableHeader({ className, children, ...props }) {
3290
3290
  return /* @__PURE__ */ jsxRuntime.jsx("thead", { className, ...props, children });
3291
3291
  }
3292
3292
 
3293
- const tableHeaderCell = "_tableHeaderCell_1ubwo_2";
3294
- const left = "_left_1ubwo_10";
3295
- const center = "_center_1ubwo_14";
3296
- const right = "_right_1ubwo_18";
3293
+ const tableHeaderCell = "_tableHeaderCell_1r67q_2";
3294
+ const left = "_left_1r67q_11";
3295
+ const center = "_center_1r67q_15";
3296
+ const right = "_right_1r67q_19";
3297
3297
  const styles$6 = {
3298
3298
  tableHeaderCell: tableHeaderCell,
3299
3299
  left: left,
@@ -3311,15 +3311,18 @@ function TableHeaderCell({
3311
3311
  return /* @__PURE__ */ jsxRuntime.jsx("th", { scope, className: classNames(styles$6.tableHeaderCell, styles$6[align], className), ...props, children });
3312
3312
  }
3313
3313
 
3314
- const scrollContainer = "_scrollContainer_3qaei_2";
3315
- const table = "_table_3qaei_10";
3314
+ const scrollContainer = "_scrollContainer_hioz2_2";
3315
+ const bare = "_bare_hioz2_15";
3316
+ const table = "_table_hioz2_21";
3316
3317
  const styles$5 = {
3317
3318
  scrollContainer: scrollContainer,
3319
+ "default": "_default_hioz2_9",
3320
+ bare: bare,
3318
3321
  table: table
3319
3322
  };
3320
3323
 
3321
- function TableRoot({ className, children, ...props }) {
3322
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: styles$5.scrollContainer, children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: classNames(styles$5.table, className), ...props, children }) });
3324
+ function TableRoot({ className, children, mode = "default", ...props }) {
3325
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: classNames(styles$5.scrollContainer, styles$5[mode]), children: /* @__PURE__ */ jsxRuntime.jsx("table", { className: classNames(styles$5.table, className), ...props, children }) });
3323
3326
  }
3324
3327
 
3325
3328
  const tableRow = "_tableRow_1p3oc_2";
package/dist/index.d.ts CHANGED
@@ -617,6 +617,8 @@ export declare function Switch({ className, label, indeterminate, ...props }: TS
617
617
  * by the consumer — the component only reflects the state it is given.
618
618
  *
619
619
  * @param className - Additional CSS classes applied to the table element
620
+ * @param mode - Surface of the scroll container: `default` draws a self-contained card,
621
+ * `bare` draws nothing and expects the consumer's own surface around the table
620
622
  *
621
623
  * @example
622
624
  * <Table>
@@ -645,6 +647,8 @@ export declare namespace Table {
645
647
 
646
648
  declare const TABLE_CELL_ALIGNS: readonly ["left", "center", "right"];
647
649
 
650
+ declare const TABLE_MODES: readonly ["default", "bare"];
651
+
648
652
  declare const TABLE_ROW_MODES: readonly ["default", "group"];
649
653
 
650
654
  declare function TableBody({ className, children, ...props }: TTableBodyProps): JSX.Element;
@@ -657,7 +661,7 @@ declare function TableHeader({ className, children, ...props }: TTableHeaderProp
657
661
 
658
662
  declare function TableHeaderCell({ className, children, align, scope, ...props }: TTableHeaderCellProps): JSX.Element;
659
663
 
660
- declare function TableRoot({ className, children, ...props }: TTableRootProps): JSX.Element;
664
+ declare function TableRoot({ className, children, mode, ...props }: TTableRootProps): JSX.Element;
661
665
 
662
666
  declare function TableRow({ className, children, mode, isCurrent, ...props }: TTableRowProps): JSX.Element;
663
667
 
@@ -1040,9 +1044,13 @@ declare type TTableHeaderCellProps = Omit<React.ThHTMLAttributes<HTMLTableCellEl
1040
1044
 
1041
1045
  declare type TTableHeaderProps = React.HTMLAttributes<HTMLTableSectionElement>;
1042
1046
 
1047
+ declare type TTableMode = TArrayElement<typeof TABLE_MODES>;
1048
+
1043
1049
  declare type TTableProps = React.ComponentProps<typeof TableRoot>;
1044
1050
 
1045
- declare type TTableRootProps = React.TableHTMLAttributes<HTMLTableElement>;
1051
+ declare type TTableRootProps = React.TableHTMLAttributes<HTMLTableElement> & {
1052
+ mode?: TTableMode;
1053
+ };
1046
1054
 
1047
1055
  declare type TTableRowMode = TArrayElement<typeof TABLE_ROW_MODES>;
1048
1056
 
package/dist/index.js CHANGED
@@ -3267,10 +3267,10 @@ function TableCaption({ className, children, ...props }) {
3267
3267
  return /* @__PURE__ */ jsx("caption", { className: classNames(styles$8.tableCaption, className), ...props, children });
3268
3268
  }
3269
3269
 
3270
- const tableCell = "_tableCell_fsw3w_2";
3271
- const left$1 = "_left_fsw3w_6";
3272
- const center$1 = "_center_fsw3w_10";
3273
- const right$1 = "_right_fsw3w_14";
3270
+ const tableCell = "_tableCell_1lfet_2";
3271
+ const left$1 = "_left_1lfet_7";
3272
+ const center$1 = "_center_1lfet_11";
3273
+ const right$1 = "_right_1lfet_15";
3274
3274
  const styles$7 = {
3275
3275
  tableCell: tableCell,
3276
3276
  left: left$1,
@@ -3286,10 +3286,10 @@ function TableHeader({ className, children, ...props }) {
3286
3286
  return /* @__PURE__ */ jsx("thead", { className, ...props, children });
3287
3287
  }
3288
3288
 
3289
- const tableHeaderCell = "_tableHeaderCell_1ubwo_2";
3290
- const left = "_left_1ubwo_10";
3291
- const center = "_center_1ubwo_14";
3292
- const right = "_right_1ubwo_18";
3289
+ const tableHeaderCell = "_tableHeaderCell_1r67q_2";
3290
+ const left = "_left_1r67q_11";
3291
+ const center = "_center_1r67q_15";
3292
+ const right = "_right_1r67q_19";
3293
3293
  const styles$6 = {
3294
3294
  tableHeaderCell: tableHeaderCell,
3295
3295
  left: left,
@@ -3307,15 +3307,18 @@ function TableHeaderCell({
3307
3307
  return /* @__PURE__ */ jsx("th", { scope, className: classNames(styles$6.tableHeaderCell, styles$6[align], className), ...props, children });
3308
3308
  }
3309
3309
 
3310
- const scrollContainer = "_scrollContainer_3qaei_2";
3311
- const table = "_table_3qaei_10";
3310
+ const scrollContainer = "_scrollContainer_hioz2_2";
3311
+ const bare = "_bare_hioz2_15";
3312
+ const table = "_table_hioz2_21";
3312
3313
  const styles$5 = {
3313
3314
  scrollContainer: scrollContainer,
3315
+ "default": "_default_hioz2_9",
3316
+ bare: bare,
3314
3317
  table: table
3315
3318
  };
3316
3319
 
3317
- function TableRoot({ className, children, ...props }) {
3318
- return /* @__PURE__ */ jsx("div", { className: styles$5.scrollContainer, children: /* @__PURE__ */ jsx("table", { className: classNames(styles$5.table, className), ...props, children }) });
3320
+ function TableRoot({ className, children, mode = "default", ...props }) {
3321
+ return /* @__PURE__ */ jsx("div", { className: classNames(styles$5.scrollContainer, styles$5[mode]), children: /* @__PURE__ */ jsx("table", { className: classNames(styles$5.table, className), ...props, children }) });
3319
3322
  }
3320
3323
 
3321
3324
  const tableRow = "_tableRow_1p3oc_2";
package/dist/style.css CHANGED
@@ -2101,55 +2101,68 @@ textarea {
2101
2101
  }
2102
2102
  }
2103
2103
  @layer ui_baza_components {
2104
- ._tableCell_fsw3w_2 {
2104
+ ._tableCell_1lfet_2 {
2105
2105
  padding: var(--table-cell-padding-block) var(--table-cell-padding-inline);
2106
2106
  font-variant-numeric: tabular-nums;
2107
+ vertical-align: middle;
2107
2108
 
2108
- &._left_fsw3w_6 {
2109
+ &._left_1lfet_7 {
2109
2110
  text-align: left;
2110
2111
  }
2111
2112
 
2112
- &._center_fsw3w_10 {
2113
+ &._center_1lfet_11 {
2113
2114
  text-align: center;
2114
2115
  }
2115
2116
 
2116
- &._right_fsw3w_14 {
2117
+ &._right_1lfet_15 {
2117
2118
  text-align: right;
2118
2119
  }
2119
2120
  }
2120
2121
  }
2121
2122
  @layer ui_baza_components {
2122
- ._tableHeaderCell_1ubwo_2 {
2123
+ ._tableHeaderCell_1r67q_2 {
2123
2124
  padding: var(--table-cell-padding-block) var(--table-cell-padding-inline);
2124
2125
  color: var(--color-neutral-340);
2125
2126
  font-weight: var(--font-weight-regular);
2126
2127
  font-size: var(--size-sm);
2127
2128
  line-height: var(--line-height-sm);
2128
2129
  font-variant-numeric: tabular-nums;
2130
+ vertical-align: middle;
2129
2131
 
2130
- &._left_1ubwo_10 {
2132
+ &._left_1r67q_11 {
2131
2133
  text-align: left;
2132
2134
  }
2133
2135
 
2134
- &._center_1ubwo_14 {
2136
+ &._center_1r67q_15 {
2135
2137
  text-align: center;
2136
2138
  }
2137
2139
 
2138
- &._right_1ubwo_18 {
2140
+ &._right_1r67q_19 {
2139
2141
  text-align: right;
2140
2142
  }
2141
2143
  }
2142
2144
  }
2143
2145
  @layer ui_baza_components {
2144
- ._scrollContainer_3qaei_2 {
2146
+ ._scrollContainer_hioz2_2 {
2145
2147
  width: 100%;
2146
2148
  overflow-x: auto;
2149
+ }
2150
+
2151
+ /* The surface is the mode's business: `default` is a self-contained card, `bare` expects the
2152
+ consumer's own surface around it and would otherwise draw a second box inside it. */
2153
+ ._default_hioz2_9 {
2147
2154
  border: 1px solid var(--color-neutral-alpha-100);
2148
2155
  border-radius: var(--radius-content-md);
2149
2156
  background-color: var(--color-white);
2150
2157
  }
2151
2158
 
2152
- ._table_3qaei_10 {
2159
+ ._bare_hioz2_15 {
2160
+ border: none;
2161
+ border-radius: 0;
2162
+ background-color: var(--color-transparent);
2163
+ }
2164
+
2165
+ ._table_hioz2_21 {
2153
2166
  --table-cell-padding-block: var(--space-xl);
2154
2167
  --table-cell-padding-inline: var(--space-2xl);
2155
2168
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grandbazar/ui-baza",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "A lightweight and modular UI kit for building modern, accessible web interfaces. Designed for flexibility, scalability, and developer happiness.",
5
5
  "repository": {
6
6
  "type": "git",