@utrecht/calendar-react 1.0.15 → 1.0.16
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/css.mjs +11 -2
- package/dist/css.mjs.map +1 -1
- package/dist/index.mjs +11 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/css.mjs
CHANGED
|
@@ -3561,9 +3561,18 @@ function chunk(array, size, guard) {
|
|
|
3561
3561
|
const CalendarNavigation = ({ children, ...props }) => (jsx("div", { className: "utrecht-calendar__navigation", ...props, children: children }));
|
|
3562
3562
|
|
|
3563
3563
|
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}
|
|
3564
|
-
|
|
3564
|
+
const APPEARANCE = {
|
|
3565
|
+
'primary-action-button': 'utrecht-button--primary-action',
|
|
3566
|
+
'secondary-action-button': 'utrecht-button--secondary-action',
|
|
3567
|
+
'subtle-button': 'utrecht-button--subtle',
|
|
3568
|
+
};
|
|
3569
|
+
const HINT = {
|
|
3570
|
+
danger: 'utrecht-button--danger',
|
|
3571
|
+
warning: 'utrecht-button--warning',
|
|
3572
|
+
ready: 'utrecht-button--ready',
|
|
3573
|
+
};
|
|
3565
3574
|
const Button = forwardRef(({ appearance, busy, disabled, children, className, hint, icon, label, pressed, type, ...restProps }, ref) => {
|
|
3566
|
-
return (jsxs("button", { ref: ref, className: clsx$1('utrecht-button', busy && 'utrecht-button--busy', disabled && 'utrecht-button--disabled', type === 'submit' && 'utrecht-button--submit', appearance
|
|
3575
|
+
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] }));
|
|
3567
3576
|
});
|
|
3568
3577
|
Button.displayName = 'Button';
|
|
3569
3578
|
|