mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
react app
This commit is contained in:
22
react-app/.idea/compiler.xml
generated
Normal file
22
react-app/.idea/compiler.xml
generated
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CompilerConfiguration">
|
||||
<resourceExtensions />
|
||||
<wildcardResourcePatterns>
|
||||
<entry name="!?*.java" />
|
||||
<entry name="!?*.form" />
|
||||
<entry name="!?*.class" />
|
||||
<entry name="!?*.groovy" />
|
||||
<entry name="!?*.scala" />
|
||||
<entry name="!?*.flex" />
|
||||
<entry name="!?*.kt" />
|
||||
<entry name="!?*.clj" />
|
||||
<entry name="!?*.aj" />
|
||||
</wildcardResourcePatterns>
|
||||
<annotationProcessing>
|
||||
<profile default="true" name="Default" enabled="false">
|
||||
<processorPath useClasspath="true" />
|
||||
</profile>
|
||||
</annotationProcessing>
|
||||
</component>
|
||||
</project>
|
3
react-app/.idea/copyright/profiles_settings.xml
generated
Normal file
3
react-app/.idea/copyright/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,3 @@
|
||||
<component name="CopyrightManager">
|
||||
<settings default="" />
|
||||
</component>
|
6
react-app/.idea/encodings.xml
generated
Normal file
6
react-app/.idea/encodings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
77
react-app/.idea/misc.xml
generated
Normal file
77
react-app/.idea/misc.xml
generated
Normal file
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ClientPropertiesManager">
|
||||
<properties class="javax.swing.AbstractButton">
|
||||
<property name="hideActionText" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JComponent">
|
||||
<property name="html.disable" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JEditorPane">
|
||||
<property name="JEditorPane.w3cLengthUnits" class="java.lang.Boolean" />
|
||||
<property name="JEditorPane.honorDisplayProperties" class="java.lang.Boolean" />
|
||||
<property name="charset" class="java.lang.String" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JList">
|
||||
<property name="List.isFileList" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JPasswordField">
|
||||
<property name="JPasswordField.cutCopyAllowed" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JSlider">
|
||||
<property name="Slider.paintThumbArrowShape" class="java.lang.Boolean" />
|
||||
<property name="JSlider.isFilled" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JTable">
|
||||
<property name="Table.isFileList" class="java.lang.Boolean" />
|
||||
<property name="JTable.autoStartsEdit" class="java.lang.Boolean" />
|
||||
<property name="terminateEditOnFocusLost" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JToolBar">
|
||||
<property name="JToolBar.isRollover" class="java.lang.Boolean" />
|
||||
</properties>
|
||||
<properties class="javax.swing.JTree">
|
||||
<property name="JTree.lineStyle" class="java.lang.String" />
|
||||
</properties>
|
||||
<properties class="javax.swing.text.JTextComponent">
|
||||
<property name="caretAspectRatio" class="java.lang.Double" />
|
||||
<property name="caretWidth" class="java.lang.Integer" />
|
||||
</properties>
|
||||
</component>
|
||||
<component name="MavenImportPreferences">
|
||||
<option name="generalSettings">
|
||||
<MavenGeneralSettings>
|
||||
<option name="mavenHome" value="Bundled (Maven 3)" />
|
||||
</MavenGeneralSettings>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" default="true" assert-keyword="true" jdk-15="true">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
<component name="masterDetails">
|
||||
<states>
|
||||
<state key="ProjectJDKs.UI">
|
||||
<settings>
|
||||
<last-edited>1.8</last-edited>
|
||||
<splitter-proportions>
|
||||
<option name="proportions">
|
||||
<list>
|
||||
<option value="0.2" />
|
||||
</list>
|
||||
</option>
|
||||
</splitter-proportions>
|
||||
</settings>
|
||||
</state>
|
||||
</states>
|
||||
</component>
|
||||
</project>
|
8
react-app/.idea/modules.xml
generated
Normal file
8
react-app/.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/react-sfs.iml" filepath="$PROJECT_DIR$/react-sfs.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
802
react-app/.idea/workspace.xml
generated
Normal file
802
react-app/.idea/workspace.xml
generated
Normal file
@@ -0,0 +1,802 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="e0a3b87d-ecc6-428e-bf9b-bf44961f2996" name="Default" comment="" />
|
||||
<ignored path="react-sfs.iws" />
|
||||
<ignored path=".idea/workspace.xml" />
|
||||
<ignored path="$PROJECT_DIR$/out/" />
|
||||
<ignored path=".idea/dataSources.local.xml" />
|
||||
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
|
||||
<option name="TRACKING_ENABLED" value="true" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
|
||||
<component name="CreatePatchCommitExecutor">
|
||||
<option name="PATCH_PATH" value="" />
|
||||
</component>
|
||||
<component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
|
||||
<component name="FavoritesManager">
|
||||
<favorites_list name="react-sfs" />
|
||||
</component>
|
||||
<component name="FileEditorManager">
|
||||
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
|
||||
<file leaf-file-name="index.html" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="690">
|
||||
<caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="helloworld.js" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/src/helloworld.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="255">
|
||||
<caret line="17" column="24" selection-start-line="17" selection-start-column="24" selection-end-line="17" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="package.json" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/package.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="210">
|
||||
<caret line="14" column="0" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="style.html" pinned="false" current-in-tab="false">
|
||||
<entry file="file://$PROJECT_DIR$/css/style.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
<file leaf-file-name="style.css" pinned="false" current-in-tab="true">
|
||||
<entry file="file://$PROJECT_DIR$/css/style.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="510">
|
||||
<caret line="34" column="0" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</file>
|
||||
</leaf>
|
||||
</component>
|
||||
<component name="FileTemplateManagerImpl">
|
||||
<option name="RECENT_TEMPLATES">
|
||||
<list>
|
||||
<option value="CSS File" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="GradleLocalSettings">
|
||||
<option name="externalProjectsViewState">
|
||||
<projects_view />
|
||||
</option>
|
||||
</component>
|
||||
<component name="IdeDocumentHistory">
|
||||
<option name="CHANGED_PATHS">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/css/styles.css" />
|
||||
<option value="$PROJECT_DIR$/css/style.html" />
|
||||
<option value="$PROJECT_DIR$/package.json" />
|
||||
<option value="$PROJECT_DIR$/build/helloworld.js" />
|
||||
<option value="$PROJECT_DIR$/src/helloworld.js" />
|
||||
<option value="$PROJECT_DIR$/index.html" />
|
||||
<option value="$PROJECT_DIR$/css/style.css" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="JsBuildToolGruntFileManager" detection-done="true" />
|
||||
<component name="JsBuildToolPackageJson" detection-done="true" />
|
||||
<component name="JsGulpfileManager">
|
||||
<detection-done>true</detection-done>
|
||||
</component>
|
||||
<component name="ProjectFrameBounds">
|
||||
<option name="x" value="-238" />
|
||||
<option name="y" value="-1057" />
|
||||
<option name="width" value="1920" />
|
||||
<option name="height" value="1057" />
|
||||
</component>
|
||||
<component name="ProjectLevelVcsManager" settingsEditedManually="false">
|
||||
<OptionsSetting value="true" id="Add" />
|
||||
<OptionsSetting value="true" id="Remove" />
|
||||
<OptionsSetting value="true" id="Checkout" />
|
||||
<OptionsSetting value="true" id="Update" />
|
||||
<OptionsSetting value="true" id="Status" />
|
||||
<OptionsSetting value="true" id="Edit" />
|
||||
<ConfirmationsSetting value="0" id="Add" />
|
||||
<ConfirmationsSetting value="0" id="Remove" />
|
||||
</component>
|
||||
<component name="ProjectView">
|
||||
<navigator currentView="ProjectPane" proportions="" version="1">
|
||||
<flattenPackages />
|
||||
<showMembers />
|
||||
<showModules />
|
||||
<showLibraryContents />
|
||||
<hideEmptyPackages />
|
||||
<abbreviatePackageNames />
|
||||
<autoscrollToSource />
|
||||
<autoscrollFromSource />
|
||||
<sortByType />
|
||||
<manualOrder />
|
||||
<foldersAlwaysOnTop value="true" />
|
||||
</navigator>
|
||||
<panes>
|
||||
<pane id="PackagesPane" />
|
||||
<pane id="Scratches" />
|
||||
<pane id="ProjectPane">
|
||||
<subPane>
|
||||
<PATH>
|
||||
<PATH_ELEMENT>
|
||||
<option name="myItemId" value="react-app" />
|
||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||
</PATH_ELEMENT>
|
||||
</PATH>
|
||||
</subPane>
|
||||
</pane>
|
||||
<pane id="Scope" />
|
||||
</panes>
|
||||
</component>
|
||||
<component name="PropertiesComponent">
|
||||
<property name="aspect.path.notification.shown" value="true" />
|
||||
<property name="WebServerToolWindowFactoryState" value="false" />
|
||||
<property name="js-jscs-nodeInterpreter" value="/usr/local/bin/node" />
|
||||
<property name="list.type.of.created.stylesheet" value="CSS" />
|
||||
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
|
||||
</component>
|
||||
<component name="RecentsManager">
|
||||
<key name="MoveFile.RECENT_KEYS">
|
||||
<recent name="$PROJECT_DIR$" />
|
||||
</key>
|
||||
</component>
|
||||
<component name="RunManager">
|
||||
<configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
|
||||
<module name="" />
|
||||
<option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="AndroidRunConfigurationType" factoryName="Android Application">
|
||||
<module name="" />
|
||||
<option name="DEPLOY" value="true" />
|
||||
<option name="ARTIFACT_NAME" value="" />
|
||||
<option name="PM_INSTALL_OPTIONS" value="" />
|
||||
<option name="ACTIVITY_EXTRA_FLAGS" value="" />
|
||||
<option name="MODE" value="default_activity" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="PREFERRED_AVD" value="" />
|
||||
<option name="CLEAR_LOGCAT" value="false" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
|
||||
<option name="PREFERRED_AVD" value="" />
|
||||
<option name="DEEP_LINK" value="" />
|
||||
<option name="ACTIVITY_CLASS" value="" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="AndroidTestRunConfigurationType" factoryName="Android Tests">
|
||||
<module name="" />
|
||||
<option name="TESTING_TYPE" value="0" />
|
||||
<option name="INSTRUMENTATION_RUNNER_CLASS" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
<option name="CLASS_NAME" value="" />
|
||||
<option name="PACKAGE_NAME" value="" />
|
||||
<option name="EXTRA_OPTIONS" value="" />
|
||||
<option name="TARGET_SELECTION_MODE" value="SHOW_DIALOG" />
|
||||
<option name="PREFERRED_AVD" value="" />
|
||||
<option name="CLEAR_LOGCAT" value="false" />
|
||||
<option name="SHOW_LOGCAT_AUTOMATICALLY" value="true" />
|
||||
<option name="SKIP_NOOP_APK_INSTALLATIONS" value="true" />
|
||||
<option name="FORCE_STOP_RUNNING_APP" value="true" />
|
||||
<option name="USE_LAST_SELECTED_DEVICE" value="false" />
|
||||
<option name="PREFERRED_AVD" value="" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Applet" factoryName="Applet">
|
||||
<option name="HTML_USED" value="false" />
|
||||
<option name="WIDTH" value="400" />
|
||||
<option name="HEIGHT" value="300" />
|
||||
<option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
|
||||
<module />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Application" factoryName="Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="ArquillianJUnit" factoryName="">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="arquillianRunConfiguration">
|
||||
<value>
|
||||
<option name="containerStateName" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<envs />
|
||||
<patterns />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="ArquillianTestNG" factoryName="">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="arquillianRunConfiguration">
|
||||
<value>
|
||||
<option name="containerStateName" value="" />
|
||||
</value>
|
||||
</option>
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="SUITE_NAME" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="GROUP_NAME" />
|
||||
<option name="TEST_OBJECT" value="CLASS" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="ANNOTATION_TYPE" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<option name="USE_DEFAULT_REPORTERS" value="false" />
|
||||
<option name="PROPERTIES_FILE" />
|
||||
<envs />
|
||||
<properties />
|
||||
<listeners />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="CucumberJavaRunConfigurationType" factoryName="Cucumber java">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="myFilePath" />
|
||||
<option name="GLUE" />
|
||||
<option name="myNameFilter" />
|
||||
<option name="myGeneratedName" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="FlashRunConfigurationType" factoryName="Flash App">
|
||||
<option name="BCName" value="" />
|
||||
<option name="IOSSimulatorSdkPath" value="" />
|
||||
<option name="adlOptions" value="" />
|
||||
<option name="airProgramParameters" value="" />
|
||||
<option name="appDescriptorForEmulator" value="Android" />
|
||||
<option name="debugTransport" value="USB" />
|
||||
<option name="debuggerSdkRaw" value="BC SDK" />
|
||||
<option name="emulator" value="NexusOne" />
|
||||
<option name="emulatorAdlOptions" value="" />
|
||||
<option name="fastPackaging" value="true" />
|
||||
<option name="fullScreenHeight" value="0" />
|
||||
<option name="fullScreenWidth" value="0" />
|
||||
<option name="launchUrl" value="false" />
|
||||
<option name="launcherParameters">
|
||||
<LauncherParameters>
|
||||
<option name="browser" value="a7bb68e0-33c0-4d6f-a81a-aac1fdb870c8" />
|
||||
<option name="launcherType" value="OSDefault" />
|
||||
<option name="newPlayerInstance" value="false" />
|
||||
<option name="playerPath" value="/Applications/Flash Player Debugger.app" />
|
||||
</LauncherParameters>
|
||||
</option>
|
||||
<option name="mobileRunTarget" value="Emulator" />
|
||||
<option name="moduleName" value="" />
|
||||
<option name="overriddenMainClass" value="" />
|
||||
<option name="overriddenOutputFileName" value="" />
|
||||
<option name="overrideMainClass" value="false" />
|
||||
<option name="runTrusted" value="true" />
|
||||
<option name="screenDpi" value="0" />
|
||||
<option name="screenHeight" value="0" />
|
||||
<option name="screenWidth" value="0" />
|
||||
<option name="url" value="http://" />
|
||||
<option name="usbDebugPort" value="7936" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="FlexUnitRunConfigurationType" factoryName="FlexUnit" appDescriptorForEmulator="Android" class_name="" emulatorAdlOptions="" method_name="" package_name="" scope="Class">
|
||||
<option name="BCName" value="" />
|
||||
<option name="launcherParameters">
|
||||
<LauncherParameters>
|
||||
<option name="browser" value="a7bb68e0-33c0-4d6f-a81a-aac1fdb870c8" />
|
||||
<option name="launcherType" value="OSDefault" />
|
||||
<option name="newPlayerInstance" value="false" />
|
||||
<option name="playerPath" value="/Applications/Flash Player Debugger.app" />
|
||||
</LauncherParameters>
|
||||
</option>
|
||||
<option name="moduleName" value="" />
|
||||
<option name="trusted" value="true" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="GradleRunConfiguration" factoryName="Gradle">
|
||||
<ExternalSystemSettings>
|
||||
<option name="executionName" />
|
||||
<option name="externalProjectPath" />
|
||||
<option name="externalSystemIdString" value="GRADLE" />
|
||||
<option name="scriptParameters" />
|
||||
<option name="taskDescriptions">
|
||||
<list />
|
||||
</option>
|
||||
<option name="taskNames">
|
||||
<list />
|
||||
</option>
|
||||
<option name="vmOptions" />
|
||||
</ExternalSystemSettings>
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="GrailsRunConfigurationType" factoryName="Grails">
|
||||
<setting name="vmparams" value="" />
|
||||
<setting name="cmdLine" value="run-app" />
|
||||
<setting name="passParentEnv" value="true" />
|
||||
<setting name="launchBrowser" value="true" />
|
||||
<setting name="depsClasspath" value="false" />
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JUnit" factoryName="JUnit">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<envs />
|
||||
<patterns />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JUnitTestDiscovery" factoryName="JUnit Test Discovery" changeList="All">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="TEST_OBJECT" value="class" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<envs />
|
||||
<patterns />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JarApplication" factoryName="JAR Application">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Java Scratch" factoryName="Java Scratch">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="SCRATCH_FILE_ID" value="0" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="ENABLE_SWING_INSPECTOR" value="false" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JavascriptDebugType" factoryName="JavaScript Debug">
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PROGRAM_PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<module name="react-sfs" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="KotlinStandaloneScriptRunConfigurationType" factoryName="Kotlin script">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<option name="filePath" />
|
||||
<option name="vmParameters" />
|
||||
<option name="alternativeJrePath" />
|
||||
<option name="programParameters" />
|
||||
<option name="passParentEnvs" value="true" />
|
||||
<option name="workingDirectory" />
|
||||
<option name="isAlternativeJrePathEnabled" value="false" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="Remote" factoryName="Remote">
|
||||
<option name="USE_SOCKET_TRANSPORT" value="true" />
|
||||
<option name="SERVER_MODE" value="false" />
|
||||
<option name="SHMEM_ADDRESS" value="javadebug" />
|
||||
<option name="HOST" value="localhost" />
|
||||
<option name="PORT" value="5005" />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="TestNG" factoryName="TestNG">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="SUITE_NAME" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="GROUP_NAME" />
|
||||
<option name="TEST_OBJECT" value="CLASS" />
|
||||
<option name="VM_PARAMETERS" value="-ea" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="ANNOTATION_TYPE" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<option name="USE_DEFAULT_REPORTERS" value="false" />
|
||||
<option name="PROPERTIES_FILE" />
|
||||
<envs />
|
||||
<properties />
|
||||
<listeners />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="TestNGTestDiscovery" factoryName="TestNG Test Discovery" changeList="All">
|
||||
<extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
|
||||
<module name="" />
|
||||
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<option name="SUITE_NAME" />
|
||||
<option name="PACKAGE_NAME" />
|
||||
<option name="MAIN_CLASS_NAME" />
|
||||
<option name="METHOD_NAME" />
|
||||
<option name="GROUP_NAME" />
|
||||
<option name="TEST_OBJECT" value="CLASS" />
|
||||
<option name="VM_PARAMETERS" />
|
||||
<option name="PARAMETERS" />
|
||||
<option name="WORKING_DIRECTORY" />
|
||||
<option name="OUTPUT_DIRECTORY" />
|
||||
<option name="ANNOTATION_TYPE" />
|
||||
<option name="ENV_VARIABLES" />
|
||||
<option name="PASS_PARENT_ENVS" value="true" />
|
||||
<option name="TEST_SEARCH_SCOPE">
|
||||
<value defaultName="singleModule" />
|
||||
</option>
|
||||
<option name="USE_DEFAULT_REPORTERS" value="false" />
|
||||
<option name="PROPERTIES_FILE" />
|
||||
<envs />
|
||||
<properties />
|
||||
<listeners />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="js.build_tools.gulp" factoryName="Gulp.js">
|
||||
<node-interpreter>project</node-interpreter>
|
||||
<node-options />
|
||||
<gulpfile />
|
||||
<tasks />
|
||||
<arguments />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="js.build_tools.npm" factoryName="npm">
|
||||
<command value="run-script" />
|
||||
<scripts />
|
||||
<node-interpreter value="project" />
|
||||
<envs />
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="osgi.bnd.run" factoryName="Run Launcher">
|
||||
<method />
|
||||
</configuration>
|
||||
<configuration default="true" type="osgi.bnd.run" factoryName="Test Launcher (JUnit)">
|
||||
<method />
|
||||
</configuration>
|
||||
</component>
|
||||
<component name="ShelveChangesManager" show_recycled="false">
|
||||
<option name="remove_strategy" value="false" />
|
||||
</component>
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="e0a3b87d-ecc6-428e-bf9b-bf44961f2996" name="Default" comment="" />
|
||||
<created>1459937301294</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1459937301294</updated>
|
||||
<workItem from="1459937303527" duration="16595000" />
|
||||
<workItem from="1459961481615" duration="43000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TimeTrackingManager">
|
||||
<option name="totallyTimeSpent" value="16638000" />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
<frame x="-238" y="-1057" width="1920" height="1057" extended-state="6" />
|
||||
<editor active="false" />
|
||||
<layout>
|
||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3319545" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24920128" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Pomodoro" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32988626" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
</layout>
|
||||
<layout-to-restore>
|
||||
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="true" content_ui="tabs" />
|
||||
<window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="7" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.33286715" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24964234" sideWeight="0.5" order="4" side_tool="false" content_ui="combo" />
|
||||
<window_info id="Pomodoro" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
|
||||
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
|
||||
</layout-to-restore>
|
||||
</component>
|
||||
<component name="VcsContentAnnotationSettings">
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager />
|
||||
<watches-manager />
|
||||
</component>
|
||||
<component name="editorHistoryManager">
|
||||
<entry file="file://$PROJECT_DIR$/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="690">
|
||||
<caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/helloworld.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="255">
|
||||
<caret line="17" column="24" selection-start-line="17" selection-start-column="24" selection-end-line="17" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/package.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="210">
|
||||
<caret line="14" column="0" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/style.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/style.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/tsd.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/bower_components/file-upload/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="360">
|
||||
<caret line="24" column="7" selection-start-line="24" selection-start-column="7" selection-end-line="24" selection-end-column="7" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/bower_components/file-upload/file-upload.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="210">
|
||||
<caret line="14" column="5" selection-start-line="14" selection-start-column="5" selection-end-line="14" selection-end-column="5" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/img/blank.gif">
|
||||
<provider selected="true" editor-type-id="images">
|
||||
<state />
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/react-sfs.iml">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="120">
|
||||
<caret line="8" column="9" selection-start-line="8" selection-start-column="9" selection-end-line="8" selection-end-column="9" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build/react.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="-1755">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/typings/tsd.d.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/typings/react/react.d.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/typings/react/react-global.d.ts">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="0">
|
||||
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/build/helloworld.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="1260">
|
||||
<caret line="84" column="53" selection-start-line="84" selection-start-column="53" selection-end-line="84" selection-end-column="53" />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/package.json">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="210">
|
||||
<caret line="14" column="0" selection-start-line="14" selection-start-column="0" selection-end-line="14" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/style.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="420">
|
||||
<caret line="28" column="0" selection-start-line="28" selection-start-column="0" selection-end-line="28" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/src/helloworld.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="255">
|
||||
<caret line="17" column="24" selection-start-line="17" selection-start-column="24" selection-end-line="17" selection-end-column="24" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/index.html">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="690">
|
||||
<caret line="46" column="0" selection-start-line="46" selection-start-column="0" selection-end-line="46" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/css/style.css">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state relative-caret-position="510">
|
||||
<caret line="34" column="0" selection-start-line="34" selection-start-column="0" selection-end-line="34" selection-end-column="0" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
</component>
|
||||
</project>
|
43
react-app/bower_components/file-upload/.bower.json
vendored
Normal file
43
react-app/bower_components/file-upload/.bower.json
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "file-upload",
|
||||
"version": "1.6.4",
|
||||
"authors": [
|
||||
"Winston Howes <winstonhowes@gmail.com>"
|
||||
],
|
||||
"description": "An element for using ajax to upload files.",
|
||||
"keywords": [
|
||||
"web-component",
|
||||
"web-components",
|
||||
"polymer",
|
||||
"file",
|
||||
"ajax",
|
||||
"upload"
|
||||
],
|
||||
"main": "file-upload.html",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/winhowes/file-upload/",
|
||||
"ignore": [
|
||||
"/.*",
|
||||
"/test/",
|
||||
"/demo/",
|
||||
"/bower_components/"
|
||||
],
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0",
|
||||
"paper-progress": "PolymerElements/paper-progress#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"web-component-tester": "*"
|
||||
},
|
||||
"_release": "1.6.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.6.4",
|
||||
"commit": "eeaa8d62ac0d7ae2f5adb9531c427bfba3952f1c"
|
||||
},
|
||||
"_source": "git://github.com/winhowes/file-upload.git",
|
||||
"_target": "~1.6.4",
|
||||
"_originalSource": "file-upload",
|
||||
"_direct": true
|
||||
}
|
22
react-app/bower_components/file-upload/LICENSE
vendored
Normal file
22
react-app/bower_components/file-upload/LICENSE
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Winston Howes
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
10
react-app/bower_components/file-upload/README.md
vendored
Executable file
10
react-app/bower_components/file-upload/README.md
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
# Introduction
|
||||
This repository contains an element for file uploads using ajax. It supports multi-file selection as well as optional drop zones for drag-and-drop. The element is designed for use in Polymer 1.0.
|
||||
|
||||
Check out the demo and docs here: https://winhowes.github.io/file-upload/components/file-upload/.
|
||||
|
||||
# Installation
|
||||
To install simply run:
|
||||
```
|
||||
bower install --save file-upload
|
||||
```
|
33
react-app/bower_components/file-upload/bower.json
vendored
Executable file
33
react-app/bower_components/file-upload/bower.json
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "file-upload",
|
||||
"version": "1.6.4",
|
||||
"authors": [
|
||||
"Winston Howes <winstonhowes@gmail.com>"
|
||||
],
|
||||
"description": "An element for using ajax to upload files.",
|
||||
"keywords": [
|
||||
"web-component",
|
||||
"web-components",
|
||||
"polymer",
|
||||
"file",
|
||||
"ajax",
|
||||
"upload"
|
||||
],
|
||||
"main": "file-upload.html",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/winhowes/file-upload/",
|
||||
"ignore": [
|
||||
"/.*",
|
||||
"/test/",
|
||||
"/demo/",
|
||||
"/bower_components/"
|
||||
],
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0",
|
||||
"paper-progress": "PolymerElements/paper-progress#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"web-component-tester": "*"
|
||||
}
|
||||
}
|
504
react-app/bower_components/file-upload/file-upload.html
vendored
Executable file
504
react-app/bower_components/file-upload/file-upload.html
vendored
Executable file
@@ -0,0 +1,504 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 Winston Howes. All rights reserved.
|
||||
This code may only be used under the MIT license found at https://github.com/winhowes/file-upload/blob/master/LICENSE
|
||||
-->
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
|
||||
<!--
|
||||
An element providing a solution to no problem in particular.
|
||||
|
||||
Example:
|
||||
|
||||
<file-upload target="/path/to/destination"></file-upload>
|
||||
|
||||
@demo
|
||||
-->
|
||||
|
||||
<link rel="import" href="../paper-button/paper-button.html">
|
||||
<link rel="import" href="../paper-progress/paper-progress.html">
|
||||
<link rel="import" href="../iron-icons/iron-icons.html">
|
||||
|
||||
<dom-module id="file-upload">
|
||||
|
||||
<style type="text/css">
|
||||
:host {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.enabled {
|
||||
border: 1px dashed #555;
|
||||
@apply(--file-upload-upload-border-enabled);
|
||||
}
|
||||
|
||||
.hover {
|
||||
opacity: .7;
|
||||
border: 1px dashed #111;
|
||||
@apply(--file-upload-upload-border-hover);
|
||||
}
|
||||
|
||||
#UploadBorder{
|
||||
vertical-align: middle;
|
||||
color: #555;
|
||||
padding: 20px;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
display: inline-block;
|
||||
@apply(--file-upload-upload-border);
|
||||
}
|
||||
|
||||
#dropArea {
|
||||
text-align: center;
|
||||
@apply(--file-upload-drop-area);
|
||||
}
|
||||
|
||||
paper-button#button {
|
||||
margin-bottom: 20px;
|
||||
@apply(--file-upload-button);
|
||||
}
|
||||
|
||||
.file {
|
||||
padding: 10px 0px;
|
||||
@apply(--file-upload-file);
|
||||
}
|
||||
|
||||
.commands {
|
||||
float: right;
|
||||
@apply(--file-upload-commands);
|
||||
}
|
||||
|
||||
.commands iron-icon:not([icon="check-circle"]) {
|
||||
cursor: pointer;
|
||||
opacity: .9;
|
||||
@apply(--file-upload-commands-faded);
|
||||
}
|
||||
|
||||
.commands iron-icon:hover {
|
||||
opacity: 1;
|
||||
@apply(--file-upload-commands-hovered);
|
||||
}
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #f40303;
|
||||
font-size: 11px;
|
||||
margin: 2px 0px -3px;
|
||||
@apply(--file-upload-error);
|
||||
}
|
||||
|
||||
paper-progress {
|
||||
--paper-progress-active-color: #03a9f4;
|
||||
}
|
||||
|
||||
paper-progress[error] {
|
||||
--paper-progress-active-color: #f40303;
|
||||
}
|
||||
|
||||
paper-button#button {
|
||||
margin-bottom: 20px;
|
||||
background-color: aquamarine;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<paper-button id="button" icon="file-upload" class="blue" on-click="_fileClick">
|
||||
<content></content>
|
||||
</paper-button>
|
||||
<div id='UploadBorder'>
|
||||
<div id="dropArea" hidden$="{{!_shownDropText}}">{{droptext}}</div>
|
||||
<template is="dom-repeat" items="{{files}}">
|
||||
<div class="file">
|
||||
<div class="name">
|
||||
<span>{{item.name}}</span>
|
||||
<div class="commands">
|
||||
<iron-icon icon="autorenew" title="{{retryText}}" on-click="_retryUpload" hidden$="{{!item.error}}"></iron-icon>
|
||||
<iron-icon icon="cancel" title="{{removeText}}" on-click="_cancelUpload" hidden$="{{item.complete}}"></iron-icon>
|
||||
<iron-icon icon="check-circle" title="{{successText}}" hidden$="{{!item.complete}}"></iron-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="error" hidden$="{{!item.error}}">{{errorText}}</div>
|
||||
<div hidden$={{progressHidden}}>
|
||||
<paper-progress value$="{{item.progress}}" error$="{{item.error}}"></paper-progress>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" id="fileInput" on-change="_fileChange" hidden multiple="{{multi}}" accept="{{accept}}">
|
||||
<!--<paper-toast id="toastSuccess" text="File uploaded successfully!"></paper-toast>
|
||||
<paper-toast id="toastFail" text="Error uploading file!"></paper-toast>-->
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'file-upload',
|
||||
|
||||
/**
|
||||
* Fired when a response is received status code 200.
|
||||
*
|
||||
* @event success
|
||||
*/
|
||||
/**
|
||||
* Fired when a response is received other status code.
|
||||
*
|
||||
* @event error
|
||||
*/
|
||||
/**
|
||||
* Fired when a file is about to be uploaded.
|
||||
*
|
||||
* @event before-upload
|
||||
*/
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* `target` is the target url to upload the files to.
|
||||
* Additionally by adding "<name>" in your url, it will be replaced by
|
||||
* the file name.
|
||||
*/
|
||||
target: {
|
||||
type: String,
|
||||
value: ""
|
||||
},
|
||||
|
||||
/**
|
||||
* `accept` is the set of comma separated file extensions or mime types
|
||||
* to filter as accepted.
|
||||
*/
|
||||
|
||||
accept: {
|
||||
type: String,
|
||||
value: ""
|
||||
},
|
||||
|
||||
/**
|
||||
* `progressHidden` indicates whether or not the progress bar should be hidden.
|
||||
*/
|
||||
progressHidden: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* `droppable` indicates whether or not to allow file drop.
|
||||
*/
|
||||
droppable: {
|
||||
type: String,
|
||||
value: "",
|
||||
observer: 'init'
|
||||
|
||||
|
||||
},
|
||||
|
||||
dropaction: {
|
||||
type: String,
|
||||
value: "false"
|
||||
},
|
||||
|
||||
/**
|
||||
* `droptext` is the text to display in the file drop area.
|
||||
*/
|
||||
droptext: {
|
||||
type: String,
|
||||
value: "Drop Files Here"
|
||||
},
|
||||
|
||||
/**
|
||||
* `multi` indicates whether or not to allow multiple files to be uploaded.
|
||||
*/
|
||||
multi: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* `files` is the list of files to be uploaded
|
||||
*/
|
||||
files: {
|
||||
type: Array,
|
||||
value: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* `method` is the http method to be used during upload
|
||||
*/
|
||||
method: {
|
||||
type: String,
|
||||
value: "PUT"
|
||||
},
|
||||
|
||||
/**
|
||||
* `raised` indicates whether or not the button should be raised
|
||||
*/
|
||||
raised: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* `noink` indicates that the button should not have an ink effect
|
||||
*/
|
||||
noink: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* `headers` is a key value map of header names and values
|
||||
*/
|
||||
headers: {
|
||||
type: Object,
|
||||
value: {},
|
||||
},
|
||||
|
||||
/**
|
||||
* `retryText` is the text for the tooltip to retry an upload
|
||||
*/
|
||||
retryText: {
|
||||
type: String,
|
||||
value: 'Retry Upload'
|
||||
},
|
||||
|
||||
/**
|
||||
* `removeText` is the text for the tooltip to remove an upload
|
||||
*/
|
||||
removeText: {
|
||||
type: String,
|
||||
value: 'Remove'
|
||||
},
|
||||
|
||||
/**
|
||||
* `successText` is the text for the tooltip of a successful upload
|
||||
*/
|
||||
successText: {
|
||||
type: String,
|
||||
value: 'Success'
|
||||
},
|
||||
|
||||
/**
|
||||
* `errorText` is the text to display for a failed upload
|
||||
*/
|
||||
errorText: {
|
||||
type: String,
|
||||
value: 'Error uploading file...'
|
||||
},
|
||||
|
||||
/**
|
||||
* `_shownDropText` indicates whether or not the drop text should be shown
|
||||
*/
|
||||
_shownDropText: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clears the list of files
|
||||
*/
|
||||
clear: function() {
|
||||
this.set("files", []);
|
||||
this._showDropText();
|
||||
},
|
||||
|
||||
ready: function() {
|
||||
},
|
||||
|
||||
init: function() {
|
||||
if (this.raised) {
|
||||
this.toggleAttribute("raised", true, this.$.button);
|
||||
}
|
||||
if (this.noink) {
|
||||
this.toggleAttribute("noink", true, this.$.button);
|
||||
}
|
||||
if(this.dropaction === 'true') {
|
||||
this._showDropText();
|
||||
this.setupDrop();
|
||||
}
|
||||
if (this.droppable === 'true') {
|
||||
this._showDropText();
|
||||
this.setupDrop();
|
||||
} else { this._hideDropText(); }
|
||||
},
|
||||
|
||||
/**
|
||||
* A function to set up a drop area for drag-and-drop file uploads
|
||||
*/
|
||||
setupDrop: function() {
|
||||
var uploadBorder = this.$.UploadBorder;
|
||||
this.toggleClass("enabled", true, uploadBorder);
|
||||
|
||||
this.ondragover = function(e) {
|
||||
e.stopPropagation();
|
||||
this.toggleClass("hover", true, uploadBorder);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.ondragleave = function() {
|
||||
this.toggleClass("hover", false, uploadBorder);
|
||||
return false;
|
||||
}
|
||||
|
||||
this.ondrop = function(event) {
|
||||
this.toggleClass("hover", false, uploadBorder);
|
||||
event.preventDefault();
|
||||
var length = event.dataTransfer.files.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
var file = event.dataTransfer.files[i];
|
||||
|
||||
// Check if multiple upload is allowed
|
||||
if (!this.multi && this.files.length !== 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if filetype is accepted
|
||||
var mimeType = ((file.type !== '') ? file.type.match(/^[^\/]*\//)[0] : null);
|
||||
var fileType = file.name.match(/\.[^\.]*$/)[0];
|
||||
if (this.accept !== '' && !(this.accept.indexOf(mimeType) > -1 || this.accept.indexOf(fileType) > -1)) {
|
||||
return;
|
||||
}
|
||||
|
||||
file.progress = 0;
|
||||
file.error = false;
|
||||
file.complete = false;
|
||||
this.push("files", file);
|
||||
this.uploadFile(file);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Clicks the invisible file input
|
||||
*/
|
||||
_fileClick: function() {
|
||||
var elem = this.$.fileInput;
|
||||
if (elem && document.createEvent) { // sanity check
|
||||
var evt = document.createEvent("MouseEvents");
|
||||
evt.initEvent("click", true, false);
|
||||
elem.dispatchEvent(evt);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Called whenever the list of selected files changes
|
||||
*/
|
||||
_fileChange: function(e) {
|
||||
var length = e.target.files.length;
|
||||
for (var i = 0; i < length; i++) {
|
||||
var file = e.target.files[i];
|
||||
file.progress = 0;
|
||||
file.error = false;
|
||||
file.complete = false;
|
||||
this.push("files", file);
|
||||
this.uploadFile(file);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Cancels the file upload for a specific file
|
||||
*
|
||||
* @param {object} a file, an element of the files array
|
||||
*/
|
||||
cancel: function(file) {
|
||||
if (file && file.xhr) {
|
||||
file.xhr.abort();
|
||||
this.splice("files", this.files.indexOf(file), 1);
|
||||
this._showDropText();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Cancels the file upload
|
||||
*
|
||||
* @param {object}, an event object
|
||||
*/
|
||||
_cancelUpload: function(e) {
|
||||
this.cancel(e.model.__data__.item);
|
||||
},
|
||||
|
||||
/**
|
||||
* Retries to upload the file
|
||||
*
|
||||
* @param {object}, an event object
|
||||
*/
|
||||
_retryUpload: function(e) {
|
||||
e.model.set("item.error", false);
|
||||
e.model.set("item.progress", 0);
|
||||
// The async helps give visual feedback of a retry occurring, even though it's less efficient.
|
||||
var self = this;
|
||||
this.async(function() {
|
||||
self.uploadFile(e.model.__data__.item);
|
||||
}, 50);
|
||||
},
|
||||
|
||||
/**
|
||||
* Whether or not to display the drop text
|
||||
*/
|
||||
_showDropText: function() {
|
||||
this.set("_shownDropText", true);
|
||||
},
|
||||
|
||||
_hideDropText: function() {
|
||||
this.set("_shownDropText", false);
|
||||
var uploadBorder = this.$.UploadBorder;
|
||||
this.toggleClass("enabled", false, uploadBorder);
|
||||
this.toggleClass("hover", false, uploadBorder);
|
||||
},
|
||||
|
||||
/**
|
||||
* Uploads a file
|
||||
*
|
||||
* @param {object} a file, an element of the files array
|
||||
*/
|
||||
uploadFile: function(file) {
|
||||
if (!file) {
|
||||
return;
|
||||
}
|
||||
this.fire('before-upload');
|
||||
this._showDropText();
|
||||
var prefix = "files." + this.files.indexOf(file);
|
||||
var self = this;
|
||||
|
||||
var formData = new FormData();
|
||||
formData.append("file", file, file.name);
|
||||
|
||||
var xhr = file.xhr = new XMLHttpRequest();
|
||||
|
||||
xhr.upload.onprogress = function(e) {
|
||||
var done = e.loaded, total = e.total;
|
||||
self.set(prefix + ".progress", Math.floor((done/total)*1000)/10);
|
||||
};
|
||||
|
||||
var url = this.target.replace("<name>", file.name);
|
||||
xhr.open(this.method, url, true);
|
||||
for (key in this.headers) {
|
||||
if (this.headers.hasOwnProperty(key)) {
|
||||
xhr.setRequestHeader(key, this.headers[key]);
|
||||
}
|
||||
}
|
||||
xhr.onload = function(e) {
|
||||
if (xhr.status === 200) {
|
||||
self.fire("success", {xhr: xhr});
|
||||
self.set(prefix + ".complete", true);
|
||||
} else {
|
||||
self.set(prefix + ".error", true);
|
||||
self.set(prefix + ".complete", false);
|
||||
self.set(prefix + ".progress", 100);
|
||||
self.updateStyles();
|
||||
self.fire("error", {xhr:xhr});
|
||||
}
|
||||
};
|
||||
xhr.send(formData);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
25
react-app/bower_components/file-upload/index.html
vendored
Executable file
25
react-app/bower_components/file-upload/index.html
vendored
Executable file
@@ -0,0 +1,25 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 Winston Howes. All rights reserved.
|
||||
This code may only be used under the MIT license found at https://github.com/winhowes/file-upload/blob/master/LICENSE
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<!-- Note: if the main element for this repository doesn't
|
||||
match the folder name, add a src="<main-component>.html" attribute,
|
||||
where <main-component>.html" is a file that imports all of the
|
||||
components you want documented. -->
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
31
react-app/bower_components/font-roboto/.bower.json
vendored
Normal file
31
react-app/bower_components/font-roboto/.bower.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "font-roboto",
|
||||
"version": "1.0.1",
|
||||
"description": "An HTML import for Roboto",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"font",
|
||||
"roboto"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/font-roboto.git"
|
||||
},
|
||||
"main": "roboto.html",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/font-roboto/",
|
||||
"ignore": [
|
||||
"/.*"
|
||||
],
|
||||
"_release": "1.0.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.1",
|
||||
"commit": "21ce9b51a417fa9995cf6606e886aba0728f70a1"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/font-roboto.git",
|
||||
"_target": "^1.0.1",
|
||||
"_originalSource": "PolymerElements/font-roboto"
|
||||
}
|
1
react-app/bower_components/font-roboto/README.md
vendored
Normal file
1
react-app/bower_components/font-roboto/README.md
vendored
Normal file
@@ -0,0 +1 @@
|
||||
# font-roboto
|
22
react-app/bower_components/font-roboto/bower.json
vendored
Normal file
22
react-app/bower_components/font-roboto/bower.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "font-roboto",
|
||||
"version": "1.0.1",
|
||||
"description": "An HTML import for Roboto",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"font",
|
||||
"roboto"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/font-roboto.git"
|
||||
},
|
||||
"main": "roboto.html",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/font-roboto/",
|
||||
"ignore": [
|
||||
"/.*"
|
||||
]
|
||||
}
|
11
react-app/bower_components/font-roboto/roboto.html
vendored
Normal file
11
react-app/bower_components/font-roboto/roboto.html
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:400,300,300italic,400italic,500,500italic,700,700italic">
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700">
|
43
react-app/bower_components/iron-a11y-keys-behavior/.bower.json
vendored
Normal file
43
react-app/bower_components/iron-a11y-keys-behavior/.bower.json
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "iron-a11y-keys-behavior",
|
||||
"version": "1.1.2",
|
||||
"description": "A behavior that enables keybindings for greater a11y.",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"web-component",
|
||||
"polymer",
|
||||
"a11y",
|
||||
"input"
|
||||
],
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git"
|
||||
},
|
||||
"main": "iron-a11y-keys-behavior.html",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.2",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/polymerelements/iron-a11y-keys-behavior",
|
||||
"_release": "1.1.2",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.1.2",
|
||||
"commit": "0c2330c229a6fd3d200e2b84147ec6f94f17c22d"
|
||||
},
|
||||
"_source": "git://github.com/polymerelements/iron-a11y-keys-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "polymerelements/iron-a11y-keys-behavior"
|
||||
}
|
33
react-app/bower_components/iron-a11y-keys-behavior/.github/ISSUE_TEMPLATE.md
vendored
Normal file
33
react-app/bower_components/iron-a11y-keys-behavior/.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<!-- Instructions: https://github.com/PolymerElements/iron-a11y-keys-behavior/CONTRIBUTING.md#filing-issues -->
|
||||
### Description
|
||||
<!-- Example: The `paper-foo` element causes the page to turn pink when clicked. -->
|
||||
|
||||
### Expected outcome
|
||||
|
||||
<!-- Example: The page stays the same color. -->
|
||||
|
||||
### Actual outcome
|
||||
|
||||
<!-- Example: The page turns pink. -->
|
||||
|
||||
### Live Demo
|
||||
<!-- Example: https://jsbin.com/cagaye/edit?html,output -->
|
||||
|
||||
### Steps to reproduce
|
||||
|
||||
<!-- Example
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
-->
|
||||
|
||||
### Browsers Affected
|
||||
<!-- Check all that apply -->
|
||||
- [ ] Chrome
|
||||
- [ ] Firefox
|
||||
- [ ] Safari 9
|
||||
- [ ] Safari 8
|
||||
- [ ] Safari 7
|
||||
- [ ] Edge
|
||||
- [ ] IE 11
|
||||
- [ ] IE 10
|
1
react-app/bower_components/iron-a11y-keys-behavior/.gitignore
vendored
Normal file
1
react-app/bower_components/iron-a11y-keys-behavior/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bower_components
|
25
react-app/bower_components/iron-a11y-keys-behavior/.travis.yml
vendored
Normal file
25
react-app/bower_components/iron-a11y-keys-behavior/.travis.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: OZhLlPsjjnWU4FyZ+RKq5i/Nv/tElvcjr9+OT04ENGKfh9+fkuij/XdHJQe6EpOCjrNkwt23c+I6V5YWRrSatRX/AxEkViW8EXnF32rX3HV8fWnjD6Vfn+4Qz82y4huc9II8OV5I7jFDln6yzEGZn08zAtbmhj5dSpYtT1spSf/ZuUkqn4mMRJW2wCOnzbjueP56Ry40IwQm0enLXVQLPYB3LC4fBWfT+VFrsE9qH1ZgGKcSD/n2dOD3d6xjts4FSilNp2IZ8Km5RNAFUxYmkcwrY4O2ltNtKUngWwIpeplpz0bNj5k8kOpT5xA/FT630M5sFd1ODVp846kTr/EyYTq/VCiwTaA/vDfZL85DC3O+Zt0vTHAvkxKAaXkg9sMp8gJOJ6gt6cK8rV8z7npeAUVsK1gmuHYXne1Z76SRgWwbE0/z82vyFLNgitmZDLLM1fP3TpzsK1QQg1ikn6iYXdWpHcrzBi6lk8mCafnP7D7B/yFB/Z6Y9AFI6NQI/jWP2FMMJjMWbaJVG9DAU4PWlVTiFnhfVjPI7FUEmW46/QjH1ztSZWpDA9SBozJluIpKRA1qk1EgGX1RBFBHrbFtHG//x0AGyAV6gWOfdKjl/nqcM02xFUSrDb0tkNUnEAS6K7l+X1eDaBbiaAQiakPt9Je2WvvHyc+OiZviSc72Gmc=
|
||||
- secure: vIs86+z7s1QwihkHtLBRQzlmJRSIWIadq3SlDdZHS4HOivH7fNV0d4hm8QnZYZ9X8yvSvxFCzEFdLuX1TpU0H3oy5wgYky7DnfJtsEhuOfW8dobHHZeCNi/t2FQAXpobqpRwojC3A+1b1lNrY1XNpYRz7aEialO4Yr8e1SQSLex5zw/pqm7g9Vz6PnQwobDQcGXKc6ZWc84+DqOo9qfkSlnEJC/1vQxHYpUa172UnnAnmHJ7gZKdhf9aLWJSZcSpPcoKEnvslRFmeDyRMNRDWVzcg2vHnV+tc1aYzp1wsrRW3P+oqwYlvGlxo+5U92QLXKIcKZhGblVWxe8BtXgiVzgS1sz5D11vKs61Xe46onbguG/XK3UxX9bPRK5uklkC5fwAY2hhvOTGXqimTb2YrlyEWO3BCKGBk6Is3KGyCe7c2nNEmXPUSun9X1JLGRPivJb9iBR4/WSEFvibYHl6/gIke9LdXPOCHuJ3+Iu14lCz+pwi8ADIWVuGpDIxFcorG8a3BCoxQo5VouUbSe0mcNttAvSzBNxhljaaBuFs56DLDpLRr0sGhqvfA1JzdCyzVyrk4WECfZw26pAnYCyTczVXmu5msVdKnjPJKtDqWazvIhHk2G1mk8CKb14lrN58u/Kh6PQ3miJ+61c1stBWhRDlp2QffOkBJiOATKHF+AA=
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
77
react-app/bower_components/iron-a11y-keys-behavior/CONTRIBUTING.md
vendored
Normal file
77
react-app/bower_components/iron-a11y-keys-behavior/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
|
||||
You can however override the jsbin link with one that's customized to this
|
||||
specific element:
|
||||
|
||||
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, fixes #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
35
react-app/bower_components/iron-a11y-keys-behavior/README.md
vendored
Normal file
35
react-app/bower_components/iron-a11y-keys-behavior/README.md
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
|
||||
<!---
|
||||
|
||||
This README is automatically generated from the comments in these files:
|
||||
iron-a11y-keys-behavior.html
|
||||
|
||||
Edit those files, and our readme bot will duplicate them over here!
|
||||
Edit this file, and the bot will squash your changes :)
|
||||
|
||||
The bot does some handling of markdown. Please file a bug if it does the wrong
|
||||
thing! https://github.com/PolymerLabs/tedium/issues
|
||||
|
||||
-->
|
||||
|
||||
[](https://travis-ci.org/PolymerElements/iron-a11y-keys-behavior)
|
||||
|
||||
_[Demo and API docs](https://elements.polymer-project.org/elements/iron-a11y-keys-behavior)_
|
||||
|
||||
|
||||
##Polymer.IronA11yKeysBehavior
|
||||
|
||||
`Polymer.IronA11yKeysBehavior` provides a normalized interface for processing
|
||||
keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding).
|
||||
The element takes care of browser differences with respect to Keyboard events
|
||||
and uses an expressive syntax to filter key presses.
|
||||
|
||||
Use the `keyBindings` prototype property to express what combination of keys
|
||||
will trigger the event to fire.
|
||||
|
||||
Use the `key-event-target` attribute to set up event handlers on a specific
|
||||
node.
|
||||
The `keys-pressed` event will fire when one of the key combinations set with the
|
||||
`keys` property is pressed.
|
||||
|
||||
|
33
react-app/bower_components/iron-a11y-keys-behavior/bower.json
vendored
Normal file
33
react-app/bower_components/iron-a11y-keys-behavior/bower.json
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"name": "iron-a11y-keys-behavior",
|
||||
"version": "1.1.2",
|
||||
"description": "A behavior that enables keybindings for greater a11y.",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"web-component",
|
||||
"polymer",
|
||||
"a11y",
|
||||
"input"
|
||||
],
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-a11y-keys-behavior.git"
|
||||
},
|
||||
"main": "iron-a11y-keys-behavior.html",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.2",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": []
|
||||
}
|
24
react-app/bower_components/iron-a11y-keys-behavior/demo/index.html
vendored
Normal file
24
react-app/bower_components/iron-a11y-keys-behavior/demo/index.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Iron A11y Keys Behavior demo</title>
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="x-key-aware.html">
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
</head>
|
||||
<body>
|
||||
<div class="vertical-section vertical-section-container centered">
|
||||
<x-key-aware></x-key-aware>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
104
react-app/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html
vendored
Normal file
104
react-app/bower_components/iron-a11y-keys-behavior/demo/x-key-aware.html
vendored
Normal file
@@ -0,0 +1,104 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../../paper-styles/color.html">
|
||||
<link rel="import" href="../iron-a11y-keys-behavior.html">
|
||||
|
||||
<dom-module id="x-key-aware">
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
pre {
|
||||
color: var(--google-blue-700);
|
||||
}
|
||||
|
||||
.keys {
|
||||
line-height: 25px;
|
||||
}
|
||||
|
||||
.keys span {
|
||||
cursor: default;
|
||||
background-color: var(--google-grey-100);
|
||||
border: 1px solid var(--google-grey-300);
|
||||
padding: 1px 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<h4>Press any of these keys</h4>
|
||||
<input type="checkbox" checked="{{preventDefault::change}}"> prevent default = {{preventDefault}}
|
||||
<p class="keys">
|
||||
<template is="dom-repeat" items="[[boundKeys]]">
|
||||
<span>{{item}}</span>
|
||||
</template>
|
||||
</p>
|
||||
<pre>[[pressed]]</pre>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'x-key-aware',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronA11yKeysBehavior
|
||||
],
|
||||
|
||||
properties: {
|
||||
pressed: {
|
||||
type: String,
|
||||
readOnly: true,
|
||||
value: ''
|
||||
},
|
||||
|
||||
boundKeys: {
|
||||
type: Array,
|
||||
value: function() {
|
||||
return Object.keys(this.keyBindings).join(' ').split(' ');
|
||||
}
|
||||
},
|
||||
|
||||
preventDefault: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
notify: true
|
||||
},
|
||||
|
||||
keyEventTarget: {
|
||||
type: Object,
|
||||
value: function() {
|
||||
return document.body;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
keyBindings: {
|
||||
'* pageup pagedown left right down up home end space enter @ ~ " $ ? ! \\ + : # backspace': '_updatePressed',
|
||||
'a': '_updatePressed',
|
||||
'shift+a alt+a': '_updatePressed',
|
||||
'shift+tab shift+space': '_updatePressed'
|
||||
},
|
||||
|
||||
_updatePressed: function(event) {
|
||||
console.log(event.detail);
|
||||
|
||||
if (this.preventDefault) {
|
||||
event.preventDefault();
|
||||
}
|
||||
this._setPressed(
|
||||
this.pressed + event.detail.combo + ' pressed!\n'
|
||||
);
|
||||
}
|
||||
});
|
||||
</script>
|
24
react-app/bower_components/iron-a11y-keys-behavior/index.html
vendored
Normal file
24
react-app/bower_components/iron-a11y-keys-behavior/index.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-a11y-keys-behavior</title>
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
462
react-app/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
vendored
Normal file
462
react-app/bower_components/iron-a11y-keys-behavior/iron-a11y-keys-behavior.html
vendored
Normal file
@@ -0,0 +1,462 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Chrome uses an older version of DOM Level 3 Keyboard Events
|
||||
*
|
||||
* Most keys are labeled as text, but some are Unicode codepoints.
|
||||
* Values taken from: http://www.w3.org/TR/2007/WD-DOM-Level-3-Events-20071221/keyset.html#KeySet-Set
|
||||
*/
|
||||
var KEY_IDENTIFIER = {
|
||||
'U+0008': 'backspace',
|
||||
'U+0009': 'tab',
|
||||
'U+001B': 'esc',
|
||||
'U+0020': 'space',
|
||||
'U+007F': 'del'
|
||||
};
|
||||
|
||||
/**
|
||||
* Special table for KeyboardEvent.keyCode.
|
||||
* KeyboardEvent.keyIdentifier is better, and KeyBoardEvent.key is even better
|
||||
* than that.
|
||||
*
|
||||
* Values from: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.keyCode#Value_of_keyCode
|
||||
*/
|
||||
var KEY_CODE = {
|
||||
8: 'backspace',
|
||||
9: 'tab',
|
||||
13: 'enter',
|
||||
27: 'esc',
|
||||
33: 'pageup',
|
||||
34: 'pagedown',
|
||||
35: 'end',
|
||||
36: 'home',
|
||||
32: 'space',
|
||||
37: 'left',
|
||||
38: 'up',
|
||||
39: 'right',
|
||||
40: 'down',
|
||||
46: 'del',
|
||||
106: '*'
|
||||
};
|
||||
|
||||
/**
|
||||
* MODIFIER_KEYS maps the short name for modifier keys used in a key
|
||||
* combo string to the property name that references those same keys
|
||||
* in a KeyboardEvent instance.
|
||||
*/
|
||||
var MODIFIER_KEYS = {
|
||||
'shift': 'shiftKey',
|
||||
'ctrl': 'ctrlKey',
|
||||
'alt': 'altKey',
|
||||
'meta': 'metaKey'
|
||||
};
|
||||
|
||||
/**
|
||||
* KeyboardEvent.key is mostly represented by printable character made by
|
||||
* the keyboard, with unprintable keys labeled nicely.
|
||||
*
|
||||
* However, on OS X, Alt+char can make a Unicode character that follows an
|
||||
* Apple-specific mapping. In this case, we fall back to .keyCode.
|
||||
*/
|
||||
var KEY_CHAR = /[a-z0-9*]/;
|
||||
|
||||
/**
|
||||
* Matches a keyIdentifier string.
|
||||
*/
|
||||
var IDENT_CHAR = /U\+/;
|
||||
|
||||
/**
|
||||
* Matches arrow keys in Gecko 27.0+
|
||||
*/
|
||||
var ARROW_KEY = /^arrow/;
|
||||
|
||||
/**
|
||||
* Matches space keys everywhere (notably including IE10's exceptional name
|
||||
* `spacebar`).
|
||||
*/
|
||||
var SPACE_KEY = /^space(bar)?/;
|
||||
|
||||
/**
|
||||
* Matches ESC key.
|
||||
*
|
||||
* Value from: http://w3c.github.io/uievents-key/#key-Escape
|
||||
*/
|
||||
var ESC_KEY = /^escape$/;
|
||||
|
||||
/**
|
||||
* Transforms the key.
|
||||
* @param {string} key The KeyBoardEvent.key
|
||||
* @param {Boolean} [noSpecialChars] Limits the transformation to
|
||||
* alpha-numeric characters.
|
||||
*/
|
||||
function transformKey(key, noSpecialChars) {
|
||||
var validKey = '';
|
||||
if (key) {
|
||||
var lKey = key.toLowerCase();
|
||||
if (lKey === ' ' || SPACE_KEY.test(lKey)) {
|
||||
validKey = 'space';
|
||||
} else if (ESC_KEY.test(lKey)) {
|
||||
validKey = 'esc';
|
||||
} else if (lKey.length == 1) {
|
||||
if (!noSpecialChars || KEY_CHAR.test(lKey)) {
|
||||
validKey = lKey;
|
||||
}
|
||||
} else if (ARROW_KEY.test(lKey)) {
|
||||
validKey = lKey.replace('arrow', '');
|
||||
} else if (lKey == 'multiply') {
|
||||
// numpad '*' can map to Multiply on IE/Windows
|
||||
validKey = '*';
|
||||
} else {
|
||||
validKey = lKey;
|
||||
}
|
||||
}
|
||||
return validKey;
|
||||
}
|
||||
|
||||
function transformKeyIdentifier(keyIdent) {
|
||||
var validKey = '';
|
||||
if (keyIdent) {
|
||||
if (keyIdent in KEY_IDENTIFIER) {
|
||||
validKey = KEY_IDENTIFIER[keyIdent];
|
||||
} else if (IDENT_CHAR.test(keyIdent)) {
|
||||
keyIdent = parseInt(keyIdent.replace('U+', '0x'), 16);
|
||||
validKey = String.fromCharCode(keyIdent).toLowerCase();
|
||||
} else {
|
||||
validKey = keyIdent.toLowerCase();
|
||||
}
|
||||
}
|
||||
return validKey;
|
||||
}
|
||||
|
||||
function transformKeyCode(keyCode) {
|
||||
var validKey = '';
|
||||
if (Number(keyCode)) {
|
||||
if (keyCode >= 65 && keyCode <= 90) {
|
||||
// ascii a-z
|
||||
// lowercase is 32 offset from uppercase
|
||||
validKey = String.fromCharCode(32 + keyCode);
|
||||
} else if (keyCode >= 112 && keyCode <= 123) {
|
||||
// function keys f1-f12
|
||||
validKey = 'f' + (keyCode - 112);
|
||||
} else if (keyCode >= 48 && keyCode <= 57) {
|
||||
// top 0-9 keys
|
||||
validKey = String(keyCode - 48);
|
||||
} else if (keyCode >= 96 && keyCode <= 105) {
|
||||
// num pad 0-9
|
||||
validKey = String(keyCode - 96);
|
||||
} else {
|
||||
validKey = KEY_CODE[keyCode];
|
||||
}
|
||||
}
|
||||
return validKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculates the normalized key for a KeyboardEvent.
|
||||
* @param {KeyboardEvent} keyEvent
|
||||
* @param {Boolean} [noSpecialChars] Set to true to limit keyEvent.key
|
||||
* transformation to alpha-numeric chars. This is useful with key
|
||||
* combinations like shift + 2, which on FF for MacOS produces
|
||||
* keyEvent.key = @
|
||||
* To get 2 returned, set noSpecialChars = true
|
||||
* To get @ returned, set noSpecialChars = false
|
||||
*/
|
||||
function normalizedKeyForEvent(keyEvent, noSpecialChars) {
|
||||
// Fall back from .key, to .keyIdentifier, to .keyCode, and then to
|
||||
// .detail.key to support artificial keyboard events.
|
||||
return transformKey(keyEvent.key, noSpecialChars) ||
|
||||
transformKeyIdentifier(keyEvent.keyIdentifier) ||
|
||||
transformKeyCode(keyEvent.keyCode) ||
|
||||
transformKey(keyEvent.detail.key, noSpecialChars) || '';
|
||||
}
|
||||
|
||||
function keyComboMatchesEvent(keyCombo, event) {
|
||||
// For combos with modifiers we support only alpha-numeric keys
|
||||
var keyEvent = normalizedKeyForEvent(event, keyCombo.hasModifiers);
|
||||
return keyEvent === keyCombo.key &&
|
||||
(!keyCombo.hasModifiers || (
|
||||
!!event.shiftKey === !!keyCombo.shiftKey &&
|
||||
!!event.ctrlKey === !!keyCombo.ctrlKey &&
|
||||
!!event.altKey === !!keyCombo.altKey &&
|
||||
!!event.metaKey === !!keyCombo.metaKey)
|
||||
);
|
||||
}
|
||||
|
||||
function parseKeyComboString(keyComboString) {
|
||||
if (keyComboString.length === 1) {
|
||||
return {
|
||||
combo: keyComboString,
|
||||
key: keyComboString,
|
||||
event: 'keydown'
|
||||
};
|
||||
}
|
||||
return keyComboString.split('+').reduce(function(parsedKeyCombo, keyComboPart) {
|
||||
var eventParts = keyComboPart.split(':');
|
||||
var keyName = eventParts[0];
|
||||
var event = eventParts[1];
|
||||
|
||||
if (keyName in MODIFIER_KEYS) {
|
||||
parsedKeyCombo[MODIFIER_KEYS[keyName]] = true;
|
||||
parsedKeyCombo.hasModifiers = true;
|
||||
} else {
|
||||
parsedKeyCombo.key = keyName;
|
||||
parsedKeyCombo.event = event || 'keydown';
|
||||
}
|
||||
|
||||
return parsedKeyCombo;
|
||||
}, {
|
||||
combo: keyComboString.split(':').shift()
|
||||
});
|
||||
}
|
||||
|
||||
function parseEventString(eventString) {
|
||||
return eventString.trim().split(' ').map(function(keyComboString) {
|
||||
return parseKeyComboString(keyComboString);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* `Polymer.IronA11yKeysBehavior` provides a normalized interface for processing
|
||||
* keyboard commands that pertain to [WAI-ARIA best practices](http://www.w3.org/TR/wai-aria-practices/#kbd_general_binding).
|
||||
* The element takes care of browser differences with respect to Keyboard events
|
||||
* and uses an expressive syntax to filter key presses.
|
||||
*
|
||||
* Use the `keyBindings` prototype property to express what combination of keys
|
||||
* will trigger the event to fire.
|
||||
*
|
||||
* Use the `key-event-target` attribute to set up event handlers on a specific
|
||||
* node.
|
||||
* The `keys-pressed` event will fire when one of the key combinations set with the
|
||||
* `keys` property is pressed.
|
||||
*
|
||||
* @demo demo/index.html
|
||||
* @polymerBehavior
|
||||
*/
|
||||
Polymer.IronA11yKeysBehavior = {
|
||||
properties: {
|
||||
/**
|
||||
* The HTMLElement that will be firing relevant KeyboardEvents.
|
||||
*/
|
||||
keyEventTarget: {
|
||||
type: Object,
|
||||
value: function() {
|
||||
return this;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* If true, this property will cause the implementing element to
|
||||
* automatically stop propagation on any handled KeyboardEvents.
|
||||
*/
|
||||
stopKeyboardEventPropagation: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
_boundKeyHandlers: {
|
||||
type: Array,
|
||||
value: function() {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
|
||||
// We use this due to a limitation in IE10 where instances will have
|
||||
// own properties of everything on the "prototype".
|
||||
_imperativeKeyBindings: {
|
||||
type: Object,
|
||||
value: function() {
|
||||
return {};
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)'
|
||||
],
|
||||
|
||||
keyBindings: {},
|
||||
|
||||
registered: function() {
|
||||
this._prepKeyBindings();
|
||||
},
|
||||
|
||||
attached: function() {
|
||||
this._listenKeyEventListeners();
|
||||
},
|
||||
|
||||
detached: function() {
|
||||
this._unlistenKeyEventListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
* Can be used to imperatively add a key binding to the implementing
|
||||
* element. This is the imperative equivalent of declaring a keybinding
|
||||
* in the `keyBindings` prototype property.
|
||||
*/
|
||||
addOwnKeyBinding: function(eventString, handlerName) {
|
||||
this._imperativeKeyBindings[eventString] = handlerName;
|
||||
this._prepKeyBindings();
|
||||
this._resetKeyEventListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
* When called, will remove all imperatively-added key bindings.
|
||||
*/
|
||||
removeOwnKeyBindings: function() {
|
||||
this._imperativeKeyBindings = {};
|
||||
this._prepKeyBindings();
|
||||
this._resetKeyEventListeners();
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns true if a keyboard event matches `eventString`.
|
||||
*
|
||||
* @param {KeyboardEvent} event
|
||||
* @param {string} eventString
|
||||
* @return {boolean}
|
||||
*/
|
||||
keyboardEventMatchesKeys: function(event, eventString) {
|
||||
var keyCombos = parseEventString(eventString);
|
||||
for (var i = 0; i < keyCombos.length; ++i) {
|
||||
if (keyComboMatchesEvent(keyCombos[i], event)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
_collectKeyBindings: function() {
|
||||
var keyBindings = this.behaviors.map(function(behavior) {
|
||||
return behavior.keyBindings;
|
||||
});
|
||||
|
||||
if (keyBindings.indexOf(this.keyBindings) === -1) {
|
||||
keyBindings.push(this.keyBindings);
|
||||
}
|
||||
|
||||
return keyBindings;
|
||||
},
|
||||
|
||||
_prepKeyBindings: function() {
|
||||
this._keyBindings = {};
|
||||
|
||||
this._collectKeyBindings().forEach(function(keyBindings) {
|
||||
for (var eventString in keyBindings) {
|
||||
this._addKeyBinding(eventString, keyBindings[eventString]);
|
||||
}
|
||||
}, this);
|
||||
|
||||
for (var eventString in this._imperativeKeyBindings) {
|
||||
this._addKeyBinding(eventString, this._imperativeKeyBindings[eventString]);
|
||||
}
|
||||
|
||||
// Give precedence to combos with modifiers to be checked first.
|
||||
for (var eventName in this._keyBindings) {
|
||||
this._keyBindings[eventName].sort(function (kb1, kb2) {
|
||||
var b1 = kb1[0].hasModifiers;
|
||||
var b2 = kb2[0].hasModifiers;
|
||||
return (b1 === b2) ? 0 : b1 ? -1 : 1;
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
_addKeyBinding: function(eventString, handlerName) {
|
||||
parseEventString(eventString).forEach(function(keyCombo) {
|
||||
this._keyBindings[keyCombo.event] =
|
||||
this._keyBindings[keyCombo.event] || [];
|
||||
|
||||
this._keyBindings[keyCombo.event].push([
|
||||
keyCombo,
|
||||
handlerName
|
||||
]);
|
||||
}, this);
|
||||
},
|
||||
|
||||
_resetKeyEventListeners: function() {
|
||||
this._unlistenKeyEventListeners();
|
||||
|
||||
if (this.isAttached) {
|
||||
this._listenKeyEventListeners();
|
||||
}
|
||||
},
|
||||
|
||||
_listenKeyEventListeners: function() {
|
||||
Object.keys(this._keyBindings).forEach(function(eventName) {
|
||||
var keyBindings = this._keyBindings[eventName];
|
||||
var boundKeyHandler = this._onKeyBindingEvent.bind(this, keyBindings);
|
||||
|
||||
this._boundKeyHandlers.push([this.keyEventTarget, eventName, boundKeyHandler]);
|
||||
|
||||
this.keyEventTarget.addEventListener(eventName, boundKeyHandler);
|
||||
}, this);
|
||||
},
|
||||
|
||||
_unlistenKeyEventListeners: function() {
|
||||
var keyHandlerTuple;
|
||||
var keyEventTarget;
|
||||
var eventName;
|
||||
var boundKeyHandler;
|
||||
|
||||
while (this._boundKeyHandlers.length) {
|
||||
// My kingdom for block-scope binding and destructuring assignment..
|
||||
keyHandlerTuple = this._boundKeyHandlers.pop();
|
||||
keyEventTarget = keyHandlerTuple[0];
|
||||
eventName = keyHandlerTuple[1];
|
||||
boundKeyHandler = keyHandlerTuple[2];
|
||||
|
||||
keyEventTarget.removeEventListener(eventName, boundKeyHandler);
|
||||
}
|
||||
},
|
||||
|
||||
_onKeyBindingEvent: function(keyBindings, event) {
|
||||
if (this.stopKeyboardEventPropagation) {
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
||||
// if event has been already prevented, don't do anything
|
||||
if (event.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (var i = 0; i < keyBindings.length; i++) {
|
||||
var keyCombo = keyBindings[i][0];
|
||||
var handlerName = keyBindings[i][1];
|
||||
if (keyComboMatchesEvent(keyCombo, event)) {
|
||||
this._triggerKeyHandler(keyCombo, handlerName, event);
|
||||
// exit the loop if eventDefault was prevented
|
||||
if (event.defaultPrevented) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
_triggerKeyHandler: function(keyCombo, handlerName, keyboardEvent) {
|
||||
var detail = Object.create(keyCombo);
|
||||
detail.keyboardEvent = keyboardEvent;
|
||||
var event = new CustomEvent(keyCombo.event, {
|
||||
detail: detail,
|
||||
cancelable: true
|
||||
});
|
||||
this[handlerName].call(this, event);
|
||||
if (event.defaultPrevented) {
|
||||
keyboardEvent.preventDefault();
|
||||
}
|
||||
}
|
||||
};
|
||||
})();
|
||||
</script>
|
429
react-app/bower_components/iron-a11y-keys-behavior/test/basic-test.html
vendored
Normal file
429
react-app/bower_components/iron-a11y-keys-behavior/test/basic-test.html
vendored
Normal file
@@ -0,0 +1,429 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
<title>iron-a11y-keys</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-a11y-keys-behavior.html">
|
||||
</head>
|
||||
<body>
|
||||
<test-fixture id="BasicKeys">
|
||||
<template>
|
||||
<x-a11y-basic-keys></x-a11y-basic-keys>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="NonPropagatingKeys">
|
||||
<template>
|
||||
<x-a11y-basic-keys stop-keyboard-event-propagation></x-a11y-basic-keys>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="ComboKeys">
|
||||
<template>
|
||||
<x-a11y-combo-keys></x-a11y-combo-keys>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="AlternativeEventKeys">
|
||||
<template>
|
||||
<x-a11y-alternate-event-keys></x-a11y-alternate-event-keys>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="BehaviorKeys">
|
||||
<template>
|
||||
<x-a11y-behavior-keys></x-a11y-behavior-keys>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="PreventKeys">
|
||||
<template>
|
||||
<x-a11y-prevent-keys></x-a11y-prevent-keys>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('Polymer.IronA11yKeysBehavior', function() {
|
||||
var keys;
|
||||
|
||||
suiteSetup(function() {
|
||||
var KeysTestBehavior = [Polymer.IronA11yKeysBehavior, {
|
||||
properties: {
|
||||
keyCount: {
|
||||
type: Number,
|
||||
value: 0
|
||||
}
|
||||
},
|
||||
|
||||
_keyHandler: function(event) {
|
||||
this.keyCount++;
|
||||
this.lastEvent = event;
|
||||
},
|
||||
|
||||
// Same as _keyHandler, used to distinguish who's called before who.
|
||||
_keyHandler2: function(event) {
|
||||
this.keyCount++;
|
||||
this.lastEvent = event;
|
||||
},
|
||||
|
||||
_preventDefaultHandler: function(event) {
|
||||
event.preventDefault();
|
||||
this.keyCount++;
|
||||
this.lastEvent = event;
|
||||
}
|
||||
}];
|
||||
|
||||
Polymer({
|
||||
is: 'x-a11y-basic-keys',
|
||||
|
||||
behaviors: [
|
||||
KeysTestBehavior
|
||||
],
|
||||
|
||||
keyBindings: {
|
||||
'space': '_keyHandler',
|
||||
'@': '_keyHandler',
|
||||
'esc': '_keyHandler'
|
||||
}
|
||||
});
|
||||
|
||||
Polymer({
|
||||
is: 'x-a11y-combo-keys',
|
||||
|
||||
behaviors: [
|
||||
KeysTestBehavior
|
||||
],
|
||||
|
||||
keyBindings: {
|
||||
'enter': '_keyHandler2',
|
||||
'ctrl+shift+a shift+enter': '_keyHandler'
|
||||
}
|
||||
});
|
||||
|
||||
Polymer({
|
||||
is: 'x-a11y-alternate-event-keys',
|
||||
|
||||
behaviors: [
|
||||
KeysTestBehavior
|
||||
],
|
||||
|
||||
keyBindings: {
|
||||
'space:keyup': '_keyHandler'
|
||||
}
|
||||
});
|
||||
|
||||
var XA11yBehavior = {
|
||||
keyBindings: {
|
||||
'enter': '_keyHandler'
|
||||
}
|
||||
};
|
||||
|
||||
Polymer({
|
||||
is: 'x-a11y-behavior-keys',
|
||||
|
||||
behaviors: [
|
||||
KeysTestBehavior,
|
||||
XA11yBehavior
|
||||
],
|
||||
|
||||
keyBindings: {
|
||||
'enter': '_keyHandler'
|
||||
}
|
||||
});
|
||||
|
||||
Polymer({
|
||||
is: 'x-a11y-prevent-keys',
|
||||
|
||||
behaviors: [
|
||||
KeysTestBehavior,
|
||||
XA11yBehavior
|
||||
],
|
||||
|
||||
keyBindings: {
|
||||
'space a': '_keyHandler',
|
||||
'enter shift+a': '_preventDefaultHandler'
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
suite('basic keys', function() {
|
||||
setup(function() {
|
||||
keys = fixture('BasicKeys');
|
||||
});
|
||||
|
||||
test('trigger the handler when the specified key is pressed', function() {
|
||||
MockInteractions.pressSpace(keys);
|
||||
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
|
||||
MockInteractions.pressAndReleaseKeyOn(keys, 27, [], 'Esc');
|
||||
expect(keys.keyCount).to.be.equal(2);
|
||||
|
||||
MockInteractions.pressAndReleaseKeyOn(keys, 27, [], 'Escape');
|
||||
expect(keys.keyCount).to.be.equal(3);
|
||||
|
||||
MockInteractions.pressAndReleaseKeyOn(keys, 27, []);
|
||||
expect(keys.keyCount).to.be.equal(4);
|
||||
});
|
||||
|
||||
test('trigger the handler when the specified key is pressed together with a modifier', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.ctrlKey = true;
|
||||
event.keyCode = event.code = 32;
|
||||
keys.dispatchEvent(event);
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
});
|
||||
|
||||
test('handles special character @', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.key = '@';
|
||||
keys.dispatchEvent(event);
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
});
|
||||
|
||||
test('do not trigger the handler for non-specified keys', function() {
|
||||
MockInteractions.pressEnter(keys);
|
||||
|
||||
expect(keys.keyCount).to.be.equal(0);
|
||||
});
|
||||
|
||||
test('can have bindings added imperatively', function() {
|
||||
keys.addOwnKeyBinding('enter', '_keyHandler');
|
||||
|
||||
MockInteractions.pressEnter(keys);
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
|
||||
MockInteractions.pressSpace(keys);
|
||||
expect(keys.keyCount).to.be.equal(2);
|
||||
});
|
||||
|
||||
test('can remove imperatively added bindings', function() {
|
||||
keys.addOwnKeyBinding('enter', '_keyHandler');
|
||||
keys.removeOwnKeyBindings();
|
||||
|
||||
MockInteractions.pressEnter(keys);
|
||||
expect(keys.keyCount).to.be.equal(0);
|
||||
|
||||
MockInteractions.pressSpace(keys);
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
});
|
||||
|
||||
test('allows propagation beyond the key combo handler', function() {
|
||||
var keySpy = sinon.spy();
|
||||
document.addEventListener('keydown', keySpy);
|
||||
|
||||
MockInteractions.pressEnter(keys);
|
||||
|
||||
expect(keySpy.callCount).to.be.equal(1);
|
||||
});
|
||||
|
||||
suite('edge cases', function() {
|
||||
test('knows that `spacebar` is the same as `space`', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.key = 'spacebar';
|
||||
expect(keys.keyboardEventMatchesKeys(event, 'space')).to.be.equal(true);
|
||||
});
|
||||
|
||||
test('handles `+`', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.key = '+';
|
||||
expect(keys.keyboardEventMatchesKeys(event, '+')).to.be.equal(true);
|
||||
});
|
||||
|
||||
test('handles `:`', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.key = ':';
|
||||
expect(keys.keyboardEventMatchesKeys(event, ':')).to.be.equal(true);
|
||||
});
|
||||
|
||||
test('handles ` ` (space)', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.key = ' ';
|
||||
expect(keys.keyboardEventMatchesKeys(event, 'space')).to.be.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
suite('matching keyboard events to keys', function() {
|
||||
test('can be done imperatively', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.keyCode = 65;
|
||||
expect(keys.keyboardEventMatchesKeys(event, 'a')).to.be.equal(true);
|
||||
});
|
||||
|
||||
test('can be done with a provided keyboardEvent', function() {
|
||||
var event;
|
||||
MockInteractions.pressSpace(keys);
|
||||
event = keys.lastEvent;
|
||||
|
||||
expect(event.detail.keyboardEvent).to.be.okay;
|
||||
expect(keys.keyboardEventMatchesKeys(event, 'space')).to.be.equal(true);
|
||||
});
|
||||
|
||||
test('can handle variations in arrow key names', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.key = 'up';
|
||||
expect(keys.keyboardEventMatchesKeys(event, 'up')).to.be.equal(true);
|
||||
event.key = 'ArrowUp';
|
||||
expect(keys.keyboardEventMatchesKeys(event, 'up')).to.be.equal(true);
|
||||
});
|
||||
});
|
||||
|
||||
suite('matching keyboard events to top row and number pad digit keys', function() {
|
||||
test('top row can be done imperatively', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.keyCode = 49;
|
||||
expect(keys.keyboardEventMatchesKeys(event, '1')).to.be.equal(true);
|
||||
});
|
||||
|
||||
test('number pad digits can be done imperatively', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
event.keyCode = 97;
|
||||
expect(keys.keyboardEventMatchesKeys(event, '1')).to.be.equal(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('combo keys', function() {
|
||||
setup(function() {
|
||||
keys = fixture('ComboKeys');
|
||||
});
|
||||
|
||||
test('trigger the handler when the combo is pressed', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
|
||||
event.ctrlKey = true;
|
||||
event.shiftKey = true;
|
||||
event.keyCode = event.code = 65;
|
||||
|
||||
keys.dispatchEvent(event);
|
||||
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
});
|
||||
|
||||
test('check if KeyBoardEvent.key is alpha-numberic', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
|
||||
event.ctrlKey = true;
|
||||
event.shiftKey = true;
|
||||
event.key = 'å';
|
||||
event.keyCode = event.code = 65;
|
||||
|
||||
keys.dispatchEvent(event);
|
||||
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
});
|
||||
|
||||
test('trigger also bindings without modifiers', function() {
|
||||
var event = new CustomEvent('keydown');
|
||||
// Combo `shift+enter`.
|
||||
event.shiftKey = true;
|
||||
event.keyCode = event.code = 13;
|
||||
keys.dispatchEvent(event);
|
||||
expect(keys.keyCount).to.be.equal(2);
|
||||
});
|
||||
|
||||
test('give precendence to combos with modifiers', function() {
|
||||
var enterSpy = sinon.spy(keys, '_keyHandler2');
|
||||
var shiftEnterSpy = sinon.spy(keys, '_keyHandler');
|
||||
var event = new CustomEvent('keydown');
|
||||
// Combo `shift+enter`.
|
||||
event.shiftKey = true;
|
||||
event.keyCode = event.code = 13;
|
||||
keys.dispatchEvent(event);
|
||||
expect(enterSpy.called).to.be.true;
|
||||
expect(shiftEnterSpy.called).to.be.true;
|
||||
expect(enterSpy.calledAfter(shiftEnterSpy)).to.be.true;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('alternative event keys', function() {
|
||||
setup(function() {
|
||||
keys = fixture('AlternativeEventKeys');
|
||||
});
|
||||
|
||||
test('trigger on the specified alternative keyboard event', function() {
|
||||
MockInteractions.keyDownOn(keys, 32);
|
||||
|
||||
expect(keys.keyCount).to.be.equal(0);
|
||||
|
||||
MockInteractions.keyUpOn(keys, 32);
|
||||
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
});
|
||||
});
|
||||
|
||||
suite('behavior keys', function() {
|
||||
setup(function() {
|
||||
keys = fixture('BehaviorKeys');
|
||||
});
|
||||
|
||||
test('bindings in other behaviors are transitive', function() {
|
||||
MockInteractions.pressEnter(keys);
|
||||
expect(keys.keyCount).to.be.equal(2);
|
||||
});
|
||||
});
|
||||
|
||||
suite('stopping propagation automatically', function() {
|
||||
setup(function() {
|
||||
keys = fixture('NonPropagatingKeys');
|
||||
});
|
||||
|
||||
test('does not propagate key events beyond the combo handler', function() {
|
||||
var keySpy = sinon.spy();
|
||||
|
||||
document.addEventListener('keydown', keySpy);
|
||||
|
||||
MockInteractions.pressEnter(keys);
|
||||
|
||||
expect(keySpy.callCount).to.be.equal(0);
|
||||
});
|
||||
});
|
||||
|
||||
suite('prevent default behavior of event', function() {
|
||||
setup(function() {
|
||||
keys = fixture('PreventKeys');
|
||||
});
|
||||
|
||||
test('`defaultPrevented` is correctly set', function() {
|
||||
MockInteractions.pressEnter(keys);
|
||||
expect(keys.lastEvent.defaultPrevented).to.be.equal(true);
|
||||
});
|
||||
|
||||
test('only 1 handler is invoked', function() {
|
||||
var aSpy = sinon.spy(keys, '_keyHandler');
|
||||
var shiftASpy = sinon.spy(keys, '_preventDefaultHandler');
|
||||
var event = new CustomEvent('keydown', {
|
||||
cancelable: true
|
||||
});
|
||||
// Combo `shift+a`.
|
||||
event.shiftKey = true;
|
||||
event.keyCode = event.code = 65;
|
||||
keys.dispatchEvent(event);
|
||||
|
||||
expect(keys.keyCount).to.be.equal(1);
|
||||
expect(shiftASpy.called).to.be.true;
|
||||
expect(aSpy.called).to.be.false;
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
28
react-app/bower_components/iron-a11y-keys-behavior/test/index.html
vendored
Executable file
28
react-app/bower_components/iron-a11y-keys-behavior/test/index.html
vendored
Executable file
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><!DOCTYPE html><html><head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
<title>Tests</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
// Load and run all tests (.html, .js) as one suite:
|
||||
WCT.loadSuites([
|
||||
'basic-test.html',
|
||||
'basic-test.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
</body></html>
|
42
react-app/bower_components/iron-behaviors/.bower.json
vendored
Normal file
42
react-app/bower_components/iron-behaviors/.bower.json
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"name": "iron-behaviors",
|
||||
"version": "1.0.13",
|
||||
"description": "Provides a set of behaviors for the iron elements",
|
||||
"private": true,
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-behaviors.git"
|
||||
},
|
||||
"main": [
|
||||
"iron-button-state.html",
|
||||
"iron-control-state.html"
|
||||
],
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.2.0",
|
||||
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
||||
"paper-input": "polymerelements/paper-input#^1.0.0",
|
||||
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||
"_release": "1.0.13",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.13",
|
||||
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-behaviors"
|
||||
}
|
1
react-app/bower_components/iron-behaviors/.gitignore
vendored
Normal file
1
react-app/bower_components/iron-behaviors/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bower_components
|
25
react-app/bower_components/iron-behaviors/.travis.yml
vendored
Normal file
25
react-app/bower_components/iron-behaviors/.travis.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: ZOqj2XVNVwfT74rHxg/ljcAsS6FnmDpRSsXbsy1Icv9DcLHrMlmyQ10gWBjE/YXYF0Uv4akQ1qqn0TJaKOtp9HZeH+P6OPAYk2vJbWD7qp52pPtIqEFomcsUyflt4IjfaXKuN4FMod7PSWVSGJ+DxSguJvZKILkrs5d/rJdFv3c=
|
||||
- secure: clkqemGQG16TXyAPkv9LBv6x3SbT3ZM0eo8LETx4uNKi3WzlwgXxZA9b5Sr5wYzxyxFFpnhDXW7CL4+UjYu1atGNeTW2TuSaYUPHtgu67OFDr8Jbw047p1XQb5enPSt9+YxrHKfjHBiJvWulJ8rCSQshU9Rhe0DC6NrFRPFgk0A=
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
77
react-app/bower_components/iron-behaviors/CONTRIBUTING.md
vendored
Normal file
77
react-app/bower_components/iron-behaviors/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
|
||||
You can however override the jsbin link with one that's customized to this
|
||||
specific element:
|
||||
|
||||
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, fixes #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
22
react-app/bower_components/iron-behaviors/README.md
vendored
Normal file
22
react-app/bower_components/iron-behaviors/README.md
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
<!---
|
||||
|
||||
This README is automatically generated from the comments in these files:
|
||||
iron-button-state.html iron-control-state.html
|
||||
|
||||
Edit those files, and our readme bot will duplicate them over here!
|
||||
Edit this file, and the bot will squash your changes :)
|
||||
|
||||
The bot does some handling of markdown. Please file a bug if it does the wrong
|
||||
thing! https://github.com/PolymerLabs/tedium/issues
|
||||
|
||||
-->
|
||||
|
||||
[](https://travis-ci.org/PolymerElements/iron-behaviors)
|
||||
|
||||
_[Demo and API docs](https://elements.polymer-project.org/elements/iron-behaviors)_
|
||||
|
||||
|
||||
<!-- No docs for Polymer.IronButtonState found. -->
|
||||
|
||||
<!-- No docs for Polymer.IronControlState found. -->
|
32
react-app/bower_components/iron-behaviors/bower.json
vendored
Normal file
32
react-app/bower_components/iron-behaviors/bower.json
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "iron-behaviors",
|
||||
"version": "1.0.13",
|
||||
"description": "Provides a set of behaviors for the iron elements",
|
||||
"private": true,
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-behaviors.git"
|
||||
},
|
||||
"main": [
|
||||
"iron-button-state.html",
|
||||
"iron-control-state.html"
|
||||
],
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.2.0",
|
||||
"iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
||||
"paper-input": "polymerelements/paper-input#^1.0.0",
|
||||
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": []
|
||||
}
|
47
react-app/bower_components/iron-behaviors/demo/index.html
vendored
Normal file
47
react-app/bower_components/iron-behaviors/demo/index.html
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<title>simple-button</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link href="../../paper-styles/demo-pages.html" rel="import">
|
||||
<link href="simple-button.html" rel="import">
|
||||
|
||||
<style>
|
||||
|
||||
.vertical-section {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div class="vertical-section vertical-section-container centered">
|
||||
<h3>Normal</h3>
|
||||
|
||||
<simple-button tabindex="0">Hello World</simple-button>
|
||||
|
||||
<h3>Toggles</h3>
|
||||
|
||||
<simple-button toggles tabindex="0">Hello World</simple-button>
|
||||
|
||||
<h3>Disabled</h3>
|
||||
|
||||
<simple-button disabled tabindex="0">Hello World</simple-button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
70
react-app/bower_components/iron-behaviors/demo/simple-button.html
vendored
Normal file
70
react-app/bower_components/iron-behaviors/demo/simple-button.html
vendored
Normal file
@@ -0,0 +1,70 @@
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-button-state.html">
|
||||
<link rel="import" href="../iron-control-state.html">
|
||||
|
||||
<dom-module id="simple-button">
|
||||
|
||||
<style>
|
||||
|
||||
:host {
|
||||
display: inline-block;
|
||||
background-color: #4285F4;
|
||||
color: #fff;
|
||||
min-height: 8px;
|
||||
min-width: 8px;
|
||||
padding: 16px;
|
||||
text-transform: uppercase;
|
||||
border-radius: 3px;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
:host([disabled]) {
|
||||
opacity: 0.3;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
:host([active]),
|
||||
:host([pressed]) {
|
||||
background-color: #3367D6;
|
||||
box-shadow: inset 0 3px 5px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<template>
|
||||
|
||||
<content></content>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronControlState,
|
||||
Polymer.IronButtonState
|
||||
],
|
||||
|
||||
hostAttributes: {
|
||||
role: 'button'
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</dom-module>
|
||||
|
27
react-app/bower_components/iron-behaviors/index.html
vendored
Normal file
27
react-app/bower_components/iron-behaviors/index.html
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>Iron Behaviors</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page src="iron-button-state.html"></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
228
react-app/bower_components/iron-behaviors/iron-button-state.html
vendored
Normal file
228
react-app/bower_components/iron-behaviors/iron-button-state.html
vendored
Normal file
@@ -0,0 +1,228 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
|
||||
<link rel="import" href="iron-control-state.html">
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* @demo demo/index.html
|
||||
* @polymerBehavior Polymer.IronButtonState
|
||||
*/
|
||||
Polymer.IronButtonStateImpl = {
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* If true, the user is currently holding down the button.
|
||||
*/
|
||||
pressed: {
|
||||
type: Boolean,
|
||||
readOnly: true,
|
||||
value: false,
|
||||
reflectToAttribute: true,
|
||||
observer: '_pressedChanged'
|
||||
},
|
||||
|
||||
/**
|
||||
* If true, the button toggles the active state with each tap or press
|
||||
* of the spacebar.
|
||||
*/
|
||||
toggles: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
reflectToAttribute: true
|
||||
},
|
||||
|
||||
/**
|
||||
* If true, the button is a toggle and is currently in the active state.
|
||||
*/
|
||||
active: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
notify: true,
|
||||
reflectToAttribute: true
|
||||
},
|
||||
|
||||
/**
|
||||
* True if the element is currently being pressed by a "pointer," which
|
||||
* is loosely defined as mouse or touch input (but specifically excluding
|
||||
* keyboard input).
|
||||
*/
|
||||
pointerDown: {
|
||||
type: Boolean,
|
||||
readOnly: true,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* True if the input device that caused the element to receive focus
|
||||
* was a keyboard.
|
||||
*/
|
||||
receivedFocusFromKeyboard: {
|
||||
type: Boolean,
|
||||
readOnly: true
|
||||
},
|
||||
|
||||
/**
|
||||
* The aria attribute to be set if the button is a toggle and in the
|
||||
* active state.
|
||||
*/
|
||||
ariaActiveAttribute: {
|
||||
type: String,
|
||||
value: 'aria-pressed',
|
||||
observer: '_ariaActiveAttributeChanged'
|
||||
}
|
||||
},
|
||||
|
||||
listeners: {
|
||||
down: '_downHandler',
|
||||
up: '_upHandler',
|
||||
tap: '_tapHandler'
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_detectKeyboardFocus(focused)',
|
||||
'_activeChanged(active, ariaActiveAttribute)'
|
||||
],
|
||||
|
||||
keyBindings: {
|
||||
'enter:keydown': '_asyncClick',
|
||||
'space:keydown': '_spaceKeyDownHandler',
|
||||
'space:keyup': '_spaceKeyUpHandler',
|
||||
},
|
||||
|
||||
_mouseEventRe: /^mouse/,
|
||||
|
||||
_tapHandler: function() {
|
||||
if (this.toggles) {
|
||||
// a tap is needed to toggle the active state
|
||||
this._userActivate(!this.active);
|
||||
} else {
|
||||
this.active = false;
|
||||
}
|
||||
},
|
||||
|
||||
_detectKeyboardFocus: function(focused) {
|
||||
this._setReceivedFocusFromKeyboard(!this.pointerDown && focused);
|
||||
},
|
||||
|
||||
// to emulate native checkbox, (de-)activations from a user interaction fire
|
||||
// 'change' events
|
||||
_userActivate: function(active) {
|
||||
if (this.active !== active) {
|
||||
this.active = active;
|
||||
this.fire('change');
|
||||
}
|
||||
},
|
||||
|
||||
_downHandler: function(event) {
|
||||
this._setPointerDown(true);
|
||||
this._setPressed(true);
|
||||
this._setReceivedFocusFromKeyboard(false);
|
||||
},
|
||||
|
||||
_upHandler: function() {
|
||||
this._setPointerDown(false);
|
||||
this._setPressed(false);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {!KeyboardEvent} event .
|
||||
*/
|
||||
_spaceKeyDownHandler: function(event) {
|
||||
var keyboardEvent = event.detail.keyboardEvent;
|
||||
var target = Polymer.dom(keyboardEvent).localTarget;
|
||||
|
||||
// Ignore the event if this is coming from a focused light child, since that
|
||||
// element will deal with it.
|
||||
if (this.isLightDescendant(/** @type {Node} */(target)))
|
||||
return;
|
||||
|
||||
keyboardEvent.preventDefault();
|
||||
keyboardEvent.stopImmediatePropagation();
|
||||
this._setPressed(true);
|
||||
},
|
||||
|
||||
/**
|
||||
* @param {!KeyboardEvent} event .
|
||||
*/
|
||||
_spaceKeyUpHandler: function(event) {
|
||||
var keyboardEvent = event.detail.keyboardEvent;
|
||||
var target = Polymer.dom(keyboardEvent).localTarget;
|
||||
|
||||
// Ignore the event if this is coming from a focused light child, since that
|
||||
// element will deal with it.
|
||||
if (this.isLightDescendant(/** @type {Node} */(target)))
|
||||
return;
|
||||
|
||||
if (this.pressed) {
|
||||
this._asyncClick();
|
||||
}
|
||||
this._setPressed(false);
|
||||
},
|
||||
|
||||
// trigger click asynchronously, the asynchrony is useful to allow one
|
||||
// event handler to unwind before triggering another event
|
||||
_asyncClick: function() {
|
||||
this.async(function() {
|
||||
this.click();
|
||||
}, 1);
|
||||
},
|
||||
|
||||
// any of these changes are considered a change to button state
|
||||
|
||||
_pressedChanged: function(pressed) {
|
||||
this._changedButtonState();
|
||||
},
|
||||
|
||||
_ariaActiveAttributeChanged: function(value, oldValue) {
|
||||
if (oldValue && oldValue != value && this.hasAttribute(oldValue)) {
|
||||
this.removeAttribute(oldValue);
|
||||
}
|
||||
},
|
||||
|
||||
_activeChanged: function(active, ariaActiveAttribute) {
|
||||
if (this.toggles) {
|
||||
this.setAttribute(this.ariaActiveAttribute,
|
||||
active ? 'true' : 'false');
|
||||
} else {
|
||||
this.removeAttribute(this.ariaActiveAttribute);
|
||||
}
|
||||
this._changedButtonState();
|
||||
},
|
||||
|
||||
_controlStateChanged: function() {
|
||||
if (this.disabled) {
|
||||
this._setPressed(false);
|
||||
} else {
|
||||
this._changedButtonState();
|
||||
}
|
||||
},
|
||||
|
||||
// provide hook for follow-on behaviors to react to button-state
|
||||
|
||||
_changedButtonState: function() {
|
||||
if (this._buttonStateChanged) {
|
||||
this._buttonStateChanged(); // abstract
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/** @polymerBehavior */
|
||||
Polymer.IronButtonState = [
|
||||
Polymer.IronA11yKeysBehavior,
|
||||
Polymer.IronButtonStateImpl
|
||||
];
|
||||
|
||||
</script>
|
107
react-app/bower_components/iron-behaviors/iron-control-state.html
vendored
Normal file
107
react-app/bower_components/iron-behaviors/iron-control-state.html
vendored
Normal file
@@ -0,0 +1,107 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* @demo demo/index.html
|
||||
* @polymerBehavior
|
||||
*/
|
||||
Polymer.IronControlState = {
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* If true, the element currently has focus.
|
||||
*/
|
||||
focused: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
notify: true,
|
||||
readOnly: true,
|
||||
reflectToAttribute: true
|
||||
},
|
||||
|
||||
/**
|
||||
* If true, the user cannot interact with this element.
|
||||
*/
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
notify: true,
|
||||
observer: '_disabledChanged',
|
||||
reflectToAttribute: true
|
||||
},
|
||||
|
||||
_oldTabIndex: {
|
||||
type: Number
|
||||
},
|
||||
|
||||
_boundFocusBlurHandler: {
|
||||
type: Function,
|
||||
value: function() {
|
||||
return this._focusBlurHandler.bind(this);
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_changedControlState(focused, disabled)'
|
||||
],
|
||||
|
||||
ready: function() {
|
||||
this.addEventListener('focus', this._boundFocusBlurHandler, true);
|
||||
this.addEventListener('blur', this._boundFocusBlurHandler, true);
|
||||
},
|
||||
|
||||
_focusBlurHandler: function(event) {
|
||||
// NOTE(cdata): if we are in ShadowDOM land, `event.target` will
|
||||
// eventually become `this` due to retargeting; if we are not in
|
||||
// ShadowDOM land, `event.target` will eventually become `this` due
|
||||
// to the second conditional which fires a synthetic event (that is also
|
||||
// handled). In either case, we can disregard `event.path`.
|
||||
|
||||
if (event.target === this) {
|
||||
this._setFocused(event.type === 'focus');
|
||||
} else if (!this.shadowRoot && !this.isLightDescendant(event.target)) {
|
||||
this.fire(event.type, {sourceEvent: event}, {
|
||||
node: this,
|
||||
bubbles: event.bubbles,
|
||||
cancelable: event.cancelable
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
_disabledChanged: function(disabled, old) {
|
||||
this.setAttribute('aria-disabled', disabled ? 'true' : 'false');
|
||||
this.style.pointerEvents = disabled ? 'none' : '';
|
||||
if (disabled) {
|
||||
this._oldTabIndex = this.tabIndex;
|
||||
this.focused = false;
|
||||
this.tabIndex = -1;
|
||||
this.blur();
|
||||
} else if (this._oldTabIndex !== undefined) {
|
||||
this.tabIndex = this._oldTabIndex;
|
||||
}
|
||||
},
|
||||
|
||||
_changedControlState: function() {
|
||||
// _controlStateChanged is abstract, follow-on behaviors may implement it
|
||||
if (this._controlStateChanged) {
|
||||
this._controlStateChanged();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
279
react-app/bower_components/iron-behaviors/test/active-state.html
vendored
Normal file
279
react-app/bower_components/iron-behaviors/test/active-state.html
vendored
Normal file
@@ -0,0 +1,279 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>active-state</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
<link rel="import" href="test-elements.html">
|
||||
<link rel="import" href="../../paper-input/paper-input.html">
|
||||
</head>
|
||||
<body>
|
||||
<test-fixture id="TrivialActiveState">
|
||||
<template>
|
||||
<test-button></test-button>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="ToggleActiveState">
|
||||
<template>
|
||||
<test-button toggles></test-button>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="ButtonWithNativeInput">
|
||||
<template>
|
||||
<test-light-dom><input id="input"></test-light-dom>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="ButtonWithPaperInput">
|
||||
<template>
|
||||
<test-light-dom><paper-input id="input"></paper-input></test-light-dom>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('active-state', function() {
|
||||
var activeTarget;
|
||||
|
||||
setup(function() {
|
||||
activeTarget = fixture('TrivialActiveState');
|
||||
});
|
||||
|
||||
suite('active state with toggles attribute', function() {
|
||||
setup(function() {
|
||||
activeTarget = fixture('ToggleActiveState');
|
||||
});
|
||||
|
||||
suite('when down', function() {
|
||||
test('is pressed', function() {
|
||||
MockInteractions.down(activeTarget);
|
||||
expect(activeTarget.hasAttribute('pressed')).to.be.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
suite('when clicked', function() {
|
||||
test('is activated', function(done) {
|
||||
MockInteractions.downAndUp(activeTarget, function() {
|
||||
try {
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(true);
|
||||
expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true);
|
||||
expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('true');
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
test('is deactivated by a subsequent click', function(done) {
|
||||
MockInteractions.downAndUp(activeTarget, function() {
|
||||
MockInteractions.downAndUp(activeTarget, function() {
|
||||
try {
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(false);
|
||||
expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true);
|
||||
expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('false');
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('the correct aria attribute is set', function(done) {
|
||||
activeTarget.ariaActiveAttribute = 'aria-checked';
|
||||
MockInteractions.downAndUp(activeTarget, function() {
|
||||
try {
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(true);
|
||||
expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(true);
|
||||
expect(activeTarget.getAttribute('aria-checked')).to.be.eql('true');
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
test('the aria attribute is updated correctly', function(done) {
|
||||
activeTarget.ariaActiveAttribute = 'aria-checked';
|
||||
MockInteractions.downAndUp(activeTarget, function() {
|
||||
try {
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(true);
|
||||
expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(true);
|
||||
expect(activeTarget.getAttribute('aria-checked')).to.be.eql('true');
|
||||
|
||||
activeTarget.ariaActiveAttribute = 'aria-pressed';
|
||||
expect(activeTarget.hasAttribute('aria-checked')).to.be.eql(false);
|
||||
expect(activeTarget.hasAttribute('aria-pressed')).to.be.eql(true);
|
||||
expect(activeTarget.getAttribute('aria-pressed')).to.be.eql('true');
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('without toggles attribute', function() {
|
||||
suite('when mouse is down', function() {
|
||||
test('does not get an active attribute', function() {
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(false);
|
||||
MockInteractions.down(activeTarget);
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(false);
|
||||
});
|
||||
});
|
||||
|
||||
suite('when mouse is up', function() {
|
||||
test('does not get an active attribute', function() {
|
||||
MockInteractions.down(activeTarget);
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(false);
|
||||
MockInteractions.up(activeTarget);
|
||||
expect(activeTarget.hasAttribute('active')).to.be.eql(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('when space is pressed', function() {
|
||||
test('triggers a click event', function(done) {
|
||||
activeTarget.addEventListener('click', function() {
|
||||
done();
|
||||
});
|
||||
MockInteractions.pressSpace(activeTarget);
|
||||
});
|
||||
|
||||
test('only triggers click after the key is released', function(done) {
|
||||
var keyupTriggered = false;
|
||||
|
||||
activeTarget.addEventListener('keyup', function() {
|
||||
keyupTriggered = true;
|
||||
});
|
||||
|
||||
activeTarget.addEventListener('click', function() {
|
||||
try {
|
||||
expect(keyupTriggered).to.be.eql(true);
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
|
||||
MockInteractions.pressSpace(activeTarget);
|
||||
});
|
||||
});
|
||||
|
||||
suite('when enter is pressed', function() {
|
||||
test('triggers a click event', function(done) {
|
||||
activeTarget.addEventListener('click', function() {
|
||||
done();
|
||||
});
|
||||
|
||||
MockInteractions.pressEnter(activeTarget);
|
||||
});
|
||||
|
||||
test('only triggers click before the key is released', function(done) {
|
||||
var keyupTriggered = false;
|
||||
|
||||
activeTarget.addEventListener('keyup', function() {
|
||||
keyupTriggered = true;
|
||||
});
|
||||
|
||||
activeTarget.addEventListener('click', function() {
|
||||
try {
|
||||
expect(keyupTriggered).to.be.eql(false);
|
||||
done();
|
||||
} catch (e) {
|
||||
done(e);
|
||||
}
|
||||
});
|
||||
|
||||
MockInteractions.pressEnter(activeTarget);
|
||||
});
|
||||
});
|
||||
|
||||
suite('nested native input inside button', function() {
|
||||
test('space in light child input does not trigger a button click event', function(done) {
|
||||
var item = fixture('ButtonWithNativeInput');
|
||||
var input = item.querySelector('#input');
|
||||
|
||||
var itemClickHandler = sinon.spy();
|
||||
item.addEventListener('click', itemClickHandler);
|
||||
|
||||
input.focus();
|
||||
MockInteractions.pressSpace(input);
|
||||
Polymer.Base.async(function(){
|
||||
expect(itemClickHandler.callCount).to.be.equal(0);
|
||||
done();
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('space in button triggers a button click event', function(done) {
|
||||
var item = fixture('ButtonWithNativeInput');
|
||||
var input = item.querySelector('#input');
|
||||
|
||||
var itemClickHandler = sinon.spy();
|
||||
item.addEventListener('click', itemClickHandler);
|
||||
|
||||
MockInteractions.pressSpace(item);
|
||||
|
||||
Polymer.Base.async(function(){
|
||||
// You need two ticks, one for the MockInteractions event, and one
|
||||
// for the button event.
|
||||
Polymer.Base.async(function(){
|
||||
expect(itemClickHandler.callCount).to.be.equal(1);
|
||||
done();
|
||||
}, 1);
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
|
||||
suite('nested paper-input inside button', function() {
|
||||
test('space in light child input does not trigger a button click event', function(done) {
|
||||
var item = fixture('ButtonWithPaperInput');
|
||||
var input = item.querySelector('#input');
|
||||
|
||||
var itemClickHandler = sinon.spy();
|
||||
item.addEventListener('click', itemClickHandler);
|
||||
|
||||
input.focus();
|
||||
MockInteractions.pressSpace(input);
|
||||
Polymer.Base.async(function(){
|
||||
expect(itemClickHandler.callCount).to.be.equal(0);
|
||||
done();
|
||||
}, 1);
|
||||
});
|
||||
|
||||
test('space in button triggers a button click event', function(done) {
|
||||
var item = fixture('ButtonWithPaperInput');
|
||||
var input = item.querySelector('#input');
|
||||
|
||||
var itemClickHandler = sinon.spy();
|
||||
item.addEventListener('click', itemClickHandler);
|
||||
|
||||
MockInteractions.pressSpace(item);
|
||||
Polymer.Base.async(function(){
|
||||
// You need two ticks, one for the MockInteractions event, and one
|
||||
// for the button event.
|
||||
Polymer.Base.async(function(){
|
||||
expect(itemClickHandler.callCount).to.be.equal(1);
|
||||
done();
|
||||
}, 1);
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
81
react-app/bower_components/iron-behaviors/test/disabled-state.html
vendored
Normal file
81
react-app/bower_components/iron-behaviors/test/disabled-state.html
vendored
Normal file
@@ -0,0 +1,81 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>disabled-state</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="test-elements.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="TrivialDisabledState">
|
||||
<template>
|
||||
<test-control></test-control>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="InitiallyDisabledState">
|
||||
<template>
|
||||
<test-control disabled></test-control>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('disabled-state', function() {
|
||||
var disableTarget;
|
||||
|
||||
suite('a trivial disabled state', function() {
|
||||
setup(function() {
|
||||
disableTarget = fixture('TrivialDisabledState');
|
||||
});
|
||||
|
||||
suite('when disabled is true', function() {
|
||||
test('receives a disabled attribute', function() {
|
||||
disableTarget.disabled = true;
|
||||
expect(disableTarget.hasAttribute('disabled')).to.be.eql(true);
|
||||
});
|
||||
|
||||
test('receives an appropriate aria attribute', function() {
|
||||
disableTarget.disabled = true;
|
||||
expect(disableTarget.getAttribute('aria-disabled')).to.be.eql('true');
|
||||
});
|
||||
});
|
||||
|
||||
suite('when disabled is false', function() {
|
||||
test('loses the disabled attribute', function() {
|
||||
disableTarget.disabled = true;
|
||||
expect(disableTarget.hasAttribute('disabled')).to.be.eql(true);
|
||||
disableTarget.disabled = false;
|
||||
expect(disableTarget.hasAttribute('disabled')).to.be.eql(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('a state with an initially disabled target', function() {
|
||||
setup(function() {
|
||||
disableTarget = fixture('InitiallyDisabledState');
|
||||
});
|
||||
|
||||
test('preserves the disabled attribute on target', function() {
|
||||
expect(disableTarget.hasAttribute('disabled')).to.be.eql(true);
|
||||
expect(disableTarget.disabled).to.be.eql(true);
|
||||
});
|
||||
|
||||
test('adds `aria-disabled` to the target', function() {
|
||||
expect(disableTarget.getAttribute('aria-disabled')).to.be.eql('true');
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
145
react-app/bower_components/iron-behaviors/test/focused-state.html
vendored
Normal file
145
react-app/bower_components/iron-behaviors/test/focused-state.html
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>focused-state</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
<link rel="import" href="test-elements.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="TrivialFocusedState">
|
||||
<template>
|
||||
<test-control tabindex="-1"></test-control>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="NestedFocusedState">
|
||||
<template>
|
||||
<nested-focusable></nested-focusable>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="LightDOM">
|
||||
<template>
|
||||
<test-light-dom>
|
||||
<input id="input">
|
||||
</test-light-dom>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
suite('focused-state', function() {
|
||||
var focusTarget;
|
||||
|
||||
setup(function() {
|
||||
focusTarget = fixture('TrivialFocusedState');
|
||||
});
|
||||
|
||||
suite('when is focused', function() {
|
||||
test('receives a focused attribute', function() {
|
||||
expect(focusTarget.hasAttribute('focused')).to.be.eql(false);
|
||||
MockInteractions.focus(focusTarget);
|
||||
expect(focusTarget.hasAttribute('focused')).to.be.eql(true);
|
||||
});
|
||||
|
||||
test('focused property is true', function() {
|
||||
expect(focusTarget.focused).to.not.be.eql(true);
|
||||
MockInteractions.focus(focusTarget);
|
||||
expect(focusTarget.focused).to.be.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
suite('when is blurred', function() {
|
||||
test('loses the focused attribute', function() {
|
||||
MockInteractions.focus(focusTarget);
|
||||
expect(focusTarget.hasAttribute('focused')).to.be.eql(true);
|
||||
MockInteractions.blur(focusTarget);
|
||||
expect(focusTarget.hasAttribute('focused')).to.be.eql(false);
|
||||
});
|
||||
|
||||
test('focused property is false', function() {
|
||||
MockInteractions.focus(focusTarget);
|
||||
expect(focusTarget.focused).to.be.eql(true);
|
||||
MockInteractions.blur(focusTarget);
|
||||
expect(focusTarget.focused).to.be.eql(false);
|
||||
});
|
||||
});
|
||||
|
||||
suite('when the focused state is disabled', function() {
|
||||
test('will not be focusable', function() {
|
||||
var blurSpy = sinon.spy(focusTarget, 'blur');
|
||||
MockInteractions.focus(focusTarget);
|
||||
focusTarget.disabled = true;
|
||||
expect(focusTarget.getAttribute('tabindex')).to.be.eql('-1');
|
||||
expect(blurSpy.called).to.be.eql(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('nested focusable', function() {
|
||||
var focusable;
|
||||
|
||||
setup(function() {
|
||||
focusable = fixture('NestedFocusedState');
|
||||
});
|
||||
|
||||
test('focus/blur events fired on host element', function() {
|
||||
var nFocusEvents = 0;
|
||||
var nBlurEvents = 0;
|
||||
|
||||
focusable.addEventListener('focus', function() {
|
||||
nFocusEvents += 1;
|
||||
expect(focusable.focused).to.be.equal(true);
|
||||
MockInteractions.blur(focusable.$.input);
|
||||
});
|
||||
focusable.addEventListener('blur', function() {
|
||||
expect(focusable.focused).to.be.equal(false);
|
||||
nBlurEvents += 1;
|
||||
});
|
||||
|
||||
MockInteractions.focus(focusable.$.input);
|
||||
|
||||
expect(nBlurEvents).to.be.greaterThan(0);
|
||||
expect(nFocusEvents).to.be.greaterThan(0);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
suite('elements in the light dom', function() {
|
||||
var lightDOM, input;
|
||||
|
||||
setup(function() {
|
||||
lightDOM = fixture('LightDOM');
|
||||
input = document.querySelector('#input');
|
||||
});
|
||||
|
||||
test('should not fire the focus event', function() {
|
||||
var nFocusEvents = 0;
|
||||
|
||||
lightDOM.addEventListener('focus', function() {
|
||||
nFocusEvents += 1;
|
||||
});
|
||||
|
||||
MockInteractions.focus(input);
|
||||
|
||||
expect(nFocusEvents).to.be.equal(0);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
26
react-app/bower_components/iron-behaviors/test/index.html
vendored
Normal file
26
react-app/bower_components/iron-behaviors/test/index.html
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html><!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><html><head>
|
||||
<meta charset="utf-8">
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'focused-state.html',
|
||||
'active-state.html',
|
||||
'disabled-state.html',
|
||||
'focused-state.html?dom=shadow',
|
||||
'active-state.html?dom=shadow',
|
||||
'disabled-state.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
</body></html>
|
90
react-app/bower_components/iron-behaviors/test/test-elements.html
vendored
Normal file
90
react-app/bower_components/iron-behaviors/test/test-elements.html
vendored
Normal file
@@ -0,0 +1,90 @@
|
||||
<!--
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-control-state.html">
|
||||
<link rel="import" href="../iron-button-state.html">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'test-control',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronControlState
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'test-button',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronControlState,
|
||||
Polymer.IronButtonState
|
||||
],
|
||||
|
||||
_buttonStateChanged: function() {
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<dom-module id="nested-focusable">
|
||||
|
||||
<template>
|
||||
<input id="input">
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'nested-focusable',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronControlState
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<dom-module id="test-light-dom">
|
||||
|
||||
<template>
|
||||
<content select="*"></content>
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'test-light-dom',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronControlState,
|
||||
Polymer.IronButtonState
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
43
react-app/bower_components/iron-checked-element-behavior/.bower.json
vendored
Normal file
43
react-app/bower_components/iron-checked-element-behavior/.bower.json
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
{
|
||||
"name": "iron-checked-element-behavior",
|
||||
"version": "1.0.4",
|
||||
"description": "Implements an element that has a checked attribute and can be added to a form",
|
||||
"authors": "The Polymer Authors",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"iron",
|
||||
"behavior"
|
||||
],
|
||||
"main": "iron-checked-element-behavior.html",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-checked-element-behavior.git"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-checked-element-behavior",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0",
|
||||
"iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
|
||||
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"paper-button": "PolymerElements/paper-button#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"_release": "1.0.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.4",
|
||||
"commit": "cc30263ec2871ae8f8f944948f44299d3f3cdf0d"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-checked-element-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-checked-element-behavior"
|
||||
}
|
1
react-app/bower_components/iron-checked-element-behavior/.gitignore
vendored
Normal file
1
react-app/bower_components/iron-checked-element-behavior/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bower_components
|
22
react-app/bower_components/iron-checked-element-behavior/.travis.yml
vendored
Normal file
22
react-app/bower_components/iron-checked-element-behavior/.travis.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install web-component-tester
|
||||
- npm install bower
|
||||
- 'export PATH=$PWD/node_modules/.bin:$PATH'
|
||||
- bower install
|
||||
env:
|
||||
global:
|
||||
- secure: EJSBYkW/C3ppDTbxHYRzyFPAko5R1ET1LSbdM484/j0OHGLkSIwtKrrZLNz5+QEmKSw79MpLpBoD+SfXuSCn0yKkf6tvK4mt+kRs32vKVfoWrYReVcfth+EWV7QDpTDJw1QEijT1bKUxULhP0OrT2/5vVpKpXX2zczg+VFL7IZuY3y1dsA4qWmWTfMiAk3762dZx47D5qzJ4POHlpG0i/cHH2EgqV8sFXFBctf6EY68GqzStPUuMuea6xX2wMrebg6vqQDfDb1gs8N34gxGE+u8QaqOSniW1Vzdoe1vwOUo4dbJYw3JMYK5Qn2pj3p2E4m9J609JNnBfqjS7mB5KVC7Hf5r9ul3UMsAIlOnlmSqOq1oO22/3regjWHGjlrzCNHzma2SgDhTxGaLDJl1LnsUevbVb6TGloiQPXwum8oa7dvZ1PqspqyqZEb31t/FyUnG+VXnC0YYpdRj3eRGqeoqqaNtad97DrPHP7er9LdvJIKjsXux7gUW4hKWsr+jsU/krdHpTUC8GYWdTF54EcLhxfzNYKL7voTq+xoQ2yxCOSiBmcQCviuQyVvNQyhde/+edAmOt24CLiuSQjHCbEWzBQs9QinUPRekg6+LJ1WaifTIKkhsm04AdaZrs7LR34hF+Mpqp4HHl/AfcbtVeB/W7jUnhJyMFaQDfGkpzSZs=
|
||||
- secure: izhN5Z3WdajR3ois2T55qepsvLwVg/wv8u4kVQ4TqWhUL08tka83m/W+EMzS/tcvfz7J3VkuTFrJ5scYD9kaTVhRo4dv2u+DdbPmTNcf/hmADXLVLxddyueK3bWEcBurg8+rSdqq/RdI+5CPwWeGtQl+lmjRCyBzodIpQ90zJQF4Al7nmmLuEUhiNVjuqQ3VB1pFLYgky4SVM0bfJnoKSDsZ2z9DOOJE34ZUUmcNqVcQoZ5/oM+PWdVDkUqW3vMK1lTMtE/dk6WcSztQwFyoMrW+uzEstPwUsJCyuBEx4KdioXZH3vrlxRApySfHmEf5eVWwE6jyPSHuWj/2D5O4R9LY1dq1Wcoiu3BJj19B4V3s4L2uJF+xL077d4Mna6z9dE4RSRzs8Z8MvSMTgzDkga/A25JI3XxJMJ78WTbkNQ4hVFN2xwcU5cm+fbs3Sr1ZEdFW/MWAPtUQOzscqS5Op7sSLLaiqO+R0zj56H2NA2bl/zCmbZhyLcOPl0oAfJ85bqNxyF8CoO+GZ98UG15ROigC90/HCP7TUHZnQSrGtiFGTiPTBm+VCITYmC5IEyJBTwgqh/ljbDzz4UuSZ3KsldL3MwWnqO3tGr6VvPfqKF6xq0vuyn9P7f9WNAYwZGcRi3AtxtY+znO+IGv2sGmrfo7ZY+U4nceXTEDrG8OY0Jo=
|
||||
node_js: 4
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
72
react-app/bower_components/iron-checked-element-behavior/CONTRIBUTING.md
vendored
Normal file
72
react-app/bower_components/iron-checked-element-behavior/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [http://jsbin.com/cagaye](http://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
25
react-app/bower_components/iron-checked-element-behavior/README.md
vendored
Normal file
25
react-app/bower_components/iron-checked-element-behavior/README.md
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
<!---
|
||||
|
||||
This README is automatically generated from the comments in these files:
|
||||
iron-checked-element-behavior.html
|
||||
|
||||
Edit those files, and our readme bot will duplicate them over here!
|
||||
Edit this file, and the bot will squash your changes :)
|
||||
|
||||
-->
|
||||
|
||||
[](https://travis-ci.org/PolymerElements/iron-checked-element-behavior)
|
||||
|
||||
_[Demo and API Docs](https://elements.polymer-project.org/elements/iron-checked-element-behavior)_
|
||||
|
||||
|
||||
##Polymer.IronCheckedElementBehavior
|
||||
|
||||
|
||||
Use `Polymer.IronCheckedElementBehavior` to implement a custom element
|
||||
that has a `checked` property, which can be used for validation if the
|
||||
element is also `required`. Element instances implementing this behavior
|
||||
will also be registered for use in an `iron-form` element.
|
||||
|
||||
|
34
react-app/bower_components/iron-checked-element-behavior/bower.json
vendored
Normal file
34
react-app/bower_components/iron-checked-element-behavior/bower.json
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"name": "iron-checked-element-behavior",
|
||||
"version": "1.0.4",
|
||||
"description": "Implements an element that has a checked attribute and can be added to a form",
|
||||
"authors": "The Polymer Authors",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"iron",
|
||||
"behavior"
|
||||
],
|
||||
"main": "iron-checked-element-behavior.html",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-checked-element-behavior.git"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-checked-element-behavior",
|
||||
"ignore": [],
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0",
|
||||
"iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
|
||||
"iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "PolymerElements/paper-styles#^1.0.0",
|
||||
"paper-button": "PolymerElements/paper-button#^1.0.0",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "*",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
}
|
||||
}
|
39
react-app/bower_components/iron-checked-element-behavior/demo/index.html
vendored
Normal file
39
react-app/bower_components/iron-checked-element-behavior/demo/index.html
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<title>iron-checked-element-behavior demo</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="simple-checkbox.html">
|
||||
</head>
|
||||
<body unresolved>
|
||||
<div class="horizontal-section-container">
|
||||
<div>
|
||||
<h4>Not required</h4>
|
||||
<div class="horizontal-section">
|
||||
<simple-checkbox></simple-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h4>Required</h4>
|
||||
<div class="horizontal-section">
|
||||
<simple-checkbox required></simple-checkbox>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
64
react-app/bower_components/iron-checked-element-behavior/demo/simple-checkbox.html
vendored
Normal file
64
react-app/bower_components/iron-checked-element-behavior/demo/simple-checkbox.html
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../../paper-button/paper-button.html">
|
||||
<link rel="import" href="../iron-checked-element-behavior.html">
|
||||
|
||||
<dom-module id="simple-checkbox">
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
}
|
||||
|
||||
:host([invalid]) span {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#labelText {
|
||||
display: inline-block;
|
||||
width: 100px;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<input type="checkbox" id="checkbox" on-tap="_onCheckTap">
|
||||
<span id="labelText">{{label}}</span>
|
||||
<paper-button raised on-click="_onClick">validate</paper-button>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
Polymer({
|
||||
|
||||
is: 'simple-checkbox',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronCheckedElementBehavior
|
||||
],
|
||||
|
||||
properties: {
|
||||
label: {
|
||||
type: String,
|
||||
value: 'not validated'
|
||||
}
|
||||
},
|
||||
|
||||
_onCheckTap: function() {
|
||||
this.checked = this.$.checkbox.checked;
|
||||
},
|
||||
|
||||
_onClick: function() {
|
||||
this.validate();
|
||||
this.label = this.invalid ? 'is invalid' : 'is valid';
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</dom-module>
|
30
react-app/bower_components/iron-checked-element-behavior/index.html
vendored
Normal file
30
react-app/bower_components/iron-checked-element-behavior/index.html
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
|
||||
<title>iron-checked-element-behavior</title>
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
120
react-app/bower_components/iron-checked-element-behavior/iron-checked-element-behavior.html
vendored
Normal file
120
react-app/bower_components/iron-checked-element-behavior/iron-checked-element-behavior.html
vendored
Normal file
@@ -0,0 +1,120 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html">
|
||||
<link rel="import" href="../iron-form-element-behavior/iron-form-element-behavior.html">
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
* Use `Polymer.IronCheckedElementBehavior` to implement a custom element
|
||||
* that has a `checked` property, which can be used for validation if the
|
||||
* element is also `required`. Element instances implementing this behavior
|
||||
* will also be registered for use in an `iron-form` element.
|
||||
*
|
||||
* @demo demo/index.html
|
||||
* @polymerBehavior Polymer.IronCheckedElementBehavior
|
||||
*/
|
||||
Polymer.IronCheckedElementBehaviorImpl = {
|
||||
|
||||
properties: {
|
||||
/**
|
||||
* Fired when the checked state changes.
|
||||
*
|
||||
* @event iron-change
|
||||
*/
|
||||
|
||||
/**
|
||||
* Gets or sets the state, `true` is checked and `false` is unchecked.
|
||||
*/
|
||||
checked: {
|
||||
type: Boolean,
|
||||
value: false,
|
||||
reflectToAttribute: true,
|
||||
notify: true,
|
||||
observer: '_checkedChanged'
|
||||
},
|
||||
|
||||
/**
|
||||
* If true, the button toggles the active state with each tap or press
|
||||
* of the spacebar.
|
||||
*/
|
||||
toggles: {
|
||||
type: Boolean,
|
||||
value: true,
|
||||
reflectToAttribute: true
|
||||
},
|
||||
|
||||
/* Overriden from Polymer.IronFormElementBehavior */
|
||||
value: {
|
||||
type: String,
|
||||
value: 'on',
|
||||
observer: '_valueChanged'
|
||||
}
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_requiredChanged(required)'
|
||||
],
|
||||
|
||||
created: function() {
|
||||
// Used by `iron-form` to handle the case that an element with this behavior
|
||||
// doesn't have a role of 'checkbox' or 'radio', but should still only be
|
||||
// included when the form is serialized if `this.checked === true`.
|
||||
this._hasIronCheckedElementBehavior = true;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns false if the element is required and not checked, and true otherwise.
|
||||
* @param {*=} _value Ignored.
|
||||
* @return {boolean} true if `required` is false, or if `required` and `checked` are both true.
|
||||
*/
|
||||
_getValidity: function(_value) {
|
||||
return this.disabled || !this.required || (this.required && this.checked);
|
||||
},
|
||||
|
||||
/**
|
||||
* Update the aria-required label when `required` is changed.
|
||||
*/
|
||||
_requiredChanged: function() {
|
||||
if (this.required) {
|
||||
this.setAttribute('aria-required', 'true');
|
||||
} else {
|
||||
this.removeAttribute('aria-required');
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Fire `iron-changed` when the checked state changes.
|
||||
*/
|
||||
_checkedChanged: function() {
|
||||
this.active = this.checked;
|
||||
this.fire('iron-change');
|
||||
},
|
||||
|
||||
/**
|
||||
* Reset value to 'on' if it is set to `undefined`.
|
||||
*/
|
||||
_valueChanged: function() {
|
||||
if (this.value === undefined || this.value === null) {
|
||||
this.value = 'on';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/** @polymerBehavior Polymer.IronCheckedElementBehavior */
|
||||
Polymer.IronCheckedElementBehavior = [
|
||||
Polymer.IronFormElementBehavior,
|
||||
Polymer.IronValidatableBehavior,
|
||||
Polymer.IronCheckedElementBehaviorImpl
|
||||
];
|
||||
|
||||
</script>
|
152
react-app/bower_components/iron-checked-element-behavior/test/basic.html
vendored
Normal file
152
react-app/bower_components/iron-checked-element-behavior/test/basic.html
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>iron-checked-element-behavior basic tests</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
|
||||
<link href="../../test-fixture/test-fixture.html" rel="import">
|
||||
<link href="../../iron-meta/iron-meta.html" rel="import">
|
||||
<link href="simple-checkbox.html" rel="import">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="basic">
|
||||
<template>
|
||||
<simple-checkbox></simple-checkbox>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="checked">
|
||||
<template>
|
||||
<simple-checkbox checked></simple-checkbox>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="with-value">
|
||||
<template>
|
||||
<simple-checkbox value="batman"></simple-checkbox>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
|
||||
suite('basic', function() {
|
||||
test('can be checked', function() {
|
||||
var c = fixture('basic');
|
||||
assert.isFalse(c.checked);
|
||||
c.checked = true;
|
||||
assert.isTrue(c.checked);
|
||||
});
|
||||
|
||||
test('can be unchecked', function() {
|
||||
var c = fixture('checked');
|
||||
assert.isTrue(c.checked);
|
||||
c.checked = false;
|
||||
assert.isFalse(c.checked);
|
||||
});
|
||||
|
||||
test('invalid if required and not checked', function() {
|
||||
var c = fixture('basic');
|
||||
c.required = true;
|
||||
assert.isFalse(c.checked);
|
||||
assert.isFalse(c.validate());
|
||||
assert.isTrue(c.invalid);
|
||||
});
|
||||
|
||||
test('valid if required and checked', function() {
|
||||
var c = fixture('basic');
|
||||
c.required = true;
|
||||
c.checked = true;
|
||||
assert.isTrue(c.checked);
|
||||
assert.isTrue(c.validate());
|
||||
assert.isFalse(c.invalid);
|
||||
});
|
||||
|
||||
test('valid if not required and not checked', function() {
|
||||
var c = fixture('basic');
|
||||
assert.isFalse(c.checked);
|
||||
assert.isTrue(c.validate());
|
||||
assert.isFalse(c.invalid);
|
||||
});
|
||||
|
||||
test('has a default value of "on", always', function() {
|
||||
var c = fixture('basic');
|
||||
|
||||
assert.isTrue(c.value === 'on');
|
||||
|
||||
c.checked = true;
|
||||
assert.isTrue(c.value === 'on');
|
||||
});
|
||||
|
||||
test('does not stomp over user defined value when checked', function() {
|
||||
var c = fixture('with-value');
|
||||
assert.isTrue(c.value === 'batman');
|
||||
|
||||
c.checked = true;
|
||||
assert.isTrue(c.value === 'batman');
|
||||
});
|
||||
|
||||
test('value returns "on" when no explicit value is specified', function() {
|
||||
var c = fixture('basic');
|
||||
|
||||
assert.equal(c.value, 'on', 'returns "on"');
|
||||
});
|
||||
|
||||
test('value returns the value when an explicit value is set', function() {
|
||||
var c = fixture('basic');
|
||||
|
||||
c.value = 'abc';
|
||||
assert.equal(c.value, 'abc', 'returns "abc"');
|
||||
|
||||
c.value = '123';
|
||||
assert.equal(c.value, '123', 'returns "123"');
|
||||
});
|
||||
|
||||
test('value returns "on" when value is set to undefined', function() {
|
||||
var c = fixture('basic');
|
||||
|
||||
c.value = 'abc';
|
||||
assert.equal(c.value, 'abc', 'returns "abc"');
|
||||
|
||||
c.value = undefined;
|
||||
assert.equal(c.value, 'on', 'returns "on"');
|
||||
});
|
||||
});
|
||||
|
||||
suite('a11y', function() {
|
||||
test('setting `required` sets `aria-required=true`', function() {
|
||||
var c = fixture('basic');
|
||||
c.required = true;
|
||||
assert.equal(c.getAttribute('aria-required'), 'true');
|
||||
c.required = false;
|
||||
assert.isFalse(c.hasAttribute('aria-required'));
|
||||
});
|
||||
|
||||
test('setting `invalid` sets `aria-invalid=true`', function() {
|
||||
var c = fixture('basic');
|
||||
c.invalid = true;
|
||||
assert.equal(c.getAttribute('aria-invalid'), 'true');
|
||||
c.invalid = false;
|
||||
assert.isFalse(c.hasAttribute('aria-invalid'));
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
31
react-app/bower_components/iron-checked-element-behavior/test/index.html
vendored
Normal file
31
react-app/bower_components/iron-checked-element-behavior/test/index.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html><!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><html><head>
|
||||
|
||||
<title>iron-checked-element-behavior tests</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'basic.html',
|
||||
'basic.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
26
react-app/bower_components/iron-checked-element-behavior/test/simple-checkbox.html
vendored
Normal file
26
react-app/bower_components/iron-checked-element-behavior/test/simple-checkbox.html
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-checked-element-behavior.html">
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'simple-checkbox',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronCheckedElementBehavior
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
48
react-app/bower_components/iron-dropdown/.bower.json
vendored
Normal file
48
react-app/bower_components/iron-dropdown/.bower.json
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
"name": "iron-dropdown",
|
||||
"version": "1.3.0",
|
||||
"description": "An unstyled element that works similarly to a native browser select",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"web-component",
|
||||
"polymer"
|
||||
],
|
||||
"main": "iron-dropdown.html",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-dropdown"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-dropdown",
|
||||
"dependencies": {
|
||||
"polymer": "polymer/polymer#^1.0.0",
|
||||
"iron-behaviors": "polymerelements/iron-behaviors#^1.0.0",
|
||||
"iron-overlay-behavior": "polymerelements/iron-overlay-behavior#^1.0.0",
|
||||
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
|
||||
"neon-animation": "polymerelements/neon-animation#^1.0.0",
|
||||
"iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"iron-image": "polymerelements/iron-image#^1.0.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"_release": "1.3.0",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.3.0",
|
||||
"commit": "9d6bb9e7a8150430e61559f5a0827526d2eefaa4"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-dropdown.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-dropdown"
|
||||
}
|
1
react-app/bower_components/iron-dropdown/.gitignore
vendored
Normal file
1
react-app/bower_components/iron-dropdown/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bower_components
|
25
react-app/bower_components/iron-dropdown/.travis.yml
vendored
Normal file
25
react-app/bower_components/iron-dropdown/.travis.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: Nd7sbgkYVekuQRB4K3svNCL3veA6t6aGopNP2FUxlJvQuzRV1vKV67angPvMUAFelEA7/rTzrFPBMfNbsz9C2wInLLLPux4wEk1MQX+2KYZVeXKMHjgl8iQKMXnodaL7XXwBPg0L7053TWtYkIt8wZ/vN0JGPQFKhlQkSrduztkPCJQfkFsMPJ7SudPG3Ld0UPBVxo8TwH/d44p8VhLGiI0oEWw3GnGZZ1T7RJLDAVBwj1BiVHAOaS0SSeOR3ngpZyXbk8OItgzw4o/bbAt2yrHMfwymBy0Xv9v3G0QLFJnMi/gE2lWnN4+IttUPI8gVyr1TuiTgtFxdwteLO3R5iFe+qlQjq0VGssmAHcPwtLhvrT4wEkGMc8ZeyW11z+GdkIw4XHGACWj+9Jz9f19mJd9xU3fkJ+f5mFiB8vEkzjsUI9pswgd3RoHt2WewcVdHnCED2wRdQCw9H34dX7d2ieWKPl/pv+EKZOgEJJ8UNZMyKnj57Y25WRrTpIQBt6p9uVv5MsiZQm7Sd1pYQnJKPQ+BxvvL5fsoT1YkFSjyz9gwijtftXhfL8KLB6i04V3mra3f9d5hc20wAOt+ad+mTOkaM/aGxE/I3Ko13BceMvRSNzuz+N2WE6FEJj1NuOCW/AeSh5/6n9nnlDeu7Nu7VeM9kjk4dyBGNRDWLNcSCEk=
|
||||
- secure: aFsYKL6Sw8/r57wzj3pnzEwBE1mnTajJasHAbXgQMd336S2Sq/f39DCNTXgKBA4AKZGvWKe8w9nzaocQoMa4l9bLWEBJMCMPQFawOhTkuEjsLjpU3g74b46/EhjBP5zixR32xoyF5o9FTzC6UyrDjt2XpKwIQJYxaEfoyIW1vTPdoasWdaG5rXvWFTsmXtaMDpCKFH9aQ1DHn9Sbi9NZlR4izdULsbv9GZwg53xvuH4xYEkGtB29KKy04uK1nJ+9SmRWTAnu4Q/ivYWlbwBArjiYTTi0wclvDNvT1iaFNAaeK2pJea8CnoyJJ0pg9NcuzZtStGUvP00kGUpJQ4lqkr+gBCHDPYtoZ17XCz59cg6LrhG1q//vPi7Yz0xW51GHuwmcVs+PsjmWaRuO/1UFreDCQYf+GU4I1pQZf2q1R4m8noe4i5CcFXLKTrC4udBzPmzVB4As2LsxRc3HCIXmhaMxI8MJwdkQBA22u4vCwU2xpqBawJocj0Gvbeme6wG99PW7+XSkijQDk2cTJ5/CJtY22nAECvn4tve3OVvybSTjQ1yipLxJm/dtjgEXFWtknFZr++tId88wPd3EBtrwEhliD3zD/TyLPO2RPZGuI0i6oD3O89P5d8qp66T/eByDr1IEm0+FIQjgiCEMbhmaIuUKGG2GCfwPglI3uR0kbg0=
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
77
react-app/bower_components/iron-dropdown/CONTRIBUTING.md
vendored
Normal file
77
react-app/bower_components/iron-dropdown/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
|
||||
You can however override the jsbin link with one that's customized to this
|
||||
specific element:
|
||||
|
||||
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, fixes #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
46
react-app/bower_components/iron-dropdown/README.md
vendored
Normal file
46
react-app/bower_components/iron-dropdown/README.md
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
<!---
|
||||
|
||||
This README is automatically generated from the comments in these files:
|
||||
iron-dropdown.html
|
||||
|
||||
Edit those files, and our readme bot will duplicate them over here!
|
||||
Edit this file, and the bot will squash your changes :)
|
||||
|
||||
The bot does some handling of markdown. Please file a bug if it does the wrong
|
||||
thing! https://github.com/PolymerLabs/tedium/issues
|
||||
|
||||
-->
|
||||
|
||||
[](https://travis-ci.org/PolymerElements/iron-dropdown)
|
||||
|
||||
_[Demo and API docs](https://elements.polymer-project.org/elements/iron-dropdown)_
|
||||
|
||||
|
||||
##<iron-dropdown>
|
||||
|
||||
`<iron-dropdown>` is a generalized element that is useful when you have
|
||||
hidden content (`.dropdown-content`) that is revealed due to some change in
|
||||
state that should cause it to do so.
|
||||
|
||||
Note that this is a low-level element intended to be used as part of other
|
||||
composite elements that cause dropdowns to be revealed.
|
||||
|
||||
Examples of elements that might be implemented using an `iron-dropdown`
|
||||
include comboboxes, menubuttons, selects. The list goes on.
|
||||
|
||||
The `<iron-dropdown>` element exposes attributes that allow the position
|
||||
of the `.dropdown-content` relative to the `.dropdown-trigger` to be
|
||||
configured.
|
||||
|
||||
```html
|
||||
<iron-dropdown horizontal-align="right" vertical-align="top">
|
||||
<div class="dropdown-content">Hello!</div>
|
||||
</iron-dropdown>
|
||||
```
|
||||
|
||||
In the above example, the `<div>` with class `.dropdown-content` will be
|
||||
hidden until the dropdown element has `opened` set to true, or when the `open`
|
||||
method is called on the element.
|
||||
|
||||
|
39
react-app/bower_components/iron-dropdown/bower.json
vendored
Normal file
39
react-app/bower_components/iron-dropdown/bower.json
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "iron-dropdown",
|
||||
"version": "1.3.0",
|
||||
"description": "An unstyled element that works similarly to a native browser select",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"web-component",
|
||||
"polymer"
|
||||
],
|
||||
"main": "iron-dropdown.html",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-dropdown"
|
||||
},
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"homepage": "https://github.com/PolymerElements/iron-dropdown",
|
||||
"dependencies": {
|
||||
"polymer": "polymer/polymer#^1.0.0",
|
||||
"iron-behaviors": "polymerelements/iron-behaviors#^1.0.0",
|
||||
"iron-overlay-behavior": "polymerelements/iron-overlay-behavior#^1.0.0",
|
||||
"iron-resizable-behavior": "polymerelements/iron-resizable-behavior#^1.0.0",
|
||||
"neon-animation": "polymerelements/neon-animation#^1.0.0",
|
||||
"iron-a11y-keys-behavior": "polymerelements/iron-a11y-keys-behavior#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "polymerelements/test-fixture#^1.0.0",
|
||||
"iron-test-helpers": "polymerelements/iron-test-helpers#^1.0.0",
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"iron-image": "polymerelements/iron-image#^1.0.0"
|
||||
},
|
||||
"ignore": []
|
||||
}
|
36
react-app/bower_components/iron-dropdown/demo/grow-height-animation.html
vendored
Normal file
36
react-app/bower_components/iron-dropdown/demo/grow-height-animation.html
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../../neon-animation/neon-animation-behavior.html">
|
||||
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'expand-animation',
|
||||
|
||||
behaviors: [
|
||||
Polymer.NeonAnimationBehavior
|
||||
],
|
||||
|
||||
configure: function(config) {
|
||||
var node = config.node;
|
||||
|
||||
var height = node.getBoundingClientRect().height;
|
||||
|
||||
this._effect = new KeyframeEffect(node, [{
|
||||
height: (height / 2) + 'px'
|
||||
}, {
|
||||
height: height + 'px'
|
||||
}], this.timingFromConfig(config));
|
||||
|
||||
return this._effect;
|
||||
}
|
||||
});
|
||||
</script>
|
160
react-app/bower_components/iron-dropdown/demo/index.html
vendored
Normal file
160
react-app/bower_components/iron-dropdown/demo/index.html
vendored
Normal file
@@ -0,0 +1,160 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-dropdown</title>
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../../iron-image/iron-image.html">
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="x-select.html">
|
||||
<style>
|
||||
|
||||
.dropdown-content {
|
||||
background-color: white;
|
||||
line-height: 20px;
|
||||
border-radius: 3px;
|
||||
box-shadow: 0px 2px 6px #ccc;
|
||||
}
|
||||
|
||||
.random-content {
|
||||
padding: 1.5em 2em;
|
||||
max-width: 250px;
|
||||
}
|
||||
|
||||
button {
|
||||
border: 1px solid #ccc;
|
||||
background-color: #eee;
|
||||
padding: 1em;
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button:focus {
|
||||
outline: none;
|
||||
border-color: blue;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
li {
|
||||
display: block;
|
||||
position: relative;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 1em;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
li:not(:last-of-type) {
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
iron-image {
|
||||
padding: 1em;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 2px 6px #ccc;
|
||||
border-radius: 3px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<template is="dom-bind" id="Demo">
|
||||
<div class="vertical-section vertical-section-container ">
|
||||
<h1>iron-dropdown</h1>
|
||||
<p>Examples of vanilla elements.</p>
|
||||
<div>
|
||||
<x-select>
|
||||
<button class="dropdown-trigger">Basic</button>
|
||||
<div class="dropdown-content random-content">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</div>
|
||||
</x-select>
|
||||
<x-select>
|
||||
<button class="dropdown-trigger">Overflowing</button>
|
||||
<div class="dropdown-content random-content">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
<p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?</p>
|
||||
</div>
|
||||
</x-select>
|
||||
<x-select vertical-align="bottom">
|
||||
<button class="dropdown-trigger">Bottom-left Aligned</button>
|
||||
<div class="dropdown-content random-content">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</div>
|
||||
</x-select>
|
||||
<x-select horizontal-align="right" vertical-align="top">
|
||||
<button class="dropdown-trigger">Top-right Aligned</button>
|
||||
<div class="dropdown-content random-content">
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||
</div>
|
||||
</x-select>
|
||||
<x-select horizontal-align="left" vertical-align="top">
|
||||
<button class="dropdown-trigger"> Content</button>
|
||||
<iron-image class="dropdown-content" src="../../iron-image/demo/polymer.svg"></iron-image>
|
||||
</x-select>
|
||||
<x-select horizontal-align="right" vertical-align="top">
|
||||
<button class="dropdown-trigger">Unordered list</button>
|
||||
<ul class="dropdown-content" tabindex="0">
|
||||
<template is="dom-repeat" items="[[dinosaurs]]">
|
||||
<li><a href="javascript:void(0)">[[item]]</a></li>
|
||||
</template>
|
||||
</ul>
|
||||
</x-select>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
Demo.dinosaurs = [
|
||||
'allosaurus',
|
||||
'brontosaurus',
|
||||
'carcharodontosaurus',
|
||||
'diplodocus',
|
||||
'ekrixinatosaurus',
|
||||
'fukuiraptor',
|
||||
'gallimimus',
|
||||
'hadrosaurus',
|
||||
'iguanodon',
|
||||
'jainosaurus',
|
||||
'kritosaurus',
|
||||
'liaoceratops',
|
||||
'megalosaurus',
|
||||
'nemegtosaurus',
|
||||
'ornithomimus',
|
||||
'protoceratops',
|
||||
'quetecsaurus',
|
||||
'rajasaurus',
|
||||
'stegosaurus',
|
||||
'triceratops',
|
||||
'utahraptor',
|
||||
'vulcanodon',
|
||||
'wannanosaurus',
|
||||
'xenoceratops',
|
||||
'yandusaurus',
|
||||
'zephyrosaurus'
|
||||
];
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
80
react-app/bower_components/iron-dropdown/demo/x-select.html
vendored
Normal file
80
react-app/bower_components/iron-dropdown/demo/x-select.html
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../iron-dropdown.html">
|
||||
<link rel="import" href="../../neon-animation/neon-animations.html">
|
||||
<link rel="import" href="grow-height-animation.html">
|
||||
|
||||
<dom-module id="x-select">
|
||||
<style>
|
||||
:host {
|
||||
display: inline-block;
|
||||
margin: 1em;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div on-tap="open">
|
||||
<content select=".dropdown-trigger"></content>
|
||||
</div>
|
||||
<iron-dropdown id="dropdown"
|
||||
vertical-align="[[verticalAlign]]"
|
||||
horizontal-align="[[horizontalAlign]]"
|
||||
disabled="[[disabled]]"
|
||||
open-animation-config="[[openAnimationConfig]]"
|
||||
close-animation-config="[[closeAnimationConfig]]">
|
||||
<content select=".dropdown-content"></content>
|
||||
</iron-dropdown>
|
||||
</template>
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'x-select',
|
||||
|
||||
properties: {
|
||||
verticalAlign: String,
|
||||
horizontalAlign: String,
|
||||
disabled: Boolean,
|
||||
openAnimationConfig: {
|
||||
type: Array,
|
||||
value: function() {
|
||||
return [{
|
||||
name: 'fade-in-animation',
|
||||
timing: {
|
||||
delay: 150,
|
||||
duration: 50
|
||||
}
|
||||
}, {
|
||||
name: 'expand-animation',
|
||||
timing: {
|
||||
delay: 150,
|
||||
duration: 200
|
||||
}
|
||||
}];
|
||||
}
|
||||
},
|
||||
|
||||
closeAnimationConfig: {
|
||||
type: Array,
|
||||
value: function() {
|
||||
return [{
|
||||
name: 'fade-out-animation',
|
||||
timing: {
|
||||
duration: 200
|
||||
}
|
||||
}];
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
open: function() {
|
||||
this.$.dropdown.open();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</dom-module>
|
24
react-app/bower_components/iron-dropdown/index.html
vendored
Normal file
24
react-app/bower_components/iron-dropdown/index.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-dropdown</title>
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
233
react-app/bower_components/iron-dropdown/iron-dropdown-scroll-manager.html
vendored
Normal file
233
react-app/bower_components/iron-dropdown/iron-dropdown-scroll-manager.html
vendored
Normal file
@@ -0,0 +1,233 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* The IronDropdownScrollManager is intended to provide a central source
|
||||
* of authority and control over which elements in a document are currently
|
||||
* allowed to scroll.
|
||||
*/
|
||||
|
||||
Polymer.IronDropdownScrollManager = {
|
||||
|
||||
/**
|
||||
* The current element that defines the DOM boundaries of the
|
||||
* scroll lock. This is always the most recently locking element.
|
||||
*/
|
||||
get currentLockingElement() {
|
||||
return this._lockingElements[this._lockingElements.length - 1];
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Returns true if the provided element is "scroll locked," which is to
|
||||
* say that it cannot be scrolled via pointer or keyboard interactions.
|
||||
*
|
||||
* @param {HTMLElement} element An HTML element instance which may or may
|
||||
* not be scroll locked.
|
||||
*/
|
||||
elementIsScrollLocked: function(element) {
|
||||
var currentLockingElement = this.currentLockingElement;
|
||||
|
||||
if (currentLockingElement === undefined)
|
||||
return false;
|
||||
|
||||
var scrollLocked;
|
||||
|
||||
if (this._hasCachedLockedElement(element)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this._hasCachedUnlockedElement(element)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
scrollLocked = !!currentLockingElement &&
|
||||
currentLockingElement !== element &&
|
||||
!this._composedTreeContains(currentLockingElement, element);
|
||||
|
||||
if (scrollLocked) {
|
||||
this._lockedElementCache.push(element);
|
||||
} else {
|
||||
this._unlockedElementCache.push(element);
|
||||
}
|
||||
|
||||
return scrollLocked;
|
||||
},
|
||||
|
||||
/**
|
||||
* Push an element onto the current scroll lock stack. The most recently
|
||||
* pushed element and its children will be considered scrollable. All
|
||||
* other elements will not be scrollable.
|
||||
*
|
||||
* Scroll locking is implemented as a stack so that cases such as
|
||||
* dropdowns within dropdowns are handled well.
|
||||
*
|
||||
* @param {HTMLElement} element The element that should lock scroll.
|
||||
*/
|
||||
pushScrollLock: function(element) {
|
||||
// Prevent pushing the same element twice
|
||||
if (this._lockingElements.indexOf(element) >= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this._lockingElements.length === 0) {
|
||||
this._lockScrollInteractions();
|
||||
}
|
||||
|
||||
this._lockingElements.push(element);
|
||||
|
||||
this._lockedElementCache = [];
|
||||
this._unlockedElementCache = [];
|
||||
},
|
||||
|
||||
/**
|
||||
* Remove an element from the scroll lock stack. The element being
|
||||
* removed does not need to be the most recently pushed element. However,
|
||||
* the scroll lock constraints only change when the most recently pushed
|
||||
* element is removed.
|
||||
*
|
||||
* @param {HTMLElement} element The element to remove from the scroll
|
||||
* lock stack.
|
||||
*/
|
||||
removeScrollLock: function(element) {
|
||||
var index = this._lockingElements.indexOf(element);
|
||||
|
||||
if (index === -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._lockingElements.splice(index, 1);
|
||||
|
||||
this._lockedElementCache = [];
|
||||
this._unlockedElementCache = [];
|
||||
|
||||
if (this._lockingElements.length === 0) {
|
||||
this._unlockScrollInteractions();
|
||||
}
|
||||
},
|
||||
|
||||
_lockingElements: [],
|
||||
|
||||
_lockedElementCache: null,
|
||||
|
||||
_unlockedElementCache: null,
|
||||
|
||||
_originalBodyStyles: {},
|
||||
|
||||
_isScrollingKeypress: function(event) {
|
||||
return Polymer.IronA11yKeysBehavior.keyboardEventMatchesKeys(
|
||||
event, 'pageup pagedown home end up left down right');
|
||||
},
|
||||
|
||||
_hasCachedLockedElement: function(element) {
|
||||
return this._lockedElementCache.indexOf(element) > -1;
|
||||
},
|
||||
|
||||
_hasCachedUnlockedElement: function(element) {
|
||||
return this._unlockedElementCache.indexOf(element) > -1;
|
||||
},
|
||||
|
||||
_composedTreeContains: function(element, child) {
|
||||
// NOTE(cdata): This method iterates over content elements and their
|
||||
// corresponding distributed nodes to implement a contains-like method
|
||||
// that pierces through the composed tree of the ShadowDOM. Results of
|
||||
// this operation are cached (elsewhere) on a per-scroll-lock basis, to
|
||||
// guard against potentially expensive lookups happening repeatedly as
|
||||
// a user scrolls / touchmoves.
|
||||
var contentElements;
|
||||
var distributedNodes;
|
||||
var contentIndex;
|
||||
var nodeIndex;
|
||||
|
||||
if (element.contains(child)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
contentElements = Polymer.dom(element).querySelectorAll('content');
|
||||
|
||||
for (contentIndex = 0; contentIndex < contentElements.length; ++contentIndex) {
|
||||
|
||||
distributedNodes = Polymer.dom(contentElements[contentIndex]).getDistributedNodes();
|
||||
|
||||
for (nodeIndex = 0; nodeIndex < distributedNodes.length; ++nodeIndex) {
|
||||
|
||||
if (this._composedTreeContains(distributedNodes[nodeIndex], child)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
_scrollInteractionHandler: function(event) {
|
||||
var scrolledElement =
|
||||
/** @type {HTMLElement} */(Polymer.dom(event).rootTarget);
|
||||
if (Polymer
|
||||
.IronDropdownScrollManager
|
||||
.elementIsScrollLocked(scrolledElement)) {
|
||||
if (event.type === 'keydown' &&
|
||||
!Polymer.IronDropdownScrollManager._isScrollingKeypress(event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
event.preventDefault();
|
||||
}
|
||||
},
|
||||
|
||||
_lockScrollInteractions: function() {
|
||||
// Memoize body inline styles:
|
||||
this._originalBodyStyles.overflow = document.body.style.overflow;
|
||||
this._originalBodyStyles.overflowX = document.body.style.overflowX;
|
||||
this._originalBodyStyles.overflowY = document.body.style.overflowY;
|
||||
|
||||
// Disable overflow scrolling on body:
|
||||
// TODO(cdata): It is technically not sufficient to hide overflow on
|
||||
// body alone. A better solution might be to traverse all ancestors of
|
||||
// the current scroll locking element and hide overflow on them. This
|
||||
// becomes expensive, though, as it would have to be redone every time
|
||||
// a new scroll locking element is added.
|
||||
document.body.style.overflow = 'hidden';
|
||||
document.body.style.overflowX = 'hidden';
|
||||
document.body.style.overflowY = 'hidden';
|
||||
|
||||
// Modern `wheel` event for mouse wheel scrolling:
|
||||
document.addEventListener('wheel', this._scrollInteractionHandler, true);
|
||||
// Older, non-standard `mousewheel` event for some FF:
|
||||
document.addEventListener('mousewheel', this._scrollInteractionHandler, true);
|
||||
// IE:
|
||||
document.addEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
|
||||
// Mobile devices can scroll on touch move:
|
||||
document.addEventListener('touchmove', this._scrollInteractionHandler, true);
|
||||
// Capture keydown to prevent scrolling keys (pageup, pagedown etc.)
|
||||
document.addEventListener('keydown', this._scrollInteractionHandler, true);
|
||||
},
|
||||
|
||||
_unlockScrollInteractions: function() {
|
||||
document.body.style.overflow = this._originalBodyStyles.overflow;
|
||||
document.body.style.overflowX = this._originalBodyStyles.overflowX;
|
||||
document.body.style.overflowY = this._originalBodyStyles.overflowY;
|
||||
|
||||
document.removeEventListener('wheel', this._scrollInteractionHandler, true);
|
||||
document.removeEventListener('mousewheel', this._scrollInteractionHandler, true);
|
||||
document.removeEventListener('DOMMouseScroll', this._scrollInteractionHandler, true);
|
||||
document.removeEventListener('touchmove', this._scrollInteractionHandler, true);
|
||||
document.removeEventListener('keydown', this._scrollInteractionHandler, true);
|
||||
}
|
||||
};
|
||||
})();
|
||||
</script>
|
470
react-app/bower_components/iron-dropdown/iron-dropdown.html
vendored
Normal file
470
react-app/bower_components/iron-dropdown/iron-dropdown.html
vendored
Normal file
@@ -0,0 +1,470 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
|
||||
<link rel="import" href="../iron-a11y-keys-behavior/iron-a11y-keys-behavior.html">
|
||||
<link rel="import" href="../iron-behaviors/iron-control-state.html">
|
||||
<link rel="import" href="../iron-overlay-behavior/iron-overlay-behavior.html">
|
||||
<link rel="import" href="../neon-animation/neon-animation-runner-behavior.html">
|
||||
<link rel="import" href="../neon-animation/animations/opaque-animation.html">
|
||||
<link rel="import" href="iron-dropdown-scroll-manager.html">
|
||||
|
||||
<!--
|
||||
`<iron-dropdown>` is a generalized element that is useful when you have
|
||||
hidden content (`.dropdown-content`) that is revealed due to some change in
|
||||
state that should cause it to do so.
|
||||
|
||||
Note that this is a low-level element intended to be used as part of other
|
||||
composite elements that cause dropdowns to be revealed.
|
||||
|
||||
Examples of elements that might be implemented using an `iron-dropdown`
|
||||
include comboboxes, menubuttons, selects. The list goes on.
|
||||
|
||||
The `<iron-dropdown>` element exposes attributes that allow the position
|
||||
of the `.dropdown-content` relative to the `.dropdown-trigger` to be
|
||||
configured.
|
||||
|
||||
<iron-dropdown horizontal-align="right" vertical-align="top">
|
||||
<div class="dropdown-content">Hello!</div>
|
||||
</iron-dropdown>
|
||||
|
||||
In the above example, the `<div>` with class `.dropdown-content` will be
|
||||
hidden until the dropdown element has `opened` set to true, or when the `open`
|
||||
method is called on the element.
|
||||
|
||||
@demo demo/index.html
|
||||
-->
|
||||
|
||||
<dom-module id="iron-dropdown">
|
||||
<style>
|
||||
:host {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
#contentWrapper ::content > * {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#contentWrapper.animating ::content > * {
|
||||
overflow: hidden;
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div id="contentWrapper">
|
||||
<content id="content" select=".dropdown-content"></content>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
Polymer({
|
||||
is: 'iron-dropdown',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronControlState,
|
||||
Polymer.IronA11yKeysBehavior,
|
||||
Polymer.IronOverlayBehavior,
|
||||
Polymer.NeonAnimationRunnerBehavior
|
||||
],
|
||||
|
||||
properties: {
|
||||
/**
|
||||
* The orientation against which to align the dropdown content
|
||||
* horizontally relative to the dropdown trigger.
|
||||
*/
|
||||
horizontalAlign: {
|
||||
type: String,
|
||||
value: 'left',
|
||||
reflectToAttribute: true
|
||||
},
|
||||
|
||||
/**
|
||||
* The orientation against which to align the dropdown content
|
||||
* vertically relative to the dropdown trigger.
|
||||
*/
|
||||
verticalAlign: {
|
||||
type: String,
|
||||
value: 'top',
|
||||
reflectToAttribute: true
|
||||
},
|
||||
|
||||
/**
|
||||
* A pixel value that will be added to the position calculated for the
|
||||
* given `horizontalAlign`, in the direction of alignment. You can think
|
||||
* of it as increasing or decreasing the distance to the side of the
|
||||
* screen given by `horizontalAlign`.
|
||||
*
|
||||
* If `horizontalAlign` is "left", this offset will increase or decrease
|
||||
* the distance to the left side of the screen: a negative offset will
|
||||
* move the dropdown to the left; a positive one, to the right.
|
||||
*
|
||||
* Conversely if `horizontalAlign` is "right", this offset will increase
|
||||
* or decrease the distance to the right side of the screen: a negative
|
||||
* offset will move the dropdown to the right; a positive one, to the left.
|
||||
*/
|
||||
horizontalOffset: {
|
||||
type: Number,
|
||||
value: 0,
|
||||
notify: true
|
||||
},
|
||||
|
||||
/**
|
||||
* A pixel value that will be added to the position calculated for the
|
||||
* given `verticalAlign`, in the direction of alignment. You can think
|
||||
* of it as increasing or decreasing the distance to the side of the
|
||||
* screen given by `verticalAlign`.
|
||||
*
|
||||
* If `verticalAlign` is "top", this offset will increase or decrease
|
||||
* the distance to the top side of the screen: a negative offset will
|
||||
* move the dropdown upwards; a positive one, downwards.
|
||||
*
|
||||
* Conversely if `verticalAlign` is "bottom", this offset will increase
|
||||
* or decrease the distance to the bottom side of the screen: a negative
|
||||
* offset will move the dropdown downwards; a positive one, upwards.
|
||||
*/
|
||||
verticalOffset: {
|
||||
type: Number,
|
||||
value: 0,
|
||||
notify: true
|
||||
},
|
||||
|
||||
/**
|
||||
* The element that should be used to position the dropdown when
|
||||
* it is opened.
|
||||
*/
|
||||
positionTarget: {
|
||||
type: Object
|
||||
},
|
||||
|
||||
/**
|
||||
* An animation config. If provided, this will be used to animate the
|
||||
* opening of the dropdown.
|
||||
*/
|
||||
openAnimationConfig: {
|
||||
type: Object
|
||||
},
|
||||
|
||||
/**
|
||||
* An animation config. If provided, this will be used to animate the
|
||||
* closing of the dropdown.
|
||||
*/
|
||||
closeAnimationConfig: {
|
||||
type: Object
|
||||
},
|
||||
|
||||
/**
|
||||
* If provided, this will be the element that will be focused when
|
||||
* the dropdown opens.
|
||||
*/
|
||||
focusTarget: {
|
||||
type: Object
|
||||
},
|
||||
|
||||
/**
|
||||
* Set to true to disable animations when opening and closing the
|
||||
* dropdown.
|
||||
*/
|
||||
noAnimations: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* By default, the dropdown will constrain scrolling on the page
|
||||
* to itself when opened.
|
||||
* Set to true in order to prevent scroll from being constrained
|
||||
* to the dropdown when it opens.
|
||||
*/
|
||||
allowOutsideScroll: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
},
|
||||
|
||||
listeners: {
|
||||
'neon-animation-finish': '_onNeonAnimationFinish'
|
||||
},
|
||||
|
||||
observers: [
|
||||
'_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)'
|
||||
],
|
||||
|
||||
attached: function() {
|
||||
this.positionTarget = this.positionTarget || this._defaultPositionTarget;
|
||||
// Memoize this to avoid expensive calculations & relayouts.
|
||||
this._isRTL = window.getComputedStyle(this).direction == 'rtl';
|
||||
},
|
||||
|
||||
/**
|
||||
* The element that is contained by the dropdown, if any.
|
||||
*/
|
||||
get containedElement() {
|
||||
return Polymer.dom(this.$.content).getDistributedNodes()[0];
|
||||
},
|
||||
|
||||
/**
|
||||
* The element that should be focused when the dropdown opens.
|
||||
* @deprecated
|
||||
*/
|
||||
get _focusTarget() {
|
||||
return this.focusTarget || this.containedElement;
|
||||
},
|
||||
|
||||
/**
|
||||
* The element that should be used to position the dropdown when
|
||||
* it opens, if no position target is configured.
|
||||
*/
|
||||
get _defaultPositionTarget() {
|
||||
var parent = Polymer.dom(this).parentNode;
|
||||
|
||||
if (parent.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
||||
parent = parent.host;
|
||||
}
|
||||
|
||||
return parent;
|
||||
},
|
||||
|
||||
/**
|
||||
* The horizontal align value, accounting for the RTL/LTR text direction.
|
||||
*/
|
||||
get _localeHorizontalAlign() {
|
||||
// In RTL, "left" becomes "right".
|
||||
if (this._isRTL) {
|
||||
return this.horizontalAlign === 'right' ? 'left' : 'right';
|
||||
} else {
|
||||
return this.horizontalAlign;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* The horizontal offset value used to position the dropdown.
|
||||
* @param {ClientRect} dropdownRect
|
||||
* @param {ClientRect} positionRect
|
||||
* @param {boolean=false} fromRight
|
||||
* @return {number} pixels
|
||||
* @private
|
||||
*/
|
||||
_horizontalAlignTargetValue: function(dropdownRect, positionRect, fromRight) {
|
||||
var target;
|
||||
if (fromRight) {
|
||||
target = document.documentElement.clientWidth - positionRect.right - (this._fitWidth - dropdownRect.right);
|
||||
} else {
|
||||
target = positionRect.left - dropdownRect.left;
|
||||
}
|
||||
target += this.horizontalOffset;
|
||||
|
||||
return Math.max(target, 0);
|
||||
},
|
||||
|
||||
/**
|
||||
* The vertical offset value used to position the dropdown.
|
||||
* @param {ClientRect} dropdownRect
|
||||
* @param {ClientRect} positionRect
|
||||
* @param {boolean=false} fromBottom
|
||||
* @return {number} pixels
|
||||
* @private
|
||||
*/
|
||||
_verticalAlignTargetValue: function(dropdownRect, positionRect, fromBottom) {
|
||||
var target;
|
||||
if (fromBottom) {
|
||||
target = document.documentElement.clientHeight - positionRect.bottom - (this._fitHeight - dropdownRect.bottom);
|
||||
} else {
|
||||
target = positionRect.top - dropdownRect.top;
|
||||
}
|
||||
target += this.verticalOffset;
|
||||
|
||||
return Math.max(target, 0);
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when the value of `opened` changes.
|
||||
*
|
||||
* @param {boolean} opened True if the dropdown is opened.
|
||||
*/
|
||||
_openedChanged: function(opened) {
|
||||
if (opened && this.disabled) {
|
||||
this.cancel();
|
||||
} else {
|
||||
this.cancelAnimation();
|
||||
this.sizingTarget = this.containedElement || this.sizingTarget;
|
||||
this._updateAnimationConfig();
|
||||
Polymer.IronOverlayBehaviorImpl._openedChanged.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Overridden from `IronOverlayBehavior`.
|
||||
*/
|
||||
_renderOpened: function() {
|
||||
if (!this.allowOutsideScroll) {
|
||||
Polymer.IronDropdownScrollManager.pushScrollLock(this);
|
||||
}
|
||||
|
||||
if (!this.noAnimations && this.animationConfig && this.animationConfig.open) {
|
||||
if (this.withBackdrop) {
|
||||
this.backdropElement.open();
|
||||
}
|
||||
this.$.contentWrapper.classList.add('animating');
|
||||
this.playAnimation('open');
|
||||
} else {
|
||||
Polymer.IronOverlayBehaviorImpl._renderOpened.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Overridden from `IronOverlayBehavior`.
|
||||
*/
|
||||
_renderClosed: function() {
|
||||
Polymer.IronDropdownScrollManager.removeScrollLock(this);
|
||||
if (!this.noAnimations && this.animationConfig && this.animationConfig.close) {
|
||||
if (this.withBackdrop) {
|
||||
this.backdropElement.close();
|
||||
}
|
||||
this.$.contentWrapper.classList.add('animating');
|
||||
this.playAnimation('close');
|
||||
} else {
|
||||
Polymer.IronOverlayBehaviorImpl._renderClosed.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Called when animation finishes on the dropdown (when opening or
|
||||
* closing). Responsible for "completing" the process of opening or
|
||||
* closing the dropdown by positioning it or setting its display to
|
||||
* none.
|
||||
*/
|
||||
_onNeonAnimationFinish: function() {
|
||||
this.$.contentWrapper.classList.remove('animating');
|
||||
if (this.opened) {
|
||||
Polymer.IronOverlayBehaviorImpl._finishRenderOpened.apply(this);
|
||||
} else {
|
||||
Polymer.IronOverlayBehaviorImpl._finishRenderClosed.apply(this);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Constructs the final animation config from different properties used
|
||||
* to configure specific parts of the opening and closing animations.
|
||||
*/
|
||||
_updateAnimationConfig: function() {
|
||||
var animationConfig = {};
|
||||
var animations = [];
|
||||
|
||||
if (this.openAnimationConfig) {
|
||||
// NOTE(cdata): When making `display:none` elements visible in Safari,
|
||||
// the element will paint once in a fully visible state, causing the
|
||||
// dropdown to flash before it fades in. We prepend an
|
||||
// `opaque-animation` to fix this problem:
|
||||
animationConfig.open = [{
|
||||
name: 'opaque-animation',
|
||||
}].concat(this.openAnimationConfig);
|
||||
animations = animations.concat(animationConfig.open);
|
||||
}
|
||||
|
||||
if (this.closeAnimationConfig) {
|
||||
animationConfig.close = this.closeAnimationConfig;
|
||||
animations = animations.concat(animationConfig.close);
|
||||
}
|
||||
|
||||
animations.forEach(function(animation) {
|
||||
animation.node = this.containedElement;
|
||||
}, this);
|
||||
|
||||
this.animationConfig = animationConfig;
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the overlay position based on configured horizontal
|
||||
* and vertical alignment.
|
||||
*/
|
||||
_updateOverlayPosition: function() {
|
||||
if (this.isAttached) {
|
||||
// This triggers iron-resize, and iron-overlay-behavior will call refit if needed.
|
||||
this.notifyResize();
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Useful to call this after the element, the window, or the `fitInfo`
|
||||
* element has been resized. Will maintain the scroll position.
|
||||
*/
|
||||
refit: function () {
|
||||
if (!this.opened) {
|
||||
return
|
||||
}
|
||||
var containedElement = this.containedElement;
|
||||
var scrollTop;
|
||||
var scrollLeft;
|
||||
|
||||
if (containedElement) {
|
||||
scrollTop = containedElement.scrollTop;
|
||||
scrollLeft = containedElement.scrollLeft;
|
||||
}
|
||||
Polymer.IronFitBehavior.refit.apply(this, arguments);
|
||||
|
||||
if (containedElement) {
|
||||
containedElement.scrollTop = scrollTop;
|
||||
containedElement.scrollLeft = scrollLeft;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the target element's position and size constraints, and clear
|
||||
* the memoized data.
|
||||
*/
|
||||
resetFit: function() {
|
||||
Polymer.IronFitBehavior.resetFit.apply(this, arguments);
|
||||
|
||||
var hAlign = this._localeHorizontalAlign;
|
||||
var vAlign = this.verticalAlign;
|
||||
// Set to 0, 0 in order to discover any offset caused by parent stacking contexts.
|
||||
this.style[hAlign] = this.style[vAlign] = '0px';
|
||||
|
||||
var dropdownRect = this.getBoundingClientRect();
|
||||
var positionRect = this.positionTarget.getBoundingClientRect();
|
||||
var horizontalValue = this._horizontalAlignTargetValue(dropdownRect, positionRect, hAlign === 'right');
|
||||
var verticalValue = this._verticalAlignTargetValue(dropdownRect, positionRect, vAlign === 'bottom');
|
||||
|
||||
this.style[hAlign] = horizontalValue + 'px';
|
||||
this.style[vAlign] = verticalValue + 'px';
|
||||
},
|
||||
|
||||
/**
|
||||
* Overridden from `IronFitBehavior`.
|
||||
* Ensure positionedBy has correct values for horizontally & vertically.
|
||||
*/
|
||||
_discoverInfo: function() {
|
||||
Polymer.IronFitBehavior._discoverInfo.apply(this, arguments);
|
||||
// Note(valdrin): in Firefox, an element with style `position: fixed; bottom: 90vh; height: 20vh`
|
||||
// would have `getComputedStyle(element).top < 0` (instead of being `auto`) http://jsbin.com/cofired/3/edit?html,output
|
||||
// This would cause IronFitBehavior's `constrain` to wrongly calculate sizes
|
||||
// (it would use `top` instead of `bottom`), so we ensure we give the correct values.
|
||||
this._fitInfo.positionedBy.horizontally = this._localeHorizontalAlign;
|
||||
this._fitInfo.positionedBy.vertically = this.verticalAlign;
|
||||
},
|
||||
|
||||
/**
|
||||
* Apply focus to focusTarget or containedElement
|
||||
*/
|
||||
_applyFocus: function () {
|
||||
var focusTarget = this.focusTarget || this.containedElement;
|
||||
if (focusTarget && this.opened && !this.noAutoFocus) {
|
||||
focusTarget.focus();
|
||||
} else {
|
||||
Polymer.IronOverlayBehaviorImpl._applyFocus.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</dom-module>
|
28
react-app/bower_components/iron-dropdown/test/index.html
vendored
Normal file
28
react-app/bower_components/iron-dropdown/test/index.html
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
<title>iron-dropdown tests</title>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'iron-dropdown.html',
|
||||
'iron-dropdown-scroll-manager.html',
|
||||
'iron-dropdown.html?dom=shadow',
|
||||
'iron-dropdown-scroll-manager.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
152
react-app/bower_components/iron-dropdown/test/iron-dropdown-scroll-manager.html
vendored
Normal file
152
react-app/bower_components/iron-dropdown/test/iron-dropdown-scroll-manager.html
vendored
Normal file
@@ -0,0 +1,152 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>iron-dropdown-scroll-manager tests</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
|
||||
<link rel="import" href="../iron-dropdown-scroll-manager.html">
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
<link rel="import" href="x-scrollable-element.html">
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<test-fixture id="DOMSubtree">
|
||||
<template>
|
||||
<x-scrollable-element id="Parent"></x-scrollable-element>
|
||||
</template>
|
||||
</test-fixture>
|
||||
<script>
|
||||
suite('IronDropdownScrollManager', function() {
|
||||
var parent;
|
||||
var childOne;
|
||||
var childTwo;
|
||||
var grandchildOne;
|
||||
var grandchildTwo;
|
||||
var ancestor;
|
||||
|
||||
setup(function() {
|
||||
parent = fixture('DOMSubtree');
|
||||
childOne = parent.$$('#ChildOne');
|
||||
childTwo = parent.$$('#ChildTwo');
|
||||
grandChildOne = parent.$$('#GrandchildOne');
|
||||
grandChildTwo = parent.$$('#GrandchildTwo');
|
||||
ancestor = document.body;
|
||||
});
|
||||
|
||||
suite('constraining scroll in the DOM', function() {
|
||||
setup(function() {
|
||||
Polymer.IronDropdownScrollManager.pushScrollLock(childOne);
|
||||
});
|
||||
|
||||
teardown(function() {
|
||||
Polymer.IronDropdownScrollManager.removeScrollLock(childOne);
|
||||
});
|
||||
|
||||
test('recognizes sibling as locked', function() {
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(childTwo))
|
||||
.to.be.equal(true);
|
||||
});
|
||||
|
||||
test('recognizes neice as locked', function() {
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(grandChildTwo))
|
||||
.to.be.equal(true);
|
||||
});
|
||||
|
||||
test('recognizes parent as locked', function() {
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(parent))
|
||||
.to.be.equal(true);
|
||||
});
|
||||
|
||||
test('recognizes ancestor as locked', function() {
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(ancestor))
|
||||
.to.be.equal(true);
|
||||
});
|
||||
|
||||
test('recognizes locking child as unlocked', function() {
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(childOne))
|
||||
.to.be.equal(false);
|
||||
});
|
||||
|
||||
test('recognizes descendant of locking child as unlocked', function() {
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(grandChildOne))
|
||||
.to.be.equal(false);
|
||||
});
|
||||
|
||||
test('unlocks locked elements when there are no locking elements', function() {
|
||||
Polymer.IronDropdownScrollManager.removeScrollLock(childOne);
|
||||
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(parent))
|
||||
.to.be.equal(false);
|
||||
});
|
||||
|
||||
test('does not check locked elements when there are no locking elements', function() {
|
||||
sinon.spy(Polymer.IronDropdownScrollManager, 'elementIsScrollLocked');
|
||||
childOne.dispatchEvent(new CustomEvent('wheel', {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}));
|
||||
expect(Polymer.IronDropdownScrollManager
|
||||
.elementIsScrollLocked.callCount).to.be.eql(1);
|
||||
Polymer.IronDropdownScrollManager.removeScrollLock(childOne);
|
||||
childOne.dispatchEvent(new CustomEvent('wheel', {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
}));
|
||||
expect(Polymer.IronDropdownScrollManager
|
||||
.elementIsScrollLocked.callCount).to.be.eql(1);
|
||||
});
|
||||
|
||||
suite('various scroll events', function() {
|
||||
var scrollEvents;
|
||||
var events;
|
||||
|
||||
setup(function() {
|
||||
scrollEvents = [
|
||||
'wheel',
|
||||
'mousewheel',
|
||||
'DOMMouseScroll',
|
||||
'touchmove'
|
||||
];
|
||||
|
||||
events = scrollEvents.map(function(scrollEvent) {
|
||||
return new CustomEvent(scrollEvent, {
|
||||
bubbles: true,
|
||||
cancelable: true
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
test('prevents wheel events from locked elements', function() {
|
||||
events.forEach(function(event) {
|
||||
childTwo.dispatchEvent(event);
|
||||
expect(event.defaultPrevented).to.be.eql(true);
|
||||
});
|
||||
});
|
||||
|
||||
test('allows wheel events from unlocked elements', function() {
|
||||
events.forEach(function(event) {
|
||||
childOne.dispatchEvent(event);
|
||||
expect(event.defaultPrevented).to.be.eql(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
428
react-app/bower_components/iron-dropdown/test/iron-dropdown.html
vendored
Normal file
428
react-app/bower_components/iron-dropdown/test/iron-dropdown.html
vendored
Normal file
@@ -0,0 +1,428 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>iron-dropdown basic tests</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<script src="../../test-fixture/test-fixture-mocha.js"></script>
|
||||
<script src="../../iron-test-helpers/mock-interactions.js"></script>
|
||||
|
||||
<link rel="import" href="../iron-dropdown.html">
|
||||
<link rel="import" href="../../test-fixture/test-fixture.html">
|
||||
|
||||
</head>
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: block;
|
||||
position: relative;
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: yellow;
|
||||
}
|
||||
|
||||
.positioned {
|
||||
position: absolute;
|
||||
top: 40px;
|
||||
left: 40px;
|
||||
}
|
||||
|
||||
.dropdown-content {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
.full-screen {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
|
||||
<test-fixture id="TrivialDropdown">
|
||||
<template>
|
||||
<iron-dropdown>
|
||||
<div class="dropdown-content"></div>
|
||||
</iron-dropdown>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="NonLockingDropdown">
|
||||
<template>
|
||||
<iron-dropdown allow-outside-scroll>
|
||||
<div class="dropdown-content">I don't lock scroll!</div>
|
||||
</iron-dropdown>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="AlignedDropdown">
|
||||
<template>
|
||||
<div class="container">
|
||||
<iron-dropdown horizontal-align="right" vertical-align="top">
|
||||
<div class="dropdown-content full-screen"></div>
|
||||
</iron-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<!-- Absolutely position the dropdown so that it has enough space to move around -->
|
||||
<test-fixture id="OffsetDropdownTopLeft">
|
||||
<template>
|
||||
<div class="container positioned">
|
||||
<iron-dropdown>
|
||||
<div class="dropdown-content"></div>
|
||||
</iron-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="OffsetDropdownBottomRight">
|
||||
<template>
|
||||
<div class="container positioned">
|
||||
<iron-dropdown horizontal-align="right" vertical-align="bottom">
|
||||
<div class="dropdown-content"></div>
|
||||
</iron-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="FocusableContentDropdown">
|
||||
<template>
|
||||
<iron-dropdown>
|
||||
<div class="dropdown-content" tabindex="0">
|
||||
<div class="subcontent" tabindex="0"></div>
|
||||
</div>
|
||||
</iron-dropdown>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="RTLDropdownLeft">
|
||||
<template>
|
||||
<div dir="rtl" class="container">
|
||||
<iron-dropdown>
|
||||
<div class="dropdown-content"></div>
|
||||
</iron-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="RTLDropdownRight">
|
||||
<template>
|
||||
<div dir="rtl" class="container">
|
||||
<iron-dropdown horizontal-align="right">
|
||||
<div class="dropdown-content"></div>
|
||||
</iron-dropdown>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<script>
|
||||
function elementIsVisible(element) {
|
||||
var contentRect = element.getBoundingClientRect();
|
||||
var computedStyle = window.getComputedStyle(element);
|
||||
|
||||
return computedStyle.display !== 'none' &&
|
||||
contentRect.width > 0 &&
|
||||
contentRect.height > 0;
|
||||
}
|
||||
|
||||
function runAfterOpen(overlay, cb) {
|
||||
overlay.addEventListener('iron-overlay-opened', function () {
|
||||
Polymer.Base.async(cb, 1);
|
||||
});
|
||||
overlay.open();
|
||||
}
|
||||
|
||||
suite('<iron-dropdown>', function() {
|
||||
var dropdown;
|
||||
var content;
|
||||
|
||||
suite('basic', function() {
|
||||
setup(function() {
|
||||
dropdown = fixture('TrivialDropdown');
|
||||
content = Polymer.dom(dropdown).querySelector('.dropdown-content');
|
||||
});
|
||||
|
||||
test('effectively hides the dropdown content', function() {
|
||||
expect(elementIsVisible(content)).to.be.equal(false);
|
||||
});
|
||||
|
||||
test('shows dropdown content when opened', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
expect(elementIsVisible(content)).to.be.equal(true);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('hides dropdown content when outside is clicked', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
expect(elementIsVisible(content)).to.be.equal(true);
|
||||
MockInteractions.tap(dropdown.parentNode);
|
||||
Polymer.Base.async(function() {
|
||||
expect(elementIsVisible(content)).to.be.equal(false);
|
||||
done();
|
||||
}, 10);
|
||||
});
|
||||
});
|
||||
|
||||
suite('when content is focusable', function() {
|
||||
setup(function() {
|
||||
dropdown = fixture('FocusableContentDropdown');
|
||||
content = Polymer.dom(dropdown).querySelector('.dropdown-content');
|
||||
});
|
||||
test('focuses the content when opened', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
expect(document.activeElement).to.be.equal(content);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('focuses a configured focus target', function(done) {
|
||||
var focusableChild = Polymer.dom(content).querySelector('div[tabindex]');
|
||||
dropdown.focusTarget = focusableChild;
|
||||
|
||||
runAfterOpen(dropdown, function () {
|
||||
expect(document.activeElement).to.not.be.equal(content);
|
||||
expect(document.activeElement).to.be.equal(focusableChild);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('locking scroll', function() {
|
||||
var dropdown;
|
||||
|
||||
setup(function() {
|
||||
dropdown = fixture('TrivialDropdown');
|
||||
});
|
||||
|
||||
test('should lock, only once', function(done) {
|
||||
var openCount = 0;
|
||||
runAfterOpen(dropdown, function() {
|
||||
expect(Polymer.IronDropdownScrollManager._lockingElements.length)
|
||||
.to.be.equal(1);
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(document.body))
|
||||
.to.be.equal(true);
|
||||
|
||||
if(openCount === 0) {
|
||||
// This triggers a second `pushScrollLock` with the same element, however
|
||||
// that should not add the element to the `_lockingElements` stack twice
|
||||
dropdown.close();
|
||||
dropdown.open();
|
||||
} else {
|
||||
done();
|
||||
}
|
||||
openCount++;
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('non locking scroll', function() {
|
||||
var dropdown;
|
||||
|
||||
setup(function() {
|
||||
dropdown = fixture('NonLockingDropdown');
|
||||
});
|
||||
|
||||
test('can be disabled with `allowOutsideScroll`', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
expect(Polymer.IronDropdownScrollManager.elementIsScrollLocked(document.body))
|
||||
.to.be.equal(false);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('aligned dropdown', function() {
|
||||
var parent;
|
||||
setup(function() {
|
||||
parent = fixture('AlignedDropdown');
|
||||
dropdown = parent.querySelector('iron-dropdown');
|
||||
});
|
||||
|
||||
test('can be re-aligned to the right and the top', function(done) {
|
||||
var parentRect;
|
||||
var dropdownRect;
|
||||
|
||||
runAfterOpen(dropdown, function () {
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
parentRect = parent.getBoundingClientRect();
|
||||
assert.equal(dropdownRect.top, parentRect.top, 'top ok');
|
||||
assert.equal(dropdownRect.left, 0, 'left ok');
|
||||
assert.equal(dropdownRect.bottom, document.documentElement.clientHeight, 'bottom ok');
|
||||
assert.equal(dropdownRect.right, parentRect.right, 'right ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('can be re-aligned to the bottom', function(done) {
|
||||
var parentRect;
|
||||
var dropdownRect;
|
||||
|
||||
dropdown.verticalAlign = 'bottom';
|
||||
runAfterOpen(dropdown, function () {
|
||||
parentRect = parent.getBoundingClientRect();
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
assert.equal(dropdownRect.top, 0, 'top ok');
|
||||
assert.equal(dropdownRect.left, 0, 'left ok');
|
||||
assert.equal(dropdownRect.bottom, parentRect.bottom, 'bottom ok');
|
||||
assert.equal(dropdownRect.right, parentRect.right, 'right ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('handles parent\'s stacking context', function(done) {
|
||||
var parentRect;
|
||||
var dropdownRect;
|
||||
// This will create a new stacking context.
|
||||
parent.style.transform = 'translateZ(0)';
|
||||
runAfterOpen(dropdown, function () {
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
parentRect = parent.getBoundingClientRect();
|
||||
assert.equal(dropdownRect.top, parentRect.top, 'top ok');
|
||||
assert.equal(dropdownRect.left, 0, 'left ok');
|
||||
assert.equal(dropdownRect.bottom, document.documentElement.clientHeight, 'bottom ok');
|
||||
assert.equal(dropdownRect.right, parentRect.right, 'right ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('when align is left/top, with an offset', function() {
|
||||
var dropdownRect;
|
||||
var offsetDropdownRect;
|
||||
var dropdown;
|
||||
setup(function() {
|
||||
var parent = fixture('OffsetDropdownTopLeft');
|
||||
dropdown = parent.querySelector('iron-dropdown');
|
||||
});
|
||||
|
||||
test('can be offset towards the bottom right', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
dropdown.verticalOffset = 10;
|
||||
dropdown.horizontalOffset = 10;
|
||||
offsetDropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
// verticalAlign is top, so a positive offset moves down.
|
||||
assert.equal(dropdownRect.top + 10, offsetDropdownRect.top, 'top ok');
|
||||
// horizontalAlign is left, so a positive offset moves to the right.
|
||||
assert.equal(dropdownRect.left + 10, offsetDropdownRect.left, 'left ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('can be offset towards the top left', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
dropdown.verticalOffset = -10;
|
||||
dropdown.horizontalOffset = -10;
|
||||
offsetDropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
// verticalAlign is top, so a negative offset moves up.
|
||||
assert.equal(dropdownRect.top - 10, offsetDropdownRect.top, 'top ok');
|
||||
// horizontalAlign is left, so a negative offset moves to the left.
|
||||
assert.equal(dropdownRect.left - 10, offsetDropdownRect.left, 'left ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('when align is right/bottom, with an offset', function() {
|
||||
var dropdownRect;
|
||||
var offsetDropdownRect;
|
||||
var dropdown;
|
||||
setup(function() {
|
||||
var parent = fixture('OffsetDropdownBottomRight');
|
||||
dropdown = parent.querySelector('iron-dropdown');
|
||||
});
|
||||
|
||||
test('can be offset towards the top left', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
dropdown.verticalOffset = 10;
|
||||
dropdown.horizontalOffset = 10;
|
||||
offsetDropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
// verticalAlign is bottom, so a positive offset moves up.
|
||||
assert.equal(dropdownRect.bottom - 10, offsetDropdownRect.bottom, 'bottom ok');
|
||||
// horizontalAlign is right, so a positive offset moves to the left.
|
||||
assert.equal(dropdownRect.right - 10, offsetDropdownRect.right, 'right ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('can be offset towards the bottom right', function(done) {
|
||||
runAfterOpen(dropdown, function () {
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
dropdown.verticalOffset = -10;
|
||||
dropdown.horizontalOffset = -10;
|
||||
offsetDropdownRect = dropdown.getBoundingClientRect();
|
||||
|
||||
// verticalAlign is bottom, so a negative offset moves down.
|
||||
assert.equal(dropdownRect.bottom + 10, offsetDropdownRect.bottom, 'bottom ok');
|
||||
// horizontalAlign is right, so a positive offset moves to the right.
|
||||
assert.equal(dropdownRect.right + 10, offsetDropdownRect.right, 'right ok');
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
suite('RTL', function() {
|
||||
var dropdown;
|
||||
var dropdownRect;
|
||||
|
||||
test('with horizontalAlign=left', function(done) {
|
||||
var parent = fixture('RTLDropdownLeft');
|
||||
dropdown = parent.querySelector('iron-dropdown');
|
||||
runAfterOpen(dropdown, function () {
|
||||
// In RTL, if `horizontalAlign` is "left", that's the same as
|
||||
// being right-aligned in LTR. So the dropdown should be in the top
|
||||
// right corner.
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
expect(dropdownRect.top).to.be.equal(0);
|
||||
expect(dropdownRect.right).to.be.equal(100);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
test('with horizontalAlign=right', function(done) {
|
||||
var parent = fixture('RTLDropdownRight');
|
||||
dropdown = parent.querySelector('iron-dropdown');
|
||||
runAfterOpen(dropdown, function () {
|
||||
// In RTL, if `horizontalAlign` is "right", that's the same as
|
||||
// being left-aligned in LTR. So the dropdown should be in the top
|
||||
// left corner.
|
||||
dropdownRect = dropdown.getBoundingClientRect();
|
||||
expect(dropdownRect.top).to.be.equal(0);
|
||||
expect(dropdownRect.left).to.be.equal(0);
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
27
react-app/bower_components/iron-dropdown/test/x-scrollable-element.html
vendored
Normal file
27
react-app/bower_components/iron-dropdown/test/x-scrollable-element.html
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
|
||||
<dom-module id="x-scrollable-element">
|
||||
<template>
|
||||
<div id="ChildOne">
|
||||
<div id="GrandchildOne"></div>
|
||||
</div>
|
||||
<div id="ChildTwo">
|
||||
<div id="GrandchildTwo"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
Polymer({
|
||||
is: 'x-scrollable-element'
|
||||
});
|
||||
</script>
|
||||
</dom-module>
|
41
react-app/bower_components/iron-fit-behavior/.bower.json
vendored
Normal file
41
react-app/bower_components/iron-fit-behavior/.bower.json
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "iron-fit-behavior",
|
||||
"version": "1.0.6",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Fits an element inside another element",
|
||||
"private": true,
|
||||
"main": "iron-fit-behavior.html",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"behavior"
|
||||
],
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-fit-behavior.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/PolymerElements/iron-fit-behavior",
|
||||
"_release": "1.0.6",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.0.6",
|
||||
"commit": "f2e868af4fad643ffb7fea3501e1429acc4ec0f0"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-fit-behavior.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-fit-behavior"
|
||||
}
|
1
react-app/bower_components/iron-fit-behavior/.gitignore
vendored
Normal file
1
react-app/bower_components/iron-fit-behavior/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
bower_components
|
25
react-app/bower_components/iron-fit-behavior/.travis.yml
vendored
Normal file
25
react-app/bower_components/iron-fit-behavior/.travis.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: QL2j7nfSA/40iIPMKLMosv9hj8q7eGBbPQXVQmCL3uXD5qoMPTqo1qronKKX+bi3Rh7W104ufV4CzzbWvBwQh8gipx+4REGijzc77Fro2y3v3/wUp9H/UEWnbhAWPDsqEoAD8xQXFHkVv7874/VwOlubQyXDGlvqh0fzYbUNUQo=
|
||||
- secure: ajBo8YcSzi4kNuCHcmajCirWQKf5Mj4OZ3tQjNAcJJAy0UtyrAgTenayWN2ijKqD5V8wfTK66jUXGYMZkoJV4EpknrUliqRgRqKHHfULXYWRSC7lDGxf835ReFxstkPun4HmNtxraAWJgmgFz7mylntTVKm46Ce4INj3n8reWaY=
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
77
react-app/bower_components/iron-fit-behavior/CONTRIBUTING.md
vendored
Normal file
77
react-app/bower_components/iron-fit-behavior/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
|
||||
You can however override the jsbin link with one that's customized to this
|
||||
specific element:
|
||||
|
||||
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, fixes #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
36
react-app/bower_components/iron-fit-behavior/README.md
vendored
Normal file
36
react-app/bower_components/iron-fit-behavior/README.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
|
||||
<!---
|
||||
|
||||
This README is automatically generated from the comments in these files:
|
||||
iron-fit-behavior.html
|
||||
|
||||
Edit those files, and our readme bot will duplicate them over here!
|
||||
Edit this file, and the bot will squash your changes :)
|
||||
|
||||
The bot does some handling of markdown. Please file a bug if it does the wrong
|
||||
thing! https://github.com/PolymerLabs/tedium/issues
|
||||
|
||||
-->
|
||||
|
||||
[](https://travis-ci.org/PolymerElements/iron-fit-behavior)
|
||||
|
||||
_[Demo and API docs](https://elements.polymer-project.org/elements/iron-fit-behavior)_
|
||||
|
||||
|
||||
##Polymer.IronFitBehavior
|
||||
|
||||
Polymer.IronFitBehavior fits an element in another element using `max-height` and `max-width`, and
|
||||
optionally centers it in the window or another element.
|
||||
|
||||
The element will only be sized and/or positioned if it has not already been sized and/or positioned
|
||||
by CSS.
|
||||
|
||||
| CSS properties | Action |
|
||||
| --- | --- |
|
||||
| `position` set | Element is not centered horizontally or vertically |
|
||||
| `top` or `bottom` set | Element is not vertically centered |
|
||||
| `left` or `right` set | Element is not horizontally centered |
|
||||
| `max-height` or `height` set | Element respects `max-height` or `height` |
|
||||
| `max-width` or `width` set | Element respects `max-width` or `width` |
|
||||
|
||||
|
31
react-app/bower_components/iron-fit-behavior/bower.json
vendored
Normal file
31
react-app/bower_components/iron-fit-behavior/bower.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "iron-fit-behavior",
|
||||
"version": "1.0.6",
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"description": "Fits an element inside another element",
|
||||
"private": true,
|
||||
"main": "iron-fit-behavior.html",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"behavior"
|
||||
],
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-fit-behavior.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"paper-styles": "polymerelements/paper-styles#^1.0.2",
|
||||
"iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"web-component-tester": "^4.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||
},
|
||||
"ignore": []
|
||||
}
|
43
react-app/bower_components/iron-fit-behavior/demo/index.html
vendored
Normal file
43
react-app/bower_components/iron-fit-behavior/demo/index.html
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-fit-behavior demo</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link href="../../paper-styles/demo-pages.html" rel="import">
|
||||
<link rel="import" href="simple-fit.html">
|
||||
|
||||
<style>
|
||||
|
||||
.sized {
|
||||
max-width: 50%;
|
||||
max-height: 50%;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body unresolved>
|
||||
|
||||
<simple-fit id="myFit" auto-fit-on-attach class="sized" onclick="myFit.refit()">
|
||||
Centered in window.<br><br>
|
||||
Resize the window and click here to refit.
|
||||
</simple-fit>
|
||||
|
||||
</body>
|
||||
</html>
|
51
react-app/bower_components/iron-fit-behavior/demo/simple-fit.html
vendored
Normal file
51
react-app/bower_components/iron-fit-behavior/demo/simple-fit.html
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-fit-behavior.html">
|
||||
<link rel="import" href="../../paper-styles/color.html">
|
||||
<link rel="import" href="../../iron-flex-layout/iron-flex-layout.html">
|
||||
|
||||
<dom-module id="simple-fit">
|
||||
|
||||
<style>
|
||||
:host {
|
||||
@apply(--layout);
|
||||
|
||||
background-color: var(--paper-light-blue-500);
|
||||
color: white;
|
||||
text-align: center;
|
||||
|
||||
align-items:center;
|
||||
-webkit-align-items: center;
|
||||
|
||||
justify-content:center;
|
||||
-webkit-justify-content:center;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<content></content>
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'simple-fit',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronFitBehavior
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
30
react-app/bower_components/iron-fit-behavior/index.html
vendored
Normal file
30
react-app/bower_components/iron-fit-behavior/index.html
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
|
||||
|
||||
<title>iron-fit-behavior</title>
|
||||
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
272
react-app/bower_components/iron-fit-behavior/iron-fit-behavior.html
vendored
Normal file
272
react-app/bower_components/iron-fit-behavior/iron-fit-behavior.html
vendored
Normal file
@@ -0,0 +1,272 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
|
||||
<script>
|
||||
|
||||
/**
|
||||
Polymer.IronFitBehavior fits an element in another element using `max-height` and `max-width`, and
|
||||
optionally centers it in the window or another element.
|
||||
|
||||
The element will only be sized and/or positioned if it has not already been sized and/or positioned
|
||||
by CSS.
|
||||
|
||||
CSS properties | Action
|
||||
-----------------------------|-------------------------------------------
|
||||
`position` set | Element is not centered horizontally or vertically
|
||||
`top` or `bottom` set | Element is not vertically centered
|
||||
`left` or `right` set | Element is not horizontally centered
|
||||
`max-height` or `height` set | Element respects `max-height` or `height`
|
||||
`max-width` or `width` set | Element respects `max-width` or `width`
|
||||
|
||||
@demo demo/index.html
|
||||
@polymerBehavior
|
||||
*/
|
||||
|
||||
Polymer.IronFitBehavior = {
|
||||
|
||||
properties: {
|
||||
|
||||
/**
|
||||
* The element that will receive a `max-height`/`width`. By default it is the same as `this`,
|
||||
* but it can be set to a child element. This is useful, for example, for implementing a
|
||||
* scrolling region inside the element.
|
||||
* @type {!Element}
|
||||
*/
|
||||
sizingTarget: {
|
||||
type: Object,
|
||||
value: function() {
|
||||
return this;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* The element to fit `this` into.
|
||||
*/
|
||||
fitInto: {
|
||||
type: Object,
|
||||
value: window
|
||||
},
|
||||
|
||||
/**
|
||||
* Set to true to auto-fit on attach.
|
||||
*/
|
||||
autoFitOnAttach: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/** @type {?Object} */
|
||||
_fitInfo: {
|
||||
type: Object
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
get _fitWidth() {
|
||||
var fitWidth;
|
||||
if (this.fitInto === window) {
|
||||
fitWidth = this.fitInto.innerWidth;
|
||||
} else {
|
||||
fitWidth = this.fitInto.getBoundingClientRect().width;
|
||||
}
|
||||
return fitWidth;
|
||||
},
|
||||
|
||||
get _fitHeight() {
|
||||
var fitHeight;
|
||||
if (this.fitInto === window) {
|
||||
fitHeight = this.fitInto.innerHeight;
|
||||
} else {
|
||||
fitHeight = this.fitInto.getBoundingClientRect().height;
|
||||
}
|
||||
return fitHeight;
|
||||
},
|
||||
|
||||
get _fitLeft() {
|
||||
var fitLeft;
|
||||
if (this.fitInto === window) {
|
||||
fitLeft = 0;
|
||||
} else {
|
||||
fitLeft = this.fitInto.getBoundingClientRect().left;
|
||||
}
|
||||
return fitLeft;
|
||||
},
|
||||
|
||||
get _fitTop() {
|
||||
var fitTop;
|
||||
if (this.fitInto === window) {
|
||||
fitTop = 0;
|
||||
} else {
|
||||
fitTop = this.fitInto.getBoundingClientRect().top;
|
||||
}
|
||||
return fitTop;
|
||||
},
|
||||
|
||||
attached: function() {
|
||||
if (this.autoFitOnAttach) {
|
||||
if (window.getComputedStyle(this).display === 'none') {
|
||||
setTimeout(function() {
|
||||
this.fit();
|
||||
}.bind(this));
|
||||
} else {
|
||||
this.fit();
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Fits and optionally centers the element into the window, or `fitInfo` if specified.
|
||||
*/
|
||||
fit: function() {
|
||||
this._discoverInfo();
|
||||
this.constrain();
|
||||
this.center();
|
||||
},
|
||||
|
||||
/**
|
||||
* Memoize information needed to position and size the target element.
|
||||
*/
|
||||
_discoverInfo: function() {
|
||||
if (this._fitInfo) {
|
||||
return;
|
||||
}
|
||||
var target = window.getComputedStyle(this);
|
||||
var sizer = window.getComputedStyle(this.sizingTarget);
|
||||
this._fitInfo = {
|
||||
inlineStyle: {
|
||||
top: this.style.top || '',
|
||||
left: this.style.left || ''
|
||||
},
|
||||
positionedBy: {
|
||||
vertically: target.top !== 'auto' ? 'top' : (target.bottom !== 'auto' ?
|
||||
'bottom' : null),
|
||||
horizontally: target.left !== 'auto' ? 'left' : (target.right !== 'auto' ?
|
||||
'right' : null),
|
||||
css: target.position
|
||||
},
|
||||
sizedBy: {
|
||||
height: sizer.maxHeight !== 'none',
|
||||
width: sizer.maxWidth !== 'none'
|
||||
},
|
||||
margin: {
|
||||
top: parseInt(target.marginTop, 10) || 0,
|
||||
right: parseInt(target.marginRight, 10) || 0,
|
||||
bottom: parseInt(target.marginBottom, 10) || 0,
|
||||
left: parseInt(target.marginLeft, 10) || 0
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
/**
|
||||
* Resets the target element's position and size constraints, and clear
|
||||
* the memoized data.
|
||||
*/
|
||||
resetFit: function() {
|
||||
if (!this._fitInfo || !this._fitInfo.sizedBy.width) {
|
||||
this.sizingTarget.style.maxWidth = '';
|
||||
}
|
||||
if (!this._fitInfo || !this._fitInfo.sizedBy.height) {
|
||||
this.sizingTarget.style.maxHeight = '';
|
||||
}
|
||||
this.style.top = this._fitInfo ? this._fitInfo.inlineStyle.top : '';
|
||||
this.style.left = this._fitInfo ? this._fitInfo.inlineStyle.left : '';
|
||||
if (this._fitInfo) {
|
||||
this.style.position = this._fitInfo.positionedBy.css;
|
||||
}
|
||||
this._fitInfo = null;
|
||||
},
|
||||
|
||||
/**
|
||||
* Equivalent to calling `resetFit()` and `fit()`. Useful to call this after the element,
|
||||
* the window, or the `fitInfo` element has been resized.
|
||||
*/
|
||||
refit: function() {
|
||||
this.resetFit();
|
||||
this.fit();
|
||||
},
|
||||
|
||||
/**
|
||||
* Constrains the size of the element to the window or `fitInfo` by setting `max-height`
|
||||
* and/or `max-width`.
|
||||
*/
|
||||
constrain: function() {
|
||||
var info = this._fitInfo;
|
||||
// position at (0px, 0px) if not already positioned, so we can measure the natural size.
|
||||
if (!this._fitInfo.positionedBy.vertically) {
|
||||
this.style.top = '0px';
|
||||
}
|
||||
if (!this._fitInfo.positionedBy.horizontally) {
|
||||
this.style.left = '0px';
|
||||
}
|
||||
if (!this._fitInfo.positionedBy.vertically || !this._fitInfo.positionedBy.horizontally) {
|
||||
// need position:fixed to properly size the element
|
||||
this.style.position = 'fixed';
|
||||
}
|
||||
// need border-box for margin/padding
|
||||
this.sizingTarget.style.boxSizing = 'border-box';
|
||||
// constrain the width and height if not already set
|
||||
var rect = this.getBoundingClientRect();
|
||||
if (!info.sizedBy.height) {
|
||||
this._sizeDimension(rect, info.positionedBy.vertically, 'top', 'bottom', 'Height');
|
||||
}
|
||||
if (!info.sizedBy.width) {
|
||||
this._sizeDimension(rect, info.positionedBy.horizontally, 'left', 'right', 'Width');
|
||||
}
|
||||
},
|
||||
|
||||
_sizeDimension: function(rect, positionedBy, start, end, extent) {
|
||||
var info = this._fitInfo;
|
||||
var max = extent === 'Width' ? this._fitWidth : this._fitHeight;
|
||||
var flip = (positionedBy === end);
|
||||
var offset = flip ? max - rect[end] : rect[start];
|
||||
var margin = info.margin[flip ? start : end];
|
||||
var offsetExtent = 'offset' + extent;
|
||||
var sizingOffset = this[offsetExtent] - this.sizingTarget[offsetExtent];
|
||||
this.sizingTarget.style['max' + extent] = (max - margin - offset - sizingOffset) + 'px';
|
||||
},
|
||||
|
||||
/**
|
||||
* Centers horizontally and vertically if not already positioned. This also sets
|
||||
* `position:fixed`.
|
||||
*/
|
||||
center: function() {
|
||||
var positionedBy = this._fitInfo.positionedBy;
|
||||
if (positionedBy.vertically && positionedBy.horizontally) {
|
||||
// Already positioned.
|
||||
return;
|
||||
}
|
||||
// Need position:fixed to center
|
||||
this.style.position = 'fixed';
|
||||
// Take into account the offset caused by parents that create stacking
|
||||
// contexts (e.g. with transform: translate3d). Translate to 0,0 and
|
||||
// measure the bounding rect.
|
||||
if (!positionedBy.vertically) {
|
||||
this.style.top = '0px';
|
||||
}
|
||||
if (!positionedBy.horizontally) {
|
||||
this.style.left = '0px';
|
||||
}
|
||||
// It will take in consideration margins and transforms
|
||||
var rect = this.getBoundingClientRect();
|
||||
if (!positionedBy.vertically) {
|
||||
var top = this._fitTop - rect.top + (this._fitHeight - rect.height) / 2;
|
||||
this.style.top = top + 'px';
|
||||
}
|
||||
if (!positionedBy.horizontally) {
|
||||
var left = this._fitLeft - rect.left + (this._fitWidth - rect.width) / 2;
|
||||
this.style.left = left + 'px';
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
31
react-app/bower_components/iron-fit-behavior/test/index.html
vendored
Normal file
31
react-app/bower_components/iron-fit-behavior/test/index.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html><!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
--><html><head>
|
||||
|
||||
<title>iron-fit-behavior tests</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'iron-fit-behavior.html',
|
||||
'iron-fit-behavior.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</body></html>
|
409
react-app/bower_components/iron-fit-behavior/test/iron-fit-behavior.html
vendored
Normal file
409
react-app/bower_components/iron-fit-behavior/test/iron-fit-behavior.html
vendored
Normal file
@@ -0,0 +1,409 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-fit-behavior tests</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents.js"></script>
|
||||
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
<link rel="import" href="test-fit.html">
|
||||
|
||||
<style>
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.absolute {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.scrolling {
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.sized-x {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.sized-y {
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.sized-xy {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.positioned-left {
|
||||
position: absolute;
|
||||
left: 100px;
|
||||
}
|
||||
|
||||
.positioned-right {
|
||||
position: absolute;
|
||||
right: 100px;
|
||||
}
|
||||
|
||||
.positioned-top {
|
||||
position: absolute;
|
||||
top: 100px;
|
||||
}
|
||||
|
||||
.positioned-bottom {
|
||||
position: absolute;
|
||||
bottom: 100px;
|
||||
}
|
||||
|
||||
.with-max-width {
|
||||
max-width: 500px;
|
||||
}
|
||||
|
||||
.with-max-height {
|
||||
max-height: 500px;
|
||||
}
|
||||
|
||||
.with-margin {
|
||||
margin: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<test-fixture id="absolute">
|
||||
<template>
|
||||
<test-fit auto-fit-on-attach class="absolute">
|
||||
Absolutely positioned
|
||||
</test-fit>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="sized-xy">
|
||||
<template>
|
||||
<test-fit auto-fit-on-attach class="sized-x sized-y">
|
||||
Sized (x/y), auto center/center
|
||||
</test-fit>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="sized-x">
|
||||
<template>
|
||||
<test-fit auto-fit-on-attach class="sized-x">
|
||||
Sized (x), auto center/center
|
||||
</test-fit>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="with-max-width">
|
||||
<template>
|
||||
<div class="constrain" style="position: fixed; top: 20px; left: 100px; width: 50vw; height: 50vh; border: 1px solid black;">
|
||||
<test-fit auto-fit-on-attach class="with-max-width el">
|
||||
with-max-width, auto center/center
|
||||
</test-fit>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="positioned-xy">
|
||||
<template>
|
||||
<test-fit auto-fit-on-attach class="sized-x positioned-left positioned-top">
|
||||
Sized (x/y), positioned/positioned
|
||||
</test-fit>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="inline-positioned-xy">
|
||||
<template>
|
||||
<test-fit auto-fit-on-attach class="sized-x sized-y" style="position:absolute;left:100px;top:100px;">
|
||||
Sized (x/y), positioned/positioned
|
||||
</test-fit>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="sectioned">
|
||||
<template>
|
||||
<test-fit auto-fit-on-attach class="sized-x">
|
||||
<div>
|
||||
Sized (x), auto center/center with scrolling section
|
||||
</div>
|
||||
<div class="internal"></div>
|
||||
</test-fit>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="constrain-target">
|
||||
<template>
|
||||
<div class="constrain" style="position: fixed; top: 20px; left: 100px; width: 50vw; height: 50vh; border: 1px solid black;">
|
||||
<test-fit auto-fit-on-attach class="el sized-xy">
|
||||
<div>
|
||||
Auto center/center to parent element
|
||||
</div>
|
||||
</test-fit>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<test-fixture id="offscreen-container">
|
||||
<template>
|
||||
<div style="position: fixed; top: -1px; left: 0;">
|
||||
<test-fit auto-fit-on-attach class="el sized-x">
|
||||
<div>
|
||||
Sized (x), auto center/center, container is offscreen
|
||||
</div>
|
||||
</test-fit>
|
||||
</div>
|
||||
</template>
|
||||
</test-fixture>
|
||||
|
||||
<template id="ipsum">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
function makeScrolling(el) {
|
||||
el.classList.add('scrolling');
|
||||
var template = document.getElementById('ipsum');
|
||||
for (var i = 0; i < 20; i++) {
|
||||
el.appendChild(template.content.cloneNode(true));
|
||||
}
|
||||
}
|
||||
|
||||
suite('manual positioning', function() {
|
||||
|
||||
test('css positioned element is not re-positioned', function() {
|
||||
var el = fixture('positioned-xy');
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.equal(rect.top, 100, 'top is unset');
|
||||
assert.equal(rect.left, 100, 'left is unset');
|
||||
|
||||
});
|
||||
|
||||
test('inline positioned element is not re-positioned', function() {
|
||||
var el = fixture('inline-positioned-xy');
|
||||
var rect = el.getBoundingClientRect();
|
||||
// need to measure document.body here because mocha sets a min-width on html,body, and
|
||||
// the element is positioned wrt to that by css
|
||||
var bodyRect = document.body.getBoundingClientRect();
|
||||
assert.equal(rect.top, 100, 'top is unset');
|
||||
assert.equal(rect.left, 100, 'left is unset');
|
||||
|
||||
el.refit();
|
||||
|
||||
rect = el.getBoundingClientRect();
|
||||
assert.equal(rect.top, 100, 'top is unset after refit');
|
||||
assert.equal(rect.left, 100, 'left is unset after refit');
|
||||
|
||||
});
|
||||
|
||||
test('position property is preserved after', function() {
|
||||
var el = fixture('absolute');
|
||||
assert.equal(getComputedStyle(el).position, 'absolute', 'position:absolute is preserved');
|
||||
});
|
||||
});
|
||||
|
||||
suite('fit to window', function() {
|
||||
|
||||
test('sized element is centered in viewport', function() {
|
||||
var el = fixture('sized-xy');
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.closeTo(rect.left - (window.innerWidth - rect.right), 0, 5, 'centered horizontally');
|
||||
assert.closeTo(rect.top - (window.innerHeight - rect.bottom), 0, 5, 'centered vertically');
|
||||
});
|
||||
|
||||
test('sized element with margin is centered in viewport', function() {
|
||||
var el = fixture('sized-xy');
|
||||
el.classList.add('with-margin');
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.closeTo(rect.left - (window.innerWidth - rect.right), 0, 5, 'centered horizontally');
|
||||
assert.closeTo(rect.top - (window.innerHeight - rect.bottom), 0, 5, 'centered vertically');
|
||||
});
|
||||
|
||||
test('sized element with transformed parent is centered in viewport', function() {
|
||||
var constrain = fixture('constrain-target');
|
||||
var el = Polymer.dom(constrain).querySelector('.el');
|
||||
var rectBefore = el.getBoundingClientRect();
|
||||
constrain.style.transform = 'translate3d(5px, 5px, 0)';
|
||||
el.center();
|
||||
var rectAfter = el.getBoundingClientRect();
|
||||
assert.equal(rectBefore.top, rectAfter.top, 'top ok');
|
||||
assert.equal(rectBefore.bottom, rectAfter.bottom, 'bottom ok');
|
||||
assert.equal(rectBefore.left, rectAfter.left, 'left ok');
|
||||
assert.equal(rectBefore.right, rectAfter.right, 'right ok');
|
||||
});
|
||||
|
||||
test('scrolling element is centered in viewport', function() {
|
||||
var el = fixture('sized-x');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.closeTo(rect.left - (window.innerWidth - rect.right), 0, 5, 'centered horizontally');
|
||||
assert.closeTo(rect.top - (window.innerHeight - rect.bottom), 0, 5, 'centered vertically');
|
||||
});
|
||||
|
||||
test('scrolling element is constrained to viewport height', function() {
|
||||
var el = fixture('sized-x');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
test('scrolling element with offscreen container is constrained to viewport height', function() {
|
||||
var container = fixture('offscreen-container');
|
||||
var el = Polymer.dom(container).querySelector('.el')
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
test('scrolling element with max-height is centered in viewport', function() {
|
||||
var el = fixture('sized-x');
|
||||
el.classList.add('with-max-height');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.closeTo(rect.left - (window.innerWidth - rect.right), 0, 5, 'centered horizontally');
|
||||
assert.closeTo(rect.top - (window.innerHeight - rect.bottom), 0, 5, 'centered vertically');
|
||||
});
|
||||
|
||||
test('scrolling element with max-height respects max-height', function() {
|
||||
var el = fixture('sized-x');
|
||||
el.classList.add('with-max-height');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= 500, 'height is less than or equal to max-height');
|
||||
});
|
||||
|
||||
test('css positioned, scrolling element is constrained to viewport height (top,left)', function() {
|
||||
var el = fixture('positioned-xy');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight - 100, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
test('css positioned, scrolling element is constrained to viewport height (bottom, right)', function() {
|
||||
var el = fixture('sized-x');
|
||||
el.classList.add('positioned-bottom');
|
||||
el.classList.add('positioned-right');
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight - 100, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
test('sized, scrolling element with margin is centered in viewport', function() {
|
||||
var el = fixture('sized-x');
|
||||
el.classList.add('with-margin');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.closeTo(rect.left - (window.innerWidth - rect.right), 0, 5, 'centered horizontally');
|
||||
assert.closeTo(rect.top - (window.innerHeight - rect.bottom), 0, 5, 'centered vertically');
|
||||
});
|
||||
|
||||
test('sized, scrolling element is constrained to viewport height', function() {
|
||||
var el = fixture('sized-x');
|
||||
el.classList.add('with-margin');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight - 20 * 2, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
test('css positioned, scrolling element with margin is constrained to viewport height (top, left)', function() {
|
||||
var el = fixture('positioned-xy');
|
||||
el.classList.add('with-margin');
|
||||
makeScrolling(el);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight - 100 - 20 * 2, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
test('css positioned, scrolling element with margin is constrained to viewport height (bottom, right)', function() {
|
||||
var el = fixture('sized-x');
|
||||
el.classList.add('positioned-bottom');
|
||||
el.classList.add('positioned-right');
|
||||
el.classList.add('with-margin')
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight - 100 - 20 * 2, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
test('scrolling sizingTarget is constrained to viewport height', function() {
|
||||
el = fixture('sectioned');
|
||||
var internal = Polymer.dom(el).querySelector('.internal');
|
||||
el.sizingTarget = internal;
|
||||
makeScrolling(internal);
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= window.innerHeight, 'height is less than or equal to viewport height');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
suite('fit to element', function() {
|
||||
|
||||
test('element fits in another element', function() {
|
||||
var constrain = fixture('constrain-target');
|
||||
var el = Polymer.dom(constrain).querySelector('.el')
|
||||
makeScrolling(el);
|
||||
el.fitInto = constrain;
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
var crect = constrain.getBoundingClientRect();
|
||||
assert.isTrue(rect.height <= crect.height, 'width is less than or equal to fitInto width');
|
||||
assert.isTrue(rect.height <= crect.height, 'height is less than or equal to fitInto height');
|
||||
});
|
||||
|
||||
test('element centers in another element', function() {
|
||||
var constrain = fixture('constrain-target');
|
||||
var el = Polymer.dom(constrain).querySelector('.el')
|
||||
makeScrolling(el);
|
||||
el.fitInto = constrain;
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
var crect = constrain.getBoundingClientRect();
|
||||
assert.closeTo(rect.left - crect.left - (crect.right - rect.right), 0, 5, 'centered horizontally in fitInto');
|
||||
assert.closeTo(rect.top - crect.top - (crect.bottom - rect.bottom), 0, 5, 'centered vertically in fitInto');
|
||||
});
|
||||
|
||||
test('element with max-width centers in another element', function() {
|
||||
var constrain = fixture('with-max-width');
|
||||
var el = Polymer.dom(constrain).querySelector('.el');
|
||||
el.fitInto = constrain;
|
||||
el.refit();
|
||||
var rect = el.getBoundingClientRect();
|
||||
var crect = constrain.getBoundingClientRect();
|
||||
assert.closeTo(rect.left - crect.left - (crect.right - rect.right), 0, 5, 'centered horizontally in fitInto');
|
||||
assert.closeTo(rect.top - crect.top - (crect.bottom - rect.bottom), 0, 5, 'centered vertically in fitInto');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
42
react-app/bower_components/iron-fit-behavior/test/test-fit.html
vendored
Normal file
42
react-app/bower_components/iron-fit-behavior/test/test-fit.html
vendored
Normal file
@@ -0,0 +1,42 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<link rel="import" href="../../polymer/polymer.html">
|
||||
<link rel="import" href="../iron-fit-behavior.html">
|
||||
|
||||
<dom-module id="test-fit">
|
||||
|
||||
<style>
|
||||
:host {
|
||||
display: block;
|
||||
background: black;
|
||||
color: white;
|
||||
padding: 8px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<template>
|
||||
<content></content>
|
||||
</template>
|
||||
|
||||
</dom-module>
|
||||
|
||||
<script>
|
||||
|
||||
Polymer({
|
||||
|
||||
is: 'test-fit',
|
||||
|
||||
behaviors: [
|
||||
Polymer.IronFitBehavior
|
||||
]
|
||||
|
||||
});
|
||||
|
||||
</script>
|
41
react-app/bower_components/iron-flex-layout/.bower.json
vendored
Normal file
41
react-app/bower_components/iron-flex-layout/.bower.json
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "iron-flex-layout",
|
||||
"version": "1.3.1",
|
||||
"description": "Provide flexbox-based layouts",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"layout"
|
||||
],
|
||||
"main": "iron-flex-layout.html",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-flex-layout.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "^4.0.0"
|
||||
},
|
||||
"ignore": [],
|
||||
"homepage": "https://github.com/PolymerElements/iron-flex-layout",
|
||||
"_release": "1.3.1",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "v1.3.1",
|
||||
"commit": "6d88f29f3a7181daa2a5c7f678de44f0a0e6a717"
|
||||
},
|
||||
"_source": "git://github.com/PolymerElements/iron-flex-layout.git",
|
||||
"_target": "^1.0.0",
|
||||
"_originalSource": "PolymerElements/iron-flex-layout"
|
||||
}
|
2
react-app/bower_components/iron-flex-layout/.gitignore
vendored
Normal file
2
react-app/bower_components/iron-flex-layout/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
bower_components
|
||||
|
25
react-app/bower_components/iron-flex-layout/.travis.yml
vendored
Normal file
25
react-app/bower_components/iron-flex-layout/.travis.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
language: node_js
|
||||
sudo: false
|
||||
before_script:
|
||||
- npm install -g bower polylint web-component-tester
|
||||
- bower install
|
||||
- polylint
|
||||
env:
|
||||
global:
|
||||
- secure: jFaXkmco40NlJT4VyFYM34Zv9D1XVfLXgixobnyHQyJDBKSXrNLcwDuvrGUpJx/pwBCxEhKAbvxeJ+PBMUv8QV08MAdw2S6QOsIe3CUxAehoNoOMJw5duhE8faWlz8qzmCWEowHVFUeVsd0ZUsgOu6RTspj2A51D/CztQuW0Ljw=
|
||||
- secure: fKrO5yMx8kZM1WQ3k0bzo6MCREKGW2WkCl2suDjuEtb1SQ/SaZa9Tun0fcqIHVJqg9+jOS1Romt/+MN27Nc6IT1tv/NdLd+uWjtMA+OzLyv48gzcdu8Ls/TISUGm5Wb7XHkcvMAb1tRoBs5BOvQ/85FilZLEq1km8snG9ZsOOWI=
|
||||
- CXX=g++-4.8
|
||||
node_js: stable
|
||||
addons:
|
||||
firefox: latest
|
||||
apt:
|
||||
sources:
|
||||
- google-chrome
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- google-chrome-stable
|
||||
- g++-4.8
|
||||
sauce_connect: true
|
||||
script:
|
||||
- xvfb-run wct
|
||||
- "if [ \"${TRAVIS_PULL_REQUEST}\" = \"false\" ]; then wct -s 'default'; fi"
|
77
react-app/bower_components/iron-flex-layout/CONTRIBUTING.md
vendored
Normal file
77
react-app/bower_components/iron-flex-layout/CONTRIBUTING.md
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
|
||||
<!--
|
||||
This file is autogenerated based on
|
||||
https://github.com/PolymerElements/ContributionGuide/blob/master/CONTRIBUTING.md
|
||||
|
||||
If you edit that file, it will get updated everywhere else.
|
||||
If you edit this file, your changes will get overridden :)
|
||||
|
||||
You can however override the jsbin link with one that's customized to this
|
||||
specific element:
|
||||
|
||||
jsbin=https://jsbin.com/cagaye/edit?html,output
|
||||
-->
|
||||
# Polymer Elements
|
||||
## Guide for Contributors
|
||||
|
||||
Polymer Elements are built in the open, and the Polymer authors eagerly encourage any and all forms of community contribution. When contributing, please follow these guidelines:
|
||||
|
||||
### Filing Issues
|
||||
|
||||
**If you are filing an issue to request a feature**, please provide a clear description of the feature. It can be helpful to describe answers to the following questions:
|
||||
|
||||
1. **Who will use the feature?** _“As someone filling out a form…”_
|
||||
2. **When will they use the feature?** _“When I enter an invalid value…”_
|
||||
3. **What is the user’s goal?** _“I want to be visually notified that the value needs to be corrected…”_
|
||||
|
||||
**If you are filing an issue to report a bug**, please provide:
|
||||
|
||||
1. **A clear description of the bug and related expectations.** Consider using the following example template for reporting a bug:
|
||||
|
||||
```markdown
|
||||
The `paper-foo` element causes the page to turn pink when clicked.
|
||||
|
||||
## Expected outcome
|
||||
|
||||
The page stays the same color.
|
||||
|
||||
## Actual outcome
|
||||
|
||||
The page turns pink.
|
||||
|
||||
## Steps to reproduce
|
||||
|
||||
1. Put a `paper-foo` element in the page.
|
||||
2. Open the page in a web browser.
|
||||
3. Click the `paper-foo` element.
|
||||
```
|
||||
|
||||
2. **A reduced test case that demonstrates the problem.** If possible, please include the test case as a JSBin. Start with this template to easily import and use relevant Polymer Elements: [https://jsbin.com/cagaye/edit?html,output](https://jsbin.com/cagaye/edit?html,output).
|
||||
|
||||
3. **A list of browsers where the problem occurs.** This can be skipped if the problem is the same across all browsers.
|
||||
|
||||
### Submitting Pull Requests
|
||||
|
||||
**Before creating a pull request**, please ensure that an issue exists for the corresponding change in the pull request that you intend to make. **If an issue does not exist, please create one per the guidelines above**. The goal is to discuss the design and necessity of the proposed change with Polymer authors and community before diving into a pull request.
|
||||
|
||||
When submitting pull requests, please provide:
|
||||
|
||||
1. **A reference to the corresponding issue** or issues that will be closed by the pull request. Please refer to these issues in the pull request description using the following syntax:
|
||||
|
||||
```markdown
|
||||
(For a single issue)
|
||||
Fixes #20
|
||||
|
||||
(For multiple issues)
|
||||
Fixes #32, fixes #40
|
||||
```
|
||||
|
||||
2. **A succinct description of the design** used to fix any related issues. For example:
|
||||
|
||||
```markdown
|
||||
This fixes #20 by removing styles that leaked which would cause the page to turn pink whenever `paper-foo` is clicked.
|
||||
```
|
||||
|
||||
3. **At least one test for each bug fixed or feature added** as part of the pull request. Pull requests that fix bugs or add features without accompanying tests will not be considered.
|
||||
|
||||
If a proposed change contains multiple commits, please [squash commits](https://www.google.com/url?q=http://blog.steveklabnik.com/posts/2012-11-08-how-to-squash-commits-in-a-github-pull-request) to as few as is necessary to succinctly express the change. A Polymer author can help you squash commits, so don’t be afraid to ask us if you need help with that!
|
55
react-app/bower_components/iron-flex-layout/README.md
vendored
Normal file
55
react-app/bower_components/iron-flex-layout/README.md
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
|
||||
<!---
|
||||
|
||||
This README is automatically generated from the comments in these files:
|
||||
iron-flex-layout.html
|
||||
|
||||
Edit those files, and our readme bot will duplicate them over here!
|
||||
Edit this file, and the bot will squash your changes :)
|
||||
|
||||
The bot does some handling of markdown. Please file a bug if it does the wrong
|
||||
thing! https://github.com/PolymerLabs/tedium/issues
|
||||
|
||||
-->
|
||||
|
||||
[](https://travis-ci.org/PolymerElements/iron-flex-layout)
|
||||
|
||||
_[Demo and API docs](https://elements.polymer-project.org/elements/iron-flex-layout)_
|
||||
|
||||
|
||||
##<iron-flex-layout>
|
||||
|
||||
The `<iron-flex-layout>` component provides simple ways to use
|
||||
[CSS flexible box layout](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes),
|
||||
also known as flexbox. This component provides two different ways to use flexbox:
|
||||
|
||||
1. [Layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
|
||||
The layout class stylesheet provides a simple set of class-based flexbox rules, that
|
||||
let you specify layout properties directly in markup. You must include this file
|
||||
in every element that needs to use them.
|
||||
|
||||
Sample use:
|
||||
|
||||
<link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
|
||||
|
||||
<style is="custom-style" include="iron-flex iron-flex-alignment"></style>
|
||||
|
||||
<div class="layout horizontal layout-start">
|
||||
<div>cross axis start alignment</div>
|
||||
</div>
|
||||
|
||||
1. [Custom CSS mixins](https://github.com/PolymerElements/iron-flex-layout/blob/master/iron-flex-layout.html).
|
||||
The mixin stylesheet includes custom CSS mixins that can be applied inside a CSS rule using the `@apply` function.
|
||||
|
||||
|
||||
|
||||
Please note that the old [/deep/ layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/classes)
|
||||
are deprecated, and should not be used. To continue using layout properties
|
||||
directly in markup, please switch to using the new `dom-module`-based
|
||||
[layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
|
||||
Please note that the new version does not use `/deep/`, and therefore requires you
|
||||
to import the `dom-modules` in every element that needs to use them.
|
||||
|
||||
A complete [guide](https://elements.polymer-project.org/guides/flex-layout) to `<iron-flex-layout>` is available.
|
||||
|
||||
|
31
react-app/bower_components/iron-flex-layout/bower.json
vendored
Normal file
31
react-app/bower_components/iron-flex-layout/bower.json
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "iron-flex-layout",
|
||||
"version": "1.3.1",
|
||||
"description": "Provide flexbox-based layouts",
|
||||
"keywords": [
|
||||
"web-components",
|
||||
"polymer",
|
||||
"layout"
|
||||
],
|
||||
"main": "iron-flex-layout.html",
|
||||
"private": true,
|
||||
"license": "http://polymer.github.io/LICENSE.txt",
|
||||
"authors": [
|
||||
"The Polymer Authors"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/PolymerElements/iron-flex-layout.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"polymer": "Polymer/polymer#^1.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"iron-component-page": "polymerelements/iron-component-page#^1.0.0",
|
||||
"iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
|
||||
"test-fixture": "PolymerElements/test-fixture#^1.0.0",
|
||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
|
||||
"web-component-tester": "^4.0.0"
|
||||
},
|
||||
"ignore": []
|
||||
}
|
311
react-app/bower_components/iron-flex-layout/classes/iron-flex-layout.html
vendored
Normal file
311
react-app/bower_components/iron-flex-layout/classes/iron-flex-layout.html
vendored
Normal file
@@ -0,0 +1,311 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="iron-shadow-flex-layout.html">
|
||||
|
||||
<script>
|
||||
console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
/*******************************
|
||||
Flex Layout
|
||||
*******************************/
|
||||
|
||||
.layout.horizontal,
|
||||
.layout.horizontal-reverse,
|
||||
.layout.vertical,
|
||||
.layout.vertical-reverse {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.layout.inline {
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.layout.horizontal {
|
||||
-ms-flex-direction: row;
|
||||
-webkit-flex-direction: row;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.layout.horizontal-reverse {
|
||||
-ms-flex-direction: row-reverse;
|
||||
-webkit-flex-direction: row-reverse;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.layout.vertical {
|
||||
-ms-flex-direction: column;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.layout.vertical-reverse {
|
||||
-ms-flex-direction: column-reverse;
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.layout.wrap {
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.layout.wrap-reverse {
|
||||
-ms-flex-wrap: wrap-reverse;
|
||||
-webkit-flex-wrap: wrap-reverse;
|
||||
flex-wrap: wrap-reverse;
|
||||
}
|
||||
|
||||
.flex-auto {
|
||||
-ms-flex: 1 1 auto;
|
||||
-webkit-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.flex-none {
|
||||
-ms-flex: none;
|
||||
-webkit-flex: none;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
.flex,
|
||||
.flex-1 {
|
||||
-ms-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.flex-2 {
|
||||
-ms-flex: 2;
|
||||
-webkit-flex: 2;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.flex-3 {
|
||||
-ms-flex: 3;
|
||||
-webkit-flex: 3;
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.flex-4 {
|
||||
-ms-flex: 4;
|
||||
-webkit-flex: 4;
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
.flex-5 {
|
||||
-ms-flex: 5;
|
||||
-webkit-flex: 5;
|
||||
flex: 5;
|
||||
}
|
||||
|
||||
.flex-6 {
|
||||
-ms-flex: 6;
|
||||
-webkit-flex: 6;
|
||||
flex: 6;
|
||||
}
|
||||
|
||||
.flex-7 {
|
||||
-ms-flex: 7;
|
||||
-webkit-flex: 7;
|
||||
flex: 7;
|
||||
}
|
||||
|
||||
.flex-8 {
|
||||
-ms-flex: 8;
|
||||
-webkit-flex: 8;
|
||||
flex: 8;
|
||||
}
|
||||
|
||||
.flex-9 {
|
||||
-ms-flex: 9;
|
||||
-webkit-flex: 9;
|
||||
flex: 9;
|
||||
}
|
||||
|
||||
.flex-10 {
|
||||
-ms-flex: 10;
|
||||
-webkit-flex: 10;
|
||||
flex: 10;
|
||||
}
|
||||
|
||||
.flex-11 {
|
||||
-ms-flex: 11;
|
||||
-webkit-flex: 11;
|
||||
flex: 11;
|
||||
}
|
||||
|
||||
.flex-12 {
|
||||
-ms-flex: 12;
|
||||
-webkit-flex: 12;
|
||||
flex: 12;
|
||||
}
|
||||
|
||||
/* alignment in cross axis */
|
||||
|
||||
.layout.start {
|
||||
-ms-flex-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.layout.center,
|
||||
.layout.center-center {
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.layout.end {
|
||||
-ms-flex-align: end;
|
||||
-webkit-align-items: flex-end;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
/* alignment in main axis */
|
||||
|
||||
.layout.start-justified {
|
||||
-ms-flex-pack: start;
|
||||
-webkit-justify-content: flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.layout.center-justified,
|
||||
.layout.center-center {
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.layout.end-justified {
|
||||
-ms-flex-pack: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.layout.around-justified {
|
||||
-ms-flex-pack: around;
|
||||
-webkit-justify-content: space-around;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.layout.justified {
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* self alignment */
|
||||
|
||||
.self-start {
|
||||
-ms-align-self: flex-start;
|
||||
-webkit-align-self: flex-start;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.self-center {
|
||||
-ms-align-self: center;
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.self-end {
|
||||
-ms-align-self: flex-end;
|
||||
-webkit-align-self: flex-end;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.self-stretch {
|
||||
-ms-align-self: stretch;
|
||||
-webkit-align-self: stretch;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
/*******************************
|
||||
Other Layout
|
||||
*******************************/
|
||||
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* IE 10 support for HTML5 hidden attr */
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fit {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body.fullbleed {
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* fixed position */
|
||||
|
||||
.fixed-bottom,
|
||||
.fixed-left,
|
||||
.fixed-right,
|
||||
.fixed-top {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.fixed-top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.fixed-right {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.fixed-bottom {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.fixed-left {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
</style>
|
307
react-app/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
vendored
Normal file
307
react-app/bower_components/iron-flex-layout/classes/iron-shadow-flex-layout.html
vendored
Normal file
@@ -0,0 +1,307 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<script>
|
||||
console.warn('This file is deprecated. Please use `iron-flex-layout/iron-flex-layout-classes.html`, and one of the specific dom-modules instead');
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
/*******************************
|
||||
Flex Layout
|
||||
*******************************/
|
||||
|
||||
html /deep/ .layout.horizontal,
|
||||
html /deep/ .layout.horizontal-reverse,
|
||||
html /deep/ .layout.vertical,
|
||||
html /deep/ .layout.vertical-reverse {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
html /deep/ .layout.inline {
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
html /deep/ .layout.horizontal {
|
||||
-ms-flex-direction: row;
|
||||
-webkit-flex-direction: row;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
html /deep/ .layout.horizontal-reverse {
|
||||
-ms-flex-direction: row-reverse;
|
||||
-webkit-flex-direction: row-reverse;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
html /deep/ .layout.vertical {
|
||||
-ms-flex-direction: column;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
html /deep/ .layout.vertical-reverse {
|
||||
-ms-flex-direction: column-reverse;
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
html /deep/ .layout.wrap {
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
html /deep/ .layout.wrap-reverse {
|
||||
-ms-flex-wrap: wrap-reverse;
|
||||
-webkit-flex-wrap: wrap-reverse;
|
||||
flex-wrap: wrap-reverse;
|
||||
}
|
||||
|
||||
html /deep/ .flex-auto {
|
||||
-ms-flex: 1 1 auto;
|
||||
-webkit-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
html /deep/ .flex-none {
|
||||
-ms-flex: none;
|
||||
-webkit-flex: none;
|
||||
flex: none;
|
||||
}
|
||||
|
||||
html /deep/ .flex,
|
||||
html /deep/ .flex-1 {
|
||||
-ms-flex: 1;
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
html /deep/ .flex-2 {
|
||||
-ms-flex: 2;
|
||||
-webkit-flex: 2;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
html /deep/ .flex-3 {
|
||||
-ms-flex: 3;
|
||||
-webkit-flex: 3;
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
html /deep/ .flex-4 {
|
||||
-ms-flex: 4;
|
||||
-webkit-flex: 4;
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
html /deep/ .flex-5 {
|
||||
-ms-flex: 5;
|
||||
-webkit-flex: 5;
|
||||
flex: 5;
|
||||
}
|
||||
|
||||
html /deep/ .flex-6 {
|
||||
-ms-flex: 6;
|
||||
-webkit-flex: 6;
|
||||
flex: 6;
|
||||
}
|
||||
|
||||
html /deep/ .flex-7 {
|
||||
-ms-flex: 7;
|
||||
-webkit-flex: 7;
|
||||
flex: 7;
|
||||
}
|
||||
|
||||
html /deep/ .flex-8 {
|
||||
-ms-flex: 8;
|
||||
-webkit-flex: 8;
|
||||
flex: 8;
|
||||
}
|
||||
|
||||
html /deep/ .flex-9 {
|
||||
-ms-flex: 9;
|
||||
-webkit-flex: 9;
|
||||
flex: 9;
|
||||
}
|
||||
|
||||
html /deep/ .flex-10 {
|
||||
-ms-flex: 10;
|
||||
-webkit-flex: 10;
|
||||
flex: 10;
|
||||
}
|
||||
|
||||
html /deep/ .flex-11 {
|
||||
-ms-flex: 11;
|
||||
-webkit-flex: 11;
|
||||
flex: 11;
|
||||
}
|
||||
|
||||
html /deep/ .flex-12 {
|
||||
-ms-flex: 12;
|
||||
-webkit-flex: 12;
|
||||
flex: 12;
|
||||
}
|
||||
|
||||
/* alignment in cross axis */
|
||||
|
||||
html /deep/ .layout.start {
|
||||
-ms-flex-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
html /deep/ .layout.center,
|
||||
html /deep/ .layout.center-center {
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
html /deep/ .layout.end {
|
||||
-ms-flex-align: end;
|
||||
-webkit-align-items: flex-end;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
/* alignment in main axis */
|
||||
|
||||
html /deep/ .layout.start-justified {
|
||||
-ms-flex-pack: start;
|
||||
-webkit-justify-content: flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
html /deep/ .layout.center-justified,
|
||||
html /deep/ .layout.center-center {
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
html /deep/ .layout.end-justified {
|
||||
-ms-flex-pack: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
html /deep/ .layout.around-justified {
|
||||
-ms-flex-pack: around;
|
||||
-webkit-justify-content: space-around;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
html /deep/ .layout.justified {
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/* self alignment */
|
||||
|
||||
html /deep/ .self-start {
|
||||
-ms-align-self: flex-start;
|
||||
-webkit-align-self: flex-start;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
html /deep/ .self-center {
|
||||
-ms-align-self: center;
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
html /deep/ .self-end {
|
||||
-ms-align-self: flex-end;
|
||||
-webkit-align-self: flex-end;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
html /deep/ .self-stretch {
|
||||
-ms-align-self: stretch;
|
||||
-webkit-align-self: stretch;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
/*******************************
|
||||
Other Layout
|
||||
*******************************/
|
||||
|
||||
html /deep/ .block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* IE 10 support for HTML5 hidden attr */
|
||||
html /deep/ [hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
html /deep/ .invisible {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
html /deep/ .relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
html /deep/ .fit {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body.fullbleed {
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
html /deep/ .scroll {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.fixed-bottom,
|
||||
.fixed-left,
|
||||
.fixed-right,
|
||||
.fixed-top {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
html /deep/ .fixed-top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
html /deep/ .fixed-right {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
html /deep/ .fixed-bottom {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
html /deep/ .fixed-left {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
</style>
|
396
react-app/bower_components/iron-flex-layout/demo/index.html
vendored
Normal file
396
react-app/bower_components/iron-flex-layout/demo/index.html
vendored
Normal file
@@ -0,0 +1,396 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-flex-layout demo</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<script src="../../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
|
||||
<link rel="import" href="../../paper-styles/demo-pages.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-snippet.html">
|
||||
<link rel="import" href="../../iron-demo-helpers/demo-pages-shared-styles.html">
|
||||
<link rel="import" href="../iron-flex-layout.html">
|
||||
|
||||
<style is="custom-style" include="demo-pages-shared-styles">
|
||||
demo-snippet {
|
||||
--demo-snippet-demo: {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
.container {
|
||||
background-color: #ccc;
|
||||
padding: 5px;
|
||||
margin: 0;
|
||||
}
|
||||
.container > div {
|
||||
padding: 15px;
|
||||
margin: 5px;
|
||||
background-color: white;
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
.vertical-section-container {
|
||||
max-width: 700px
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body unresolved class="fullbleed">
|
||||
<div class="vertical-section-container centered">
|
||||
<h4>Horizontal and vertical layout</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex {
|
||||
@apply(--layout-horizontal);
|
||||
}
|
||||
</style>
|
||||
<div class="container flex">
|
||||
<div>one</div>
|
||||
<div>two</div>
|
||||
<div>three</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Flexible children</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-horizontal {
|
||||
@apply(--layout-horizontal);
|
||||
}
|
||||
.flexchild {
|
||||
@apply(--layout-flex);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-horizontal">
|
||||
<div>one</div>
|
||||
<div class="flexchild">two (flex)</div>
|
||||
<div>three</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Flexible children in vertical layouts</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-vertical {
|
||||
@apply(--layout-vertical);
|
||||
height: 220px;
|
||||
}
|
||||
.flexchild-vertical {
|
||||
@apply(--layout-flex);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-vertical">
|
||||
<div>one</div>
|
||||
<div class="flexchild-vertical">two (flex)</div>
|
||||
<div>three</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Flex ratios</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-horizontal-with-ratios {
|
||||
@apply(--layout-horizontal);
|
||||
}
|
||||
.flexchild {
|
||||
@apply(--layout-flex);
|
||||
}
|
||||
.flex2child {
|
||||
@apply(--layout-flex-2);
|
||||
}
|
||||
.flex3child {
|
||||
@apply(--layout-flex-3);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-horizontal-with-ratios">
|
||||
<div class="flex3child">one</div>
|
||||
<div class="flexchild">two</div>
|
||||
<div class="flex2child">three</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Cross-axis stretch alignment (default)</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-stretch-align {
|
||||
@apply(--layout-horizontal);
|
||||
height: 120px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-stretch-align">
|
||||
<div>stretch</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Cross-axis center alignment</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-center-align {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-center);
|
||||
height: 120px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-center-align">
|
||||
<div>center</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Cross-axis start alignment</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-start-align {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-start);
|
||||
height: 120px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-start-align">
|
||||
<div>start</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Cross-axis end alignment</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-end-align {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-end);
|
||||
height: 120px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-end-align">
|
||||
<div>end</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Justification, start justified</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-start-justified {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-start-justified);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-start-justified">
|
||||
<div>start-justified</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Justification, start justified</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-center-justified {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-center-justified);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-center-justified">
|
||||
<div>center-justified</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Justification, end justified</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-end-justified {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-end-justified);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-end-justified">
|
||||
<div>end-justified</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Justification, equal space between elements</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-equal-justified {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-justified);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-equal-justified">
|
||||
<div>justified</div>
|
||||
<div>justified</div>
|
||||
<div>justified</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Justification, equal space around each element</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-equal-around-justified {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-around-justified);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-equal-around-justified">
|
||||
<div>around-justified</div>
|
||||
<div>around-justified</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Self alignment</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-self-align {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-justified);
|
||||
height: 120px;
|
||||
}
|
||||
.flex-self-align div {
|
||||
@apply(--layout-flex);
|
||||
}
|
||||
.child1 {
|
||||
@apply(--layout-self-start);
|
||||
}
|
||||
.child2 {
|
||||
@apply(--layout-self-center);
|
||||
}
|
||||
.child3 {
|
||||
@apply(--layout-self-end);
|
||||
}
|
||||
.child4 {
|
||||
@apply(--layout-self-stretch);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-self-align">
|
||||
<div class="child1">one</div>
|
||||
<div class="child2">two</div>
|
||||
<div class="child3">three</div>
|
||||
<div class="child4">four</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Wrapping</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-wrap {
|
||||
@apply(--layout-horizontal);
|
||||
@apply(--layout-wrap);
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-wrap">
|
||||
<div>one</div>
|
||||
<div>two</div>
|
||||
<div>three</div>
|
||||
<div>four</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>Reversed layouts</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.flex-reversed {
|
||||
@apply(--layout-horizontal-reverse);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="container flex-reversed">
|
||||
<div>one</div>
|
||||
<div>two</div>
|
||||
<div>three</div>
|
||||
<div>four</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
|
||||
<h4>General purpose rules</h4>
|
||||
<demo-snippet>
|
||||
<template>
|
||||
<style is="custom-style">
|
||||
.general {
|
||||
width: 100%;
|
||||
}
|
||||
.general > div {
|
||||
background-color: #ccc;
|
||||
padding: 4px;
|
||||
margin: 12px;
|
||||
}
|
||||
.block {
|
||||
@apply(--layout-block);
|
||||
}
|
||||
.invisible {
|
||||
@apply(--layout-invisible);
|
||||
}
|
||||
.relative {
|
||||
@apply(--layout-relative);
|
||||
}
|
||||
.fit {
|
||||
@apply(--layout-fit);
|
||||
}
|
||||
</style>
|
||||
|
||||
<div class="general">
|
||||
<div>Before <span>[A Span]</span> After</div>
|
||||
<div>Before <span class="block">[A Block Span]</span> After</div>
|
||||
<div>Before invisible span <span class="invisible">Not displayed</span> After invisible span</div>
|
||||
<div class="relative" style="height: 100px;">
|
||||
<div class="fit" style="background-color: #000;color: white">Fit</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</demo-snippet>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
24
react-app/bower_components/iron-flex-layout/index.html
vendored
Normal file
24
react-app/bower_components/iron-flex-layout/index.html
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<title>iron-flex-layout</title>
|
||||
<script src="../webcomponentsjs/webcomponents-lite.js"></script>
|
||||
<link rel="import" href="../iron-component-page/iron-component-page.html">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<iron-component-page></iron-component-page>
|
||||
|
||||
</body>
|
||||
</html>
|
431
react-app/bower_components/iron-flex-layout/iron-flex-layout-classes.html
vendored
Normal file
431
react-app/bower_components/iron-flex-layout/iron-flex-layout-classes.html
vendored
Normal file
@@ -0,0 +1,431 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<!--
|
||||
A set of layout classes that let you specify layout properties directly in markup.
|
||||
You must include this file in every element that needs to use them.
|
||||
|
||||
Sample use:
|
||||
|
||||
<link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
|
||||
<style is="custom-style" include="iron-flex iron-flex-alignment"></style>
|
||||
|
||||
<div class="layout horizontal layout-start">
|
||||
<div>cross axis start alignment</div>
|
||||
</div>
|
||||
|
||||
The following imports are available:
|
||||
- iron-flex
|
||||
- iron-flex-reverse
|
||||
- iron-flex-alignment
|
||||
- iron-flex-factors
|
||||
- iron-positioning
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
|
||||
<!-- Most common used flex styles-->
|
||||
<dom-module id="iron-flex">
|
||||
<template>
|
||||
<style>
|
||||
.layout.horizontal,
|
||||
.layout.vertical {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.layout.inline {
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
.layout.horizontal {
|
||||
-ms-flex-direction: row;
|
||||
-webkit-flex-direction: row;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.layout.vertical {
|
||||
-ms-flex-direction: column;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.layout.wrap {
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.layout.center,
|
||||
.layout.center-center {
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.layout.center-justified,
|
||||
.layout.center-center {
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.flex {
|
||||
-ms-flex: 1 1 0.000000001px;
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
-webkit-flex-basis: 0.000000001px;
|
||||
flex-basis: 0.000000001px;
|
||||
}
|
||||
|
||||
.flex-auto {
|
||||
-ms-flex: 1 1 auto;
|
||||
-webkit-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
}
|
||||
|
||||
.flex-none {
|
||||
-ms-flex: none;
|
||||
-webkit-flex: none;
|
||||
flex: none;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<!-- Basic flexbox reverse styles -->
|
||||
<dom-module id="iron-flex-reverse">
|
||||
<template>
|
||||
<style>
|
||||
.layout.horizontal-reverse,
|
||||
.layout.vertical-reverse {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.layout.horizontal-reverse {
|
||||
-ms-flex-direction: row-reverse;
|
||||
-webkit-flex-direction: row-reverse;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.layout.vertical-reverse {
|
||||
-ms-flex-direction: column-reverse;
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.layout.wrap-reverse {
|
||||
-ms-flex-wrap: wrap-reverse;
|
||||
-webkit-flex-wrap: wrap-reverse;
|
||||
flex-wrap: wrap-reverse;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<!-- Flexbox alignment -->
|
||||
<dom-module id="iron-flex-alignment">
|
||||
<template>
|
||||
<style>
|
||||
/**
|
||||
* Alignment in cross axis.
|
||||
*/
|
||||
.layout.start {
|
||||
-ms-flex-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.layout.center,
|
||||
.layout.center-center {
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.layout.end {
|
||||
-ms-flex-align: end;
|
||||
-webkit-align-items: flex-end;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.layout.baseline {
|
||||
-ms-flex-align: baseline;
|
||||
-webkit-align-items: baseline;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Alignment in main axis.
|
||||
*/
|
||||
.layout.start-justified {
|
||||
-ms-flex-pack: start;
|
||||
-webkit-justify-content: flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.layout.center-justified,
|
||||
.layout.center-center {
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.layout.end-justified {
|
||||
-ms-flex-pack: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.layout.around-justified {
|
||||
-ms-flex-pack: distribute;
|
||||
-webkit-justify-content: space-around;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.layout.justified {
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
/**
|
||||
* Self alignment.
|
||||
*/
|
||||
.self-start {
|
||||
-ms-align-self: flex-start;
|
||||
-webkit-align-self: flex-start;
|
||||
align-self: flex-start;
|
||||
}
|
||||
|
||||
.self-center {
|
||||
-ms-align-self: center;
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.self-end {
|
||||
-ms-align-self: flex-end;
|
||||
-webkit-align-self: flex-end;
|
||||
align-self: flex-end;
|
||||
}
|
||||
|
||||
.self-stretch {
|
||||
-ms-align-self: stretch;
|
||||
-webkit-align-self: stretch;
|
||||
align-self: stretch;
|
||||
}
|
||||
|
||||
.self-baseline {
|
||||
-ms-align-self: baseline;
|
||||
-webkit-align-self: baseline;
|
||||
align-self: baseline;
|
||||
};
|
||||
|
||||
/**
|
||||
* multi-line alignment in main axis.
|
||||
*/
|
||||
.layout.start-aligned {
|
||||
-ms-flex-line-pack: start; /* IE10 */
|
||||
-ms-align-content: flex-start;
|
||||
-webkit-align-content: flex-start;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.layout.end-aligned {
|
||||
-ms-flex-line-pack: end; /* IE10 */
|
||||
-ms-align-content: flex-end;
|
||||
-webkit-align-content: flex-end;
|
||||
align-content: flex-end;
|
||||
}
|
||||
|
||||
.layout.center-aligned {
|
||||
-ms-flex-line-pack: center; /* IE10 */
|
||||
-ms-align-content: center;
|
||||
-webkit-align-content: center;
|
||||
align-content: center;
|
||||
}
|
||||
|
||||
.layout.between-aligned {
|
||||
-ms-flex-line-pack: justify; /* IE10 */
|
||||
-ms-align-content: space-between;
|
||||
-webkit-align-content: space-between;
|
||||
align-content: space-between;
|
||||
}
|
||||
|
||||
.layout.around-aligned {
|
||||
-ms-flex-line-pack: distribute; /* IE10 */
|
||||
-ms-align-content: space-around;
|
||||
-webkit-align-content: space-around;
|
||||
align-content: space-around;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<dom-module id="iron-flex-factors">
|
||||
<template>
|
||||
<style>
|
||||
.flex,
|
||||
.flex-1 {
|
||||
-ms-flex: 1 1 0.000000001px;
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
-webkit-flex-basis: 0.000000001px;
|
||||
flex-basis: 0.000000001px;
|
||||
}
|
||||
|
||||
.flex-2 {
|
||||
-ms-flex: 2;
|
||||
-webkit-flex: 2;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.flex-3 {
|
||||
-ms-flex: 3;
|
||||
-webkit-flex: 3;
|
||||
flex: 3;
|
||||
}
|
||||
|
||||
.flex-4 {
|
||||
-ms-flex: 4;
|
||||
-webkit-flex: 4;
|
||||
flex: 4;
|
||||
}
|
||||
|
||||
.flex-5 {
|
||||
-ms-flex: 5;
|
||||
-webkit-flex: 5;
|
||||
flex: 5;
|
||||
}
|
||||
|
||||
.flex-6 {
|
||||
-ms-flex: 6;
|
||||
-webkit-flex: 6;
|
||||
flex: 6;
|
||||
}
|
||||
|
||||
.flex-7 {
|
||||
-ms-flex: 7;
|
||||
-webkit-flex: 7;
|
||||
flex: 7;
|
||||
}
|
||||
|
||||
.flex-8 {
|
||||
-ms-flex: 8;
|
||||
-webkit-flex: 8;
|
||||
flex: 8;
|
||||
}
|
||||
|
||||
.flex-9 {
|
||||
-ms-flex: 9;
|
||||
-webkit-flex: 9;
|
||||
flex: 9;
|
||||
}
|
||||
|
||||
.flex-10 {
|
||||
-ms-flex: 10;
|
||||
-webkit-flex: 10;
|
||||
flex: 10;
|
||||
}
|
||||
|
||||
.flex-11 {
|
||||
-ms-flex: 11;
|
||||
-webkit-flex: 11;
|
||||
flex: 11;
|
||||
}
|
||||
|
||||
.flex-12 {
|
||||
-ms-flex: 12;
|
||||
-webkit-flex: 12;
|
||||
flex: 12;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
||||
|
||||
<!-- Non-flexbox positioning helper styles -->
|
||||
<dom-module id="iron-positioning">
|
||||
<template>
|
||||
<style>
|
||||
.block {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* IE 10 support for HTML5 hidden attr */
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
visibility: hidden !important;
|
||||
}
|
||||
|
||||
.relative {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.fit {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
body.fullbleed {
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
}
|
||||
|
||||
.scroll {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* fixed position */
|
||||
.fixed-bottom,
|
||||
.fixed-left,
|
||||
.fixed-right,
|
||||
.fixed-top {
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.fixed-top {
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.fixed-right {
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
|
||||
.fixed-bottom {
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.fixed-left {
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
</template>
|
||||
</dom-module>
|
399
react-app/bower_components/iron-flex-layout/iron-flex-layout.html
vendored
Normal file
399
react-app/bower_components/iron-flex-layout/iron-flex-layout.html
vendored
Normal file
@@ -0,0 +1,399 @@
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
|
||||
<link rel="import" href="../polymer/polymer.html">
|
||||
|
||||
<!--
|
||||
The `<iron-flex-layout>` component provides simple ways to use
|
||||
[CSS flexible box layout](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Flexible_boxes),
|
||||
also known as flexbox. This component provides two different ways to use flexbox:
|
||||
|
||||
1. [Layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
|
||||
The layout class stylesheet provides a simple set of class-based flexbox rules, that
|
||||
let you specify layout properties directly in markup. You must include this file
|
||||
in every element that needs to use them.
|
||||
|
||||
Sample use:
|
||||
|
||||
<link rel="import" href="../iron-flex-layout/iron-flex-layout-classes.html">
|
||||
<style is="custom-style" include="iron-flex iron-flex-alignment"></style>
|
||||
|
||||
<div class="layout horizontal layout-start">
|
||||
<div>cross axis start alignment</div>
|
||||
</div>
|
||||
|
||||
2. [Custom CSS mixins](https://github.com/PolymerElements/iron-flex-layout/blob/master/iron-flex-layout.html).
|
||||
The mixin stylesheet includes custom CSS mixins that can be applied inside a CSS rule using the `@apply` function.
|
||||
|
||||
Please note that the old [/deep/ layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/classes)
|
||||
are deprecated, and should not be used. To continue using layout properties
|
||||
directly in markup, please switch to using the new `dom-module`-based
|
||||
[layout classes](https://github.com/PolymerElements/iron-flex-layout/tree/master/iron-flex-layout-classes.html).
|
||||
Please note that the new version does not use `/deep/`, and therefore requires you
|
||||
to import the `dom-modules` in every element that needs to use them.
|
||||
|
||||
A complete [guide](https://elements.polymer-project.org/guides/flex-layout) to `<iron-flex-layout>` is available.
|
||||
|
||||
@group Iron Elements
|
||||
@pseudoElement iron-flex-layout
|
||||
@demo demo/index.html
|
||||
-->
|
||||
|
||||
<style>
|
||||
/* IE 10 support for HTML5 hidden attr */
|
||||
[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style is="custom-style">
|
||||
:root {
|
||||
|
||||
--layout: {
|
||||
display: -ms-flexbox;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
};
|
||||
|
||||
--layout-inline: {
|
||||
display: -ms-inline-flexbox;
|
||||
display: -webkit-inline-flex;
|
||||
display: inline-flex;
|
||||
};
|
||||
|
||||
--layout-horizontal: {
|
||||
@apply(--layout);
|
||||
|
||||
-ms-flex-direction: row;
|
||||
-webkit-flex-direction: row;
|
||||
flex-direction: row;
|
||||
};
|
||||
|
||||
--layout-horizontal-reverse: {
|
||||
@apply(--layout);
|
||||
|
||||
-ms-flex-direction: row-reverse;
|
||||
-webkit-flex-direction: row-reverse;
|
||||
flex-direction: row-reverse;
|
||||
};
|
||||
|
||||
--layout-vertical: {
|
||||
@apply(--layout);
|
||||
|
||||
-ms-flex-direction: column;
|
||||
-webkit-flex-direction: column;
|
||||
flex-direction: column;
|
||||
};
|
||||
|
||||
--layout-vertical-reverse: {
|
||||
@apply(--layout);
|
||||
|
||||
-ms-flex-direction: column-reverse;
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
};
|
||||
|
||||
--layout-wrap: {
|
||||
-ms-flex-wrap: wrap;
|
||||
-webkit-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
};
|
||||
|
||||
--layout-wrap-reverse: {
|
||||
-ms-flex-wrap: wrap-reverse;
|
||||
-webkit-flex-wrap: wrap-reverse;
|
||||
flex-wrap: wrap-reverse;
|
||||
};
|
||||
|
||||
--layout-flex-auto: {
|
||||
-ms-flex: 1 1 auto;
|
||||
-webkit-flex: 1 1 auto;
|
||||
flex: 1 1 auto;
|
||||
};
|
||||
|
||||
--layout-flex-none: {
|
||||
-ms-flex: none;
|
||||
-webkit-flex: none;
|
||||
flex: none;
|
||||
};
|
||||
|
||||
--layout-flex: {
|
||||
-ms-flex: 1 1 0.000000001px;
|
||||
-webkit-flex: 1;
|
||||
flex: 1;
|
||||
-webkit-flex-basis: 0.000000001px;
|
||||
flex-basis: 0.000000001px;
|
||||
};
|
||||
|
||||
--layout-flex-2: {
|
||||
-ms-flex: 2;
|
||||
-webkit-flex: 2;
|
||||
flex: 2;
|
||||
};
|
||||
|
||||
--layout-flex-3: {
|
||||
-ms-flex: 3;
|
||||
-webkit-flex: 3;
|
||||
flex: 3;
|
||||
};
|
||||
|
||||
--layout-flex-4: {
|
||||
-ms-flex: 4;
|
||||
-webkit-flex: 4;
|
||||
flex: 4;
|
||||
};
|
||||
|
||||
--layout-flex-5: {
|
||||
-ms-flex: 5;
|
||||
-webkit-flex: 5;
|
||||
flex: 5;
|
||||
};
|
||||
|
||||
--layout-flex-6: {
|
||||
-ms-flex: 6;
|
||||
-webkit-flex: 6;
|
||||
flex: 6;
|
||||
};
|
||||
|
||||
--layout-flex-7: {
|
||||
-ms-flex: 7;
|
||||
-webkit-flex: 7;
|
||||
flex: 7;
|
||||
};
|
||||
|
||||
--layout-flex-8: {
|
||||
-ms-flex: 8;
|
||||
-webkit-flex: 8;
|
||||
flex: 8;
|
||||
};
|
||||
|
||||
--layout-flex-9: {
|
||||
-ms-flex: 9;
|
||||
-webkit-flex: 9;
|
||||
flex: 9;
|
||||
};
|
||||
|
||||
--layout-flex-10: {
|
||||
-ms-flex: 10;
|
||||
-webkit-flex: 10;
|
||||
flex: 10;
|
||||
};
|
||||
|
||||
--layout-flex-11: {
|
||||
-ms-flex: 11;
|
||||
-webkit-flex: 11;
|
||||
flex: 11;
|
||||
};
|
||||
|
||||
--layout-flex-12: {
|
||||
-ms-flex: 12;
|
||||
-webkit-flex: 12;
|
||||
flex: 12;
|
||||
};
|
||||
|
||||
/* alignment in cross axis */
|
||||
|
||||
--layout-start: {
|
||||
-ms-flex-align: start;
|
||||
-webkit-align-items: flex-start;
|
||||
align-items: flex-start;
|
||||
};
|
||||
|
||||
--layout-center: {
|
||||
-ms-flex-align: center;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
};
|
||||
|
||||
--layout-end: {
|
||||
-ms-flex-align: end;
|
||||
-webkit-align-items: flex-end;
|
||||
align-items: flex-end;
|
||||
};
|
||||
|
||||
--layout-baseline: {
|
||||
-ms-flex-align: baseline;
|
||||
-webkit-align-items: baseline;
|
||||
align-items: baseline;
|
||||
};
|
||||
|
||||
/* alignment in main axis */
|
||||
|
||||
--layout-start-justified: {
|
||||
-ms-flex-pack: start;
|
||||
-webkit-justify-content: flex-start;
|
||||
justify-content: flex-start;
|
||||
};
|
||||
|
||||
--layout-center-justified: {
|
||||
-ms-flex-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
};
|
||||
|
||||
--layout-end-justified: {
|
||||
-ms-flex-pack: end;
|
||||
-webkit-justify-content: flex-end;
|
||||
justify-content: flex-end;
|
||||
};
|
||||
|
||||
--layout-around-justified: {
|
||||
-ms-flex-pack: distribute;
|
||||
-webkit-justify-content: space-around;
|
||||
justify-content: space-around;
|
||||
};
|
||||
|
||||
--layout-justified: {
|
||||
-ms-flex-pack: justify;
|
||||
-webkit-justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
};
|
||||
|
||||
--layout-center-center: {
|
||||
@apply(--layout-center);
|
||||
@apply(--layout-center-justified);
|
||||
};
|
||||
|
||||
/* self alignment */
|
||||
|
||||
--layout-self-start: {
|
||||
-ms-align-self: flex-start;
|
||||
-webkit-align-self: flex-start;
|
||||
align-self: flex-start;
|
||||
};
|
||||
|
||||
--layout-self-center: {
|
||||
-ms-align-self: center;
|
||||
-webkit-align-self: center;
|
||||
align-self: center;
|
||||
};
|
||||
|
||||
--layout-self-end: {
|
||||
-ms-align-self: flex-end;
|
||||
-webkit-align-self: flex-end;
|
||||
align-self: flex-end;
|
||||
};
|
||||
|
||||
--layout-self-stretch: {
|
||||
-ms-align-self: stretch;
|
||||
-webkit-align-self: stretch;
|
||||
align-self: stretch;
|
||||
};
|
||||
|
||||
--layout-self-baseline: {
|
||||
-ms-align-self: baseline;
|
||||
-webkit-align-self: baseline;
|
||||
align-self: baseline;
|
||||
};
|
||||
|
||||
/* multi-line alignment in main axis */
|
||||
|
||||
--layout-start-aligned: {
|
||||
-ms-flex-line-pack: start; /* IE10 */
|
||||
-ms-align-content: flex-start;
|
||||
-webkit-align-content: flex-start;
|
||||
align-content: flex-start;
|
||||
};
|
||||
|
||||
--layout-end-aligned: {
|
||||
-ms-flex-line-pack: end; /* IE10 */
|
||||
-ms-align-content: flex-end;
|
||||
-webkit-align-content: flex-end;
|
||||
align-content: flex-end;
|
||||
};
|
||||
|
||||
--layout-center-aligned: {
|
||||
-ms-flex-line-pack: center; /* IE10 */
|
||||
-ms-align-content: center;
|
||||
-webkit-align-content: center;
|
||||
align-content: center;
|
||||
};
|
||||
|
||||
--layout-between-aligned: {
|
||||
-ms-flex-line-pack: justify; /* IE10 */
|
||||
-ms-align-content: space-between;
|
||||
-webkit-align-content: space-between;
|
||||
align-content: space-between;
|
||||
};
|
||||
|
||||
--layout-around-aligned: {
|
||||
-ms-flex-line-pack: distribute; /* IE10 */
|
||||
-ms-align-content: space-around;
|
||||
-webkit-align-content: space-around;
|
||||
align-content: space-around;
|
||||
};
|
||||
|
||||
/*******************************
|
||||
Other Layout
|
||||
*******************************/
|
||||
|
||||
--layout-block: {
|
||||
display: block;
|
||||
};
|
||||
|
||||
--layout-invisible: {
|
||||
visibility: hidden !important;
|
||||
};
|
||||
|
||||
--layout-relative: {
|
||||
position: relative;
|
||||
};
|
||||
|
||||
--layout-fit: {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
};
|
||||
|
||||
--layout-scroll: {
|
||||
-webkit-overflow-scrolling: touch;
|
||||
overflow: auto;
|
||||
};
|
||||
|
||||
--layout-fullbleed: {
|
||||
margin: 0;
|
||||
height: 100vh;
|
||||
};
|
||||
|
||||
/* fixed position */
|
||||
|
||||
--layout-fixed-top: {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
};
|
||||
|
||||
--layout-fixed-right: {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
};
|
||||
|
||||
--layout-fixed-bottom: {
|
||||
position: fixed;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
};
|
||||
|
||||
--layout-fixed-left: {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
</style>
|
31
react-app/bower_components/iron-flex-layout/test/index.html
vendored
Normal file
31
react-app/bower_components/iron-flex-layout/test/index.html
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
<!doctype html>
|
||||
<!--
|
||||
@license
|
||||
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
|
||||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
|
||||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
|
||||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
|
||||
Code distributed by Google as part of the polymer project is also
|
||||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>iron-flex-behavior tests</title>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
|
||||
<script src="../../web-component-tester/browser.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
WCT.loadSuites([
|
||||
'iron-flex-layout.html',
|
||||
'iron-flex-layout.html?dom=shadow',
|
||||
'iron-flex-layout-classes.html',
|
||||
'iron-flex-layout-classes.html?dom=shadow'
|
||||
]);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user