pixelize-design-library 2.4.2-beta.50 → 2.4.2-beta.52

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/CHANGELOG.md CHANGED
@@ -7,6 +7,10 @@ Versions follow semver. The `beta` dist-tag is released manually from the active
7
7
  `^2.4.2-beta.43`) — a caret range on a prerelease is satisfied by the next stable publish, which
8
8
  silently downgrades you.
9
9
 
10
+ Found a bug or a gap? Report it as a GitHub issue and track it to closure — see
11
+ [COMPONENT-GOTCHAS.md](COMPONENT-GOTCHAS.md#found-a-gap-or-a-bug-report-it-then-track-it). A fix's
12
+ line below names its issue number.
13
+
10
14
  ## [Unreleased] — 2.4.2-beta.x
11
15
 
12
16
  The theme-tokens/dark-mode line. Still in beta; the breaking items below land together in the
@@ -43,12 +47,18 @@ next major.
43
47
 
44
48
  ### Changed
45
49
 
46
- - **Control heights: `xs` 24px → 28px, `sm` 32px → 35px.** `md` (40px) and `lg` (48px) are
50
+ - **Control heights: `xs` 24px → 30px, `sm` 32px → 38px, `md` 40px → 42px.** `lg` (48px) is
47
51
  unchanged. `CONTROL_SIZES` is the one scale behind every field, select and button, so `Button`,
48
52
  `TextInput`, `InputTextArea`, `NumberInput`, `PinInput`, `Select`, `SelectV2`, `SearchSelect`,
49
- `SelectSearch`, `Search`, `Dropdown`, `SegmentedControl` and the `DatePicker` family all grow
50
- together and still line up side by side. `sm` is the default size, so most call sites gain 3px of
51
- height without passing anything.
53
+ `SelectSearch`, `Search`, `Dropdown`, `SegmentedControl`, `Tabs`, `TableToggle` and the
54
+ `DatePicker` family all grow together and still line up side by side. `sm` is the default size,
55
+ so most call sites gain 6px of height without passing anything.
56
+ - **Option rows follow the scale: 24/30/34/40px → 26/32/36/40px** in `Select`, `SelectV2`,
57
+ `SearchSelect`, `SelectSearch`, `Dropdown`, table filter selects and Chakra `MenuItem` — always
58
+ 6px inside the trigger that opens them (4px at `lg`).
59
+ - **`OrgSwitcher` and `AppSwitcher` sit on the control scale.** `OrgSwitcher` sm/md/lg were
60
+ 32/40/48px and are now 38/42/48px; the `AppSwitcher` trigger was 36px and is now 38px, so both
61
+ line up with an `sm` button beside them.
52
62
 
53
63
  - **`SideBar` sizing is one scale.** Rail, submenu, collapsed flyout and `SecondaryBar` rows now all
54
64
  read `SIDEBAR_ROW`, so every nav label is 13px at every level. Visible changes: submenu and flyout
@@ -11,6 +11,52 @@ so it's available without checking out the library's source repo. Its companion
11
11
 
12
12
  ---
13
13
 
14
+ ## Found a gap or a bug? Report it, then track it
15
+
16
+ The library exists so a UI change is made **once, here** — not patched per app. So when a component
17
+ is wrong, missing a prop, or can't express what a screen needs, **don't work around it in your app
18
+ and move on.** Report it upstream; a workaround nobody knows about is a bug that gets rediscovered
19
+ in every other app.
20
+
21
+ **What counts:** a component that renders wrong (misaligned, clipped, wrong size or colour, off the
22
+ control scale), a prop you need that doesn't exist, a silent-failure trap that isn't listed below, or
23
+ a doc that contradicts what you measured.
24
+
25
+ **How to report** — one GitHub issue on `pixelize-tech/Micro-Components`, with the label `bug` or
26
+ `enhancement`. From a terminal (AI agents included) this is one command:
27
+
28
+ ```bash
29
+ gh issue create --repo pixelize-tech/Micro-Components --label bug \
30
+ --title "[consumer] <Component>: <what is wrong>" \
31
+ --body "Version: <output of: npm ls pixelize-design-library>
32
+ App / screen: <where you saw it>
33
+ Expected: <what should happen>
34
+ Actual: <what happens, with measured numbers if it is visual>
35
+ Repro: <props / minimal snippet>
36
+ Workaround in the app: <none, or what you did and where, so it can be removed>"
37
+ ```
38
+
39
+ Measure, don't eyeball: for a visual bug give the rendered size and offset (`getBoundingClientRect`)
40
+ and the `size` prop — "icon 1.5px above centre at `sm`" gets fixed; "looks off" doesn't.
41
+
42
+ **How it is tracked** — the issue is the record; there is no second list.
43
+
44
+ | State | What it means | What you do |
45
+ | --- | --- | --- |
46
+ | Open | Reported, not yet fixed | Keep any workaround, and comment its file path on the issue |
47
+ | Closed with a version | Fixed in the named beta/release, and the fix is under `### Fixed` in [CHANGELOG.md](CHANGELOG.md) citing the issue | Bump the pin to that version (exact, never a caret on a prerelease), **delete the workaround**, close your own follow-up |
48
+ | Closed as `wontfix` / `invalid` / `duplicate` | Not changing, or already covered | Read the reason; the workaround stays, or use the issue it points to |
49
+
50
+ Before reporting, search first — `gh issue list --repo pixelize-tech/Micro-Components --search "<component>" --state all`
51
+ — and check the [CHANGELOG.md](CHANGELOG.md) shipped with your installed version; the gap may already
52
+ be fixed in a newer beta.
53
+
54
+ **Maintainers:** a fix closes its issue in the same change that lands it, and its CHANGELOG line
55
+ names the issue number and the version that ships it. A workaround someone left in an app is only
56
+ removable if the issue says which version fixes it, so never close without naming one.
57
+
58
+ ---
59
+
14
60
  ## A colour rung flips direction between light and dark
15
61
 
16
62
  `colors.primary[700]` is a deep purple in light mode and a **pale** lavender in dark. The scales are
@@ -266,7 +312,7 @@ not enough when the overlay sits inside a transition wrapper — the wrapper kee
266
312
 
267
313
  | Component | beta.43 → beta.44 | Restore the old look |
268
314
  | --- | --- | --- |
269
- | Fields, selects, buttons (`Button`, `TextInput`, `InputTextArea`, `NumberInput`, DatePicker family, `Select`, `SelectV2`, `SearchSelect`, `SelectSearch`, `Search`, `Dropdown`, `SegmentedControl`) | Default size `md` → `sm` (35px). One scale for all: xs 28 / sm 35 / md 40 / lg 48 — `md` is now 40px everywhere (`TextInput` was 44, selects 38, `SegmentedControl` ~36). `TimePicker` has no `size` (fixed `sm`); `SegmentedControl` has no `xs` | `size="md"` |
315
+ | Fields, selects, buttons (`Button`, `TextInput`, `InputTextArea`, `NumberInput`, DatePicker family, `Select`, `SelectV2`, `SearchSelect`, `SelectSearch`, `Search`, `Dropdown`, `SegmentedControl`) | Default size `md` → `sm` (38px). One scale for all: xs 30 / sm 38 / md 42 / lg 48 — the same height in every field, select and button. `TimePicker` has no `size` (fixed `sm`); `SegmentedControl` has no `xs` | `size="md"` |
270
316
  | `Button` | Text one step smaller (sm 14→13px, md 16→14, lg 18→16). Busy = spinner only, width kept (was "Loading" + spinner). Outline: 1px border, hover is a tint, not a fill | `loadingText="Loading"` |
271
317
  | `Tag` | `solid`/`md` → `subtle`/`sm`. Hover + pointer only with `onTagClick`; `maxW` truncates with the full text as a title. Exact heights 20/24/28/32, weight 500, 1px inset ring (never adds height); subtle is a light tint with ink ≥ 6.5:1 | `variant="solid" size="md"` |
272
318
  | `resolveSoftTone` | `bg`/`border` are now translucent (alpha hex) — composite onto the surface before `contrastRatio`; optional 3rd `surface` arg; adds `hoverBg`/`activeBg`. Badge/Alert/Toaster/EmptyState follow | — |
@@ -312,7 +358,7 @@ not enough when the overlay sits inside a transition wrapper — the wrapper kee
312
358
  | `Tag` | Label line-height 1.45 so descenders (`p`, `g`, `y`) are no longer clipped by the ellipsis overflow | — |
313
359
  | `Toaster` | `error` toasts announce assertively (`role="alert"`); status icons have a text equivalent | — |
314
360
  | `FeedbackForm` | Built on `TextInput`/`InputTextArea`/`RadioButtonGroup`; required fields show `*` in the label | — |
315
- | `PinInput` | `size` now works (square cells 28/35/40/48, default `sm`) — it was silently ignored | `size="md"` |
361
+ | `PinInput` | `size` now works (square cells 30 / 38 / 42 / 48, default `sm`) — it was silently ignored | `size="md"` |
316
362
  | `Tag` | New `leadingIcon` (decorative, before the label) and `isDisabled` (sets `aria-disabled` + native `disabled` on the clickable/remove buttons, so they leave the tab order — not just dimmed) | — |
317
363
  | `ToolTip` | Defaults a Popper `preventOverflow` padding of 8px, so a bubble near the right edge no longer overhangs by a subpixel and raises page scrollbars. A caller-supplied `preventOverflow` modifier still wins | pass your own `modifiers` |
318
364
  | `Table` / `KanbanBoard` | Column sort buttons and draggable cards now show the library focus ring on keyboard focus (was an opacity flicker / the browser default outline). Kanban card wrappers render as Chakra `Box`; keyboard drag (Space, arrows, Space) is unchanged | — |
package/DESIGN-GUIDE.md CHANGED
@@ -89,7 +89,7 @@ don't lean on that pair to distinguish two categories; reach for a utility schem
89
89
 
90
90
  ## 5. Controls — one scale, `sm` by default
91
91
 
92
- Every control shares one height scale — `xs` 28px · `sm` 35px · `md` 40px · `lg` 48px — and
92
+ Every control shares one height scale — `xs` 30px · `sm` 38px · `md` 42px · `lg` 48px — and
93
93
  **defaults to `sm`**: `Button`, `TextInput`, `InputTextArea`, `NumberInput`, `Select`, `Search`,
94
94
  `RangeSlider`, the `DatePicker` family and `SegmentedControl`. So on a desktop page **don't pass `size`**; controls
95
95
  side by side line up. Nothing in a toolbar or table row is taller than the fields beside it.
@@ -192,6 +192,10 @@ hides its primary; when only one section is empty on a populated page, that sect
192
192
  - Centered page titles, hero-sized headings, `size="lg"` buttons, or `size` props restating the default.
193
193
  - More than one solid button in a view; a destructive action without `AlertDialog`.
194
194
  - A page with only the data state.
195
+ - **Work around a library gap silently.** If a component is wrong or can't do what the screen
196
+ needs, report it (see "Found a gap or a bug?" in [COMPONENT-GOTCHAS.md](COMPONENT-GOTCHAS.md)) so
197
+ it is fixed once, here, and remove your workaround when the issue closes.
198
+
195
199
 
196
200
  ## 9. Reference pages
197
201
 
@@ -46,9 +46,10 @@ const useExclusiveOverlay_1 = require("../../Hooks/useExclusiveOverlay");
46
46
  const AppMark_1 = __importStar(require("./AppMark"));
47
47
  const AppSwitcherProps_1 = require("./AppSwitcherProps");
48
48
  const useAppSwitcherShortcut_1 = require("./useAppSwitcherShortcut");
49
+ const controlSizes_1 = require("../../Theme/tokens/primitives/controlSizes");
49
50
  const COLUMNS = 2;
50
51
  const HEADING = "Your apps";
51
- const s = { trigger: "36px", mark: "32px", icon: 17, name: "0.875rem", sub: "0.75rem", row: "52px" };
52
+ const s = { trigger: controlSizes_1.CONTROL_SIZES.sm.height, mark: "32px", icon: 17, name: "0.875rem", sub: "0.75rem", row: "52px" };
52
53
  const warned = new Set();
53
54
  const warnOnce = (key, message) => {
54
55
  if (process.env.NODE_ENV === "production" || warned.has(key))
@@ -11,7 +11,7 @@ export type ButtonProps = LayoutProps & DataAttributes & Pick<ChakraButtonProps,
11
11
  loadingText?: string;
12
12
  /** Defaults to "fit-content", not 100%; the w alias only applies when width is unset — width wins if both are passed. */
13
13
  width?: string | number;
14
- /** Control height xs 28 · sm 35 · md 40 · lg 48 (xl 56); defaults to "sm" via the theme, so a ButtonGroup size still applies. */
14
+ /** Control height xs 30 · sm 38 · md 42 · lg 48 (xl 56); defaults to "sm" via the theme, so a ButtonGroup size still applies. */
15
15
  size?: "lg" | "md" | "sm" | "xs" | "xl";
16
16
  /** Defaults to "solid"; "gradient" paints the theme's fixed brand gradient. */
17
17
  variant?: "solid" | "outline" | "ghost" | "link" | "unstyled" | "gradient";
@@ -44,7 +44,7 @@ export type BaseDatePickerProps = {
44
44
  width?: string | number;
45
45
  /** Blocks today in the calendar and in typed input; the single picker preselects tomorrow instead. */
46
46
  disableToday?: boolean;
47
- /** Control-scale height: xs 28 · sm 35 · md 40 · lg 48px (default `sm`, like TextInput); also scales the calendar/clock icon. */
47
+ /** Control-scale height: xs 30 · sm 38 · md 42 · lg 48px (default `sm`, like TextInput); also scales the calendar/clock icon. */
48
48
  size?: "xs" | "sm" | "md" | "lg";
49
49
  };
50
50
  /** Single-date variant, Date API (default) — `isRange` must be false or omitted; this is the discriminant the DatePickerProps union switches on. */
@@ -1,6 +1,6 @@
1
1
  import { InputProps, SystemProps } from "@chakra-ui/react";
2
2
  import type { CSSProperties, ReactNode } from "react";
3
- /** The library's primary single-line text field (default size `sm`, 35px; no default placeholder). `type="password"` auto-renders a show/hide toggle unless `inputRightIcon` is set or `isPasswordToggleDisabled` is true. Inside a consumer's own `FormControl`, it detects the ancestor and skips rendering its own, inheriting id/invalid/required/disabled from it. */
3
+ /** The library's primary single-line text field (default size `sm`, 38px; no default placeholder). `type="password"` auto-renders a show/hide toggle unless `inputRightIcon` is set or `isPasswordToggleDisabled` is true. Inside a consumer's own `FormControl`, it detects the ancestor and skips rendering its own, inheriting id/invalid/required/disabled from it. */
4
4
  export type TextInputProps = Omit<InputProps, "id" | "name" | "minW" | "maxW" | "autoComplete" | "ref" | "isInvalid"> & {
5
5
  label?: string;
6
6
  /** Optional — an id is generated when omitted, so the label is always bound. `isRequired` sets `aria-required`, not native `required`. */
@@ -18,7 +18,7 @@ export type MultiSelectProps = {
18
18
  addOnBlur?: boolean;
19
19
  /** Marks the field invalid (`aria-invalid` + error border) and swaps `helperText` for `errorMessage`; a rejected email sets this internally too. */
20
20
  error?: boolean;
21
- /** Height on the shared control scale (xs 28 · sm 35 · md 40 · lg 48px). Defaults to `sm`. */
21
+ /** Height on the shared control scale (xs 30 · sm 38 · md 42 · lg 48px). Defaults to `sm`. */
22
22
  size?: "xs" | "sm" | "md" | "lg";
23
23
  inputStyle?: object;
24
24
  /** Rendered only while `error` is true; a rejected email's internal "Invalid email address" text wins over this until the input changes. */
@@ -11,10 +11,11 @@ const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
11
11
  const rowStates_1 = require("../../Theme/tokens/builders/rowStates");
12
12
  const useExclusiveOverlay_1 = require("../../Hooks/useExclusiveOverlay");
13
13
  const OrgSwitcherProps_1 = require("./OrgSwitcherProps");
14
+ const controlSizes_1 = require("../../Theme/tokens/primitives/controlSizes");
14
15
  const sizeMap = {
15
- sm: { h: "32px", avatar: "22px", font: "0.8rem", sub: "0.65rem", px: 2 },
16
- md: { h: "40px", avatar: "28px", font: "0.9rem", sub: "0.7rem", px: 3 },
17
- lg: { h: "48px", avatar: "34px", font: "1rem", sub: "0.78rem", px: 4 },
16
+ sm: { h: controlSizes_1.CONTROL_SIZES.sm.height, avatar: "26px", font: "0.8rem", sub: "0.65rem", px: 2 },
17
+ md: { h: controlSizes_1.CONTROL_SIZES.md.height, avatar: "30px", font: "0.9rem", sub: "0.7rem", px: 3 },
18
+ lg: { h: controlSizes_1.CONTROL_SIZES.lg.height, avatar: "34px", font: "1rem", sub: "0.78rem", px: 4 },
18
19
  };
19
20
  const Avatar = ({ org, boxSize, fontSize, }) => {
20
21
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
@@ -2,7 +2,7 @@ import { PinInputProps } from "@chakra-ui/react";
2
2
  /** The only pin/OTP component exported from the package. */
3
3
  export type ChakraPinInputProps = Pick<PinInputProps, "otp" | "mask" | "defaultValue" | "placeholder" | "manageFocus" | "errorBorderColor" | "focusBorderColor" | "onChange" | "onComplete"> & {
4
4
  type?: "alphanumeric" | "number";
5
- /** Square cell size, aligned to CONTROL_SIZES heights (xs 28 · sm 35 · md 40 · lg 48). Defaults to "sm". */
5
+ /** Square cell size, aligned to CONTROL_SIZES heights (xs 30 · sm 38 · md 42 · lg 48). Defaults to "sm". */
6
6
  size?: "xs" | "sm" | "md" | "lg";
7
7
  variant?: "flushed" | "outline" | "filled" | "unstyled";
8
8
  color?: "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "whiteAlpha" | "blackAlpha" | "primary";
@@ -15,7 +15,7 @@ export type SearchProps = {
15
15
  onClear?: () => void;
16
16
  /** @deprecated Use `onClear` — same behaviour, consistent casing. */
17
17
  onclose?: () => void;
18
- /** Height on the shared control scale (xs 28 · sm 35 · md 40 · lg 48px). Defaults to `sm`. */
18
+ /** Height on the shared control scale (xs 30 · sm 38 · md 42 · lg 48px). Defaults to `sm`. */
19
19
  size?: ControlSize;
20
20
  name?: string;
21
21
  /** Disables the input and hides the clear button; the hotkey still focuses it. */
@@ -38,7 +38,7 @@ export type SearchSelectProps = {
38
38
  width?: string | number;
39
39
  /** Only sets the insideSelect segment's height, not the main field's — that's driven by `size`. */
40
40
  height?: string | number;
41
- /** Height on the shared control scale (xs 28 · sm 35 · md 40 · lg 48px). Defaults to `sm`. */
41
+ /** Height on the shared control scale (xs 30 · sm 38 · md 42 · lg 48px). Defaults to `sm`. */
42
42
  size?: "xs" | "sm" | "md" | "lg";
43
43
  /** Blocks opening, typing, chip removal and clearing; renders the shared disabled field look. */
44
44
  isDisabled?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ControlSize } from "../../Theme/tokens/primitives/controlSizes";
2
- /** Whole-track height on the shared control scale (sm 35 · md 40 · lg 48px); defaults to "sm". */
2
+ /** Whole-track height on the shared control scale (sm 38 · md 42 · lg 48px); defaults to "sm". */
3
3
  export type SegmentedControlSize = Exclude<ControlSize, "xs">;
4
4
  /** brandSlide = primary view switcher; underlineSlide = dense toolbar; default = plain buttons. */
5
5
  export type SegmentedControlVariant = "default" | "brandSlide" | "underlineSlide";
@@ -24,7 +24,7 @@ type SelectCommonProps = {
24
24
  label?: string;
25
25
  /** Native: the built-in placeholder `<option>`. Popup: trigger text when nothing is selected. Defaults to "Select Option". */
26
26
  placeholder?: string;
27
- /** Height on the shared control scale (xs 28 · sm 35 · md 40 · lg 48px). Defaults to `sm`. */
27
+ /** Height on the shared control scale (xs 30 · sm 38 · md 42 · lg 48px). Defaults to `sm`. */
28
28
  size?: ControlSize;
29
29
  /** Applied to the wrapping FormControl. */
30
30
  width?: string | number;
@@ -49,7 +49,7 @@ export type SelectSearchProps = {
49
49
  errorMessage?: string | undefined;
50
50
  /** Hint under the field; replaced by `errorMessage` while `error` is true. */
51
51
  helperText?: string;
52
- /** Height on the shared control scale (xs 28 · sm 35 · md 40 · lg 48px). Defaults to `sm`. */
52
+ /** Height on the shared control scale (xs 30 · sm 38 · md 42 · lg 48px). Defaults to `sm`. */
53
53
  size?: ControlSize;
54
54
  /** Shows a sticky "Add New"-style footer row in the popup; required for all Bottom* props. */
55
55
  isBottomIcon?: boolean | undefined;
@@ -33,7 +33,7 @@ type SelectV2CommonProps = {
33
33
  isReadOnly?: boolean;
34
34
  /** Label asterisk + `aria-required` only; never blocks an empty submit. */
35
35
  isRequired?: boolean;
36
- /** Shared control scale (xs 28 · sm 35 · md 40 · lg 48px). Defaults to `sm`. */
36
+ /** Shared control scale (xs 30 · sm 38 · md 42 · lg 48px). Defaults to `sm`. */
37
37
  size?: ControlSize;
38
38
  /** Shows a type-ahead filter input at the top of the popup. Defaults to true. */
39
39
  isSearchable?: boolean;
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isControlSize = exports.DEFAULT_CONTROL_SIZE = exports.CONTROL_SIZE_NAMES = exports.CONTROL_SIZES = void 0;
4
4
  /** One height scale for fields, selects and buttons, so controls side by side line up. */
5
5
  exports.CONTROL_SIZES = {
6
- xs: { height: "1.75rem", fontSize: "0.75rem", paddingX: "0.5rem", iconSize: 12 },
7
- sm: { height: "2.1875rem", fontSize: "0.8125rem", paddingX: "0.75rem", iconSize: 14 },
8
- md: { height: "2.5rem", fontSize: "0.875rem", paddingX: "1rem", iconSize: 16 },
6
+ xs: { height: "1.875rem", fontSize: "0.75rem", paddingX: "0.5rem", iconSize: 12 },
7
+ sm: { height: "2.375rem", fontSize: "0.8125rem", paddingX: "0.75rem", iconSize: 14 },
8
+ md: { height: "2.625rem", fontSize: "0.875rem", paddingX: "1rem", iconSize: 16 },
9
9
  lg: { height: "3rem", fontSize: "1rem", paddingX: "1.5rem", iconSize: 18 },
10
10
  };
11
11
  exports.CONTROL_SIZE_NAMES = ["xs", "sm", "md", "lg"];
@@ -4,19 +4,19 @@ exports.optionRowSpec = exports.OPTION_ROW_RADIUS = exports.OPTION_ROW_SIZES = v
4
4
  /** One density for every option row — Select, SearchSelect, SelectSearch, table filters and Chakra's MenuItem. */
5
5
  exports.OPTION_ROW_SIZES = {
6
6
  xs: {
7
- minH: "1.5rem", px: "0.5rem", py: "0.125rem", gap: "0.375rem", mx: "0.25rem",
7
+ minH: "1.625rem", px: "0.5rem", py: "0.125rem", gap: "0.375rem", mx: "0.25rem",
8
8
  fontSize: "0.75rem", descriptionFontSize: "0.6875rem", iconSize: 12,
9
- avatarSize: "2xs", virtualRowHeightPx: 24,
9
+ avatarSize: "2xs", virtualRowHeightPx: 26,
10
10
  },
11
11
  sm: {
12
- minH: "1.875rem", px: "0.625rem", py: "0.25rem", gap: "0.5rem", mx: "0.375rem",
12
+ minH: "2rem", px: "0.625rem", py: "0.25rem", gap: "0.5rem", mx: "0.375rem",
13
13
  fontSize: "0.8125rem", descriptionFontSize: "0.75rem", iconSize: 14,
14
- avatarSize: "xs", virtualRowHeightPx: 30,
14
+ avatarSize: "xs", virtualRowHeightPx: 32,
15
15
  },
16
16
  md: {
17
- minH: "2.125rem", px: "0.75rem", py: "0.3125rem", gap: "0.5rem", mx: "0.375rem",
17
+ minH: "2.25rem", px: "0.75rem", py: "0.3125rem", gap: "0.5rem", mx: "0.375rem",
18
18
  fontSize: "0.875rem", descriptionFontSize: "0.75rem", iconSize: 16,
19
- avatarSize: "xs", virtualRowHeightPx: 34,
19
+ avatarSize: "xs", virtualRowHeightPx: 36,
20
20
  },
21
21
  lg: {
22
22
  minH: "2.5rem", px: "0.875rem", py: "0.375rem", gap: "0.625rem", mx: "0.5rem",
@@ -11,9 +11,10 @@ import { useExclusiveOverlay } from "../../Hooks/useExclusiveOverlay.js";
11
11
  import AppMark, { assignAppHues } from "./AppMark.js";
12
12
  import { filterApps, formatShortcut, } from "./AppSwitcherProps.js";
13
13
  import { useAppSwitcherShortcut } from "./useAppSwitcherShortcut.js";
14
+ import { CONTROL_SIZES } from "../../Theme/tokens/primitives/controlSizes.js";
14
15
  const COLUMNS = 2;
15
16
  const HEADING = "Your apps";
16
- const s = { trigger: "36px", mark: "32px", icon: 17, name: "0.875rem", sub: "0.75rem", row: "52px" };
17
+ const s = { trigger: CONTROL_SIZES.sm.height, mark: "32px", icon: 17, name: "0.875rem", sub: "0.75rem", row: "52px" };
17
18
  const warned = new Set();
18
19
  const warnOnce = (key, message) => {
19
20
  if (process.env.NODE_ENV === "production" || warned.has(key))
@@ -9,10 +9,11 @@ import { resolveHoverTint } from "../../Theme/tokens/builders/outlineRung.js";
9
9
  import { listRowBackgrounds } from "../../Theme/tokens/builders/rowStates.js";
10
10
  import { useExclusiveOverlay } from "../../Hooks/useExclusiveOverlay.js";
11
11
  import { avatarColor, orgInitial, } from "./OrgSwitcherProps.js";
12
+ import { CONTROL_SIZES } from "../../Theme/tokens/primitives/controlSizes.js";
12
13
  const sizeMap = {
13
- sm: { h: "32px", avatar: "22px", font: "0.8rem", sub: "0.65rem", px: 2 },
14
- md: { h: "40px", avatar: "28px", font: "0.9rem", sub: "0.7rem", px: 3 },
15
- lg: { h: "48px", avatar: "34px", font: "1rem", sub: "0.78rem", px: 4 },
14
+ sm: { h: CONTROL_SIZES.sm.height, avatar: "26px", font: "0.8rem", sub: "0.65rem", px: 2 },
15
+ md: { h: CONTROL_SIZES.md.height, avatar: "30px", font: "0.9rem", sub: "0.7rem", px: 3 },
16
+ lg: { h: CONTROL_SIZES.lg.height, avatar: "34px", font: "1rem", sub: "0.78rem", px: 4 },
16
17
  };
17
18
  const Avatar = ({ org, boxSize, fontSize, }) => {
18
19
  const { colors } = useCustomTheme();
@@ -1,8 +1,8 @@
1
1
  /** One height scale for fields, selects and buttons, so controls side by side line up. */
2
2
  export const CONTROL_SIZES = {
3
- xs: { height: "1.75rem", fontSize: "0.75rem", paddingX: "0.5rem", iconSize: 12 },
4
- sm: { height: "2.1875rem", fontSize: "0.8125rem", paddingX: "0.75rem", iconSize: 14 },
5
- md: { height: "2.5rem", fontSize: "0.875rem", paddingX: "1rem", iconSize: 16 },
3
+ xs: { height: "1.875rem", fontSize: "0.75rem", paddingX: "0.5rem", iconSize: 12 },
4
+ sm: { height: "2.375rem", fontSize: "0.8125rem", paddingX: "0.75rem", iconSize: 14 },
5
+ md: { height: "2.625rem", fontSize: "0.875rem", paddingX: "1rem", iconSize: 16 },
6
6
  lg: { height: "3rem", fontSize: "1rem", paddingX: "1.5rem", iconSize: 18 },
7
7
  };
8
8
  export const CONTROL_SIZE_NAMES = ["xs", "sm", "md", "lg"];
@@ -1,19 +1,19 @@
1
1
  /** One density for every option row — Select, SearchSelect, SelectSearch, table filters and Chakra's MenuItem. */
2
2
  export const OPTION_ROW_SIZES = {
3
3
  xs: {
4
- minH: "1.5rem", px: "0.5rem", py: "0.125rem", gap: "0.375rem", mx: "0.25rem",
4
+ minH: "1.625rem", px: "0.5rem", py: "0.125rem", gap: "0.375rem", mx: "0.25rem",
5
5
  fontSize: "0.75rem", descriptionFontSize: "0.6875rem", iconSize: 12,
6
- avatarSize: "2xs", virtualRowHeightPx: 24,
6
+ avatarSize: "2xs", virtualRowHeightPx: 26,
7
7
  },
8
8
  sm: {
9
- minH: "1.875rem", px: "0.625rem", py: "0.25rem", gap: "0.5rem", mx: "0.375rem",
9
+ minH: "2rem", px: "0.625rem", py: "0.25rem", gap: "0.5rem", mx: "0.375rem",
10
10
  fontSize: "0.8125rem", descriptionFontSize: "0.75rem", iconSize: 14,
11
- avatarSize: "xs", virtualRowHeightPx: 30,
11
+ avatarSize: "xs", virtualRowHeightPx: 32,
12
12
  },
13
13
  md: {
14
- minH: "2.125rem", px: "0.75rem", py: "0.3125rem", gap: "0.5rem", mx: "0.375rem",
14
+ minH: "2.25rem", px: "0.75rem", py: "0.3125rem", gap: "0.5rem", mx: "0.375rem",
15
15
  fontSize: "0.875rem", descriptionFontSize: "0.75rem", iconSize: 16,
16
- avatarSize: "xs", virtualRowHeightPx: 34,
16
+ avatarSize: "xs", virtualRowHeightPx: 36,
17
17
  },
18
18
  lg: {
19
19
  minH: "2.5rem", px: "0.875rem", py: "0.375rem", gap: "0.625rem", mx: "0.5rem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixelize-design-library",
3
- "version": "2.4.2-beta.50",
3
+ "version": "2.4.2-beta.52",
4
4
  "description": "React component library for Pixelize apps: themeable Chakra-based components, design tokens and light/dark brand theming.",
5
5
  "keywords": [
6
6
  "react",