@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
package/es/HiTopBar/HiTopBar.js
CHANGED
@@ -3,17 +3,15 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import Hidden from 'material-ui/Hidden';
|
4
4
|
import AppBar from 'material-ui/AppBar';
|
5
5
|
import Toolbar from 'material-ui/Toolbar';
|
6
|
-
import Button from 'material-ui/Button';
|
7
6
|
import IconButton from 'material-ui/IconButton';
|
8
7
|
import Collapse from 'material-ui/transitions/Collapse';
|
9
|
-
import { ChevronDoubleUp, ChevronDoubleDown, Menu as MenuIcon, ArrowLeft, DotsVertical
|
8
|
+
import { ChevronDoubleUp, ChevronDoubleDown, Menu as MenuIcon, ArrowLeft, DotsVertical } from 'mdi-material-ui';
|
10
9
|
import classNames from 'classnames';
|
11
10
|
import Menu, { MenuItem } from 'material-ui/Menu';
|
12
11
|
import withStyles from '../styles/withStyles';
|
13
12
|
import HiIconBuilder from '../utils/HiIconBuilder';
|
14
13
|
import HiBadge from '../HiBadge';
|
15
14
|
import HiButton from '../HiButton';
|
16
|
-
import HiInput from '../HiForm/HiInput';
|
17
15
|
import HiColoredLabel from '../HiColoredLabel';
|
18
16
|
import { getContrastedTextColor, fade } from '../styles/colorManipulator';
|
19
17
|
|
@@ -54,15 +52,13 @@ export const styles = theme => ({
|
|
54
52
|
rightComponentMobile: {
|
55
53
|
marginRight: -1.5 * theme.spacing.unit
|
56
54
|
},
|
57
|
-
|
55
|
+
accountSelectorButton: {
|
58
56
|
marginRight: 1.5 * theme.spacing.unit,
|
59
57
|
borderLeft: 'solid 1px',
|
60
58
|
borderColor: fade('#000', 0.12),
|
61
|
-
maxWidth: 264
|
62
|
-
},
|
63
|
-
accountSelectorButton: {
|
64
59
|
display: 'inline-block',
|
65
|
-
|
60
|
+
minWidth: 144,
|
61
|
+
maxWidth: 288
|
66
62
|
},
|
67
63
|
accountSelectorButtonLabel: {
|
68
64
|
textOverflow: 'ellipsis',
|
@@ -81,6 +77,10 @@ export const styles = theme => ({
|
|
81
77
|
color: theme.palette.text.secondary,
|
82
78
|
minWidth: 32
|
83
79
|
},
|
80
|
+
beta: {
|
81
|
+
minWidth: 64,
|
82
|
+
maxWidth: 80
|
83
|
+
},
|
84
84
|
searchInput: {
|
85
85
|
backgroundColor: `${theme.palette.background1} !important`
|
86
86
|
},
|
@@ -91,16 +91,18 @@ export const styles = theme => ({
|
|
91
91
|
marginRight: 10
|
92
92
|
},
|
93
93
|
endAdornmentButton: {
|
94
|
-
|
95
|
-
|
96
|
-
|
94
|
+
height: 32,
|
95
|
+
lineHeight: 32,
|
96
|
+
padding: 0,
|
97
|
+
margin: 0,
|
98
|
+
display: 'inline-block',
|
97
99
|
color: fade('#000', 0.38),
|
98
100
|
textTransform: 'capitalize',
|
99
101
|
fontWeight: theme.typography.fontWeightRegular,
|
100
102
|
minWidth: 50
|
101
103
|
},
|
102
|
-
|
103
|
-
|
104
|
+
collapseOverflow: {
|
105
|
+
overflow: 'inherit'
|
104
106
|
}
|
105
107
|
});
|
106
108
|
|
@@ -123,21 +125,14 @@ class HiTopBar extends React.Component {
|
|
123
125
|
|
124
126
|
this.state = {
|
125
127
|
collapsed: false,
|
126
|
-
searchValue: '',
|
127
|
-
searchFocus: false,
|
128
128
|
menuAnchor: null
|
129
129
|
};
|
130
130
|
|
131
|
-
this.
|
132
|
-
this.handleChange = this.handleChange.bind(this);
|
133
|
-
this.handleFocus = this.handleFocus.bind(this);
|
134
|
-
this.handleBlur = this.handleBlur.bind(this);
|
131
|
+
this.handleCollapse = this.handleCollapse.bind(this);
|
135
132
|
this.handleClickMenu = this.handleClickMenu.bind(this);
|
136
133
|
this.handleOpenMenu = this.handleOpenMenu.bind(this);
|
137
134
|
this.handleCloseMenu = this.handleCloseMenu.bind(this);
|
138
135
|
this.handleMenuItemClick = this.handleMenuItemClick.bind(this);
|
139
|
-
this.handleResetSearch = this.handleResetSearch.bind(this);
|
140
|
-
this.handleClickInputButton = this.handleClickInputButton.bind(this);
|
141
136
|
}
|
142
137
|
|
143
138
|
handleOpenMenu(event) {
|
@@ -153,49 +148,12 @@ class HiTopBar extends React.Component {
|
|
153
148
|
callback();
|
154
149
|
}
|
155
150
|
|
156
|
-
|
151
|
+
handleCollapse() {
|
157
152
|
this.setState({ collapsed: !this.state.collapsed });
|
158
153
|
}
|
159
154
|
|
160
|
-
handleChange(event) {
|
161
|
-
this.setState({ searchValue: event.target.value });
|
162
|
-
}
|
163
|
-
|
164
|
-
handleResetSearch() {
|
165
|
-
this.setState({ searchValue: '' });
|
166
|
-
}
|
167
|
-
|
168
|
-
handleFocus() {
|
169
|
-
this.setState({ searchFocus: true });
|
170
|
-
|
171
|
-
if (this.props.onSearchFocus) {
|
172
|
-
this.props.onSearchFocus();
|
173
|
-
}
|
174
|
-
}
|
175
|
-
|
176
|
-
handleClickInputButton(event) {
|
177
|
-
this.setState({ searchFocus: true });
|
178
|
-
|
179
|
-
if (this.props.onClickInputButton) {
|
180
|
-
this.props.onClickInputButton();
|
181
|
-
}
|
182
|
-
// Stop propagation to cancel input focus
|
183
|
-
event.stopPropagation();
|
184
|
-
}
|
185
|
-
|
186
|
-
handleBlur(event) {
|
187
|
-
if (!this.overlay.contains(event.relatedTarget)) {
|
188
|
-
this.setState({ searchFocus: false });
|
189
|
-
}
|
190
|
-
|
191
|
-
if (this.props.onSearchBlur) {
|
192
|
-
this.props.onSearchBlur();
|
193
|
-
}
|
194
|
-
}
|
195
|
-
|
196
155
|
handleClickMenu() {
|
197
156
|
this.props.onClickReturn();
|
198
|
-
this.setState({ searchFocus: false });
|
199
157
|
}
|
200
158
|
|
201
159
|
render() {
|
@@ -209,48 +167,13 @@ class HiTopBar extends React.Component {
|
|
209
167
|
hasAccountSelector,
|
210
168
|
translations,
|
211
169
|
onClickMenu,
|
212
|
-
accountSelectorContent
|
170
|
+
accountSelectorContent,
|
171
|
+
refButtons,
|
172
|
+
searchInput,
|
173
|
+
searchFocus
|
213
174
|
} = this.props;
|
214
175
|
|
215
|
-
const colorPrimaryClass =
|
216
|
-
|
217
|
-
const inputClass = classNames({
|
218
|
-
[classes.searchInput]: !this.state.searchFocus,
|
219
|
-
[classes.searchInputFocused]: this.state.searchFocus
|
220
|
-
});
|
221
|
-
|
222
|
-
const endAdornment = React.createElement(
|
223
|
-
HiButton,
|
224
|
-
{
|
225
|
-
className: classNames(classes.endAdornmentButton, {
|
226
|
-
[classes.endButtonWithClearIcon]: this.state.searchValue.length > 0
|
227
|
-
}),
|
228
|
-
onClick: this.handleClickInputButton
|
229
|
-
},
|
230
|
-
React.createElement(
|
231
|
-
Hidden,
|
232
|
-
{ smDown: true },
|
233
|
-
React.createElement(
|
234
|
-
'span',
|
235
|
-
null,
|
236
|
-
translations.all_types
|
237
|
-
)
|
238
|
-
),
|
239
|
-
React.createElement(MenuDown, { style: { position: 'relative', top: -2, color: fade('#000', 0.54) } })
|
240
|
-
);
|
241
|
-
|
242
|
-
const searchInput = React.createElement(HiInput, {
|
243
|
-
name: 'top-bar-search',
|
244
|
-
placeholder: translations.search,
|
245
|
-
value: this.state.searchValue,
|
246
|
-
onChange: this.handleChange,
|
247
|
-
startAdornment: 'magnify',
|
248
|
-
endAdornment: endAdornment,
|
249
|
-
classes: { root: inputClass },
|
250
|
-
onFocus: this.handleFocus,
|
251
|
-
onBlur: this.handleBlur,
|
252
|
-
onReset: this.handleResetSearch
|
253
|
-
});
|
176
|
+
const colorPrimaryClass = searchFocus ? classes.colorPrimaryFocus : classes.colorPrimary;
|
254
177
|
|
255
178
|
const notificationButton = notificationValue > 0 ? React.createElement(
|
256
179
|
HiButton,
|
@@ -282,14 +205,19 @@ class HiTopBar extends React.Component {
|
|
282
205
|
null,
|
283
206
|
React.createElement(
|
284
207
|
Collapse,
|
285
|
-
{
|
208
|
+
{
|
209
|
+
'in': !this.state.collapsed,
|
210
|
+
className: classNames({
|
211
|
+
[classes.collapseOverflow]: !hideable
|
212
|
+
})
|
213
|
+
},
|
286
214
|
React.createElement(
|
287
215
|
Toolbar,
|
288
216
|
{ className: classes.toolbar },
|
289
217
|
React.createElement(
|
290
218
|
'div',
|
291
|
-
{ ref:
|
292
|
-
|
219
|
+
{ ref: refButtons },
|
220
|
+
searchFocus ? React.createElement(
|
293
221
|
HiButton,
|
294
222
|
{
|
295
223
|
className: classes.leftButton,
|
@@ -324,22 +252,19 @@ class HiTopBar extends React.Component {
|
|
324
252
|
),
|
325
253
|
notificationButton,
|
326
254
|
hasAccountSelector && React.createElement(
|
327
|
-
|
328
|
-
{
|
329
|
-
|
330
|
-
|
331
|
-
{
|
332
|
-
|
333
|
-
className: classes.accountSelectorButton,
|
334
|
-
classes: {
|
335
|
-
label: classes.accountSelectorButtonLabel
|
336
|
-
},
|
337
|
-
onClick: this.props.onClickAccountSelector
|
255
|
+
HiButton,
|
256
|
+
{
|
257
|
+
color: 'inherit',
|
258
|
+
className: classes.accountSelectorButton,
|
259
|
+
classes: {
|
260
|
+
label: classes.accountSelectorButtonLabel
|
338
261
|
},
|
339
|
-
|
340
|
-
|
262
|
+
onClick: this.props.onClickAccountSelector
|
263
|
+
},
|
264
|
+
accountSelectorContent
|
341
265
|
),
|
342
266
|
beta && React.createElement(HiColoredLabel, {
|
267
|
+
className: classes.beta,
|
343
268
|
label: 'BETA',
|
344
269
|
beta: true,
|
345
270
|
color: theme.palette.neutral.dark
|
@@ -347,7 +272,7 @@ class HiTopBar extends React.Component {
|
|
347
272
|
(hideable || hasSettings) && React.createElement(
|
348
273
|
IconButton,
|
349
274
|
{ color: 'inherit', className: classes.iconButton },
|
350
|
-
hideable && React.createElement(ChevronDoubleUp, { onClick: this.
|
275
|
+
hideable && React.createElement(ChevronDoubleUp, { onClick: this.handleCollapse }),
|
351
276
|
hasSettings && React.createElement(HiIconBuilder, {
|
352
277
|
onClick: this.props.onClickSettings,
|
353
278
|
icon: 'fa-gear',
|
@@ -359,7 +284,7 @@ class HiTopBar extends React.Component {
|
|
359
284
|
hideable && this.state.collapsed && React.createElement(
|
360
285
|
IconButton,
|
361
286
|
{
|
362
|
-
onClick: this.
|
287
|
+
onClick: this.handleCollapse,
|
363
288
|
color: 'inherit',
|
364
289
|
className: classes.showTopBarButton
|
365
290
|
},
|
@@ -375,8 +300,8 @@ class HiTopBar extends React.Component {
|
|
375
300
|
{ className: classes.toolbar },
|
376
301
|
React.createElement(
|
377
302
|
'div',
|
378
|
-
{ ref:
|
379
|
-
|
303
|
+
{ ref: refButtons },
|
304
|
+
searchFocus ? React.createElement(
|
380
305
|
IconButton,
|
381
306
|
{ className: classes.leftButtonMobile, color: 'inherit' },
|
382
307
|
_ref4
|
@@ -447,6 +372,7 @@ HiTopBar.defaultProps = {
|
|
447
372
|
hideable: false,
|
448
373
|
hasSettings: false,
|
449
374
|
hasAccountSelector: false,
|
375
|
+
searchFocus: false,
|
450
376
|
translations: {
|
451
377
|
back: 'Back',
|
452
378
|
menu: 'Menu',
|
@@ -487,10 +413,6 @@ HiTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
487
413
|
* Fonction de callback au click sur l'accountSelector'
|
488
414
|
*/
|
489
415
|
onClickAccountSelector: PropTypes.func,
|
490
|
-
/**
|
491
|
-
* Fonction de callback au click sur le menu
|
492
|
-
*/
|
493
|
-
onClickInputButton: PropTypes.func.isRequired,
|
494
416
|
/**
|
495
417
|
* Fonction de callback au click sur le menu
|
496
418
|
*/
|
@@ -508,13 +430,22 @@ HiTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
508
430
|
*/
|
509
431
|
onClickSettings: PropTypes.func,
|
510
432
|
/**
|
511
|
-
*
|
433
|
+
* Positionement de la topBar. The behavior of the different options is described
|
434
|
+
* [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
|
435
|
+
*/
|
436
|
+
position: PropTypes.oneOf(['fixed', 'absolute', 'sticky', 'static']),
|
437
|
+
/**
|
438
|
+
* Passe une ref callback à la div contenant les boutons "menu" et "back"
|
439
|
+
*/
|
440
|
+
refButtons: PropTypes.func,
|
441
|
+
/**
|
442
|
+
* Etat de focus.
|
512
443
|
*/
|
513
|
-
|
444
|
+
searchFocus: PropTypes.bool.isRequired,
|
514
445
|
/**
|
515
|
-
*
|
446
|
+
* Input de recherche
|
516
447
|
*/
|
517
|
-
|
448
|
+
searchInput: PropTypes.node.isRequired,
|
518
449
|
/**
|
519
450
|
* @ignore
|
520
451
|
*/
|
@@ -89,6 +89,9 @@ const light = {
|
|
89
89
|
appBar: '#fff',
|
90
90
|
paper: '#fff',
|
91
91
|
default: grey[50]
|
92
|
+
},
|
93
|
+
dot: {
|
94
|
+
neutral: '#707070'
|
92
95
|
}
|
93
96
|
};
|
94
97
|
|
@@ -156,6 +159,9 @@ const dark = {
|
|
156
159
|
appBar: '#fff',
|
157
160
|
paper: '#fff',
|
158
161
|
default: grey[50]
|
162
|
+
},
|
163
|
+
dot: {
|
164
|
+
neutral: '#707070'
|
159
165
|
}
|
160
166
|
};
|
161
167
|
|
@@ -238,6 +244,10 @@ const typography = {
|
|
238
244
|
body4: {
|
239
245
|
fontSize: 12,
|
240
246
|
fontFamily
|
247
|
+
},
|
248
|
+
body5: {
|
249
|
+
fontSize: 11,
|
250
|
+
fontFamily
|
241
251
|
}
|
242
252
|
};
|
243
253
|
|
@@ -271,6 +281,7 @@ function createHiMuiTheme(options = {}) {
|
|
271
281
|
inputDisabled: shades[type].inputDisabled,
|
272
282
|
tableLine: shades[type].tableLine,
|
273
283
|
background: shades[type].background,
|
284
|
+
dot: shades[type].dot,
|
274
285
|
status: statusPalette,
|
275
286
|
primary: blue,
|
276
287
|
secondary: yellow
|
@@ -4,11 +4,11 @@ import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutPropert
|
|
4
4
|
import React, { PureComponent } from 'react';
|
5
5
|
import PropTypes from 'prop-types';
|
6
6
|
import classNames from 'classnames';
|
7
|
+
import keycode from 'keycode/index';
|
7
8
|
import hiGetMdiIcon from './hiGetMdiIcon';
|
8
9
|
import { camelize } from './hiHelpers';
|
9
10
|
import * as hiIcon from '../svg-icons';
|
10
11
|
import { capitalizeFirstLetter } from './helpers';
|
11
|
-
import keycode from "keycode/index";
|
12
12
|
|
13
13
|
class HiIconBuilder extends PureComponent {
|
14
14
|
|
@@ -30,8 +30,8 @@ class HiIconBuilder extends PureComponent {
|
|
30
30
|
|
31
31
|
render() {
|
32
32
|
const _props = this.props,
|
33
|
-
{ icon, size, className, style, onClick } = _props,
|
34
|
-
others = _objectWithoutProperties(_props, ['icon', 'size', 'className', 'style', 'onClick']);
|
33
|
+
{ icon, size, className, style, onClick, color, backgroundColor } = _props,
|
34
|
+
others = _objectWithoutProperties(_props, ['icon', 'size', 'className', 'style', 'onClick', 'color', 'backgroundColor']);
|
35
35
|
|
36
36
|
let props = {};
|
37
37
|
if (onClick) {
|
@@ -49,7 +49,7 @@ class HiIconBuilder extends PureComponent {
|
|
49
49
|
className: classNames('fa', icon, className),
|
50
50
|
style: _extends({
|
51
51
|
fontSize: size
|
52
|
-
}, style),
|
52
|
+
}, color && { color }, backgroundColor && { backgroundColor, padding: 2, borderRadius: size }, style),
|
53
53
|
onClick: onClick
|
54
54
|
}, props, others));
|
55
55
|
}
|
@@ -65,7 +65,7 @@ class HiIconBuilder extends PureComponent {
|
|
65
65
|
style: _extends({
|
66
66
|
height: size,
|
67
67
|
width: size
|
68
|
-
}, style),
|
68
|
+
}, color && { color }, backgroundColor && { backgroundColor, padding: 2, borderRadius: size }, style),
|
69
69
|
onClick: onClick
|
70
70
|
}, props, others));
|
71
71
|
}
|
@@ -75,10 +75,18 @@ HiIconBuilder.defaultProps = {
|
|
75
75
|
size: 20
|
76
76
|
};
|
77
77
|
HiIconBuilder.propTypes = process.env.NODE_ENV !== "production" ? {
|
78
|
+
/**
|
79
|
+
* Couleur du fond
|
80
|
+
*/
|
81
|
+
backgroundColor: PropTypes.string,
|
78
82
|
/**
|
79
83
|
* Permet de surcharger la classe
|
80
84
|
*/
|
81
85
|
className: PropTypes.string,
|
86
|
+
/**
|
87
|
+
* Couleur de l'icône
|
88
|
+
*/
|
89
|
+
color: PropTypes.string,
|
82
90
|
/**
|
83
91
|
* Nom de l'icône
|
84
92
|
*/
|
package/es/utils/hiHelpers.js
CHANGED
@@ -147,7 +147,7 @@ export function arrayUnique(array) {
|
|
147
147
|
* @param array
|
148
148
|
*/
|
149
149
|
export function escapeHTML(unsafeStr) {
|
150
|
-
return unsafeStr.replace('
|
150
|
+
return unsafeStr.replace(/<br\/?>/g, '[br]').replace(/<strong>/g, '[[').replace(/<\/?strong>/g, ']]').replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/\"/g, '"').replace(/\'/g, ''').replace(/\[\[/g, '<strong>').replace(/\]\]/g, '</strong>').replace(/\[br\]/g, '<br/>');
|
151
151
|
}
|
152
152
|
|
153
153
|
/**
|
@@ -167,7 +167,7 @@ export function getNextItemSelectable(node, direction) {
|
|
167
167
|
} else if (node.previousSibling === null) {
|
168
168
|
return null;
|
169
169
|
} else if (node.previousSibling.tabIndex === -1) {
|
170
|
-
return
|
170
|
+
return getNextItemSelectable(node.previousSibling, direction);
|
171
171
|
}
|
172
172
|
return node.previousSibling;
|
173
173
|
}
|