@companycam/slab-web 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +1 -1
- package/index.mjs +4 -4
- package/lib/Badge/Badge.d.ts +1 -1
- package/lib/Billboard/Billboard.d.ts +7 -4
- package/lib/Button/Button.d.ts +1 -1
- package/lib/InputText/InputText.d.ts +1 -1
- package/lib/ScreenReaderContent/ScreenReaderContent.d.ts +1 -1
- package/lib/Spinner/Spinner.d.ts +1 -1
- package/lib/Text/Text.d.ts +1 -1
- package/lib/shared/Field/Field.d.ts +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -349,7 +349,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
349
349
|
flex-direction: column;
|
|
350
350
|
gap: var(--cc_size_spacing_s);
|
|
351
351
|
margin-block-start: var(--cc_size_spacing_m);
|
|
352
|
-
`,Rs=({image:e,className:r,color:t="info",iconName:n,message:o="",primaryAction:a,secondaryAction:i,style:d,title:p})=>{var v,b,$,R;const _=()=>e!=null&&e.src?T.jsx(As,{style:e.imageContainerStyle,children:T.jsx($s,{src:e.src,alt:e.alt})}):T.jsx(zs,{className:`mdi mdi-${n}`,iconColor:t,"aria-hidden":"true"});return T.jsxs(Es,{className:r,style:d,children:[_(),T.jsxs(ks,{children:[T.jsx(Ze,{as:"h3",family:"heading",size:"xl",weight:"800",ccMargin:"none none xs",children:p}),T.jsx(Ze,{as:"p",color:"subtle",children:o})]}),T.jsxs(Ts,{children:[a?T.jsx(Xe,{
|
|
352
|
+
`,Rs=({image:e,className:r,color:t="info",iconName:n,message:o="",primaryAction:a,secondaryAction:i,style:d,title:p})=>{var v,b,$,R;const _=()=>e!=null&&e.src?T.jsx(As,{style:e.imageContainerStyle,children:T.jsx($s,{src:e.src,alt:e.alt})}):T.jsx(zs,{className:`mdi mdi-${n}`,iconColor:t,"aria-hidden":"true"});return T.jsxs(Es,{className:r,style:d,children:[_(),T.jsxs(ks,{children:[T.jsx(Ze,{as:"h3",family:"heading",size:"xl",weight:"800",ccMargin:"none none xs",children:p}),T.jsx(Ze,{as:"p",color:"subtle",children:o})]}),T.jsxs(Ts,{children:[a?T.jsx(Xe,{...a,"data-testid":a["data-testid"],color:t==="destroy"?"destroy":"primary",icon:{name:(v=a.icon)==null?void 0:v.name,position:(b=a.icon)==null?void 0:b.position},children:a.label}):null,i?T.jsx(Xe,{...i,"datatest-id":i["data-testid"],color:"subtle",icon:{name:($=i.icon)==null?void 0:$.name,position:(R=i.icon)==null?void 0:R.position},children:i.label}):null]})]})},Ps=Y.span`
|
|
353
353
|
width: 1px;
|
|
354
354
|
height: 1px;
|
|
355
355
|
margin: -1px;
|
package/index.mjs
CHANGED
|
@@ -2185,8 +2185,8 @@ const $a = {
|
|
|
2185
2185
|
s ? /* @__PURE__ */ V(
|
|
2186
2186
|
vt,
|
|
2187
2187
|
{
|
|
2188
|
-
|
|
2189
|
-
|
|
2188
|
+
...s,
|
|
2189
|
+
"data-testid": s["data-testid"],
|
|
2190
2190
|
color: t === "destroy" ? "destroy" : "primary",
|
|
2191
2191
|
icon: {
|
|
2192
2192
|
name: (v = s.icon) == null ? void 0 : v.name,
|
|
@@ -2198,8 +2198,8 @@ const $a = {
|
|
|
2198
2198
|
i ? /* @__PURE__ */ V(
|
|
2199
2199
|
vt,
|
|
2200
2200
|
{
|
|
2201
|
-
|
|
2202
|
-
|
|
2201
|
+
...i,
|
|
2202
|
+
"datatest-id": i["data-testid"],
|
|
2203
2203
|
color: "subtle",
|
|
2204
2204
|
icon: {
|
|
2205
2205
|
name: ($ = i.icon) == null ? void 0 : $.name,
|
package/lib/Badge/Badge.d.ts
CHANGED
|
@@ -30,5 +30,5 @@ The most common application for a Badge is in a list item, to display the status
|
|
|
30
30
|
- Use `outline` icons inside Badge where possible.
|
|
31
31
|
- Badge should not be clickable itself, but can be part of a clickable element containing other items.
|
|
32
32
|
*/
|
|
33
|
-
export declare function Badge({ children, color, className, iconName, size, style, testId, }: BadgeProps): JSX.Element;
|
|
33
|
+
export declare function Badge({ children, color, className, iconName, size, style, testId, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
export default Badge;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button/Button';
|
|
3
3
|
type IconColor = 'success' | 'caution' | 'destroy' | 'info';
|
|
4
|
-
type Action =
|
|
4
|
+
type Action = Omit<ButtonProps, 'children'> & {
|
|
5
5
|
label: string;
|
|
6
|
+
'data-testid'?: string;
|
|
6
7
|
};
|
|
7
8
|
type Image = {
|
|
8
9
|
src: string;
|
|
@@ -32,8 +33,8 @@ export type BillboardProps = {
|
|
|
32
33
|
* @param [color] - Determines the color of the icon (and primary button, if color is "destroy")
|
|
33
34
|
* @param [iconName] - Display a CompanyCam icon as the featured image
|
|
34
35
|
* @param [message] - The main text content
|
|
35
|
-
* @param [primaryAction] - Object with `label
|
|
36
|
-
* @param [secondaryAction] - Object with `label
|
|
36
|
+
* @param [primaryAction] - Object with `label` and any property of type ButtonProps for primary action button that pulls types from ```<Button />```
|
|
37
|
+
* @param [secondaryAction] - Object with `label` and any property of type ButtonProps for secondary action button that pulls types from ```<Button />```
|
|
37
38
|
* @param [title] - The Billboard heading
|
|
38
39
|
*
|
|
39
40
|
* @example
|
|
@@ -47,11 +48,13 @@ export type BillboardProps = {
|
|
|
47
48
|
* color="destroy"
|
|
48
49
|
* iconName="alert-circle"
|
|
49
50
|
* secondaryAction={{
|
|
51
|
+
* 'data-testid': "my_test_id",
|
|
50
52
|
* label: "Try, again",
|
|
51
53
|
* onClick: clearError,
|
|
54
|
+
* type: "button"
|
|
52
55
|
* }}
|
|
53
56
|
* message="Sorry, something seems to have happened on our end."
|
|
54
57
|
* />
|
|
55
58
|
*/
|
|
56
|
-
export declare const Billboard: ({ image, className, color, iconName, message, primaryAction, secondaryAction, style, title, }: BillboardProps) => JSX.Element;
|
|
59
|
+
export declare const Billboard: ({ image, className, color, iconName, message, primaryAction, secondaryAction, style, title, }: BillboardProps) => import("react/jsx-runtime").JSX.Element;
|
|
57
60
|
export default Billboard;
|
package/lib/Button/Button.d.ts
CHANGED
|
@@ -24,5 +24,5 @@ export type ButtonProps = BaseButtonProps & {
|
|
|
24
24
|
/**
|
|
25
25
|
Defaults to rendering as a `<button type="button" />`, but will render as a link if an href prop is provided.
|
|
26
26
|
*/
|
|
27
|
-
export declare const Button: ({ children, color, design, href, icon, loading, size, type, ...props }: ButtonProps) => JSX.Element;
|
|
27
|
+
export declare const Button: ({ children, color, design, href, icon, loading, size, type, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
28
|
export default Button;
|
|
@@ -21,5 +21,5 @@ export type InputTextProps = HTMLInputProps & {
|
|
|
21
21
|
* - InputText is a controlled component: You must provide an `onChange` handler to update the value.
|
|
22
22
|
* - Use title case for the required `label` (e.g., "Project Name", not "Project name").
|
|
23
23
|
*/
|
|
24
|
-
export declare function InputText({ className, contentBefore, contentAfter, error, hideLabel, id, label, message, name, inputSize, style, success, testId, type, ...props }: InputTextProps): JSX.Element;
|
|
24
|
+
export declare function InputText({ className, contentBefore, contentAfter, error, hideLabel, id, label, message, name, inputSize, style, success, testId, type, ...props }: InputTextProps): import("react/jsx-runtime").JSX.Element;
|
|
25
25
|
export default InputText;
|
|
@@ -7,5 +7,5 @@ export type ScreenReaderContentProps = {
|
|
|
7
7
|
|
|
8
8
|
For example, is being able to see an icon important for the user to understand context or functionality? If so, always add explanatory text for screen readers, wrapped inside a `<ScreenReaderContent />` component.
|
|
9
9
|
*/
|
|
10
|
-
export declare const ScreenReaderContent: ({ children }: ScreenReaderContentProps) => JSX.Element;
|
|
10
|
+
export declare const ScreenReaderContent: ({ children }: ScreenReaderContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default ScreenReaderContent;
|
package/lib/Spinner/Spinner.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ export type SpinnerProps = {
|
|
|
10
10
|
trackColor?: string;
|
|
11
11
|
};
|
|
12
12
|
/** Use Spinner when something's happening and the user needs to wait. Versatile and customizable. */
|
|
13
|
-
export declare const Spinner: ({ accessibilityLabel, testId, className, label, layout, meterColor, size, style, trackColor, }: SpinnerProps) => JSX.Element;
|
|
13
|
+
export declare const Spinner: ({ accessibilityLabel, testId, className, label, layout, meterColor, size, style, trackColor, }: SpinnerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export default Spinner;
|
package/lib/Text/Text.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ type TextProps = {
|
|
|
20
20
|
- Margins reset to 0 by default (we don't do a lot of long-form text in the app itself). Add margin when you need it via the `ccMargin` prop.
|
|
21
21
|
- Can be extended as a styled-component.
|
|
22
22
|
*/
|
|
23
|
-
export declare function Text({ as, children, color, size, family, ccMargin, weight, display, className, style, ...props }: TextProps): JSX.Element;
|
|
23
|
+
export declare function Text({ as, children, color, size, family, ccMargin, weight, display, className, style, ...props }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
24
24
|
export default Text;
|
|
@@ -11,5 +11,5 @@ export type FieldProps = {
|
|
|
11
11
|
/**
|
|
12
12
|
* Field is used inside forms components like InputText as a DRY way of rendering a message below the input / label UI.
|
|
13
13
|
* */
|
|
14
|
-
export declare function Field({ children, className, disabled, id, message, status, style, }: FieldProps): JSX.Element;
|
|
14
|
+
export declare function Field({ children, className, disabled, id, message, status, style, }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
15
|
export default Field;
|