@hipay/hipay-material-ui 1.0.0-beta.1 → 1.0.0-beta.11
Sign up to get free protection for your applications and to get access to all the features.
- package/HI-CHANGELOG.md +58 -0
- package/HiAlertModal/HiAlertModal.js +247 -0
- package/HiAlertModal/index.js +16 -0
- package/HiBreadcrumb/HiBreadcrumb.js +143 -0
- package/HiBreadcrumb/HiStep.js +123 -0
- package/HiBreadcrumb/HiStepConnector.js +142 -0
- package/HiBreadcrumb/HiStepIcon.js +134 -0
- package/HiBreadcrumb/HiStepLabel.js +182 -0
- package/HiBreadcrumb/HiStepper.js +125 -0
- package/HiBreadcrumb/index.js +16 -0
- package/HiCheckbox/HiCheckbox.js +4 -1
- package/HiChip/HiChip.js +4 -4
- package/HiChip/HiChipSwitch.js +11 -4
- package/HiColoredLabel/HiColoredLabel.js +3 -2
- package/HiDatePicker/HiDatePicker.js +34 -30
- package/HiDatePicker/HiDateRangePicker.js +7 -5
- package/HiDatePicker/HiDateRangeSelector.js +23 -11
- package/HiDatePicker/ListPicker.js +32 -7
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +5 -1
- package/HiDatePicker/Overlays/YearPickerOverlay.js +2 -1
- package/HiDotsStepper/HiDot.js +151 -0
- package/HiDotsStepper/HiDotsStepper.js +146 -0
- package/HiDotsStepper/index.js +16 -0
- package/HiExpansionPanel/HiExpansionPanel.js +231 -0
- package/HiExpansionPanel/index.js +16 -0
- package/HiForm/HiAddressField.js +204 -0
- package/HiForm/HiFormControl.js +39 -31
- package/HiForm/HiInput.js +70 -97
- package/HiForm/HiSearchField.js +2 -2
- package/HiForm/index.js +9 -0
- package/HiPdfReader/HiPdfReader.js +282 -0
- package/HiPdfReader/index.js +16 -0
- package/HiPins/HiPins.js +0 -1
- package/HiSelect/HiSelect.js +400 -353
- package/HiSelect/HiSelectField.js +8 -6
- package/HiSelect/HiSuggestSelect.js +27 -47
- package/HiSelect/HiSuggestSelectField.js +88 -80
- package/HiSelect/SelectInput.js +34 -23
- package/HiSelectableList/HiSelectableList.js +9 -3
- package/HiSelectableList/HiSelectableListItem.js +96 -55
- package/HiSwitch/HiSwitchState.js +1 -1
- package/HiSwitch/index.js +6 -0
- package/HiTable/BodyCellBuilder.js +91 -96
- package/HiTable/BodyCells/CellCountry.js +11 -36
- package/HiTable/BodyCells/CellIcon.js +4 -2
- package/HiTable/BodyCells/CellImage.js +23 -10
- package/HiTable/BodyCells/CellLayout.js +25 -19
- package/HiTable/BodyCells/CellSentinel.js +12 -4
- package/HiTable/BodyCells/CellStatus.js +6 -2
- package/HiTable/BodyCells/CellText.js +2 -1
- package/HiTable/BodyCells/CellThirdPartySecurity.js +5 -6
- package/HiTable/BodyRow.js +78 -57
- package/HiTable/ColumnFilter.js +28 -15
- package/HiTable/HeaderCell.js +17 -14
- package/HiTable/HiTable.js +26 -10
- package/HiTable/HiTableBody.js +38 -14
- package/HiTable/HiTableContextMenu.js +7 -3
- package/HiTable/HiTableFooterScroll.js +1 -1
- package/HiTable/HiTableHead.js +24 -7
- package/HiTable/OrderColumns.js +6 -2
- package/HiTopBar/HiTopBar.js +57 -139
- package/README.md +13 -13
- package/es/HiAlertModal/HiAlertModal.js +189 -0
- package/es/HiAlertModal/index.js +1 -0
- package/es/HiBreadcrumb/HiBreadcrumb.js +73 -0
- package/es/HiBreadcrumb/HiStep.js +93 -0
- package/es/HiBreadcrumb/HiStepConnector.js +83 -0
- package/es/HiBreadcrumb/HiStepIcon.js +81 -0
- package/es/HiBreadcrumb/HiStepLabel.js +154 -0
- package/es/HiBreadcrumb/HiStepper.js +62 -0
- package/es/HiBreadcrumb/index.js +1 -0
- package/es/HiCheckbox/HiCheckbox.js +4 -1
- package/es/HiChip/HiChip.js +4 -4
- package/es/HiChip/HiChipSwitch.js +11 -4
- package/es/HiColoredLabel/HiColoredLabel.js +3 -2
- package/es/HiDatePicker/HiDatePicker.js +30 -25
- package/es/HiDatePicker/HiDateRangePicker.js +7 -5
- package/es/HiDatePicker/HiDateRangeSelector.js +24 -12
- package/es/HiDatePicker/ListPicker.js +39 -20
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +5 -1
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +2 -1
- package/es/HiDotsStepper/HiDot.js +92 -0
- package/es/HiDotsStepper/HiDotsStepper.js +83 -0
- package/es/HiDotsStepper/index.js +1 -0
- package/es/HiExpansionPanel/HiExpansionPanel.js +170 -0
- package/es/HiExpansionPanel/index.js +1 -0
- package/es/HiForm/HiAddressField.js +142 -0
- package/es/HiForm/HiFormControl.js +32 -18
- package/es/HiForm/HiInput.js +68 -97
- package/es/HiForm/HiSearchField.js +2 -2
- package/es/HiForm/index.js +2 -1
- package/es/HiPdfReader/HiPdfReader.js +198 -0
- package/es/HiPdfReader/index.js +1 -0
- package/es/HiPins/HiPins.js +0 -1
- package/es/HiSelect/HiSelect.js +375 -324
- package/es/HiSelect/HiSelectField.js +9 -7
- package/es/HiSelect/HiSuggestSelect.js +26 -39
- package/es/HiSelect/HiSuggestSelectField.js +77 -69
- package/es/HiSelect/SelectInput.js +44 -23
- package/es/HiSelectableList/HiSelectableList.js +10 -4
- package/es/HiSelectableList/HiSelectableListItem.js +91 -55
- package/es/HiSwitch/HiSwitchState.js +1 -1
- package/es/HiSwitch/index.js +1 -0
- package/es/HiTable/BodyCellBuilder.js +90 -97
- package/es/HiTable/BodyCells/CellCountry.js +10 -35
- package/es/HiTable/BodyCells/CellIcon.js +4 -2
- package/es/HiTable/BodyCells/CellImage.js +23 -10
- package/es/HiTable/BodyCells/CellLayout.js +27 -21
- package/es/HiTable/BodyCells/CellSentinel.js +12 -4
- package/es/HiTable/BodyCells/CellStatus.js +6 -2
- package/es/HiTable/BodyCells/CellText.js +2 -1
- package/es/HiTable/BodyCells/CellThirdPartySecurity.js +5 -6
- package/es/HiTable/BodyRow.js +79 -56
- package/es/HiTable/ColumnFilter.js +15 -9
- package/es/HiTable/HeaderCell.js +17 -14
- package/es/HiTable/HiTable.js +26 -10
- package/es/HiTable/HiTableBody.js +34 -11
- package/es/HiTable/HiTableContextMenu.js +7 -3
- package/es/HiTable/HiTableFooterScroll.js +1 -1
- package/es/HiTable/HiTableHead.js +19 -7
- package/es/HiTable/OrderColumns.js +6 -2
- package/es/HiTopBar/HiTopBar.js +58 -127
- package/es/styles/createHiMuiTheme.js +11 -0
- package/es/utils/HiIconBuilder.js +13 -5
- package/es/utils/hiHelpers.js +2 -2
- package/hmu/images/countries/ad.svg +151 -0
- package/hmu/images/countries/ae.svg +6 -0
- package/hmu/images/countries/af.svg +83 -0
- package/hmu/images/countries/ag.svg +15 -0
- package/hmu/images/countries/ai.svg +767 -0
- package/hmu/images/countries/al.svg +5 -0
- package/hmu/images/countries/am.svg +5 -0
- package/hmu/images/countries/ao.svg +13 -0
- package/hmu/images/countries/aq.svg +6 -0
- package/hmu/images/countries/ar.svg +32 -0
- package/hmu/images/countries/as.svg +33 -0
- package/hmu/images/countries/at.svg +6 -0
- package/hmu/images/countries/au.svg +9 -0
- package/hmu/images/countries/aw.svg +186 -0
- package/hmu/images/countries/ax.svg +18 -0
- package/hmu/images/countries/az.svg +8 -0
- package/hmu/images/countries/ba.svg +12 -0
- package/hmu/images/countries/bb.svg +6 -0
- package/hmu/images/countries/bd.svg +4 -0
- package/hmu/images/countries/be.svg +7 -0
- package/hmu/images/countries/bf.svg +7 -0
- package/hmu/images/countries/bg.svg +7 -0
- package/hmu/images/countries/bh.svg +11 -0
- package/hmu/images/countries/bi.svg +15 -0
- package/hmu/images/countries/bj.svg +14 -0
- package/hmu/images/countries/bl.svg +7 -0
- package/hmu/images/countries/bm.svg +99 -0
- package/hmu/images/countries/bn.svg +36 -0
- package/hmu/images/countries/bo.svg +686 -0
- package/hmu/images/countries/bq.svg +5 -0
- package/hmu/images/countries/br.svg +45 -0
- package/hmu/images/countries/bs.svg +13 -0
- package/hmu/images/countries/bt.svg +89 -0
- package/hmu/images/countries/bv.svg +13 -0
- package/hmu/images/countries/bw.svg +7 -0
- package/hmu/images/countries/by.svg +61 -0
- package/hmu/images/countries/bz.svg +146 -0
- package/hmu/images/countries/ca.svg +4 -0
- package/hmu/images/countries/cc.svg +19 -0
- package/hmu/images/countries/cd.svg +5 -0
- package/hmu/images/countries/cf.svg +15 -0
- package/hmu/images/countries/cg.svg +12 -0
- package/hmu/images/countries/ch.svg +9 -0
- package/hmu/images/countries/ci.svg +7 -0
- package/hmu/images/countries/ck.svg +9 -0
- package/hmu/images/countries/cl.svg +13 -0
- package/hmu/images/countries/cm.svg +15 -0
- package/hmu/images/countries/cn.svg +11 -0
- package/hmu/images/countries/co.svg +7 -0
- package/hmu/images/countries/cr.svg +7 -0
- package/hmu/images/countries/cu.svg +13 -0
- package/hmu/images/countries/cv.svg +13 -0
- package/hmu/images/countries/cw.svg +14 -0
- package/hmu/images/countries/cx.svg +15 -0
- package/hmu/images/countries/cy.svg +6 -0
- package/hmu/images/countries/cz.svg +12 -0
- package/hmu/images/countries/de.svg +5 -0
- package/hmu/images/countries/dj.svg +13 -0
- package/hmu/images/countries/dk.svg +5 -0
- package/hmu/images/countries/dm.svg +152 -0
- package/hmu/images/countries/do.svg +6745 -0
- package/hmu/images/countries/dz.svg +5 -0
- package/hmu/images/countries/ec.svg +141 -0
- package/hmu/images/countries/ee.svg +7 -0
- package/hmu/images/countries/eg.svg +38 -0
- package/hmu/images/countries/eh.svg +15 -0
- package/hmu/images/countries/er.svg +8 -0
- package/hmu/images/countries/es-ct.svg +4 -0
- package/hmu/images/countries/es.svg +581 -0
- package/hmu/images/countries/et.svg +14 -0
- package/hmu/images/countries/eu.svg +28 -0
- package/hmu/images/countries/fi.svg +5 -0
- package/hmu/images/countries/fj.svg +124 -0
- package/hmu/images/countries/fk.svg +90 -0
- package/hmu/images/countries/fm.svg +11 -0
- package/hmu/images/countries/fo.svg +12 -0
- package/hmu/images/countries/fr.svg +7 -0
- package/hmu/images/countries/ga.svg +7 -0
- package/hmu/images/countries/gb-eng.svg +5 -0
- package/hmu/images/countries/gb-nir.svg +137 -0
- package/hmu/images/countries/gb-sct.svg +4 -0
- package/hmu/images/countries/gb-wls.svg +9 -0
- package/hmu/images/countries/gb.svg +15 -0
- package/hmu/images/countries/gd.svg +27 -0
- package/hmu/images/countries/ge.svg +6 -0
- package/hmu/images/countries/gf.svg +5 -0
- package/hmu/images/countries/gg.svg +9 -0
- package/hmu/images/countries/gh.svg +6 -0
- package/hmu/images/countries/gi.svg +33 -0
- package/hmu/images/countries/gl.svg +4 -0
- package/hmu/images/countries/gm.svg +14 -0
- package/hmu/images/countries/gn.svg +7 -0
- package/hmu/images/countries/gp.svg +7 -0
- package/hmu/images/countries/gq.svg +23 -0
- package/hmu/images/countries/gr.svg +22 -0
- package/hmu/images/countries/gs.svg +205 -0
- package/hmu/images/countries/gt.svg +204 -0
- package/hmu/images/countries/gu.svg +39 -0
- package/hmu/images/countries/gw.svg +13 -0
- package/hmu/images/countries/gy.svg +9 -0
- package/hmu/images/countries/hk.svg +32 -0
- package/hmu/images/countries/hm.svg +9 -0
- package/hmu/images/countries/hn.svg +18 -0
- package/hmu/images/countries/hr.svg +59 -0
- package/hmu/images/countries/ht.svg +122 -0
- package/hmu/images/countries/hu.svg +7 -0
- package/hmu/images/countries/id.svg +6 -0
- package/hmu/images/countries/ie.svg +7 -0
- package/hmu/images/countries/il.svg +14 -0
- package/hmu/images/countries/im.svg +36 -0
- package/hmu/images/countries/in.svg +25 -0
- package/hmu/images/countries/io.svg +148 -0
- package/hmu/images/countries/iq.svg +10 -0
- package/hmu/images/countries/ir.svg +219 -0
- package/hmu/images/countries/is.svg +12 -0
- package/hmu/images/countries/it.svg +7 -0
- package/hmu/images/countries/je.svg +32 -0
- package/hmu/images/countries/jm.svg +8 -0
- package/hmu/images/countries/jo.svg +16 -0
- package/hmu/images/countries/jp.svg +11 -0
- package/hmu/images/countries/ke.svg +23 -0
- package/hmu/images/countries/kg.svg +15 -0
- package/hmu/images/countries/kh.svg +69 -0
- package/hmu/images/countries/ki.svg +36 -0
- package/hmu/images/countries/km.svg +16 -0
- package/hmu/images/countries/kn.svg +14 -0
- package/hmu/images/countries/kp.svg +15 -0
- package/hmu/images/countries/kr.svg +24 -0
- package/hmu/images/countries/kw.svg +13 -0
- package/hmu/images/countries/ky.svg +63 -0
- package/hmu/images/countries/kz.svg +23 -0
- package/hmu/images/countries/la.svg +12 -0
- package/hmu/images/countries/lb.svg +15 -0
- package/hmu/images/countries/lc.svg +8 -0
- package/hmu/images/countries/li.svg +43 -0
- package/hmu/images/countries/lk.svg +22 -0
- package/hmu/images/countries/lr.svg +14 -0
- package/hmu/images/countries/ls.svg +8 -0
- package/hmu/images/countries/lt.svg +7 -0
- package/hmu/images/countries/lu.svg +5 -0
- package/hmu/images/countries/lv.svg +6 -0
- package/hmu/images/countries/ly.svg +13 -0
- package/hmu/images/countries/ma.svg +4 -0
- package/hmu/images/countries/mc.svg +6 -0
- package/hmu/images/countries/md.svg +72 -0
- package/hmu/images/countries/me.svg +118 -0
- package/hmu/images/countries/mf.svg +7 -0
- package/hmu/images/countries/mg.svg +7 -0
- package/hmu/images/countries/mh.svg +7 -0
- package/hmu/images/countries/mk.svg +5 -0
- package/hmu/images/countries/ml.svg +7 -0
- package/hmu/images/countries/mm.svg +16 -0
- package/hmu/images/countries/mn.svg +13 -0
- package/hmu/images/countries/mo.svg +9 -0
- package/hmu/images/countries/mp.svg +86 -0
- package/hmu/images/countries/mq.svg +7 -0
- package/hmu/images/countries/mr.svg +6 -0
- package/hmu/images/countries/ms.svg +39 -0
- package/hmu/images/countries/mt.svg +49 -0
- package/hmu/images/countries/mu.svg +8 -0
- package/hmu/images/countries/mv.svg +6 -0
- package/hmu/images/countries/mw.svg +10 -0
- package/hmu/images/countries/mx.svg +385 -0
- package/hmu/images/countries/my.svg +15 -0
- package/hmu/images/countries/mz.svg +21 -0
- package/hmu/images/countries/na.svg +16 -0
- package/hmu/images/countries/nc.svg +7 -0
- package/hmu/images/countries/ne.svg +6 -0
- package/hmu/images/countries/nf.svg +9 -0
- package/hmu/images/countries/ng.svg +6 -0
- package/hmu/images/countries/ni.svg +131 -0
- package/hmu/images/countries/nl.svg +7 -0
- package/hmu/images/countries/no.svg +7 -0
- package/hmu/images/countries/np.svg +14 -0
- package/hmu/images/countries/nr.svg +12 -0
- package/hmu/images/countries/nu.svg +26 -0
- package/hmu/images/countries/nz.svg +41 -0
- package/hmu/images/countries/om.svg +116 -0
- package/hmu/images/countries/pa.svg +14 -0
- package/hmu/images/countries/pe.svg +279 -0
- package/hmu/images/countries/pf.svg +19 -0
- package/hmu/images/countries/pg.svg +9 -0
- package/hmu/images/countries/ph.svg +28 -0
- package/hmu/images/countries/pk.svg +15 -0
- package/hmu/images/countries/pl.svg +6 -0
- package/hmu/images/countries/pm.svg +7 -0
- package/hmu/images/countries/pn.svg +62 -0
- package/hmu/images/countries/pr.svg +13 -0
- package/hmu/images/countries/ps.svg +15 -0
- package/hmu/images/countries/pt.svg +57 -0
- package/hmu/images/countries/pw.svg +11 -0
- package/hmu/images/countries/py.svg +157 -0
- package/hmu/images/countries/qa.svg +4 -0
- package/hmu/images/countries/re.svg +7 -0
- package/hmu/images/countries/ro.svg +7 -0
- package/hmu/images/countries/rs.svg +292 -0
- package/hmu/images/countries/ru.svg +7 -0
- package/hmu/images/countries/rw.svg +13 -0
- package/hmu/images/countries/sa.svg +26 -0
- package/hmu/images/countries/sb.svg +13 -0
- package/hmu/images/countries/sc.svg +14 -0
- package/hmu/images/countries/sd.svg +13 -0
- package/hmu/images/countries/se.svg +16 -0
- package/hmu/images/countries/sg.svg +13 -0
- package/hmu/images/countries/sh.svg +74 -0
- package/hmu/images/countries/si.svg +18 -0
- package/hmu/images/countries/sj.svg +7 -0
- package/hmu/images/countries/sk.svg +9 -0
- package/hmu/images/countries/sl.svg +7 -0
- package/hmu/images/countries/sm.svg +91 -0
- package/hmu/images/countries/sn.svg +8 -0
- package/hmu/images/countries/so.svg +11 -0
- package/hmu/images/countries/sr.svg +6 -0
- package/hmu/images/countries/ss.svg +8 -0
- package/hmu/images/countries/st.svg +16 -0
- package/hmu/images/countries/sv.svg +618 -0
- package/hmu/images/countries/sx.svg +56 -0
- package/hmu/images/countries/sy.svg +6 -0
- package/hmu/images/countries/sz.svg +45 -0
- package/hmu/images/countries/tc.svg +67 -0
- package/hmu/images/countries/td.svg +7 -0
- package/hmu/images/countries/tf.svg +15 -0
- package/hmu/images/countries/tg.svg +14 -0
- package/hmu/images/countries/th.svg +7 -0
- package/hmu/images/countries/tj.svg +22 -0
- package/hmu/images/countries/tk.svg +5 -0
- package/hmu/images/countries/tl.svg +13 -0
- package/hmu/images/countries/tm.svg +213 -0
- package/hmu/images/countries/tn.svg +13 -0
- package/hmu/images/countries/to.svg +10 -0
- package/hmu/images/countries/tr.svg +8 -0
- package/hmu/images/countries/tt.svg +5 -0
- package/hmu/images/countries/tv.svg +27 -0
- package/hmu/images/countries/tw.svg +14 -0
- package/hmu/images/countries/tz.svg +13 -0
- package/hmu/images/countries/ua.svg +6 -0
- package/hmu/images/countries/ug.svg +30 -0
- package/hmu/images/countries/um.svg +23 -0
- package/hmu/images/countries/un.svg +16 -0
- package/hmu/images/countries/us.svg +12 -0
- package/hmu/images/countries/uy.svg +28 -0
- package/hmu/images/countries/uz.svg +30 -0
- package/hmu/images/countries/va.svg +483 -0
- package/hmu/images/countries/vc.svg +8 -0
- package/hmu/images/countries/ve.svg +26 -0
- package/hmu/images/countries/vg.svg +133 -0
- package/hmu/images/countries/vi.svg +31 -0
- package/hmu/images/countries/vn.svg +11 -0
- package/hmu/images/countries/vu.svg +18 -0
- package/hmu/images/countries/wf.svg +7 -0
- package/hmu/images/countries/ws.svg +7 -0
- package/hmu/images/countries/ye.svg +7 -0
- package/hmu/images/countries/yt.svg +7 -0
- package/hmu/images/countries/za.svg +17 -0
- package/hmu/images/countries/zm.svg +27 -0
- package/hmu/images/countries/zw.svg +21 -0
- package/hmu/images/hipay-white-logo.svg +42 -0
- package/hmu/images/logo_visa_75wx45h.gif +0 -0
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -2
- package/styles/createHiMuiTheme.js +11 -0
- package/umd/hipay-material-ui.development.js +11339 -11003
- package/umd/hipay-material-ui.production.min.js +5 -5
- package/utils/HiIconBuilder.js +17 -7
- package/utils/hiHelpers.js +2 -2
@@ -84,7 +84,8 @@ var HiSelectField = function (_React$PureComponent) {
|
|
84
84
|
checkbox = _props.checkbox,
|
85
85
|
searchable = _props.searchable,
|
86
86
|
translations = _props.translations,
|
87
|
-
|
87
|
+
className = _props.className,
|
88
|
+
others = (0, _objectWithoutProperties3.default)(_props, ['label', 'required', 'disabled', 'error', 'errorText', 'helperText', 'helperIcon', 'id', 'name', 'value', 'options', 'type', 'multiple', 'iconAll', 'checkbox', 'searchable', 'translations', 'className']);
|
88
89
|
|
89
90
|
|
90
91
|
return _react2.default.createElement(
|
@@ -97,7 +98,8 @@ var HiSelectField = function (_React$PureComponent) {
|
|
97
98
|
error: error,
|
98
99
|
errorText: errorText,
|
99
100
|
helperText: helperText,
|
100
|
-
helperIcon: helperIcon
|
101
|
+
helperIcon: helperIcon,
|
102
|
+
className: className
|
101
103
|
},
|
102
104
|
_react2.default.createElement(_HiSelect2.default, (0, _extends3.default)({
|
103
105
|
id: id,
|
@@ -110,10 +112,6 @@ var HiSelectField = function (_React$PureComponent) {
|
|
110
112
|
checkbox: checkbox,
|
111
113
|
searchable: searchable,
|
112
114
|
translations: translations,
|
113
|
-
onClick: this.handleClick,
|
114
|
-
onMouseEnter: this.handleMouseEnter,
|
115
|
-
onMouseLeave: this.handleMouseLeave,
|
116
|
-
onClose: this.handleClose,
|
117
115
|
disabled: disabled,
|
118
116
|
error: error
|
119
117
|
}, others))
|
@@ -124,6 +122,10 @@ var HiSelectField = function (_React$PureComponent) {
|
|
124
122
|
}(_react2.default.PureComponent);
|
125
123
|
|
126
124
|
HiSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
125
|
+
/**
|
126
|
+
* Surcharge des styles
|
127
|
+
*/
|
128
|
+
className: _propTypes2.default.string,
|
127
129
|
/**
|
128
130
|
* Si `true`, l'input sera inactif.
|
129
131
|
*/
|
@@ -5,10 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.styles = undefined;
|
7
7
|
|
8
|
-
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
9
|
-
|
10
|
-
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
11
|
-
|
12
8
|
var _extends2 = require('babel-runtime/helpers/extends');
|
13
9
|
|
14
10
|
var _extends3 = _interopRequireDefault(_extends2);
|
@@ -45,10 +41,6 @@ var _propTypes = require('prop-types');
|
|
45
41
|
|
46
42
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
47
43
|
|
48
|
-
var _classnames = require('classnames');
|
49
|
-
|
50
|
-
var _classnames2 = _interopRequireDefault(_classnames);
|
51
|
-
|
52
44
|
var _reactDom = require('react-dom');
|
53
45
|
|
54
46
|
var _Grow = require('material-ui/transitions/Grow');
|
@@ -59,10 +51,6 @@ var _Paper = require('material-ui/Paper');
|
|
59
51
|
|
60
52
|
var _Paper2 = _interopRequireDefault(_Paper);
|
61
53
|
|
62
|
-
var _ClickAwayListener = require('material-ui/utils/ClickAwayListener');
|
63
|
-
|
64
|
-
var _ClickAwayListener2 = _interopRequireDefault(_ClickAwayListener);
|
65
|
-
|
66
54
|
var _reactPopper = require('react-popper');
|
67
55
|
|
68
56
|
var _HiSelectableList = require('../HiSelectableList');
|
@@ -86,7 +74,7 @@ var styles = exports.styles = function styles(theme) {
|
|
86
74
|
root: {
|
87
75
|
backgroundColor: theme.palette.background2,
|
88
76
|
maxWidth: 500,
|
89
|
-
minWidth:
|
77
|
+
minWidth: 200,
|
90
78
|
width: '100%'
|
91
79
|
},
|
92
80
|
popper: {
|
@@ -95,9 +83,6 @@ var styles = exports.styles = function styles(theme) {
|
|
95
83
|
zIndex: 9,
|
96
84
|
top: '100%'
|
97
85
|
},
|
98
|
-
popperClose: {
|
99
|
-
pointerEvents: 'none'
|
100
|
-
},
|
101
86
|
paper: {
|
102
87
|
borderRadius: '0px 2px',
|
103
88
|
maxHeight: 440,
|
@@ -153,6 +138,8 @@ var HiSuggestSelect = function (_React$PureComponent) {
|
|
153
138
|
items[0].focus();
|
154
139
|
}
|
155
140
|
}, 1);
|
141
|
+
} else if (event.key === 'Escape') {
|
142
|
+
_this.setState({ options: [] });
|
156
143
|
}
|
157
144
|
};
|
158
145
|
|
@@ -162,8 +149,8 @@ var HiSuggestSelect = function (_React$PureComponent) {
|
|
162
149
|
};
|
163
150
|
|
164
151
|
_this.handleSelect = _this.handleSelect.bind(_this);
|
165
|
-
_this.handleClose = _this.handleClose.bind(_this);
|
166
152
|
_this.handleBlur = _this.handleBlur.bind(_this);
|
153
|
+
_this.handleFocus = _this.handleFocus.bind(_this);
|
167
154
|
return _this;
|
168
155
|
}
|
169
156
|
|
@@ -172,29 +159,24 @@ var HiSuggestSelect = function (_React$PureComponent) {
|
|
172
159
|
value: function componentWillReceiveProps(nextProps) {
|
173
160
|
this.setState({ options: nextProps.options });
|
174
161
|
}
|
175
|
-
}, {
|
176
|
-
key: 'handleClose',
|
177
|
-
value: function handleClose() {
|
178
|
-
document.body.style.overflow = 'auto';
|
179
|
-
this.setState({
|
180
|
-
focused: false, // TODO - Make difference between open and focus
|
181
|
-
options: []
|
182
|
-
});
|
183
|
-
}
|
184
162
|
|
185
163
|
// Key down on list items
|
186
164
|
|
187
165
|
|
188
166
|
// Key down on search input
|
189
167
|
|
168
|
+
}, {
|
169
|
+
key: 'handleFocus',
|
170
|
+
value: function handleFocus() {
|
171
|
+
this.setState({ focused: true });
|
172
|
+
}
|
190
173
|
}, {
|
191
174
|
key: 'handleBlur',
|
192
175
|
value: function handleBlur(event) {
|
193
176
|
// Si on click sur un élément de HiInput, on garde le focus
|
194
177
|
// Par exemple sur l'icone reset
|
195
|
-
var overlay = this.overlay;
|
196
178
|
if (!event.relatedTarget || !this.overlay || !this.overlay.contains(event.relatedTarget)) {
|
197
|
-
this.setState({ options: [] });
|
179
|
+
this.setState({ options: [], focused: false });
|
198
180
|
}
|
199
181
|
}
|
200
182
|
}, {
|
@@ -212,7 +194,8 @@ var HiSuggestSelect = function (_React$PureComponent) {
|
|
212
194
|
focused = _state.focused,
|
213
195
|
options = _state.options;
|
214
196
|
|
215
|
-
var open = !!options.length;
|
197
|
+
var open = !!options.length && focused;
|
198
|
+
|
216
199
|
return _react2.default.createElement(
|
217
200
|
'div',
|
218
201
|
{
|
@@ -235,7 +218,8 @@ var HiSuggestSelect = function (_React$PureComponent) {
|
|
235
218
|
},
|
236
219
|
onChange: onSearch,
|
237
220
|
onKeyDown: this.handleKeyDownSearch,
|
238
|
-
onBlur: this.handleBlur
|
221
|
+
onBlur: this.handleBlur,
|
222
|
+
onFocus: this.handleFocus
|
239
223
|
}))
|
240
224
|
),
|
241
225
|
open && _react2.default.createElement(
|
@@ -243,26 +227,22 @@ var HiSuggestSelect = function (_React$PureComponent) {
|
|
243
227
|
{
|
244
228
|
placement: 'bottom-start',
|
245
229
|
eventsEnabled: open,
|
246
|
-
className:
|
230
|
+
className: classes.popper
|
247
231
|
},
|
248
232
|
_react2.default.createElement(
|
249
|
-
|
250
|
-
{
|
233
|
+
_Grow2.default,
|
234
|
+
{ 'in': open, id: 'menu-list', style: { transformOrigin: '0 0 0' } },
|
251
235
|
_react2.default.createElement(
|
252
|
-
|
253
|
-
{
|
254
|
-
_react2.default.createElement(
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
translations: translations,
|
263
|
-
onKeyDown: this.handleKeyDown
|
264
|
-
})
|
265
|
-
)
|
236
|
+
_Paper2.default,
|
237
|
+
{ className: classes.paper },
|
238
|
+
_react2.default.createElement(_HiSelectableList2.default, {
|
239
|
+
itemList: options,
|
240
|
+
selectedIdList: [],
|
241
|
+
checkbox: false,
|
242
|
+
onSelect: this.handleSelect,
|
243
|
+
translations: translations,
|
244
|
+
onKeyDown: this.handleKeyDown
|
245
|
+
})
|
266
246
|
)
|
267
247
|
)
|
268
248
|
)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
|
-
|
4
|
+
value: true
|
5
5
|
});
|
6
6
|
|
7
7
|
var _extends2 = require('babel-runtime/helpers/extends');
|
@@ -56,88 +56,96 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
56
56
|
// @inheritedComponent HiSuggestSelect
|
57
57
|
|
58
58
|
var HiSuggestSelectField = function (_React$PureComponent) {
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
59
|
+
(0, _inherits3.default)(HiSuggestSelectField, _React$PureComponent);
|
60
|
+
|
61
|
+
function HiSuggestSelectField() {
|
62
|
+
(0, _classCallCheck3.default)(this, HiSuggestSelectField);
|
63
|
+
return (0, _possibleConstructorReturn3.default)(this, (HiSuggestSelectField.__proto__ || (0, _getPrototypeOf2.default)(HiSuggestSelectField)).apply(this, arguments));
|
64
|
+
}
|
65
|
+
|
66
|
+
(0, _createClass3.default)(HiSuggestSelectField, [{
|
67
|
+
key: 'render',
|
68
|
+
value: function render() {
|
69
|
+
var _props = this.props,
|
70
|
+
label = _props.label,
|
71
|
+
required = _props.required,
|
72
|
+
disabled = _props.disabled,
|
73
|
+
error = _props.error,
|
74
|
+
errorText = _props.errorText,
|
75
|
+
helperText = _props.helperText,
|
76
|
+
helperIcon = _props.helperIcon,
|
77
|
+
id = _props.id,
|
78
|
+
className = _props.className,
|
79
|
+
others = (0, _objectWithoutProperties3.default)(_props, ['label', 'required', 'disabled', 'error', 'errorText', 'helperText', 'helperIcon', 'id', 'className']);
|
80
|
+
|
81
|
+
|
82
|
+
return _react2.default.createElement(
|
83
|
+
_HiFormControl2.default,
|
84
|
+
{
|
85
|
+
id: id,
|
86
|
+
label: label,
|
87
|
+
required: required,
|
88
|
+
disabled: disabled,
|
89
|
+
error: error,
|
90
|
+
errorText: errorText,
|
91
|
+
helperText: helperText,
|
92
|
+
helperIcon: helperIcon,
|
93
|
+
className: className
|
94
|
+
},
|
95
|
+
_react2.default.createElement(_HiSuggestSelect2.default, (0, _extends3.default)({
|
96
|
+
id: id,
|
97
|
+
translations: {
|
98
|
+
all: 'Tous les pays',
|
99
|
+
no_result_match: 'Aucun résultat correspondant',
|
100
|
+
search: 'Recherche',
|
101
|
+
n_items_selected: '%s pays sélectionnés',
|
102
|
+
one_item_selected: '%s pays sélectionné'
|
103
|
+
},
|
104
|
+
disabled: disabled,
|
105
|
+
error: error
|
106
|
+
}, others))
|
107
|
+
);
|
64
108
|
}
|
65
|
-
|
66
|
-
|
67
|
-
key: 'render',
|
68
|
-
value: function render() {
|
69
|
-
var _props = this.props,
|
70
|
-
label = _props.label,
|
71
|
-
required = _props.required,
|
72
|
-
disabled = _props.disabled,
|
73
|
-
error = _props.error,
|
74
|
-
errorText = _props.errorText,
|
75
|
-
helperText = _props.helperText,
|
76
|
-
helperIcon = _props.helperIcon,
|
77
|
-
id = _props.id,
|
78
|
-
others = (0, _objectWithoutProperties3.default)(_props, ['label', 'required', 'disabled', 'error', 'errorText', 'helperText', 'helperIcon', 'id']);
|
79
|
-
|
80
|
-
|
81
|
-
return _react2.default.createElement(
|
82
|
-
_HiFormControl2.default,
|
83
|
-
{
|
84
|
-
id: id,
|
85
|
-
label: label,
|
86
|
-
required: required,
|
87
|
-
disabled: disabled,
|
88
|
-
error: error,
|
89
|
-
errorText: errorText,
|
90
|
-
helperText: helperText,
|
91
|
-
helperIcon: helperIcon
|
92
|
-
},
|
93
|
-
_react2.default.createElement(_HiSuggestSelect2.default, (0, _extends3.default)({
|
94
|
-
id: id,
|
95
|
-
translations: {
|
96
|
-
all: 'Tous les pays',
|
97
|
-
no_result_match: 'Aucun résultat correspondant',
|
98
|
-
search: 'Recherche',
|
99
|
-
n_items_selected: '%s pays sélectionnés',
|
100
|
-
one_item_selected: '%s pays sélectionné'
|
101
|
-
}
|
102
|
-
}, others))
|
103
|
-
);
|
104
|
-
}
|
105
|
-
}]);
|
106
|
-
return HiSuggestSelectField;
|
109
|
+
}]);
|
110
|
+
return HiSuggestSelectField;
|
107
111
|
}(_react2.default.PureComponent);
|
108
112
|
|
109
113
|
HiSuggestSelectField.propTypes = process.env.NODE_ENV !== "production" ? {
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
114
|
+
/**
|
115
|
+
* Surcharge des styles
|
116
|
+
*/
|
117
|
+
className: _propTypes2.default.string,
|
118
|
+
/**
|
119
|
+
* Si `true`, l'input sera inactif.
|
120
|
+
*/
|
121
|
+
disabled: _propTypes2.default.bool,
|
122
|
+
/**
|
123
|
+
* Si `true`, le champs sera en erreur.
|
124
|
+
*/
|
125
|
+
error: _propTypes2.default.bool,
|
126
|
+
/**
|
127
|
+
* Texte de l'erreur
|
128
|
+
*/
|
129
|
+
errorText: _propTypes2.default.string,
|
130
|
+
/**
|
131
|
+
* Si "true", le texte d'aide s'affichera seulement au clic sur l'icône "Information"
|
132
|
+
*/
|
133
|
+
helperIcon: _propTypes2.default.bool,
|
134
|
+
/**
|
135
|
+
* Texte de l'aide
|
136
|
+
*/
|
137
|
+
helperText: _propTypes2.default.string,
|
138
|
+
/**
|
139
|
+
* id de l'élément input
|
140
|
+
*/
|
141
|
+
id: _propTypes2.default.string,
|
142
|
+
/**
|
143
|
+
* Label du champs
|
144
|
+
*/
|
145
|
+
label: _propTypes2.default.string,
|
146
|
+
/**
|
147
|
+
* true si champs obligatoire
|
148
|
+
*/
|
149
|
+
required: _propTypes2.default.bool
|
142
150
|
} : {};
|
143
151
|
exports.default = HiSuggestSelectField;
|
package/HiSelect/SelectInput.js
CHANGED
@@ -68,7 +68,8 @@ var styles = exports.styles = function styles(theme) {
|
|
68
68
|
height: 40,
|
69
69
|
maxWidth: 500,
|
70
70
|
justifyContent: 'flex-start',
|
71
|
-
padding: 8
|
71
|
+
padding: 8,
|
72
|
+
cursor: 'pointer'
|
72
73
|
},
|
73
74
|
underline: {
|
74
75
|
'&:before': {
|
@@ -100,7 +101,7 @@ var styles = exports.styles = function styles(theme) {
|
|
100
101
|
},
|
101
102
|
inkbar: {
|
102
103
|
'&:not($disabled)': {
|
103
|
-
'&:after': {
|
104
|
+
'&:not($error):after': {
|
104
105
|
backgroundColor: theme.palette.business.primary.normal,
|
105
106
|
left: 0,
|
106
107
|
bottom: 0,
|
@@ -130,7 +131,6 @@ var styles = exports.styles = function styles(theme) {
|
|
130
131
|
},
|
131
132
|
disabled: {
|
132
133
|
color: '' + theme.palette.action.disabled,
|
133
|
-
backgroundColor: '' + theme.palette.input.disabled,
|
134
134
|
'&:before': {
|
135
135
|
display: 'none'
|
136
136
|
}
|
@@ -207,7 +207,8 @@ var SelectInput = function (_React$PureComponent) {
|
|
207
207
|
open = _props.open,
|
208
208
|
focused = _props.focused,
|
209
209
|
error = _props.error,
|
210
|
-
id = _props.id
|
210
|
+
id = _props.id,
|
211
|
+
refElement = _props.refElement;
|
211
212
|
|
212
213
|
// On utilise classNames pour variabiliser les styles et merge les classes appliquées
|
213
214
|
|
@@ -228,7 +229,10 @@ var SelectInput = function (_React$PureComponent) {
|
|
228
229
|
onFocus: this.props.onFocus,
|
229
230
|
onBlur: this.props.onBlur,
|
230
231
|
role: 'button',
|
231
|
-
tabIndex: '0'
|
232
|
+
tabIndex: '0',
|
233
|
+
ref: function ref(el) {
|
234
|
+
refElement && refElement(el);
|
235
|
+
}
|
232
236
|
},
|
233
237
|
_react2.default.createElement(
|
234
238
|
'span',
|
@@ -247,7 +251,10 @@ var SelectInput = function (_React$PureComponent) {
|
|
247
251
|
onMouseLeave: this.props.onMouseLeave,
|
248
252
|
onKeyDown: this.handleKeyDown,
|
249
253
|
onFocus: this.props.onFocus,
|
250
|
-
onBlur: this.props.onBlur
|
254
|
+
onBlur: this.props.onBlur,
|
255
|
+
buttonRef: function buttonRef(el) {
|
256
|
+
refElement && refElement(el);
|
257
|
+
}
|
251
258
|
},
|
252
259
|
_react2.default.createElement(
|
253
260
|
'span',
|
@@ -284,6 +291,23 @@ SelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
284
291
|
* If `true`, the select will be disabled.
|
285
292
|
*/
|
286
293
|
disabled: _propTypes2.default.bool,
|
294
|
+
/**
|
295
|
+
* Applique le style error
|
296
|
+
*/
|
297
|
+
error: _propTypes2.default.bool,
|
298
|
+
/**
|
299
|
+
* Applique le style focused
|
300
|
+
*/
|
301
|
+
focused: _propTypes2.default.bool,
|
302
|
+
/**
|
303
|
+
* id du select
|
304
|
+
*/
|
305
|
+
id: _propTypes2.default.string,
|
306
|
+
/**
|
307
|
+
* Affiche sous forme de div à la place d'un bouton.
|
308
|
+
* Si des éléments cliquables sont à l'intérieur.
|
309
|
+
*/
|
310
|
+
noButton: _propTypes2.default.bool,
|
287
311
|
/**
|
288
312
|
* Fonction de callback au blur du bouton
|
289
313
|
*/
|
@@ -300,30 +324,17 @@ SelectInput.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
300
324
|
* Fonction de callback à la pression de touche
|
301
325
|
*/
|
302
326
|
onKeyDown: _propTypes2.default.func,
|
303
|
-
/**
|
304
|
-
* Valeur à afficher (déjà formattée)
|
305
|
-
*/
|
306
|
-
value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number, _propTypes2.default.node]),
|
307
327
|
/**
|
308
328
|
* Applique le style open et effectue une rotation de l'icône
|
309
329
|
*/
|
310
330
|
open: _propTypes2.default.bool,
|
311
331
|
/**
|
312
|
-
*
|
313
|
-
* Si des éléments cliquables sont à l'intérieur.
|
314
|
-
*/
|
315
|
-
noButton: _propTypes2.default.bool,
|
316
|
-
/**
|
317
|
-
* Applique le style focused
|
318
|
-
*/
|
319
|
-
focused: _propTypes2.default.bool,
|
320
|
-
/**
|
321
|
-
* Applique le style error
|
332
|
+
* Use that property to pass a ref callback to the native component.
|
322
333
|
*/
|
323
|
-
|
334
|
+
refElement: _propTypes2.default.func,
|
324
335
|
/**
|
325
|
-
*
|
336
|
+
* Valeur à afficher (déjà formattée)
|
326
337
|
*/
|
327
|
-
|
338
|
+
value: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.number, _propTypes2.default.node])
|
328
339
|
} : {};
|
329
340
|
exports.default = (0, _styles.withStyles)(styles, { name: 'HmuiSelectInput' })(SelectInput);
|
@@ -99,7 +99,8 @@ var HiSelectableList = function (_React$PureComponent) {
|
|
99
99
|
allSelected = _props.allSelected,
|
100
100
|
checkbox = _props.checkbox,
|
101
101
|
hierarchic = _props.hierarchic,
|
102
|
-
|
102
|
+
disabledIds = _props.disabledIds,
|
103
|
+
others = (0, _objectWithoutProperties3.default)(_props, ['classes', 'itemList', 'selectedIdList', 'onSelect', 'maxHeight', 'hierarchySelected', 'parentItemSelectable', 'hierarchy', 'translations', 'icon', 'parentIcon', 'hoverIcon', 'checkedIcon', 'allSelected', 'checkbox', 'hierarchic', 'disabledIds']);
|
103
104
|
|
104
105
|
|
105
106
|
var parents = [];
|
@@ -161,7 +162,8 @@ var HiSelectableList = function (_React$PureComponent) {
|
|
161
162
|
hoverIcon: hoverIcon,
|
162
163
|
checkedIcon: checkedIcon,
|
163
164
|
checkbox: checkbox,
|
164
|
-
level: parents.length
|
165
|
+
level: parents.length,
|
166
|
+
disabled: disabledIds ? disabledIds.includes(item.id) : false
|
165
167
|
}, others));
|
166
168
|
})
|
167
169
|
)
|
@@ -174,7 +176,7 @@ var HiSelectableList = function (_React$PureComponent) {
|
|
174
176
|
HiSelectableList.defaultProps = {
|
175
177
|
checkbox: true,
|
176
178
|
allSelected: false,
|
177
|
-
maxHeight:
|
179
|
+
maxHeight: 400,
|
178
180
|
hierarchySelected: {},
|
179
181
|
parentItemSelectable: false,
|
180
182
|
icon: _react2.default.createElement(_mdiMaterialUi.CheckboxBlankOutline, { style: { width: 20, height: 20 } }),
|
@@ -203,6 +205,10 @@ HiSelectableList.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
203
205
|
* Useful to extend the style applied to components.
|
204
206
|
*/
|
205
207
|
classes: _propTypes2.default.object,
|
208
|
+
/**
|
209
|
+
* Liste des ids des items disabled
|
210
|
+
*/
|
211
|
+
disabledIds: _propTypes2.default.array,
|
206
212
|
/**
|
207
213
|
* Tableau associatif : parentId => [children objects]
|
208
214
|
*/
|