@jobber/components 7.9.0 → 7.10.1-TAYLORmen-7785412.2
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/Card/index.cjs +4 -2
- package/dist/Card/index.mjs +4 -2
- package/dist/DataDump/index.cjs +4 -2
- package/dist/DataDump/index.mjs +4 -2
- package/dist/InputTime/InputTime.rebuilt.d.ts +1 -1
- package/dist/InputTime/InputTime.types.d.ts +8 -0
- package/dist/InputTime/index.cjs +14 -9
- package/dist/InputTime/index.mjs +14 -9
- package/dist/InputTime/utils/input-time-utils.d.ts +1 -1
- package/dist/Menu/index.cjs +4 -2
- package/dist/Menu/index.mjs +4 -2
- package/dist/Menu-cjs.js +24 -5
- package/dist/Menu-es.js +24 -5
- package/dist/Page/index.cjs +3 -2
- package/dist/Page/index.mjs +3 -2
- package/dist/docs/AnimatedSwitcher/AnimatedSwitcher.md +1 -1
- package/dist/docs/Banner/Banner.md +4 -4
- package/dist/docs/Box/Box.md +6 -6
- package/dist/docs/Button/Button.md +3 -3
- package/dist/docs/Card/Card.md +2 -2
- package/dist/docs/Checkbox/Checkbox.md +2 -2
- package/dist/docs/Chip/Chip.md +1 -1
- package/dist/docs/Chips/Chips.md +1 -1
- package/dist/docs/Cluster/Cluster.md +2 -2
- package/dist/docs/Combobox/Combobox.md +1 -1
- package/dist/docs/ConfirmationModal/ConfirmationModal.md +1 -1
- package/dist/docs/Content/Content.md +2 -2
- package/dist/docs/ContentBlock/ContentBlock.md +2 -2
- package/dist/docs/DataList/DataList.md +2 -2
- package/dist/docs/Divider/Divider.md +1 -1
- package/dist/docs/Emphasis/Emphasis.md +1 -1
- package/dist/docs/Flex/Flex.md +2 -2
- package/dist/docs/Form/Form.md +1 -1
- package/dist/docs/FormField/FormField.md +1 -1
- package/dist/docs/FormatFile/FormatFile.md +2 -2
- package/dist/docs/Gallery/Gallery.md +1 -1
- package/dist/docs/Glimmer/Glimmer.md +2 -2
- package/dist/docs/Grid/Grid.md +1 -1
- package/dist/docs/Heading/Heading.md +2 -2
- package/dist/docs/Icon/Icon.md +2 -2
- package/dist/docs/InlineLabel/InlineLabel.md +1 -1
- package/dist/docs/InputDate/InputDate.md +3 -3
- package/dist/docs/InputFile/InputFile.md +10 -10
- package/dist/docs/InputNumber/InputNumber.md +1 -1
- package/dist/docs/Menu/Menu.md +198 -38
- package/dist/docs/Modal/Modal.md +4 -4
- package/dist/docs/Popover/Popover.md +2 -2
- package/dist/docs/ProgressBar/ProgressBar.md +1 -1
- package/dist/docs/RadioGroup/RadioGroup.md +1 -1
- package/dist/docs/SegmentedControl/SegmentedControl.md +1 -1
- package/dist/docs/Select/Select.md +2 -2
- package/dist/docs/Stack/Stack.md +2 -2
- package/dist/docs/StatusLabel/StatusLabel.md +1 -1
- package/dist/docs/Text/Text.md +4 -4
- package/dist/docs/Tiles/Tiles.md +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +2 -2
package/dist/Card/index.cjs
CHANGED
|
@@ -21,10 +21,12 @@ require('../floating-ui.react-dom-cjs.js');
|
|
|
21
21
|
require('../useFormFieldFocus-cjs.js');
|
|
22
22
|
require('../maxHeight-cjs.js');
|
|
23
23
|
require('../useRenderElement-cjs.js');
|
|
24
|
-
require('../BottomSheet-cjs.js');
|
|
25
|
-
require('../DrawerRoot-cjs.js');
|
|
26
24
|
require('../OverlaySeparator-cjs.js');
|
|
27
25
|
require('../Separator-cjs.js');
|
|
26
|
+
require('../BottomSheet-cjs.js');
|
|
27
|
+
require('../DrawerRoot-cjs.js');
|
|
28
|
+
require('../HelperText-cjs.js');
|
|
29
|
+
require('../Text-cjs.js');
|
|
28
30
|
require('../MenuSubmenuTrigger-cjs.js');
|
|
29
31
|
|
|
30
32
|
|
package/dist/Card/index.mjs
CHANGED
|
@@ -19,8 +19,10 @@ import '../floating-ui.react-dom-es.js';
|
|
|
19
19
|
import '../useFormFieldFocus-es.js';
|
|
20
20
|
import '../maxHeight-es.js';
|
|
21
21
|
import '../useRenderElement-es.js';
|
|
22
|
-
import '../BottomSheet-es.js';
|
|
23
|
-
import '../DrawerRoot-es.js';
|
|
24
22
|
import '../OverlaySeparator-es.js';
|
|
25
23
|
import '../Separator-es.js';
|
|
24
|
+
import '../BottomSheet-es.js';
|
|
25
|
+
import '../DrawerRoot-es.js';
|
|
26
|
+
import '../HelperText-es.js';
|
|
27
|
+
import '../Text-es.js';
|
|
26
28
|
import '../MenuSubmenuTrigger-es.js';
|
package/dist/DataDump/index.cjs
CHANGED
|
@@ -22,10 +22,12 @@ require('../floating-ui.react-dom-cjs.js');
|
|
|
22
22
|
require('../useFormFieldFocus-cjs.js');
|
|
23
23
|
require('../maxHeight-cjs.js');
|
|
24
24
|
require('../useRenderElement-cjs.js');
|
|
25
|
-
require('../BottomSheet-cjs.js');
|
|
26
|
-
require('../DrawerRoot-cjs.js');
|
|
27
25
|
require('../OverlaySeparator-cjs.js');
|
|
28
26
|
require('../Separator-cjs.js');
|
|
27
|
+
require('../BottomSheet-cjs.js');
|
|
28
|
+
require('../DrawerRoot-cjs.js');
|
|
29
|
+
require('../HelperText-cjs.js');
|
|
30
|
+
require('../Text-cjs.js');
|
|
29
31
|
require('../MenuSubmenuTrigger-cjs.js');
|
|
30
32
|
require('../Content-cjs.js');
|
|
31
33
|
require('../Emphasis-cjs.js');
|
package/dist/DataDump/index.mjs
CHANGED
|
@@ -20,10 +20,12 @@ import '../floating-ui.react-dom-es.js';
|
|
|
20
20
|
import '../useFormFieldFocus-es.js';
|
|
21
21
|
import '../maxHeight-es.js';
|
|
22
22
|
import '../useRenderElement-es.js';
|
|
23
|
-
import '../BottomSheet-es.js';
|
|
24
|
-
import '../DrawerRoot-es.js';
|
|
25
23
|
import '../OverlaySeparator-es.js';
|
|
26
24
|
import '../Separator-es.js';
|
|
25
|
+
import '../BottomSheet-es.js';
|
|
26
|
+
import '../DrawerRoot-es.js';
|
|
27
|
+
import '../HelperText-es.js';
|
|
28
|
+
import '../Text-es.js';
|
|
27
29
|
import '../MenuSubmenuTrigger-es.js';
|
|
28
30
|
import '../Content-es.js';
|
|
29
31
|
import '../Emphasis-es.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { InputTimeRebuiltProps } from "./InputTime.types";
|
|
3
|
-
export declare function InputTimeRebuilt({ value, onChange, readOnly, autoComplete, inputRef, ...props }: InputTimeRebuiltProps): React.JSX.Element;
|
|
3
|
+
export declare function InputTimeRebuilt({ value, onChange, readOnly, autoComplete, inputRef, step, ...props }: InputTimeRebuiltProps): React.JSX.Element;
|
|
@@ -32,6 +32,14 @@ export interface InputTimeRebuiltProps extends Omit<HTMLInputBaseProps, "maxLeng
|
|
|
32
32
|
* Minimum numerical or date value.
|
|
33
33
|
*/
|
|
34
34
|
readonly min?: number;
|
|
35
|
+
/**
|
|
36
|
+
* Granularity of the time input, in seconds. Matches the native HTML `step`
|
|
37
|
+
* attribute. Defaults to `60` so the input displays only hours and minutes;
|
|
38
|
+
* set to a value less than `60` (e.g. `1`) to display seconds.
|
|
39
|
+
*
|
|
40
|
+
* @default 60
|
|
41
|
+
*/
|
|
42
|
+
readonly step?: number;
|
|
35
43
|
readonly inputRef?: Ref<HTMLInputElement>;
|
|
36
44
|
/**
|
|
37
45
|
* @deprecated Use `onKeyDown` or `onKeyUp` instead.
|
package/dist/InputTime/index.cjs
CHANGED
|
@@ -173,32 +173,37 @@ function formatHour(time) {
|
|
|
173
173
|
return `${time}:00`;
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
-
function dateToTimeString(date) {
|
|
176
|
+
function dateToTimeString(date, includeSeconds = false) {
|
|
177
177
|
if (!(date instanceof Date)) {
|
|
178
178
|
return "";
|
|
179
179
|
}
|
|
180
|
-
// Extract hours and minutes from the Date object
|
|
181
180
|
const hours = date.getHours().toString().padStart(2, "0");
|
|
182
181
|
const minutes = date.getMinutes().toString().padStart(2, "0");
|
|
183
|
-
|
|
182
|
+
if (includeSeconds) {
|
|
183
|
+
const seconds = date.getSeconds().toString().padStart(2, "0");
|
|
184
|
+
return `${hours}:${minutes}:${seconds}`;
|
|
185
|
+
}
|
|
184
186
|
return `${hours}:${minutes}`;
|
|
185
187
|
}
|
|
186
188
|
function timeStringToDate(timeString, baseDate) {
|
|
187
189
|
try {
|
|
188
|
-
const [hours, minutes] = timeString.split(":").map(Number);
|
|
190
|
+
const [hours, minutes, seconds = 0] = timeString.split(":").map(Number);
|
|
189
191
|
if (isNaN(hours) ||
|
|
190
192
|
isNaN(minutes) ||
|
|
193
|
+
isNaN(seconds) ||
|
|
191
194
|
hours < 0 ||
|
|
192
195
|
hours > 24 ||
|
|
193
196
|
minutes < 0 ||
|
|
194
|
-
minutes > 60
|
|
197
|
+
minutes > 60 ||
|
|
198
|
+
seconds < 0 ||
|
|
199
|
+
seconds > 60) {
|
|
195
200
|
return undefined;
|
|
196
201
|
}
|
|
197
202
|
// Try to preserve the Date part of the Date object as long as it is valid
|
|
198
203
|
const date = baseDate instanceof Date && !isNaN(baseDate.getTime())
|
|
199
204
|
? new Date(baseDate)
|
|
200
205
|
: new Date();
|
|
201
|
-
date.setHours(hours, minutes,
|
|
206
|
+
date.setHours(hours, minutes, seconds, 0);
|
|
202
207
|
return date;
|
|
203
208
|
}
|
|
204
209
|
catch (_a) {
|
|
@@ -268,7 +273,7 @@ function useInputTimeActions({ onChange, value, inputRef, onFocus, onBlur, onKey
|
|
|
268
273
|
|
|
269
274
|
function InputTimeRebuilt(_a) {
|
|
270
275
|
var _b;
|
|
271
|
-
var { value, onChange, readOnly, autoComplete, inputRef } = _a, props = tslib_es6.__rest(_a, ["value", "onChange", "readOnly", "autoComplete", "inputRef"]);
|
|
276
|
+
var { value, onChange, readOnly, autoComplete, inputRef, step = 60 } = _a, props = tslib_es6.__rest(_a, ["value", "onChange", "readOnly", "autoComplete", "inputRef", "step"]);
|
|
272
277
|
const { internalRef, mergedRef, wrapperRef } = useInputTimeRefs(inputRef);
|
|
273
278
|
const generatedId = React.useId();
|
|
274
279
|
const id = props.id || generatedId;
|
|
@@ -303,8 +308,8 @@ function InputTimeRebuilt(_a) {
|
|
|
303
308
|
const descriptionIdentifier = `descriptionUUID--${id}`;
|
|
304
309
|
const descriptionVisible = props.description && !props.inline;
|
|
305
310
|
const isInvalid = Boolean(props.error || props.invalid);
|
|
306
|
-
return (React.createElement(mergeRefs.FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, name: props.name, error: props.error || "", identifier: id, descriptionIdentifier: descriptionIdentifier, invalid: props.invalid, description: props.description, clearable: (_b = props.clearable) !== null && _b !== void 0 ? _b : "never", onClear: handleClear, type: "time", readonly: readOnly, placeholder: props.placeholder, value: dateToTimeString(value), wrapperRef: wrapperRef },
|
|
307
|
-
React.createElement("input", Object.assign({ ref: mergedRef, type: "time", name: props.name, className: mergeRefs.formFieldStyles.input, id: id, disabled: props.disabled, readOnly: readOnly, autoComplete: autoComplete, autoFocus: props.autoFocus, required: props.required, max: props.max, min: props.min, value: dateToTimeString(value), onChange: handleChangeEvent, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onClick: handleClick, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, "data-testid": "ATL-InputTime-input", "aria-label": props["aria-label"], "aria-describedby": descriptionVisible ? descriptionIdentifier : props["aria-describedby"], "aria-invalid": isInvalid ? true : undefined, "aria-required": props["aria-required"] }, dataAttrs))));
|
|
311
|
+
return (React.createElement(mergeRefs.FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, name: props.name, error: props.error || "", identifier: id, descriptionIdentifier: descriptionIdentifier, invalid: props.invalid, description: props.description, clearable: (_b = props.clearable) !== null && _b !== void 0 ? _b : "never", onClear: handleClear, type: "time", readonly: readOnly, placeholder: props.placeholder, value: dateToTimeString(value, step % 60 !== 0), wrapperRef: wrapperRef },
|
|
312
|
+
React.createElement("input", Object.assign({ ref: mergedRef, type: "time", name: props.name, className: mergeRefs.formFieldStyles.input, id: id, disabled: props.disabled, readOnly: readOnly, autoComplete: autoComplete, autoFocus: props.autoFocus, required: props.required, max: props.max, min: props.min, step: step, value: dateToTimeString(value, step % 60 !== 0), onChange: handleChangeEvent, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onClick: handleClick, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, "data-testid": "ATL-InputTime-input", "aria-label": props["aria-label"], "aria-describedby": descriptionVisible ? descriptionIdentifier : props["aria-describedby"], "aria-invalid": isInvalid ? true : undefined, "aria-required": props["aria-required"] }, dataAttrs))));
|
|
308
313
|
}
|
|
309
314
|
function useInputTimeRefs(inputRef) {
|
|
310
315
|
const internalRef = React.useRef(null);
|
package/dist/InputTime/index.mjs
CHANGED
|
@@ -171,32 +171,37 @@ function formatHour(time) {
|
|
|
171
171
|
return `${time}:00`;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
|
-
function dateToTimeString(date) {
|
|
174
|
+
function dateToTimeString(date, includeSeconds = false) {
|
|
175
175
|
if (!(date instanceof Date)) {
|
|
176
176
|
return "";
|
|
177
177
|
}
|
|
178
|
-
// Extract hours and minutes from the Date object
|
|
179
178
|
const hours = date.getHours().toString().padStart(2, "0");
|
|
180
179
|
const minutes = date.getMinutes().toString().padStart(2, "0");
|
|
181
|
-
|
|
180
|
+
if (includeSeconds) {
|
|
181
|
+
const seconds = date.getSeconds().toString().padStart(2, "0");
|
|
182
|
+
return `${hours}:${minutes}:${seconds}`;
|
|
183
|
+
}
|
|
182
184
|
return `${hours}:${minutes}`;
|
|
183
185
|
}
|
|
184
186
|
function timeStringToDate(timeString, baseDate) {
|
|
185
187
|
try {
|
|
186
|
-
const [hours, minutes] = timeString.split(":").map(Number);
|
|
188
|
+
const [hours, minutes, seconds = 0] = timeString.split(":").map(Number);
|
|
187
189
|
if (isNaN(hours) ||
|
|
188
190
|
isNaN(minutes) ||
|
|
191
|
+
isNaN(seconds) ||
|
|
189
192
|
hours < 0 ||
|
|
190
193
|
hours > 24 ||
|
|
191
194
|
minutes < 0 ||
|
|
192
|
-
minutes > 60
|
|
195
|
+
minutes > 60 ||
|
|
196
|
+
seconds < 0 ||
|
|
197
|
+
seconds > 60) {
|
|
193
198
|
return undefined;
|
|
194
199
|
}
|
|
195
200
|
// Try to preserve the Date part of the Date object as long as it is valid
|
|
196
201
|
const date = baseDate instanceof Date && !isNaN(baseDate.getTime())
|
|
197
202
|
? new Date(baseDate)
|
|
198
203
|
: new Date();
|
|
199
|
-
date.setHours(hours, minutes,
|
|
204
|
+
date.setHours(hours, minutes, seconds, 0);
|
|
200
205
|
return date;
|
|
201
206
|
}
|
|
202
207
|
catch (_a) {
|
|
@@ -266,7 +271,7 @@ function useInputTimeActions({ onChange, value, inputRef, onFocus, onBlur, onKey
|
|
|
266
271
|
|
|
267
272
|
function InputTimeRebuilt(_a) {
|
|
268
273
|
var _b;
|
|
269
|
-
var { value, onChange, readOnly, autoComplete, inputRef } = _a, props = __rest(_a, ["value", "onChange", "readOnly", "autoComplete", "inputRef"]);
|
|
274
|
+
var { value, onChange, readOnly, autoComplete, inputRef, step = 60 } = _a, props = __rest(_a, ["value", "onChange", "readOnly", "autoComplete", "inputRef", "step"]);
|
|
270
275
|
const { internalRef, mergedRef, wrapperRef } = useInputTimeRefs(inputRef);
|
|
271
276
|
const generatedId = useId();
|
|
272
277
|
const id = props.id || generatedId;
|
|
@@ -301,8 +306,8 @@ function InputTimeRebuilt(_a) {
|
|
|
301
306
|
const descriptionIdentifier = `descriptionUUID--${id}`;
|
|
302
307
|
const descriptionVisible = props.description && !props.inline;
|
|
303
308
|
const isInvalid = Boolean(props.error || props.invalid);
|
|
304
|
-
return (React__default.createElement(FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, name: props.name, error: props.error || "", identifier: id, descriptionIdentifier: descriptionIdentifier, invalid: props.invalid, description: props.description, clearable: (_b = props.clearable) !== null && _b !== void 0 ? _b : "never", onClear: handleClear, type: "time", readonly: readOnly, placeholder: props.placeholder, value: dateToTimeString(value), wrapperRef: wrapperRef },
|
|
305
|
-
React__default.createElement("input", Object.assign({ ref: mergedRef, type: "time", name: props.name, className: formFieldStyles.input, id: id, disabled: props.disabled, readOnly: readOnly, autoComplete: autoComplete, autoFocus: props.autoFocus, required: props.required, max: props.max, min: props.min, value: dateToTimeString(value), onChange: handleChangeEvent, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onClick: handleClick, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, "data-testid": "ATL-InputTime-input", "aria-label": props["aria-label"], "aria-describedby": descriptionVisible ? descriptionIdentifier : props["aria-describedby"], "aria-invalid": isInvalid ? true : undefined, "aria-required": props["aria-required"] }, dataAttrs))));
|
|
309
|
+
return (React__default.createElement(FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, name: props.name, error: props.error || "", identifier: id, descriptionIdentifier: descriptionIdentifier, invalid: props.invalid, description: props.description, clearable: (_b = props.clearable) !== null && _b !== void 0 ? _b : "never", onClear: handleClear, type: "time", readonly: readOnly, placeholder: props.placeholder, value: dateToTimeString(value, step % 60 !== 0), wrapperRef: wrapperRef },
|
|
310
|
+
React__default.createElement("input", Object.assign({ ref: mergedRef, type: "time", name: props.name, className: formFieldStyles.input, id: id, disabled: props.disabled, readOnly: readOnly, autoComplete: autoComplete, autoFocus: props.autoFocus, required: props.required, max: props.max, min: props.min, step: step, value: dateToTimeString(value, step % 60 !== 0), onChange: handleChangeEvent, onBlur: handleBlur, onFocus: handleFocus, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, onClick: handleClick, onMouseDown: handleMouseDown, onMouseUp: handleMouseUp, onPointerDown: handlePointerDown, onPointerUp: handlePointerUp, "data-testid": "ATL-InputTime-input", "aria-label": props["aria-label"], "aria-describedby": descriptionVisible ? descriptionIdentifier : props["aria-describedby"], "aria-invalid": isInvalid ? true : undefined, "aria-required": props["aria-required"] }, dataAttrs))));
|
|
306
311
|
}
|
|
307
312
|
function useInputTimeRefs(inputRef) {
|
|
308
313
|
const internalRef = useRef(null);
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function dateToTimeString(date?: Date): string;
|
|
1
|
+
export declare function dateToTimeString(date?: Date, includeSeconds?: boolean): string;
|
|
2
2
|
export declare function timeStringToDate(timeString: string, baseDate?: Date): Date | undefined;
|
package/dist/Menu/index.cjs
CHANGED
|
@@ -19,10 +19,12 @@ require('../Typography-cjs.js');
|
|
|
19
19
|
require('../useFormFieldFocus-cjs.js');
|
|
20
20
|
require('../maxHeight-cjs.js');
|
|
21
21
|
require('../useRenderElement-cjs.js');
|
|
22
|
-
require('../BottomSheet-cjs.js');
|
|
23
|
-
require('../DrawerRoot-cjs.js');
|
|
24
22
|
require('../OverlaySeparator-cjs.js');
|
|
25
23
|
require('../Separator-cjs.js');
|
|
24
|
+
require('../BottomSheet-cjs.js');
|
|
25
|
+
require('../DrawerRoot-cjs.js');
|
|
26
|
+
require('../HelperText-cjs.js');
|
|
27
|
+
require('../Text-cjs.js');
|
|
26
28
|
require('../MenuSubmenuTrigger-cjs.js');
|
|
27
29
|
|
|
28
30
|
|
package/dist/Menu/index.mjs
CHANGED
|
@@ -17,8 +17,10 @@ import '../Typography-es.js';
|
|
|
17
17
|
import '../useFormFieldFocus-es.js';
|
|
18
18
|
import '../maxHeight-es.js';
|
|
19
19
|
import '../useRenderElement-es.js';
|
|
20
|
-
import '../BottomSheet-es.js';
|
|
21
|
-
import '../DrawerRoot-es.js';
|
|
22
20
|
import '../OverlaySeparator-es.js';
|
|
23
21
|
import '../Separator-es.js';
|
|
22
|
+
import '../BottomSheet-es.js';
|
|
23
|
+
import '../DrawerRoot-es.js';
|
|
24
|
+
import '../HelperText-es.js';
|
|
25
|
+
import '../Text-es.js';
|
|
24
26
|
import '../MenuSubmenuTrigger-es.js';
|
package/dist/Menu-cjs.js
CHANGED
|
@@ -13,8 +13,9 @@ var maxHeight = require('./maxHeight-cjs.js');
|
|
|
13
13
|
var floatingUi_reactDom = require('./floating-ui.react-dom-cjs.js');
|
|
14
14
|
var tslib_es6 = require('./tslib.es6-cjs.js');
|
|
15
15
|
var useRenderElement = require('./useRenderElement-cjs.js');
|
|
16
|
-
var BottomSheet = require('./BottomSheet-cjs.js');
|
|
17
16
|
var OverlaySeparator = require('./OverlaySeparator-cjs.js');
|
|
17
|
+
var BottomSheet = require('./BottomSheet-cjs.js');
|
|
18
|
+
require('./HelperText-cjs.js');
|
|
18
19
|
var MenuSubmenuTrigger$1 = require('./MenuSubmenuTrigger-cjs.js');
|
|
19
20
|
|
|
20
21
|
var styles$2 = {"wrapper":"h-nk89U2n6Q-","floatingContainer":"krpkWzoaVcc-","menu":"_7sU7mp1w0jM-","legacySection":"_4x-vvEmn4gM-","separator":"i0QNcs4S-wk-","triggerWrapper":"_7CsejipGrzM-","ariaMenu":"bO7lGVQC42c-","ariaItem":"u6fDgbWmPck-","ariaSection":"-TSNrZBKZJI-","ariaSectionHeader":"zs7dS2pKjEw-","sectionHeader":"MZJgunQcmdQ-","legacyAction":"_-1GOlrzd098-","action":"NYXV5w4pd0c-","destructive":"baYK2zQ6-GA-","overlay":"A7T14ALVEKg-","fullWidth":"Lgbn9IRPI5Y-","screenReaderOnly":"o-ps580KdWI-","spinning":"f1oTdSTeUOM-"};
|
|
@@ -367,6 +368,17 @@ function getTextContent(node) {
|
|
|
367
368
|
}
|
|
368
369
|
return getTextContent(node.props.children);
|
|
369
370
|
}
|
|
371
|
+
function getBottomSheetContentStyle(style) {
|
|
372
|
+
if (!style) {
|
|
373
|
+
return undefined;
|
|
374
|
+
}
|
|
375
|
+
const safeStyle = Object.assign({}, style);
|
|
376
|
+
delete safeStyle.height;
|
|
377
|
+
delete safeStyle.maxHeight;
|
|
378
|
+
delete safeStyle.minHeight;
|
|
379
|
+
delete safeStyle.width;
|
|
380
|
+
return safeStyle;
|
|
381
|
+
}
|
|
370
382
|
// Bottom sheet menu interaction helpers. These adapt Drawer semantics into the
|
|
371
383
|
// menu-style keyboard and focus behavior we want for the mobile shell.
|
|
372
384
|
function getNavigableMenuItems(target) {
|
|
@@ -514,11 +526,12 @@ function BottomSheetContent({ children, style, className, UNSAFE_style, UNSAFE_c
|
|
|
514
526
|
UNSAFE_className,
|
|
515
527
|
UNSAFE_style,
|
|
516
528
|
});
|
|
529
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
517
530
|
return (React.createElement(BottomSheet.BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames({
|
|
518
531
|
[styles.menuHidden]: submenuOpen,
|
|
519
532
|
}) },
|
|
520
533
|
React.createElement(BottomSheet.BottomSheet.Content, null,
|
|
521
|
-
React.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style:
|
|
534
|
+
React.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style: bottomSheetStyle }, children))));
|
|
522
535
|
}
|
|
523
536
|
function BottomSheetSeparator({ style, className, UNSAFE_style, UNSAFE_className, }) {
|
|
524
537
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -666,8 +679,9 @@ function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, U
|
|
|
666
679
|
UNSAFE_className,
|
|
667
680
|
UNSAFE_style,
|
|
668
681
|
});
|
|
682
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
669
683
|
return (React.createElement(BottomSheet.BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames(styles.menu, styles.bottomSheetSubmenuPopup) },
|
|
670
|
-
React.createElement(BottomSheet.BottomSheet.Content, { style:
|
|
684
|
+
React.createElement(BottomSheet.BottomSheet.Content, { style: bottomSheetStyle },
|
|
671
685
|
title ? (React.createElement(MenuSubmenuTrigger$1.DrawerTitle, { className: styles.screenReaderOnly }, title)) : null,
|
|
672
686
|
React.createElement("div", { className: styles$1.submenuHeader },
|
|
673
687
|
React.createElement(MenuSubmenuTrigger$1.DrawerClose, { "aria-label": title ? `Back to ${title}` : "Back", render: React.createElement(Button.Button, { ariaLabel: title ? `Back to ${title}` : "Back", icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
|
|
@@ -721,6 +735,9 @@ function getFloatingLayerStyle(style) {
|
|
|
721
735
|
return undefined;
|
|
722
736
|
return { zIndex: style.zIndex };
|
|
723
737
|
}
|
|
738
|
+
function getMenuPopupStyle(style) {
|
|
739
|
+
return Object.assign({ maxHeight: `min(${MENU_MAX_HEIGHT_PERCENTAGE}vh, max(0px, calc(var(--available-height) - var(--space-base))))` }, style);
|
|
740
|
+
}
|
|
724
741
|
function MenuDropdownRoot({ children, onOpenChange, open, defaultOpen, }) {
|
|
725
742
|
const actionsRef = React.useRef(null);
|
|
726
743
|
return (React.createElement(MenuDropdownContext.Provider, { value: {
|
|
@@ -754,9 +771,10 @@ function MenuDropdownContent({ children, style, className, preferredPlacement, U
|
|
|
754
771
|
});
|
|
755
772
|
const [side = "bottom", align = "start"] = (_a = preferredPlacement === null || preferredPlacement === void 0 ? void 0 : preferredPlacement.split(" ")) !== null && _a !== void 0 ? _a : [];
|
|
756
773
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
774
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
757
775
|
return (React.createElement(MenuSubmenuTrigger$1.MenuPortal, null,
|
|
758
776
|
React.createElement(MenuSubmenuTrigger$1.MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: align, side: side, sideOffset: MENU_OFFSET },
|
|
759
|
-
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
777
|
+
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
760
778
|
}
|
|
761
779
|
function MenuDropdownRadioGroup({ children, value, defaultValue, onValueChange, className, style, UNSAFE_style, UNSAFE_className, }) {
|
|
762
780
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -847,9 +865,10 @@ function MenuDropdownSubmenuContent({ children, className, style, UNSAFE_style,
|
|
|
847
865
|
UNSAFE_style,
|
|
848
866
|
});
|
|
849
867
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
868
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
850
869
|
return (React.createElement(MenuSubmenuTrigger$1.MenuPortal, null,
|
|
851
870
|
React.createElement(MenuSubmenuTrigger$1.MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: "start", side: "right", sideOffset: MENU_OFFSET },
|
|
852
|
-
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
871
|
+
React.createElement(MenuSubmenuTrigger$1.MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
853
872
|
}
|
|
854
873
|
function MenuDropdownGroupLabel(props) {
|
|
855
874
|
const { className, style } = resolveComposableBaseProps(props);
|
package/dist/Menu-es.js
CHANGED
|
@@ -11,8 +11,9 @@ import { c as calculateMaxHeight } from './maxHeight-es.js';
|
|
|
11
11
|
import { o as offset, f as flip, d as size, b as autoUpdate } from './floating-ui.react-dom-es.js';
|
|
12
12
|
import { _ as __rest } from './tslib.es6-es.js';
|
|
13
13
|
import { m as mergeProps } from './useRenderElement-es.js';
|
|
14
|
-
import { B as BottomSheet } from './BottomSheet-es.js';
|
|
15
14
|
import { O as OverlaySeparator } from './OverlaySeparator-es.js';
|
|
15
|
+
import { B as BottomSheet } from './BottomSheet-es.js';
|
|
16
|
+
import './HelperText-es.js';
|
|
16
17
|
import { D as DrawerTrigger, a as DrawerTitle, b as DrawerClose, M as MenuTrigger$1, c as MenuLinkItem, d as MenuItem$1, e as MenuRadioItem$1, f as MenuRadioItemIndicator, g as MenuSubmenuTrigger$1, h as MenuRoot$1, i as MenuPortal$1, j as MenuPositioner, k as MenuPopup, l as MenuRadioGroup$1, m as MenuGroup$1, n as MenuSubmenuRoot, o as MenuGroupLabel$1 } from './MenuSubmenuTrigger-es.js';
|
|
17
18
|
|
|
18
19
|
var styles$2 = {"wrapper":"h-nk89U2n6Q-","floatingContainer":"krpkWzoaVcc-","menu":"_7sU7mp1w0jM-","legacySection":"_4x-vvEmn4gM-","separator":"i0QNcs4S-wk-","triggerWrapper":"_7CsejipGrzM-","ariaMenu":"bO7lGVQC42c-","ariaItem":"u6fDgbWmPck-","ariaSection":"-TSNrZBKZJI-","ariaSectionHeader":"zs7dS2pKjEw-","sectionHeader":"MZJgunQcmdQ-","legacyAction":"_-1GOlrzd098-","action":"NYXV5w4pd0c-","destructive":"baYK2zQ6-GA-","overlay":"A7T14ALVEKg-","fullWidth":"Lgbn9IRPI5Y-","screenReaderOnly":"o-ps580KdWI-","spinning":"f1oTdSTeUOM-"};
|
|
@@ -365,6 +366,17 @@ function getTextContent(node) {
|
|
|
365
366
|
}
|
|
366
367
|
return getTextContent(node.props.children);
|
|
367
368
|
}
|
|
369
|
+
function getBottomSheetContentStyle(style) {
|
|
370
|
+
if (!style) {
|
|
371
|
+
return undefined;
|
|
372
|
+
}
|
|
373
|
+
const safeStyle = Object.assign({}, style);
|
|
374
|
+
delete safeStyle.height;
|
|
375
|
+
delete safeStyle.maxHeight;
|
|
376
|
+
delete safeStyle.minHeight;
|
|
377
|
+
delete safeStyle.width;
|
|
378
|
+
return safeStyle;
|
|
379
|
+
}
|
|
368
380
|
// Bottom sheet menu interaction helpers. These adapt Drawer semantics into the
|
|
369
381
|
// menu-style keyboard and focus behavior we want for the mobile shell.
|
|
370
382
|
function getNavigableMenuItems(target) {
|
|
@@ -512,11 +524,12 @@ function BottomSheetContent({ children, style, className, UNSAFE_style, UNSAFE_c
|
|
|
512
524
|
UNSAFE_className,
|
|
513
525
|
UNSAFE_style,
|
|
514
526
|
});
|
|
527
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
515
528
|
return (React__default.createElement(BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames({
|
|
516
529
|
[styles.menuHidden]: submenuOpen,
|
|
517
530
|
}) },
|
|
518
531
|
React__default.createElement(BottomSheet.Content, null,
|
|
519
|
-
React__default.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style:
|
|
532
|
+
React__default.createElement(BottomSheetMenuSurface, { menuRef: menuRef, className: classnames(styles.bottomSheetMenuContent, resolvedBaseProps.className), style: bottomSheetStyle }, children))));
|
|
520
533
|
}
|
|
521
534
|
function BottomSheetSeparator({ style, className, UNSAFE_style, UNSAFE_className, }) {
|
|
522
535
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -664,8 +677,9 @@ function BottomSheetSubmenuContent({ children, className, style, UNSAFE_style, U
|
|
|
664
677
|
UNSAFE_className,
|
|
665
678
|
UNSAFE_style,
|
|
666
679
|
});
|
|
680
|
+
const bottomSheetStyle = getBottomSheetContentStyle(resolvedBaseProps.style);
|
|
667
681
|
return (React__default.createElement(BottomSheet.Popup, { initialFocus: getInitialBottomSheetFocus(menuRef, focusModalityRef), className: classnames(styles.menu, styles.bottomSheetSubmenuPopup) },
|
|
668
|
-
React__default.createElement(BottomSheet.Content, { style:
|
|
682
|
+
React__default.createElement(BottomSheet.Content, { style: bottomSheetStyle },
|
|
669
683
|
title ? (React__default.createElement(DrawerTitle, { className: styles.screenReaderOnly }, title)) : null,
|
|
670
684
|
React__default.createElement("div", { className: styles$1.submenuHeader },
|
|
671
685
|
React__default.createElement(DrawerClose, { "aria-label": title ? `Back to ${title}` : "Back", render: React__default.createElement(Button, { ariaLabel: title ? `Back to ${title}` : "Back", icon: "arrowLeft", type: "tertiary", variation: "subtle" }) }),
|
|
@@ -719,6 +733,9 @@ function getFloatingLayerStyle(style) {
|
|
|
719
733
|
return undefined;
|
|
720
734
|
return { zIndex: style.zIndex };
|
|
721
735
|
}
|
|
736
|
+
function getMenuPopupStyle(style) {
|
|
737
|
+
return Object.assign({ maxHeight: `min(${MENU_MAX_HEIGHT_PERCENTAGE}vh, max(0px, calc(var(--available-height) - var(--space-base))))` }, style);
|
|
738
|
+
}
|
|
722
739
|
function MenuDropdownRoot({ children, onOpenChange, open, defaultOpen, }) {
|
|
723
740
|
const actionsRef = React__default.useRef(null);
|
|
724
741
|
return (React__default.createElement(MenuDropdownContext.Provider, { value: {
|
|
@@ -752,9 +769,10 @@ function MenuDropdownContent({ children, style, className, preferredPlacement, U
|
|
|
752
769
|
});
|
|
753
770
|
const [side = "bottom", align = "start"] = (_a = preferredPlacement === null || preferredPlacement === void 0 ? void 0 : preferredPlacement.split(" ")) !== null && _a !== void 0 ? _a : [];
|
|
754
771
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
772
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
755
773
|
return (React__default.createElement(MenuPortal$1, null,
|
|
756
774
|
React__default.createElement(MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: align, side: side, sideOffset: MENU_OFFSET },
|
|
757
|
-
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
775
|
+
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
758
776
|
}
|
|
759
777
|
function MenuDropdownRadioGroup({ children, value, defaultValue, onValueChange, className, style, UNSAFE_style, UNSAFE_className, }) {
|
|
760
778
|
const resolvedBaseProps = resolveComposableBaseProps({
|
|
@@ -845,9 +863,10 @@ function MenuDropdownSubmenuContent({ children, className, style, UNSAFE_style,
|
|
|
845
863
|
UNSAFE_style,
|
|
846
864
|
});
|
|
847
865
|
const floatingLayerStyle = getFloatingLayerStyle(resolvedBaseProps.style);
|
|
866
|
+
const popupStyle = getMenuPopupStyle(resolvedBaseProps.style);
|
|
848
867
|
return (React__default.createElement(MenuPortal$1, null,
|
|
849
868
|
React__default.createElement(MenuPositioner, { className: styles.floatingContainer, style: floatingLayerStyle, align: "start", side: "right", sideOffset: MENU_OFFSET },
|
|
850
|
-
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style:
|
|
869
|
+
React__default.createElement(MenuPopup, { className: classnames(styles.menu, styles.ariaMenu, resolvedBaseProps.className), style: popupStyle }, children))));
|
|
851
870
|
}
|
|
852
871
|
function MenuDropdownGroupLabel(props) {
|
|
853
872
|
const { className, style } = resolveComposableBaseProps(props);
|
package/dist/Page/index.cjs
CHANGED
|
@@ -26,10 +26,11 @@ require('../floating-ui.react-dom-cjs.js');
|
|
|
26
26
|
require('../useFormFieldFocus-cjs.js');
|
|
27
27
|
require('../maxHeight-cjs.js');
|
|
28
28
|
require('../useRenderElement-cjs.js');
|
|
29
|
-
require('../BottomSheet-cjs.js');
|
|
30
|
-
require('../DrawerRoot-cjs.js');
|
|
31
29
|
require('../OverlaySeparator-cjs.js');
|
|
32
30
|
require('../Separator-cjs.js');
|
|
31
|
+
require('../BottomSheet-cjs.js');
|
|
32
|
+
require('../DrawerRoot-cjs.js');
|
|
33
|
+
require('../HelperText-cjs.js');
|
|
33
34
|
require('../MenuSubmenuTrigger-cjs.js');
|
|
34
35
|
require('../filterDataAttributes-cjs.js');
|
|
35
36
|
|
package/dist/Page/index.mjs
CHANGED
|
@@ -24,9 +24,10 @@ import '../floating-ui.react-dom-es.js';
|
|
|
24
24
|
import '../useFormFieldFocus-es.js';
|
|
25
25
|
import '../maxHeight-es.js';
|
|
26
26
|
import '../useRenderElement-es.js';
|
|
27
|
-
import '../BottomSheet-es.js';
|
|
28
|
-
import '../DrawerRoot-es.js';
|
|
29
27
|
import '../OverlaySeparator-es.js';
|
|
30
28
|
import '../Separator-es.js';
|
|
29
|
+
import '../BottomSheet-es.js';
|
|
30
|
+
import '../DrawerRoot-es.js';
|
|
31
|
+
import '../HelperText-es.js';
|
|
31
32
|
import '../MenuSubmenuTrigger-es.js';
|
|
32
33
|
import '../filterDataAttributes-es.js';
|
|
@@ -23,7 +23,7 @@ initial icon. See
|
|
|
23
23
|
| `initialChild` | `ReactElement<unknown, string | JSXElementConstructor<any>>` | Yes | — | The component that shows up when the `switched` prop is `false` |
|
|
24
24
|
| `switched` | `boolean` | Yes | `false` | Determines when to switch the component to the `switchTo` prop. |
|
|
25
25
|
| `switchTo` | `ReactElement<unknown, string | JSXElementConstructor<any>>` | Yes | — | The component that shows up when the `switched` prop is `true` |
|
|
26
|
-
| `type` | `"
|
|
26
|
+
| `type` | `"fade" | "slideFromBottom"` | No | `slideFromBottom` | Change the transition between 2 elements. |
|
|
27
27
|
|
|
28
28
|
#### AnimatedSwitcher.Icon
|
|
29
29
|
|
|
@@ -389,7 +389,7 @@ Use `UNSAFE_style` to apply inline custom styles to the Banner.
|
|
|
389
389
|
| `dismissible` | `boolean` | No | `true` | Set to false to hide the dismiss button |
|
|
390
390
|
| `icon` | `IconNames` | No | — | Use to override the default status Icon |
|
|
391
391
|
| `onDismiss` | `() => void` | No | — | Callback to be called when the Banner is dismissed. |
|
|
392
|
-
| `primaryAction` | `{
|
|
392
|
+
| `primaryAction` | `{ onClick?: never; external?: never; readonly name?: string; submit: never; readonly type?: ButtonType; readonly value?: string; readonly size?: ButtonSize; readonly ariaLabel?: string; ... 17 more ...; readonly children?: never; } | ... 34 more ... | { ...; }` | No | — | Accepts props for Button. Default action uses a 'subtle' Button |
|
|
393
393
|
|
|
394
394
|
#### Banner.Provider
|
|
395
395
|
|
|
@@ -407,11 +407,11 @@ Use `UNSAFE_style` to apply inline custom styles to the Banner.
|
|
|
407
407
|
|
|
408
408
|
| Prop | Type | Required | Default | Description |
|
|
409
409
|
|------|------|----------|---------|-------------|
|
|
410
|
-
| `backgroundColor` | `"
|
|
411
|
-
| `color` | `"
|
|
410
|
+
| `backgroundColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "disabled" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | Sets the background color of the icon. |
|
|
411
|
+
| `color` | `"task" | "text" | "warning" | "icon" | "disabled" | "success" | "blue" | "green" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "orange" | "navy" | "interactive" | ... 32 more ... | "brandHighlight"` | No | — | Determines the color of the icon. Some icons have a default system colour like quotes, jobs, and invoices. Others tha... |
|
|
412
412
|
| `customColor` | `string` | No | — | Sets a custom color for the icon. Can be a rgb() or hex value. |
|
|
413
413
|
| `name` | `IconNames` | No | — | The icon to show. |
|
|
414
|
-
| `size` | `"small" | "
|
|
414
|
+
| `size` | `"small" | "large" | "base"` | No | `base` | Changes the size to small or large. |
|
|
415
415
|
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
416
416
|
| `UNSAFE_className` | `{ readonly container?: string; readonly icon?: { svg?: string; path?: string; }; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
417
417
|
| `UNSAFE_style` | `{ readonly container?: CSSProperties; readonly icon?: { svg?: CSSProperties; path?: CSSProperties; }; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
package/dist/docs/Box/Box.md
CHANGED
|
@@ -206,18 +206,18 @@ defaults to respecting theme/modes.
|
|
|
206
206
|
| `alignItems` | `AlignItems` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
207
207
|
| `alignSelf` | `AlignSelf` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
208
208
|
| `as` | `"div" | "span" | "section" | "article" | "aside" | "main"` | No | `div` | |
|
|
209
|
-
| `background` | `"
|
|
209
|
+
| `background` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "disabled" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | |
|
|
210
210
|
| `border` | `"base" | "thick" | "thicker" | "thickest" | BoxBorderWidth` | No | — | |
|
|
211
|
-
| `borderColor` | `"
|
|
211
|
+
| `borderColor` | `"event" | "invoice" | "job" | "quote" | "request" | "task" | "text" | "visit" | "warning" | "icon" | "disabled" | "success" | "base-grey--100" | "base-grey--200" | "base-grey--300" | ... 269 more ... | "client--onSurface"` | No | — | |
|
|
212
212
|
| `direction` | `FlexDirection` | No | — | |
|
|
213
|
-
| `gap` | `"
|
|
213
|
+
| `gap` | `"small" | "large" | "base" | "minuscule" | "smallest" | "smaller" | "slim" | "larger" | "largest" | "extravagant"` | No | — | |
|
|
214
214
|
| `height` | `BoxDimension` | No | `auto` | |
|
|
215
215
|
| `justifyContent` | `JustifyContent` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
216
|
-
| `margin` | `"
|
|
216
|
+
| `margin` | `"small" | "large" | "base" | "minuscule" | "smallest" | "smaller" | "slim" | "larger" | "largest" | "extravagant" | BoxSpace` | No | — | |
|
|
217
217
|
| `overflow` | `Overflow` | No | — | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
218
|
-
| `padding` | `"
|
|
218
|
+
| `padding` | `"small" | "large" | "base" | "minuscule" | "smallest" | "smaller" | "slim" | "larger" | "largest" | "extravagant" | BoxSpace` | No | — | |
|
|
219
219
|
| `position` | `Position` | No | `relative` | This feature is well established and works across many devices and browser versions. It’s been available across brows... |
|
|
220
220
|
| `preserveWhiteSpace` | `boolean` | No | — | |
|
|
221
|
-
| `radius` | `"
|
|
221
|
+
| `radius` | `"circle" | "small" | "large" | "base" | "larger"` | No | — | |
|
|
222
222
|
| `tabIndex` | `number` | No | — | [MDN Reference](https://developer.mozilla.org/docs/Web/API/HTMLElement/tabIndex) |
|
|
223
223
|
| `width` | `BoxDimension` | No | `auto` | |
|
|
@@ -935,13 +935,13 @@ export const styles = StyleSheet.create({
|
|
|
935
935
|
| Prop | Type | Required | Default | Description |
|
|
936
936
|
|------|------|----------|---------|-------------|
|
|
937
937
|
| `align` | `"center" | "end" | "start"` | No | `"start"` | Sets the alignment to start, center, or end. In LTR scripts this equates to left, center, or right. |
|
|
938
|
-
| `element` | `"h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "b" | "em" | "dd" | "dt" | "strong"
|
|
938
|
+
| `element` | `"span" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "b" | "em" | "dd" | "dt" | "strong"` | No | `span` | |
|
|
939
939
|
| `emphasisType` | `"highlight" | "italic"` | No | — | |
|
|
940
940
|
| `fontFamily` | `"base" | "display"` | No | `base` | |
|
|
941
941
|
| `fontWeight` | `"black" | "bold" | "extraBold" | "medium" | "regular" | "semiBold"` | No | `semiBold` | Aside from changing the font weights, this also changes the font family. Source sans for `regular` and `bold`. Poppin... |
|
|
942
942
|
| `id` | `string` | No | — | |
|
|
943
943
|
| `numberOfLines` | `number` | No | — | |
|
|
944
|
-
| `size` | `"small" | "
|
|
944
|
+
| `size` | `"small" | "large" | "base" | "smaller" | "larger" | "largest" | "extravagant" | "jumbo"` | No | — | |
|
|
945
945
|
| `textCase` | `"none" | "capitalize" | "lowercase" | "uppercase"` | No | — | |
|
|
946
946
|
| `underline` | `UnderlineStyle | "solid color-indigo" | "solid color-indigo--light" | "solid color-indigo--lighter" | "solid color-indigo--lightest" | "solid color-indigo--dark" | ... 646 more ... | "dashed color-client--onSurface"` | No | — | The style (and optionally a color) of underline the text is decorated with. All semantic color tokens (other than the... |
|
|
947
947
|
| `UNSAFE_className` | `{ textStyle?: string; }` | No | — | **Use at your own risk:** Custom classNames for specific elements. This should only be used as a **last resort**. Usi... |
|
|
@@ -952,7 +952,7 @@ export const styles = StyleSheet.create({
|
|
|
952
952
|
| Prop | Type | Required | Default | Description |
|
|
953
953
|
|------|------|----------|---------|-------------|
|
|
954
954
|
| `name` | `IconNames` | Yes | — | The icon to show. |
|
|
955
|
-
| `size` | `"small" | "
|
|
955
|
+
| `size` | `"small" | "large" | "base"` | No | `base` | Changes the size to small or large. |
|
|
956
956
|
| `testID` | `string` | No | — | Used to locate this view in end-to-end tests |
|
|
957
957
|
| `UNSAFE_className` | `{ svg?: string; path?: string; }` | No | — | **Use at your own risk:** Custom classnames for specific elements. This should only be used as a **last resort**. Usi... |
|
|
958
958
|
| `UNSAFE_style` | `{ svg?: CSSProperties; path?: CSSProperties; }` | No | — | **Use at your own risk:** Custom style for specific elements. This should only be used as a **last resort**. Using th... |
|
package/dist/docs/Card/Card.md
CHANGED
|
@@ -262,10 +262,10 @@ desired markup and have no need for either UNSAFE.
|
|
|
262
262
|
|
|
263
263
|
| Prop | Type | Required | Default | Description |
|
|
264
264
|
|------|------|----------|---------|-------------|
|
|
265
|
-
| `accent` | `"blue" | "
|
|
265
|
+
| `accent` | `"indigo" | "teal" | "blue" | "green" | "lime" | "yellowGreen" | "yellow" | "red" | "grey" | "white" | "greyBlue" | "lightBlue" | "purple" | "pink" | "orange" | "brown" | "navy" | ... 68 more ... | "yellowLightest"` | No | — | The `accent`, if provided, will effect the color accent at the top of the card. |
|
|
266
266
|
| `elevation` | `elevationProp` | No | — | |
|
|
267
267
|
| `external` | `boolean` | No | — | Makes the URL open in new tab on click. |
|
|
268
|
-
| `header` | `string |
|
|
268
|
+
| `header` | `string | ReactElement<unknown, string | JSXElementConstructor<any>> | HeaderActionProps` | No | — | The header props of the card. |
|
|
269
269
|
| `onClick` | `(event: MouseEvent<HTMLAnchorElement | HTMLDivElement, MouseEvent>) => void` | No | — | Event handler that gets called when the card is clicked. |
|
|
270
270
|
| `title` | `string` | No | — | @deprecated Use header instead. |
|
|
271
271
|
| `UNSAFE_className` | `{ container?: string; header?: string; }` | No | — | **Use at your own risk:** Custom class names for specific elements. This should only be used as a **last resort**. Us... |
|
|
@@ -59,7 +59,7 @@ able to keep track the state of the child Checkboxes. See
|
|
|
59
59
|
| Prop | Type | Required | Default | Description |
|
|
60
60
|
|------|------|----------|---------|-------------|
|
|
61
61
|
| `aria-activedescendant` | `string` | No | — | ID of the currently active descendant element. Used for composite widgets like combobox or listbox. @see {@link https... |
|
|
62
|
-
| `aria-autocomplete` | `"
|
|
62
|
+
| `aria-autocomplete` | `"list" | "none" | "inline" | "both"` | No | — | Indicates the type of autocomplete interaction. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-autocomplete} |
|
|
63
63
|
| `aria-controls` | `string` | No | — | Indicates the element that controls the current element. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-controls} |
|
|
64
64
|
| `aria-describedby` | `string` | No | — | Identifies the element (or elements) that describes the object. @see {@link https://www.w3.org/TR/wai-aria-1.2/#aria-... |
|
|
65
65
|
| `aria-details` | `string` | No | — | Identifies the element (or elements) that provide a detailed, extended description. @see {@link https://www.w3.org/TR... |
|
|
@@ -84,5 +84,5 @@ able to keep track the state of the child Checkboxes. See
|
|
|
84
84
|
| `onMouseUp` | `(event: MouseEvent<HTMLInputElement, MouseEvent>) => void` | No | — | Mouse up event handler. |
|
|
85
85
|
| `onPointerDown` | `(event: PointerEvent<HTMLInputElement>) => void` | No | — | Pointer down event handler. |
|
|
86
86
|
| `onPointerUp` | `(event: PointerEvent<HTMLInputElement>) => void` | No | — | Pointer up event handler. |
|
|
87
|
-
| `ref` | `Ref<
|
|
87
|
+
| `ref` | `Ref<InputTextRef>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
|
|
88
88
|
| `value` | `string` | No | — | Value of the checkbox. |
|
package/dist/docs/Chip/Chip.md
CHANGED
|
@@ -369,7 +369,7 @@ those more complex selection flows.
|
|
|
369
369
|
| `onClick` | `((ev: MouseEvent<HTMLButtonElement | HTMLDivElement, MouseEvent>) => void) & MouseEventHandler<ChipElement>` | No | — | Chip click callback using a standard event-first signature. |
|
|
370
370
|
| `onClickValue` | `(value: string | number, ev: MouseEvent<HTMLButtonElement | HTMLDivElement, MouseEvent>) => void` | No | — | Value-first click callback retained as an upgrade path for existing consumers. @deprecated Prefer `onClick` with a cl... |
|
|
371
371
|
| `onKeyDown` | `((ev: KeyboardEvent<HTMLButtonElement | HTMLDivElement>) => void) & KeyboardEventHandler<ChipElement>` | No | — | Callback. Called when you keydown on Chip. Ships the event, so you can get the key pushed. |
|
|
372
|
-
| `ref` | `Ref<
|
|
372
|
+
| `ref` | `Ref<InputTextRef>` | No | — | Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (... |
|
|
373
373
|
| `role` | `string` | No | `button` | The accessible role the Chip is fulfilling. Defaults to 'button' |
|
|
374
374
|
| `tabIndex` | `number` | No | `0` | Used for accessibility purpopses, specifically using the tab key as navigation. |
|
|
375
375
|
| `testID` | `string` | No | — | The testing id for the chip if necessary. |
|