@damarkuncoro/ui-library 0.0.1
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/LICENSE +21 -0
- package/README.md +122 -0
- package/lib/cjs/components/button/button-base.d.ts +3 -0
- package/lib/cjs/components/button/button-base.d.ts.map +1 -0
- package/lib/cjs/components/button/button-base.js +21 -0
- package/lib/cjs/components/button/button-base.js.map +1 -0
- package/lib/cjs/components/button/button-contract.d.ts +54 -0
- package/lib/cjs/components/button/button-contract.d.ts.map +1 -0
- package/lib/cjs/components/button/button-contract.js +32 -0
- package/lib/cjs/components/button/button-contract.js.map +1 -0
- package/lib/cjs/components/button/button-examples.d.ts +11 -0
- package/lib/cjs/components/button/button-examples.d.ts.map +1 -0
- package/lib/cjs/components/button/button-examples.js +67 -0
- package/lib/cjs/components/button/button-examples.js.map +1 -0
- package/lib/cjs/components/button/button-skin-contract.d.ts +133 -0
- package/lib/cjs/components/button/button-skin-contract.d.ts.map +1 -0
- package/lib/cjs/components/button/button-skin-contract.js +118 -0
- package/lib/cjs/components/button/button-skin-contract.js.map +1 -0
- package/lib/cjs/components/button/button-skin-native.d.ts +3 -0
- package/lib/cjs/components/button/button-skin-native.d.ts.map +1 -0
- package/lib/cjs/components/button/button-skin-native.js +62 -0
- package/lib/cjs/components/button/button-skin-native.js.map +1 -0
- package/lib/cjs/components/button/button-skin-tailwind.d.ts +15 -0
- package/lib/cjs/components/button/button-skin-tailwind.d.ts.map +1 -0
- package/lib/cjs/components/button/button-skin-tailwind.js +46 -0
- package/lib/cjs/components/button/button-skin-tailwind.js.map +1 -0
- package/lib/cjs/components/button/index.d.ts +8 -0
- package/lib/cjs/components/button/index.d.ts.map +1 -0
- package/lib/cjs/components/button/index.js +28 -0
- package/lib/cjs/components/button/index.js.map +1 -0
- package/lib/cjs/components/input/index.d.ts +8 -0
- package/lib/cjs/components/input/index.d.ts.map +1 -0
- package/lib/cjs/components/input/index.js +28 -0
- package/lib/cjs/components/input/index.js.map +1 -0
- package/lib/cjs/components/input/input-base.d.ts +9 -0
- package/lib/cjs/components/input/input-base.d.ts.map +1 -0
- package/lib/cjs/components/input/input-base.js +17 -0
- package/lib/cjs/components/input/input-base.js.map +1 -0
- package/lib/cjs/components/input/input-contract.d.ts +40 -0
- package/lib/cjs/components/input/input-contract.d.ts.map +1 -0
- package/lib/cjs/components/input/input-contract.js +32 -0
- package/lib/cjs/components/input/input-contract.js.map +1 -0
- package/lib/cjs/components/input/input-examples.d.ts +12 -0
- package/lib/cjs/components/input/input-examples.d.ts.map +1 -0
- package/lib/cjs/components/input/input-examples.js +67 -0
- package/lib/cjs/components/input/input-examples.js.map +1 -0
- package/lib/cjs/components/input/input-skin-contract.d.ts +93 -0
- package/lib/cjs/components/input/input-skin-contract.d.ts.map +1 -0
- package/lib/cjs/components/input/input-skin-contract.js +97 -0
- package/lib/cjs/components/input/input-skin-contract.js.map +1 -0
- package/lib/cjs/components/input/input-skin-native.d.ts +3 -0
- package/lib/cjs/components/input/input-skin-native.d.ts.map +1 -0
- package/lib/cjs/components/input/input-skin-native.js +68 -0
- package/lib/cjs/components/input/input-skin-native.js.map +1 -0
- package/lib/cjs/components/input/input-skin-tailwind.d.ts +18 -0
- package/lib/cjs/components/input/input-skin-tailwind.d.ts.map +1 -0
- package/lib/cjs/components/input/input-skin-tailwind.js +49 -0
- package/lib/cjs/components/input/input-skin-tailwind.js.map +1 -0
- package/lib/cjs/index.d.ts +4 -0
- package/lib/cjs/index.d.ts.map +1 -0
- package/lib/cjs/index.js +20 -0
- package/lib/cjs/index.js.map +1 -0
- package/lib/cjs/package.json +1 -0
- package/lib/cjs/test-setup.d.ts +2 -0
- package/lib/cjs/test-setup.d.ts.map +1 -0
- package/lib/cjs/test-setup.js +4 -0
- package/lib/cjs/test-setup.js.map +1 -0
- package/lib/cjs/theme/design-tokens.d.ts +200 -0
- package/lib/cjs/theme/design-tokens.d.ts.map +1 -0
- package/lib/cjs/theme/design-tokens.js +177 -0
- package/lib/cjs/theme/design-tokens.js.map +1 -0
- package/lib/cjs/theme/index.d.ts +3 -0
- package/lib/cjs/theme/index.d.ts.map +1 -0
- package/lib/cjs/theme/index.js +19 -0
- package/lib/cjs/theme/index.js.map +1 -0
- package/lib/cjs/theme/theme-provider.d.ts +16 -0
- package/lib/cjs/theme/theme-provider.d.ts.map +1 -0
- package/lib/cjs/theme/theme-provider.js +39 -0
- package/lib/cjs/theme/theme-provider.js.map +1 -0
- package/lib/cjs/usage-example.d.ts +2 -0
- package/lib/cjs/usage-example.d.ts.map +1 -0
- package/lib/cjs/usage-example.js +13 -0
- package/lib/cjs/usage-example.js.map +1 -0
- package/lib/esm/components/button/button-base.d.ts +3 -0
- package/lib/esm/components/button/button-base.d.ts.map +1 -0
- package/lib/esm/components/button/button-base.js +18 -0
- package/lib/esm/components/button/button-base.js.map +1 -0
- package/lib/esm/components/button/button-contract.d.ts +54 -0
- package/lib/esm/components/button/button-contract.d.ts.map +1 -0
- package/lib/esm/components/button/button-contract.js +29 -0
- package/lib/esm/components/button/button-contract.js.map +1 -0
- package/lib/esm/components/button/button-examples.d.ts +11 -0
- package/lib/esm/components/button/button-examples.d.ts.map +1 -0
- package/lib/esm/components/button/button-examples.js +52 -0
- package/lib/esm/components/button/button-examples.js.map +1 -0
- package/lib/esm/components/button/button-skin-contract.d.ts +133 -0
- package/lib/esm/components/button/button-skin-contract.d.ts.map +1 -0
- package/lib/esm/components/button/button-skin-contract.js +115 -0
- package/lib/esm/components/button/button-skin-contract.js.map +1 -0
- package/lib/esm/components/button/button-skin-native.d.ts +3 -0
- package/lib/esm/components/button/button-skin-native.d.ts.map +1 -0
- package/lib/esm/components/button/button-skin-native.js +59 -0
- package/lib/esm/components/button/button-skin-native.js.map +1 -0
- package/lib/esm/components/button/button-skin-tailwind.d.ts +15 -0
- package/lib/esm/components/button/button-skin-tailwind.d.ts.map +1 -0
- package/lib/esm/components/button/button-skin-tailwind.js +43 -0
- package/lib/esm/components/button/button-skin-tailwind.js.map +1 -0
- package/lib/esm/components/button/index.d.ts +8 -0
- package/lib/esm/components/button/index.d.ts.map +1 -0
- package/lib/esm/components/button/index.js +8 -0
- package/lib/esm/components/button/index.js.map +1 -0
- package/lib/esm/components/input/index.d.ts +8 -0
- package/lib/esm/components/input/index.d.ts.map +1 -0
- package/lib/esm/components/input/index.js +8 -0
- package/lib/esm/components/input/index.js.map +1 -0
- package/lib/esm/components/input/input-base.d.ts +9 -0
- package/lib/esm/components/input/input-base.d.ts.map +1 -0
- package/lib/esm/components/input/input-base.js +14 -0
- package/lib/esm/components/input/input-base.js.map +1 -0
- package/lib/esm/components/input/input-contract.d.ts +40 -0
- package/lib/esm/components/input/input-contract.d.ts.map +1 -0
- package/lib/esm/components/input/input-contract.js +29 -0
- package/lib/esm/components/input/input-contract.js.map +1 -0
- package/lib/esm/components/input/input-examples.d.ts +12 -0
- package/lib/esm/components/input/input-examples.d.ts.map +1 -0
- package/lib/esm/components/input/input-examples.js +51 -0
- package/lib/esm/components/input/input-examples.js.map +1 -0
- package/lib/esm/components/input/input-skin-contract.d.ts +93 -0
- package/lib/esm/components/input/input-skin-contract.d.ts.map +1 -0
- package/lib/esm/components/input/input-skin-contract.js +94 -0
- package/lib/esm/components/input/input-skin-contract.js.map +1 -0
- package/lib/esm/components/input/input-skin-native.d.ts +3 -0
- package/lib/esm/components/input/input-skin-native.d.ts.map +1 -0
- package/lib/esm/components/input/input-skin-native.js +65 -0
- package/lib/esm/components/input/input-skin-native.js.map +1 -0
- package/lib/esm/components/input/input-skin-tailwind.d.ts +18 -0
- package/lib/esm/components/input/input-skin-tailwind.d.ts.map +1 -0
- package/lib/esm/components/input/input-skin-tailwind.js +46 -0
- package/lib/esm/components/input/input-skin-tailwind.js.map +1 -0
- package/lib/esm/index.d.ts +4 -0
- package/lib/esm/index.d.ts.map +1 -0
- package/lib/esm/index.js +4 -0
- package/lib/esm/index.js.map +1 -0
- package/lib/esm/package.json +1 -0
- package/lib/esm/test-setup.d.ts +2 -0
- package/lib/esm/test-setup.d.ts.map +1 -0
- package/lib/esm/test-setup.js +2 -0
- package/lib/esm/test-setup.js.map +1 -0
- package/lib/esm/theme/design-tokens.d.ts +200 -0
- package/lib/esm/theme/design-tokens.d.ts.map +1 -0
- package/lib/esm/theme/design-tokens.js +174 -0
- package/lib/esm/theme/design-tokens.js.map +1 -0
- package/lib/esm/theme/index.d.ts +3 -0
- package/lib/esm/theme/index.d.ts.map +1 -0
- package/lib/esm/theme/index.js +3 -0
- package/lib/esm/theme/index.js.map +1 -0
- package/lib/esm/theme/theme-provider.d.ts +16 -0
- package/lib/esm/theme/theme-provider.d.ts.map +1 -0
- package/lib/esm/theme/theme-provider.js +34 -0
- package/lib/esm/theme/theme-provider.js.map +1 -0
- package/lib/esm/usage-example.d.ts +2 -0
- package/lib/esm/usage-example.d.ts.map +1 -0
- package/lib/esm/usage-example.js +10 -0
- package/lib/esm/usage-example.js.map +1 -0
- package/package.json +48 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inputSkinContractDef = void 0;
|
|
4
|
+
const design_tokens_1 = require("../../theme/design-tokens");
|
|
5
|
+
exports.inputSkinContractDef = {
|
|
6
|
+
id: "contract_input_skin_v1",
|
|
7
|
+
name: "input-skin",
|
|
8
|
+
variants: {
|
|
9
|
+
outline: {
|
|
10
|
+
backgroundColor: design_tokens_1.tokens.colors.transparent,
|
|
11
|
+
borderColor: design_tokens_1.tokens.colors.neutral.border,
|
|
12
|
+
color: design_tokens_1.tokens.colors.neutral.text,
|
|
13
|
+
placeholderColor: design_tokens_1.tokens.colors.neutral.textSecondary,
|
|
14
|
+
hover: {
|
|
15
|
+
borderColor: design_tokens_1.tokens.colors.neutral.text,
|
|
16
|
+
},
|
|
17
|
+
focus: {
|
|
18
|
+
borderColor: design_tokens_1.tokens.colors.primary.main,
|
|
19
|
+
ringColor: design_tokens_1.tokens.colors.primary.main,
|
|
20
|
+
},
|
|
21
|
+
invalid: {
|
|
22
|
+
borderColor: design_tokens_1.tokens.colors.danger.main,
|
|
23
|
+
ringColor: design_tokens_1.tokens.colors.danger.main,
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
filled: {
|
|
27
|
+
backgroundColor: design_tokens_1.tokens.colors.secondary.main,
|
|
28
|
+
borderColor: design_tokens_1.tokens.colors.transparent,
|
|
29
|
+
color: design_tokens_1.tokens.colors.neutral.text,
|
|
30
|
+
placeholderColor: design_tokens_1.tokens.colors.neutral.textSecondary,
|
|
31
|
+
hover: {
|
|
32
|
+
backgroundColor: design_tokens_1.tokens.colors.secondary.hover,
|
|
33
|
+
},
|
|
34
|
+
focus: {
|
|
35
|
+
backgroundColor: design_tokens_1.tokens.colors.transparent,
|
|
36
|
+
borderColor: design_tokens_1.tokens.colors.primary.main,
|
|
37
|
+
ringColor: design_tokens_1.tokens.colors.primary.main,
|
|
38
|
+
},
|
|
39
|
+
invalid: {
|
|
40
|
+
borderColor: design_tokens_1.tokens.colors.danger.main,
|
|
41
|
+
ringColor: design_tokens_1.tokens.colors.danger.main,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
flushed: {
|
|
45
|
+
backgroundColor: design_tokens_1.tokens.colors.transparent,
|
|
46
|
+
borderColor: design_tokens_1.tokens.colors.transparent,
|
|
47
|
+
borderBottomColor: design_tokens_1.tokens.colors.neutral.border,
|
|
48
|
+
color: design_tokens_1.tokens.colors.neutral.text,
|
|
49
|
+
placeholderColor: design_tokens_1.tokens.colors.neutral.textSecondary,
|
|
50
|
+
hover: {
|
|
51
|
+
borderBottomColor: design_tokens_1.tokens.colors.neutral.text,
|
|
52
|
+
},
|
|
53
|
+
focus: {
|
|
54
|
+
borderBottomColor: design_tokens_1.tokens.colors.primary.main,
|
|
55
|
+
ringColor: design_tokens_1.tokens.colors.transparent,
|
|
56
|
+
},
|
|
57
|
+
invalid: {
|
|
58
|
+
borderBottomColor: design_tokens_1.tokens.colors.danger.main,
|
|
59
|
+
ringColor: design_tokens_1.tokens.colors.transparent,
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
icons: {
|
|
64
|
+
padding: design_tokens_1.tokens.sizing[10],
|
|
65
|
+
position: design_tokens_1.tokens.spacing[3],
|
|
66
|
+
color: design_tokens_1.tokens.colors.neutral.textSecondary,
|
|
67
|
+
},
|
|
68
|
+
sizes: {
|
|
69
|
+
sm: {
|
|
70
|
+
height: design_tokens_1.tokens.sizing[8],
|
|
71
|
+
padding: `0 ${design_tokens_1.tokens.spacing[3]}`,
|
|
72
|
+
fontSize: design_tokens_1.tokens.typography.fontSize.xs,
|
|
73
|
+
},
|
|
74
|
+
md: {
|
|
75
|
+
height: design_tokens_1.tokens.sizing[10],
|
|
76
|
+
padding: `0 ${design_tokens_1.tokens.spacing[4]}`,
|
|
77
|
+
fontSize: design_tokens_1.tokens.typography.fontSize.sm,
|
|
78
|
+
},
|
|
79
|
+
lg: {
|
|
80
|
+
height: design_tokens_1.tokens.sizing[12],
|
|
81
|
+
padding: `0 ${design_tokens_1.tokens.spacing[6]}`,
|
|
82
|
+
fontSize: design_tokens_1.tokens.typography.fontSize.base,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
base: {
|
|
86
|
+
borderRadius: design_tokens_1.tokens.borderRadius.md,
|
|
87
|
+
transition: design_tokens_1.tokens.transition.base,
|
|
88
|
+
width: '100%',
|
|
89
|
+
outline: 'none',
|
|
90
|
+
},
|
|
91
|
+
disabled: {
|
|
92
|
+
opacity: design_tokens_1.tokens.opacity.disabled,
|
|
93
|
+
cursor: 'not-allowed',
|
|
94
|
+
backgroundColor: design_tokens_1.tokens.colors.secondary.main,
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
//# sourceMappingURL=input-skin-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-skin-contract.js","sourceRoot":"","sources":["../../../../src/components/input/input-skin-cont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CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACjC,QAAQ,EAAE,sBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;SACxC;QACD,EAAE,EAAE;YACF,MAAM,EAAE,sBAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,sBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACjC,QAAQ,EAAE,sBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE;SACxC;QACD,EAAE,EAAE;YACF,MAAM,EAAE,sBAAM,CAAC,MAAM,CAAC,EAAE,CAAC;YACzB,OAAO,EAAE,KAAK,sBAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;YACjC,QAAQ,EAAE,sBAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI;SAC1C;KACF;IAGD,IAAI,EAAE;QACJ,YAAY,EAAE,sBAAM,CAAC,YAAY,CAAC,EAAE;QACpC,UAAU,EAAE,sBAAM,CAAC,UAAU,CAAC,IAAI;QAClC,KAAK,EAAE,MAAM;QACb,OAAO,EAAE,MAAM;KAChB;IAED,QAAQ,EAAE;QACR,OAAO,EAAE,sBAAM,CAAC,OAAO,CAAC,QAAQ;QAChC,MAAM,EAAE,aAAa;QACrB,eAAe,EAAE,sBAAM,CAAC,MAAM,CAAC,SAAS,CAAC,IAAI;KAC9C;CACO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-skin-native.d.ts","sourceRoot":"","sources":["../../../../src/components/input/input-skin-native.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AA4DzD,eAAO,MAAM,WAAW,6GAwDvB,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputNative = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const input_base_1 = require("./input-base");
|
|
7
|
+
const input_skin_contract_1 = require("./input-skin-contract");
|
|
8
|
+
const { variants, sizes, base, disabled, icons } = input_skin_contract_1.inputSkinContractDef;
|
|
9
|
+
const baseStyles = base;
|
|
10
|
+
const disabledStyles = disabled;
|
|
11
|
+
const variantStyles = {
|
|
12
|
+
outline: {
|
|
13
|
+
backgroundColor: variants.outline.backgroundColor,
|
|
14
|
+
borderColor: variants.outline.borderColor,
|
|
15
|
+
color: variants.outline.color,
|
|
16
|
+
},
|
|
17
|
+
filled: {
|
|
18
|
+
backgroundColor: variants.filled.backgroundColor,
|
|
19
|
+
borderColor: variants.filled.borderColor,
|
|
20
|
+
color: variants.filled.color,
|
|
21
|
+
},
|
|
22
|
+
flushed: {
|
|
23
|
+
backgroundColor: variants.flushed.backgroundColor,
|
|
24
|
+
borderColor: variants.flushed.borderBottomColor,
|
|
25
|
+
borderBottomColor: variants.flushed.borderBottomColor,
|
|
26
|
+
color: variants.flushed.color,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
const sizeStyles = {
|
|
30
|
+
sm: {
|
|
31
|
+
height: sizes.sm.height,
|
|
32
|
+
padding: sizes.sm.padding,
|
|
33
|
+
fontSize: sizes.sm.fontSize,
|
|
34
|
+
},
|
|
35
|
+
md: {
|
|
36
|
+
height: sizes.md.height,
|
|
37
|
+
padding: sizes.md.padding,
|
|
38
|
+
fontSize: sizes.md.fontSize,
|
|
39
|
+
},
|
|
40
|
+
lg: {
|
|
41
|
+
height: sizes.lg.height,
|
|
42
|
+
padding: sizes.lg.padding,
|
|
43
|
+
fontSize: sizes.lg.fontSize,
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
const wrapperStyles = {
|
|
47
|
+
position: 'relative',
|
|
48
|
+
display: 'inline-flex',
|
|
49
|
+
alignItems: 'center',
|
|
50
|
+
width: '100%',
|
|
51
|
+
};
|
|
52
|
+
exports.InputNative = (0, react_1.forwardRef)(({ variant = 'outline', size = 'md', isInvalid = false, isDisabled = false, disabled = false, readOnly = false, leftIcon, rightIcon, className = '', inputClassName = '', style, ...props }, ref) => {
|
|
53
|
+
const isReallyDisabled = isDisabled || disabled;
|
|
54
|
+
const iconPaddingLeft = leftIcon ? icons.padding : undefined;
|
|
55
|
+
const iconPaddingRight = rightIcon ? icons.padding : undefined;
|
|
56
|
+
const combinedStyle = {
|
|
57
|
+
...baseStyles,
|
|
58
|
+
...(variantStyles[variant] || variantStyles.outline),
|
|
59
|
+
...(sizeStyles[size] || sizeStyles.md),
|
|
60
|
+
...(isReallyDisabled ? disabledStyles : {}),
|
|
61
|
+
paddingLeft: iconPaddingLeft,
|
|
62
|
+
paddingRight: iconPaddingRight,
|
|
63
|
+
...style,
|
|
64
|
+
};
|
|
65
|
+
return ((0, jsx_runtime_1.jsx)(input_base_1.InputBase, { ref: ref, style: combinedStyle, wrapperStyle: wrapperStyles, variant: variant, size: size, isInvalid: isInvalid, isDisabled: isDisabled, disabled: disabled, readOnly: readOnly, leftIcon: leftIcon, rightIcon: rightIcon, className: className, inputClassName: inputClassName, ...props }));
|
|
66
|
+
});
|
|
67
|
+
exports.InputNative.displayName = 'InputNative';
|
|
68
|
+
//# sourceMappingURL=input-skin-native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-skin-native.js","sourceRoot":"","sources":["../../../../src/components/input/input-skin-native.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkD;AAClD,6CAAyD;AACzD,+DAA6D;AAS7D,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,0CAAoB,CAAC;AAExE,MAAM,UAAU,GAAkB,IAAI,CAAC;AAEvC,MAAM,cAAc,GAAkB,QAAQ,CAAC;AAE/C,MAAM,aAAa,GAAkC;IACnD,OAAO,EAAE;QACP,eAAe,EAAE,QAAQ,CAAC,OAAO,CAAC,eAA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c,KAC1B,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,mBAAW,CAAC,WAAW,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InputBaseProps } from './input-base';
|
|
2
|
+
export declare const variantClasses: {
|
|
3
|
+
outline: string;
|
|
4
|
+
filled: string;
|
|
5
|
+
flushed: string;
|
|
6
|
+
};
|
|
7
|
+
export declare const errorClasses: {
|
|
8
|
+
outline: string;
|
|
9
|
+
filled: string;
|
|
10
|
+
flushed: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const sizeClasses: {
|
|
13
|
+
sm: string;
|
|
14
|
+
md: string;
|
|
15
|
+
lg: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const InputTailwind: import("react").ForwardRefExoticComponent<InputBaseProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
|
+
//# sourceMappingURL=input-skin-tailwind.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-skin-tailwind.d.ts","sourceRoot":"","sources":["../../../../src/components/input/input-skin-tailwind.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,cAAc,EAAE,MAAM,cAAc,CAAC;AAQzD,eAAO,MAAM,cAAc;;;;CAI1B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;CAIxB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;CAIvB,CAAC;AAQF,eAAO,MAAM,aAAa,6GAsDzB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputTailwind = exports.sizeClasses = exports.errorClasses = exports.variantClasses = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const input_base_1 = require("./input-base");
|
|
7
|
+
const input_skin_contract_1 = require("./input-skin-contract");
|
|
8
|
+
const design_tokens_1 = require("../../theme/design-tokens");
|
|
9
|
+
const { variants, sizes, base, disabled, icons } = input_skin_contract_1.inputSkinContractDef;
|
|
10
|
+
exports.variantClasses = {
|
|
11
|
+
outline: `bg-[${variants.outline.backgroundColor}] border border-[${variants.outline.borderColor}] text-[${variants.outline.color}] placeholder:text-[${variants.outline.placeholderColor}] hover:border-[${variants.outline.hover.borderColor}] focus:border-[${variants.outline.focus.borderColor}] focus:ring-[${design_tokens_1.tokens.ui.outlineWidth}] focus:ring-[${variants.outline.focus.ringColor}]`,
|
|
12
|
+
filled: `bg-[${variants.filled.backgroundColor}] border border-[${variants.filled.borderColor}] text-[${variants.filled.color}] placeholder:text-[${variants.filled.placeholderColor}] hover:bg-[${variants.filled.hover.backgroundColor}] focus:bg-[${variants.filled.focus.backgroundColor}] focus:border-[${variants.filled.focus.borderColor}] focus:ring-[${design_tokens_1.tokens.ui.outlineWidth}] focus:ring-[${variants.filled.focus.ringColor}]`,
|
|
13
|
+
flushed: `bg-[${variants.flushed.backgroundColor}] border-b border-[${variants.flushed.borderBottomColor}] rounded-none px-0 text-[${variants.flushed.color}] placeholder:text-[${variants.flushed.placeholderColor}] hover:border-b-[${variants.flushed.hover.borderBottomColor}] focus:border-b-[${variants.flushed.focus.borderBottomColor}] focus:ring-0 focus:outline-none`,
|
|
14
|
+
};
|
|
15
|
+
exports.errorClasses = {
|
|
16
|
+
outline: `!border-[${variants.outline.invalid.borderColor}] !ring-[${variants.outline.invalid.ringColor}]`,
|
|
17
|
+
filled: `!border-[${variants.filled.invalid.borderColor}] !ring-[${variants.filled.invalid.ringColor}]`,
|
|
18
|
+
flushed: `!border-[${variants.flushed.invalid.borderBottomColor}]`,
|
|
19
|
+
};
|
|
20
|
+
exports.sizeClasses = {
|
|
21
|
+
sm: `h-[${sizes.sm.height}] px-[${design_tokens_1.tokens.spacing[3]}] text-[${sizes.sm.fontSize}]`,
|
|
22
|
+
md: `h-[${sizes.md.height}] px-[${design_tokens_1.tokens.spacing[4]}] text-[${sizes.md.fontSize}]`,
|
|
23
|
+
lg: `h-[${sizes.lg.height}] px-[${design_tokens_1.tokens.spacing[6]}] text-[${sizes.lg.fontSize}]`,
|
|
24
|
+
};
|
|
25
|
+
const wrapperBase = 'relative inline-flex items-center w-full';
|
|
26
|
+
const inputBase = `w-full min-w-0 outline-none [transition:${base.transition.replace(/ /g, '_')}] rounded-[${base.borderRadius}] disabled:opacity-[${disabled.opacity}] disabled:cursor-[${disabled.cursor}] disabled:bg-[${disabled.backgroundColor}]`;
|
|
27
|
+
exports.InputTailwind = (0, react_1.forwardRef)(({ variant = 'outline', size = 'md', isInvalid = false, disabled = false, readOnly = false, className = '', inputClassName = '', ...props }, ref) => {
|
|
28
|
+
const variantClass = exports.variantClasses[variant] || exports.variantClasses.outline;
|
|
29
|
+
const invalidClass = isInvalid ? (exports.errorClasses[variant] || exports.errorClasses.outline) : '';
|
|
30
|
+
const sizeClass = exports.sizeClasses[size] || exports.sizeClasses.md;
|
|
31
|
+
const finalInputClasses = [
|
|
32
|
+
inputBase,
|
|
33
|
+
variantClass,
|
|
34
|
+
invalidClass,
|
|
35
|
+
sizeClass,
|
|
36
|
+
props.leftIcon ? `pl-[${icons.padding}]` : '',
|
|
37
|
+
props.rightIcon ? `pr-[${icons.padding}]` : '',
|
|
38
|
+
inputClassName
|
|
39
|
+
].filter(Boolean).join(' ');
|
|
40
|
+
const finalWrapperClasses = [
|
|
41
|
+
wrapperBase,
|
|
42
|
+
className,
|
|
43
|
+
`[&_.input-icon-left]:absolute [&_.input-icon-left]:left-[${icons.position}] [&_.input-icon-left]:z-10 [&_.input-icon-left]:text-[${icons.color}] [&_.input-icon-left]:aria-hidden=true`,
|
|
44
|
+
`[&_.input-icon-right]:absolute [&_.input-icon-right]:right-[${icons.position}] [&_.input-icon-right]:z-10 [&_.input-icon-right]:text-[${icons.color}] [&_.input-icon-right]:aria-hidden=true`,
|
|
45
|
+
].filter(Boolean).join(' ');
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(input_base_1.InputBase, { ref: ref, className: finalWrapperClasses, inputClassName: finalInputClasses, variant: variant, size: size, isInvalid: isInvalid, ...props }));
|
|
47
|
+
});
|
|
48
|
+
exports.InputTailwind.displayName = 'InputTailwind';
|
|
49
|
+
//# sourceMappingURL=input-skin-tailwind.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-skin-tailwind.js","sourceRoot":"","sources":["../../../../src/components/input/input-skin-tailwind.tsx"],"names":[],"mappings":";;;;AAAA,iCAAmC;AACnC,6CAAyD;AACzD,+DAA6D;AAC7D,6DAAmD;AAGnD,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,0CAAoB,CAAC;AAG3D,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,OAAO,QAAQ,CAAC,OAAO,CAAC,eAAe,oBAAoB,QAAQ,CAAC,OAAO,CAAC,WAAW,WAAW,QAAQ,CAAC,OAAO,CAAC,KAAK,uBAAuB,QAAQ,CAAC,OAAO,CAAC,gBAAgB,mBAAmB,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,mBAAmB,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,WAAW,iBAAiB,sBAAM,CAAC,EAAE,CAAC,YAAY,iBAAiB,QAAQ,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG;IAC9X,MAAM,EAAE,OAAO,QAAQ,CAAC,MAAM,CAAC,eAAe,oBAAoB,QAAQ,CAAC,MAAM,CAAC,WAAW,WAAW,QAAQ,CAAC,MAAM,CAAC,KAAK,uBAAuB,QAAQ,CAAC,MAAM,CAAC,gBAAgB,eAAe,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,eAAe,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,mBAAmB,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,iBAAiB,sBAAM,CAAC,EAAE,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CAAC,KAAK,yCAAyC;QACxL,+DAA+D,KAAK,CAAC,QAAQ,4DAA4D,KAAK,CAAC,KAAK,0CAA0C;KAC/L,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5B,OAAO,CACL,uBAAC,sBAAS,IACR,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,mBAAmB,EAC9B,cAAc,EAAE,iBAAiB,EACjC,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,SAAS,KAChB,KAAK,GACT,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,qBAAa,CAAC,WAAW,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC;AAGpC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,SAAS,CAAC"}
|
package/lib/cjs/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
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("./components/button"), exports);
|
|
18
|
+
__exportStar(require("./components/input"), exports);
|
|
19
|
+
__exportStar(require("./theme"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,sDAAoC;AAGpC,qDAAmC;AAGnC,0CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "commonjs"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-setup.d.ts","sourceRoot":"","sources":["../../src/test-setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-setup.js","sourceRoot":"","sources":["../../src/test-setup.ts"],"names":[],"mappings":";;AAAA,qCAAmC"}
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
export declare const palette: {
|
|
2
|
+
readonly blue: {
|
|
3
|
+
readonly 400: "#60A5FA";
|
|
4
|
+
readonly 500: "#3B82F6";
|
|
5
|
+
readonly 600: "#2563EB";
|
|
6
|
+
readonly 700: "#1D4ED8";
|
|
7
|
+
readonly 800: "#1E40AF";
|
|
8
|
+
};
|
|
9
|
+
readonly gray: {
|
|
10
|
+
readonly 50: "#F9FAFB";
|
|
11
|
+
readonly 100: "#F3F4F6";
|
|
12
|
+
readonly 200: "#E5E7EB";
|
|
13
|
+
readonly 300: "#D1D5DB";
|
|
14
|
+
readonly 400: "#9CA3AF";
|
|
15
|
+
readonly 500: "#6B7280";
|
|
16
|
+
readonly 600: "#4B5563";
|
|
17
|
+
readonly 700: "#374151";
|
|
18
|
+
readonly 800: "#1F2937";
|
|
19
|
+
readonly 900: "#111827";
|
|
20
|
+
};
|
|
21
|
+
readonly red: {
|
|
22
|
+
readonly 400: "#F87171";
|
|
23
|
+
readonly 500: "#EF4444";
|
|
24
|
+
readonly 600: "#DC2626";
|
|
25
|
+
readonly 700: "#B91C1C";
|
|
26
|
+
readonly 900: "#7F1D1D";
|
|
27
|
+
};
|
|
28
|
+
readonly white: "#FFFFFF";
|
|
29
|
+
readonly black: "#000000";
|
|
30
|
+
readonly transparent: "transparent";
|
|
31
|
+
};
|
|
32
|
+
export declare const cssVars: {
|
|
33
|
+
readonly colors: {
|
|
34
|
+
readonly primary: {
|
|
35
|
+
readonly main: "var(--color-primary-main)";
|
|
36
|
+
readonly hover: "var(--color-primary-hover)";
|
|
37
|
+
readonly focus: "var(--color-primary-focus)";
|
|
38
|
+
readonly contrastText: "var(--color-primary-contrast)";
|
|
39
|
+
};
|
|
40
|
+
readonly secondary: {
|
|
41
|
+
readonly main: "var(--color-secondary-main)";
|
|
42
|
+
readonly hover: "var(--color-secondary-hover)";
|
|
43
|
+
readonly focus: "var(--color-secondary-focus)";
|
|
44
|
+
readonly contrastText: "var(--color-secondary-contrast)";
|
|
45
|
+
};
|
|
46
|
+
readonly danger: {
|
|
47
|
+
readonly main: "var(--color-danger-main)";
|
|
48
|
+
readonly hover: "var(--color-danger-hover)";
|
|
49
|
+
readonly focus: "var(--color-danger-focus)";
|
|
50
|
+
readonly contrastText: "var(--color-danger-contrast)";
|
|
51
|
+
};
|
|
52
|
+
readonly neutral: {
|
|
53
|
+
readonly border: "var(--color-neutral-border)";
|
|
54
|
+
readonly text: "var(--color-neutral-text)";
|
|
55
|
+
readonly textSecondary: "var(--color-neutral-text-secondary)";
|
|
56
|
+
readonly bg: "var(--color-neutral-bg)";
|
|
57
|
+
readonly bgSurface: "var(--color-neutral-bg-surface)";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly shadows: {
|
|
61
|
+
readonly focusRing: "var(--shadow-focus-ring)";
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
export declare const themes: {
|
|
65
|
+
light: {
|
|
66
|
+
'--color-primary-main': "#2563EB";
|
|
67
|
+
'--color-primary-hover': "#1D4ED8";
|
|
68
|
+
'--color-primary-focus': "#3B82F6";
|
|
69
|
+
'--color-primary-contrast': "#FFFFFF";
|
|
70
|
+
'--color-secondary-main': "#F3F4F6";
|
|
71
|
+
'--color-secondary-hover': "#E5E7EB";
|
|
72
|
+
'--color-secondary-focus': "#6B7280";
|
|
73
|
+
'--color-secondary-contrast': "#111827";
|
|
74
|
+
'--color-danger-main': "#DC2626";
|
|
75
|
+
'--color-danger-hover': "#B91C1C";
|
|
76
|
+
'--color-danger-focus': "#EF4444";
|
|
77
|
+
'--color-danger-contrast': "#FFFFFF";
|
|
78
|
+
'--color-neutral-border': "#D1D5DB";
|
|
79
|
+
'--color-neutral-text': "#374151";
|
|
80
|
+
'--color-neutral-text-secondary': "#6B7280";
|
|
81
|
+
'--color-neutral-bg': "#F9FAFB";
|
|
82
|
+
'--color-neutral-bg-surface': "#FFFFFF";
|
|
83
|
+
'--shadow-focus-ring': string;
|
|
84
|
+
};
|
|
85
|
+
dark: {
|
|
86
|
+
'--color-primary-main': "#3B82F6";
|
|
87
|
+
'--color-primary-hover': "#60A5FA";
|
|
88
|
+
'--color-primary-focus': "#2563EB";
|
|
89
|
+
'--color-primary-contrast': "#FFFFFF";
|
|
90
|
+
'--color-secondary-main': "#1F2937";
|
|
91
|
+
'--color-secondary-hover': "#374151";
|
|
92
|
+
'--color-secondary-focus': "#4B5563";
|
|
93
|
+
'--color-secondary-contrast': "#F3F4F6";
|
|
94
|
+
'--color-danger-main': "#EF4444";
|
|
95
|
+
'--color-danger-hover': "#F87171";
|
|
96
|
+
'--color-danger-focus': "#DC2626";
|
|
97
|
+
'--color-danger-contrast': "#FFFFFF";
|
|
98
|
+
'--color-neutral-border': "#4B5563";
|
|
99
|
+
'--color-neutral-text': "#F3F4F6";
|
|
100
|
+
'--color-neutral-text-secondary': "#9CA3AF";
|
|
101
|
+
'--color-neutral-bg': "#111827";
|
|
102
|
+
'--color-neutral-bg-surface': "#1F2937";
|
|
103
|
+
'--shadow-focus-ring': string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
export declare const tokens: {
|
|
107
|
+
readonly colors: {
|
|
108
|
+
readonly transparent: "transparent";
|
|
109
|
+
readonly white: "#FFFFFF";
|
|
110
|
+
readonly black: "#000000";
|
|
111
|
+
readonly primary: {
|
|
112
|
+
readonly main: "var(--color-primary-main)";
|
|
113
|
+
readonly hover: "var(--color-primary-hover)";
|
|
114
|
+
readonly focus: "var(--color-primary-focus)";
|
|
115
|
+
readonly contrastText: "var(--color-primary-contrast)";
|
|
116
|
+
};
|
|
117
|
+
readonly secondary: {
|
|
118
|
+
readonly main: "var(--color-secondary-main)";
|
|
119
|
+
readonly hover: "var(--color-secondary-hover)";
|
|
120
|
+
readonly focus: "var(--color-secondary-focus)";
|
|
121
|
+
readonly contrastText: "var(--color-secondary-contrast)";
|
|
122
|
+
};
|
|
123
|
+
readonly danger: {
|
|
124
|
+
readonly main: "var(--color-danger-main)";
|
|
125
|
+
readonly hover: "var(--color-danger-hover)";
|
|
126
|
+
readonly focus: "var(--color-danger-focus)";
|
|
127
|
+
readonly contrastText: "var(--color-danger-contrast)";
|
|
128
|
+
};
|
|
129
|
+
readonly neutral: {
|
|
130
|
+
readonly border: "var(--color-neutral-border)";
|
|
131
|
+
readonly text: "var(--color-neutral-text)";
|
|
132
|
+
readonly textSecondary: "var(--color-neutral-text-secondary)";
|
|
133
|
+
readonly bg: "var(--color-neutral-bg)";
|
|
134
|
+
readonly bgSurface: "var(--color-neutral-bg-surface)";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
readonly shadows: {
|
|
138
|
+
readonly focusRing: "var(--shadow-focus-ring)";
|
|
139
|
+
};
|
|
140
|
+
readonly ui: {
|
|
141
|
+
readonly outlineOffset: "2px";
|
|
142
|
+
readonly outlineWidth: "2px";
|
|
143
|
+
};
|
|
144
|
+
readonly borderRadius: {
|
|
145
|
+
readonly sm: "4px";
|
|
146
|
+
readonly md: "6px";
|
|
147
|
+
readonly lg: "8px";
|
|
148
|
+
readonly full: "9999px";
|
|
149
|
+
};
|
|
150
|
+
readonly spacing: {
|
|
151
|
+
readonly 2: "8px";
|
|
152
|
+
readonly 3: "12px";
|
|
153
|
+
readonly 4: "16px";
|
|
154
|
+
readonly 6: "24px";
|
|
155
|
+
};
|
|
156
|
+
readonly sizing: {
|
|
157
|
+
readonly 8: "32px";
|
|
158
|
+
readonly 10: "40px";
|
|
159
|
+
readonly 12: "48px";
|
|
160
|
+
readonly icon: {
|
|
161
|
+
readonly sm: "14px";
|
|
162
|
+
readonly md: "16px";
|
|
163
|
+
readonly lg: "20px";
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
readonly typography: {
|
|
167
|
+
readonly fontFamily: {
|
|
168
|
+
readonly sans: "ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif";
|
|
169
|
+
readonly mono: "ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace";
|
|
170
|
+
};
|
|
171
|
+
readonly fontSize: {
|
|
172
|
+
readonly xs: "0.75rem";
|
|
173
|
+
readonly sm: "0.875rem";
|
|
174
|
+
readonly base: "1rem";
|
|
175
|
+
readonly lg: "1.125rem";
|
|
176
|
+
readonly xl: "1.25rem";
|
|
177
|
+
};
|
|
178
|
+
readonly fontWeight: {
|
|
179
|
+
readonly normal: "400";
|
|
180
|
+
readonly medium: "500";
|
|
181
|
+
readonly semibold: "600";
|
|
182
|
+
readonly bold: "700";
|
|
183
|
+
};
|
|
184
|
+
readonly lineHeight: {
|
|
185
|
+
readonly none: "1";
|
|
186
|
+
readonly tight: "1.25";
|
|
187
|
+
readonly snug: "1.375";
|
|
188
|
+
readonly normal: "1.5";
|
|
189
|
+
readonly relaxed: "1.625";
|
|
190
|
+
readonly loose: "2";
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
readonly opacity: {
|
|
194
|
+
readonly disabled: "0.5";
|
|
195
|
+
};
|
|
196
|
+
readonly transition: {
|
|
197
|
+
readonly base: "all 0.2s ease";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
//# sourceMappingURL=design-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"design-tokens.d.ts","sourceRoot":"","sources":["../../../src/theme/design-tokens.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BV,CAAC;AAGX,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BV,CAAC;AAGX,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DlB,CAAC;AAIF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuET,CAAC"}
|