@utrecht/component-library-react 1.0.0-alpha.26 → 1.0.0-alpha.27

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,5 +1,24 @@
1
1
  import { ButtonHTMLAttributes } from 'react';
2
2
  export interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
3
+ appearance?: string;
3
4
  busy?: boolean;
4
5
  }
5
6
  export declare const Button: import("react").ForwardRefExoticComponent<ButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
7
+ export declare const PrimaryActionButton: {
8
+ ({ ...args }: {
9
+ [x: string]: any;
10
+ }): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)> | null;
11
+ displayName: string;
12
+ };
13
+ export declare const SecondaryActionButton: {
14
+ ({ ...args }: {
15
+ [x: string]: any;
16
+ }): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)> | null;
17
+ displayName: string;
18
+ };
19
+ export declare const SubtleButton: {
20
+ ({ ...args }: {
21
+ [x: string]: any;
22
+ }): import("react").ReactElement<any, string | ((props: any) => import("react").ReactElement<any, any> | null) | (new (props: any) => import("react").Component<any, any, any>)> | null;
23
+ displayName: string;
24
+ };
@@ -14,12 +14,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  return (mod && mod.__esModule) ? mod : { "default": mod };
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.Button = void 0;
17
+ exports.SubtleButton = exports.SecondaryActionButton = exports.PrimaryActionButton = exports.Button = void 0;
18
18
  const jsx_runtime_1 = require("react/jsx-runtime");
19
19
  const clsx_1 = __importDefault(require("clsx"));
20
20
  const react_1 = require("react");
21
21
  exports.Button = react_1.forwardRef((_a, ref) => {
22
- var { busy, disabled, children, className, type } = _a, restProps = __rest(_a, ["busy", "disabled", "children", "className", "type"]);
23
- return (jsx_runtime_1.jsx("button", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-button', busy && 'utrecht-button--busy', disabled && 'utrecht-button--disabled', type === 'submit' && 'utrecht-button--submit', className), "aria-busy": busy || undefined, disabled: disabled, type: type || 'button' }, { children: children }), void 0));
22
+ var { appearance, busy, disabled, children, className, type } = _a, restProps = __rest(_a, ["appearance", "busy", "disabled", "children", "className", "type"]);
23
+ return (jsx_runtime_1.jsx("button", Object.assign({}, restProps, { ref: ref, className: clsx_1.default('utrecht-button', busy && 'utrecht-button--busy', disabled && 'utrecht-button--disabled', type === 'submit' && 'utrecht-button--submit', appearance === 'primary-action-button' && 'utrecht-button--primary-action', appearance === 'secondary-action-button' && 'utrecht-button--secondary-action', appearance === 'subtle-button' && 'utrecht-button--subtle', className), "aria-busy": busy || undefined, disabled: disabled, type: type || 'button' }, { children: children }), void 0));
24
24
  });
25
25
  exports.Button.displayName = 'utrecht-button';
26
+ const PrimaryActionButton = (_a) => {
27
+ var args = __rest(_a, []);
28
+ return exports.Button(Object.assign(Object.assign({}, args), { appearance: 'primary-action-button' }));
29
+ };
30
+ exports.PrimaryActionButton = PrimaryActionButton;
31
+ exports.PrimaryActionButton.displayName = 'utrecht-primary-action-button';
32
+ const SecondaryActionButton = (_a) => {
33
+ var args = __rest(_a, []);
34
+ return exports.Button(Object.assign(Object.assign({}, args), { appearance: 'secondary-action-button' }));
35
+ };
36
+ exports.SecondaryActionButton = SecondaryActionButton;
37
+ exports.SecondaryActionButton.displayName = 'utrecht-secondary-action-button';
38
+ const SubtleButton = (_a) => {
39
+ var args = __rest(_a, []);
40
+ return exports.Button(Object.assign(Object.assign({}, args), { appearance: 'subtle-button' }));
41
+ };
42
+ exports.SubtleButton = SubtleButton;
43
+ exports.SubtleButton.displayName = 'utrecht-subtle-button';
@@ -187,8 +187,8 @@
187
187
  "affectsGlobalScope": false
188
188
  },
189
189
  "../../src/Button.tsx": {
190
- "version": "a5165cb7dafc8f799500ce8b1ae9c5602cb045c33571f59917998d8becc813ed",
191
- "signature": "b15639d90dff6cb5207f1a4fff8746882f0facf9737ee9c9be825825e856c167",
190
+ "version": "2b977b5ae5eb2f861fc4c59d7ed6d7389e351b869b83cf8771f123bd174d95d5",
191
+ "signature": "a8b8c6f71186c4c58756249de19a9d47177f405bffa87eb829c654522d6ba2df",
192
192
  "affectsGlobalScope": false
193
193
  },
194
194
  "../../src/ButtonLink.tsx": {
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.0-alpha.26",
2
+ "version": "1.0.0-alpha.27",
3
3
  "author": "Community for NL Design System",
4
4
  "description": "React component library bundle for the Municipality of Utrecht based on the NL Design System architecture",
5
5
  "license": "EUPL-1.2",
@@ -227,5 +227,5 @@
227
227
  "react": "^17.0.0",
228
228
  "react-dom": "^17.0.0"
229
229
  },
230
- "gitHead": "bd089384485cb0158780cb7cef9267a1a4870237"
230
+ "gitHead": "567e7defa9a87fd3010e77ec49170bd39fa1ed81"
231
231
  }