react-miui 0.20.0 → 0.21.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/CHANGELOG.md +19 -0
- package/dist/components/form/input/Input.css.d.ts +47 -0
- package/dist/components/form/input/Input.css.d.ts.map +1 -0
- package/dist/components/form/input/Input.css.js +52 -0
- package/dist/components/form/input/Input.css.js.map +1 -0
- package/dist/components/form/input/Input.styled.d.ts +68 -36
- package/dist/components/form/input/Input.styled.d.ts.map +1 -1
- package/dist/components/form/input/Input.styled.js +3 -48
- package/dist/components/form/input/Input.styled.js.map +1 -1
- package/dist/components/form/textarea/TextArea.d.ts.map +1 -0
- package/dist/components/form/{TextArea.js → textarea/TextArea.js} +3 -10
- package/dist/components/form/textarea/TextArea.js.map +1 -0
- package/dist/components/form/textarea/TextArea.stories.d.ts +8 -0
- package/dist/components/form/textarea/TextArea.stories.d.ts.map +1 -0
- package/dist/components/form/textarea/TextArea.stories.js +15 -0
- package/dist/components/form/textarea/TextArea.stories.js.map +1 -0
- package/dist/components/{layout/list/Value.styled.d.ts → form/textarea/TextArea.styled.d.ts} +24 -12
- package/dist/components/form/textarea/TextArea.styled.d.ts.map +1 -0
- package/dist/components/form/textarea/TextArea.styled.js +9 -0
- package/dist/components/form/textarea/TextArea.styled.js.map +1 -0
- package/dist/components/icons/Icon.js +1 -2
- package/dist/components/icons/Icon.js.map +1 -1
- package/dist/components/layout/list/Header.d.ts +174 -7
- package/dist/components/layout/list/Header.d.ts.map +1 -1
- package/dist/components/layout/list/Header.js +36 -11
- package/dist/components/layout/list/Header.js.map +1 -1
- package/dist/components/layout/list/Header.stories.d.ts +8 -0
- package/dist/components/layout/list/Header.stories.d.ts.map +1 -0
- package/dist/components/layout/list/Header.stories.js +33 -0
- package/dist/components/layout/list/Header.stories.js.map +1 -0
- package/dist/components/layout/list/Item.d.ts +88 -7
- package/dist/components/layout/list/Item.d.ts.map +1 -1
- package/dist/components/layout/list/Item.js +66 -33
- package/dist/components/layout/list/Item.js.map +1 -1
- package/dist/components/layout/list/Item.stories.d.ts +10 -0
- package/dist/components/layout/list/Item.stories.d.ts.map +1 -0
- package/dist/components/layout/list/Item.stories.js +65 -0
- package/dist/components/layout/list/Item.stories.js.map +1 -0
- package/dist/components/layout/list/Label.d.ts +83 -5
- package/dist/components/layout/list/Label.d.ts.map +1 -1
- package/dist/components/layout/list/Label.js +24 -6
- package/dist/components/layout/list/Label.js.map +1 -1
- package/dist/components/layout/list/Label.stories.d.ts +8 -0
- package/dist/components/layout/list/Label.stories.d.ts.map +1 -0
- package/dist/components/layout/list/Label.stories.js +35 -0
- package/dist/components/layout/list/Label.stories.js.map +1 -0
- package/dist/components/layout/list/List.d.ts +86 -7
- package/dist/components/layout/list/List.d.ts.map +1 -1
- package/dist/components/layout/list/List.js +15 -9
- package/dist/components/layout/list/List.js.map +1 -1
- package/dist/components/layout/list/List.stories.d.ts +9 -0
- package/dist/components/layout/list/List.stories.d.ts.map +1 -0
- package/dist/components/layout/list/List.stories.js +53 -0
- package/dist/components/layout/list/List.stories.js.map +1 -0
- package/dist/components/layout/list/Value.d.ts +81 -1
- package/dist/components/layout/list/Value.d.ts.map +1 -1
- package/dist/components/layout/list/Value.js +9 -2
- package/dist/components/layout/list/Value.js.map +1 -1
- package/dist/components/layout/list/Value.stories.d.ts +8 -0
- package/dist/components/layout/list/Value.stories.d.ts.map +1 -0
- package/dist/components/layout/list/Value.stories.js +29 -0
- package/dist/components/layout/list/Value.stories.js.map +1 -0
- package/dist/components/layout/section/Section.d.ts +83 -8
- package/dist/components/layout/section/Section.d.ts.map +1 -1
- package/dist/components/layout/section/Section.js +17 -15
- package/dist/components/layout/section/Section.js.map +1 -1
- package/dist/components/layout/section/Section.stories.d.ts +8 -0
- package/dist/components/layout/section/Section.stories.d.ts.map +1 -0
- package/dist/components/layout/section/Section.stories.js +37 -0
- package/dist/components/layout/section/Section.stories.js.map +1 -0
- package/dist/components/layout/section/SectionContainer.d.ts +80 -5
- package/dist/components/layout/section/SectionContainer.d.ts.map +1 -1
- package/dist/components/layout/section/SectionContainer.js +9 -8
- package/dist/components/layout/section/SectionContainer.js.map +1 -1
- package/dist/components/ui/message/Message.d.ts +17 -9
- package/dist/components/ui/message/Message.d.ts.map +1 -1
- package/dist/components/ui/message/Message.styled.d.ts +17 -9
- package/dist/components/ui/message/Message.styled.d.ts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/scrollbars.css.d.ts +4 -0
- package/dist/scrollbars.css.d.ts.map +1 -0
- package/dist/scrollbars.css.js +34 -0
- package/dist/scrollbars.css.js.map +1 -0
- package/dist/theme.d.ts +125 -69
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +2 -0
- package/dist/theme.js.map +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Drawer.html +14 -16
- package/docs/classes/Pop.html +14 -16
- package/docs/classes/ToasterProvider.html +10 -12
- package/docs/enums/ICON.html +14 -16
- package/docs/functions/Action.html +6 -8
- package/docs/functions/Button.html +6 -8
- package/docs/functions/Card.html +6 -8
- package/docs/functions/Checkbox.html +6 -8
- package/docs/functions/Choice.html +7 -9
- package/docs/functions/CoveringLoader.html +6 -8
- package/docs/functions/DirectionPad.html +6 -8
- package/docs/functions/EqualActions.html +6 -8
- package/docs/functions/FullLoader.html +6 -8
- package/docs/functions/HandleEsc.html +6 -8
- package/docs/functions/Header.html +6 -8
- package/docs/functions/HeaderIconAction.html +6 -8
- package/docs/functions/Icon-1.html +6 -8
- package/docs/functions/If.html +6 -8
- package/docs/functions/Input.html +7 -9
- package/docs/functions/KeyValue.html +6 -8
- package/docs/functions/Label.html +6 -8
- package/docs/functions/List-1.html +18 -10
- package/docs/functions/Loader.html +6 -8
- package/docs/functions/Loading.html +6 -8
- package/docs/functions/Message.html +6 -8
- package/docs/functions/Modal-1.html +6 -8
- package/docs/functions/ModalButtons-1.html +6 -8
- package/docs/functions/PopLoader.html +6 -8
- package/docs/functions/PopOption.html +6 -8
- package/docs/functions/SearchContainer.html +6 -8
- package/docs/functions/Section.html +146 -0
- package/docs/functions/Select.html +6 -8
- package/docs/functions/Selector.html +7 -9
- package/docs/functions/Spacer.html +6 -8
- package/docs/functions/Stats.html +6 -8
- package/docs/functions/StickyHeader-1.html +6 -8
- package/docs/functions/StickyHeader.Content.html +5 -7
- package/docs/functions/Table.html +6 -8
- package/docs/functions/TextArea.html +6 -8
- package/docs/functions/Toggle.html +6 -8
- package/docs/functions/getCssText.html +6 -8
- package/docs/functions/styled.html +6 -8
- package/docs/functions/useToaster.html +7 -9
- package/docs/index.html +6 -8
- package/docs/modules/List.html +10 -9
- package/docs/modules/Modal.html +6 -8
- package/docs/modules/ModalButtons.html +6 -8
- package/docs/modules/StickyHeader.html +6 -8
- package/docs/modules.html +9 -13
- package/docs/pages/tutorials/Test.html +6 -8
- package/docs/types/ThemeCSS.html +7 -9
- package/docs/variables/List.Header.html +8 -9
- package/docs/variables/List.Item.html +54 -0
- package/docs/variables/Modal.NegateMargin.html +5 -7
- package/docs/variables/ModalButtons.Button.html +5 -7
- package/docs/variables/cssReset.html +7 -9
- package/docs/variables/miuiScrollbars.html +96 -0
- package/esm/components/form/input/Input.css.d.ts +47 -0
- package/esm/components/form/input/Input.css.d.ts.map +1 -0
- package/esm/components/form/input/Input.css.js +48 -0
- package/esm/components/form/input/Input.css.js.map +1 -0
- package/esm/components/form/input/Input.styled.d.ts +68 -36
- package/esm/components/form/input/Input.styled.d.ts.map +1 -1
- package/esm/components/form/input/Input.styled.js +4 -49
- package/esm/components/form/input/Input.styled.js.map +1 -1
- package/esm/components/form/textarea/TextArea.d.ts.map +1 -0
- package/esm/components/form/textarea/TextArea.js +16 -0
- package/esm/components/form/textarea/TextArea.js.map +1 -0
- package/esm/components/form/textarea/TextArea.stories.d.ts +8 -0
- package/esm/components/form/textarea/TextArea.stories.d.ts.map +1 -0
- package/esm/components/form/textarea/TextArea.stories.js +12 -0
- package/esm/components/form/textarea/TextArea.stories.js.map +1 -0
- package/esm/components/{layout/list/Value.styled.d.ts → form/textarea/TextArea.styled.d.ts} +24 -12
- package/esm/components/form/textarea/TextArea.styled.d.ts.map +1 -0
- package/esm/components/form/textarea/TextArea.styled.js +14 -0
- package/esm/components/form/textarea/TextArea.styled.js.map +1 -0
- package/esm/components/layout/list/Header.d.ts +174 -7
- package/esm/components/layout/list/Header.d.ts.map +1 -1
- package/esm/components/layout/list/Header.js +24 -11
- package/esm/components/layout/list/Header.js.map +1 -1
- package/esm/components/layout/list/Header.stories.d.ts +8 -0
- package/esm/components/layout/list/Header.stories.d.ts.map +1 -0
- package/esm/components/layout/list/Header.stories.js +27 -0
- package/esm/components/layout/list/Header.stories.js.map +1 -0
- package/esm/components/layout/list/Item.d.ts +88 -7
- package/esm/components/layout/list/Item.d.ts.map +1 -1
- package/esm/components/layout/list/Item.js +64 -33
- package/esm/components/layout/list/Item.js.map +1 -1
- package/esm/components/layout/list/Item.stories.d.ts +10 -0
- package/esm/components/layout/list/Item.stories.d.ts.map +1 -0
- package/esm/components/layout/list/Item.stories.js +57 -0
- package/esm/components/layout/list/Item.stories.js.map +1 -0
- package/esm/components/layout/list/Label.d.ts +83 -5
- package/esm/components/layout/list/Label.d.ts.map +1 -1
- package/esm/components/layout/list/Label.js +12 -6
- package/esm/components/layout/list/Label.js.map +1 -1
- package/esm/components/layout/list/Label.stories.d.ts +8 -0
- package/esm/components/layout/list/Label.stories.d.ts.map +1 -0
- package/esm/components/layout/list/Label.stories.js +29 -0
- package/esm/components/layout/list/Label.stories.js.map +1 -0
- package/esm/components/layout/list/List.d.ts +86 -7
- package/esm/components/layout/list/List.d.ts.map +1 -1
- package/esm/components/layout/list/List.js +15 -9
- package/esm/components/layout/list/List.js.map +1 -1
- package/esm/components/layout/list/List.stories.d.ts +9 -0
- package/esm/components/layout/list/List.stories.d.ts.map +1 -0
- package/esm/components/layout/list/List.stories.js +46 -0
- package/esm/components/layout/list/List.stories.js.map +1 -0
- package/esm/components/layout/list/Value.d.ts +81 -1
- package/esm/components/layout/list/Value.d.ts.map +1 -1
- package/esm/components/layout/list/Value.js +9 -1
- package/esm/components/layout/list/Value.js.map +1 -1
- package/esm/components/layout/list/Value.stories.d.ts +8 -0
- package/esm/components/layout/list/Value.stories.d.ts.map +1 -0
- package/esm/components/layout/list/Value.stories.js +23 -0
- package/esm/components/layout/list/Value.stories.js.map +1 -0
- package/esm/components/layout/section/Section.d.ts +83 -8
- package/esm/components/layout/section/Section.d.ts.map +1 -1
- package/esm/components/layout/section/Section.js +17 -12
- package/esm/components/layout/section/Section.js.map +1 -1
- package/esm/components/layout/section/Section.stories.d.ts +8 -0
- package/esm/components/layout/section/Section.stories.d.ts.map +1 -0
- package/esm/components/layout/section/Section.stories.js +31 -0
- package/esm/components/layout/section/Section.stories.js.map +1 -0
- package/esm/components/layout/section/SectionContainer.d.ts +80 -5
- package/esm/components/layout/section/SectionContainer.d.ts.map +1 -1
- package/esm/components/layout/section/SectionContainer.js +9 -5
- package/esm/components/layout/section/SectionContainer.js.map +1 -1
- package/esm/components/ui/message/Message.d.ts +17 -9
- package/esm/components/ui/message/Message.d.ts.map +1 -1
- package/esm/components/ui/message/Message.styled.d.ts +17 -9
- package/esm/components/ui/message/Message.styled.d.ts.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -2
- package/esm/index.js.map +1 -1
- package/esm/scrollbars.css.d.ts +4 -0
- package/esm/scrollbars.css.d.ts.map +1 -0
- package/esm/scrollbars.css.js +49 -0
- package/esm/scrollbars.css.js.map +1 -0
- package/esm/theme.d.ts +125 -69
- package/esm/theme.d.ts.map +1 -1
- package/esm/theme.js +2 -0
- package/esm/theme.js.map +1 -1
- package/package.json +7 -6
- package/src/components/form/input/Input.css.ts +60 -0
- package/src/components/form/input/Input.styled.ts +4 -52
- package/src/components/form/textarea/TextArea.stories.tsx +21 -0
- package/src/components/form/textarea/TextArea.styled.ts +19 -0
- package/src/components/form/{TextArea.tsx → textarea/TextArea.tsx} +10 -9
- package/src/components/layout/list/Header.stories.tsx +40 -0
- package/src/components/layout/list/Header.tsx +43 -26
- package/src/components/layout/list/Item.stories.tsx +69 -0
- package/src/components/layout/list/Item.tsx +118 -46
- package/src/components/layout/list/Label.stories.tsx +45 -0
- package/src/components/layout/list/Label.tsx +21 -12
- package/src/components/layout/list/List.stories.tsx +84 -0
- package/src/components/layout/list/List.tsx +34 -23
- package/src/components/layout/list/Value.stories.tsx +37 -0
- package/src/components/layout/list/Value.tsx +15 -1
- package/src/components/layout/section/Section.stories.tsx +54 -0
- package/src/components/layout/section/Section.tsx +27 -27
- package/src/components/layout/section/SectionContainer.tsx +10 -13
- package/src/demo/components/form/Choice.tsx +3 -3
- package/src/demo/components/form/Form.tsx +1 -1
- package/src/demo/components/form/Search.tsx +3 -1
- package/src/demo/components/form/Toggle.tsx +3 -1
- package/src/demo/components/layout/card/Card.tsx +3 -3
- package/src/demo/components/ui/icons/Icons.tsx +3 -1
- package/src/demo/components/ui/keyValue/KeyValue.tsx +1 -1
- package/src/demo/components/ui/modal/Modal.tsx +4 -2
- package/src/demo/components/ui/pop/Pop.tsx +1 -1
- package/src/demo/componentsMap.ts +0 -52
- package/src/index.ts +3 -2
- package/src/pages/_app.tsx +2 -0
- package/src/scrollbars.css.ts +56 -0
- package/src/theme.ts +5 -3
- package/dist/components/form/TextArea.d.ts.map +0 -1
- package/dist/components/form/TextArea.js.map +0 -1
- package/dist/components/layout/list/Header.module.scss +0 -8
- package/dist/components/layout/list/Item.module.scss +0 -46
- package/dist/components/layout/list/Label.module.scss +0 -9
- package/dist/components/layout/list/List.module.scss +0 -8
- package/dist/components/layout/list/Value.styled.d.ts.map +0 -1
- package/dist/components/layout/list/Value.styled.js +0 -13
- package/dist/components/layout/list/Value.styled.js.map +0 -1
- package/dist/components/layout/section/Section.module.scss +0 -24
- package/dist/components/layout/section/SectionContainer.module.scss +0 -4
- package/docs/functions/Item-1.html +0 -109
- package/docs/functions/Section-1.html +0 -109
- package/docs/modules/Item.html +0 -64
- package/docs/modules/Section.html +0 -61
- package/docs/variables/Item.Label.html +0 -56
- package/docs/variables/Item.Value.html +0 -56
- package/docs/variables/Section.Container.html +0 -55
- package/esm/components/form/TextArea.d.ts.map +0 -1
- package/esm/components/form/TextArea.js +0 -20
- package/esm/components/form/TextArea.js.map +0 -1
- package/esm/components/layout/list/Header.module.scss +0 -8
- package/esm/components/layout/list/Item.module.scss +0 -46
- package/esm/components/layout/list/Label.module.scss +0 -9
- package/esm/components/layout/list/List.module.scss +0 -8
- package/esm/components/layout/list/Value.styled.d.ts.map +0 -1
- package/esm/components/layout/list/Value.styled.js +0 -10
- package/esm/components/layout/list/Value.styled.js.map +0 -1
- package/esm/components/layout/section/Section.module.scss +0 -24
- package/esm/components/layout/section/SectionContainer.module.scss +0 -4
- package/src/components/layout/list/Header.module.scss +0 -8
- package/src/components/layout/list/Item.module.scss +0 -46
- package/src/components/layout/list/Label.module.scss +0 -9
- package/src/components/layout/list/List.module.scss +0 -8
- package/src/components/layout/list/Value.styled.ts +0 -13
- package/src/components/layout/section/Section.module.scss +0 -24
- package/src/components/layout/section/SectionContainer.module.scss +0 -4
- package/src/demo/components/form/Input.tsx +0 -28
- package/src/demo/components/layout/list/Header.tsx +0 -23
- package/src/demo/components/layout/list/Inset.tsx +0 -23
- package/src/demo/components/layout/list/ItemRatio.tsx +0 -20
- package/src/demo/components/layout/list/Label.tsx +0 -31
- package/src/demo/components/layout/list/List.Item.module.scss +0 -7
- package/src/demo/components/layout/list/List.Item.tsx +0 -24
- package/src/demo/components/layout/list/Selection.tsx +0 -16
- package/src/demo/components/layout/list/Value.module.scss +0 -4
- package/src/demo/components/layout/list/Value.tsx +0 -25
- package/src/demo/components/layout/section/Section.tsx +0 -33
- package/src/demo/components/ui/message/Message.tsx +0 -27
- /package/dist/components/form/{TextArea.d.ts → textarea/TextArea.d.ts} +0 -0
- /package/esm/components/form/{TextArea.d.ts → textarea/TextArea.d.ts} +0 -0
package/esm/theme.d.ts
CHANGED
|
@@ -66,17 +66,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
66
66
|
tableStripedBg: string;
|
|
67
67
|
};
|
|
68
68
|
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
69
|
-
mx: (value: string) => {
|
|
70
|
-
marginLeft: string;
|
|
71
|
-
marginRight: string;
|
|
69
|
+
mx: (value: string | number) => {
|
|
70
|
+
marginLeft: string | number;
|
|
71
|
+
marginRight: string | number;
|
|
72
72
|
};
|
|
73
|
-
my: (value: string) => {
|
|
74
|
-
marginTop: string;
|
|
75
|
-
marginBottom: string;
|
|
73
|
+
my: (value: string | number) => {
|
|
74
|
+
marginTop: string | number;
|
|
75
|
+
marginBottom: string | number;
|
|
76
76
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
px: (value: string | number) => {
|
|
78
|
+
paddingLeft: string | number;
|
|
79
|
+
paddingRight: string | number;
|
|
80
|
+
};
|
|
81
|
+
py: (value: string | number) => {
|
|
82
|
+
paddingTop: string | number;
|
|
83
|
+
paddingBottom: string | number;
|
|
84
|
+
};
|
|
85
|
+
size: (value: string | number) => {
|
|
86
|
+
width: string | number;
|
|
87
|
+
height: string | number;
|
|
80
88
|
};
|
|
81
89
|
}>>(type: Type, ...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").ComponentType<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
|
|
82
90
|
variants?: {
|
|
@@ -85,11 +93,11 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
85
93
|
[x: number]: CSS;
|
|
86
94
|
};
|
|
87
95
|
};
|
|
88
|
-
compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"]
|
|
96
|
+
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]>; } : import("@stitches/react/types/util").WideObject) & {
|
|
89
97
|
css: CSS;
|
|
90
98
|
})[];
|
|
91
|
-
defaultVariants?: "variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"]
|
|
92
|
-
} & CSS &
|
|
99
|
+
defaultVariants?: "variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]>; } : import("@stitches/react/types/util").WideObject;
|
|
100
|
+
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => StyledComponent<Type, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, import("@stitches/react/types/css-util").CSS<{}, {
|
|
93
101
|
colors: {
|
|
94
102
|
background: string;
|
|
95
103
|
mainColor: string;
|
|
@@ -148,17 +156,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
148
156
|
tableStripedBg: string;
|
|
149
157
|
};
|
|
150
158
|
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
151
|
-
mx: (value: string) => {
|
|
152
|
-
marginLeft: string;
|
|
153
|
-
marginRight: string;
|
|
159
|
+
mx: (value: string | number) => {
|
|
160
|
+
marginLeft: string | number;
|
|
161
|
+
marginRight: string | number;
|
|
162
|
+
};
|
|
163
|
+
my: (value: string | number) => {
|
|
164
|
+
marginTop: string | number;
|
|
165
|
+
marginBottom: string | number;
|
|
166
|
+
};
|
|
167
|
+
px: (value: string | number) => {
|
|
168
|
+
paddingLeft: string | number;
|
|
169
|
+
paddingRight: string | number;
|
|
154
170
|
};
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
171
|
+
py: (value: string | number) => {
|
|
172
|
+
paddingTop: string | number;
|
|
173
|
+
paddingBottom: string | number;
|
|
158
174
|
};
|
|
159
|
-
size: (value: string) => {
|
|
160
|
-
width: string;
|
|
161
|
-
height: string;
|
|
175
|
+
size: (value: string | number) => {
|
|
176
|
+
width: string | number;
|
|
177
|
+
height: string | number;
|
|
162
178
|
};
|
|
163
179
|
}>>, css: <Composers extends (string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function | {
|
|
164
180
|
[name: string]: unknown;
|
|
@@ -221,17 +237,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
221
237
|
tableStripedBg: string;
|
|
222
238
|
};
|
|
223
239
|
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
224
|
-
mx: (value: string) => {
|
|
225
|
-
marginLeft: string;
|
|
226
|
-
marginRight: string;
|
|
240
|
+
mx: (value: string | number) => {
|
|
241
|
+
marginLeft: string | number;
|
|
242
|
+
marginRight: string | number;
|
|
227
243
|
};
|
|
228
|
-
my: (value: string) => {
|
|
229
|
-
marginTop: string;
|
|
230
|
-
marginBottom: string;
|
|
244
|
+
my: (value: string | number) => {
|
|
245
|
+
marginTop: string | number;
|
|
246
|
+
marginBottom: string | number;
|
|
231
247
|
};
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
248
|
+
px: (value: string | number) => {
|
|
249
|
+
paddingLeft: string | number;
|
|
250
|
+
paddingRight: string | number;
|
|
251
|
+
};
|
|
252
|
+
py: (value: string | number) => {
|
|
253
|
+
paddingTop: string | number;
|
|
254
|
+
paddingBottom: string | number;
|
|
255
|
+
};
|
|
256
|
+
size: (value: string | number) => {
|
|
257
|
+
width: string | number;
|
|
258
|
+
height: string | number;
|
|
235
259
|
};
|
|
236
260
|
}>>(...composers: { [K in keyof Composers]: string extends Composers[K] ? Composers[K] : Composers[K] extends string | import("react").JSXElementConstructor<any> | import("react").ExoticComponent<any> | import("@stitches/react/types/util").Function ? Composers[K] : import("@stitches/react/types/stitches").RemoveIndex<CSS> & {
|
|
237
261
|
variants?: {
|
|
@@ -240,11 +264,11 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
240
264
|
[x: number]: CSS;
|
|
241
265
|
};
|
|
242
266
|
};
|
|
243
|
-
compoundVariants?: (("variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"]
|
|
267
|
+
compoundVariants?: (("variants" extends keyof Composers[K] ? { [Name in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name]>; } : import("@stitches/react/types/util").WideObject) & {
|
|
244
268
|
css: CSS;
|
|
245
269
|
})[];
|
|
246
|
-
defaultVariants?: "variants" extends keyof Composers[K] ? Composers[K][keyof Composers[K] & "variants"]
|
|
247
|
-
} & CSS &
|
|
270
|
+
defaultVariants?: "variants" extends keyof Composers[K] ? { [Name_1 in keyof Composers[K][keyof Composers[K] & "variants"]]?: import("@stitches/react/types/util").String | import("@stitches/react/types/util").Widen<keyof Composers[K][keyof Composers[K] & "variants"][Name_1]>; } : import("@stitches/react/types/util").WideObject;
|
|
271
|
+
} & CSS & { [K2 in keyof Composers[K]]: K2 extends "compoundVariants" | "defaultVariants" | "variants" ? unknown : K2 extends keyof CSS ? CSS[K2] : unknown; }; }) => import("@stitches/react/types/styled-component").CssComponent<import("@stitches/react/types/styled-component").StyledComponentType<Composers>, import("@stitches/react/types/styled-component").StyledComponentProps<Composers>, {}, CSS>, globalCss: <Styles extends {
|
|
248
272
|
[K: string]: any;
|
|
249
273
|
}>(...styles: ({
|
|
250
274
|
'@import'?: unknown;
|
|
@@ -309,17 +333,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
309
333
|
tableStripedBg: string;
|
|
310
334
|
};
|
|
311
335
|
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
312
|
-
mx: (value: string) => {
|
|
313
|
-
marginLeft: string;
|
|
314
|
-
marginRight: string;
|
|
336
|
+
mx: (value: string | number) => {
|
|
337
|
+
marginLeft: string | number;
|
|
338
|
+
marginRight: string | number;
|
|
339
|
+
};
|
|
340
|
+
my: (value: string | number) => {
|
|
341
|
+
marginTop: string | number;
|
|
342
|
+
marginBottom: string | number;
|
|
315
343
|
};
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
344
|
+
px: (value: string | number) => {
|
|
345
|
+
paddingLeft: string | number;
|
|
346
|
+
paddingRight: string | number;
|
|
319
347
|
};
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
348
|
+
py: (value: string | number) => {
|
|
349
|
+
paddingTop: string | number;
|
|
350
|
+
paddingBottom: string | number;
|
|
351
|
+
};
|
|
352
|
+
size: (value: string | number) => {
|
|
353
|
+
width: string | number;
|
|
354
|
+
height: string | number;
|
|
323
355
|
};
|
|
324
356
|
}>;
|
|
325
357
|
} : K extends `@property ${string}` ? import("@stitches/react/types/css").AtRule.Property : import("@stitches/react/types/css-util").CSS<{}, {
|
|
@@ -381,17 +413,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
381
413
|
tableStripedBg: string;
|
|
382
414
|
};
|
|
383
415
|
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
384
|
-
mx: (value: string) => {
|
|
385
|
-
marginLeft: string;
|
|
386
|
-
marginRight: string;
|
|
416
|
+
mx: (value: string | number) => {
|
|
417
|
+
marginLeft: string | number;
|
|
418
|
+
marginRight: string | number;
|
|
419
|
+
};
|
|
420
|
+
my: (value: string | number) => {
|
|
421
|
+
marginTop: string | number;
|
|
422
|
+
marginBottom: string | number;
|
|
387
423
|
};
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
424
|
+
px: (value: string | number) => {
|
|
425
|
+
paddingLeft: string | number;
|
|
426
|
+
paddingRight: string | number;
|
|
391
427
|
};
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
428
|
+
py: (value: string | number) => {
|
|
429
|
+
paddingTop: string | number;
|
|
430
|
+
paddingBottom: string | number;
|
|
431
|
+
};
|
|
432
|
+
size: (value: string | number) => {
|
|
433
|
+
width: string | number;
|
|
434
|
+
height: string | number;
|
|
395
435
|
};
|
|
396
436
|
}>; })[]) => () => string, keyframes: (style: {
|
|
397
437
|
[offset: string]: import("@stitches/react/types/css-util").CSS<{}, {
|
|
@@ -453,17 +493,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
453
493
|
tableStripedBg: string;
|
|
454
494
|
};
|
|
455
495
|
}, import("@stitches/react/types/config").DefaultThemeMap, {
|
|
456
|
-
mx: (value: string) => {
|
|
457
|
-
marginLeft: string;
|
|
458
|
-
marginRight: string;
|
|
496
|
+
mx: (value: string | number) => {
|
|
497
|
+
marginLeft: string | number;
|
|
498
|
+
marginRight: string | number;
|
|
499
|
+
};
|
|
500
|
+
my: (value: string | number) => {
|
|
501
|
+
marginTop: string | number;
|
|
502
|
+
marginBottom: string | number;
|
|
459
503
|
};
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
504
|
+
px: (value: string | number) => {
|
|
505
|
+
paddingLeft: string | number;
|
|
506
|
+
paddingRight: string | number;
|
|
463
507
|
};
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
508
|
+
py: (value: string | number) => {
|
|
509
|
+
paddingTop: string | number;
|
|
510
|
+
paddingBottom: string | number;
|
|
511
|
+
};
|
|
512
|
+
size: (value: string | number) => {
|
|
513
|
+
width: string | number;
|
|
514
|
+
height: string | number;
|
|
467
515
|
};
|
|
468
516
|
}>;
|
|
469
517
|
}) => {
|
|
@@ -723,17 +771,25 @@ declare const styled: <Type extends import("react").ComponentType<any> | keyof J
|
|
|
723
771
|
};
|
|
724
772
|
themeMap: import("@stitches/react/types/config").DefaultThemeMap;
|
|
725
773
|
utils: {
|
|
726
|
-
mx: (value: string) => {
|
|
727
|
-
marginLeft: string;
|
|
728
|
-
marginRight: string;
|
|
774
|
+
mx: (value: string | number) => {
|
|
775
|
+
marginLeft: string | number;
|
|
776
|
+
marginRight: string | number;
|
|
777
|
+
};
|
|
778
|
+
my: (value: string | number) => {
|
|
779
|
+
marginTop: string | number;
|
|
780
|
+
marginBottom: string | number;
|
|
781
|
+
};
|
|
782
|
+
px: (value: string | number) => {
|
|
783
|
+
paddingLeft: string | number;
|
|
784
|
+
paddingRight: string | number;
|
|
729
785
|
};
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
786
|
+
py: (value: string | number) => {
|
|
787
|
+
paddingTop: string | number;
|
|
788
|
+
paddingBottom: string | number;
|
|
733
789
|
};
|
|
734
|
-
size: (value: string) => {
|
|
735
|
-
width: string;
|
|
736
|
-
height: string;
|
|
790
|
+
size: (value: string | number) => {
|
|
791
|
+
width: string | number;
|
|
792
|
+
height: string | number;
|
|
737
793
|
};
|
|
738
794
|
};
|
|
739
795
|
};
|
package/esm/theme.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,KAAK,EAAE,GAAG,IAAI,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAS1D,QAAA,MAAM,OAAO,OAAQ,MAAM,WAAoB,CAAC;AAChD,QAAA,MAAM,iBAAiB,OAAQ,MAAM,WAAoC,CAAC;AAC1E,QAAA,MAAM,aAAa,OAAQ,MAAM,WAAgC,CAAC;AAClE,QAAA,MAAM,WAAW,OAAQ,MAAM,WAA8B,CAAC;AAE9D,QAAA,MACI,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBAkFU,MAAM;;;;
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names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AAG,GAAG,EAAE,MAAM,GAAG,GAAG,IAC5D,eAAe,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAEhD,YAAY,EACR,QAAQ,EACR,cAAc,GACjB,CAAC;AAEF,OAAO,EACH,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAEzE,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,WAAW,GACd,CAAC"}
|
package/esm/theme.js
CHANGED
|
@@ -71,6 +71,8 @@ const { styled, css, globalCss, keyframes, getCssText, theme, createTheme, confi
|
|
|
71
71
|
utils: {
|
|
72
72
|
mx: (value) => ({ marginLeft: value, marginRight: value }),
|
|
73
73
|
my: (value) => ({ marginTop: value, marginBottom: value }),
|
|
74
|
+
px: (value) => ({ paddingLeft: value, paddingRight: value }),
|
|
75
|
+
py: (value) => ({ paddingTop: value, paddingBottom: value }),
|
|
74
76
|
size: (value) => ({ width: value, height: value }),
|
|
75
77
|
},
|
|
76
78
|
});
|
package/esm/theme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAKjD,MAAM,MAAM,GAAG;IACX,UAAU,EAAE,CAAC;IACb,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,QAAQ;CACjB,CAAC;AAGF,MAAM,OAAO,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC;AAChD,MAAM,iBAAiB,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;AAC1E,MAAM,aAAa,GAAG,CAAC,EAAU,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,GAAG,MAAM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;YACjB,MAAM,EAAE,SAAS;YACjB,MAAM,EAAE,SAAS;YAEjB,KAAK,EAAE,SAAS;YAChB,UAAU,EAAE,SAAS;YACrB,eAAe,EAAE,SAAS;YAC1B,YAAY,EAAE,aAAa;YAC3B,cAAc,EAAE,SAAS;SAC5B;KACJ;IACD,KAAK,EAAE;QACH,EAAE,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;QAC3E,EAAE,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAC3E,EAAE,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,CAAC;QAC7E,EAAE,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;QAC7E,IAAI,EAAE,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;KACtE;CACJ,CAAC,CAAC;AAgBH,OAAO,EACH,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAEzE,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,WAAW,GACd,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-miui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"author": "Jacek Nowacki",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
"prepack": "yarn compile",
|
|
16
16
|
"prepublishOnly": "yarn audit && yarn lint && yarn test && yarn docs",
|
|
17
17
|
"start:dev": "yarn storybook",
|
|
18
|
+
"start:dev:legacy": "next dev",
|
|
18
19
|
"deploy:dev": "next build && next export && netlify deploy --dir out",
|
|
19
20
|
"updates": "npx --yes npm-check-updates --dep prod",
|
|
20
21
|
"updates:dev": "npx --yes npm-check-updates --dep dev",
|
|
@@ -39,9 +40,9 @@
|
|
|
39
40
|
"oop-timers": "^5.0.0"
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
|
-
"@babel/core": "^7.
|
|
43
|
-
"@babel/preset-env": "^7.
|
|
44
|
-
"@babel/preset-typescript": "^7.
|
|
43
|
+
"@babel/core": "^7.22.5",
|
|
44
|
+
"@babel/preset-env": "^7.22.5",
|
|
45
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
45
46
|
"@dzek69/eslint-config-base": "^2.4.0",
|
|
46
47
|
"@dzek69/eslint-config-import": "^1.2.0",
|
|
47
48
|
"@dzek69/eslint-config-import-typescript": "^1.0.0",
|
|
@@ -71,7 +72,7 @@
|
|
|
71
72
|
"fs-extra": "^11.1.1",
|
|
72
73
|
"jest": "^29.5.0",
|
|
73
74
|
"must": "^0.13.4",
|
|
74
|
-
"next": "^13.
|
|
75
|
+
"next": "^13.4.4",
|
|
75
76
|
"nodemon": "^2.0.22",
|
|
76
77
|
"prettier": "^2.8.7",
|
|
77
78
|
"react": "^18.2.0",
|
|
@@ -81,7 +82,7 @@
|
|
|
81
82
|
"storybook": "^7.0.11",
|
|
82
83
|
"ts-node": "^10.9.1",
|
|
83
84
|
"typedoc": "^0.23.28",
|
|
84
|
-
"typescript": "^5.
|
|
85
|
+
"typescript": "^5.1.3"
|
|
85
86
|
},
|
|
86
87
|
"peerDependencies": {
|
|
87
88
|
"react": "^18.2.0",
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// import type { ThemeCSS } from "../../../theme"; TODO restore
|
|
2
|
+
|
|
3
|
+
import { dimensionsPxToRem, fontPxToRem, borderPxToRem } from "../../../theme.js";
|
|
4
|
+
|
|
5
|
+
const input = {
|
|
6
|
+
"height": dimensionsPxToRem(103),
|
|
7
|
+
"fontSize": fontPxToRem(25),
|
|
8
|
+
"color": "$text",
|
|
9
|
+
"border": "none",
|
|
10
|
+
"display": "block",
|
|
11
|
+
"width": "100%",
|
|
12
|
+
"background": "none",
|
|
13
|
+
"fontFamily": "inherit",
|
|
14
|
+
"padding": "1.2em 0",
|
|
15
|
+
"flex": 1,
|
|
16
|
+
|
|
17
|
+
"&::placeholder": {
|
|
18
|
+
color: "$sub",
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
"&:read-only, &:disabled": {
|
|
22
|
+
color: "inherit",
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
// satisfies ThemeCSS; @TODO restore
|
|
26
|
+
|
|
27
|
+
const wrapper = {
|
|
28
|
+
background: "white",
|
|
29
|
+
display: "inline-flex",
|
|
30
|
+
width: "100%",
|
|
31
|
+
borderRadius: "2px",
|
|
32
|
+
padding: `0 ${dimensionsPxToRem(36)}`,
|
|
33
|
+
border: `${borderPxToRem(1)} solid $border`,
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
|
|
36
|
+
variants: {
|
|
37
|
+
disabled: {
|
|
38
|
+
true: {
|
|
39
|
+
background: "$inputDisabledBg",
|
|
40
|
+
color: "$inputDisabledText",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
readOnly: {
|
|
44
|
+
true: {
|
|
45
|
+
color: "$inputDisabledText",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
focused: {
|
|
49
|
+
true: {
|
|
50
|
+
borderColor: "$focusColor",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
// satisfies ThemeCSS; TODO restore
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
input,
|
|
59
|
+
wrapper,
|
|
60
|
+
};
|
|
@@ -1,58 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { dimensionsPxToRem, styled } from "../../../theme.js";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
"height": dimensionsPxToRem(103),
|
|
5
|
-
"fontSize": fontPxToRem(34),
|
|
6
|
-
"color": "$text",
|
|
7
|
-
"border": "none",
|
|
8
|
-
"display": "block",
|
|
9
|
-
"width": "100%",
|
|
10
|
-
"background": "none",
|
|
11
|
-
"fontFamily": "inherit",
|
|
12
|
-
"padding": "1.2em 0",
|
|
13
|
-
"flex": 1,
|
|
3
|
+
import { input, wrapper } from "./Input.css.js";
|
|
14
4
|
|
|
15
|
-
|
|
16
|
-
color: "$sub",
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
const StyledWrapper = styled("div", {
|
|
21
|
-
background: "white",
|
|
22
|
-
display: "inline-flex",
|
|
23
|
-
width: "100%",
|
|
24
|
-
borderRadius: "2px",
|
|
25
|
-
padding: `0 ${dimensionsPxToRem(36)}`,
|
|
26
|
-
border: `${borderPxToRem(1)} solid $border`,
|
|
27
|
-
alignItems: "center",
|
|
28
|
-
|
|
29
|
-
variants: {
|
|
30
|
-
disabled: {
|
|
31
|
-
true: {
|
|
32
|
-
background: "$inputDisabledBg",
|
|
33
|
-
color: "$inputDisabledText",
|
|
5
|
+
const StyledInput = styled("input", input);
|
|
34
6
|
|
|
35
|
-
|
|
36
|
-
color: "$inputDisabledText",
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
readOnly: {
|
|
41
|
-
true: {
|
|
42
|
-
color: "$inputDisabledText",
|
|
43
|
-
|
|
44
|
-
[StyledInput.toString()]: {
|
|
45
|
-
color: "$inputDisabledText",
|
|
46
|
-
},
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
focused: {
|
|
50
|
-
true: {
|
|
51
|
-
borderColor: "$focusColor",
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
});
|
|
7
|
+
const StyledWrapper = styled("div", wrapper);
|
|
56
8
|
|
|
57
9
|
const StyledPrefix = styled("div", {
|
|
58
10
|
marginRight: dimensionsPxToRem(36),
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
2
|
+
|
|
3
|
+
import { TextArea } from "./TextArea.js";
|
|
4
|
+
|
|
5
|
+
const meta: Meta = {
|
|
6
|
+
title: "Components/Form/TextArea",
|
|
7
|
+
component: TextArea,
|
|
8
|
+
tags: ["autodocs", "form"],
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
type Story = StoryObj<typeof TextArea>;
|
|
12
|
+
|
|
13
|
+
const Primary: Story = {
|
|
14
|
+
args: {},
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
Primary,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export default meta;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { dimensionsPxToRem, styled } from "../../../theme.js";
|
|
2
|
+
import { input, wrapper } from "../input/Input.css";
|
|
3
|
+
import { miuiScrollbars } from "../../../scrollbars.css";
|
|
4
|
+
|
|
5
|
+
const StyledTextArea = styled("textarea", {
|
|
6
|
+
...miuiScrollbars,
|
|
7
|
+
...input,
|
|
8
|
+
...wrapper,
|
|
9
|
+
|
|
10
|
+
padding: `1.2em ${dimensionsPxToRem(36)}`,
|
|
11
|
+
height: "unset",
|
|
12
|
+
resize: "vertical",
|
|
13
|
+
minHeight: dimensionsPxToRem(103),
|
|
14
|
+
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
StyledTextArea,
|
|
19
|
+
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import React, { useCallback, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import styles from "./input/Input.module.scss";
|
|
3
|
+
import { StyledTextArea } from "./TextArea.styled";
|
|
6
4
|
|
|
7
5
|
interface Props {
|
|
8
6
|
children?: never;
|
|
9
7
|
}
|
|
10
8
|
|
|
11
9
|
const TextArea: React.FC<React.TextareaHTMLAttributes<HTMLTextAreaElement> & Props> = ({
|
|
12
|
-
|
|
10
|
+
children,
|
|
13
11
|
onFocus, onBlur,
|
|
14
12
|
...props
|
|
15
13
|
}) => {
|
|
@@ -25,12 +23,15 @@ const TextArea: React.FC<React.TextareaHTMLAttributes<HTMLTextAreaElement> & Pro
|
|
|
25
23
|
onBlur?.(e);
|
|
26
24
|
}, [onBlur]);
|
|
27
25
|
|
|
28
|
-
const cls = classnames(styles.wrapper, {
|
|
29
|
-
[styles.wrapperFocused]: focused,
|
|
30
|
-
}, styles.input, styles.textarea, className);
|
|
31
|
-
|
|
32
26
|
return (
|
|
33
|
-
<
|
|
27
|
+
<StyledTextArea
|
|
28
|
+
{...props}
|
|
29
|
+
disabled={Boolean(props.disabled)}
|
|
30
|
+
readOnly={Boolean(props.readOnly)}
|
|
31
|
+
focused={focused}
|
|
32
|
+
onFocus={handleFocus}
|
|
33
|
+
onBlur={handleBlur}
|
|
34
|
+
/>
|
|
34
35
|
);
|
|
35
36
|
};
|
|
36
37
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
import type { StoryObj, Meta } from "@storybook/react";
|
|
4
|
+
|
|
5
|
+
import { Header } from "./Header.js";
|
|
6
|
+
import { List } from "./List.js";
|
|
7
|
+
|
|
8
|
+
const meta: Meta = {
|
|
9
|
+
title: "Components/Layout/List/Header",
|
|
10
|
+
component: Header,
|
|
11
|
+
tags: ["autodocs", "layout"],
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof Header>;
|
|
15
|
+
|
|
16
|
+
const Primary: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
children: "Section name",
|
|
19
|
+
},
|
|
20
|
+
render: (args) => {
|
|
21
|
+
return (
|
|
22
|
+
<List>
|
|
23
|
+
<Header {...args} />
|
|
24
|
+
<List.Item>Item 1</List.Item>
|
|
25
|
+
<List.Item>Item 2</List.Item>
|
|
26
|
+
<List.Item>Item 3</List.Item>
|
|
27
|
+
<Header {...args} />
|
|
28
|
+
<List.Item>Item 1</List.Item>
|
|
29
|
+
<List.Item>Item 2</List.Item>
|
|
30
|
+
<List.Item>Item 3</List.Item>
|
|
31
|
+
</List>
|
|
32
|
+
);
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
Primary,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default meta;
|