@emeraldemperaur/vector-sigma 1.4.0 → 1.4.2
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/README.md +60 -6
- package/lib/index.cjs +332 -122
- package/lib/index.esm.js +324 -117
- package/lib/types/components/avatar/avatar.d.ts +3 -3
- package/lib/types/components/button/button.d.ts +2 -2
- package/lib/types/components/checkbox/checkbox.d.ts +3 -3
- package/lib/types/components/conditional/conditional.d.ts +3 -3
- package/lib/types/components/datepicker/datepicker.d.ts +2 -2
- package/lib/types/components/daterangepicker/daterangepicker.d.ts +2 -2
- package/lib/types/components/datetimepicker/datetimepicker.d.ts +2 -2
- package/lib/types/components/dropdown/dropdown.d.ts +2 -2
- package/lib/types/components/file/file.d.ts +1 -1
- package/lib/types/components/file/filemultiple.d.ts +1 -1
- package/lib/types/components/image/image.d.ts +2 -2
- package/lib/types/components/input/input.d.ts +2 -2
- package/lib/types/components/input/uuidInput.d.ts +1 -1
- package/lib/types/components/inputcurrency/inputcurrency.d.ts +2 -2
- package/lib/types/components/inputcurrency/stockInput.d.ts +1 -1
- package/lib/types/components/radio/radio.d.ts +2 -2
- package/lib/types/components/select/select.d.ts +1 -1
- package/lib/types/components/selectmultiple/selectmultiple.d.ts +1 -1
- package/lib/types/components/slider/range.d.ts +1 -1
- package/lib/types/components/slider/slider.d.ts +2 -2
- package/lib/types/components/toggle/toggle.d.ts +1 -1
- package/lib/types/components/xtitle/xtitle.d.ts +1 -1
- package/lib/types/index.d.ts +2 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ alert(s);
|
|
|
69
69
|
</li>
|
|
70
70
|
|
|
71
71
|
<li><strong>🛡️Input Validation</strong></br>
|
|
72
|
-
<p align="justify">Declarative schema (JSON) facilitates a validation engine that is comprehensive, accessible and easy to maintain. <code>onChange()</code>, <code>onBlur()</code> input event control state updates, errors and <code>values</code> are handled automatically. <code>onSubmit()</code> handler is automatically blocked if the input is invalid.</p>
|
|
72
|
+
<p align="justify">Declarative schema (JSON) facilitates a validation engine that is comprehensive, accessible and easy to maintain. <code>onChange()</code>, <code>onBlur()</code> input event control state updates, errors and <code>values</code> are handled automatically. <code>onSubmit()</code> handler is automatically blocked if the input vs. validation schema is invalid.</p>
|
|
73
73
|
</li>
|
|
74
74
|
|
|
75
75
|
<li><strong>🧠Form State Management</strong></br>
|
|
@@ -80,18 +80,72 @@ alert(s);
|
|
|
80
80
|
<p align="justify">Customizable to fit seamlessly into an existing design system and allow developer control of the visual layer through standard CSS patterns.</p>
|
|
81
81
|
|
|
82
82
|
```javascript
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
import { Theme, File, Dropdown } from '@emeraldemperaur/vector-sigma';
|
|
84
|
+
|
|
85
|
+
const App = () => {
|
|
86
|
+
return (
|
|
87
|
+
|
|
88
|
+
<Theme>
|
|
89
|
+
<File/>
|
|
90
|
+
<Dropdown/>
|
|
91
|
+
</Theme>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
85
94
|
```
|
|
86
95
|
</li>
|
|
87
96
|
|
|
88
97
|
<li><strong>🧩Exported UI Components</strong></br>
|
|
89
98
|
<p align="justify">Explicitly exported reusable form UI components with material, outline and neumorphic design variants from package entry point <code>src/index.ts</code> to enable developer-friendly use as lightweight component library.</p>
|
|
90
|
-
<p><em>Container, Row, Column,
|
|
99
|
+
<p><em>Container, Row, Column, Theme, AvatarInput, ButtonInput, CheckboxGroupInput, ConditionalTrigger, DatePicker, DateRangePicker, DateTimePicker, Dropdown, File, FileMultiple, FlagIcon, Icon, Image, Input, PasswordInput, PhoneInput, UUIDInput, CreditCardInput, CurrencyInput, StockInput, RadioGroupInput, OptionSelect, MultipleSelect, RangeSlider, SliderInput, Toggle, SectionTitle</em></p>
|
|
91
100
|
|
|
92
101
|
```javascript
|
|
93
|
-
|
|
94
|
-
|
|
102
|
+
import { Container, Column, Row, CheckboxGroup, Dropdown, File, RangeSlider } from '@emeraldemperaur/vector-sigma';
|
|
103
|
+
import { Theme } from '@emeraldemperaur/vector-sigma';
|
|
104
|
+
import { Form, Formik } from 'formik'
|
|
105
|
+
import * as Yup from 'yup'
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
const App = () => {
|
|
109
|
+
return (
|
|
110
|
+
<Container fluid>
|
|
111
|
+
<Row>
|
|
112
|
+
<Column span={9}>
|
|
113
|
+
<Formik
|
|
114
|
+
initialValues={{
|
|
115
|
+
dropdownInput: 'Zaibatsu',
|
|
116
|
+
}}
|
|
117
|
+
|
|
118
|
+
validationSchema={Yup.object({
|
|
119
|
+
dropdownInput: Yup.string().required('Dropdown selection is required'),
|
|
120
|
+
})}
|
|
121
|
+
|
|
122
|
+
onSubmit={(values) => {
|
|
123
|
+
console.log(values);
|
|
124
|
+
}}
|
|
125
|
+
>
|
|
126
|
+
{({ values }) => (
|
|
127
|
+
<Form>
|
|
128
|
+
<Theme>
|
|
129
|
+
<File alias='inputFile' width={3}/>
|
|
130
|
+
<Dropdown alias="dropdownInput" width={8} inputLabel="Dropdown Element" inputtype="dropdown-outline" value="Zaibatsu"
|
|
131
|
+
inputoptions={
|
|
132
|
+
[
|
|
133
|
+
{optionid: 1, optionvalue: "Kaiju", optionurl:"https://github.com/emeraldemperaur", text: "Kaiju"},
|
|
134
|
+
{optionid: 2, optionvalue: "Meka", optionurl:"https://www.mekaegwim.ca", text: "Meka"},
|
|
135
|
+
{optionid: 3, optionvalue: "Godzilla", optionurl:"https://www.me.ca", text: "Godzilla"},
|
|
136
|
+
{optionid: 4, optionvalue: "Zaibatsu", optionurl:"https://www.npmjs.com/package/@emeraldemperaur/vector-sigma", text: "Zaibatsu"},
|
|
137
|
+
]}/>
|
|
138
|
+
</Theme>
|
|
139
|
+
<button type="submit" style={{ marginTop: 20 }}>Submit</button>
|
|
140
|
+
</Form>
|
|
141
|
+
)}
|
|
142
|
+
</Formik>
|
|
143
|
+
</Column>
|
|
144
|
+
</Row>
|
|
145
|
+
</Container>
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
|
|
95
149
|
```
|
|
96
150
|
</li>
|
|
97
151
|
|