@webority/ui-react 0.63.1 → 0.64.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import r,{ILLUSTRATION_NAMES as i}from"../lib/emptyIllustration.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`md`,`sm`];function c({icon:c,illustration:l,iconSize:u=24,size:d=`md`,title:f,text:p,action:m,className:h=``,style:g,..._}){t(`AppEmptyState`,_),e(`AppEmptyState`,`size`,d,s),e(`AppEmptyState`,`illustration`,l,i);let v=l
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import r,{ILLUSTRATION_NAMES as i}from"../lib/emptyIllustration.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";var s=[`md`,`sm`];function c({icon:c,illustration:l,iconSize:u=24,size:d=`md`,title:f,text:p,action:m,className:h=``,style:g,..._}){t(`AppEmptyState`,_),e(`AppEmptyState`,`size`,d,s),typeof l==`string`&&e(`AppEmptyState`,`illustration`,l,i);let v=typeof l==`string`&&i.includes(l),y=l!=null&&typeof l!=`string`?l:null;return o(`div`,{className:[`empty-state`,d===`sm`?`empty-state-sm`:``,h].filter(Boolean).join(` `),style:g,..._,children:[v?a(r,{name:l,className:`wui-empty-illustration`}):null,y?a(`span`,{className:`wui-empty-illustration wui-empty-illustration-custom`,"aria-hidden":`true`,children:y}):null,c&&!v&&!y?a(`div`,{className:`empty-state-icon`,children:n(c,{size:u})}):null,f!=null&&a(`div`,{className:`empty-state-title`,children:f}),p!=null&&a(`div`,{className:`empty-state-message`,children:p}),m&&a(`div`,{className:`empty-state-action`,children:m})]})}export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import r,{ILLUSTRATION_NAMES as i}from"../lib/emptyIllustration.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({icon:s,illustration:c,title:l,text:u,action:d,...f}){t(`AppTableEmptyState`,f),e(`AppTableEmptyState`,`illustration`,c,i);let p=c
|
|
1
|
+
import e from"./warnInvalidValue.js";import t from"./warnUnknownProps.js";import n from"./renderIconProp.js";import r,{ILLUSTRATION_NAMES as i}from"../lib/emptyIllustration.js";import{jsx as a,jsxs as o}from"react/jsx-runtime";function s({icon:s,illustration:c,title:l,text:u,action:d,...f}){t(`AppTableEmptyState`,f),typeof c==`string`&&e(`AppTableEmptyState`,`illustration`,c,i);let p=typeof c==`string`&&i.includes(c),m=c!=null&&typeof c!=`string`?c:null;return o(`div`,{className:`tbl-empty`,...f,children:[p?a(r,{name:c,className:`wui-empty-illustration`}):m?a(`span`,{className:`wui-empty-illustration wui-empty-illustration-custom`,"aria-hidden":`true`,children:m}):a(`span`,{className:`tbl-empty-icon`,children:n(s,{size:24})}),a(`div`,{className:`tbl-empty-title`,children:l}),u&&a(`div`,{className:`tbl-empty-text`,children:u}),d&&a(`div`,{className:`tbl-empty-action`,children:d})]})}export{s as default};
|
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* @param {object} props
|
|
13
13
|
* @param {string|import('react').ReactNode} props.icon Semantic icon name for the bubble, or a custom node
|
|
14
|
-
* @param {"no-results"|"no-data"|"empty-inbox"|"no-notifications"|"no-files"|"no-access"|"offline"|"error"
|
|
15
|
-
* Decorative drawing by name, in theme colours. Replaces the icon bubble when set.
|
|
14
|
+
* @param {string|import('react').ReactNode} [props.illustration] A named drawing ("no-results" | "no-data" | "empty-inbox" | "no-notifications" | "no-files" | "no-access" | "offline" | "error"), or your own decorative SVG node drawn unboxed at up to 120 px. Replaces the icon bubble when set.
|
|
16
15
|
* @param {number} [props.iconSize=24]
|
|
17
16
|
* @param {"md"|"sm"} [props.size="md"]
|
|
18
17
|
* @param {import('react').ReactNode} props.title
|
|
@@ -23,7 +22,7 @@
|
|
|
23
22
|
*/
|
|
24
23
|
export default function AppEmptyState({ icon, illustration, iconSize, size, title, text, action, className, style, ...rest }: {
|
|
25
24
|
icon: string | import('react').ReactNode;
|
|
26
|
-
illustration?:
|
|
25
|
+
illustration?: string | import('react').ReactNode;
|
|
27
26
|
iconSize?: number;
|
|
28
27
|
size?: "md" | "sm";
|
|
29
28
|
title: import('react').ReactNode;
|
|
@@ -3,15 +3,14 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @param {object} props
|
|
5
5
|
* @param {string|import('react').ReactNode} props.icon Icon name, or a custom node.
|
|
6
|
-
* @param {"no-results"|"no-data"|"empty-inbox"|"no-notifications"|"no-files"|"no-access"|"offline"|"error"
|
|
7
|
-
* Decorative drawing by name, in theme colours. Replaces the icon bubble when set.
|
|
6
|
+
* @param {string|import('react').ReactNode} [props.illustration] A named drawing ("no-results" | "no-data" | "empty-inbox" | "no-notifications" | "no-files" | "no-access" | "offline" | "error"), or your own decorative SVG node drawn unboxed at up to 120 px. Replaces the icon bubble when set.
|
|
8
7
|
* @param {import('react').ReactNode} props.title
|
|
9
8
|
* @param {import('react').ReactNode} [props.text]
|
|
10
9
|
* @param {import('react').ReactNode} [props.action]
|
|
11
10
|
*/
|
|
12
11
|
export default function AppTableEmptyState({ icon, illustration, title, text, action, ...rest }: {
|
|
13
12
|
icon: string | import('react').ReactNode;
|
|
14
|
-
illustration?:
|
|
13
|
+
illustration?: string | import('react').ReactNode;
|
|
15
14
|
title: import('react').ReactNode;
|
|
16
15
|
text?: import('react').ReactNode;
|
|
17
16
|
action?: import('react').ReactNode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.64.0",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@webority/theme": "0.
|
|
31
|
-
"@webority/ui-elements": "0.
|
|
30
|
+
"@webority/theme": "0.64.0",
|
|
31
|
+
"@webority/ui-elements": "0.64.0"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@webority/analytics": "^0.23.0",
|