Commit graph

163 commits

Author SHA1 Message Date
Tim Roes
bdc37be5b5 [UI Framework] Add KuiCodeEditor as react-ace replacement/wrapper (#14026)
* Create KuiCodeEditor component

* Add additional tests

* Add PropTypes for KuiCodeEditor

* Rename hintInactive to isHintActive

* Rename enableOverlay to stopEditing

* Rename and move configureAce method

* Rename onHintKeyDown to onKeyDownHint

* Fix broken configureAce call

* Add onBlur to editor example

* Regroup test cases

* Don't lose value in KuiCodeEditor example

* Remove window.alert, due to annoying behavior when switching tabs

* Remove unnecessary constructor

* Replace string ref by callback ref

* Add a snapshot test

* Move stop editing method

* Use mount to render editor during test

* Extract setState into method in example
2017-09-22 18:09:32 +03:00
Spencer
84a15fcfd5 [uiFramework] fix webpack config (#14067)
(cherry picked from commit 9938ff8af1)
2017-09-21 16:33:17 -07:00
Tim Roes
7cc823c863 Move htmlIdGenerator to ui_framework (#13906)
* Move htmlIdGenerator to ui_framework

* Use jest expect instead of chai

* Add htmlIdGenerator to accessibility styleguide

* Improve the writing of the accessibility styleguide
2017-09-11 13:22:32 +02:00
Árpád Poprádi
752644ab13 [UI Framework] add KuiExpressionItem and related components (#13383) 2017-09-07 13:41:28 +02:00
Søren Louv-Jansen
7939a98aad Update readme: Make ui-framework url a link 2017-09-05 10:48:42 +02:00
Søren Louv-Jansen
52552a93ef Update react 15.6.1 (#13672) 2017-08-28 10:27:51 +02:00
Tim Roes
3b1e1e5a15 Refactor keycode exporting in ui_framework (#13663)
* Refactor keycode exporting in ui_framework

* Replace all uses of ENTER_KEY and SPACE_KEY

* Use ESCAPE instead of ESC universally

* Rename keycodes -> keyCodes

* Replace keyCodes in advanced_row
2017-08-24 21:25:52 +02:00
CJ Cenizal
fcd4ddfb2d [Accessibility] Give kuiTables keyboard-accessible column headers (#13586)
* Make KuiTable headers keyboard-accessible in UI Framework.
* Use flexbox to consistently apply spacing between table header cell text and sort icon.
* Add aria-label attributes to KuiTableHeaderCell, KuiTableHeaderCheckBoxCell, and KuiTableRowCheckBoxCell.
* Update Jest snapshots.
* Update Dashboard listing table with new markup.
* Update Saved Objects tables with new markup.
* Update Settings table with new markup.
* Update Visualize listing table with new markup.
* Remove padding-right for cells containing checkboxes.
* Update sortableColumn directive with new markup.
2017-08-24 11:48:04 -07:00
Chris Roberson
9175137c57 "Create index pattern" wizard. (#13454)
* Create Index Pattern Creation wizard.
- Create a directive for each step in the wizard.
- Reorganize files into conventional folder structure.
- Rename files with more conventional and consistent naming patterns.
- Display indices, partial matches, exact matches.
- Add loading, empty, and success states.
- Add option to include system indices.

* Temp: comment out and mock getIndices functionality.

* Hook up data seaching

* Add for/id connections for form inputs and labels

* Automatically append a wildcard

* Highlight the index pattern in the results

* Ensure we only remove the last character if it's a `*`

* Auto hide index pattern id controls

* Ensure this link is tabbable

* Move the advanced fields down

* Use toggle button

* This shouldn't ever be required

* Revert "This shouldn't ever be required"

This reverts commit b6e31e79308271e7f04ea1d42ce66e32e7aa0612.

* Update based on comments in PR

* Ffew more changes

* Port changes from Tyler's PR, https://github.com/elastic/kibana/pull/13353

* Remove unnecessary file

* Fix broken functional tests

* Copy changes

* Fix functional tests

* Remove loading from the main select, and move to an additional select

* Show help text when loading

* Fix sorting

* Fixing broken functional tests

* Couple changes from PR review

* Ensure input field does not show a red border until touched

* More descriptive and consistent copy
2017-08-24 09:04:28 -04:00
CJ Cenizal
45b10fb175 [UI Framework] Add KuiOutsideClickDetector (#13521)
* Add KuiOutsideClickDetector.
* Convert KuiColorPicker and KuiPopover to use KuiOutsideClickDetector.
2017-08-21 08:58:56 -07:00
CJ Cenizal
64a1e0cf7f [Accessibility] Make table pagination controls keyboard-accessible. (#13541)
* Make table pagination controls keyboard-accessible. Update KuiLink so it can be used on a button element.
* Add additional properties to link mixin to make kuiLink look the same for both buttons and anchor tags.
* Fix tests.
2017-08-18 17:11:36 -07:00
CJ Cenizal
cb5f508e6b [UI Framework] [K7] Improve generator snippets (#13598) (#13599)
* Remove extraneous path info from SCSS import snippet.
* Add GuideCode to demo page. Put stateless function params on multiple lines.
* Log an error if you try to create a component with a blank name.
2017-08-18 16:12:53 -07:00
Matt Bargar
e7ca19586d Improves dark theme support in the filter editor (#13522)
Fixes #12955

* Added dark theme support to the ui framework modal component
* Also fixed z-index issue where dashboard panels would appear above the filter editor modal when the user moved or resized the panel (see gif below)
2017-08-18 11:05:40 -04:00
CJ Cenizal
fbaf4e638b [eslint-config-kibana] Upgrade eslint-config to 0.10.0. (#13323)
* Upgrade eslint-config to 0.10.0.
* Fix linting violations with popover and typography stuff in UI Framework.
2017-08-11 11:48:54 -07:00
CJ Cenizal
9671486d98 [UI Framework] Add functionality for hiding and showing the chrome when viewing Sandboxes (#13475)
* Update UI Framework doc site with functionality for hiding and showing the chrome when viewing Sandboxes. (#13437)
* Fix formatting in generator-kui templates. (#13443)
2017-08-11 09:44:23 -07:00
CJ Cenizal
720297d8da [UI Framework] Reorganize UI Framework and add Yeoman generator (#13172)
* Reorganize documentation styles so they all live in doc_site/components directory. (#12809)
  - Remove global styles, e.g. body and html element selectors.
* Create global_styles dir with sub-directories. (#12833)
* Add SCSS style guide. (#12850)
* Refactor UI Framework directory structure to house everything in a src directory. (#12880)
  - Add components/index.js and services/index.js files to continue to export JS modules from the root.
* Add KUI Yeoman generator.
* Support creation of components.
* Add documentation generator for main page, demo, and sandbox.
  - Add additional documentation snippets to KUI generator. (#13076)
  - Fix incorrect use of double quotes in KUI generator snippet. (#13086)
  - Remove infrequently used imports from the KUI generator test template. (#13110)
* Mock assets files for Jest. (#13060)
* Fix broken coverage report paths in Jest config. (#13082)
* Update eslint config to lint the new UI Framework directory structure. (#13102)
* Fix positioning of doc site pagination buttons. (#13203)
* Support hasReact prop for sandboxes. (#13270)
* Remove deprecated used of component mixin from KUI generator's SCSS template. (#13377)
* Fix rebasing errors.
  - Add dashboard back to Jest config.
  - Add missing form and tool_bar variables.
* Rename tasks to createComponent and documentComponent.
* Reference correct src paths in README.
* Add children and className to templates' propTypes.
* Add default folder name for page demo.
* Add suffix to sandbox routes.
* Specify testPathIgnorePatterns more clearly.
* Rename component.test.js to test.js so that Jenkins won't try to run it.
* Update npm scripts to depend on local yo dependency, not global.
* Add ui_framework/src to copy task.
* Simplify npm scripts and remove requirement for installing Yeoman from README.
* Add services to moduleNameMapper in jest config.
* Clean up Button and Gallery examples.
2017-08-11 08:48:48 -07:00
CJ Cenizal
0a732a66ee Fix KuiPopover examples. (#13461) 2017-08-11 08:11:11 -07:00
Stacey Gammon
7199476c1f port k7 popover component over (#13322)
* port k7 popover component over

* Fix line height

* Clean up css
2017-08-09 10:37:40 -04:00
Stacey Gammon
b5e13ff1d0 Fix dark theme issues with spy toggle and spy pane (#13345)
* Fix dark theme issues with spy toggle and spy pane

* Port dark theme portion of styling kuiIcon into uiFramework library
2017-08-08 15:21:00 -04:00
Stacey Gammon
ab8668aa3a Fix accessibility issues with saved object finder (#13152)
* Fix accessibility issues with saved object finder

and use new kui styles

* Dark theme-icy kuiTabs

* Refer to existing dark theme color variables.  Use dark theme hover link color.

* use button instead of div element so no need for kbn-accessible-click

* Add dark theme tab variety to ui framework site, lighten color of background tabs
2017-08-07 14:13:48 -04:00
CJ Cenizal
08719cd863 [UI Framework] Spawn compileCss as a child process to prevent a node-sass fatal error from killing the watch process (#13222)
* Spawn compileCss as a child process to prevent a node-sass fatal error from killing the watch process.
* Document tasks.
2017-08-01 14:11:23 -07:00
Tim Sullivan
f37eab9b44 [Framework/Accessibility] Add kuiScreenReaderOnly class (#13133)
* [Framework/Accessibility] Add kuiScreenReaderOnly class

* fix typo

* use GuideLink

* add screen_reader react component and tests

* export KuiScreenReaderOnly

* --wip-- [skip ci]

* fix lint rule

* remove obsolete snapshots
2017-08-01 13:31:51 -07:00
Felix Stürmer
2430fed459 Use version 0.9.0 of eslint-config-kibana (#13177) 2017-07-28 18:03:34 +02:00
CJ Cenizal
e922f00445 Upgrade eslint config to 0.8.1. (#13128)
* Fix incorrect peerDependency and bump eslint config version to 0.8.1.
* Upgrade eslint config to 0.8.1. Fix JSX to adhere to new formatting rules.
2017-07-27 10:52:41 -07:00
Tim Sullivan
cc951549d4 [UI Framework] Allow custom placeholder for Tool Bar Search Box (#12959) 2017-07-20 09:45:12 -07:00
Stacey Gammon
0d18ca43ed Reactify stateless table components (#12349)
* Reactify stateless table components

* address code comments

* Get rid of TableRowCellLiner and add more newlines

- get rid of TableRowCellLiner, embed it as a div inside TableRowCell

* remove obsolete snapshot

* Remove toggle all logic

keep toggle each row logic so people can actually see what a checked
row looks like.  And fix a bug with a name

* Address code comments
2017-07-18 10:31:54 -04:00
CJ Cenizal
e395798cfd Fix disappearing borders for LocalNav search select. (#12803) 2017-07-12 11:45:01 -07:00
Tim Roes
3fe58e9eae Replace role=main by main elements (#12671)
* Replace role=main by main elements

* Move main style to _common_styles

* Add compiled UI Framework CSS.
2017-07-12 08:30:42 -07:00
CJ Cenizal
fbb074a167 Update LocalNav layout to fix menu button hover state. (#12739) 2017-07-10 13:43:46 -07:00
CJ Cenizal
476b00fd99 Interface changes to toggle directives, and add disabled state (#12655)
* Add kuiToggleButton disabled state.
* Add isDisabled attribute to toggleButton and togglePanel directives.
* Redesign toggleButton and togglePanel directive interfaces to use transclusion instead of attributes, and scope-bound attribute over DOM-bound attribute..
* Use attribute binding.
* Rename 'toggleButtonLabel' attribute to 'buttonText'.
2017-07-06 14:01:30 -07:00
CJ Cenizal
189747abf7 Allow kuiLocalNavRow to expand vertically if the content wraps. (#12606) 2017-06-30 12:21:36 -07:00
Árpád Poprádi
848bf17b29 [UI Framework] Reactify kuiTabs and related CSS components (#12302)
* [UI Framework] Reactify kuiTabs and related CSS components
2017-06-29 07:51:16 -07:00
CJ Cenizal
c5f2ea8066 [UI Framework] Order UI Framework React component exports to be alphabetical (#12526)
* Order UI Framework React component exports to be alphabetical.
* Add globalBoxShadow variable.
2017-06-27 15:51:27 -07:00
Stacey Gammon
e494160866 Fix the issue where multiple color pickers would stay open (#12458) 2017-06-26 08:54:31 -04:00
Stacey Gammon
ca553f2bb5 Add label and clear link to color picker (#12422)
* Add label and clear link to color picker

* address code comments

* Add extra example for no color label

* Remove unnecessary div

* Add tests for showColorLabel and transparent color choice
2017-06-20 16:28:21 -04:00
CJ Cenizal
f7dc507a25 Fix appearance of error indicator in Visualize sidebar. Give kuiIcon--error correct color. (#12410) 2017-06-20 12:47:28 -07:00
CJ Cenizal
5232a61ed2 [UI Framework] Define consistent default, small, and wide sizing for form fields, and support them within ExpressionItems. (#12190)
* Define consistent default, small, and wide sizing for form fields, and support them within ExpressionItems.
* Make Settings search input full width.
2017-06-20 09:23:23 -07:00
Stacey Gammon
4c3cf8b188 Add new react color picker to ui framework with tests (#12245)
* Add new react color picker to ui framework with tests

In prep for dashboard color customization.

* address code review comments

* second round of feedback

* nativeEvent not available in a headless browser, so jenkins tests will fail without a check

* move aria-label

* Require color and have components pass undefined to use default color

* update snapshots after aria-label move

* get rid of default color

* user display: inline-block so clickable is only the width of box and lab el
2017-06-19 16:26:29 -04:00
Shaunak Kashyap
65c4bb2b18 Using parallel language to remove ambiguity (#12356) 2017-06-19 07:43:59 -07:00
Árpád Poprádi
0b0a2facbb [UI Framework] Reactify kuiHeaderBar and related CSS components (#12280)
* [UI Framework] Reactify kuiHeaderBar and related CSS components
2017-06-14 09:27:24 -07:00
CJ Cenizal
120c065e91 [UI Framework] Improve Warning Button contrast (#12327)
* Fix incorrect syntax in Warning Button examples.
* Improve contrast of Warning Button (still fails contrast checker).
2017-06-14 08:14:49 -07:00
CJ Cenizal
3d25577b57 Fix examples of Table component with ToolBar. (#12326) 2017-06-13 19:55:30 -07:00
Árpád Poprádi
2a0ed8e367 [UI Framework] Reactify kuiGallery and related CSS components (#12277)
* [UI Framework] Reactify kuiGallery and related CSS components
2017-06-13 15:38:46 -07:00
dave.snider@gmail.com
dedef146ec Palette swap for accessibility / kibana 6 (#12085)
Recolor Kibana for Accessibility. Attempt to clean up spacing / layout irregularities by adding some level of global variable control. Major changes are:

* better animation against login
* switch to colored kibana logo
* add docs for secondary buttons in kui, addjust hover states
* simplify focus states
* adjust svg rects for discover graph to be lighter
* add ui select overwrite file, adjust new filter selector to match palette changes
* make spy usable in discovery
* panel withHeader removed completely, tests updated
2017-06-13 14:05:59 -07:00
Árpád Poprádi
a829245d3c [UI Framework] Reactify kuiBar (#12167)
* issue/12165 [UI Framework] Reactify the kuiBar CSS component
2017-06-12 17:09:57 -07:00
Árpád Poprádi
1e71d11207 [UI Framework] Reactify kuiCard and related CSS components (#12197)
* issue/12170 [UI Framework] Reactify the kuiCard and related CSS components
* adapt doc views of card to simpler CSS syntax, fix property name united -> isUnited, use other framework components in doc
* add defaultProps to KuiCardGroup, add hint to example code
* use 3 cards in the card group example to see the layout better
* remove KuiCardGroupContainer: not needed with the right KuiCardGroup styling
2017-06-12 17:06:57 -07:00
CJ Cenizal
8a66d8f8f9 Update LocalNav examples to use tabIndex instead of tabindex, to eliminate React console warnings. (#12284) 2017-06-12 16:09:55 -07:00
Árpád Poprádi
4e8b2783b3 [UI Framework] Reactify kuiFieldGroup and related CSS components (#12260)
* [UI Framework] Reactify kuiFieldGroup and related CSS components
2017-06-12 15:22:35 -07:00
Joe Fleming
27b869ab04 Add eslint import resolution (#12025)
* add and configure eslint import plugins

eslint-plugin-import and eslint-import-resolver-kibana

* fix duplicate imports

* fix named exports

mostly fix the way exports works so the linter could resolve them, but fix a few incorrect imports as well

* fix import/no-named-as-default-member issues

* fix export name

don't use named export name when consuming the default export

* fix eslint namespace issue

* remove unused install_or_update_repo file

* fix metrics vis exporting

* fix multi import

* ignore resolution issues in console

custom resolver seems unable to deal with amd modules correctly

* ignore import issues in ui framework setup

resolver is unable to deal with raw imports at the moment

* add duplicates exception to select tests

* add projectRoot override to core kibana plugin

also bump @elastic/eslint-import-resolver-kibana, so the correct package.json file is used to resolve the root path

* set kibanaPath

required for the CI

* fix one last module.exports in new code
2017-06-09 11:19:31 -07:00
Nathan Reese
5c075f2a3f Timepicker on the right (#11980)
* quick panel moved to directive

* move relative to directive

* move absolute to directive

* move stuff from timepicker directive to new directives

* move timepicker to right with flexbox

* remove left padding for kbn-timepicker-section

* merge in timepicker.html changes from - Improve accessibility of the Datepicker. (#11753)

* Adjust markup and styles so that the Quick, Relative, and Absolute layouts all occupy the same bounds (#1)

* Adjust markup and styles so that the Quick, Relative, and Absolute layouts all occupy the same bounds, so the content doesn't jump around as you switch modes..

* Make kbn-timepicker-content responsive so that it stacks content on narrower screens.

* Combine Relative input and select fields using kuiFieldGroup.

* Make Timepicker submit button wider.

* Align button on right.

* migrate inputs from form-control to kui classes

* update generated dist/ui_framework.css

* fix broken tests

* create kbn-timerpicker-nav-button class and update kbn-timepicker-section to make each column the same width
2017-06-09 10:52:24 -06:00