pixelize-design-library 2.4.2-beta.52 → 2.4.2-beta.53
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
|
@@ -53,6 +53,7 @@ next major.
|
|
|
53
53
|
`SelectSearch`, `Search`, `Dropdown`, `SegmentedControl`, `Tabs`, `TableToggle` and the
|
|
54
54
|
`DatePicker` family all grow together and still line up side by side. `sm` is the default size,
|
|
55
55
|
so most call sites gain 6px of height without passing anything.
|
|
56
|
+
- **`PhoneNumberInput` defaults to `size="sm"`, not `md`.** It was the one field still defaulting to `md`, so in a form it stood 4px taller than the `TextInput`s around it. Pass `size="md"` to keep the old height.
|
|
56
57
|
- **Option rows follow the scale: 24/30/34/40px → 26/32/36/40px** in `Select`, `SelectV2`,
|
|
57
58
|
`SearchSelect`, `SelectSearch`, `Dropdown`, table filter selects and Chakra `MenuItem` — always
|
|
58
59
|
6px inside the trigger that opens them (4px at `lg`).
|
package/COMPONENT-GOTCHAS.md
CHANGED
|
@@ -330,6 +330,7 @@ not enough when the overlay sits inside a transition wrapper — the wrapper kee
|
|
|
330
330
|
| `SettingsSection` | New optional `action` slot, right of the title/description on the header row — additive, nothing changes without it | — |
|
|
331
331
|
| `Button` / `Buttons` | Icon-only buttons are square. `Buttons` (plural) is themed instead of hardcoded purple | — |
|
|
332
332
|
| `ProgressBar` | Fill lifted to ≥ 3:1 on its track — green/orange/blue/cyan are visibly darker in light mode | — |
|
|
333
|
+
| `PhoneNumberInput` | Default `size` `md` → `sm`, so it matches the `TextInput`s beside it | `size="md"` |
|
|
333
334
|
| `PhoneNumberInput` / `PinInput` / `NoteTextArea` | `ref` now attaches; labels bound; PIN digits grouped and named | — |
|
|
334
335
|
| `RangeDatePicker` | Outside click keeps a fully picked range (was discarded) | — |
|
|
335
336
|
| `FilePreview` / `ContactForm` | Radius `2xl` → `xl` | — |
|
|
@@ -21,7 +21,7 @@ const getFlagEmoji = (countryCode) => {
|
|
|
21
21
|
const sizeToPt = { xs: 2, sm: -1, md: 2, lg: 4 };
|
|
22
22
|
const sizeToWidth = { xs: "3.5rem", sm: "3.8rem", md: "4rem", lg: "4rem" };
|
|
23
23
|
/** Country-code-aware phone field with a flag/dial-code prefix; `ref` forwards to the number `<input>`. */
|
|
24
|
-
const PhoneNumberInput = (0, react_1.forwardRef)(function PhoneNumberInput({ size = "
|
|
24
|
+
const PhoneNumberInput = (0, react_1.forwardRef)(function PhoneNumberInput({ size = "sm", value, codeValueReturn = true, country, countries, placeholder = "Enter phone number", onChange, inputId, selectId, error, errorMessage, helperText, label, id, width = "100%", isInformation, informationMessage, isRequired, onBlur, onFocus, isReadOnly, height, autoComplete, showCountrySelect = true, name, minW, maxW, countrySelectAriaLabel = "Country code", ...rest }, ref) {
|
|
25
25
|
const theme = (0, useCustomTheme_1.useCustomTheme)();
|
|
26
26
|
const ids = (0, useFieldIds_1.useFieldIds)(inputId !== null && inputId !== void 0 ? inputId : id, { error, errorMessage, helperText });
|
|
27
27
|
const getCountryTelCode = (0, react_1.useCallback)((countryCode) => {
|
|
@@ -10,6 +10,7 @@ export type PhoneNumberInputProps = {
|
|
|
10
10
|
label?: string;
|
|
11
11
|
/** Falls back to an auto-generated id (shared with `inputId` when that's omitted too), so the label is always bound. */
|
|
12
12
|
id?: string;
|
|
13
|
+
/** Control-scale height: "xs" | "sm" | "md" | "lg" (30 / 38 / 42 / 48px). Defaults to "sm", like TextInput, so it lines up in a form. */
|
|
13
14
|
size?: string;
|
|
14
15
|
value?: string;
|
|
15
16
|
codeValueReturn?: boolean;
|
|
@@ -16,7 +16,7 @@ const getFlagEmoji = (countryCode) => {
|
|
|
16
16
|
const sizeToPt = { xs: 2, sm: -1, md: 2, lg: 4 };
|
|
17
17
|
const sizeToWidth = { xs: "3.5rem", sm: "3.8rem", md: "4rem", lg: "4rem" };
|
|
18
18
|
/** Country-code-aware phone field with a flag/dial-code prefix; `ref` forwards to the number `<input>`. */
|
|
19
|
-
const PhoneNumberInput = forwardRef(function PhoneNumberInput({ size = "
|
|
19
|
+
const PhoneNumberInput = forwardRef(function PhoneNumberInput({ size = "sm", value, codeValueReturn = true, country, countries, placeholder = "Enter phone number", onChange, inputId, selectId, error, errorMessage, helperText, label, id, width = "100%", isInformation, informationMessage, isRequired, onBlur, onFocus, isReadOnly, height, autoComplete, showCountrySelect = true, name, minW, maxW, countrySelectAriaLabel = "Country code", ...rest }, ref) {
|
|
20
20
|
const theme = useCustomTheme();
|
|
21
21
|
const ids = useFieldIds(inputId !== null && inputId !== void 0 ? inputId : id, { error, errorMessage, helperText });
|
|
22
22
|
const getCountryTelCode = useCallback((countryCode) => {
|
package/package.json
CHANGED