@spothero/ui 15.0.0 → 15.1.1

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 (94) hide show
  1. package/package.json +2 -3
  2. package/styles/v2/components/FormControl/FormControl.jsx +20 -2
  3. package/styles/v2/components/Radio/Radio.jsx +50 -0
  4. package/styles/v2/components/Radio/Radio.stories.js +155 -0
  5. package/styles/v2/components/Radio/RadioGroup.jsx +69 -0
  6. package/styles/v2/components/Radio/styles/index.js +52 -0
  7. package/styles/v2/components/index.js +1 -0
  8. package/styles/v2/components/styles.js +1 -0
  9. package/v2/index.js +1 -1
  10. package/v2/index.js.map +1 -1
  11. package/styles/Alert/Alert.jsx +0 -45
  12. package/styles/Alert/Alert.spec.js +0 -85
  13. package/styles/AutoSuggestInput/AutoSuggestInput.jsx +0 -429
  14. package/styles/AutoSuggestInput/AutoSuggestInput.spec.js +0 -132
  15. package/styles/AutoSuggestInput/AutoSuggestItem.jsx +0 -61
  16. package/styles/AutoSuggestInput/AutoSuggestList.jsx +0 -85
  17. package/styles/Badge/Badge.jsx +0 -24
  18. package/styles/Badge/Badge.spec.js +0 -43
  19. package/styles/Chart/Chart.jsx +0 -185
  20. package/styles/Chart/Chart.spec.js +0 -369
  21. package/styles/Checkbox/Checkbox.jsx +0 -159
  22. package/styles/Checkbox/Checkbox.spec.js +0 -142
  23. package/styles/DateTime/DatePicker.jsx +0 -281
  24. package/styles/DateTime/DatePicker.spec.js +0 -186
  25. package/styles/DateTime/DatePickerCalendar.jsx +0 -170
  26. package/styles/DateTime/DatePickerCalendarNavigation.jsx +0 -44
  27. package/styles/DateTime/DatePickerCalendarWithRange.jsx +0 -218
  28. package/styles/DateTime/DateTimePicker.jsx +0 -266
  29. package/styles/DateTime/DateTimePicker.spec.js +0 -60
  30. package/styles/DateTime/DateTimeRangePicker.jsx +0 -629
  31. package/styles/DateTime/DateTimeRangePicker.spec.js +0 -425
  32. package/styles/DateTime/TimePicker.jsx +0 -158
  33. package/styles/DateTime/TimePicker.spec.js +0 -148
  34. package/styles/DateTime/date-time-assertions.js +0 -89
  35. package/styles/DateTime/index.js +0 -6
  36. package/styles/ErrorBoundary/ErrorBoundary.jsx +0 -76
  37. package/styles/ErrorBoundary/ErrorBoundary.spec.js +0 -72
  38. package/styles/Flyout/Flyout.jsx +0 -147
  39. package/styles/Flyout/Flyout.spec.js +0 -117
  40. package/styles/Form/Form.jsx +0 -151
  41. package/styles/Form/Form.spec.js +0 -148
  42. package/styles/Form/FormElementError.jsx +0 -18
  43. package/styles/Form/FormGroup.jsx +0 -32
  44. package/styles/Form/FormGroupError.jsx +0 -24
  45. package/styles/Form/index.js +0 -4
  46. package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.jsx +0 -215
  47. package/styles/GooglePlacesSearchInput/GooglePlacesSearchInput.spec.js +0 -213
  48. package/styles/GooglePlacesSearchInput/PoweredByGoogle.jsx +0 -43
  49. package/styles/GooglePlacesSearchInput/index.js +0 -2
  50. package/styles/HorizontalRule/HorizontalRule.jsx +0 -36
  51. package/styles/HorizontalRule/HorizontalRule.spec.js +0 -94
  52. package/styles/Label/Label.jsx +0 -22
  53. package/styles/Label/Label.spec.js +0 -11
  54. package/styles/Notification/Notification.jsx +0 -117
  55. package/styles/Notification/Notification.spec.js +0 -154
  56. package/styles/Notification/NotificationContainer.jsx +0 -90
  57. package/styles/Notification/NotificationPropTypes.js +0 -20
  58. package/styles/Notification/index.js +0 -2
  59. package/styles/PasswordControl/PasswordControl.jsx +0 -197
  60. package/styles/PasswordControl/PasswordControl.spec.js +0 -236
  61. package/styles/Portal/Portal.jsx +0 -65
  62. package/styles/Portal/Portal.spec.js +0 -45
  63. package/styles/PulseLoader/PulseLoader.jsx +0 -71
  64. package/styles/PulseLoader/PulseLoader.spec.js +0 -63
  65. package/styles/Radio/Radio.jsx +0 -114
  66. package/styles/Radio/Radio.spec.js +0 -128
  67. package/styles/Radio/RadioGroup.jsx +0 -105
  68. package/styles/RenderInBody/RenderInBody.jsx +0 -56
  69. package/styles/RenderInBody/RenderInBody.spec.js +0 -24
  70. package/styles/Select/Select.jsx +0 -251
  71. package/styles/Select/Select.spec.js +0 -254
  72. package/styles/Select/SelectItemPropTypes.js +0 -19
  73. package/styles/Select/index.js +0 -2
  74. package/styles/SelectControlled/SelectControlled.jsx +0 -250
  75. package/styles/SelectControlled/SelectControlled.spec.js +0 -290
  76. package/styles/SelectControlled/index.js +0 -1
  77. package/styles/Sprite/Sprite.jsx +0 -16
  78. package/styles/Sprite/Sprite.spec.js +0 -11
  79. package/styles/Tabs/Tab.jsx +0 -38
  80. package/styles/Tabs/TabContent.jsx +0 -46
  81. package/styles/Tabs/TabNavigation.jsx +0 -64
  82. package/styles/Tabs/TabPanel.jsx +0 -30
  83. package/styles/Tabs/Tabs.jsx +0 -87
  84. package/styles/Tabs/Tabs.spec.js +0 -201
  85. package/styles/Tabs/index.js +0 -5
  86. package/styles/TextArea/TextArea.jsx +0 -137
  87. package/styles/TextArea/TextArea.spec.js +0 -111
  88. package/styles/TextInput/TextInput.jsx +0 -159
  89. package/styles/TextInput/TextInput.spec.js +0 -263
  90. package/styles/TextInput/TextInputPropTypes.js +0 -88
  91. package/styles/TextInput/index.js +0 -2
  92. package/styles/Tooltip/Tooltip.jsx +0 -230
  93. package/styles/Tooltip/Tooltip.spec.js +0 -170
  94. /package/styles/{Radio → v2/components/Radio}/index.js +0 -0
@@ -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
- });
File without changes