@mekari/pixel3-input 0.0.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-62L6URRB.mjs +32 -0
- package/dist/chunk-AH5Q4AP2.mjs +81 -0
- package/dist/chunk-EF6JEV72.mjs +58 -0
- package/dist/chunk-JW2SLWRV.mjs +59 -0
- package/dist/chunk-ME6YL7P6.mjs +79 -0
- package/dist/chunk-QZ7VFGWC.mjs +6 -0
- package/dist/chunk-T766ACNL.mjs +127 -0
- package/dist/chunk-ZQ2NFCFA.mjs +83 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +483 -0
- package/dist/index.mjs +21 -0
- package/dist/input-addon.d.mts +48 -0
- package/dist/input-addon.d.ts +48 -0
- package/dist/input-addon.js +156 -0
- package/dist/input-addon.mjs +15 -0
- package/dist/input-group.d.mts +28 -0
- package/dist/input-group.d.ts +28 -0
- package/dist/input-group.js +115 -0
- package/dist/input-group.mjs +11 -0
- package/dist/input.d.mts +10 -0
- package/dist/input.d.ts +10 -0
- package/dist/input.js +304 -0
- package/dist/input.mjs +11 -0
- package/dist/metafile-cjs.json +1 -0
- package/dist/metafile-esm.json +1 -0
- package/dist/modules/input.connects.d.mts +12 -0
- package/dist/modules/input.connects.d.ts +12 -0
- package/dist/modules/input.connects.js +150 -0
- package/dist/modules/input.connects.mjs +11 -0
- package/dist/modules/input.hooks.d.mts +9 -0
- package/dist/modules/input.hooks.d.ts +9 -0
- package/dist/modules/input.hooks.js +261 -0
- package/dist/modules/input.hooks.mjs +13 -0
- package/dist/modules/input.machines.d.mts +48 -0
- package/dist/modules/input.machines.d.ts +48 -0
- package/dist/modules/input.machines.js +81 -0
- package/dist/modules/input.machines.mjs +11 -0
- package/dist/modules/input.props.d.mts +80 -0
- package/dist/modules/input.props.d.ts +80 -0
- package/dist/modules/input.props.js +110 -0
- package/dist/modules/input.props.mjs +13 -0
- package/dist/modules/input.types.d.mts +77 -0
- package/dist/modules/input.types.d.ts +77 -0
- package/dist/modules/input.types.js +18 -0
- package/dist/modules/input.types.mjs +0 -0
- package/package.json +50 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/modules/input.machines.ts
|
|
22
|
+
var input_machines_exports = {};
|
|
23
|
+
__export(input_machines_exports, {
|
|
24
|
+
inputAddonMachine: () => inputAddonMachine,
|
|
25
|
+
inputGroupMachine: () => inputGroupMachine,
|
|
26
|
+
inputMachine: () => inputMachine
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(input_machines_exports);
|
|
29
|
+
var import_xstate = require("xstate");
|
|
30
|
+
function inputMachine(context) {
|
|
31
|
+
return (0, import_xstate.createMachine)({
|
|
32
|
+
/** @xstate-layout N4IgpgJg5mDOIC5QEsB2AHArgFwMQGUBRAFQH0A1AQQBkBVQgbQAYBdRUdAe1mW2U9TsQAD0QBGAEwA6JrLnz5AdgA0IAJ7iJAXy2q0WPMQCaABUIUa9ZmyQguPPgKGiEEiYqkBWT00UAOADZPRQBmPwAWAE4Av1UNBDExEKlwzxCxTzFw8IDIiT9FAJ1dEFROCDghfRwhe15+QVsXEICpQrFFCXDfMKjcuPEklLSMrJy8gqLioA */
|
|
33
|
+
id: "input",
|
|
34
|
+
context: {
|
|
35
|
+
modelValue: "",
|
|
36
|
+
...context
|
|
37
|
+
},
|
|
38
|
+
on: {
|
|
39
|
+
SET_VALUE: {
|
|
40
|
+
actions: "setValue"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
predictableActionArguments: true
|
|
44
|
+
}, {
|
|
45
|
+
actions: {
|
|
46
|
+
setValue(ctx, evt) {
|
|
47
|
+
set.value(ctx, evt.value);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
__name(inputMachine, "inputMachine");
|
|
53
|
+
var set = {
|
|
54
|
+
value(ctx, value) {
|
|
55
|
+
ctx.modelValue = value;
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
function inputGroupMachine(context) {
|
|
59
|
+
return (0, import_xstate.createMachine)({
|
|
60
|
+
/** @xstate-layout N4IgpgJg5mDOIC5gF8A0IB2B7CdGgEMA3AgFwICcBaKCrAVwAd8RGtYBLUjrDFgD0QBGAEzoAnsJHIZyIA */
|
|
61
|
+
id: "input-group",
|
|
62
|
+
context,
|
|
63
|
+
predictableActionArguments: true
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
__name(inputGroupMachine, "inputGroupMachine");
|
|
67
|
+
function inputAddonMachine(context) {
|
|
68
|
+
return (0, import_xstate.createMachine)({
|
|
69
|
+
/** @xstate-layout N4IgpgJg5mDOIC5gF8A0IB2B7CdGgEsMAHAVwBcBaAQwgiw3xGK1gPIIaYA9EBGAEzoAnvwHIJyIA */
|
|
70
|
+
id: "input-addon",
|
|
71
|
+
context,
|
|
72
|
+
predictableActionArguments: true
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
__name(inputAddonMachine, "inputAddonMachine");
|
|
76
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
77
|
+
0 && (module.exports = {
|
|
78
|
+
inputAddonMachine,
|
|
79
|
+
inputGroupMachine,
|
|
80
|
+
inputMachine
|
|
81
|
+
});
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { InputSize, InputVariant, InputAddonPlacement } from './input.types.mjs';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
declare const inputProps: {
|
|
6
|
+
as: {
|
|
7
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: PropType<string | number | undefined>;
|
|
12
|
+
};
|
|
13
|
+
id: {
|
|
14
|
+
type: PropType<string | undefined>;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<InputSize | undefined>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
variant: {
|
|
21
|
+
type: PropType<InputVariant | undefined>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
placeholder: {
|
|
25
|
+
type: PropType<string | undefined>;
|
|
26
|
+
};
|
|
27
|
+
isReadOnly: {
|
|
28
|
+
type: PropType<boolean | undefined>;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
isDisabled: {
|
|
32
|
+
type: PropType<boolean | undefined>;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
isRequired: {
|
|
36
|
+
type: PropType<boolean | undefined>;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
isInvalid: {
|
|
40
|
+
type: PropType<boolean | undefined>;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
isFullWidth: {
|
|
44
|
+
type: PropType<boolean | undefined>;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
isClearable: {
|
|
48
|
+
type: PropType<boolean | undefined>;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
declare const inputGroupProps: {
|
|
53
|
+
id: {
|
|
54
|
+
type: PropType<string | undefined>;
|
|
55
|
+
};
|
|
56
|
+
size: {
|
|
57
|
+
type: PropType<InputSize | undefined>;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
declare const inputAddonProps: {
|
|
62
|
+
id: {
|
|
63
|
+
type: PropType<string | undefined>;
|
|
64
|
+
};
|
|
65
|
+
size: {
|
|
66
|
+
type: PropType<InputSize | undefined>;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
placement: {
|
|
70
|
+
type: PropType<InputAddonPlacement | undefined>;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
hasBackground: {
|
|
74
|
+
type: PropType<boolean | undefined>;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
declare const inputEmits: ("input" | "change" | "clear" | "update:modelValue")[];
|
|
79
|
+
|
|
80
|
+
export { inputAddonProps, inputEmits, inputGroupProps, inputProps };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { InputSize, InputVariant, InputAddonPlacement } from './input.types.js';
|
|
2
|
+
import { PropType } from 'vue';
|
|
3
|
+
import '@mekari/pixel3-utils';
|
|
4
|
+
|
|
5
|
+
declare const inputProps: {
|
|
6
|
+
as: {
|
|
7
|
+
type: PropType<keyof HTMLElementTagNameMap>;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
modelValue: {
|
|
11
|
+
type: PropType<string | number | undefined>;
|
|
12
|
+
};
|
|
13
|
+
id: {
|
|
14
|
+
type: PropType<string | undefined>;
|
|
15
|
+
};
|
|
16
|
+
size: {
|
|
17
|
+
type: PropType<InputSize | undefined>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
variant: {
|
|
21
|
+
type: PropType<InputVariant | undefined>;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
placeholder: {
|
|
25
|
+
type: PropType<string | undefined>;
|
|
26
|
+
};
|
|
27
|
+
isReadOnly: {
|
|
28
|
+
type: PropType<boolean | undefined>;
|
|
29
|
+
default: boolean;
|
|
30
|
+
};
|
|
31
|
+
isDisabled: {
|
|
32
|
+
type: PropType<boolean | undefined>;
|
|
33
|
+
default: boolean;
|
|
34
|
+
};
|
|
35
|
+
isRequired: {
|
|
36
|
+
type: PropType<boolean | undefined>;
|
|
37
|
+
default: boolean;
|
|
38
|
+
};
|
|
39
|
+
isInvalid: {
|
|
40
|
+
type: PropType<boolean | undefined>;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
43
|
+
isFullWidth: {
|
|
44
|
+
type: PropType<boolean | undefined>;
|
|
45
|
+
default: boolean;
|
|
46
|
+
};
|
|
47
|
+
isClearable: {
|
|
48
|
+
type: PropType<boolean | undefined>;
|
|
49
|
+
default: boolean;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
declare const inputGroupProps: {
|
|
53
|
+
id: {
|
|
54
|
+
type: PropType<string | undefined>;
|
|
55
|
+
};
|
|
56
|
+
size: {
|
|
57
|
+
type: PropType<InputSize | undefined>;
|
|
58
|
+
default: string;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
declare const inputAddonProps: {
|
|
62
|
+
id: {
|
|
63
|
+
type: PropType<string | undefined>;
|
|
64
|
+
};
|
|
65
|
+
size: {
|
|
66
|
+
type: PropType<InputSize | undefined>;
|
|
67
|
+
default: string;
|
|
68
|
+
};
|
|
69
|
+
placement: {
|
|
70
|
+
type: PropType<InputAddonPlacement | undefined>;
|
|
71
|
+
default: string;
|
|
72
|
+
};
|
|
73
|
+
hasBackground: {
|
|
74
|
+
type: PropType<boolean | undefined>;
|
|
75
|
+
default: boolean;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
declare const inputEmits: ("input" | "change" | "clear" | "update:modelValue")[];
|
|
79
|
+
|
|
80
|
+
export { inputAddonProps, inputEmits, inputGroupProps, inputProps };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/modules/input.props.ts
|
|
21
|
+
var input_props_exports = {};
|
|
22
|
+
__export(input_props_exports, {
|
|
23
|
+
inputAddonProps: () => inputAddonProps,
|
|
24
|
+
inputEmits: () => inputEmits,
|
|
25
|
+
inputGroupProps: () => inputGroupProps,
|
|
26
|
+
inputProps: () => inputProps
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(input_props_exports);
|
|
29
|
+
var import_pixel3_utils = require("@mekari/pixel3-utils");
|
|
30
|
+
var inputProps = {
|
|
31
|
+
as: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: "input"
|
|
34
|
+
},
|
|
35
|
+
modelValue: {
|
|
36
|
+
type: [String, Number]
|
|
37
|
+
},
|
|
38
|
+
id: {
|
|
39
|
+
type: String
|
|
40
|
+
},
|
|
41
|
+
size: {
|
|
42
|
+
type: String,
|
|
43
|
+
default: "md"
|
|
44
|
+
},
|
|
45
|
+
variant: {
|
|
46
|
+
type: String,
|
|
47
|
+
default: "outline"
|
|
48
|
+
},
|
|
49
|
+
placeholder: {
|
|
50
|
+
type: String
|
|
51
|
+
},
|
|
52
|
+
isReadOnly: {
|
|
53
|
+
type: Boolean,
|
|
54
|
+
default: false
|
|
55
|
+
},
|
|
56
|
+
isDisabled: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
60
|
+
isRequired: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
default: false
|
|
63
|
+
},
|
|
64
|
+
isInvalid: {
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
isFullWidth: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
default: true
|
|
71
|
+
},
|
|
72
|
+
isClearable: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
var inputGroupProps = {
|
|
78
|
+
id: {
|
|
79
|
+
type: String
|
|
80
|
+
},
|
|
81
|
+
size: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: "md"
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
var inputAddonProps = {
|
|
87
|
+
id: {
|
|
88
|
+
type: String
|
|
89
|
+
},
|
|
90
|
+
size: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: "md"
|
|
93
|
+
},
|
|
94
|
+
placement: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: "left"
|
|
97
|
+
},
|
|
98
|
+
hasBackground: {
|
|
99
|
+
type: Boolean,
|
|
100
|
+
default: false
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
var inputEmits = (0, import_pixel3_utils.declareEmit)(["change", "input", "clear", "update:modelValue"]);
|
|
104
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
105
|
+
0 && (module.exports = {
|
|
106
|
+
inputAddonProps,
|
|
107
|
+
inputEmits,
|
|
108
|
+
inputGroupProps,
|
|
109
|
+
inputProps
|
|
110
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Optional, PropTypes } from '@mekari/pixel3-utils';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Exported input types.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
type InputVariant = 'outline' | 'unstyled';
|
|
8
|
+
type InputSize = 'sm' | 'md';
|
|
9
|
+
type InputAddonPlacement = 'left' | 'right';
|
|
10
|
+
interface InputProps {
|
|
11
|
+
id?: string;
|
|
12
|
+
modelValue?: string | number;
|
|
13
|
+
size?: InputSize;
|
|
14
|
+
variant?: InputVariant;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
isReadOnly?: boolean;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
isRequired?: boolean;
|
|
19
|
+
isInvalid?: boolean;
|
|
20
|
+
isFullWidth?: boolean;
|
|
21
|
+
isClearable?: boolean;
|
|
22
|
+
onInput?: (evt: Event) => void;
|
|
23
|
+
onChange?: (evt: Event) => void;
|
|
24
|
+
onClear?: (evt: Event) => void;
|
|
25
|
+
}
|
|
26
|
+
interface InputGroupProps {
|
|
27
|
+
id?: string;
|
|
28
|
+
size?: InputSize;
|
|
29
|
+
}
|
|
30
|
+
interface InputAddonProps {
|
|
31
|
+
id?: string;
|
|
32
|
+
size?: InputSize;
|
|
33
|
+
placement?: InputAddonPlacement;
|
|
34
|
+
hasBackground?: boolean;
|
|
35
|
+
}
|
|
36
|
+
interface InputVNode {
|
|
37
|
+
el?: any;
|
|
38
|
+
props?: object;
|
|
39
|
+
type: {
|
|
40
|
+
[name: string]: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
type InputDefinedContext = Optional<InputProps, 'id'>;
|
|
44
|
+
type InputGroupDefinedContext = Optional<InputGroupProps, 'id'>;
|
|
45
|
+
type InputAddonDefinedContext = Optional<InputAddonProps, 'id'>;
|
|
46
|
+
interface InputApiMachine<T extends PropTypes = PropTypes> {
|
|
47
|
+
modelValue?: string | number;
|
|
48
|
+
isReadOnly?: boolean;
|
|
49
|
+
isDisabled?: boolean;
|
|
50
|
+
isClearable?: boolean;
|
|
51
|
+
rootProps?: T['element'];
|
|
52
|
+
controlProps?: T['element'];
|
|
53
|
+
clearProps?: T['element'];
|
|
54
|
+
}
|
|
55
|
+
interface InputGroupApiMachine<T extends PropTypes = PropTypes> {
|
|
56
|
+
rootProps?: T['element'];
|
|
57
|
+
}
|
|
58
|
+
interface InputAddonApiMachine<T extends PropTypes = PropTypes> {
|
|
59
|
+
rootProps?: T['element'];
|
|
60
|
+
}
|
|
61
|
+
interface InputState {
|
|
62
|
+
context: InputProps;
|
|
63
|
+
}
|
|
64
|
+
interface InputGroupState {
|
|
65
|
+
context: InputGroupProps;
|
|
66
|
+
}
|
|
67
|
+
interface InputAddonState {
|
|
68
|
+
context: InputAddonProps;
|
|
69
|
+
}
|
|
70
|
+
type InputSend = CallableFunction;
|
|
71
|
+
interface InputClasses {
|
|
72
|
+
root?: string;
|
|
73
|
+
control?: string;
|
|
74
|
+
clear?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { InputAddonApiMachine, InputAddonDefinedContext, InputAddonPlacement, InputAddonProps, InputAddonState, InputApiMachine, InputClasses, InputDefinedContext, InputGroupApiMachine, InputGroupDefinedContext, InputGroupProps, InputGroupState, InputProps, InputSend, InputSize, InputState, InputVNode, InputVariant };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Optional, PropTypes } from '@mekari/pixel3-utils';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Exported input types.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
type InputVariant = 'outline' | 'unstyled';
|
|
8
|
+
type InputSize = 'sm' | 'md';
|
|
9
|
+
type InputAddonPlacement = 'left' | 'right';
|
|
10
|
+
interface InputProps {
|
|
11
|
+
id?: string;
|
|
12
|
+
modelValue?: string | number;
|
|
13
|
+
size?: InputSize;
|
|
14
|
+
variant?: InputVariant;
|
|
15
|
+
placeholder?: string;
|
|
16
|
+
isReadOnly?: boolean;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
isRequired?: boolean;
|
|
19
|
+
isInvalid?: boolean;
|
|
20
|
+
isFullWidth?: boolean;
|
|
21
|
+
isClearable?: boolean;
|
|
22
|
+
onInput?: (evt: Event) => void;
|
|
23
|
+
onChange?: (evt: Event) => void;
|
|
24
|
+
onClear?: (evt: Event) => void;
|
|
25
|
+
}
|
|
26
|
+
interface InputGroupProps {
|
|
27
|
+
id?: string;
|
|
28
|
+
size?: InputSize;
|
|
29
|
+
}
|
|
30
|
+
interface InputAddonProps {
|
|
31
|
+
id?: string;
|
|
32
|
+
size?: InputSize;
|
|
33
|
+
placement?: InputAddonPlacement;
|
|
34
|
+
hasBackground?: boolean;
|
|
35
|
+
}
|
|
36
|
+
interface InputVNode {
|
|
37
|
+
el?: any;
|
|
38
|
+
props?: object;
|
|
39
|
+
type: {
|
|
40
|
+
[name: string]: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
type InputDefinedContext = Optional<InputProps, 'id'>;
|
|
44
|
+
type InputGroupDefinedContext = Optional<InputGroupProps, 'id'>;
|
|
45
|
+
type InputAddonDefinedContext = Optional<InputAddonProps, 'id'>;
|
|
46
|
+
interface InputApiMachine<T extends PropTypes = PropTypes> {
|
|
47
|
+
modelValue?: string | number;
|
|
48
|
+
isReadOnly?: boolean;
|
|
49
|
+
isDisabled?: boolean;
|
|
50
|
+
isClearable?: boolean;
|
|
51
|
+
rootProps?: T['element'];
|
|
52
|
+
controlProps?: T['element'];
|
|
53
|
+
clearProps?: T['element'];
|
|
54
|
+
}
|
|
55
|
+
interface InputGroupApiMachine<T extends PropTypes = PropTypes> {
|
|
56
|
+
rootProps?: T['element'];
|
|
57
|
+
}
|
|
58
|
+
interface InputAddonApiMachine<T extends PropTypes = PropTypes> {
|
|
59
|
+
rootProps?: T['element'];
|
|
60
|
+
}
|
|
61
|
+
interface InputState {
|
|
62
|
+
context: InputProps;
|
|
63
|
+
}
|
|
64
|
+
interface InputGroupState {
|
|
65
|
+
context: InputGroupProps;
|
|
66
|
+
}
|
|
67
|
+
interface InputAddonState {
|
|
68
|
+
context: InputAddonProps;
|
|
69
|
+
}
|
|
70
|
+
type InputSend = CallableFunction;
|
|
71
|
+
interface InputClasses {
|
|
72
|
+
root?: string;
|
|
73
|
+
control?: string;
|
|
74
|
+
clear?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export { InputAddonApiMachine, InputAddonDefinedContext, InputAddonPlacement, InputAddonProps, InputAddonState, InputApiMachine, InputClasses, InputDefinedContext, InputGroupApiMachine, InputGroupDefinedContext, InputGroupProps, InputGroupState, InputProps, InputSend, InputSize, InputState, InputVNode, InputVariant };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
|
|
16
|
+
// src/modules/input.types.ts
|
|
17
|
+
var input_types_exports = {};
|
|
18
|
+
module.exports = __toCommonJS(input_types_exports);
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mekari/pixel3-input",
|
|
3
|
+
"description": "Mekari Pixel 3 | Input component is used to get user input in a text field",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"license": "LGPL-3.0",
|
|
6
|
+
"author": "Dirga Prakesha <dirga.prakesha@mekari.com>",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@xstate/vue": "2.0.0",
|
|
14
|
+
"xstate": "4.35.0",
|
|
15
|
+
"@mekari/pixel3-button": "0.0.0",
|
|
16
|
+
"@mekari/pixel3-styled-system": "0.0.0",
|
|
17
|
+
"@mekari/pixel3-utils": "0.0.0"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"vue": "^3.3.7"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"devDependencies": {
|
|
26
|
+
"vue": "^3.3.7",
|
|
27
|
+
"@pandacss/dev": "0.10.0"
|
|
28
|
+
},
|
|
29
|
+
"module": "dist/index.mjs",
|
|
30
|
+
"types": "dist/index.d.ts",
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"require": "./dist/index.js",
|
|
35
|
+
"default": "./dist/index.mjs"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"clean": "rimraf dist .turbo",
|
|
40
|
+
"build": "tsup && pnpm build:types",
|
|
41
|
+
"build:css": "pnpm build && pnpm css:gen",
|
|
42
|
+
"build:fast": "tsup",
|
|
43
|
+
"build:types": "tsup src --dts-only",
|
|
44
|
+
"build:external": "tsup src/index.tsx --external @acme-org/styled-system",
|
|
45
|
+
"types:check": "tsc --noEmit",
|
|
46
|
+
"css:gen": "panda cssgen --outfile dist/styles.css",
|
|
47
|
+
"replace-config": "clean-package",
|
|
48
|
+
"restore-config": "clean-package restore"
|
|
49
|
+
}
|
|
50
|
+
}
|