@commercelayer/app-elements 1.8.2 → 1.8.3
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/{InputDateComponent-bd691997.js → InputDateComponent-e17b215b.js} +1 -1
- package/dist/dictionaries/orders.d.ts +3 -3
- package/dist/dictionaries/returns.d.ts +3 -3
- package/dist/dictionaries/shipments.d.ts +3 -3
- package/dist/dictionaries/stockTransfers.d.ts +3 -3
- package/dist/dictionaries/types.d.ts +3 -3
- package/dist/{main-9651b7ba.js → main-33ca6087.js} +6231 -6185
- package/dist/main.d.ts +1 -0
- package/dist/main.js +69 -68
- package/dist/ui/atoms/Badge/Badge.d.ts +2 -0
- package/dist/ui/atoms/ButtonFilter.d.ts +2 -2
- package/dist/ui/atoms/EmptyState.d.ts +2 -2
- package/dist/ui/atoms/Icon/Icon.d.ts +2 -9
- package/dist/ui/atoms/Icon/icons.d.ts +2 -0
- package/dist/ui/atoms/RadialProgress.d.ts +2 -2
- package/dist/ui/atoms/StatusIcon.d.ts +17 -0
- package/dist/ui/atoms/StatusIcon.test.d.ts +1 -0
- package/dist/ui/atoms/Tag.d.ts +1 -1
- package/dist/ui/composite/ListItem.d.ts +1 -1
- package/dist/ui/resources/ResourceListItem/common.d.ts +1 -1
- package/package.json +1 -1
package/dist/main.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ export { SkeletonTemplate, withSkeletonTemplate } from './ui/atoms/SkeletonTempl
|
|
|
40
40
|
export { Spacer, type SpacerProps } from './ui/atoms/Spacer';
|
|
41
41
|
export { Stack, type StackProps } from './ui/atoms/Stack';
|
|
42
42
|
export { StatusDot, type StatusDotProps } from './ui/atoms/StatusDot';
|
|
43
|
+
export { StatusIcon, type StatusIconProps } from './ui/atoms/StatusIcon';
|
|
43
44
|
export { Steps, type StepsProps } from './ui/atoms/Steps';
|
|
44
45
|
export { Table, Td, Th, Tr, type TableProps, type TdProps, type ThProps, type TrProps } from './ui/atoms/Table';
|
|
45
46
|
export { Tab, Tabs, type TabProps, type TabsProps } from './ui/atoms/Tabs';
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ar as i,
|
|
1
|
+
import { ar as i, b1 as c, as as p, at as b, au as l, av as d, aw as g, ax as m, ay as S, b2 as I, az as k, aA as T, ai as D, b3 as R, b4 as h, b5 as y, aB as C, al as H, am as A, aC as P, aD as f, bk as B, bl as F, bn as O, bp as v, br as L, bv as N, bx as w, bC as G, bF as V, bH as x, bO as M, bQ as E, bS as z, bU as J, bW as W, b_ as j, b$ as U, aE as Y, aF as Z, bm as $, bo as q, bq as K, bs as Q, bu as X, bw as _, by as aa, bz as ea, bA as sa, bB as ta, bD as oa, bE as ra, bG as na, bI as ua, bP as ia, bR as ca, bT as pa, bV as ba, bX as la, bY as da, bZ as ga, b6 as ma, b7 as Sa, b8 as Ia, b9 as ka, ao as Ta, ba as Da, bb as Ra, bc as ha, aG as ya, bd as Ca, be as Ha, aH as Aa, aI as Pa, aJ as fa, aK as Ba, bf as Fa, c2 as Oa, c3 as va, c4 as La, c5 as Na, c6 as wa, c7 as Ga, c8 as Va, c9 as xa, ca as Ma, bg as Ea, aL as za, aM as Ja, aN as Wa, aO as ja, aQ as Ua, aR as Ya, aS as Za, aT as $a, aU as qa, bh as Ka, aZ as Qa, aV as Xa, bi as _a, a_ as ae, a$ as ee, aW as se, b0 as te, aX as oe, bj as re, ap as ne, aY as ue, a3 as ie, a2 as ce, bJ as pe, bt as be, W as le, Y as de, a4 as ge, a5 as me, a6 as Se, cc as Ie, cd as ke, bK as Te, Z as De, $ as Re, ce as he, cf as ye, cg as Ce, ch as He, ci as Ae, cj as Pe, a7 as fe, a8 as Be, ck as Fe, cl as Oe, cm as ve, a9 as Le, aa as Ne, cn as we, co as Ge, cp as Ve, S as xe, ab as Me, ac as Ee, U as ze, bL as Je, bM as We, bN as je, T as Ue, V as Ye, c0 as Ze, a0 as $e, a1 as qe, ad as Ke, aj as Qe, ak as Xe, ae as _e, af as as, ag as es, ah as ss, cb as ts, an as os, aq as rs, c1 as ns, aP as us } from "./main-33ca6087.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
import "@commercelayer/sdk";
|
|
@@ -100,71 +100,72 @@ export {
|
|
|
100
100
|
Ua as Spacer,
|
|
101
101
|
Ya as Stack,
|
|
102
102
|
Za as StatusDot,
|
|
103
|
-
$a as
|
|
104
|
-
qa as
|
|
105
|
-
Ka as
|
|
106
|
-
Qa as
|
|
107
|
-
Xa as
|
|
108
|
-
_a as
|
|
109
|
-
ae as
|
|
110
|
-
ee as
|
|
111
|
-
se as
|
|
112
|
-
te as
|
|
113
|
-
oe as
|
|
114
|
-
re as
|
|
115
|
-
ne as
|
|
116
|
-
ue as
|
|
117
|
-
ie as
|
|
118
|
-
ce as
|
|
119
|
-
pe as
|
|
120
|
-
be as
|
|
121
|
-
le as
|
|
122
|
-
de as
|
|
123
|
-
ge as
|
|
124
|
-
me as
|
|
125
|
-
Se as
|
|
126
|
-
Ie as
|
|
127
|
-
ke as
|
|
128
|
-
Te as
|
|
129
|
-
De as
|
|
130
|
-
Re as
|
|
131
|
-
he as
|
|
132
|
-
ye as
|
|
133
|
-
Ce as
|
|
134
|
-
He as
|
|
135
|
-
Ae as
|
|
136
|
-
Pe as
|
|
137
|
-
fe as
|
|
138
|
-
Be as
|
|
139
|
-
Fe as
|
|
140
|
-
Oe as
|
|
141
|
-
ve as
|
|
142
|
-
Le as
|
|
143
|
-
Ne as
|
|
144
|
-
we as
|
|
145
|
-
Ge as
|
|
146
|
-
Ve as
|
|
147
|
-
xe as
|
|
148
|
-
Me as
|
|
149
|
-
Ee as
|
|
150
|
-
ze as
|
|
151
|
-
Je as
|
|
152
|
-
We as
|
|
153
|
-
je as
|
|
154
|
-
Ue as
|
|
155
|
-
Ye as
|
|
156
|
-
Ze as
|
|
157
|
-
$e as
|
|
158
|
-
qe as
|
|
159
|
-
Ke as
|
|
160
|
-
Qe as
|
|
161
|
-
Xe as
|
|
162
|
-
_e as
|
|
163
|
-
as as
|
|
164
|
-
es as
|
|
165
|
-
ss as
|
|
166
|
-
ts as
|
|
167
|
-
os as
|
|
168
|
-
rs as
|
|
169
|
-
ns as
|
|
103
|
+
$a as StatusIcon,
|
|
104
|
+
qa as Steps,
|
|
105
|
+
Ka as SwitchMode,
|
|
106
|
+
Qa as Tab,
|
|
107
|
+
Xa as Table,
|
|
108
|
+
_a as TableData,
|
|
109
|
+
ae as Tabs,
|
|
110
|
+
ee as Tag,
|
|
111
|
+
se as Td,
|
|
112
|
+
te as Text,
|
|
113
|
+
oe as Th,
|
|
114
|
+
re as Timeline,
|
|
115
|
+
ne as TokenProvider,
|
|
116
|
+
ue as Tr,
|
|
117
|
+
ie as computeFullname,
|
|
118
|
+
ce as downloadJsonAsFile,
|
|
119
|
+
pe as flatSelectValues,
|
|
120
|
+
be as formatCentsToCurrency,
|
|
121
|
+
le as formatDate,
|
|
122
|
+
de as formatDateWithPredicate,
|
|
123
|
+
ge as formatDisplayName,
|
|
124
|
+
me as formatResourceName,
|
|
125
|
+
Se as getAvatarSrcFromRate,
|
|
126
|
+
Ie as getCustomerDisplayStatus,
|
|
127
|
+
ke as getCustomerStatusName,
|
|
128
|
+
Te as getDefaultValueFromFlatten,
|
|
129
|
+
De as getIsoDateAtDayEdge,
|
|
130
|
+
Re as getIsoDateAtDaysBefore,
|
|
131
|
+
he as getOrderDisplayStatus,
|
|
132
|
+
ye as getOrderFulfillmentStatusName,
|
|
133
|
+
Ce as getOrderPaymentStatusName,
|
|
134
|
+
He as getOrderStatusName,
|
|
135
|
+
Ae as getOrderTransactionPastTense,
|
|
136
|
+
Pe as getOrderTriggerAttributeName,
|
|
137
|
+
fe as getParcelTrackingDetail,
|
|
138
|
+
Be as getParcelTrackingDetails,
|
|
139
|
+
Fe as getReturnDisplayStatus,
|
|
140
|
+
Oe as getReturnStatusName,
|
|
141
|
+
ve as getShipmentDisplayStatus,
|
|
142
|
+
Le as getShipmentRate,
|
|
143
|
+
Ne as getShipmentRates,
|
|
144
|
+
we as getShipmentStatusName,
|
|
145
|
+
Ge as getStockTransferDisplayStatus,
|
|
146
|
+
Ve as getStockTransferStatusName,
|
|
147
|
+
xe as goBack,
|
|
148
|
+
Me as hasBeenPurchased,
|
|
149
|
+
Ee as hasSingleTracking,
|
|
150
|
+
ze as isAttachmentValidNote,
|
|
151
|
+
Je as isGroupedSelectValues,
|
|
152
|
+
We as isMultiValueSelected,
|
|
153
|
+
je as isSingleValueSelected,
|
|
154
|
+
Ue as navigateTo,
|
|
155
|
+
Ye as referenceOrigins,
|
|
156
|
+
Ze as setApiFormErrors,
|
|
157
|
+
$e as sortAndGroupByDate,
|
|
158
|
+
qe as timeSeparator,
|
|
159
|
+
Ke as useClickAway,
|
|
160
|
+
Qe as useCoreApi,
|
|
161
|
+
Xe as useCoreSdkProvider,
|
|
162
|
+
_e as useDelayShow,
|
|
163
|
+
as as useIsChanged,
|
|
164
|
+
es as useOnBlurFromContainer,
|
|
165
|
+
ss as useOverlay,
|
|
166
|
+
ts as useResourceFilters,
|
|
167
|
+
os as useTagManager,
|
|
168
|
+
rs as useTokenProvider,
|
|
169
|
+
ns as useValidationFeedback,
|
|
170
|
+
us as withSkeletonTemplate
|
|
170
171
|
};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import { type IconProps } from '../../atoms/Icon';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { variantCss } from './badgeVariants';
|
|
3
4
|
export interface BadgeProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
5
|
/** Render a different variant. */
|
|
5
6
|
variant: keyof typeof variantCss;
|
|
7
|
+
icon?: IconProps['name'];
|
|
6
8
|
children: React.ReactNode;
|
|
7
9
|
}
|
|
8
10
|
/** Badges are used to highlight an item's status for quick recognition. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { type
|
|
2
|
+
import { type StatusIconProps } from './StatusIcon';
|
|
3
3
|
export interface ButtonFilterProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
onClick?: () => void;
|
|
5
5
|
onRemoveRequest?: () => void;
|
|
6
|
-
icon?:
|
|
6
|
+
icon?: StatusIconProps['name'];
|
|
7
7
|
label: string;
|
|
8
8
|
}
|
|
9
9
|
declare function ButtonFilter({ onClick, onRemoveRequest, label, icon, className, ...rest }: ButtonFilterProps): JSX.Element;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type StatusIconProps } from './StatusIcon';
|
|
3
3
|
export interface EmptyStateProps {
|
|
4
4
|
title: string;
|
|
5
5
|
description?: ReactNode;
|
|
6
6
|
action?: ReactNode;
|
|
7
7
|
className?: string;
|
|
8
|
-
icon?:
|
|
8
|
+
icon?: StatusIconProps['name'];
|
|
9
9
|
}
|
|
10
10
|
declare function EmptyState({ title, description, action, icon, className, ...rest }: EmptyStateProps): JSX.Element;
|
|
11
11
|
declare namespace EmptyState {
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type IconProps as PhosphorIconProps } from '@phosphor-icons/react';
|
|
2
3
|
import { iconMapping } from './icons';
|
|
3
|
-
export interface IconProps extends
|
|
4
|
+
export interface IconProps extends PhosphorIconProps {
|
|
4
5
|
/**
|
|
5
6
|
* Name of the icon to display
|
|
6
7
|
*/
|
|
7
8
|
name: keyof typeof iconMapping;
|
|
8
|
-
/**
|
|
9
|
-
* Background color, `none` for no background
|
|
10
|
-
*/
|
|
11
|
-
background?: 'green' | 'orange' | 'red' | 'gray' | 'teal' | 'white' | 'black' | 'none';
|
|
12
|
-
/**
|
|
13
|
-
* padding around the icon can bne: 'none' | 'small' | 'large'
|
|
14
|
-
*/
|
|
15
|
-
gap?: 'none' | 'small' | 'large';
|
|
16
9
|
}
|
|
17
10
|
/** `app-elements` provides a subset of [Phosphor Icons](https://phosphoricons.com/) out-of-the-box. */
|
|
18
11
|
export declare const Icon: React.FC<IconProps>;
|
|
@@ -25,6 +25,7 @@ export declare const iconMapping: {
|
|
|
25
25
|
readonly hourglass: phosphor.Icon;
|
|
26
26
|
readonly magnifyingGlass: phosphor.Icon;
|
|
27
27
|
readonly minus: phosphor.Icon;
|
|
28
|
+
readonly minusCircle: phosphor.Icon;
|
|
28
29
|
readonly package: phosphor.Icon;
|
|
29
30
|
readonly pencilSimple: phosphor.Icon;
|
|
30
31
|
readonly printer: phosphor.Icon;
|
|
@@ -39,4 +40,5 @@ export declare const iconMapping: {
|
|
|
39
40
|
readonly warning: phosphor.Icon;
|
|
40
41
|
readonly warningCircle: phosphor.Icon;
|
|
41
42
|
readonly x: phosphor.Icon;
|
|
43
|
+
readonly xCircle: phosphor.Icon;
|
|
42
44
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SVGAttributes } from 'react';
|
|
2
|
-
import { type
|
|
2
|
+
import { type StatusIconProps } from './StatusIcon';
|
|
3
3
|
export interface RadialProgressProps extends SVGAttributes<SVGElement> {
|
|
4
4
|
/**
|
|
5
5
|
* Progress percentage express as number from 0 to 100.
|
|
@@ -15,7 +15,7 @@ export interface RadialProgressProps extends SVGAttributes<SVGElement> {
|
|
|
15
15
|
/**
|
|
16
16
|
* Optional icon to be rendered in the center of the circle
|
|
17
17
|
*/
|
|
18
|
-
icon?:
|
|
18
|
+
icon?: StatusIconProps['name'];
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Used to render a radial progress with a pending and a progress state. It also accepts an optional icon to be rendered in the center of the circle.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { type iconMapping } from './Icon/icons';
|
|
3
|
+
export interface StatusIconProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Name of the icon to display
|
|
6
|
+
*/
|
|
7
|
+
name: keyof typeof iconMapping;
|
|
8
|
+
/**
|
|
9
|
+
* Background color, `none` for no background
|
|
10
|
+
*/
|
|
11
|
+
background?: 'green' | 'orange' | 'red' | 'gray' | 'teal' | 'white' | 'black' | 'none';
|
|
12
|
+
/**
|
|
13
|
+
* padding around the icon can bne: 'none' | 'small' | 'large'
|
|
14
|
+
*/
|
|
15
|
+
gap?: 'none' | 'small' | 'large';
|
|
16
|
+
}
|
|
17
|
+
export declare const StatusIcon: React.FC<StatusIconProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/ui/atoms/Tag.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { type FC } from 'react';
|
|
|
3
3
|
type Props = Pick<FlexRowProps, 'alignItems' | 'children'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Icon component
|
|
6
|
-
* Example: `<
|
|
6
|
+
* Example: `<StatusIcon>` or `<RadialProgress>` or `<Avatar>`
|
|
7
7
|
*/
|
|
8
8
|
icon?: JSX.Element;
|
|
9
9
|
/**
|
|
@@ -8,7 +8,7 @@ export declare const ListItemDescription: import('../../atoms/SkeletonTemplate')
|
|
|
8
8
|
}>;
|
|
9
9
|
export declare const ListItemIcon: import('../../atoms/SkeletonTemplate').SkeletonTemplateComponent<{
|
|
10
10
|
color: "none" | "green" | "orange" | "red" | "gray" | "teal" | "white" | "black" | undefined;
|
|
11
|
-
icon: "download" | "package" | "settings" | "arrowBendDownRight" | "apps" | "arrowCircleDown" | "arrowClockwise" | "arrowDown" | "arrowLeft" | "arrowsLeftRight" | "arrowUpRight" | "asterisk" | "caretRight" | "chatCircle" | "check" | "cloud" | "credentials" | "creditCard" | "eye" | "flag" | "funnel" | "github" | "google" | "home" | "hourglass" | "magnifyingGlass" | "minus" | "pencilSimple" | "printer" | "pulse" | "resources" | "shoppingBag" | "team" | "truck" | "upload" | "user" | "warning" | "warningCircle" | "
|
|
11
|
+
icon: "download" | "package" | "settings" | "x" | "arrowBendDownRight" | "apps" | "arrowCircleDown" | "arrowClockwise" | "arrowDown" | "arrowLeft" | "arrowsLeftRight" | "arrowUpRight" | "asterisk" | "caretRight" | "chatCircle" | "check" | "cloud" | "credentials" | "creditCard" | "eye" | "flag" | "funnel" | "github" | "google" | "home" | "hourglass" | "magnifyingGlass" | "minus" | "minusCircle" | "pencilSimple" | "printer" | "pulse" | "resources" | "shoppingBag" | "team" | "truck" | "upload" | "user" | "warning" | "warningCircle" | "xCircle";
|
|
12
12
|
delayMs?: number | undefined;
|
|
13
13
|
isLoading?: boolean | undefined;
|
|
14
14
|
}>;
|