@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
package/Hidden.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/Hidden";
|
package/Hidden.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var Hidden = require("./dist/Hidden");
|
|
8
|
+
|
|
9
|
+
Object.keys(Hidden).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return Hidden[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./dist/HiddenVisually";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true,
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var HiddenVisually = require("./dist/HiddenVisually");
|
|
8
|
+
|
|
9
|
+
Object.keys(HiddenVisually).forEach(function(key) {
|
|
10
|
+
if (key === "default" || key === "__esModule") return;
|
|
11
|
+
Object.defineProperty(exports, key, {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function get() {
|
|
14
|
+
return HiddenVisually[key];
|
|
15
|
+
},
|
|
16
|
+
});
|
|
17
|
+
});
|
package/dist/Chip/Chip.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { ChipPrefix } from "./components/ChipPrefix/Chip.Prefix";
|
|
2
3
|
import { ChipSuffix } from "./components/ChipSuffix/Chip.Suffix";
|
|
3
4
|
import { ChipProps } from "./Chip.types";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
5
|
+
declare const ChipNamespace: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement | HTMLButtonElement>> & {
|
|
6
|
+
Prefix: typeof ChipPrefix;
|
|
7
|
+
Suffix: typeof ChipSuffix;
|
|
8
|
+
};
|
|
9
|
+
export { ChipNamespace as Chip };
|
package/dist/Chip/index.cjs
CHANGED
package/dist/Chip-cjs.js
CHANGED
|
@@ -75,35 +75,56 @@ const allowedSuffixIcons = [
|
|
|
75
75
|
"arrowDown",
|
|
76
76
|
];
|
|
77
77
|
|
|
78
|
-
|
|
78
|
+
const ChipComponent = React.forwardRef(({ ariaLabel, disabled, heading, invalid, label, value, testID, onClick, onKeyDown, children, role = "button", tabIndex = 0, variation = "base", }, ref) => {
|
|
79
79
|
const classes = classnames(styles$1.chip, {
|
|
80
80
|
[styles$1.invalid]: invalid,
|
|
81
81
|
[styles$1.base]: variation === "base",
|
|
82
82
|
[styles$1.subtle]: variation === "subtle",
|
|
83
83
|
[styles$1.disabled]: disabled,
|
|
84
84
|
});
|
|
85
|
-
const prefix = useChildComponent.useChildComponent(children, d => d.type ===
|
|
86
|
-
const suffix = useChildComponent.useChildComponent(children, d => d.type ===
|
|
85
|
+
const prefix = useChildComponent.useChildComponent(children, d => d.type === ChipPrefix);
|
|
86
|
+
const suffix = useChildComponent.useChildComponent(children, d => d.type === ChipSuffix);
|
|
87
87
|
const [labelRef, labelFullyVisible] = useInView.useInView_2();
|
|
88
88
|
const [headingRef, headingFullyVisible] = useInView.useInView_2();
|
|
89
89
|
const tooltipMessage = getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading);
|
|
90
|
-
const
|
|
91
|
-
|
|
92
|
-
React.createElement(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
React.createElement(
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
React.createElement(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
90
|
+
const chipContent = (React.createElement(React.Fragment, null,
|
|
91
|
+
prefix,
|
|
92
|
+
React.createElement("div", { className: styles$1.chipContent },
|
|
93
|
+
heading && (React.createElement(React.Fragment, null,
|
|
94
|
+
React.createElement(Typography.Typography, { size: "base", fontWeight: "medium" },
|
|
95
|
+
heading,
|
|
96
|
+
React.createElement("span", { ref: headingRef, className: styles$1.chipLabelRef })),
|
|
97
|
+
label && React.createElement("span", { className: styles$1.chipBar }))),
|
|
98
|
+
React.createElement(Typography.Typography, { size: "base" },
|
|
99
|
+
label,
|
|
100
|
+
React.createElement("span", { ref: labelRef, className: styles$1.chipLabelRef })),
|
|
101
|
+
!labelFullyVisible && (React.createElement("div", { className: styles$1.truncateGradient, "data-testid": "ATL-Chip-Truncation-Gradient" },
|
|
102
|
+
React.createElement("span", null)))),
|
|
103
|
+
suffix));
|
|
104
|
+
// Use createElement to properly handle the ref typing
|
|
105
|
+
return (React.createElement(Tooltip.Tooltip, { message: tooltipMessage, setTabIndex: false }, onClick
|
|
106
|
+
? React.createElement("button", {
|
|
107
|
+
className: classes,
|
|
108
|
+
onClick: (ev) => onClick === null || onClick === void 0 ? void 0 : onClick(value, ev),
|
|
109
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
110
|
+
onKeyDown,
|
|
111
|
+
"aria-label": ariaLabel,
|
|
112
|
+
disabled,
|
|
113
|
+
role,
|
|
114
|
+
"data-testid": testID,
|
|
115
|
+
type: "button",
|
|
116
|
+
ref,
|
|
117
|
+
}, chipContent)
|
|
118
|
+
: React.createElement("div", {
|
|
119
|
+
className: classes,
|
|
120
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
121
|
+
onKeyDown,
|
|
122
|
+
"aria-label": ariaLabel,
|
|
123
|
+
role,
|
|
124
|
+
"data-testid": testID,
|
|
125
|
+
ref,
|
|
126
|
+
}, chipContent)));
|
|
127
|
+
});
|
|
107
128
|
function getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading) {
|
|
108
129
|
let message = "";
|
|
109
130
|
if (heading && !headingFullyVisible) {
|
|
@@ -114,10 +135,13 @@ function getTooltipMessage(labelFullyVisible, headingFullyVisible, label, headin
|
|
|
114
135
|
}
|
|
115
136
|
return message;
|
|
116
137
|
}
|
|
117
|
-
|
|
118
|
-
|
|
138
|
+
ChipComponent.displayName = "Chip";
|
|
139
|
+
const ChipNamespace = Object.assign(ChipComponent, {
|
|
140
|
+
Prefix: ChipPrefix,
|
|
141
|
+
Suffix: ChipSuffix,
|
|
142
|
+
});
|
|
119
143
|
|
|
120
|
-
exports.
|
|
144
|
+
exports.ChipNamespace = ChipNamespace;
|
|
121
145
|
exports.InternalChipButton = InternalChipButton;
|
|
122
146
|
exports.styles = styles$1;
|
|
123
147
|
exports.styles$1 = styles;
|
package/dist/Chip-es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React__default, { useRef } from 'react';
|
|
1
|
+
import React__default, { useRef, forwardRef } from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
3
|
import { u as useInView_2 } from './useInView-es.js';
|
|
4
4
|
import { A as Avatar } from './Avatar-es.js';
|
|
@@ -73,35 +73,56 @@ const allowedSuffixIcons = [
|
|
|
73
73
|
"arrowDown",
|
|
74
74
|
];
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
const ChipComponent = forwardRef(({ ariaLabel, disabled, heading, invalid, label, value, testID, onClick, onKeyDown, children, role = "button", tabIndex = 0, variation = "base", }, ref) => {
|
|
77
77
|
const classes = classnames(styles$1.chip, {
|
|
78
78
|
[styles$1.invalid]: invalid,
|
|
79
79
|
[styles$1.base]: variation === "base",
|
|
80
80
|
[styles$1.subtle]: variation === "subtle",
|
|
81
81
|
[styles$1.disabled]: disabled,
|
|
82
82
|
});
|
|
83
|
-
const prefix = useChildComponent(children, d => d.type ===
|
|
84
|
-
const suffix = useChildComponent(children, d => d.type ===
|
|
83
|
+
const prefix = useChildComponent(children, d => d.type === ChipPrefix);
|
|
84
|
+
const suffix = useChildComponent(children, d => d.type === ChipSuffix);
|
|
85
85
|
const [labelRef, labelFullyVisible] = useInView_2();
|
|
86
86
|
const [headingRef, headingFullyVisible] = useInView_2();
|
|
87
87
|
const tooltipMessage = getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading);
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
React__default.createElement(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
React__default.createElement(
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
React__default.createElement(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
const chipContent = (React__default.createElement(React__default.Fragment, null,
|
|
89
|
+
prefix,
|
|
90
|
+
React__default.createElement("div", { className: styles$1.chipContent },
|
|
91
|
+
heading && (React__default.createElement(React__default.Fragment, null,
|
|
92
|
+
React__default.createElement(Typography, { size: "base", fontWeight: "medium" },
|
|
93
|
+
heading,
|
|
94
|
+
React__default.createElement("span", { ref: headingRef, className: styles$1.chipLabelRef })),
|
|
95
|
+
label && React__default.createElement("span", { className: styles$1.chipBar }))),
|
|
96
|
+
React__default.createElement(Typography, { size: "base" },
|
|
97
|
+
label,
|
|
98
|
+
React__default.createElement("span", { ref: labelRef, className: styles$1.chipLabelRef })),
|
|
99
|
+
!labelFullyVisible && (React__default.createElement("div", { className: styles$1.truncateGradient, "data-testid": "ATL-Chip-Truncation-Gradient" },
|
|
100
|
+
React__default.createElement("span", null)))),
|
|
101
|
+
suffix));
|
|
102
|
+
// Use createElement to properly handle the ref typing
|
|
103
|
+
return (React__default.createElement(Tooltip, { message: tooltipMessage, setTabIndex: false }, onClick
|
|
104
|
+
? React__default.createElement("button", {
|
|
105
|
+
className: classes,
|
|
106
|
+
onClick: (ev) => onClick === null || onClick === void 0 ? void 0 : onClick(value, ev),
|
|
107
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
108
|
+
onKeyDown,
|
|
109
|
+
"aria-label": ariaLabel,
|
|
110
|
+
disabled,
|
|
111
|
+
role,
|
|
112
|
+
"data-testid": testID,
|
|
113
|
+
type: "button",
|
|
114
|
+
ref,
|
|
115
|
+
}, chipContent)
|
|
116
|
+
: React__default.createElement("div", {
|
|
117
|
+
className: classes,
|
|
118
|
+
tabIndex: disabled ? -1 : tabIndex,
|
|
119
|
+
onKeyDown,
|
|
120
|
+
"aria-label": ariaLabel,
|
|
121
|
+
role,
|
|
122
|
+
"data-testid": testID,
|
|
123
|
+
ref,
|
|
124
|
+
}, chipContent)));
|
|
125
|
+
});
|
|
105
126
|
function getTooltipMessage(labelFullyVisible, headingFullyVisible, label, heading) {
|
|
106
127
|
let message = "";
|
|
107
128
|
if (heading && !headingFullyVisible) {
|
|
@@ -112,7 +133,10 @@ function getTooltipMessage(labelFullyVisible, headingFullyVisible, label, headin
|
|
|
112
133
|
}
|
|
113
134
|
return message;
|
|
114
135
|
}
|
|
115
|
-
|
|
116
|
-
|
|
136
|
+
ChipComponent.displayName = "Chip";
|
|
137
|
+
const ChipNamespace = Object.assign(ChipComponent, {
|
|
138
|
+
Prefix: ChipPrefix,
|
|
139
|
+
Suffix: ChipSuffix,
|
|
140
|
+
});
|
|
117
141
|
|
|
118
|
-
export {
|
|
142
|
+
export { ChipNamespace as C, InternalChipButton as I, styles as a, styles$1 as s };
|
|
@@ -7,14 +7,14 @@ var Chip = require('./Chip-cjs.js');
|
|
|
7
7
|
|
|
8
8
|
function ChipSelectable(_a) {
|
|
9
9
|
var { selected } = _a, rest = tslib_es6.__rest(_a, ["selected"]);
|
|
10
|
-
return (React.createElement(Chip.
|
|
11
|
-
React.createElement(Chip.
|
|
10
|
+
return (React.createElement(Chip.ChipNamespace, Object.assign({}, rest),
|
|
11
|
+
React.createElement(Chip.ChipNamespace.Suffix, { className: selected ? Chip.styles.selected : "" },
|
|
12
12
|
React.createElement(Icon.Icon, { name: selected ? "checkmark" : "add", size: "small", color: "interactiveSubtle" }))));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function ChipDismissible(props) {
|
|
16
|
-
return (React.createElement(Chip.
|
|
17
|
-
React.createElement(Chip.
|
|
16
|
+
return (React.createElement(Chip.ChipNamespace, Object.assign({}, props),
|
|
17
|
+
React.createElement(Chip.ChipNamespace.Suffix, null,
|
|
18
18
|
React.createElement(Icon.Icon, { name: "cross", size: "small", color: "interactiveSubtle" }))));
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { _ as __rest } from './tslib.es6-es.js';
|
|
2
2
|
import React__default from 'react';
|
|
3
3
|
import { I as Icon } from './Icon-es.js';
|
|
4
|
-
import { C as
|
|
4
|
+
import { C as ChipNamespace, s as styles } from './Chip-es.js';
|
|
5
5
|
|
|
6
6
|
function ChipSelectable(_a) {
|
|
7
7
|
var { selected } = _a, rest = __rest(_a, ["selected"]);
|
|
8
|
-
return (React__default.createElement(
|
|
9
|
-
React__default.createElement(
|
|
8
|
+
return (React__default.createElement(ChipNamespace, Object.assign({}, rest),
|
|
9
|
+
React__default.createElement(ChipNamespace.Suffix, { className: selected ? styles.selected : "" },
|
|
10
10
|
React__default.createElement(Icon, { name: selected ? "checkmark" : "add", size: "small", color: "interactiveSubtle" }))));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
function ChipDismissible(props) {
|
|
14
|
-
return (React__default.createElement(
|
|
15
|
-
React__default.createElement(
|
|
14
|
+
return (React__default.createElement(ChipNamespace, Object.assign({}, props),
|
|
15
|
+
React__default.createElement(ChipNamespace.Suffix, null,
|
|
16
16
|
React__default.createElement(Icon, { name: "cross", size: "small", color: "interactiveSubtle" }))));
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -23,7 +23,7 @@ function ComboboxActivator(props) {
|
|
|
23
23
|
const { handleOpen } = React.useContext(ComboboxProvider.ComboboxContext);
|
|
24
24
|
const accessibilityAttributes = useComboboxActivatorAccessibility();
|
|
25
25
|
if (typeof props.children !== "function" &&
|
|
26
|
-
(props.children.type === Button.Button || props.children.type === Chip.
|
|
26
|
+
(props.children.type === Button.Button || props.children.type === Chip.ChipNamespace)) {
|
|
27
27
|
return React.cloneElement(props.children, {
|
|
28
28
|
role: accessibilityAttributes.role,
|
|
29
29
|
onClick: handleOpen,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React__default, { useContext } from 'react';
|
|
2
2
|
import { B as Button } from './Button-es.js';
|
|
3
3
|
import 'classnames';
|
|
4
|
-
import { C as
|
|
4
|
+
import { C as ChipNamespace } from './Chip-es.js';
|
|
5
5
|
import './tslib.es6-es.js';
|
|
6
6
|
import '@jobber/design';
|
|
7
7
|
import { a as ComboboxContext } from './ComboboxProvider-es.js';
|
|
@@ -21,7 +21,7 @@ function ComboboxActivator(props) {
|
|
|
21
21
|
const { handleOpen } = React__default.useContext(ComboboxContext);
|
|
22
22
|
const accessibilityAttributes = useComboboxActivatorAccessibility();
|
|
23
23
|
if (typeof props.children !== "function" &&
|
|
24
|
-
(props.children.type === Button || props.children.type ===
|
|
24
|
+
(props.children.type === Button || props.children.type === ChipNamespace)) {
|
|
25
25
|
return React__default.cloneElement(props.children, {
|
|
26
26
|
role: accessibilityAttributes.role,
|
|
27
27
|
onClick: handleOpen,
|
|
@@ -10,7 +10,7 @@ function ComboboxTrigger({ label = "Select", selected, }) {
|
|
|
10
10
|
const { handleOpen } = React.useContext(ComboboxProvider.ComboboxContext);
|
|
11
11
|
const hasSelection = selected.length;
|
|
12
12
|
const selectedLabel = selected.map(option => option.label).join(", ");
|
|
13
|
-
return (React.createElement(Chip.
|
|
13
|
+
return (React.createElement(Chip.ChipNamespace, { variation: hasSelection ? "base" : "subtle", label: hasSelection ? selectedLabel : "", ariaLabel: label, heading: label, onClick: handleOpen, role: "combobox" }, !hasSelection && (React.createElement(Chip.ChipNamespace.Suffix, null,
|
|
14
14
|
React.createElement(Icon.Icon, { name: "add", size: "small" })))));
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default from 'react';
|
|
2
|
-
import { C as
|
|
2
|
+
import { C as ChipNamespace } from './Chip-es.js';
|
|
3
3
|
import './tslib.es6-es.js';
|
|
4
4
|
import { I as Icon } from './Icon-es.js';
|
|
5
5
|
import { a as ComboboxContext } from './ComboboxProvider-es.js';
|
|
@@ -8,7 +8,7 @@ function ComboboxTrigger({ label = "Select", selected, }) {
|
|
|
8
8
|
const { handleOpen } = React__default.useContext(ComboboxContext);
|
|
9
9
|
const hasSelection = selected.length;
|
|
10
10
|
const selectedLabel = selected.map(option => option.label).join(", ");
|
|
11
|
-
return (React__default.createElement(
|
|
11
|
+
return (React__default.createElement(ChipNamespace, { variation: hasSelection ? "base" : "subtle", label: hasSelection ? selectedLabel : "", ariaLabel: label, heading: label, onClick: handleOpen, role: "combobox" }, !hasSelection && (React__default.createElement(ChipNamespace.Suffix, null,
|
|
12
12
|
React__default.createElement(Icon, { name: "add", size: "small" })))));
|
|
13
13
|
}
|
|
14
14
|
|
package/dist/DataListSort-cjs.js
CHANGED
|
@@ -21,7 +21,7 @@ function DataListSort() {
|
|
|
21
21
|
},
|
|
22
22
|
] },
|
|
23
23
|
React.createElement(Combobox.Combobox.Activator, null,
|
|
24
|
-
React.createElement(Chip.
|
|
24
|
+
React.createElement(Chip.ChipNamespace, { heading: "Sort", label: getButtonLabel(), variation: state ? "base" : "subtle" }, !state && (React.createElement(Chip.ChipNamespace.Suffix, null,
|
|
25
25
|
React.createElement(Icon.Icon, { name: "arrowDown", size: "small" }))))),
|
|
26
26
|
sortByOptions.map(({ label, value }) => (React.createElement(Combobox.Combobox.Option, { key: value, id: value, label: label })))));
|
|
27
27
|
function getSortByOptions() {
|
package/dist/DataListSort-es.js
CHANGED
|
@@ -2,7 +2,7 @@ import React__default from 'react';
|
|
|
2
2
|
import { u as useDataListContext } from './DataListContext-es.js';
|
|
3
3
|
import { C as Combobox } from './Combobox-es.js';
|
|
4
4
|
import './ComboboxProvider-es.js';
|
|
5
|
-
import { C as
|
|
5
|
+
import { C as ChipNamespace } from './Chip-es.js';
|
|
6
6
|
import './tslib.es6-es.js';
|
|
7
7
|
import { I as Icon } from './Icon-es.js';
|
|
8
8
|
|
|
@@ -19,7 +19,7 @@ function DataListSort() {
|
|
|
19
19
|
},
|
|
20
20
|
] },
|
|
21
21
|
React__default.createElement(Combobox.Activator, null,
|
|
22
|
-
React__default.createElement(
|
|
22
|
+
React__default.createElement(ChipNamespace, { heading: "Sort", label: getButtonLabel(), variation: state ? "base" : "subtle" }, !state && (React__default.createElement(ChipNamespace.Suffix, null,
|
|
23
23
|
React__default.createElement(Icon, { name: "arrowDown", size: "small" }))))),
|
|
24
24
|
sortByOptions.map(({ label, value }) => (React__default.createElement(Combobox.Option, { key: value, id: value, label: label })))));
|
|
25
25
|
function getSortByOptions() {
|
|
@@ -6,7 +6,7 @@ export interface FormFieldWrapperProps extends FormFieldProps {
|
|
|
6
6
|
readonly identifier: string;
|
|
7
7
|
readonly descriptionIdentifier: string;
|
|
8
8
|
readonly clearable: Clearable;
|
|
9
|
-
readonly onClear
|
|
9
|
+
readonly onClear?: () => void;
|
|
10
10
|
readonly showMiniLabel?: boolean;
|
|
11
11
|
readonly readonly?: boolean;
|
|
12
12
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Hidden";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { AtlantisBreakpoints } from "../sharedHelpers/getMappedBreakpointWidth";
|
|
2
|
+
import { CommonAllowedElements, CommonAtlantisProps } from "../sharedHelpers/types";
|
|
3
|
+
export interface HiddenProps extends CommonAtlantisProps {
|
|
4
|
+
as?: CommonAllowedElements;
|
|
5
|
+
above?: keyof Omit<typeof AtlantisBreakpoints, "xs">;
|
|
6
|
+
below?: keyof Omit<typeof AtlantisBreakpoints, "xs">;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
/** **Use at your own risk:** Custom class names for specific elements. This should only be used as a
|
|
9
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
10
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
11
|
+
*/
|
|
12
|
+
readonly UNSAFE_className?: {
|
|
13
|
+
container?: string;
|
|
14
|
+
};
|
|
15
|
+
/** **Use at your own risk:** Custom style for specific elements. This should only be used as a
|
|
16
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
17
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
18
|
+
*/
|
|
19
|
+
readonly UNSAFE_style?: {
|
|
20
|
+
container?: React.CSSProperties;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var classnames = require('classnames');
|
|
4
|
+
var React = require('react');
|
|
5
|
+
|
|
6
|
+
var styles = {"hidden":"e4hGIsaejY0-","smAndUp":"_649EOf4qo-s-","mdAndUp":"UuA9Ph5Q5Rw-","lgAndUp":"QaAD6nxesFU-","xlAndUp":"XF-Uuqx6B-I-","smAndDown":"pDvz0mHYkPs-","mdAndDown":"_5HzS5AKC-fs-","lgAndDown":"PuKTHF-lcJc-","xlAndDown":"qq7dacxDjhk-","spinning":"WZj6FJbA0iU-"};
|
|
7
|
+
|
|
8
|
+
function Hidden({ as: Tag = "div", dataAttributes, ariaAttributes, role, id, children, UNSAFE_className, UNSAFE_style, above, below, }) {
|
|
9
|
+
return (React.createElement(Tag, Object.assign({}, dataAttributes, ariaAttributes, { role: role, id: id, className: classnames(styles.hidden, UNSAFE_className, above && styles[`${above}AndUp`], below && styles[`${below}AndDown`]), style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container }), children));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
exports.Hidden = Hidden;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import classnames from 'classnames';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
var styles = {"hidden":"e4hGIsaejY0-","smAndUp":"_649EOf4qo-s-","mdAndUp":"UuA9Ph5Q5Rw-","lgAndUp":"QaAD6nxesFU-","xlAndUp":"XF-Uuqx6B-I-","smAndDown":"pDvz0mHYkPs-","mdAndDown":"_5HzS5AKC-fs-","lgAndDown":"PuKTHF-lcJc-","xlAndDown":"qq7dacxDjhk-","spinning":"WZj6FJbA0iU-"};
|
|
5
|
+
|
|
6
|
+
function Hidden({ as: Tag = "div", dataAttributes, ariaAttributes, role, id, children, UNSAFE_className, UNSAFE_style, above, below, }) {
|
|
7
|
+
return (React__default.createElement(Tag, Object.assign({}, dataAttributes, ariaAttributes, { role: role, id: id, className: classnames(styles.hidden, UNSAFE_className, above && styles[`${above}AndUp`], below && styles[`${below}AndDown`]), style: UNSAFE_style === null || UNSAFE_style === void 0 ? void 0 : UNSAFE_style.container }), children));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { Hidden as H };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./HiddenVisually";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AtlantisBreakpoints } from "../sharedHelpers/getMappedBreakpointWidth";
|
|
2
|
+
import { CommonAllowedElements, CommonAtlantisProps } from "../sharedHelpers/types";
|
|
3
|
+
export interface HiddenVisuallyProps extends CommonAtlantisProps {
|
|
4
|
+
above?: keyof Omit<typeof AtlantisBreakpoints, "xs">;
|
|
5
|
+
below?: keyof Omit<typeof AtlantisBreakpoints, "xs">;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
as?: CommonAllowedElements;
|
|
8
|
+
/** **Use at your own risk:** Custom class names for specific elements. This should only be used as a
|
|
9
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
10
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
11
|
+
*/
|
|
12
|
+
UNSAFE_className?: string;
|
|
13
|
+
/** **Use at your own risk:** Custom style for specific elements. This should only be used as a
|
|
14
|
+
* **last resort**. Using this may result in unexpected side effects.
|
|
15
|
+
* More information in the [Customizing components Guide](https://atlantis.getjobber.com/guides/customizing-components).
|
|
16
|
+
*/
|
|
17
|
+
UNSAFE_style?: React.CSSProperties;
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var classnames = require('classnames');
|
|
5
|
+
|
|
6
|
+
var styles = {"hiddenVisually":"KIQEOl5--Ps-","smAndUp":"dyD8LqeU6rk-","mdAndUp":"_4cvm5Lo6b-4-","lgAndUp":"_2tqcdABzC-A-","xlAndUp":"ZI43Z0NrdTQ-","smAndDown":"tci49Fv-zGo-","mdAndDown":"gjbmECkM2Gk-","lgAndDown":"c7PlOuwuepk-","xlAndDown":"Xp7lP5jyOn4-","spinning":"I-xU3Z2iq1E-"};
|
|
7
|
+
|
|
8
|
+
function HiddenVisually({ children, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, above, below, }) {
|
|
9
|
+
return (React.createElement(Tag, Object.assign({}, dataAttributes, ariaAttributes, { role: role, id: id, className: classnames(styles.hiddenVisually, UNSAFE_className, above && styles[`${above}AndUp`], below && styles[`${below}AndDown`]), style: UNSAFE_style }), children));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
exports.HiddenVisually = HiddenVisually;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import classnames from 'classnames';
|
|
3
|
+
|
|
4
|
+
var styles = {"hiddenVisually":"KIQEOl5--Ps-","smAndUp":"dyD8LqeU6rk-","mdAndUp":"_4cvm5Lo6b-4-","lgAndUp":"_2tqcdABzC-A-","xlAndUp":"ZI43Z0NrdTQ-","smAndDown":"tci49Fv-zGo-","mdAndDown":"gjbmECkM2Gk-","lgAndDown":"c7PlOuwuepk-","xlAndDown":"Xp7lP5jyOn4-","spinning":"I-xU3Z2iq1E-"};
|
|
5
|
+
|
|
6
|
+
function HiddenVisually({ children, as: Tag = "div", dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, above, below, }) {
|
|
7
|
+
return (React__default.createElement(Tag, Object.assign({}, dataAttributes, ariaAttributes, { role: role, id: id, className: classnames(styles.hiddenVisually, UNSAFE_className, above && styles[`${above}AndUp`], below && styles[`${below}AndDown`]), style: UNSAFE_style }), children));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { HiddenVisually as H };
|
|
@@ -14,9 +14,9 @@ var Chip = require('./Chip-cjs.js');
|
|
|
14
14
|
require('./tslib.es6-cjs.js');
|
|
15
15
|
|
|
16
16
|
function InternalChip({ label, active = false, disabled = false, invalid = false, prefix, suffix, tabIndex, ariaLabel, onClick, onKeyDown, }) {
|
|
17
|
-
return (React.createElement(Chip.
|
|
18
|
-
prefix && React.createElement(Chip.
|
|
19
|
-
suffix && React.createElement(Chip.
|
|
17
|
+
return (React.createElement(Chip.ChipNamespace, { disabled: disabled, invalid: invalid, onKeyDown: onKeyDown, testID: "ATL-InternalChip", ariaLabel: ariaLabel, tabIndex: tabIndex, variation: active ? "base" : "subtle", role: tabIndex !== undefined ? "option" : undefined, onClick: onClick ? (_, ev) => onClick(ev) : undefined, label: label },
|
|
18
|
+
prefix && React.createElement(Chip.ChipNamespace.Prefix, null, prefix),
|
|
19
|
+
suffix && React.createElement(Chip.ChipNamespace.Suffix, null, suffix)));
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuList":"J8USVG1tjPs-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-","spinning":"hDJGLX6kE-U-"};
|
|
@@ -8,13 +8,13 @@ import { u as useSafeLayoutEffect_1 } from './useSafeLayoutEffect-es.js';
|
|
|
8
8
|
import { T as Text } from './Text-es.js';
|
|
9
9
|
import { B as Button } from './Button-es.js';
|
|
10
10
|
import { S as Spinner } from './Spinner-es.js';
|
|
11
|
-
import { C as
|
|
11
|
+
import { C as ChipNamespace, I as InternalChipButton } from './Chip-es.js';
|
|
12
12
|
import './tslib.es6-es.js';
|
|
13
13
|
|
|
14
14
|
function InternalChip({ label, active = false, disabled = false, invalid = false, prefix, suffix, tabIndex, ariaLabel, onClick, onKeyDown, }) {
|
|
15
|
-
return (React__default.createElement(
|
|
16
|
-
prefix && React__default.createElement(
|
|
17
|
-
suffix && React__default.createElement(
|
|
15
|
+
return (React__default.createElement(ChipNamespace, { disabled: disabled, invalid: invalid, onKeyDown: onKeyDown, testID: "ATL-InternalChip", ariaLabel: ariaLabel, tabIndex: tabIndex, variation: active ? "base" : "subtle", role: tabIndex !== undefined ? "option" : undefined, onClick: onClick ? (_, ev) => onClick(ev) : undefined, label: label },
|
|
16
|
+
prefix && React__default.createElement(ChipNamespace.Prefix, null, prefix),
|
|
17
|
+
suffix && React__default.createElement(ChipNamespace.Suffix, null, suffix)));
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
var styles = {"wrapper":"XRnU90M2-fs-","input":"Dq-yFHd1zK0-","menu":"F7CpurjKzBI-","menuList":"J8USVG1tjPs-","menuListOption":"_9SAK31TqNDY-","loadingIndicator":"s5vFJVv0t0Q-","activeOption":"_8d0w-JzgzS4-","spinning":"hDJGLX6kE-U-"};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ResponsiveSwitcherProps } from "./types";
|
|
2
|
-
export declare function ResponsiveSwitcher({ children, threshold, gap, limit, as: Tag, dataAttributes, ariaAttributes, role, id, UNSAFE_className, UNSAFE_style, }: ResponsiveSwitcherProps): JSX.Element;
|
|
2
|
+
export declare function ResponsiveSwitcher({ children, threshold, gap, limit, scaleBy, as: Tag, dataAttributes, ariaAttributes, collapseBelow, collapsed, role, id, UNSAFE_className, UNSAFE_style, }: ResponsiveSwitcherProps): JSX.Element;
|