@jobber/components 7.10.0 → 7.11.0
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/Autocomplete/index.cjs +1 -0
- package/dist/Autocomplete/index.mjs +1 -0
- package/dist/Card/index.cjs +3 -0
- package/dist/Card/index.mjs +3 -0
- package/dist/Chip/index.cjs +1 -0
- package/dist/Chip/index.mjs +1 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.cjs +1 -0
- package/dist/Chips/InternalChipDismissible/hooks/index.mjs +1 -0
- package/dist/Chips/InternalChipDismissible/index.cjs +1 -0
- package/dist/Chips/InternalChipDismissible/index.mjs +1 -0
- package/dist/Chips/index.cjs +1 -0
- package/dist/Chips/index.mjs +1 -0
- package/dist/Combobox/components/ComboboxActivator/index.cjs +1 -0
- package/dist/Combobox/components/ComboboxActivator/index.mjs +1 -0
- package/dist/Combobox/components/ComboboxContent/index.cjs +1 -0
- package/dist/Combobox/components/ComboboxContent/index.mjs +1 -0
- package/dist/Combobox/components/ComboboxTrigger/index.cjs +1 -0
- package/dist/Combobox/components/ComboboxTrigger/index.mjs +1 -0
- package/dist/Combobox/index.cjs +1 -0
- package/dist/Combobox/index.mjs +1 -0
- package/dist/ConfirmationModal/index.cjs +1 -0
- package/dist/ConfirmationModal/index.mjs +1 -0
- package/dist/DataDump/index.cjs +3 -0
- package/dist/DataDump/index.mjs +3 -0
- package/dist/DataList/components/DataListActions/index.cjs +1 -0
- package/dist/DataList/components/DataListActions/index.mjs +1 -0
- package/dist/DataList/components/DataListBulkActions/index.cjs +1 -0
- package/dist/DataList/components/DataListBulkActions/index.mjs +1 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.cjs +1 -0
- package/dist/DataList/components/DataListFilters/components/DataListSort/index.mjs +1 -0
- package/dist/DataList/components/DataListFilters/index.cjs +1 -0
- package/dist/DataList/components/DataListFilters/index.mjs +1 -0
- package/dist/DataList/components/DataListHeader/index.cjs +1 -0
- package/dist/DataList/components/DataListHeader/index.mjs +1 -0
- package/dist/DataList/components/DataListItem/index.cjs +1 -0
- package/dist/DataList/components/DataListItem/index.mjs +1 -0
- package/dist/DataList/components/DataListItemActions/index.cjs +1 -0
- package/dist/DataList/components/DataListItemActions/index.mjs +1 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.cjs +1 -0
- package/dist/DataList/components/DataListItemActionsOverflow/index.mjs +1 -0
- package/dist/DataList/components/DataListItems/index.cjs +1 -0
- package/dist/DataList/components/DataListItems/index.mjs +1 -0
- package/dist/DataList/components/DataListLayout/index.cjs +1 -0
- package/dist/DataList/components/DataListLayout/index.mjs +1 -0
- package/dist/DataList/components/DataListLayoutActions/index.cjs +1 -0
- package/dist/DataList/components/DataListLayoutActions/index.mjs +1 -0
- package/dist/DataList/index.cjs +1 -0
- package/dist/DataList/index.mjs +1 -0
- package/dist/DatePicker/index.cjs +1 -0
- package/dist/DatePicker/index.mjs +1 -0
- package/dist/DrawerRoot-cjs.js +181 -968
- package/dist/DrawerRoot-es.js +5 -734
- package/dist/FormatFile/index.cjs +1 -0
- package/dist/FormatFile/index.mjs +1 -0
- package/dist/Gallery/index.cjs +1 -0
- package/dist/Gallery/index.mjs +1 -0
- package/dist/InputDate/index.cjs +1 -0
- package/dist/InputDate/index.mjs +1 -0
- package/dist/InputNumberExperimental-cjs.js +783 -0
- package/dist/InputNumberExperimental-es.js +763 -0
- package/dist/LightBox/index.cjs +1 -0
- package/dist/LightBox/index.mjs +1 -0
- package/dist/Menu/index.cjs +3 -0
- package/dist/Menu/index.mjs +3 -0
- package/dist/MenuSubmenuTrigger-cjs.js +202 -447
- package/dist/MenuSubmenuTrigger-es.js +7 -249
- package/dist/Modal/index.cjs +1 -0
- package/dist/Modal/index.mjs +1 -0
- package/dist/NumberFieldInput-cjs.js +1828 -0
- package/dist/NumberFieldInput-es.js +1788 -0
- package/dist/Page/index.cjs +3 -0
- package/dist/Page/index.mjs +3 -0
- package/dist/Popover/index.cjs +1 -0
- package/dist/Popover/index.mjs +1 -0
- package/dist/Tooltip/index.cjs +1 -0
- package/dist/Tooltip/index.mjs +1 -0
- package/dist/docs/Menu/Menu.md +197 -37
- package/dist/floating-ui.react-cjs.js +35 -34
- package/dist/floating-ui.react-dom-cjs.js +65 -64
- package/dist/floating-ui.react-dom-es.js +2 -1
- package/dist/floating-ui.react-es.js +2 -1
- package/dist/floating-ui.utils.dom-cjs.js +185 -0
- package/dist/floating-ui.utils.dom-es.js +165 -0
- package/dist/index.cjs +3 -0
- package/dist/index.esm-cjs.js +0 -183
- package/dist/index.esm-es.js +1 -165
- package/dist/index.mjs +3 -0
- package/dist/primitives/BottomSheet/index.cjs +3 -1
- package/dist/primitives/BottomSheet/index.mjs +3 -1
- package/dist/primitives/InputNumberExperimental/InputNumberExperimental.d.ts +20 -0
- package/dist/primitives/InputNumberExperimental/index.cjs +22 -0
- package/dist/primitives/InputNumberExperimental/index.d.ts +2 -0
- package/dist/primitives/InputNumberExperimental/index.mjs +16 -0
- package/dist/primitives/InputNumberExperimental/types.d.ts +147 -0
- package/dist/primitives/index.cjs +9 -1
- package/dist/primitives/index.d.ts +2 -0
- package/dist/primitives/index.mjs +8 -1
- package/dist/styles.css +499 -0
- package/dist/unstyledPrimitives/index.cjs +264 -2039
- package/dist/unstyledPrimitives/index.mjs +72 -1847
- package/dist/useBaseUiId-cjs.js +275 -0
- package/dist/useBaseUiId-es.js +251 -0
- package/dist/useValueChanged-cjs.js +820 -0
- package/dist/useValueChanged-es.js +736 -0
- package/package.json +2 -2
- package/rollup.config.mjs +13 -2
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import type { FocusEvent, KeyboardEvent, ReactNode } from "react";
|
|
2
|
+
import type { IconNames } from "../../Icon";
|
|
3
|
+
/**
|
|
4
|
+
* Affix descriptor used by the `prefix` and `suffix` props on
|
|
5
|
+
* `<InputNumberExperimental>` for the default (drop-in) render.
|
|
6
|
+
*
|
|
7
|
+
* At least one of `label` or `icon` should be provided. Icons render outside
|
|
8
|
+
* the input area (in the field's outer padding zone), labels render inside the
|
|
9
|
+
* input wrapper directly adjacent to the typed value (matching V1).
|
|
10
|
+
*
|
|
11
|
+
* `onClick` and `ariaLabel` are not allowed in this shape; if you need a
|
|
12
|
+
* clickable action, use `InputNumberExperimentalSuffix` instead (only valid
|
|
13
|
+
* for `suffix`).
|
|
14
|
+
*/
|
|
15
|
+
export interface InputNumberExperimentalAffix {
|
|
16
|
+
readonly label?: string;
|
|
17
|
+
readonly icon?: IconNames;
|
|
18
|
+
readonly ariaLabel?: never;
|
|
19
|
+
readonly onClick?: never;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Suffix variant that turns the suffix icon into a clickable action button.
|
|
23
|
+
* Mirrors V1's `Suffix` type. The `?: never` fields make this a discriminated
|
|
24
|
+
* union with `InputNumberExperimentalAffix`.
|
|
25
|
+
*/
|
|
26
|
+
export interface InputNumberExperimentalSuffix {
|
|
27
|
+
readonly label?: string;
|
|
28
|
+
readonly icon: IconNames;
|
|
29
|
+
readonly ariaLabel: string;
|
|
30
|
+
onClick(): void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Tagged union for the `suffix` prop. Discriminated by whether `onClick` is set:
|
|
34
|
+
* - omit `onClick` → behaves like `InputNumberExperimentalAffix`
|
|
35
|
+
* - set `onClick` → requires `icon` and `ariaLabel` (clickable action button)
|
|
36
|
+
*/
|
|
37
|
+
export type InputNumberExperimentalSuffixProp = InputNumberExperimentalAffix | InputNumberExperimentalSuffix;
|
|
38
|
+
export type InputNumberExperimentalAutocomplete = boolean | "on" | "off" | "one-time-code" | "address-line1" | "address-line2";
|
|
39
|
+
export type InputNumberExperimentalSize = "small" | "default" | "large";
|
|
40
|
+
export interface InputNumberExperimentalProps {
|
|
41
|
+
readonly align?: "center" | "right";
|
|
42
|
+
readonly autocomplete?: InputNumberExperimentalAutocomplete;
|
|
43
|
+
/**
|
|
44
|
+
* Optional compound children. When children include any
|
|
45
|
+
* `<InputNumberExperimental.Input | .Affix | .Stepper>`, the component renders
|
|
46
|
+
* them inside `NumberField.Root`/`NumberField.Group` and ignores `prefix`/`suffix`
|
|
47
|
+
* props. Without compound children, the component renders the default
|
|
48
|
+
* composition (input + animated mini-label + optional prefix/suffix + stepper).
|
|
49
|
+
*/
|
|
50
|
+
readonly children?: ReactNode;
|
|
51
|
+
readonly description?: ReactNode;
|
|
52
|
+
readonly disabled?: boolean;
|
|
53
|
+
/** When set, renders a styled error message below the field. */
|
|
54
|
+
readonly error?: string;
|
|
55
|
+
readonly id?: string;
|
|
56
|
+
/** Shrink-wrap the field to its content (auto width). */
|
|
57
|
+
readonly inline?: boolean;
|
|
58
|
+
/** Style the error border without showing an error message. */
|
|
59
|
+
readonly invalid?: boolean;
|
|
60
|
+
readonly keyboard?: "numeric" | "decimal";
|
|
61
|
+
readonly max?: number;
|
|
62
|
+
readonly maxLength?: number;
|
|
63
|
+
readonly min?: number;
|
|
64
|
+
readonly name?: string;
|
|
65
|
+
readonly onBlur?: (event?: FocusEvent<HTMLInputElement>) => void;
|
|
66
|
+
/**
|
|
67
|
+
* Fires when the user **commits** a value — on blur, Enter, stepper press,
|
|
68
|
+
* or arrow-key step. Mirrors the V1 / V2 `InputNumber` `onChange` timing so
|
|
69
|
+
* consumers doing side effects (network requests, redraws) only fire on
|
|
70
|
+
* completed input rather than on every keystroke.
|
|
71
|
+
*
|
|
72
|
+
* - Emits `number` for parseable committed input.
|
|
73
|
+
* - Emits `undefined` when the field is committed empty.
|
|
74
|
+
*/
|
|
75
|
+
readonly onChange?: (newValue: number | undefined) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Derived from `onKeyDown` — fires when the user presses Enter without
|
|
78
|
+
* any modifier keys (Shift/Ctrl/Meta).
|
|
79
|
+
*/
|
|
80
|
+
readonly onEnter?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
81
|
+
readonly onFocus?: (event?: FocusEvent<HTMLInputElement>) => void;
|
|
82
|
+
readonly onKeyDown?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
83
|
+
readonly onKeyUp?: (event: KeyboardEvent<HTMLInputElement>) => void;
|
|
84
|
+
readonly placeholder?: string;
|
|
85
|
+
readonly prefix?: InputNumberExperimentalAffix;
|
|
86
|
+
readonly readonly?: boolean;
|
|
87
|
+
/** Default `true`. When `false`, the floating mini-label is hidden. */
|
|
88
|
+
readonly showMiniLabel?: boolean;
|
|
89
|
+
readonly size?: InputNumberExperimentalSize;
|
|
90
|
+
readonly suffix?: InputNumberExperimentalSuffixProp;
|
|
91
|
+
/**
|
|
92
|
+
* Value of the field. Controlled-only — pair with `onChange` and drive from
|
|
93
|
+
* outside state.
|
|
94
|
+
*
|
|
95
|
+
* - `number` — controlled with that value.
|
|
96
|
+
* - `null` (or `undefined`) — controlled with an empty value. Useful for
|
|
97
|
+
* controlled forms whose form-state default is empty/cleared.
|
|
98
|
+
*/
|
|
99
|
+
readonly value?: number | null;
|
|
100
|
+
}
|
|
101
|
+
export interface InputNumberExperimentalRef {
|
|
102
|
+
blur(): void;
|
|
103
|
+
focus(): void;
|
|
104
|
+
}
|
|
105
|
+
export interface InputNumberExperimentalInputProps {
|
|
106
|
+
/**
|
|
107
|
+
* Overrides the floating mini-label text. Falls back to the root component's
|
|
108
|
+
* `placeholder` prop when omitted.
|
|
109
|
+
*/
|
|
110
|
+
readonly placeholder?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface InputNumberExperimentalAffixCompound {
|
|
113
|
+
readonly variation: "prefix" | "suffix";
|
|
114
|
+
readonly label?: string;
|
|
115
|
+
readonly icon?: IconNames;
|
|
116
|
+
readonly ariaLabel?: never;
|
|
117
|
+
readonly onClick?: never;
|
|
118
|
+
}
|
|
119
|
+
export interface InputNumberExperimentalAffixCompoundClickable {
|
|
120
|
+
readonly variation: "prefix" | "suffix";
|
|
121
|
+
readonly label?: string;
|
|
122
|
+
readonly icon: IconNames;
|
|
123
|
+
readonly ariaLabel: string;
|
|
124
|
+
onClick(): void;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Compound `.Affix` props. Discriminated by whether `onClick` is set:
|
|
128
|
+
* - omit `onClick` -> behaves like `InputNumberExperimentalAffixCompound`
|
|
129
|
+
* - set `onClick` -> requires `icon` and `ariaLabel` (clickable icon-button)
|
|
130
|
+
*
|
|
131
|
+
* Unlike the default `prefix`/`suffix` API, the compound version does not
|
|
132
|
+
* structurally split label and icon; compose two `.Affix` elements or fall
|
|
133
|
+
* back to the default API when you need that.
|
|
134
|
+
*/
|
|
135
|
+
export type InputNumberExperimentalAffixCompoundProps = InputNumberExperimentalAffixCompound | InputNumberExperimentalAffixCompoundClickable;
|
|
136
|
+
export interface InputNumberExperimentalStepperCompoundProps {
|
|
137
|
+
/**
|
|
138
|
+
* Override the increment button's accessible label.
|
|
139
|
+
* Defaults to `Increase ${placeholder ?? "value"}`.
|
|
140
|
+
*/
|
|
141
|
+
readonly incrementLabel?: string;
|
|
142
|
+
/**
|
|
143
|
+
* Override the decrement button's accessible label.
|
|
144
|
+
* Defaults to `Decrease ${placeholder ?? "value"}`.
|
|
145
|
+
*/
|
|
146
|
+
readonly decrementLabel?: string;
|
|
147
|
+
}
|
|
@@ -3,22 +3,30 @@
|
|
|
3
3
|
var OverlaySeparator = require('../OverlaySeparator-cjs.js');
|
|
4
4
|
var BottomSheet = require('../BottomSheet-cjs.js');
|
|
5
5
|
var HelperText = require('../HelperText-cjs.js');
|
|
6
|
+
var InputNumberExperimental = require('../InputNumberExperimental-cjs.js');
|
|
6
7
|
require('../tslib.es6-cjs.js');
|
|
7
8
|
require('react');
|
|
8
9
|
require('classnames');
|
|
9
10
|
require('../Separator-cjs.js');
|
|
10
11
|
require('../useRenderElement-cjs.js');
|
|
11
12
|
require('../DrawerRoot-cjs.js');
|
|
13
|
+
require('../useValueChanged-cjs.js');
|
|
14
|
+
require('react-dom');
|
|
12
15
|
require('react/jsx-runtime');
|
|
13
16
|
require('../index.esm-cjs.js');
|
|
14
|
-
require('
|
|
17
|
+
require('../floating-ui.utils.dom-cjs.js');
|
|
15
18
|
require('../Text-cjs.js');
|
|
16
19
|
require('../Typography-cjs.js');
|
|
17
20
|
require('../Icon-cjs.js');
|
|
18
21
|
require('@jobber/design');
|
|
22
|
+
require('../Button-cjs.js');
|
|
23
|
+
require('react-router-dom');
|
|
24
|
+
require('../NumberFieldInput-cjs.js');
|
|
25
|
+
require('../useBaseUiId-cjs.js');
|
|
19
26
|
|
|
20
27
|
|
|
21
28
|
|
|
22
29
|
exports.OverlaySeparator = OverlaySeparator.OverlaySeparator;
|
|
23
30
|
exports.BottomSheet = BottomSheet.BottomSheet;
|
|
24
31
|
exports.HelperText = HelperText.HelperText;
|
|
32
|
+
exports.InputNumberExperimental = InputNumberExperimental.InputNumberExperimental;
|
|
@@ -8,3 +8,5 @@
|
|
|
8
8
|
export * from "./OverlaySeparator/index";
|
|
9
9
|
export * from "./BottomSheet/index";
|
|
10
10
|
export * from "./HelperText/index";
|
|
11
|
+
export { InputNumberExperimental } from "./InputNumberExperimental";
|
|
12
|
+
export type { InputNumberExperimentalAffix, InputNumberExperimentalProps, InputNumberExperimentalRef, } from "./InputNumberExperimental";
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
export { O as OverlaySeparator } from '../OverlaySeparator-es.js';
|
|
2
2
|
export { B as BottomSheet } from '../BottomSheet-es.js';
|
|
3
3
|
export { H as HelperText } from '../HelperText-es.js';
|
|
4
|
+
export { I as InputNumberExperimental } from '../InputNumberExperimental-es.js';
|
|
4
5
|
import '../tslib.es6-es.js';
|
|
5
6
|
import 'react';
|
|
6
7
|
import 'classnames';
|
|
7
8
|
import '../Separator-es.js';
|
|
8
9
|
import '../useRenderElement-es.js';
|
|
9
10
|
import '../DrawerRoot-es.js';
|
|
11
|
+
import '../useValueChanged-es.js';
|
|
12
|
+
import 'react-dom';
|
|
10
13
|
import 'react/jsx-runtime';
|
|
11
14
|
import '../index.esm-es.js';
|
|
12
|
-
import '
|
|
15
|
+
import '../floating-ui.utils.dom-es.js';
|
|
13
16
|
import '../Text-es.js';
|
|
14
17
|
import '../Typography-es.js';
|
|
15
18
|
import '../Icon-es.js';
|
|
16
19
|
import '@jobber/design';
|
|
20
|
+
import '../Button-es.js';
|
|
21
|
+
import 'react-router-dom';
|
|
22
|
+
import '../NumberFieldInput-es.js';
|
|
23
|
+
import '../useBaseUiId-es.js';
|