@spothero/ui 15.1.0 → 15.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/CHANGELOG.md +0 -18
  2. package/package.json +2 -3
  3. package/styles/v2/components/Modal/styles/dialogContainer.js +0 -1
  4. package/styles/v2/components/Radio/Radio.jsx +1 -1
  5. package/styles/v2/components/Radio/RadioGroup.jsx +1 -1
  6. package/v2/index.js +1 -1
  7. package/v2/index.js.map +1 -1
  8. package/styles/Alert/Alert.jsx +0 -45
  9. package/styles/Alert/Alert.spec.js +0 -85
  10. package/styles/AutoSuggestInput/AutoSuggestInput.jsx +0 -429
  11. package/styles/AutoSuggestInput/AutoSuggestInput.spec.js +0 -132
  12. package/styles/AutoSuggestInput/AutoSuggestItem.jsx +0 -61
  13. package/styles/AutoSuggestInput/AutoSuggestList.jsx +0 -85
  14. package/styles/Badge/Badge.jsx +0 -24
  15. package/styles/Badge/Badge.spec.js +0 -43
  16. package/styles/Chart/Chart.jsx +0 -185
  17. package/styles/Chart/Chart.spec.js +0 -369
  18. package/styles/Checkbox/Checkbox.jsx +0 -159
  19. package/styles/Checkbox/Checkbox.spec.js +0 -142
  20. package/styles/DateTime/DatePicker.jsx +0 -281
  21. package/styles/DateTime/DatePicker.spec.js +0 -186
  22. package/styles/DateTime/DatePickerCalendar.jsx +0 -170
  23. package/styles/DateTime/DatePickerCalendarNavigation.jsx +0 -44
  24. package/styles/DateTime/DatePickerCalendarWithRange.jsx +0 -218
  25. package/styles/DateTime/DateTimePicker.jsx +0 -266
  26. package/styles/DateTime/DateTimePicker.spec.js +0 -60
  27. package/styles/DateTime/DateTimeRangePicker.jsx +0 -629
  28. package/styles/DateTime/DateTimeRangePicker.spec.js +0 -425
  29. package/styles/DateTime/TimePicker.jsx +0 -158
  30. package/styles/DateTime/TimePicker.spec.js +0 -148
  31. package/styles/DateTime/date-time-assertions.js +0 -89
  32. package/styles/DateTime/index.js +0 -6
  33. package/styles/ErrorBoundary/ErrorBoundary.jsx +0 -76
  34. package/styles/ErrorBoundary/ErrorBoundary.spec.js +0 -72
  35. package/styles/Flyout/Flyout.jsx +0 -147
  36. package/styles/Flyout/Flyout.spec.js +0 -117
  37. package/styles/Form/Form.jsx +0 -151
  38. package/styles/Form/Form.spec.js +0 -148
  39. package/styles/Form/FormElementError.jsx +0 -18
  40. package/styles/Form/FormGroup.jsx +0 -32
  41. package/styles/Form/FormGroupError.jsx +0 -24
  42. package/styles/Form/index.js +0 -4
  43. package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.jsx +0 -215
  44. package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.spec.js +0 -213
  45. package/styles/GooglePlacesSearchInput/PoweredByGoogle.jsx +0 -43
  46. package/styles/GooglePlacesSearchInput/index.js +0 -2
  47. package/styles/HorizontalRule/HorizontalRule.jsx +0 -36
  48. package/styles/HorizontalRule/HorizontalRule.spec.js +0 -94
  49. package/styles/Label/Label.jsx +0 -22
  50. package/styles/Label/Label.spec.js +0 -11
  51. package/styles/Notification/Notification.jsx +0 -117
  52. package/styles/Notification/Notification.spec.js +0 -154
  53. package/styles/Notification/NotificationContainer.jsx +0 -90
  54. package/styles/Notification/NotificationPropTypes.js +0 -20
  55. package/styles/Notification/index.js +0 -2
  56. package/styles/PasswordControl/PasswordControl.jsx +0 -197
  57. package/styles/PasswordControl/PasswordControl.spec.js +0 -236
  58. package/styles/Portal/Portal.jsx +0 -65
  59. package/styles/Portal/Portal.spec.js +0 -45
  60. package/styles/PulseLoader/PulseLoader.jsx +0 -71
  61. package/styles/PulseLoader/PulseLoader.spec.js +0 -63
  62. package/styles/Radio/Radio.jsx +0 -114
  63. package/styles/Radio/Radio.spec.js +0 -128
  64. package/styles/Radio/RadioGroup.jsx +0 -105
  65. package/styles/Radio/index.js +0 -2
  66. package/styles/RenderInBody/RenderInBody.jsx +0 -56
  67. package/styles/RenderInBody/RenderInBody.spec.js +0 -24
  68. package/styles/Select/Select.jsx +0 -251
  69. package/styles/Select/Select.spec.js +0 -254
  70. package/styles/Select/SelectItemPropTypes.js +0 -19
  71. package/styles/Select/index.js +0 -2
  72. package/styles/SelectControlled/SelectControlled.jsx +0 -250
  73. package/styles/SelectControlled/SelectControlled.spec.js +0 -290
  74. package/styles/SelectControlled/index.js +0 -1
  75. package/styles/Sprite/Sprite.jsx +0 -16
  76. package/styles/Sprite/Sprite.spec.js +0 -11
  77. package/styles/Tabs/Tab.jsx +0 -38
  78. package/styles/Tabs/TabContent.jsx +0 -46
  79. package/styles/Tabs/TabNavigation.jsx +0 -64
  80. package/styles/Tabs/TabPanel.jsx +0 -30
  81. package/styles/Tabs/Tabs.jsx +0 -87
  82. package/styles/Tabs/Tabs.spec.js +0 -201
  83. package/styles/Tabs/index.js +0 -5
  84. package/styles/TextArea/TextArea.jsx +0 -137
  85. package/styles/TextArea/TextArea.spec.js +0 -111
  86. package/styles/TextInput/TextInput.jsx +0 -159
  87. package/styles/TextInput/TextInput.spec.js +0 -263
  88. package/styles/TextInput/TextInputPropTypes.js +0 -88
  89. package/styles/TextInput/index.js +0 -2
  90. package/styles/Tooltip/Tooltip.jsx +0 -230
  91. package/styles/Tooltip/Tooltip.spec.js +0 -170
@@ -1,170 +0,0 @@
1
- describe('<Tooltip />', () => {
2
- context('Display', () => {
3
- context('Default', () => {
4
- it('Triggers and renders properly', () => {
5
- cy.visitStory('v1/Tooltip/Display', 'Default')
6
- .get('.Tooltip')
7
- .should('not.exist')
8
- .get('.Tooltip-example')
9
- .click()
10
- .get('.Tooltip')
11
- .should('exist')
12
- .contains('This is an example tooltip with some copy.')
13
- // check that close button works
14
- .get('.Tooltip-close')
15
- .click()
16
- .wait(250)
17
- .get('.Tooltip')
18
- .should('not.exist');
19
- });
20
- });
21
-
22
- context('Custom Class', () => {
23
- it('Appends custom classes to Tooltip and container', () => {
24
- cy.visitStory('v1/Tooltip/Display', 'CustomClass')
25
- .get('.Tooltip-example')
26
- .click()
27
- // check that tooltip arrow has been adjusted
28
- .get('.Tooltip-arrow')
29
- .should('have.attr', 'style')
30
- .get('.Tooltip')
31
- .should('have.class', 'custom-class1')
32
- .and('have.class', 'custom-class2')
33
- .parent()
34
- .should('have.class', 'custom-container-class1')
35
- .and('have.class', 'custom-container-class2');
36
- });
37
- });
38
-
39
- context('Without Close Button', () => {
40
- it('Renders without a close button and closes on body click', () => {
41
- cy.visitStory('v1/Tooltip/Display', 'WithoutCloseButton')
42
- .get('.Tooltip-example')
43
- .click()
44
- .get('.Tooltip')
45
- .should('have.class', 'Tooltip-no-close')
46
- .find('.Tooltip-close')
47
- .should('not.exist')
48
- .get('body')
49
- .click()
50
- // wait for Tooltip to animate away before checking that it's gone
51
- .wait(250)
52
- .get('.Tooltip')
53
- .should('not.exist');
54
- });
55
- });
56
-
57
- context('Without Adjusted Arrow', () => {
58
- it('Renders without making style adjustments to the tooltip arrow', () => {
59
- cy.visitStory('v1/Tooltip/Display', 'WithoutAdjustArrow')
60
- .get('.Tooltip-example')
61
- .click()
62
- .get('.Tooltip-arrow')
63
- .should('not.have.attr', 'style');
64
- });
65
- });
66
- });
67
-
68
- context('Position', () => {
69
- context('Top', () => {
70
- it('Correctly positions the tooltip between the top of the window and trigger', () => {
71
- cy.visitStory('v1/Tooltip/Position', 'Top')
72
- .get('.Tooltip-example')
73
- .click()
74
- .get('.Tooltip')
75
- .should('have.class', 'Tooltip-top');
76
- });
77
- });
78
-
79
- context('Right', () => {
80
- it('Correctly positions the tooltip between the right of the window and trigger', () => {
81
- cy.visitStory('v1/Tooltip/Position', 'Right')
82
- .get('.Tooltip-example')
83
- .click()
84
- .get('.Tooltip')
85
- .should('have.class', 'Tooltip-right');
86
- });
87
- });
88
-
89
- context('Bottom', () => {
90
- it('Correctly positions the tooltip between the bottom of the window and trigger', () => {
91
- cy.visitStory('v1/Tooltip/Position', 'Bottom')
92
- .get('.Tooltip-example')
93
- .click()
94
- .get('.Tooltip')
95
- .should('have.class', 'Tooltip-bottom');
96
- });
97
- });
98
-
99
- context('Left', () => {
100
- it('Correctly positions the tooltip between the left of the window and trigger', () => {
101
- cy.visitStory('v1/Tooltip/Position', 'Left')
102
- .get('.Tooltip-example')
103
- .click()
104
- .get('.Tooltip')
105
- .should('have.class', 'Tooltip-left');
106
- });
107
- });
108
-
109
- context('Tip Offset', () => {
110
- it('Correctly positions the tooltip arrow a specified distance from the trigger', () => {
111
- let triggerRight;
112
- let tooltipLeft;
113
-
114
- cy.visitStory('v1/Tooltip/Position', 'TipOffset')
115
- .get('.Tooltip-example')
116
- .click()
117
- .get('.Tooltip-example')
118
- .then($el => {
119
- triggerRight = $el[0].getBoundingClientRect().right;
120
- })
121
- .get('.Tooltip')
122
- .find('.Tooltip-arrow')
123
- .then($el => {
124
- tooltipLeft = $el[0].getBoundingClientRect().left;
125
-
126
- expect(Math.ceil(tooltipLeft - triggerRight)).to.equal(
127
- 16
128
- );
129
- });
130
- });
131
- });
132
-
133
- context('Update On Move', () => {
134
- it('Repositions the tooltip when the window is scrolled or resized', () => {
135
- let oldStyle = '';
136
-
137
- cy.visitStory('v1/Tooltip/Position', 'UpdateOnMove')
138
- // Use force: true on click to prevent Cypress from doing additional scrolling
139
- // See https://github.com/cypress-io/cypress/issues/553 for more info
140
- .get('.Tooltip-example')
141
- .click({force: true})
142
- .get('.Tooltip')
143
- .should('exist')
144
- .then($el => {
145
- oldStyle = $el[0].getAttribute('style');
146
- })
147
- // scroll window and then wait for tooltip to update position
148
- .window()
149
- .scrollTo(0, 500)
150
- .wait(100)
151
- .get('.Tooltip')
152
- .then($el => {
153
- const newStyle = $el[0].getAttribute('style');
154
-
155
- expect(newStyle !== oldStyle).to.equal(true);
156
- oldStyle = newStyle;
157
- })
158
- // resize window and then wait for tooltip to update position
159
- .viewport(320, 480)
160
- .wait(100)
161
- .get('.Tooltip')
162
- .then($el => {
163
- expect(
164
- $el[0].getAttribute('style') !== oldStyle
165
- ).to.equal(true);
166
- });
167
- });
168
- });
169
- });
170
- });