@utrecht/calendar-react 1.0.15 → 1.0.17

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
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAcL,MAAM,EAOP,MAAM,UAAU,CAAC;AA2BlB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B;;;SAGK;IACL,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;SAIK;IACL,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;SAGK;IACL,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB;;;SAGK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAED;;;KAGK;AAEL,eAAO,MAAM,QAAQ,sKAWlB,aAAa,4CAiGf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAcL,MAAM,EAOP,MAAM,UAAU,CAAC;AA2BlB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B;;;SAGK;IACL,eAAe,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC;;;;SAIK;IACL,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB;;;SAGK;IACL,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB;;;SAGK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,OAAO,CAAC,EAAE,IAAI,CAAC;CAChB;AAED;;;KAGK;AAEL,eAAO,MAAM,QAAQ,GAAI,mKAWtB,aAAa,4CAiGf,CAAC"}
package/dist/index.mjs CHANGED
@@ -3550,9 +3550,18 @@ function chunk(array, size, guard) {
3550
3550
  const CalendarNavigation = ({ children, ...props }) => (jsx("div", { className: "utrecht-calendar__navigation", ...props, children: children }));
3551
3551
 
3552
3552
  function r$1(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx$1(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}
3553
-
3553
+ const APPEARANCE = {
3554
+ 'primary-action-button': 'utrecht-button--primary-action',
3555
+ 'secondary-action-button': 'utrecht-button--secondary-action',
3556
+ 'subtle-button': 'utrecht-button--subtle',
3557
+ };
3558
+ const HINT = {
3559
+ danger: 'utrecht-button--danger',
3560
+ warning: 'utrecht-button--warning',
3561
+ ready: 'utrecht-button--ready',
3562
+ };
3554
3563
  const Button = forwardRef(({ appearance, busy, disabled, children, className, hint, icon, label, pressed, type, ...restProps }, ref) => {
3555
- return (jsxs("button", { ref: ref, className: clsx$1('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', hint === 'danger' && 'utrecht-button--danger', hint === 'warning' && 'utrecht-button--warning', hint === 'ready' && 'utrecht-button--ready', pressed === true && 'utrecht-button--pressed', className), "aria-busy": busy || undefined, "aria-pressed": typeof pressed === 'boolean' ? pressed : undefined, disabled: disabled, type: type || 'button', ...restProps, children: [icon, label && jsx("span", { className: "utrecht-button__label", children: label }), children] }));
3564
+ return (jsxs("button", { ref: ref, className: clsx$1('utrecht-button', busy && 'utrecht-button--busy', disabled && 'utrecht-button--disabled', type === 'submit' && 'utrecht-button--submit', appearance && APPEARANCE[appearance], hint && HINT[hint], pressed === true && 'utrecht-button--pressed', className), "aria-busy": busy || undefined, "aria-pressed": typeof pressed === 'boolean' ? pressed : undefined, disabled: disabled, type: type || 'button', ...restProps, children: [icon, label && jsx("span", { className: "utrecht-button__label", children: label }), children] }));
3556
3565
  });
3557
3566
  Button.displayName = 'Button';
3558
3567