pne-ui 5.0.0-rc.49 → 5.0.0-rc.50

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/README.md CHANGED
@@ -321,7 +321,8 @@ import {ToggleButton, ToggleButtonGroup} from '@mui/material'
321
321
  - `size="medium"` (по умолчанию) — группа 40 px, встаёт в ряд с полями и кнопками форм; `size="small"` —
322
322
  32 px, как в полосах таблицы;
323
323
  - вид один: `color` группы ничего не меняет;
324
- - `fullWidth` делит ширину между пунктами поровну, `orientation="vertical"` ставит их столбцом;
324
+ - группа шириной по своим пунктам, даже в колонке формы, которая растягивает детей; `fullWidth` занимает весь
325
+ ряд и делит ширину между пунктами поровну, `orientation="vertical"` ставит их столбцом;
325
326
  - `ToggleButton` без группы — не вкладка, тема его не рисует.
326
327
 
327
328
  Выбор вида таблицы и переключатели окна Multiget — та же группа `size="small"` (32 px): в окне она стоит
package/cjs/toggleLook.js CHANGED
@@ -25,7 +25,13 @@ const pneToggleGroupLook = (theme, pne, size = 'medium', orientation = 'horizont
25
25
  exports.pneToggleGroupLook = pneToggleGroupLook;
26
26
  const createPneToggleGroupOverrides = (resolvePalette) => ({
27
27
  styleOverrides: {
28
- root: ({ ownerState, theme }) => (0, exports.pneToggleGroupLook)(theme, resolvePalette(theme), ownerState.size === 'small' ? 'small' : 'medium', ownerState.orientation === 'vertical' ? 'vertical' : 'horizontal'),
28
+ root: ({ ownerState, theme }) => ({
29
+ ...(0, exports.pneToggleGroupLook)(theme, resolvePalette(theme), ownerState.size === 'small' ? 'small' : 'medium', ownerState.orientation === 'vertical' ? 'vertical' : 'horizontal'),
30
+ // The shell is as wide as its buttons. A column of a form stretches its children, and the
31
+ // grey shell would run across the whole form with the buttons at its left; `fullWidth` is
32
+ // the way to ask for a group that fills its row.
33
+ ...(ownerState.fullWidth ? undefined : { width: 'fit-content' }),
34
+ }),
29
35
  },
30
36
  });
31
37
  exports.createPneToggleGroupOverrides = createPneToggleGroupOverrides;
@@ -9,7 +9,8 @@ import type { PneSemanticPalette } from './createTheme';
9
9
  *
10
10
  * `size='medium'` (MUI's default) is the 40px group that stands in a row with fields and buttons of
11
11
  * forms (32px buttons inside), `size='small'` the 32px group of the table bands (24px buttons).
12
- * The UI Kit draws one look, so `color` of the group changes nothing.
12
+ * The UI Kit draws one look, so `color` of the group changes nothing. The group is as wide as its
13
+ * buttons; `fullWidth` makes it fill the row and share it between the buttons.
13
14
  *
14
15
  * A `ToggleButton` outside a group is not a tab and keeps MUI's look.
15
16
  */
package/esm/toggleLook.js CHANGED
@@ -21,6 +21,12 @@ export const pneToggleGroupLook = (theme, pne, size = 'medium', orientation = 'h
21
21
  });
22
22
  export const createPneToggleGroupOverrides = (resolvePalette) => ({
23
23
  styleOverrides: {
24
- root: ({ ownerState, theme }) => pneToggleGroupLook(theme, resolvePalette(theme), ownerState.size === 'small' ? 'small' : 'medium', ownerState.orientation === 'vertical' ? 'vertical' : 'horizontal'),
24
+ root: ({ ownerState, theme }) => ({
25
+ ...pneToggleGroupLook(theme, resolvePalette(theme), ownerState.size === 'small' ? 'small' : 'medium', ownerState.orientation === 'vertical' ? 'vertical' : 'horizontal'),
26
+ // The shell is as wide as its buttons. A column of a form stretches its children, and the
27
+ // grey shell would run across the whole form with the buttons at its left; `fullWidth` is
28
+ // the way to ask for a group that fills its row.
29
+ ...(ownerState.fullWidth ? undefined : { width: 'fit-content' }),
30
+ }),
25
31
  },
26
32
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pne-ui",
3
- "version": "5.0.0-rc.49",
3
+ "version": "5.0.0-rc.50",
4
4
  "description": "React component kit on MUI for Payneteasy applications",
5
5
  "repository": {
6
6
  "type": "git",