@jobber/components 6.44.0 → 6.44.1-scottthi-50f9f2e.5
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/Hidden.d.ts +1 -0
- package/Hidden.js +17 -0
- package/HiddenVisually.d.ts +1 -0
- package/HiddenVisually.js +17 -0
- package/dist/Chip/Chip.d.ts +6 -5
- package/dist/Chip/index.cjs +1 -1
- package/dist/Chip-cjs.js +47 -23
- package/dist/Chip-es.js +48 -24
- package/dist/ChipDismissible-cjs.js +4 -4
- package/dist/ChipDismissible-es.js +5 -5
- package/dist/ComboboxActivator-cjs.js +1 -1
- package/dist/ComboboxActivator-es.js +2 -2
- package/dist/ComboboxTrigger-cjs.js +1 -1
- package/dist/ComboboxTrigger-es.js +2 -2
- package/dist/DataListSort-cjs.js +1 -1
- package/dist/DataListSort-es.js +2 -2
- package/dist/FormField/FormFieldWrapper.d.ts +1 -1
- package/dist/FormField/components/ClearAction.d.ts +1 -1
- package/dist/Hidden/Hidden.d.ts +2 -0
- package/dist/Hidden/index.cjs +9 -0
- package/dist/Hidden/index.d.ts +1 -0
- package/dist/Hidden/index.mjs +3 -0
- package/dist/Hidden/types.d.ts +22 -0
- package/dist/Hidden-cjs.js +12 -0
- package/dist/Hidden-es.js +10 -0
- package/dist/HiddenVisually/HiddenVisually.d.ts +2 -0
- package/dist/HiddenVisually/index.cjs +9 -0
- package/dist/HiddenVisually/index.d.ts +1 -0
- package/dist/HiddenVisually/index.mjs +3 -0
- package/dist/HiddenVisually/types.d.ts +18 -0
- package/dist/HiddenVisually-cjs.js +12 -0
- package/dist/HiddenVisually-es.js +10 -0
- package/dist/InternalChipDismissible-cjs.js +3 -3
- package/dist/InternalChipDismissible-es.js +4 -4
- package/dist/ResponsiveSwitcher/ResponsiveSwitcher.d.ts +1 -1
- package/dist/ResponsiveSwitcher/types.d.ts +8 -1
- package/dist/ResponsiveSwitcher-cjs.js +3 -3
- package/dist/ResponsiveSwitcher-es.js +3 -3
- package/dist/Select/hooks/useSelectActions.d.ts +0 -1
- package/dist/Select/index.cjs +2 -7
- package/dist/Select/index.mjs +2 -7
- package/dist/Stack/Stack.d.ts +1 -1
- package/dist/Stack/types.d.ts +2 -0
- package/dist/Stack-cjs.js +6 -2
- package/dist/Stack-es.js +6 -2
- package/dist/Text/Text.d.ts +5 -1
- package/dist/Text-cjs.js +2 -2
- package/dist/Text-es.js +2 -2
- package/dist/index.cjs +5 -1
- package/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.mjs +2 -0
- package/dist/styles.css +483 -0
- package/dist/utils/meta/meta.json +2 -0
- package/package.json +2 -2
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
import { AtlantisBreakpoints } from "../sharedHelpers/getMappedBreakpointWidth";
|
|
1
2
|
import { type CommonAllowedElements, type CommonAtlantisProps, type GapSpacing } from "../sharedHelpers/types";
|
|
2
3
|
export interface ResponsiveSwitcherProps extends CommonAtlantisProps {
|
|
3
4
|
readonly children: React.ReactNode;
|
|
4
5
|
/** The minimum width of the top-level children. If this can't be met, the children will break to row. */
|
|
5
|
-
readonly threshold
|
|
6
|
+
readonly threshold?: string;
|
|
6
7
|
/** The amount of space between the children. Semantic tokens are available. */
|
|
7
8
|
readonly gap?: GapSpacing;
|
|
9
|
+
/** The element to scale the children by. Defaults to `container`. */
|
|
10
|
+
scaleBy?: "container" | "screen";
|
|
11
|
+
/** The breakpoint to collapse the responsive switcher at. */
|
|
12
|
+
readonly collapseBelow?: keyof typeof AtlantisBreakpoints;
|
|
13
|
+
/** Force the responsive switcher to collapse. Use this when our breakpoints are not enough control. */
|
|
14
|
+
readonly collapsed?: boolean;
|
|
8
15
|
/** The HTML tag to render the container as. Defaults to `div`. */
|
|
9
16
|
as?: CommonAllowedElements;
|
|
10
17
|
/** Useful for dynamic content. If the number of children is greater than this, the children will break to row. */
|
|
@@ -4,10 +4,10 @@ var React = require('react');
|
|
|
4
4
|
var classnames = require('classnames');
|
|
5
5
|
var getMappedAtlantisSpaceToken = require('./getMappedAtlantisSpaceToken-cjs.js');
|
|
6
6
|
|
|
7
|
-
var styles = {"responsiveSwitcher":"BQqkfvwFjbQ-","limit-1":"zpPbVPrtiLc-","limit-2":"FC2KY5S6p6E-","limit-3":"XJQ0uo0TZ2w-","limit-4":"QmUWX7VCL0A-","limit-5":"_0gKXd8nPCKU-","limit-6":"DvGgLdlE8Ac-","limit-7":"_4PxEtfehh4s-","limit-8":"DZPW3Q-N5ik-","limit-9":"_2BL9H-tmzMk-","spinning":"_71sUKXu-3yM-"};
|
|
7
|
+
var styles = {"responsiveSwitcher":"BQqkfvwFjbQ-","sm":"-lmzVsvhDTc-","md":"_2-hgBFgHfQA-","lg":"qvgC1Lpk62Q-","xl":"QhS40t6RnPg-","scaleByScreen":"g9-3YxA1RxM-","collapsed":"hNRmsnqGQbc-","limit-1":"zpPbVPrtiLc-","limit-2":"FC2KY5S6p6E-","limit-3":"XJQ0uo0TZ2w-","limit-4":"QmUWX7VCL0A-","limit-5":"_0gKXd8nPCKU-","limit-6":"DvGgLdlE8Ac-","limit-7":"_4PxEtfehh4s-","limit-8":"DZPW3Q-N5ik-","limit-9":"_2BL9H-tmzMk-","spinning":"_71sUKXu-3yM-"};
|
|
8
8
|
|
|
9
|
-
function ResponsiveSwitcher({ children, threshold, gap = getMappedAtlantisSpaceToken.spaceTokens.base, limit = 2, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
10
|
-
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { className: classnames(styles.responsiveSwitcher, styles[`limit-${limit}`], UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container), style: Object.assign({ "--public-responsive-switcher-threshold": threshold, "--public-responsive-switcher-space": getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gap), "--public-responsive-switcher-limit": limit }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container) }), children));
|
|
9
|
+
function ResponsiveSwitcher({ children, threshold = "50%", gap = getMappedAtlantisSpaceToken.spaceTokens.base, limit = 2, scaleBy = "container", as: Tag = "div", dataAttributes, ariaAttributes, collapseBelow, collapsed, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
10
|
+
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { className: classnames(styles.responsiveSwitcher, scaleBy === "screen" && styles.scaleByScreen, styles[`limit-${limit}`], collapseBelow && styles[collapseBelow], collapsed ? styles.collapsed : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container), style: Object.assign({ "--public-responsive-switcher-threshold": threshold, "--public-responsive-switcher-space": getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gap), "--public-responsive-switcher-limit": limit }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container) }), children));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
exports.ResponsiveSwitcher = ResponsiveSwitcher;
|
|
@@ -2,10 +2,10 @@ import React__default from 'react';
|
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { g as getMappedAtlantisSpaceToken, s as spaceTokens } from './getMappedAtlantisSpaceToken-es.js';
|
|
4
4
|
|
|
5
|
-
var styles = {"responsiveSwitcher":"BQqkfvwFjbQ-","limit-1":"zpPbVPrtiLc-","limit-2":"FC2KY5S6p6E-","limit-3":"XJQ0uo0TZ2w-","limit-4":"QmUWX7VCL0A-","limit-5":"_0gKXd8nPCKU-","limit-6":"DvGgLdlE8Ac-","limit-7":"_4PxEtfehh4s-","limit-8":"DZPW3Q-N5ik-","limit-9":"_2BL9H-tmzMk-","spinning":"_71sUKXu-3yM-"};
|
|
5
|
+
var styles = {"responsiveSwitcher":"BQqkfvwFjbQ-","sm":"-lmzVsvhDTc-","md":"_2-hgBFgHfQA-","lg":"qvgC1Lpk62Q-","xl":"QhS40t6RnPg-","scaleByScreen":"g9-3YxA1RxM-","collapsed":"hNRmsnqGQbc-","limit-1":"zpPbVPrtiLc-","limit-2":"FC2KY5S6p6E-","limit-3":"XJQ0uo0TZ2w-","limit-4":"QmUWX7VCL0A-","limit-5":"_0gKXd8nPCKU-","limit-6":"DvGgLdlE8Ac-","limit-7":"_4PxEtfehh4s-","limit-8":"DZPW3Q-N5ik-","limit-9":"_2BL9H-tmzMk-","spinning":"_71sUKXu-3yM-"};
|
|
6
6
|
|
|
7
|
-
function ResponsiveSwitcher({ children, threshold, gap = spaceTokens.base, limit = 2, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
8
|
-
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { className: classnames(styles.responsiveSwitcher, styles[`limit-${limit}`], UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container), style: Object.assign({ "--public-responsive-switcher-threshold": threshold, "--public-responsive-switcher-space": getMappedAtlantisSpaceToken(gap), "--public-responsive-switcher-limit": limit }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container) }), children));
|
|
7
|
+
function ResponsiveSwitcher({ children, threshold = "50%", gap = spaceTokens.base, limit = 2, scaleBy = "container", as: Tag = "div", dataAttributes, ariaAttributes, collapseBelow, collapsed, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
8
|
+
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { className: classnames(styles.responsiveSwitcher, scaleBy === "screen" && styles.scaleByScreen, styles[`limit-${limit}`], collapseBelow && styles[collapseBelow], collapsed ? styles.collapsed : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container), style: Object.assign({ "--public-responsive-switcher-threshold": threshold, "--public-responsive-switcher-space": getMappedAtlantisSpaceToken(gap), "--public-responsive-switcher-limit": limit }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container) }), children));
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export { ResponsiveSwitcher as R };
|
package/dist/Select/index.cjs
CHANGED
|
@@ -47,15 +47,10 @@ function useSelectActions({ onChange, onBlur, onFocus, }) {
|
|
|
47
47
|
function handleFocus() {
|
|
48
48
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
|
|
49
49
|
}
|
|
50
|
-
// Noop for SelectRebuilt since onClear is a required prop for FormFieldWrapper
|
|
51
|
-
// but Select is not clearable.
|
|
52
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
53
|
-
function handleClear() { }
|
|
54
50
|
return {
|
|
55
51
|
handleChange,
|
|
56
52
|
handleBlur,
|
|
57
53
|
handleFocus,
|
|
58
|
-
handleClear,
|
|
59
54
|
};
|
|
60
55
|
}
|
|
61
56
|
|
|
@@ -82,7 +77,7 @@ function SelectRebuilt(props) {
|
|
|
82
77
|
nameProp: props.name,
|
|
83
78
|
id: id,
|
|
84
79
|
});
|
|
85
|
-
const { handleChange, handleBlur, handleFocus
|
|
80
|
+
const { handleChange, handleBlur, handleFocus } = useSelectActions({
|
|
86
81
|
onChange: props.onChange,
|
|
87
82
|
onBlur: props.onBlur,
|
|
88
83
|
onFocus: props.onFocus,
|
|
@@ -100,7 +95,7 @@ function SelectRebuilt(props) {
|
|
|
100
95
|
handleChange,
|
|
101
96
|
handleBlur,
|
|
102
97
|
handleFocus }));
|
|
103
|
-
return (React.createElement(FormField.FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, autofocus: props.autofocus, name: name, wrapperRef: wrapperRef, error: "", invalid: props.invalid, identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, type: "select", placeholder: props.placeholder, value: props.value, prefix: props.prefix, suffix: props.suffix,
|
|
98
|
+
return (React.createElement(FormField.FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, autofocus: props.autofocus, name: name, wrapperRef: wrapperRef, error: "", invalid: props.invalid, identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, type: "select", placeholder: props.placeholder, value: props.value, prefix: props.prefix, suffix: props.suffix, clearable: "never", maxLength: props.maxLength },
|
|
104
99
|
React.createElement(React.Fragment, null,
|
|
105
100
|
React.createElement("select", Object.assign({}, fieldProps, { ref: selectRef, className: inputStyle }), props.children),
|
|
106
101
|
React.createElement(FormField.FormFieldPostFix, { variation: "select" }))));
|
package/dist/Select/index.mjs
CHANGED
|
@@ -45,15 +45,10 @@ function useSelectActions({ onChange, onBlur, onFocus, }) {
|
|
|
45
45
|
function handleFocus() {
|
|
46
46
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus();
|
|
47
47
|
}
|
|
48
|
-
// Noop for SelectRebuilt since onClear is a required prop for FormFieldWrapper
|
|
49
|
-
// but Select is not clearable.
|
|
50
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
51
|
-
function handleClear() { }
|
|
52
48
|
return {
|
|
53
49
|
handleChange,
|
|
54
50
|
handleBlur,
|
|
55
51
|
handleFocus,
|
|
56
|
-
handleClear,
|
|
57
52
|
};
|
|
58
53
|
}
|
|
59
54
|
|
|
@@ -80,7 +75,7 @@ function SelectRebuilt(props) {
|
|
|
80
75
|
nameProp: props.name,
|
|
81
76
|
id: id,
|
|
82
77
|
});
|
|
83
|
-
const { handleChange, handleBlur, handleFocus
|
|
78
|
+
const { handleChange, handleBlur, handleFocus } = useSelectActions({
|
|
84
79
|
onChange: props.onChange,
|
|
85
80
|
onBlur: props.onBlur,
|
|
86
81
|
onFocus: props.onFocus,
|
|
@@ -98,7 +93,7 @@ function SelectRebuilt(props) {
|
|
|
98
93
|
handleChange,
|
|
99
94
|
handleBlur,
|
|
100
95
|
handleFocus }));
|
|
101
|
-
return (React__default.createElement(FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, autofocus: props.autofocus, name: name, wrapperRef: wrapperRef, error: "", invalid: props.invalid, identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, type: "select", placeholder: props.placeholder, value: props.value, prefix: props.prefix, suffix: props.suffix,
|
|
96
|
+
return (React__default.createElement(FormFieldWrapper, { disabled: props.disabled, size: props.size, align: props.align, inline: props.inline, autofocus: props.autofocus, name: name, wrapperRef: wrapperRef, error: "", invalid: props.invalid, identifier: id, descriptionIdentifier: descriptionIdentifier, description: props.description, type: "select", placeholder: props.placeholder, value: props.value, prefix: props.prefix, suffix: props.suffix, clearable: "never", maxLength: props.maxLength },
|
|
102
97
|
React__default.createElement(React__default.Fragment, null,
|
|
103
98
|
React__default.createElement("select", Object.assign({}, fieldProps, { ref: selectRef, className: inputStyle }), props.children),
|
|
104
99
|
React__default.createElement(FormFieldPostFix, { variation: "select" }))));
|
package/dist/Stack/Stack.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StackProps } from "./types";
|
|
2
|
-
export declare function Stack({ gap, recursive, splitAfter, children, align, autoWidth, as: Tag, dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }: StackProps): JSX.Element;
|
|
2
|
+
export declare function Stack({ gap, recursive, splitAfter, children, align, autoWidth, as: Tag, dataAttributes, ariaAttributes, role, id, divider, UNSAFE_className, UNSAFE_style, }: StackProps): JSX.Element;
|
package/dist/Stack/types.d.ts
CHANGED
|
@@ -13,6 +13,8 @@ export interface StackProps extends CommonAtlantisProps {
|
|
|
13
13
|
readonly align?: "start" | "center" | "end";
|
|
14
14
|
/** Whether to allow the stack to take the width of the content. Defaults to 100% */
|
|
15
15
|
readonly autoWidth?: boolean;
|
|
16
|
+
/** Element to divide the stack with. */
|
|
17
|
+
divider?: React.ReactNode;
|
|
16
18
|
/** The HTML tag to render the container as. Defaults to `div`. */
|
|
17
19
|
as?: CommonAllowedElements;
|
|
18
20
|
/** **Use at your own risk:** Custom class names for specific elements. This should only be used as a
|
package/dist/Stack-cjs.js
CHANGED
|
@@ -6,10 +6,14 @@ var getMappedAtlantisSpaceToken = require('./getMappedAtlantisSpaceToken-cjs.js'
|
|
|
6
6
|
|
|
7
7
|
var styles = {"stack":"_7bHFxCX3jv4-","start":"MoTsKGfy3zs-","center":"oXb2OHKGH4k-","end":"Clyb5sed46w-","topOnly":"_8ttf1JCju08-","recursive":"nzG883u-wZc-","splitAfter-1":"Y-Mt8C2tNsI-","splitAfter-2":"atxW7JGTiYI-","splitAfter-3":"QuY15WlcoVo-","splitAfter-4":"Vb-dwL9R1oQ-","splitAfter-5":"IjFGwSc9hoQ-","splitAfter-6":"xUe57aXJOOk-","splitAfter-7":"pSWCwyHJBsk-","splitAfter-8":"GAlopfCh8a8-","splitAfter-9":"WMC8WPjJ8TA-","splitAfter-10":"PxqAnvgqC24-","splitAfter-11":"fEFj-rRg7pw-","splitAfter-12":"eN-ykUdJrAU-","splitAfter-13":"Jic7p-x-iKg-","splitAfter-14":"PaC-tFnXMh8-","splitAfter-15":"isuG1fzSWMs-","spinning":"f07n6aE586M-"};
|
|
8
8
|
|
|
9
|
-
function Stack({ gap = getMappedAtlantisSpaceToken.spaceTokens.base, recursive, splitAfter, children, align, autoWidth = false, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
9
|
+
function Stack({ gap = getMappedAtlantisSpaceToken.spaceTokens.base, recursive, splitAfter, children, align, autoWidth = false, as: Tag = "div", dataAttributes, ariaAttributes, role, id, divider, UNSAFE_className, UNSAFE_style, }) {
|
|
10
10
|
return (React.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--public-stack-split": splitAfter, "--public-stack-space": getMappedAtlantisSpaceToken.getMappedAtlantisSpaceToken(gap), "--public-stack-width": autoWidth ? "auto" : "100%" }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.stack, recursive ? styles.recursive : styles.topOnly, splitAfter
|
|
11
11
|
? styles[`splitAfter-${splitAfter}`]
|
|
12
|
-
: undefined, align === "center" ? styles.center : undefined, align === "start" ? styles.start : undefined, align === "end" ? styles.end : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children)
|
|
12
|
+
: undefined, align === "center" ? styles.center : undefined, align === "start" ? styles.start : undefined, align === "end" ? styles.end : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), divider && Array.isArray(children)
|
|
13
|
+
? children.map((child, index) => (React.createElement(React.Fragment, null,
|
|
14
|
+
child,
|
|
15
|
+
index < children.length - 1 && divider)))
|
|
16
|
+
: children));
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
exports.Stack = Stack;
|
package/dist/Stack-es.js
CHANGED
|
@@ -4,10 +4,14 @@ import { g as getMappedAtlantisSpaceToken, s as spaceTokens } from './getMappedA
|
|
|
4
4
|
|
|
5
5
|
var styles = {"stack":"_7bHFxCX3jv4-","start":"MoTsKGfy3zs-","center":"oXb2OHKGH4k-","end":"Clyb5sed46w-","topOnly":"_8ttf1JCju08-","recursive":"nzG883u-wZc-","splitAfter-1":"Y-Mt8C2tNsI-","splitAfter-2":"atxW7JGTiYI-","splitAfter-3":"QuY15WlcoVo-","splitAfter-4":"Vb-dwL9R1oQ-","splitAfter-5":"IjFGwSc9hoQ-","splitAfter-6":"xUe57aXJOOk-","splitAfter-7":"pSWCwyHJBsk-","splitAfter-8":"GAlopfCh8a8-","splitAfter-9":"WMC8WPjJ8TA-","splitAfter-10":"PxqAnvgqC24-","splitAfter-11":"fEFj-rRg7pw-","splitAfter-12":"eN-ykUdJrAU-","splitAfter-13":"Jic7p-x-iKg-","splitAfter-14":"PaC-tFnXMh8-","splitAfter-15":"isuG1fzSWMs-","spinning":"f07n6aE586M-"};
|
|
6
6
|
|
|
7
|
-
function Stack({ gap = spaceTokens.base, recursive, splitAfter, children, align, autoWidth = false, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }) {
|
|
7
|
+
function Stack({ gap = spaceTokens.base, recursive, splitAfter, children, align, autoWidth = false, as: Tag = "div", dataAttributes, ariaAttributes, role, id, divider, UNSAFE_className, UNSAFE_style, }) {
|
|
8
8
|
return (React__default.createElement(Tag, Object.assign({ role: role, id: id }, dataAttributes, ariaAttributes, { style: Object.assign({ "--public-stack-split": splitAfter, "--public-stack-space": getMappedAtlantisSpaceToken(gap), "--public-stack-width": autoWidth ? "auto" : "100%" }, UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container), className: classnames(styles.stack, recursive ? styles.recursive : styles.topOnly, splitAfter
|
|
9
9
|
? styles[`splitAfter-${splitAfter}`]
|
|
10
|
-
: undefined, align === "center" ? styles.center : undefined, align === "start" ? styles.start : undefined, align === "end" ? styles.end : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), children)
|
|
10
|
+
: undefined, align === "center" ? styles.center : undefined, align === "start" ? styles.start : undefined, align === "end" ? styles.end : undefined, UNSAFE_className === null || UNSAFE_className === void 0 ? void 0 : UNSAFE_className.container) }), divider && Array.isArray(children)
|
|
11
|
+
? children.map((child, index) => (React__default.createElement(React__default.Fragment, null,
|
|
12
|
+
child,
|
|
13
|
+
index < children.length - 1 && divider)))
|
|
14
|
+
: children));
|
|
11
15
|
}
|
|
12
16
|
|
|
13
17
|
export { Stack as S };
|
package/dist/Text/Text.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export interface TextProps {
|
|
|
5
5
|
readonly variation?: "default" | "subdued" | "success" | "error" | "warn" | "info" | "disabled";
|
|
6
6
|
readonly align?: "start" | "center" | "end";
|
|
7
7
|
readonly size?: "small" | "base" | "large";
|
|
8
|
+
/**
|
|
9
|
+
* @default "p"
|
|
10
|
+
*/
|
|
11
|
+
readonly element?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "b" | "em" | "dd" | "dt" | "strong" | "span";
|
|
8
12
|
/**
|
|
9
13
|
* **Use at your own risk:** Custom classNames for specific elements. This should only be used as a
|
|
10
14
|
* **last resort**. Using this may result in unexpected side effects.
|
|
@@ -18,4 +22,4 @@ export interface TextProps {
|
|
|
18
22
|
*/
|
|
19
23
|
readonly UNSAFE_style?: TypographyProps["UNSAFE_style"];
|
|
20
24
|
}
|
|
21
|
-
export declare function Text({ variation, size, align, children, maxLines, UNSAFE_className, UNSAFE_style, }: PropsWithChildren<TextProps>): JSX.Element;
|
|
25
|
+
export declare function Text({ variation, size, align, children, maxLines, element, UNSAFE_className, UNSAFE_style, }: PropsWithChildren<TextProps>): JSX.Element;
|
package/dist/Text-cjs.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var Typography = require('./Typography-cjs.js');
|
|
5
5
|
|
|
6
|
-
function Text({ variation = "default", size = "base", align = "start", children, maxLines = "unlimited", UNSAFE_className, UNSAFE_style, }) {
|
|
6
|
+
function Text({ variation = "default", size = "base", align = "start", children, maxLines = "unlimited", element = "p", UNSAFE_className, UNSAFE_style, }) {
|
|
7
7
|
const textColors = {
|
|
8
8
|
default: "text",
|
|
9
9
|
subdued: "textSecondary",
|
|
@@ -21,7 +21,7 @@ function Text({ variation = "default", size = "base", align = "start", children,
|
|
|
21
21
|
larger: 16,
|
|
22
22
|
unlimited: undefined,
|
|
23
23
|
};
|
|
24
|
-
return (React.createElement(Typography.Typography, { textColor: textColors[variation], size: size, numberOfLines: maxLineToNumber[maxLines], align: align, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }, children));
|
|
24
|
+
return (React.createElement(Typography.Typography, { textColor: textColors[variation], size: size, numberOfLines: maxLineToNumber[maxLines], align: align, element: element, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }, children));
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
exports.Text = Text;
|
package/dist/Text-es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
2
|
import { T as Typography } from './Typography-es.js';
|
|
3
3
|
|
|
4
|
-
function Text({ variation = "default", size = "base", align = "start", children, maxLines = "unlimited", UNSAFE_className, UNSAFE_style, }) {
|
|
4
|
+
function Text({ variation = "default", size = "base", align = "start", children, maxLines = "unlimited", element = "p", UNSAFE_className, UNSAFE_style, }) {
|
|
5
5
|
const textColors = {
|
|
6
6
|
default: "text",
|
|
7
7
|
subdued: "textSecondary",
|
|
@@ -19,7 +19,7 @@ function Text({ variation = "default", size = "base", align = "start", children,
|
|
|
19
19
|
larger: 16,
|
|
20
20
|
unlimited: undefined,
|
|
21
21
|
};
|
|
22
|
-
return (React__default.createElement(Typography, { textColor: textColors[variation], size: size, numberOfLines: maxLineToNumber[maxLines], align: align, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }, children));
|
|
22
|
+
return (React__default.createElement(Typography, { textColor: textColors[variation], size: size, numberOfLines: maxLineToNumber[maxLines], align: align, element: element, UNSAFE_className: UNSAFE_className, UNSAFE_style: UNSAFE_style }, children));
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
export { Text as T };
|
package/dist/index.cjs
CHANGED
|
@@ -58,6 +58,8 @@ var Frame = require('./Frame-cjs.js');
|
|
|
58
58
|
var Gallery = require('./Gallery-cjs.js');
|
|
59
59
|
var Glimmer = require('./Glimmer-cjs.js');
|
|
60
60
|
var Grid = require('./Grid-cjs.js');
|
|
61
|
+
var Hidden = require('./Hidden-cjs.js');
|
|
62
|
+
var HiddenVisually = require('./HiddenVisually-cjs.js');
|
|
61
63
|
var InlineLabel = require('./InlineLabel-cjs.js');
|
|
62
64
|
var InputAvatar = require('./InputAvatar-cjs.js');
|
|
63
65
|
var InputDate_index = require('./InputDate/index.cjs');
|
|
@@ -215,7 +217,7 @@ exports.Cluster = Cluster.Cluster;
|
|
|
215
217
|
exports.Container = Container.Container;
|
|
216
218
|
exports.Cover = Cover.Cover;
|
|
217
219
|
exports.Checkbox = Checkbox_index.Checkbox;
|
|
218
|
-
exports.Chip = Chip.
|
|
220
|
+
exports.Chip = Chip.ChipNamespace;
|
|
219
221
|
exports.ChipDismissible = ChipDismissible.ChipDismissible;
|
|
220
222
|
exports.ChipSelectable = ChipDismissible.ChipSelectable;
|
|
221
223
|
exports.Chips = Chips.Chips;
|
|
@@ -268,6 +270,8 @@ exports.GLIMMER_TEST_ID = Glimmer.GLIMMER_TEST_ID;
|
|
|
268
270
|
exports.Glimmer = Glimmer.Glimmer;
|
|
269
271
|
exports.GRID_TEST_ID = Grid.GRID_TEST_ID;
|
|
270
272
|
exports.Grid = Grid.Grid;
|
|
273
|
+
exports.Hidden = Hidden.Hidden;
|
|
274
|
+
exports.HiddenVisually = HiddenVisually.HiddenVisually;
|
|
271
275
|
exports.InlineLabel = InlineLabel.InlineLabel;
|
|
272
276
|
exports.InputAvatar = InputAvatar.InputAvatar;
|
|
273
277
|
exports.InputDate = InputDate_index.InputDate;
|
package/dist/index.d.mts
CHANGED
|
@@ -43,6 +43,8 @@ export * from "./Gallery";
|
|
|
43
43
|
export * from "./Glimmer";
|
|
44
44
|
export * from "./Grid";
|
|
45
45
|
export * from "./Heading";
|
|
46
|
+
export * from "./Hidden";
|
|
47
|
+
export * from "./HiddenVisually";
|
|
46
48
|
export * from "./Icon";
|
|
47
49
|
export * from "./InlineLabel";
|
|
48
50
|
export * from "./InputAvatar";
|
package/dist/index.d.ts
CHANGED
|
@@ -43,6 +43,8 @@ export * from "./Gallery";
|
|
|
43
43
|
export * from "./Glimmer";
|
|
44
44
|
export * from "./Grid";
|
|
45
45
|
export * from "./Heading";
|
|
46
|
+
export * from "./Hidden";
|
|
47
|
+
export * from "./HiddenVisually";
|
|
46
48
|
export * from "./Icon";
|
|
47
49
|
export * from "./InlineLabel";
|
|
48
50
|
export * from "./InputAvatar";
|
package/dist/index.mjs
CHANGED
|
@@ -56,6 +56,8 @@ export { F as Frame } from './Frame-es.js';
|
|
|
56
56
|
export { G as Gallery } from './Gallery-es.js';
|
|
57
57
|
export { a as GLIMMER_TEST_ID, G as Glimmer } from './Glimmer-es.js';
|
|
58
58
|
export { G as GRID_TEST_ID, a as Grid } from './Grid-es.js';
|
|
59
|
+
export { H as Hidden } from './Hidden-es.js';
|
|
60
|
+
export { H as HiddenVisually } from './HiddenVisually-es.js';
|
|
59
61
|
export { I as InlineLabel } from './InlineLabel-es.js';
|
|
60
62
|
export { I as InputAvatar } from './InputAvatar-es.js';
|
|
61
63
|
export { InputDate } from './InputDate/index.mjs';
|