@semcore/button 5.44.0-prerelease.5 → 5.44.0-prerelease.6

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 (52) hide show
  1. package/lib/cjs/component/AbstractButton/AbstractButton.js +182 -0
  2. package/lib/cjs/component/AbstractButton/AbstractButton.js.map +1 -0
  3. package/lib/cjs/component/AbstractButton/AbstractButton.type.js +2 -0
  4. package/lib/cjs/component/AbstractButton/AbstractButton.type.js.map +1 -0
  5. package/lib/cjs/component/{Button → AbstractButton}/SpinButton.js +4 -3
  6. package/lib/cjs/component/AbstractButton/SpinButton.js.map +1 -0
  7. package/lib/cjs/component/Button/Button.js +64 -166
  8. package/lib/cjs/component/Button/Button.js.map +1 -1
  9. package/lib/cjs/component/Button/Button.type.js.map +1 -1
  10. package/lib/cjs/component/Button/button.shadow.css +9 -1
  11. package/lib/cjs/component/ButtonLink/ButtonLink.js +68 -35
  12. package/lib/cjs/component/ButtonLink/ButtonLink.js.map +1 -1
  13. package/lib/cjs/component/ButtonLink/ButtonLink.type.js.map +1 -1
  14. package/lib/cjs/component/ButtonLink/buttonLink.shadow.css +150 -11
  15. package/lib/cjs/index.js +4 -3
  16. package/lib/cjs/index.js.map +1 -1
  17. package/lib/es6/component/AbstractButton/AbstractButton.js +175 -0
  18. package/lib/es6/component/AbstractButton/AbstractButton.js.map +1 -0
  19. package/lib/es6/component/AbstractButton/AbstractButton.type.js +2 -0
  20. package/lib/es6/component/AbstractButton/AbstractButton.type.js.map +1 -0
  21. package/lib/es6/component/{Button → AbstractButton}/SpinButton.js +1 -1
  22. package/lib/es6/component/AbstractButton/SpinButton.js.map +1 -0
  23. package/lib/es6/component/Button/Button.js +57 -163
  24. package/lib/es6/component/Button/Button.js.map +1 -1
  25. package/lib/es6/component/Button/Button.type.js.map +1 -1
  26. package/lib/es6/component/Button/button.shadow.css +9 -1
  27. package/lib/es6/component/ButtonLink/ButtonLink.js +65 -34
  28. package/lib/es6/component/ButtonLink/ButtonLink.js.map +1 -1
  29. package/lib/es6/component/ButtonLink/ButtonLink.type.js.map +1 -1
  30. package/lib/es6/component/ButtonLink/buttonLink.shadow.css +150 -11
  31. package/lib/es6/index.js +2 -1
  32. package/lib/es6/index.js.map +1 -1
  33. package/lib/esm/component/AbstractButton/AbstractButton.mjs +152 -0
  34. package/lib/esm/component/{Button → AbstractButton}/SpinButton.mjs +3 -2
  35. package/lib/esm/component/Button/Button.mjs +56 -142
  36. package/lib/esm/component/Button/button.shadow.css +9 -1
  37. package/lib/esm/component/ButtonLink/ButtonLink.mjs +61 -33
  38. package/lib/esm/component/ButtonLink/buttonLink.shadow.css +150 -11
  39. package/lib/esm/index.mjs +2 -3
  40. package/lib/types/component/AbstractButton/AbstractButton.d.ts +24 -0
  41. package/lib/types/component/AbstractButton/AbstractButton.type.d.ts +39 -0
  42. package/lib/types/component/{Button → AbstractButton}/SpinButton.d.ts +2 -2
  43. package/lib/types/component/Button/Button.d.ts +1 -28
  44. package/lib/types/component/Button/Button.type.d.ts +39 -40
  45. package/lib/types/component/ButtonLink/ButtonLink.d.ts +1 -1
  46. package/lib/types/component/ButtonLink/ButtonLink.type.d.ts +21 -15
  47. package/lib/types/index.d.ts +2 -1
  48. package/package.json +7 -7
  49. package/lib/cjs/component/Button/SpinButton.js.map +0 -1
  50. package/lib/es6/component/Button/SpinButton.js.map +0 -1
  51. package/lib/esm/component/Button/Button.type.mjs +0 -1
  52. package/lib/esm/component/ButtonLink/ButtonLink.type.mjs +0 -1
@@ -1,19 +1,70 @@
1
- SButtonLink {
2
- border: none;
1
+ SButton {
2
+ display: inline-flex;
3
3
  font-family: inherit;
4
- }
5
-
6
- SButtonLink[use='primary']:not([color]) {
4
+ font-size: var(--intergalactic-fs-200, 14px);
7
5
  color: var(--intergalactic-text-link, oklch(0.53 0.21 263));
6
+ line-height: normal;
7
+ position: relative;
8
+ cursor: pointer;
9
+ text-decoration: none;
10
+ border: none;
11
+ padding: 0;
12
+ margin: 0;
13
+ box-shadow: none;
14
+ -webkit-tap-highlight-color: transparent;
15
+ outline: 0;
16
+ background: none;
17
+ transition: color 0.15s ease-in-out;
8
18
 
9
- &[active],
10
19
  &:active,
11
- &:hover {
20
+ &:hover,
21
+ &:focus {
22
+ outline: 0;
23
+ text-decoration: none;
24
+ }
25
+
26
+ &::-moz-focus-inner {
27
+ border: none;
28
+ padding: 0;
29
+ }
30
+
31
+ &[active],
32
+ &:hover,
33
+ &:active {
12
34
  color: var(--intergalactic-text-link-hover-active, oklch(0.51 0.202 263));
35
+
36
+ & SText {
37
+ border-color: currentColor;
38
+ }
39
+ }
40
+
41
+ &[enableVisited]:visited,
42
+ &[enableVisited]:visited:hover {
43
+ color: var(--intergalactic-text-link-visited, oklch(0.53 0.26 296));
13
44
  }
45
+
46
+ SText {
47
+ border-bottom-width: 1px;
48
+ border-bottom-style: solid;
49
+ border-color: transparent;
50
+ transition: border-bottom-color 0.15s ease-in-out;
51
+ }
52
+ }
53
+
54
+ SButton[keyboardFocused] {
55
+ outline-color: var(--intergalactic-keyboard-focus-outline, oklch(0.424 0.269 264.2 / 0.469));
56
+ outline-style: solid;
57
+ outline-width: 3px;
14
58
  }
15
59
 
16
- SButtonLink[use='secondary']:not([color]) {
60
+ SButton[disabled] {
61
+ opacity: var(--intergalactic-disabled-opacity, 0.4);
62
+ cursor: default;
63
+ /* Disable link interactions */
64
+ pointer-events: none;
65
+ }
66
+
67
+ SButton[use='secondary'] {
17
68
  color: var(--intergalactic-text-hint, oklch(0.088 0.026 147.7 / 0.583));
18
69
 
19
70
  &[active],
@@ -21,9 +72,97 @@ SButtonLink[use='secondary']:not([color]) {
21
72
  &:hover {
22
73
  color: var(--intergalactic-text-hint-hover-active, oklch(0.086 0.026 145.8 / 0.605));
23
74
  }
75
+
76
+ SText {
77
+ border-bottom-width: 1px;
78
+ border-bottom-style: dashed;
79
+ border-color: currentColor;
80
+ }
81
+ }
82
+
83
+ SInner {
84
+ display: inline-flex;
85
+ align-items: center;
86
+ justify-content: center;
87
+ height: 100%;
88
+ width: 100%;
24
89
  }
25
90
 
26
- SButtonLink[use='secondary'] SText {
27
- text-decoration-style: dashed;
28
- text-decoration-color: currentColor;
91
+ SAddon {
92
+ display: inline-flex;
93
+ justify-content: center;
94
+ align-items: center;
95
+ vertical-align: middle;
96
+ pointer-events: none;
97
+ }
98
+
99
+ SButton SAddon {
100
+ &:not(:only-child):first-child {
101
+ margin-right: var(--intergalactic-spacing-1x, 4px);
102
+ }
103
+
104
+ &:not(:only-child):last-child {
105
+ margin-left: var(--intergalactic-spacing-1x, 4px);
106
+ }
107
+ }
108
+
109
+ SButton[text-color] {
110
+ color: var(--text-color);
111
+
112
+ &[active],
113
+ &:hover,
114
+ &:active {
115
+ color: var(--text-color);
116
+ filter: brightness(0.8);
117
+ }
118
+ }
119
+
120
+ SButton[size='100'] {
121
+ font-size: var(--intergalactic-fs-100, 12px);
122
+ line-height: var(--intergalactic-lh-100, 133%);
123
+ }
124
+
125
+ SButton[size='200'] {
126
+ font-size: var(--intergalactic-fs-200, 14px);
127
+ line-height: var(--intergalactic-lh-200, 142%);
128
+ }
129
+
130
+ SButton[size='300'] {
131
+ font-size: var(--intergalactic-fs-300, 16px);
132
+ line-height: var(--intergalactic-lh-300, 150%);
133
+ }
134
+
135
+ SButton[size='400'] {
136
+ font-size: var(--intergalactic-fs-400, 20px);
137
+ line-height: var(--intergalactic-lh-400, 120%);
138
+ }
139
+
140
+ SButton[size='500'] {
141
+ font-size: var(--intergalactic-fs-500, 24px);
142
+ line-height: var(--intergalactic-lh-500, 117%);
143
+ }
144
+
145
+ SButton[size='600'] {
146
+ font-size: var(--intergalactic-fs-600, 32px);
147
+ line-height: var(--intergalactic-lh-600, 125%);
148
+ }
149
+
150
+ SButton[size='700'] {
151
+ font-size: var(--intergalactic-fs-700, 36px);
152
+ line-height: var(--intergalactic-lh-700, 110%);
153
+ }
154
+
155
+ SButton[size='800'] {
156
+ font-size: var(--intergalactic-fs-800, 48px);
157
+ line-height: var(--intergalactic-lh-800, 117%);
158
+ }
159
+
160
+ @media (prefers-reduced-motion) {
161
+ SButton {
162
+ transition: none;
163
+ }
164
+
165
+ SText {
166
+ transition: none;
167
+ }
29
168
  }
package/lib/esm/index.mjs CHANGED
@@ -1,7 +1,6 @@
1
- import { MAP_USE_DEFAULT_THEME, default as default2 } from "./component/Button/Button.mjs";
2
- import "./component/Button/Button.type.mjs";
1
+ import { default as default2 } from "./component/Button/Button.mjs";
3
2
  import { ButtonLink } from "./component/ButtonLink/ButtonLink.mjs";
4
- import "./component/ButtonLink/ButtonLink.type.mjs";
3
+ import { MAP_USE_DEFAULT_THEME } from "./component/AbstractButton/AbstractButton.mjs";
5
4
  export {
6
5
  ButtonLink,
7
6
  MAP_USE_DEFAULT_THEME,
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { AbstractButtonProps } from './AbstractButton.type';
3
+ import { Component } from '@semcore/core';
4
+ export declare const MAP_USE_DEFAULT_THEME: Record<string, string>;
5
+ type Props = AbstractButtonProps<any, any, any>;
6
+ export declare abstract class AbstractButton extends Component<Props, {}, {}> {
7
+ static displayName: string;
8
+ containerRef: React.RefObject<HTMLButtonElement>;
9
+ state: {
10
+ ariaLabelledByContent: null;
11
+ };
12
+ protected abstract getTextColor(): string | undefined;
13
+ getTextProps(): {
14
+ size: any;
15
+ };
16
+ getAddonProps(): {
17
+ size: any;
18
+ };
19
+ componentDidMount(): void;
20
+ renderButton({ buttonProps, children }: any): React.ReactNode;
21
+ renderButtonWithHint({ buttonProps, children, hintProps }: any): React.ReactNode;
22
+ render(): JSX.Element;
23
+ }
24
+ export {};
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { PropGetterFn } from '@semcore/core';
3
+ import { KeyboardFocusProps } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
4
+ import { BoxProps } from '@semcore/flex-box';
5
+ import { NeighborItemProps } from '@semcore/neighbor-location';
6
+ import { TooltipHintProps } from '@semcore/tooltip';
7
+ export type AbstractButtonProps<S, U, T> = BoxProps & NeighborItemProps & KeyboardFocusProps & {
8
+ /** Button activity state */
9
+ active?: boolean;
10
+ /** Disabled button state */
11
+ disabled?: boolean;
12
+ /** Loading button state */
13
+ loading?: boolean;
14
+ /** Tag for the left Addon */
15
+ addonLeft?: React.ElementType;
16
+ /** Tag for the right Addon */
17
+ addonRight?: React.ElementType;
18
+ /**
19
+ * Placement for hint
20
+ * @default top
21
+ */
22
+ hintPlacement?: TooltipHintProps['placement'];
23
+ /** Button type. Defined in Button.type or ButtonLink.type */
24
+ size?: S;
25
+ /** Button usage. Defined in Button.type or ButtonLink.type */
26
+ use?: U;
27
+ /** Button theme. Defined in Button.type or ButtonLink.type */
28
+ theme?: T;
29
+ };
30
+ export type AbstractButtonAddonProps<S> = BoxProps & {
31
+ size?: S;
32
+ };
33
+ export type AbstractButtonTextProps<S> = BoxProps & {
34
+ size?: S;
35
+ };
36
+ export type AbstractButtonContext = {
37
+ getTextProps: PropGetterFn;
38
+ getAddonProps: PropGetterFn;
39
+ };
@@ -1,3 +1,3 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  export declare const SPIN_SIZE_MAP: Record<string, string>;
3
- export default function SpinButton({ theme, size, ...others }: any): React.JSX.Element;
3
+ export default function SpinButton({ theme, size, ...others }: any): JSX.Element;
@@ -1,30 +1,3 @@
1
- import { Component } from '@semcore/core';
2
- import React from 'react';
3
- import type { ButtonProps, ButtonComponent } from './Button.type';
4
- export declare const MAP_USE_DEFAULT_THEME: Record<string, string>;
5
- type State = {
6
- ariaLabelledByContent: null | string;
7
- };
8
- export declare class RootButton extends Component<ButtonProps, [], never, {}, State> {
9
- static displayName: string;
10
- static style: {
11
- [key: string]: string;
12
- };
13
- static defaultProps: {
14
- use: string;
15
- size: string;
16
- };
17
- containerRef: React.RefObject<HTMLButtonElement>;
18
- state: State;
19
- getTextProps(): {
20
- size: "l" | "m" | undefined;
21
- 'hint:triggerRef': React.RefObject<HTMLButtonElement>;
22
- };
23
- getAddonProps(): {
24
- size: "l" | "m" | undefined;
25
- };
26
- componentDidMount(): void;
27
- render(): React.JSX.Element;
28
- }
1
+ import { ButtonComponent } from './Button.type';
29
2
  declare const Button: ButtonComponent;
30
3
  export default Button;
@@ -1,44 +1,43 @@
1
- import type { BoxProps, NeighborItemProps, SimpleHintPopperProps } from '@semcore/base-components';
2
- import type { Intergalactic, PropGetterFn } from '@semcore/core';
3
- import type { NSText } from '@semcore/typography';
4
- import type React from 'react';
5
- export type ButtonProps = BoxProps & NeighborItemProps & {
6
- /** Button activity state */
7
- active?: boolean;
8
- /** Disabled button state */
9
- disabled?: boolean;
10
- /** Loading button state */
11
- loading?: boolean;
12
- /** Tag for the left Addon */
13
- addonLeft?: React.ElementType;
14
- /** Tag for the right Addon */
15
- addonRight?: React.ElementType;
16
- /**
17
- * Placement for hint
18
- * @default top
19
- */
20
- hintPlacement?: SimpleHintPopperProps['placement'];
21
- /** Button size.
22
- * @default `m`
23
- */
24
- size?: 'l' | 'm';
25
- /** Button usage.
26
- * @default `primary`
27
- */
28
- use?: 'primary' | 'secondary' | 'tertiary';
29
- /** Button theme.
30
- * @default undefined
31
- */
32
- theme?: 'info' | 'success' | 'brand' | 'danger' | 'muted' | 'invert';
33
- };
34
- export type ButtonTextProps = NSText.Props;
35
- export type ButtonAddonProps = BoxProps;
36
- export type ButtonContext = {
37
- getTextProps: PropGetterFn;
38
- getAddonProps: PropGetterFn;
39
- };
1
+ import { UnknownProperties, Intergalactic } from '@semcore/core';
2
+ import { AbstractButtonAddonProps, AbstractButtonContext, AbstractButtonTextProps, AbstractButtonProps } from '../AbstractButton/AbstractButton.type';
3
+ /**
4
+ * Button size
5
+ * @default m
6
+ */
7
+ export type ButtonSize = 'l' | 'm';
8
+ /**
9
+ * Button type
10
+ * @default secondary
11
+ */
12
+ type Use = 'primary' | 'secondary' | 'tertiary';
13
+ /**
14
+ * @deprecated don't use it. use `danger` for incorrect or danger behavior and `brand` for the orange one.
15
+ */
16
+ type DeprecatedTheme = 'warning';
17
+ /** Button theme */
18
+ type Theme = 'info' | 'success' | 'brand' | 'danger' | 'muted' | 'invert';
19
+ /** @deprecated */
20
+ export interface IButtonProps extends ButtonProps, UnknownProperties {
21
+ }
22
+ export type ButtonProps = AbstractButtonProps<ButtonSize, Use, Theme | DeprecatedTheme>;
23
+ /** @deprecated */
24
+ export interface IButtonTextProps extends ButtonTextProps, UnknownProperties {
25
+ }
26
+ export type ButtonTextProps = AbstractButtonTextProps<ButtonSize>;
27
+ /** @deprecated */
28
+ export interface IButtonAddonProps extends ButtonAddonProps, UnknownProperties {
29
+ }
30
+ export type ButtonAddonProps = AbstractButtonAddonProps<ButtonSize>;
31
+ /** @deprecated */
32
+ export interface IButtonContext extends ButtonContext, UnknownProperties {
33
+ }
34
+ export type ButtonContext = AbstractButtonContext;
40
35
  export type ButtonChildren = {
41
36
  Text: Intergalactic.Component<'span', ButtonTextProps>;
42
37
  Addon: Intergalactic.Component<'span', ButtonAddonProps>;
43
38
  };
44
- export type ButtonComponent = Intergalactic.Component<'button', ButtonProps, ButtonContext> & ButtonChildren;
39
+ export type ButtonComponent = Intergalactic.Component<'button', ButtonProps, ButtonContext> & {
40
+ Text: Intergalactic.Component<'span', ButtonTextProps>;
41
+ Addon: Intergalactic.Component<'span', ButtonAddonProps>;
42
+ };
43
+ export {};
@@ -1,2 +1,2 @@
1
- import type { ButtonLinkComponent } from './ButtonLink.type';
1
+ import { ButtonLinkComponent } from './ButtonLink.type';
2
2
  export declare const ButtonLink: ButtonLinkComponent;
@@ -1,19 +1,25 @@
1
- import type { BoxProps } from '@semcore/base-components';
2
- import type { Intergalactic } from '@semcore/core';
3
- import type { LinkProps } from '@semcore/link';
4
- import type { NSText } from '@semcore/typography';
5
- import type { ButtonContext } from '../Button/Button.type';
6
- export type ButtonLinkProps = Intergalactic.InternalTypings.EfficientOmit<LinkProps, 'enableVisited'> & {
7
- /**
8
- * Button link type
9
- * @default primary
10
- */
11
- use?: 'primary' | 'secondary';
12
- };
13
- export type ButtonLinkTextProps = NSText.Props;
14
- export type ButtonLinkAddonProps = BoxProps;
1
+ import { Intergalactic } from '@semcore/core';
2
+ import { AbstractButtonAddonProps, AbstractButtonContext, AbstractButtonTextProps, AbstractButtonProps } from '../AbstractButton/AbstractButton.type';
3
+ /**
4
+ * Button link size
5
+ * @default m
6
+ */
7
+ export type ButtonLinkSize = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800;
8
+ /**
9
+ * Button link type
10
+ * @default primary
11
+ */
12
+ type Use = 'primary' | 'secondary';
13
+ export type ButtonLinkProps = AbstractButtonProps<ButtonLinkSize, Use, never>;
14
+ export type ButtonLinkTextProps = AbstractButtonTextProps<ButtonLinkSize>;
15
+ export type ButtonLinkAddonProps = AbstractButtonAddonProps<ButtonLinkSize>;
16
+ export type ButtonLinkContext = AbstractButtonContext;
15
17
  export type ButtonLinkChildren = {
16
18
  Text: Intergalactic.Component<'span', ButtonLinkTextProps>;
17
19
  Addon: Intergalactic.Component<'span', ButtonLinkAddonProps>;
18
20
  };
19
- export type ButtonLinkComponent = Intergalactic.Component<'button', ButtonLinkProps, ButtonContext> & ButtonLinkChildren;
21
+ export type ButtonLinkComponent = Intergalactic.Component<'button', ButtonLinkProps, ButtonLinkContext> & {
22
+ Text: Intergalactic.Component<'span', ButtonLinkTextProps>;
23
+ Addon: Intergalactic.Component<'span', ButtonLinkAddonProps>;
24
+ };
25
+ export {};
@@ -1,4 +1,5 @@
1
- export { default, MAP_USE_DEFAULT_THEME } from './component/Button/Button';
1
+ export { default } from './component/Button/Button';
2
2
  export * from './component/Button/Button.type';
3
3
  export * from './component/ButtonLink/ButtonLink';
4
4
  export * from './component/ButtonLink/ButtonLink.type';
5
+ export { MAP_USE_DEFAULT_THEME } from './component/AbstractButton/AbstractButton';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/button",
3
3
  "description": "Semrush Button Component",
4
- "version": "5.44.0-prerelease.5",
4
+ "version": "5.44.0-prerelease.6",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -14,14 +14,14 @@
14
14
  "types": "./lib/types/index.d.ts"
15
15
  },
16
16
  "dependencies": {
17
- "@semcore/flex-box": "5.42.0-prerelease.5",
18
- "@semcore/neighbor-location": "4.41.0-prerelease.5",
19
- "@semcore/spin": "5.42.0-prerelease.5",
20
- "@semcore/tooltip": "6.50.0-prerelease.5",
21
- "@semcore/utils": "4.49.0-prerelease.5"
17
+ "@semcore/flex-box": "5.42.0-prerelease.6",
18
+ "@semcore/neighbor-location": "4.41.0-prerelease.6",
19
+ "@semcore/spin": "5.42.0-prerelease.6",
20
+ "@semcore/tooltip": "6.50.0-prerelease.6",
21
+ "@semcore/utils": "4.49.0-prerelease.6"
22
22
  },
23
23
  "peerDependencies": {
24
- "@semcore/core": "^2.40.0-prerelease.5",
24
+ "@semcore/core": "^2.40.0-prerelease.6",
25
25
  "react": "16.8 - 18",
26
26
  "react-dom": "16.8 - 18"
27
27
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpinButton.js","names":["_spin","_interopRequireDefault","require","_react","_excluded","SPIN_SIZE_MAP","exports","xl","l","m","s","SpinButton","_ref","theme","size","others","_objectWithoutProperties2","createElement","_extends2"],"sources":["../../../../src/component/Button/SpinButton.tsx"],"sourcesContent":["import Spin from '@semcore/spin';\nimport React from 'react';\n\nexport const SPIN_SIZE_MAP: Record<string, string> = {\n xl: 'm',\n l: 's',\n m: 'xs',\n s: 'xxs',\n};\n\nexport default function SpinButton({ theme, size, ...others }: any) {\n return (\n <Spin\n size={typeof size === 'string' ? SPIN_SIZE_MAP[size] : size}\n theme='currentColor'\n {...others}\n />\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA0B,IAAAE,SAAA;AAEnB,IAAMC,aAAqC,GAAAC,OAAA,CAAAD,aAAA,GAAG;EACnDE,EAAE,EAAE,GAAG;EACPC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE;AACL,CAAC;AAEc,SAASC,UAAUA,CAAAC,IAAA,EAAkC;EAAA,IAA/BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAKC,MAAM,OAAAC,yBAAA,aAAAJ,IAAA,EAAAR,SAAA;EACzD,oBACED,MAAA,YAAAc,aAAA,CAACjB,KAAA,WAAI,MAAAkB,SAAA;IACHJ,IAAI,EAAE,OAAOA,IAAI,KAAK,QAAQ,GAAGT,aAAa,CAACS,IAAI,CAAC,GAAGA,IAAK;IAC5DD,KAAK,EAAC;EAAc,GAChBE,MAAM,CACX,CAAC;AAEN","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SpinButton.js","names":["Spin","React","SPIN_SIZE_MAP","xl","l","m","s","SpinButton","_ref","theme","size","others","_objectWithoutProperties","_excluded","createElement","_extends"],"sources":["../../../../src/component/Button/SpinButton.tsx"],"sourcesContent":["import Spin from '@semcore/spin';\nimport React from 'react';\n\nexport const SPIN_SIZE_MAP: Record<string, string> = {\n xl: 'm',\n l: 's',\n m: 'xs',\n s: 'xxs',\n};\n\nexport default function SpinButton({ theme, size, ...others }: any) {\n return (\n <Spin\n size={typeof size === 'string' ? SPIN_SIZE_MAP[size] : size}\n theme='currentColor'\n {...others}\n />\n );\n}\n"],"mappings":";;;AAAA,OAAOA,IAAI,MAAM,eAAe;AAChC,OAAOC,KAAK,MAAM,OAAO;AAEzB,OAAO,IAAMC,aAAqC,GAAG;EACnDC,EAAE,EAAE,GAAG;EACPC,CAAC,EAAE,GAAG;EACNC,CAAC,EAAE,IAAI;EACPC,CAAC,EAAE;AACL,CAAC;AAED,eAAe,SAASC,UAAUA,CAAAC,IAAA,EAAkC;EAAA,IAA/BC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAKC,MAAM,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,SAAA;EACzD,oBACEZ,KAAA,CAAAa,aAAA,CAACd,IAAI,EAAAe,QAAA;IACHL,IAAI,EAAE,OAAOA,IAAI,KAAK,QAAQ,GAAGR,aAAa,CAACQ,IAAI,CAAC,GAAGA,IAAK;IAC5DD,KAAK,EAAC;EAAc,GAChBE,MAAM,CACX,CAAC;AAEN","ignoreList":[]}