@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/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, b0 as c, as as p, at as b, au as l, av as d, aw as g, ax as m, ay as S, b1 as I, az as k, aA as T, ai as D, b2 as R, b3 as h, b4 as y, aB as C, al as H, am as A, aC as P, aD as f, bj as B, bk as F, bm as O, bo as v, bq as L, bu as N, bw as w, bB as G, bE as V, bG as x, bN as M, bP as E, bR as z, bT as J, bV as W, bZ as j, b_ as U, aE as Y, aF as Z, bl as $, bn as q, bp as K, br as Q, bt as X, bv as _, bx as aa, by as ea, bz as sa, bA as ta, bC as oa, bD as ra, bF as na, bH as ua, bO as ia, bQ as ca, bS as pa, bU as ba, bW as la, bX as da, bY as ga, b5 as ma, b6 as Sa, b7 as Ia, b8 as ka, ao as Ta, b9 as Da, ba as Ra, bb as ha, aG as ya, bc as Ca, bd as Ha, aH as Aa, aI as Pa, aJ as fa, aK as Ba, be as Fa, c1 as Oa, c2 as va, c3 as La, c4 as Na, c5 as wa, c6 as Ga, c7 as Va, c8 as xa, c9 as Ma, bf 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, bg as qa, aY as Ka, aU as Qa, bh as Xa, aZ as _a, a_ as ae, aV as ee, a$ as se, aW as te, bi as oe, ap as re, aX as ne, a3 as ue, a2 as ie, bI as ce, bs as pe, W as be, Y as le, a4 as de, a5 as ge, a6 as me, cb as Se, cc as Ie, bJ as ke, Z as Te, $ as De, cd as Re, ce as he, cf as ye, cg as Ce, ch as He, ci as Ae, a7 as Pe, a8 as fe, cj as Be, ck as Fe, cl as Oe, a9 as ve, aa as Le, cm as Ne, cn as we, co as Ge, S as Ve, ab as xe, ac as Me, U as Ee, bK as ze, bL as Je, bM as We, T as je, V as Ue, b$ as Ye, a0 as Ze, a1 as $e, ad as qe, aj as Ke, ak as Qe, ae as Xe, af as _e, ag as as, ah as es, ca as ss, an as ts, aq as os, c0 as rs, aP as ns } from "./main-9651b7ba.js";
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 Steps,
104
- qa as SwitchMode,
105
- Ka as Tab,
106
- Qa as Table,
107
- Xa as TableData,
108
- _a as Tabs,
109
- ae as Tag,
110
- ee as Td,
111
- se as Text,
112
- te as Th,
113
- oe as Timeline,
114
- re as TokenProvider,
115
- ne as Tr,
116
- ue as computeFullname,
117
- ie as downloadJsonAsFile,
118
- ce as flatSelectValues,
119
- pe as formatCentsToCurrency,
120
- be as formatDate,
121
- le as formatDateWithPredicate,
122
- de as formatDisplayName,
123
- ge as formatResourceName,
124
- me as getAvatarSrcFromRate,
125
- Se as getCustomerDisplayStatus,
126
- Ie as getCustomerStatusName,
127
- ke as getDefaultValueFromFlatten,
128
- Te as getIsoDateAtDayEdge,
129
- De as getIsoDateAtDaysBefore,
130
- Re as getOrderDisplayStatus,
131
- he as getOrderFulfillmentStatusName,
132
- ye as getOrderPaymentStatusName,
133
- Ce as getOrderStatusName,
134
- He as getOrderTransactionPastTense,
135
- Ae as getOrderTriggerAttributeName,
136
- Pe as getParcelTrackingDetail,
137
- fe as getParcelTrackingDetails,
138
- Be as getReturnDisplayStatus,
139
- Fe as getReturnStatusName,
140
- Oe as getShipmentDisplayStatus,
141
- ve as getShipmentRate,
142
- Le as getShipmentRates,
143
- Ne as getShipmentStatusName,
144
- we as getStockTransferDisplayStatus,
145
- Ge as getStockTransferStatusName,
146
- Ve as goBack,
147
- xe as hasBeenPurchased,
148
- Me as hasSingleTracking,
149
- Ee as isAttachmentValidNote,
150
- ze as isGroupedSelectValues,
151
- Je as isMultiValueSelected,
152
- We as isSingleValueSelected,
153
- je as navigateTo,
154
- Ue as referenceOrigins,
155
- Ye as setApiFormErrors,
156
- Ze as sortAndGroupByDate,
157
- $e as timeSeparator,
158
- qe as useClickAway,
159
- Ke as useCoreApi,
160
- Qe as useCoreSdkProvider,
161
- Xe as useDelayShow,
162
- _e as useIsChanged,
163
- as as useOnBlurFromContainer,
164
- es as useOverlay,
165
- ss as useResourceFilters,
166
- ts as useTagManager,
167
- os as useTokenProvider,
168
- rs as useValidationFeedback,
169
- ns as withSkeletonTemplate
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 IconProps } from './Icon';
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?: IconProps['name'];
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 IconProps } from './Icon';
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?: IconProps['name'];
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 React.HTMLAttributes<HTMLDivElement> {
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 IconProps } from './Icon';
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?: IconProps['name'];
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 {};
@@ -3,7 +3,7 @@ import { type FC } from 'react';
3
3
  type Props = Pick<FlexRowProps, 'children'> & {
4
4
  /**
5
5
  * Icon component
6
- * Example: `<Icon>` or `<RadialProgress>` or `<Avatar>`
6
+ * Example: `<StatusIcon>` or `<RadialProgress>` or `<Avatar>`
7
7
  */
8
8
  icon?: JSX.Element;
9
9
  };
@@ -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: `<Icon>` or `<RadialProgress>` or `<Avatar>`
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" | "x";
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
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercelayer/app-elements",
3
- "version": "1.8.2",
3
+ "version": "1.8.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "files": [