@astral/ui 1.6.0 → 1.8.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.
Files changed (57) hide show
  1. package/Fab/Fab.d.ts +8 -0
  2. package/Fab/Fab.js +33 -0
  3. package/Fab/enums.d.ts +17 -0
  4. package/Fab/enums.js +23 -0
  5. package/Fab/index.d.ts +2 -0
  6. package/Fab/index.js +18 -0
  7. package/Fab/styles.d.ts +38 -0
  8. package/Fab/styles.js +84 -0
  9. package/Fab/types.d.ts +2 -0
  10. package/Fab/types.js +2 -0
  11. package/Tab/Tab.d.ts +3 -0
  12. package/Tab/Tab.js +5 -0
  13. package/Tab/index.d.ts +1 -0
  14. package/Tab/index.js +17 -0
  15. package/Tabs/Tabs.d.ts +3 -0
  16. package/Tabs/Tabs.js +5 -0
  17. package/Tabs/index.d.ts +1 -0
  18. package/Tabs/index.js +17 -0
  19. package/Tag/Tag.d.ts +1 -1
  20. package/Tag/Tag.js +4 -4
  21. package/esm/Fab/Fab.d.ts +8 -0
  22. package/esm/Fab/Fab.js +30 -0
  23. package/esm/Fab/enums.d.ts +17 -0
  24. package/esm/Fab/enums.js +20 -0
  25. package/esm/Fab/index.d.ts +2 -0
  26. package/esm/Fab/index.js +2 -0
  27. package/esm/Fab/styles.d.ts +38 -0
  28. package/esm/Fab/styles.js +81 -0
  29. package/esm/Fab/types.d.ts +2 -0
  30. package/esm/Fab/types.js +1 -0
  31. package/esm/Tab/Tab.d.ts +3 -0
  32. package/esm/Tab/Tab.js +2 -0
  33. package/esm/Tab/index.d.ts +1 -0
  34. package/esm/Tab/index.js +1 -0
  35. package/esm/Tabs/Tabs.d.ts +3 -0
  36. package/esm/Tabs/Tabs.js +2 -0
  37. package/esm/Tabs/index.d.ts +1 -0
  38. package/esm/Tabs/index.js +1 -0
  39. package/esm/Tag/Tag.d.ts +1 -1
  40. package/esm/Tag/Tag.js +4 -3
  41. package/esm/index.d.ts +3 -0
  42. package/esm/index.js +3 -0
  43. package/esm/theme/components/MuiTab.d.ts +3 -0
  44. package/esm/theme/components/MuiTab.js +12 -0
  45. package/esm/theme/components/MuiTabs.d.ts +3 -0
  46. package/esm/theme/components/MuiTabs.js +16 -0
  47. package/esm/theme/components/components.js +4 -0
  48. package/esm/theme/palette/palette.js +1 -1
  49. package/index.d.ts +3 -0
  50. package/index.js +3 -0
  51. package/package.json +2 -2
  52. package/theme/components/MuiTab.d.ts +3 -0
  53. package/theme/components/MuiTab.js +15 -0
  54. package/theme/components/MuiTabs.d.ts +3 -0
  55. package/theme/components/MuiTabs.js +19 -0
  56. package/theme/components/components.js +4 -0
  57. package/theme/palette/palette.js +1 -1
package/Fab/Fab.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { FabProps as MuiFabProps } from '@mui/material/Fab';
3
+ import { FabColor } from './types';
4
+ export declare type FabProps = Omit<MuiFabProps, 'color' | 'variant'> & {
5
+ color?: FabColor;
6
+ variant?: MuiFabProps['variant'] | 'square';
7
+ };
8
+ export declare const Fab: import("react").ForwardRefExoticComponent<Pick<FabProps, "disabled" | "action" | "color" | "translate" | "href" | "onFocusVisible" | "tabIndex" | "type" | "children" | "form" | "slot" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & import("react").RefAttributes<HTMLButtonElement>>;
package/Fab/Fab.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Fab = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var react_1 = require("react");
28
+ var styles_1 = require("./styles");
29
+ var enums_1 = require("./enums");
30
+ exports.Fab = (0, react_1.forwardRef)(function (_a) {
31
+ var ref = _a.ref, _b = _a.variant, variant = _b === void 0 ? 'square' : _b, _c = _a.size, size = _c === void 0 ? enums_1.FabSizes.Large : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, props = __rest(_a, ["ref", "variant", "size", "color"]);
32
+ return ((0, jsx_runtime_1.jsx)(styles_1.StyledFab, __assign({}, props, { variant: variant === 'square' ? 'circular' : variant, isSquare: variant === 'square', size: size, color: color, ref: ref })));
33
+ });
package/Fab/enums.d.ts ADDED
@@ -0,0 +1,17 @@
1
+ export declare enum FabSizes {
2
+ Small = "small",
3
+ Medium = "medium",
4
+ Large = "large"
5
+ }
6
+ export declare enum FabStates {
7
+ Default = "default",
8
+ Hover = "hover",
9
+ Active = "active"
10
+ }
11
+ export declare enum FabColors {
12
+ Default = "default",
13
+ Primary = "primary",
14
+ Error = "error",
15
+ Success = "success",
16
+ Warning = "warning"
17
+ }
package/Fab/enums.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FabColors = exports.FabStates = exports.FabSizes = void 0;
4
+ var FabSizes;
5
+ (function (FabSizes) {
6
+ FabSizes["Small"] = "small";
7
+ FabSizes["Medium"] = "medium";
8
+ FabSizes["Large"] = "large";
9
+ })(FabSizes = exports.FabSizes || (exports.FabSizes = {}));
10
+ var FabStates;
11
+ (function (FabStates) {
12
+ FabStates["Default"] = "default";
13
+ FabStates["Hover"] = "hover";
14
+ FabStates["Active"] = "active";
15
+ })(FabStates = exports.FabStates || (exports.FabStates = {}));
16
+ var FabColors;
17
+ (function (FabColors) {
18
+ FabColors["Default"] = "default";
19
+ FabColors["Primary"] = "primary";
20
+ FabColors["Error"] = "error";
21
+ FabColors["Success"] = "success";
22
+ FabColors["Warning"] = "warning";
23
+ })(FabColors = exports.FabColors || (exports.FabColors = {}));
package/Fab/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export * from './Fab';
2
+ export * from './types';
package/Fab/index.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Fab"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,38 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledFab: import("@emotion/styled").StyledComponent<{
3
+ children?: import("react").ReactNode;
4
+ classes?: Partial<import("@mui/material").FabClasses> | undefined;
5
+ color?: "inherit" | "primary" | "secondary" | "default" | "error" | "warning" | "info" | "success" | undefined;
6
+ disabled?: boolean | undefined;
7
+ disableFocusRipple?: boolean | undefined;
8
+ disableRipple?: boolean | undefined;
9
+ href?: string | undefined;
10
+ size?: "large" | "medium" | "small" | undefined;
11
+ variant?: "circular" | "extended" | undefined;
12
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
13
+ } & Omit<{
14
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
15
+ centerRipple?: boolean | undefined;
16
+ children?: import("react").ReactNode;
17
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
18
+ disabled?: boolean | undefined;
19
+ disableRipple?: boolean | undefined;
20
+ disableTouchRipple?: boolean | undefined;
21
+ focusRipple?: boolean | undefined;
22
+ focusVisibleClassName?: string | undefined;
23
+ LinkComponent?: import("react").ElementType<any> | undefined;
24
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
25
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
26
+ tabIndex?: number | undefined;
27
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
28
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
29
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | "css" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
30
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
31
+ }, "disabled" | "action" | "color" | "href" | "onFocusVisible" | "tabIndex" | "children" | "variant" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
32
+ theme?: import("@emotion/react").Theme | undefined;
33
+ } & Omit<import("@mui/material").FabProps<"button", {}>, "color" | "variant"> & {
34
+ color?: "primary" | "default" | "error" | "warning" | "success" | undefined;
35
+ variant?: "square" | "circular" | "extended" | undefined;
36
+ } & {
37
+ isSquare: boolean;
38
+ }, {}, {}>;
package/Fab/styles.js ADDED
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.StyledFab = void 0;
19
+ var material_1 = require("@mui/material");
20
+ var styles_1 = require("../styles");
21
+ var enums_1 = require("./enums");
22
+ var getBgColor = function (_a) {
23
+ var theme = _a.theme, color = _a.color, fabState = _a.fabState;
24
+ var backgroundColors = {
25
+ colored: theme.palette[color && color !== enums_1.FabColors.Default ? color : enums_1.FabColors.Primary][800],
26
+ default: theme.palette.grey[100],
27
+ defaultHover: theme.palette.primary[100],
28
+ error: theme.palette.red[800],
29
+ errorHover: theme.palette.red[900],
30
+ };
31
+ if (color === enums_1.FabColors.Default) {
32
+ if (fabState === enums_1.FabStates.Active || fabState === enums_1.FabStates.Hover) {
33
+ return backgroundColors.defaultHover;
34
+ }
35
+ return backgroundColors[enums_1.FabStates.Default];
36
+ }
37
+ if (color === enums_1.FabColors.Error) {
38
+ if (fabState === enums_1.FabStates.Active || fabState === enums_1.FabStates.Hover) {
39
+ return backgroundColors.errorHover;
40
+ }
41
+ return backgroundColors.error;
42
+ }
43
+ return backgroundColors.colored;
44
+ };
45
+ var getColor = function (_a) {
46
+ var theme = _a.theme, color = _a.color, fabState = _a.fabState;
47
+ var colors = {
48
+ colored: theme.palette.grey[100],
49
+ default: theme.palette.grey[900],
50
+ hover: theme.palette.primary[800],
51
+ };
52
+ if (color === enums_1.FabColors.Default) {
53
+ return colors[fabState];
54
+ }
55
+ return colors.colored;
56
+ };
57
+ var getSize = function (props) {
58
+ var sizes = {
59
+ small: '42px',
60
+ medium: '52px',
61
+ large: '62px',
62
+ };
63
+ return sizes[props.size || enums_1.FabSizes.Large];
64
+ };
65
+ var getBorderRadius = function (props) {
66
+ var variants = {
67
+ square: props.theme.shape.small,
68
+ circular: '50%',
69
+ };
70
+ if (props.isSquare) {
71
+ return variants.square;
72
+ }
73
+ return variants[props.variant || 'square'];
74
+ };
75
+ exports.StyledFab = (0, styles_1.styled)(material_1.Fab, {
76
+ shouldForwardProp: function (props) { return props !== 'size' && props !== 'isSquare'; },
77
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n\n color: ", ";\n\n background: ", ";\n border-radius: ", ";\n\n :active {\n color: ", ";\n\n background: ", ";\n }\n\n :hover {\n color: ", ";\n\n background: ", ";\n }\n"], ["\n width: ", ";\n height: ", ";\n\n color: ", ";\n\n background: ", ";\n border-radius: ", ";\n\n :active {\n color: ", ";\n\n background: ", ";\n }\n\n :hover {\n color: ", ";\n\n background: ", ";\n }\n"])), function (props) { return getSize(props); }, function (props) { return getSize(props); }, function (props) { return getColor(__assign(__assign({}, props), { fabState: enums_1.FabStates.Default })); }, function (props) {
78
+ return getBgColor(__assign(__assign({}, props), { fabState: enums_1.FabStates.Default }));
79
+ }, function (props) { return getBorderRadius(props); }, function (props) { return getColor(__assign(__assign({}, props), { fabState: enums_1.FabStates.Active })); }, function (props) {
80
+ return getBgColor(__assign(__assign({}, props), { fabState: enums_1.FabStates.Active }));
81
+ }, function (props) { return getColor(__assign(__assign({}, props), { fabState: enums_1.FabStates.Hover })); }, function (props) {
82
+ return getBgColor(__assign(__assign({}, props), { fabState: enums_1.FabStates.Hover }));
83
+ });
84
+ var templateObject_1;
package/Fab/types.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { FabColors } from './enums';
2
+ export declare type FabColor = `${FabColors}`;
package/Fab/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/Tab/Tab.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { Tab, TabProps } from '@mui/material';
2
+ export { Tab };
3
+ export type { TabProps };
package/Tab/Tab.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tab = void 0;
4
+ var material_1 = require("@mui/material");
5
+ Object.defineProperty(exports, "Tab", { enumerable: true, get: function () { return material_1.Tab; } });
package/Tab/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './Tab';
package/Tab/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Tab"), exports);
package/Tabs/Tabs.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ import { Tabs, TabsProps } from '@mui/material';
2
+ export { Tabs };
3
+ export type { TabsProps };
package/Tabs/Tabs.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Tabs = void 0;
4
+ var material_1 = require("@mui/material");
5
+ Object.defineProperty(exports, "Tabs", { enumerable: true, get: function () { return material_1.Tabs; } });
@@ -0,0 +1 @@
1
+ export * from './Tabs';
package/Tabs/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Tabs"), exports);
package/Tag/Tag.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { TagProps } from './types';
3
- export declare const Tag: ({ color, variant, deleteIcon, ...props }: TagProps) => JSX.Element;
3
+ export declare const Tag: import("react").ForwardRefExoticComponent<Pick<TagProps, "disabled" | "icon" | "color" | "translate" | "tabIndex" | "children" | "label" | "slot" | "title" | "key" | "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "rounded" | "avatar" | "clickable" | "deleteIcon" | "onDelete"> & import("react").RefAttributes<HTMLDivElement>>;
package/Tag/Tag.js CHANGED
@@ -24,10 +24,10 @@ var __rest = (this && this.__rest) || function (s, e) {
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.Tag = void 0;
26
26
  var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var react_1 = require("react");
27
28
  var icons_1 = require("@astral/icons");
28
29
  var styled_1 = require("./styled");
29
- var Tag = function (_a) {
30
+ exports.Tag = (0, react_1.forwardRef)(function (_a, ref) {
30
31
  var color = _a.color, variant = _a.variant, deleteIcon = _a.deleteIcon, props = __rest(_a, ["color", "variant", "deleteIcon"]);
31
- return ((0, jsx_runtime_1.jsx)(styled_1.StyledTag, __assign({ customColor: color, customVariant: variant }, props, { deleteIcon: deleteIcon ? deleteIcon : (0, jsx_runtime_1.jsx)(icons_1.CrossSmOutlineSm, {}) })));
32
- };
33
- exports.Tag = Tag;
32
+ return ((0, jsx_runtime_1.jsx)(styled_1.StyledTag, __assign({ ref: ref, customColor: color, customVariant: variant }, props, { deleteIcon: deleteIcon ? deleteIcon : (0, jsx_runtime_1.jsx)(icons_1.CrossSmOutlineSm, {}) })));
33
+ });
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { FabProps as MuiFabProps } from '@mui/material/Fab';
3
+ import { FabColor } from './types';
4
+ export declare type FabProps = Omit<MuiFabProps, 'color' | 'variant'> & {
5
+ color?: FabColor;
6
+ variant?: MuiFabProps['variant'] | 'square';
7
+ };
8
+ export declare const Fab: import("react").ForwardRefExoticComponent<Pick<FabProps, "disabled" | "action" | "color" | "translate" | "href" | "onFocusVisible" | "tabIndex" | "type" | "children" | "form" | "slot" | "title" | "key" | "css" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & import("react").RefAttributes<HTMLButtonElement>>;
package/esm/Fab/Fab.js ADDED
@@ -0,0 +1,30 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { forwardRef } from 'react';
25
+ import { StyledFab } from './styles';
26
+ import { FabSizes } from './enums';
27
+ export var Fab = forwardRef(function (_a) {
28
+ var ref = _a.ref, _b = _a.variant, variant = _b === void 0 ? 'square' : _b, _c = _a.size, size = _c === void 0 ? FabSizes.Large : _c, _d = _a.color, color = _d === void 0 ? 'primary' : _d, props = __rest(_a, ["ref", "variant", "size", "color"]);
29
+ return (_jsx(StyledFab, __assign({}, props, { variant: variant === 'square' ? 'circular' : variant, isSquare: variant === 'square', size: size, color: color, ref: ref })));
30
+ });
@@ -0,0 +1,17 @@
1
+ export declare enum FabSizes {
2
+ Small = "small",
3
+ Medium = "medium",
4
+ Large = "large"
5
+ }
6
+ export declare enum FabStates {
7
+ Default = "default",
8
+ Hover = "hover",
9
+ Active = "active"
10
+ }
11
+ export declare enum FabColors {
12
+ Default = "default",
13
+ Primary = "primary",
14
+ Error = "error",
15
+ Success = "success",
16
+ Warning = "warning"
17
+ }
@@ -0,0 +1,20 @@
1
+ export var FabSizes;
2
+ (function (FabSizes) {
3
+ FabSizes["Small"] = "small";
4
+ FabSizes["Medium"] = "medium";
5
+ FabSizes["Large"] = "large";
6
+ })(FabSizes || (FabSizes = {}));
7
+ export var FabStates;
8
+ (function (FabStates) {
9
+ FabStates["Default"] = "default";
10
+ FabStates["Hover"] = "hover";
11
+ FabStates["Active"] = "active";
12
+ })(FabStates || (FabStates = {}));
13
+ export var FabColors;
14
+ (function (FabColors) {
15
+ FabColors["Default"] = "default";
16
+ FabColors["Primary"] = "primary";
17
+ FabColors["Error"] = "error";
18
+ FabColors["Success"] = "success";
19
+ FabColors["Warning"] = "warning";
20
+ })(FabColors || (FabColors = {}));
@@ -0,0 +1,2 @@
1
+ export * from './Fab';
2
+ export * from './types';
@@ -0,0 +1,2 @@
1
+ export * from './Fab';
2
+ export * from './types';
@@ -0,0 +1,38 @@
1
+ /// <reference types="react" />
2
+ export declare const StyledFab: import("@emotion/styled").StyledComponent<{
3
+ children?: import("react").ReactNode;
4
+ classes?: Partial<import("@mui/material").FabClasses> | undefined;
5
+ color?: "inherit" | "primary" | "secondary" | "default" | "error" | "warning" | "info" | "success" | undefined;
6
+ disabled?: boolean | undefined;
7
+ disableFocusRipple?: boolean | undefined;
8
+ disableRipple?: boolean | undefined;
9
+ href?: string | undefined;
10
+ size?: "large" | "medium" | "small" | undefined;
11
+ variant?: "circular" | "extended" | undefined;
12
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
13
+ } & Omit<{
14
+ action?: import("react").Ref<import("@mui/material").ButtonBaseActions> | undefined;
15
+ centerRipple?: boolean | undefined;
16
+ children?: import("react").ReactNode;
17
+ classes?: Partial<import("@mui/material").ButtonBaseClasses> | undefined;
18
+ disabled?: boolean | undefined;
19
+ disableRipple?: boolean | undefined;
20
+ disableTouchRipple?: boolean | undefined;
21
+ focusRipple?: boolean | undefined;
22
+ focusVisibleClassName?: string | undefined;
23
+ LinkComponent?: import("react").ElementType<any> | undefined;
24
+ onFocusVisible?: import("react").FocusEventHandler<any> | undefined;
25
+ sx?: import("@mui/material").SxProps<import("@mui/material").Theme> | undefined;
26
+ tabIndex?: number | undefined;
27
+ TouchRippleProps?: Partial<import("@mui/material/ButtonBase/TouchRipple").TouchRippleProps> | undefined;
28
+ touchRippleRef?: import("react").Ref<import("@mui/material/ButtonBase/TouchRipple").TouchRippleActions> | undefined;
29
+ }, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | "css" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
30
+ ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
31
+ }, "disabled" | "action" | "color" | "href" | "onFocusVisible" | "tabIndex" | "children" | "variant" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "sx" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
32
+ theme?: import("@emotion/react").Theme | undefined;
33
+ } & Omit<import("@mui/material").FabProps<"button", {}>, "color" | "variant"> & {
34
+ color?: "primary" | "default" | "error" | "warning" | "success" | undefined;
35
+ variant?: "square" | "circular" | "extended" | undefined;
36
+ } & {
37
+ isSquare: boolean;
38
+ }, {}, {}>;
@@ -0,0 +1,81 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { Fab } from '@mui/material';
17
+ import { styled } from '../styles';
18
+ import { FabColors, FabSizes, FabStates } from './enums';
19
+ var getBgColor = function (_a) {
20
+ var theme = _a.theme, color = _a.color, fabState = _a.fabState;
21
+ var backgroundColors = {
22
+ colored: theme.palette[color && color !== FabColors.Default ? color : FabColors.Primary][800],
23
+ default: theme.palette.grey[100],
24
+ defaultHover: theme.palette.primary[100],
25
+ error: theme.palette.red[800],
26
+ errorHover: theme.palette.red[900],
27
+ };
28
+ if (color === FabColors.Default) {
29
+ if (fabState === FabStates.Active || fabState === FabStates.Hover) {
30
+ return backgroundColors.defaultHover;
31
+ }
32
+ return backgroundColors[FabStates.Default];
33
+ }
34
+ if (color === FabColors.Error) {
35
+ if (fabState === FabStates.Active || fabState === FabStates.Hover) {
36
+ return backgroundColors.errorHover;
37
+ }
38
+ return backgroundColors.error;
39
+ }
40
+ return backgroundColors.colored;
41
+ };
42
+ var getColor = function (_a) {
43
+ var theme = _a.theme, color = _a.color, fabState = _a.fabState;
44
+ var colors = {
45
+ colored: theme.palette.grey[100],
46
+ default: theme.palette.grey[900],
47
+ hover: theme.palette.primary[800],
48
+ };
49
+ if (color === FabColors.Default) {
50
+ return colors[fabState];
51
+ }
52
+ return colors.colored;
53
+ };
54
+ var getSize = function (props) {
55
+ var sizes = {
56
+ small: '42px',
57
+ medium: '52px',
58
+ large: '62px',
59
+ };
60
+ return sizes[props.size || FabSizes.Large];
61
+ };
62
+ var getBorderRadius = function (props) {
63
+ var variants = {
64
+ square: props.theme.shape.small,
65
+ circular: '50%',
66
+ };
67
+ if (props.isSquare) {
68
+ return variants.square;
69
+ }
70
+ return variants[props.variant || 'square'];
71
+ };
72
+ export var StyledFab = styled(Fab, {
73
+ shouldForwardProp: function (props) { return props !== 'size' && props !== 'isSquare'; },
74
+ })(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: ", ";\n height: ", ";\n\n color: ", ";\n\n background: ", ";\n border-radius: ", ";\n\n :active {\n color: ", ";\n\n background: ", ";\n }\n\n :hover {\n color: ", ";\n\n background: ", ";\n }\n"], ["\n width: ", ";\n height: ", ";\n\n color: ", ";\n\n background: ", ";\n border-radius: ", ";\n\n :active {\n color: ", ";\n\n background: ", ";\n }\n\n :hover {\n color: ", ";\n\n background: ", ";\n }\n"])), function (props) { return getSize(props); }, function (props) { return getSize(props); }, function (props) { return getColor(__assign(__assign({}, props), { fabState: FabStates.Default })); }, function (props) {
75
+ return getBgColor(__assign(__assign({}, props), { fabState: FabStates.Default }));
76
+ }, function (props) { return getBorderRadius(props); }, function (props) { return getColor(__assign(__assign({}, props), { fabState: FabStates.Active })); }, function (props) {
77
+ return getBgColor(__assign(__assign({}, props), { fabState: FabStates.Active }));
78
+ }, function (props) { return getColor(__assign(__assign({}, props), { fabState: FabStates.Hover })); }, function (props) {
79
+ return getBgColor(__assign(__assign({}, props), { fabState: FabStates.Hover }));
80
+ });
81
+ var templateObject_1;
@@ -0,0 +1,2 @@
1
+ import { FabColors } from './enums';
2
+ export declare type FabColor = `${FabColors}`;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { Tab, TabProps } from '@mui/material';
2
+ export { Tab };
3
+ export type { TabProps };
package/esm/Tab/Tab.js ADDED
@@ -0,0 +1,2 @@
1
+ import { Tab } from '@mui/material';
2
+ export { Tab };
@@ -0,0 +1 @@
1
+ export * from './Tab';
@@ -0,0 +1 @@
1
+ export * from './Tab';
@@ -0,0 +1,3 @@
1
+ import { Tabs, TabsProps } from '@mui/material';
2
+ export { Tabs };
3
+ export type { TabsProps };
@@ -0,0 +1,2 @@
1
+ import { Tabs } from '@mui/material';
2
+ export { Tabs };
@@ -0,0 +1 @@
1
+ export * from './Tabs';
@@ -0,0 +1 @@
1
+ export * from './Tabs';
package/esm/Tag/Tag.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { TagProps } from './types';
3
- export declare const Tag: ({ color, variant, deleteIcon, ...props }: TagProps) => JSX.Element;
3
+ export declare const Tag: import("react").ForwardRefExoticComponent<Pick<TagProps, "disabled" | "icon" | "color" | "translate" | "tabIndex" | "children" | "label" | "slot" | "title" | "key" | "css" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "rounded" | "avatar" | "clickable" | "deleteIcon" | "onDelete"> & import("react").RefAttributes<HTMLDivElement>>;
package/esm/Tag/Tag.js CHANGED
@@ -21,9 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { forwardRef } from 'react';
24
25
  import { CrossSmOutlineSm } from '@astral/icons';
25
26
  import { StyledTag } from './styled';
26
- export var Tag = function (_a) {
27
+ export var Tag = forwardRef(function (_a, ref) {
27
28
  var color = _a.color, variant = _a.variant, deleteIcon = _a.deleteIcon, props = __rest(_a, ["color", "variant", "deleteIcon"]);
28
- return (_jsx(StyledTag, __assign({ customColor: color, customVariant: variant }, props, { deleteIcon: deleteIcon ? deleteIcon : _jsx(CrossSmOutlineSm, {}) })));
29
- };
29
+ return (_jsx(StyledTag, __assign({ ref: ref, customColor: color, customVariant: variant }, props, { deleteIcon: deleteIcon ? deleteIcon : _jsx(CrossSmOutlineSm, {}) })));
30
+ });
package/esm/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './DialogContent';
19
19
  export * from './DialogContentText';
20
20
  export * from './DialogTitle';
21
21
  export * from './DropdownButton';
22
+ export * from './Fab';
22
23
  export * from './Fade';
23
24
  export * from './FormControlLabel';
24
25
  export * from './FormHelperText';
@@ -51,6 +52,8 @@ export * from './Select';
51
52
  export * from './styles';
52
53
  export * from './StylesCacheProvider';
53
54
  export * from './Table';
55
+ export * from './Tab';
56
+ export * from './Tabs';
54
57
  export * from './Tag';
55
58
  export * from './TextArea';
56
59
  export * from './theme';
package/esm/index.js CHANGED
@@ -19,6 +19,7 @@ export * from './DialogContent';
19
19
  export * from './DialogContentText';
20
20
  export * from './DialogTitle';
21
21
  export * from './DropdownButton';
22
+ export * from './Fab';
22
23
  export * from './Fade';
23
24
  export * from './FormControlLabel';
24
25
  export * from './FormHelperText';
@@ -51,6 +52,8 @@ export * from './Select';
51
52
  export * from './styles';
52
53
  export * from './StylesCacheProvider';
53
54
  export * from './Table';
55
+ export * from './Tab';
56
+ export * from './Tabs';
54
57
  export * from './Tag';
55
58
  export * from './TextArea';
56
59
  export * from './theme';
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiTab: Components<Theme>['MuiTab'];
@@ -0,0 +1,12 @@
1
+ export var MuiTab = {
2
+ styleOverrides: {
3
+ root: function (_a) {
4
+ var theme = _a.theme;
5
+ return {
6
+ minWidth: 0,
7
+ padding: theme.spacing(0, 2),
8
+ textTransform: 'none',
9
+ };
10
+ },
11
+ },
12
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiTabs: Components<Theme>['MuiTabs'];
@@ -0,0 +1,16 @@
1
+ export var MuiTabs = {
2
+ styleOverrides: {
3
+ root: function () {
4
+ return {
5
+ minHeight: 38,
6
+ height: 38,
7
+ };
8
+ },
9
+ indicator: function (_a) {
10
+ var theme = _a.theme;
11
+ return {
12
+ borderRadius: theme.shape.small,
13
+ };
14
+ },
15
+ },
16
+ };
@@ -22,6 +22,8 @@ import { MuiMenuItem } from './MuiMenuItem';
22
22
  import { MuiCircularProgress } from './MuiCircularProgress';
23
23
  import { MuiListItemButton } from './MuiListItemButton';
24
24
  import { MuiListItemText } from './MuiListItemText';
25
+ import { MuiTab } from './MuiTab';
26
+ import { MuiTabs } from './MuiTabs';
25
27
  var getMuiCssBaseline = function (fontUrls) { return ({
26
28
  styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(".concat(fontUrls.light.woff2, ") format('woff2'), url(").concat(fontUrls.light.woff, ") format('woff');\n }\n @font-face { \n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(").concat(fontUrls.regular.woff2, ") format('woff2'), url(").concat(fontUrls.regular.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(").concat(fontUrls.medium.woff2, ") format('woff2'), url(").concat(fontUrls.medium.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(").concat(fontUrls.bold.woff2, ") format('woff2'), url(").concat(fontUrls.bold.woff, ") format('woff');\n }\n "),
27
29
  }); };
@@ -63,4 +65,6 @@ export var getComponents = function (fontUrls) { return ({
63
65
  MuiCircularProgress: MuiCircularProgress,
64
66
  MuiListItemButton: MuiListItemButton,
65
67
  MuiListItemText: MuiListItemText,
68
+ MuiTab: MuiTab,
69
+ MuiTabs: MuiTabs,
66
70
  }); };
@@ -80,7 +80,7 @@ export var getPalette = function (brand) {
80
80
  },
81
81
  text: {
82
82
  primary: '#072D57',
83
- secondary: '#072D57',
83
+ secondary: '#557192',
84
84
  disabled: '#99A9BA',
85
85
  },
86
86
  grey: {
package/index.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './DialogContent';
19
19
  export * from './DialogContentText';
20
20
  export * from './DialogTitle';
21
21
  export * from './DropdownButton';
22
+ export * from './Fab';
22
23
  export * from './Fade';
23
24
  export * from './FormControlLabel';
24
25
  export * from './FormHelperText';
@@ -51,6 +52,8 @@ export * from './Select';
51
52
  export * from './styles';
52
53
  export * from './StylesCacheProvider';
53
54
  export * from './Table';
55
+ export * from './Tab';
56
+ export * from './Tabs';
54
57
  export * from './Tag';
55
58
  export * from './TextArea';
56
59
  export * from './theme';
package/index.js CHANGED
@@ -35,6 +35,7 @@ __exportStar(require("./DialogContent"), exports);
35
35
  __exportStar(require("./DialogContentText"), exports);
36
36
  __exportStar(require("./DialogTitle"), exports);
37
37
  __exportStar(require("./DropdownButton"), exports);
38
+ __exportStar(require("./Fab"), exports);
38
39
  __exportStar(require("./Fade"), exports);
39
40
  __exportStar(require("./FormControlLabel"), exports);
40
41
  __exportStar(require("./FormHelperText"), exports);
@@ -67,6 +68,8 @@ __exportStar(require("./Select"), exports);
67
68
  __exportStar(require("./styles"), exports);
68
69
  __exportStar(require("./StylesCacheProvider"), exports);
69
70
  __exportStar(require("./Table"), exports);
71
+ __exportStar(require("./Tab"), exports);
72
+ __exportStar(require("./Tabs"), exports);
70
73
  __exportStar(require("./Tag"), exports);
71
74
  __exportStar(require("./TextArea"), exports);
72
75
  __exportStar(require("./theme"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astral/ui",
3
- "version": "1.6.0",
3
+ "version": "1.8.0",
4
4
  "browser": "./src/index.ts",
5
5
  "jest": {
6
6
  "moduleNameMapper": {
@@ -8,7 +8,7 @@
8
8
  }
9
9
  },
10
10
  "dependencies": {
11
- "@astral/icons": "^1.6.0",
11
+ "@astral/icons": "^1.8.0",
12
12
  "@emotion/cache": "11.7.1",
13
13
  "@emotion/react": "11.9.0",
14
14
  "@emotion/server": "11.4.0",
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiTab: Components<Theme>['MuiTab'];
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiTab = void 0;
4
+ exports.MuiTab = {
5
+ styleOverrides: {
6
+ root: function (_a) {
7
+ var theme = _a.theme;
8
+ return {
9
+ minWidth: 0,
10
+ padding: theme.spacing(0, 2),
11
+ textTransform: 'none',
12
+ };
13
+ },
14
+ },
15
+ };
@@ -0,0 +1,3 @@
1
+ import { Components } from '@mui/material';
2
+ import type { Theme } from '../baseTheme';
3
+ export declare const MuiTabs: Components<Theme>['MuiTabs'];
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MuiTabs = void 0;
4
+ exports.MuiTabs = {
5
+ styleOverrides: {
6
+ root: function () {
7
+ return {
8
+ minHeight: 38,
9
+ height: 38,
10
+ };
11
+ },
12
+ indicator: function (_a) {
13
+ var theme = _a.theme;
14
+ return {
15
+ borderRadius: theme.shape.small,
16
+ };
17
+ },
18
+ },
19
+ };
@@ -25,6 +25,8 @@ var MuiMenuItem_1 = require("./MuiMenuItem");
25
25
  var MuiCircularProgress_1 = require("./MuiCircularProgress");
26
26
  var MuiListItemButton_1 = require("./MuiListItemButton");
27
27
  var MuiListItemText_1 = require("./MuiListItemText");
28
+ var MuiTab_1 = require("./MuiTab");
29
+ var MuiTabs_1 = require("./MuiTabs");
28
30
  var getMuiCssBaseline = function (fontUrls) { return ({
29
31
  styleOverrides: "\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 300;\n font-display: swap;\n src: url(".concat(fontUrls.light.woff2, ") format('woff2'), url(").concat(fontUrls.light.woff, ") format('woff');\n }\n @font-face { \n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 400;\n font-display: swap;\n src: url(").concat(fontUrls.regular.woff2, ") format('woff2'), url(").concat(fontUrls.regular.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 500;\n font-display: swap;\n src: url(").concat(fontUrls.medium.woff2, ") format('woff2'), url(").concat(fontUrls.medium.woff, ") format('woff');\n }\n @font-face {\n font-family: 'Ubuntu';\n font-style: 'normal';\n font-weight: 700;\n font-display: swap;\n src: url(").concat(fontUrls.bold.woff2, ") format('woff2'), url(").concat(fontUrls.bold.woff, ") format('woff');\n }\n "),
30
32
  }); };
@@ -66,5 +68,7 @@ var getComponents = function (fontUrls) { return ({
66
68
  MuiCircularProgress: MuiCircularProgress_1.MuiCircularProgress,
67
69
  MuiListItemButton: MuiListItemButton_1.MuiListItemButton,
68
70
  MuiListItemText: MuiListItemText_1.MuiListItemText,
71
+ MuiTab: MuiTab_1.MuiTab,
72
+ MuiTabs: MuiTabs_1.MuiTabs,
69
73
  }); };
70
74
  exports.getComponents = getComponents;
@@ -83,7 +83,7 @@ var getPalette = function (brand) {
83
83
  },
84
84
  text: {
85
85
  primary: '#072D57',
86
- secondary: '#072D57',
86
+ secondary: '#557192',
87
87
  disabled: '#99A9BA',
88
88
  },
89
89
  grey: {