@manakind/ui-core 0.31.0 → 0.32.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.
@@ -5,7 +5,16 @@
5
5
  align-items: center;
6
6
  justify-content: center;
7
7
  gap: var(--ds-empty-state-gap);
8
+ box-sizing: border-box;
8
9
  padding-block: var(--ds-empty-state-padding-block);
10
+ padding-inline: var(--ds-empty-state-padding-inline);
11
+ /*
12
+ * The box is the layout kit's dashed surface, drawn at the product's
13
+ * width: zero leaves an empty state boxless, as Manuia and ShipTight
14
+ * draw it.
15
+ */
16
+ border: var(--ds-empty-state-border-width) dashed var(--ds-layout-surface-border);
17
+ border-radius: var(--ds-layout-surface-radius);
9
18
  text-align: center;
10
19
  color: var(--ds-empty-state-text);
11
20
  overflow-wrap: anywhere;
@@ -19,8 +19,9 @@ export interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
19
19
  *
20
20
  * A title, an optional description and an optional action, centred in a
21
21
  * block of inset so the emptiness reads as intended rather than as a failed
22
- * render. Styled by the `--ds-empty-state-*` keys; the type comes from the
23
- * text contract.
22
+ * render. Styled by the `--ds-empty-state-*` keys, which also set whether it
23
+ * sits in a dashed box (the office) or on its inset alone; the type comes from
24
+ * the text contract.
24
25
  */
25
26
  export declare function EmptyState({ title, description, icon, className, children, ...props }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
26
27
  //# sourceMappingURL=empty-state.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAC3E,8DAA8D;IAC9D,KAAK,EAAE,SAAS,CAAC;IACjB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CASjB"}
1
+ {"version":3,"file":"empty-state.d.ts","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,mBAAmB,CAAC;AAE3B,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAErD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IAC3E,8DAA8D;IAC9D,KAAK,EAAE,SAAS,CAAC;IACjB,uEAAuE;IACvE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kEAAkE;IAClE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,2CASjB"}
@@ -7,8 +7,9 @@ import { Icon } from '../icon/icon';
7
7
  *
8
8
  * A title, an optional description and an optional action, centred in a
9
9
  * block of inset so the emptiness reads as intended rather than as a failed
10
- * render. Styled by the `--ds-empty-state-*` keys; the type comes from the
11
- * text contract.
10
+ * render. Styled by the `--ds-empty-state-*` keys, which also set whether it
11
+ * sits in a dashed box (the office) or on its inset alone; the type comes from
12
+ * the text contract.
12
13
  */
13
14
  export function EmptyState({ title, description, icon, className, children, ...props }) {
14
15
  return (_jsxs("div", { className: cx('ds-empty-state', className), ...props, children: [icon ? _jsx(Icon, { source: icon, size: "lg", tone: "muted", decorative: true }) : null, _jsx("p", { className: "ds-empty-state__title", children: title }), description ? _jsx("p", { className: "ds-empty-state__description", children: description }) : null, children ? _jsx("div", { className: "ds-empty-state__actions", children: children }) : null] }));
@@ -1 +1 @@
1
- {"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":";AACA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAgBrD;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,aACvD,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU,SAAG,CAAC,CAAC,CAAC,IAAI,EACvE,YAAG,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAK,EAC/C,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,6BAA6B,YAAE,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,EACjF,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IACxE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport './empty-state.css';\nimport { cx } from '../cx';\nimport { Icon, type IconSource } from '../icon/icon';\n\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n /** The one line that says what is missing: \"No goals yet\". */\n title: ReactNode;\n /** What to do about it, or why it is empty. Muted, under the title. */\n description?: ReactNode;\n /**\n * A glyph above the title, decorative: the title says the same thing. An\n * `IconSource`, since `ui-core` ships no icons of its own.\n */\n icon?: IconSource;\n /** The way out, typically one button, rendered under the text. */\n children?: ReactNode;\n}\n\n/**\n * The centred column a region shows when it has nothing to list.\n *\n * A title, an optional description and an optional action, centred in a\n * block of inset so the emptiness reads as intended rather than as a failed\n * render. Styled by the `--ds-empty-state-*` keys; the type comes from the\n * text contract.\n */\nexport function EmptyState({\n title,\n description,\n icon,\n className,\n children,\n ...props\n}: EmptyStateProps) {\n return (\n <div className={cx('ds-empty-state', className)} {...props}>\n {icon ? <Icon source={icon} size=\"lg\" tone=\"muted\" decorative /> : null}\n <p className=\"ds-empty-state__title\">{title}</p>\n {description ? <p className=\"ds-empty-state__description\">{description}</p> : null}\n {children ? <div className=\"ds-empty-state__actions\">{children}</div> : null}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"empty-state.js","sourceRoot":"","sources":["../../src/empty-state/empty-state.tsx"],"names":[],"mappings":";AACA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAmB,MAAM,cAAc,CAAC;AAgBrD;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACQ;IAChB,OAAO,CACL,eAAK,SAAS,EAAE,EAAE,CAAC,gBAAgB,EAAE,SAAS,CAAC,KAAM,KAAK,aACvD,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,UAAU,SAAG,CAAC,CAAC,CAAC,IAAI,EACvE,YAAG,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAK,EAC/C,WAAW,CAAC,CAAC,CAAC,YAAG,SAAS,EAAC,6BAA6B,YAAE,WAAW,GAAK,CAAC,CAAC,CAAC,IAAI,EACjF,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,yBAAyB,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IACxE,CACP,CAAC;AACJ,CAAC","sourcesContent":["import type { ComponentProps, ReactNode } from 'react';\nimport './empty-state.css';\nimport { cx } from '../cx';\nimport { Icon, type IconSource } from '../icon/icon';\n\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n /** The one line that says what is missing: \"No goals yet\". */\n title: ReactNode;\n /** What to do about it, or why it is empty. Muted, under the title. */\n description?: ReactNode;\n /**\n * A glyph above the title, decorative: the title says the same thing. An\n * `IconSource`, since `ui-core` ships no icons of its own.\n */\n icon?: IconSource;\n /** The way out, typically one button, rendered under the text. */\n children?: ReactNode;\n}\n\n/**\n * The centred column a region shows when it has nothing to list.\n *\n * A title, an optional description and an optional action, centred in a\n * block of inset so the emptiness reads as intended rather than as a failed\n * render. Styled by the `--ds-empty-state-*` keys, which also set whether it\n * sits in a dashed box (the office) or on its inset alone; the type comes from\n * the text contract.\n */\nexport function EmptyState({\n title,\n description,\n icon,\n className,\n children,\n ...props\n}: EmptyStateProps) {\n return (\n <div className={cx('ds-empty-state', className)} {...props}>\n {icon ? <Icon source={icon} size=\"lg\" tone=\"muted\" decorative /> : null}\n <p className=\"ds-empty-state__title\">{title}</p>\n {description ? <p className=\"ds-empty-state__description\">{description}</p> : null}\n {children ? <div className=\"ds-empty-state__actions\">{children}</div> : null}\n </div>\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manakind/ui-core",
3
- "version": "0.31.0",
3
+ "version": "0.32.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -396,7 +396,7 @@
396
396
  },
397
397
  "devDependencies": {
398
398
  "@manakind/ds-config": "*",
399
- "@manakind/manuia-tokens": "0.29.0",
399
+ "@manakind/manuia-tokens": "0.30.0",
400
400
  "@testing-library/jest-dom": "^6.9.1",
401
401
  "@testing-library/react": "^16.3.2",
402
402
  "@testing-library/user-event": "^14.6.1",