@smuikit/core 0.1.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.
- package/dist/chunk-3SIG5GVW.mjs +94 -0
- package/dist/chunk-CG7MB4D7.mjs +139 -0
- package/dist/chunk-DEYVI3GG.js +37 -0
- package/dist/chunk-ECS4ZLAD.mjs +94 -0
- package/dist/chunk-EQR2S6TY.js +97 -0
- package/dist/chunk-IRJ3PEU4.mjs +35 -0
- package/dist/chunk-JTKA5LGK.mjs +35 -0
- package/dist/chunk-KQF35W7O.mjs +32 -0
- package/dist/chunk-KWFE67IV.js +56 -0
- package/dist/chunk-O7JRMYZ5.js +97 -0
- package/dist/chunk-OLRCZXKS.js +34 -0
- package/dist/chunk-Y34GDQYY.js +142 -0
- package/dist/chunk-YFNMWGC7.mjs +54 -0
- package/dist/chunk-YTHNCP77.js +44 -0
- package/dist/create-machine-DsOUIlfe.d.mts +30 -0
- package/dist/create-machine-DsOUIlfe.d.ts +30 -0
- package/dist/index.d.mts +26 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +119 -0
- package/dist/index.mjs +46 -0
- package/dist/machines/button/index.d.mts +44 -0
- package/dist/machines/button/index.d.ts +44 -0
- package/dist/machines/button/index.js +16 -0
- package/dist/machines/button/index.mjs +3 -0
- package/dist/machines/card/index.d.mts +17 -0
- package/dist/machines/card/index.d.ts +17 -0
- package/dist/machines/card/index.js +10 -0
- package/dist/machines/card/index.mjs +1 -0
- package/dist/machines/input/index.d.mts +48 -0
- package/dist/machines/input/index.d.ts +48 -0
- package/dist/machines/input/index.js +16 -0
- package/dist/machines/input/index.mjs +3 -0
- package/dist/machines/modal/index.d.mts +44 -0
- package/dist/machines/modal/index.d.ts +44 -0
- package/dist/machines/modal/index.js +15 -0
- package/dist/machines/modal/index.mjs +2 -0
- package/dist/machines/typography/index.d.mts +15 -0
- package/dist/machines/typography/index.d.ts +15 -0
- package/dist/machines/typography/index.js +10 -0
- package/dist/machines/typography/index.mjs +1 -0
- package/dist/types-DxOTxdrs.d.mts +9 -0
- package/dist/types-DxOTxdrs.d.ts +9 -0
- package/package.json +87 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { a as MachineService } from '../../create-machine-DsOUIlfe.mjs';
|
|
2
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.mjs';
|
|
3
|
+
|
|
4
|
+
type ButtonState = 'idle' | 'pressed' | 'focused';
|
|
5
|
+
interface ButtonContext {
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
variant: 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'danger';
|
|
9
|
+
size: 'sm' | 'md' | 'lg';
|
|
10
|
+
}
|
|
11
|
+
type ButtonEvent = {
|
|
12
|
+
type: 'PRESS';
|
|
13
|
+
} | {
|
|
14
|
+
type: 'RELEASE';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'FOCUS';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'BLUR';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'SET_LOADING';
|
|
21
|
+
loading: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'SET_DISABLED';
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
};
|
|
26
|
+
type ButtonMachineService = MachineService<ButtonState, ButtonContext, ButtonEvent>;
|
|
27
|
+
declare function createButtonMachine(initialContext?: Partial<ButtonContext>): ButtonMachineService;
|
|
28
|
+
|
|
29
|
+
interface ButtonConnectReturn {
|
|
30
|
+
rootProps: ElementProps;
|
|
31
|
+
loadingProps: ElementProps;
|
|
32
|
+
isDisabled: boolean;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
state: ButtonState;
|
|
35
|
+
}
|
|
36
|
+
interface ButtonConnectOptions {
|
|
37
|
+
state: ButtonState;
|
|
38
|
+
context: ButtonContext;
|
|
39
|
+
send: (event: any) => void;
|
|
40
|
+
onClick?: (event: unknown) => void;
|
|
41
|
+
}
|
|
42
|
+
declare function connectButton(options: ButtonConnectOptions): ButtonConnectReturn;
|
|
43
|
+
|
|
44
|
+
export { type ButtonConnectOptions, type ButtonConnectReturn, type ButtonContext, type ButtonEvent, type ButtonMachineService, type ButtonState, connectButton, createButtonMachine };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { a as MachineService } from '../../create-machine-DsOUIlfe.js';
|
|
2
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.js';
|
|
3
|
+
|
|
4
|
+
type ButtonState = 'idle' | 'pressed' | 'focused';
|
|
5
|
+
interface ButtonContext {
|
|
6
|
+
disabled: boolean;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
variant: 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'danger';
|
|
9
|
+
size: 'sm' | 'md' | 'lg';
|
|
10
|
+
}
|
|
11
|
+
type ButtonEvent = {
|
|
12
|
+
type: 'PRESS';
|
|
13
|
+
} | {
|
|
14
|
+
type: 'RELEASE';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'FOCUS';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'BLUR';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'SET_LOADING';
|
|
21
|
+
loading: boolean;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'SET_DISABLED';
|
|
24
|
+
disabled: boolean;
|
|
25
|
+
};
|
|
26
|
+
type ButtonMachineService = MachineService<ButtonState, ButtonContext, ButtonEvent>;
|
|
27
|
+
declare function createButtonMachine(initialContext?: Partial<ButtonContext>): ButtonMachineService;
|
|
28
|
+
|
|
29
|
+
interface ButtonConnectReturn {
|
|
30
|
+
rootProps: ElementProps;
|
|
31
|
+
loadingProps: ElementProps;
|
|
32
|
+
isDisabled: boolean;
|
|
33
|
+
isLoading: boolean;
|
|
34
|
+
state: ButtonState;
|
|
35
|
+
}
|
|
36
|
+
interface ButtonConnectOptions {
|
|
37
|
+
state: ButtonState;
|
|
38
|
+
context: ButtonContext;
|
|
39
|
+
send: (event: any) => void;
|
|
40
|
+
onClick?: (event: unknown) => void;
|
|
41
|
+
}
|
|
42
|
+
declare function connectButton(options: ButtonConnectOptions): ButtonConnectReturn;
|
|
43
|
+
|
|
44
|
+
export { type ButtonConnectOptions, type ButtonConnectReturn, type ButtonContext, type ButtonEvent, type ButtonMachineService, type ButtonState, connectButton, createButtonMachine };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkEQR2S6TY_js = require('../../chunk-EQR2S6TY.js');
|
|
4
|
+
require('../../chunk-YTHNCP77.js');
|
|
5
|
+
require('../../chunk-KWFE67IV.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "connectButton", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkEQR2S6TY_js.connectButton; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "createButtonMachine", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkEQR2S6TY_js.createButtonMachine; }
|
|
16
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.mjs';
|
|
2
|
+
|
|
3
|
+
interface CardConnectReturn {
|
|
4
|
+
rootProps: ElementProps;
|
|
5
|
+
headerProps: ElementProps;
|
|
6
|
+
bodyProps: ElementProps;
|
|
7
|
+
footerProps: ElementProps;
|
|
8
|
+
}
|
|
9
|
+
interface CardConnectOptions {
|
|
10
|
+
variant?: 'elevated' | 'outlined' | 'filled';
|
|
11
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
12
|
+
interactive?: boolean;
|
|
13
|
+
onClick?: (event: unknown) => void;
|
|
14
|
+
}
|
|
15
|
+
declare function connectCard(options?: CardConnectOptions): CardConnectReturn;
|
|
16
|
+
|
|
17
|
+
export { type CardConnectOptions, type CardConnectReturn, connectCard };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.js';
|
|
2
|
+
|
|
3
|
+
interface CardConnectReturn {
|
|
4
|
+
rootProps: ElementProps;
|
|
5
|
+
headerProps: ElementProps;
|
|
6
|
+
bodyProps: ElementProps;
|
|
7
|
+
footerProps: ElementProps;
|
|
8
|
+
}
|
|
9
|
+
interface CardConnectOptions {
|
|
10
|
+
variant?: 'elevated' | 'outlined' | 'filled';
|
|
11
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
12
|
+
interactive?: boolean;
|
|
13
|
+
onClick?: (event: unknown) => void;
|
|
14
|
+
}
|
|
15
|
+
declare function connectCard(options?: CardConnectOptions): CardConnectReturn;
|
|
16
|
+
|
|
17
|
+
export { type CardConnectOptions, type CardConnectReturn, connectCard };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { connectCard } from '../../chunk-KQF35W7O.mjs';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { a as MachineService } from '../../create-machine-DsOUIlfe.mjs';
|
|
2
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.mjs';
|
|
3
|
+
|
|
4
|
+
type InputState = 'idle' | 'focused' | 'filled' | 'error';
|
|
5
|
+
interface InputContext {
|
|
6
|
+
value: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
readOnly: boolean;
|
|
9
|
+
required: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
label: string;
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
type InputEvent = {
|
|
16
|
+
type: 'FOCUS';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'BLUR';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'CHANGE';
|
|
21
|
+
value: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'SET_ERROR';
|
|
24
|
+
error: string | null;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'CLEAR';
|
|
27
|
+
};
|
|
28
|
+
type InputMachineService = MachineService<InputState, InputContext, InputEvent>;
|
|
29
|
+
declare function createInputMachine(initialContext?: Partial<InputContext>): InputMachineService;
|
|
30
|
+
|
|
31
|
+
interface InputConnectReturn {
|
|
32
|
+
rootProps: ElementProps;
|
|
33
|
+
labelProps: ElementProps;
|
|
34
|
+
inputProps: ElementProps;
|
|
35
|
+
errorProps: ElementProps;
|
|
36
|
+
state: InputState;
|
|
37
|
+
value: string;
|
|
38
|
+
hasError: boolean;
|
|
39
|
+
}
|
|
40
|
+
interface InputConnectOptions {
|
|
41
|
+
state: InputState;
|
|
42
|
+
context: InputContext;
|
|
43
|
+
send: (event: any) => void;
|
|
44
|
+
onChange?: (value: string) => void;
|
|
45
|
+
}
|
|
46
|
+
declare function connectInput(options: InputConnectOptions): InputConnectReturn;
|
|
47
|
+
|
|
48
|
+
export { type InputConnectOptions, type InputConnectReturn, type InputContext, type InputEvent, type InputMachineService, type InputState, connectInput, createInputMachine };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { a as MachineService } from '../../create-machine-DsOUIlfe.js';
|
|
2
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.js';
|
|
3
|
+
|
|
4
|
+
type InputState = 'idle' | 'focused' | 'filled' | 'error';
|
|
5
|
+
interface InputContext {
|
|
6
|
+
value: string;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
readOnly: boolean;
|
|
9
|
+
required: boolean;
|
|
10
|
+
error: string | null;
|
|
11
|
+
placeholder: string;
|
|
12
|
+
label: string;
|
|
13
|
+
id: string;
|
|
14
|
+
}
|
|
15
|
+
type InputEvent = {
|
|
16
|
+
type: 'FOCUS';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'BLUR';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'CHANGE';
|
|
21
|
+
value: string;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'SET_ERROR';
|
|
24
|
+
error: string | null;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'CLEAR';
|
|
27
|
+
};
|
|
28
|
+
type InputMachineService = MachineService<InputState, InputContext, InputEvent>;
|
|
29
|
+
declare function createInputMachine(initialContext?: Partial<InputContext>): InputMachineService;
|
|
30
|
+
|
|
31
|
+
interface InputConnectReturn {
|
|
32
|
+
rootProps: ElementProps;
|
|
33
|
+
labelProps: ElementProps;
|
|
34
|
+
inputProps: ElementProps;
|
|
35
|
+
errorProps: ElementProps;
|
|
36
|
+
state: InputState;
|
|
37
|
+
value: string;
|
|
38
|
+
hasError: boolean;
|
|
39
|
+
}
|
|
40
|
+
interface InputConnectOptions {
|
|
41
|
+
state: InputState;
|
|
42
|
+
context: InputContext;
|
|
43
|
+
send: (event: any) => void;
|
|
44
|
+
onChange?: (value: string) => void;
|
|
45
|
+
}
|
|
46
|
+
declare function connectInput(options: InputConnectOptions): InputConnectReturn;
|
|
47
|
+
|
|
48
|
+
export { type InputConnectOptions, type InputConnectReturn, type InputContext, type InputEvent, type InputMachineService, type InputState, connectInput, createInputMachine };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkY34GDQYY_js = require('../../chunk-Y34GDQYY.js');
|
|
4
|
+
require('../../chunk-YTHNCP77.js');
|
|
5
|
+
require('../../chunk-KWFE67IV.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, "connectInput", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return chunkY34GDQYY_js.connectInput; }
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "createInputMachine", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return chunkY34GDQYY_js.createInputMachine; }
|
|
16
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { a as MachineService } from '../../create-machine-DsOUIlfe.mjs';
|
|
2
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.mjs';
|
|
3
|
+
|
|
4
|
+
type ModalState = 'closed' | 'open';
|
|
5
|
+
interface ModalContext {
|
|
6
|
+
triggerId: string;
|
|
7
|
+
contentId: string;
|
|
8
|
+
titleId: string;
|
|
9
|
+
closeOnOverlayClick: boolean;
|
|
10
|
+
closeOnEscape: boolean;
|
|
11
|
+
trapFocus: boolean;
|
|
12
|
+
}
|
|
13
|
+
type ModalEvent = {
|
|
14
|
+
type: 'OPEN';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'CLOSE';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'TOGGLE';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'ESCAPE';
|
|
21
|
+
} | {
|
|
22
|
+
type: 'OVERLAY_CLICK';
|
|
23
|
+
};
|
|
24
|
+
type ModalMachineService = MachineService<ModalState, ModalContext, ModalEvent>;
|
|
25
|
+
declare function createModalMachine(initialContext?: Partial<ModalContext>): ModalMachineService;
|
|
26
|
+
|
|
27
|
+
interface ModalConnectReturn {
|
|
28
|
+
triggerProps: ElementProps;
|
|
29
|
+
contentProps: ElementProps;
|
|
30
|
+
overlayProps: ElementProps;
|
|
31
|
+
closeProps: ElementProps;
|
|
32
|
+
titleProps: ElementProps;
|
|
33
|
+
isOpen: boolean;
|
|
34
|
+
state: ModalState;
|
|
35
|
+
}
|
|
36
|
+
interface ModalConnectOptions {
|
|
37
|
+
state: ModalState;
|
|
38
|
+
context: ModalContext;
|
|
39
|
+
send: (event: any) => void;
|
|
40
|
+
onOpenChange?: (open: boolean) => void;
|
|
41
|
+
}
|
|
42
|
+
declare function connectModal(options: ModalConnectOptions): ModalConnectReturn;
|
|
43
|
+
|
|
44
|
+
export { type ModalConnectOptions, type ModalConnectReturn, type ModalContext, type ModalEvent, type ModalMachineService, type ModalState, connectModal, createModalMachine };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { a as MachineService } from '../../create-machine-DsOUIlfe.js';
|
|
2
|
+
import { E as ElementProps } from '../../types-DxOTxdrs.js';
|
|
3
|
+
|
|
4
|
+
type ModalState = 'closed' | 'open';
|
|
5
|
+
interface ModalContext {
|
|
6
|
+
triggerId: string;
|
|
7
|
+
contentId: string;
|
|
8
|
+
titleId: string;
|
|
9
|
+
closeOnOverlayClick: boolean;
|
|
10
|
+
closeOnEscape: boolean;
|
|
11
|
+
trapFocus: boolean;
|
|
12
|
+
}
|
|
13
|
+
type ModalEvent = {
|
|
14
|
+
type: 'OPEN';
|
|
15
|
+
} | {
|
|
16
|
+
type: 'CLOSE';
|
|
17
|
+
} | {
|
|
18
|
+
type: 'TOGGLE';
|
|
19
|
+
} | {
|
|
20
|
+
type: 'ESCAPE';
|
|
21
|
+
} | {
|
|
22
|
+
type: 'OVERLAY_CLICK';
|
|
23
|
+
};
|
|
24
|
+
type ModalMachineService = MachineService<ModalState, ModalContext, ModalEvent>;
|
|
25
|
+
declare function createModalMachine(initialContext?: Partial<ModalContext>): ModalMachineService;
|
|
26
|
+
|
|
27
|
+
interface ModalConnectReturn {
|
|
28
|
+
triggerProps: ElementProps;
|
|
29
|
+
contentProps: ElementProps;
|
|
30
|
+
overlayProps: ElementProps;
|
|
31
|
+
closeProps: ElementProps;
|
|
32
|
+
titleProps: ElementProps;
|
|
33
|
+
isOpen: boolean;
|
|
34
|
+
state: ModalState;
|
|
35
|
+
}
|
|
36
|
+
interface ModalConnectOptions {
|
|
37
|
+
state: ModalState;
|
|
38
|
+
context: ModalContext;
|
|
39
|
+
send: (event: any) => void;
|
|
40
|
+
onOpenChange?: (open: boolean) => void;
|
|
41
|
+
}
|
|
42
|
+
declare function connectModal(options: ModalConnectOptions): ModalConnectReturn;
|
|
43
|
+
|
|
44
|
+
export { type ModalConnectOptions, type ModalConnectReturn, type ModalContext, type ModalEvent, type ModalMachineService, type ModalState, connectModal, createModalMachine };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkO7JRMYZ5_js = require('../../chunk-O7JRMYZ5.js');
|
|
4
|
+
require('../../chunk-KWFE67IV.js');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "connectModal", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkO7JRMYZ5_js.connectModal; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "createModalMachine", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkO7JRMYZ5_js.createModalMachine; }
|
|
15
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { T as TypographyVariant, E as ElementProps } from '../../types-DxOTxdrs.mjs';
|
|
2
|
+
|
|
3
|
+
interface TypographyConnectReturn {
|
|
4
|
+
rootProps: ElementProps;
|
|
5
|
+
element: string;
|
|
6
|
+
}
|
|
7
|
+
interface TypographyConnectOptions {
|
|
8
|
+
variant: TypographyVariant;
|
|
9
|
+
align?: 'left' | 'center' | 'right';
|
|
10
|
+
truncate?: boolean;
|
|
11
|
+
color?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function connectTypography(options: TypographyConnectOptions): TypographyConnectReturn;
|
|
14
|
+
|
|
15
|
+
export { type TypographyConnectOptions, type TypographyConnectReturn, connectTypography };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { T as TypographyVariant, E as ElementProps } from '../../types-DxOTxdrs.js';
|
|
2
|
+
|
|
3
|
+
interface TypographyConnectReturn {
|
|
4
|
+
rootProps: ElementProps;
|
|
5
|
+
element: string;
|
|
6
|
+
}
|
|
7
|
+
interface TypographyConnectOptions {
|
|
8
|
+
variant: TypographyVariant;
|
|
9
|
+
align?: 'left' | 'center' | 'right';
|
|
10
|
+
truncate?: boolean;
|
|
11
|
+
color?: string;
|
|
12
|
+
}
|
|
13
|
+
declare function connectTypography(options: TypographyConnectOptions): TypographyConnectReturn;
|
|
14
|
+
|
|
15
|
+
export { type TypographyConnectOptions, type TypographyConnectReturn, connectTypography };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { connectTypography } from '../../chunk-JTKA5LGK.mjs';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface PropTypes {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
}
|
|
4
|
+
type ElementProps = Record<string, unknown>;
|
|
5
|
+
type Variant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'danger';
|
|
6
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
7
|
+
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'body' | 'h5' | 'h6' | 'body1' | 'body2' | 'caption' | 'overline';
|
|
8
|
+
|
|
9
|
+
export type { ElementProps as E, PropTypes as P, Size as S, TypographyVariant as T, Variant as V };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface PropTypes {
|
|
2
|
+
[key: string]: unknown;
|
|
3
|
+
}
|
|
4
|
+
type ElementProps = Record<string, unknown>;
|
|
5
|
+
type Variant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'danger';
|
|
6
|
+
type Size = 'sm' | 'md' | 'lg';
|
|
7
|
+
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'body' | 'h5' | 'h6' | 'body1' | 'body2' | 'caption' | 'overline';
|
|
8
|
+
|
|
9
|
+
export type { ElementProps as E, PropTypes as P, Size as S, TypographyVariant as T, Variant as V };
|
package/package.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@smuikit/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Framework-agnostic component logic for SMUI",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": {
|
|
11
|
+
"types": "./dist/index.d.mts",
|
|
12
|
+
"default": "./dist/index.mjs"
|
|
13
|
+
},
|
|
14
|
+
"require": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"./button": {
|
|
20
|
+
"import": {
|
|
21
|
+
"types": "./dist/machines/button/index.d.mts",
|
|
22
|
+
"default": "./dist/machines/button/index.mjs"
|
|
23
|
+
},
|
|
24
|
+
"require": {
|
|
25
|
+
"types": "./dist/machines/button/index.d.ts",
|
|
26
|
+
"default": "./dist/machines/button/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"./input": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/machines/input/index.d.mts",
|
|
32
|
+
"default": "./dist/machines/input/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"types": "./dist/machines/input/index.d.ts",
|
|
36
|
+
"default": "./dist/machines/input/index.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"./modal": {
|
|
40
|
+
"import": {
|
|
41
|
+
"types": "./dist/machines/modal/index.d.mts",
|
|
42
|
+
"default": "./dist/machines/modal/index.mjs"
|
|
43
|
+
},
|
|
44
|
+
"require": {
|
|
45
|
+
"types": "./dist/machines/modal/index.d.ts",
|
|
46
|
+
"default": "./dist/machines/modal/index.js"
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
"./typography": {
|
|
50
|
+
"import": {
|
|
51
|
+
"types": "./dist/machines/typography/index.d.mts",
|
|
52
|
+
"default": "./dist/machines/typography/index.mjs"
|
|
53
|
+
},
|
|
54
|
+
"require": {
|
|
55
|
+
"types": "./dist/machines/typography/index.d.ts",
|
|
56
|
+
"default": "./dist/machines/typography/index.js"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"./card": {
|
|
60
|
+
"import": {
|
|
61
|
+
"types": "./dist/machines/card/index.d.mts",
|
|
62
|
+
"default": "./dist/machines/card/index.mjs"
|
|
63
|
+
},
|
|
64
|
+
"require": {
|
|
65
|
+
"types": "./dist/machines/card/index.d.ts",
|
|
66
|
+
"default": "./dist/machines/card/index.js"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"files": ["dist"],
|
|
71
|
+
"sideEffects": false,
|
|
72
|
+
"publishConfig": {
|
|
73
|
+
"access": "public"
|
|
74
|
+
},
|
|
75
|
+
"license": "MIT",
|
|
76
|
+
"scripts": {
|
|
77
|
+
"build": "tsup",
|
|
78
|
+
"test": "vitest run",
|
|
79
|
+
"test:watch": "vitest",
|
|
80
|
+
"typecheck": "tsc --noEmit",
|
|
81
|
+
"clean": "rm -rf dist"
|
|
82
|
+
},
|
|
83
|
+
"devDependencies": {
|
|
84
|
+
"tsup": "^8.3.0",
|
|
85
|
+
"vitest": "^2.1.0"
|
|
86
|
+
}
|
|
87
|
+
}
|