@citizenplane/pimp 6.4.1 β†’ 8.0.0

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 (77) hide show
  1. package/.eslintrc.js +3 -6
  2. package/.lintstagedrc.json +4 -0
  3. package/README.md +18 -6
  4. package/dist/favicon.ico +0 -0
  5. package/dist/pimp.es.js +10635 -0
  6. package/dist/pimp.umd.js +9 -35597
  7. package/dist/style.css +1 -0
  8. package/jest.config.js +11 -11
  9. package/package-lock.json +7787 -13517
  10. package/package.json +38 -42
  11. package/src/App.vue +12 -17
  12. package/src/README.md +23 -9
  13. package/src/assets/styles/base/_base.scss +3 -16
  14. package/src/assets/styles/helpers/_functions.scss +1 -1
  15. package/src/assets/styles/helpers/_keyframes.scss +26 -29
  16. package/src/assets/styles/lib/_normalize.scss +19 -17
  17. package/src/assets/styles/variables/_colors.scss +16 -16
  18. package/src/assets/styles/variables/_sizing.scss +1 -1
  19. package/src/assets/styles/variables/_spacing.scss +2 -2
  20. package/src/components/atomic-elements/CpBadge.vue +41 -29
  21. package/src/components/buttons/CpButton.vue +10 -6
  22. package/src/components/core/playground-sections/SectionAtomicElements.vue +21 -5
  23. package/src/components/core/playground-sections/SectionButtons.vue +14 -11
  24. package/src/components/core/playground-sections/SectionDatePickers.vue +31 -17
  25. package/src/components/core/playground-sections/SectionFeedbackIndicators.vue +1 -1
  26. package/src/components/core/playground-sections/SectionInputs.vue +3 -3
  27. package/src/components/core/playground-sections/SectionListsAndTables.vue +2 -2
  28. package/src/components/core/playground-sections/SectionSelectMenus.vue +13 -13
  29. package/src/components/core/playground-sections/SectionSelects.vue +1 -1
  30. package/src/components/core/playground-sections/SectionSimpleInputs.vue +20 -18
  31. package/src/components/core/playground-sections/SectionToasters.vue +1 -1
  32. package/src/components/core/playground-sections/SectionToggles.vue +23 -36
  33. package/src/components/core/playground-sections/SectionTypography.vue +1 -1
  34. package/src/components/date-pickers/CpCalendar.vue +60 -14
  35. package/src/components/date-pickers/CpDate.vue +11 -13
  36. package/src/components/date-pickers/CpDatepicker.vue +55 -8
  37. package/src/components/feedback-indicators/CpAlert.vue +5 -15
  38. package/src/components/feedback-indicators/CpToaster.vue +299 -86
  39. package/src/components/helpers-utilities/TransitionExpand.vue +52 -58
  40. package/src/components/index.js +38 -73
  41. package/src/components/inputs/CpInput.vue +19 -54
  42. package/src/components/inputs/CpTextarea.vue +8 -9
  43. package/src/components/lists-and-table/CpTable/CpTableEmptyState/index.vue +1 -6
  44. package/src/components/lists-and-table/CpTable/index.scss +16 -9
  45. package/src/components/lists-and-table/CpTable/index.vue +6 -5
  46. package/src/components/selects/CpSelect.vue +10 -11
  47. package/src/components/selects/CpSelectMenu/index.vue +13 -23
  48. package/src/components/toggles/CpCheckbox/index.scss +9 -6
  49. package/src/components/toggles/CpCheckbox/index.vue +3 -7
  50. package/src/components/toggles/CpRadio/index.scss +12 -5
  51. package/src/components/toggles/CpRadio/index.vue +34 -47
  52. package/src/components/toggles/CpSwitch/index.vue +18 -17
  53. package/src/components/typography/CpHeading/index.vue +2 -2
  54. package/src/components/visual/CpIcon.vue +156 -0
  55. package/src/directives/ClickOutside.js +13 -0
  56. package/src/directives/ResizeSelect.js +1 -1
  57. package/src/libs/CoreDatepicker.vue +127 -133
  58. package/src/main.js +16 -10
  59. package/src/plugins/toaster.js +69 -0
  60. package/src/utils/constants/src/Intent.js +4 -4
  61. package/vite.config.js +45 -0
  62. package/dist/demo.html +0 -10
  63. package/dist/img/chevron-down-icon.dd31db33.svg +0 -3
  64. package/dist/pimp.common.js +0 -35587
  65. package/dist/pimp.common.js.map +0 -1
  66. package/dist/pimp.css +0 -1
  67. package/dist/pimp.umd.js.map +0 -1
  68. package/dist/pimp.umd.min.js +0 -2
  69. package/dist/pimp.umd.min.js.map +0 -1
  70. package/public/index.html +0 -17
  71. package/src/components/core/playground-sections/SectionMultiSelects.vue +0 -57
  72. package/src/components/selects/CpMultiselect.vue +0 -211
  73. package/src/helpers/multiselectMixin.js +0 -765
  74. package/src/helpers/pointerMixin.js +0 -135
  75. package/src/libs/CoreMultiSelect.vue +0 -618
  76. package/src/libs/CoreToaster.vue +0 -269
  77. package/vue.config.js +0 -20
package/.eslintrc.js CHANGED
@@ -3,16 +3,13 @@ module.exports = {
3
3
  env: {
4
4
  browser: true,
5
5
  node: true,
6
+ jest: true,
6
7
  },
7
- parserOptions: {
8
- parser: 'babel-eslint',
9
- },
10
- extends: ['plugin:vue/recommended', 'plugin:prettier/recommended', 'prettier', 'prettier/vue'],
11
- // required to lint *.vue files
12
- plugins: ['vue', 'prettier'],
8
+ extends: ['eslint:recommended', 'plugin:vue/vue3-recommended', '@vue/prettier'],
13
9
  // add your custom rules here
14
10
  rules: {
15
11
  'no-console': process.env.NODE_ENV === 'production' ? 'error' : 'off',
16
12
  'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
13
+ 'vue/multi-word-component-names': 'off',
17
14
  },
18
15
  }
@@ -0,0 +1,4 @@
1
+ {
2
+ "*.{js,vue}": "npm run lint",
3
+ "*": "npm run format"
4
+ }
package/README.md CHANGED
@@ -14,6 +14,7 @@
14
14
  <br />
15
15
 
16
16
  ---
17
+
17
18
  ## Pimp mission
18
19
 
19
20
  Pimp aims to bring order and consistency to all of our products and processes. We elevate user experience and increase the speed and efficiency of how we design and build products.
@@ -33,8 +34,11 @@ yarn add @citizenplane/pimp
33
34
  ```
34
35
 
35
36
  ## Usage
37
+
36
38
  ### In a nuxt project
37
- 1. Add this line to your `nuxt-config.js`:
39
+
40
+ 1. Add this line to your `nuxt-config.js`:
41
+
38
42
  ```javascript
39
43
  // nuxt-config.js
40
44
  ...
@@ -48,20 +52,20 @@ css: [
48
52
 
49
53
  ```vue
50
54
  <template>
51
- <cp-button appearance='primary' color='purple' />
55
+ <cp-button appearance="primary" color="purple" />
52
56
  </template>
53
57
  <script>
54
58
  import CpButton from '@citizenplane/pimp'
55
59
 
56
60
  export default {
57
61
  components: {
58
- CpButton
62
+ CpButton,
59
63
  },
60
64
  }
61
65
  </script>
62
66
  ```
63
67
 
64
- If you want to use any component without having to import them manually, you can create a plugin:
68
+ If you want to use any component without having to import them manually, you can create a plugin:
65
69
 
66
70
  1. Create a plugin called `citizenplane-pimp.js`:
67
71
 
@@ -73,6 +77,7 @@ import Pimp from '@citizenplane/pimp'
73
77
 
74
78
  Vue.use(Pimp)
75
79
  ```
80
+
76
81
  2. Add this line to your `nuxt-config.js`:
77
82
 
78
83
  ```javascript
@@ -83,19 +88,23 @@ plugins: [
83
88
  ]
84
89
  ...
85
90
  ```
91
+
86
92
  3. Use components directly in your project without having to import nor declaring them:
93
+
87
94
  ```vue
88
95
  <template>
89
- <cp-button appearance='primary' color='purple' />
96
+ <cp-button appearance="primary" color="purple" />
90
97
  </template>
91
98
  ```
92
99
 
93
100
  ## Components
101
+
94
102
  Now that you're all set up, you can retrieve components documentation on [pimp.citizenplane.com](https://pimp.citizenplane.com).
95
103
 
96
104
  ![CitizenPlane's design system hero banner](https://i.imgur.com/WFPUfiW.png)
97
105
 
98
106
  ## πŸ§‘β€πŸ’» Contributing to Pimp
107
+
99
108
  We are working on making this project a fully open source. We appreciate any contributions you might make.
100
109
 
101
110
  ### 🍴 Step 1. Fork this repository
@@ -123,7 +132,7 @@ Now go to `http://localhost:8080` in your browser.
123
132
 
124
133
  ### πŸ›  Step 3. Make your changes
125
134
 
126
- Now you can start developing!
135
+ Now you can start developing!
127
136
 
128
137
  All the components are under the `src/components/` directory and associated code changes will automatically be reflected in the playground.
129
138
 
@@ -148,9 +157,11 @@ To be done
148
157
  Congrats, you're officially a Pimp contributor!
149
158
 
150
159
  ## Feedback
160
+
151
161
  We want to provide only components of the highest quality. We can’t do that without your feedback. If you have any suggestions about what we can do to improve components, please report it directly as an issue or drop us a line at <a href="mailto:tech@citizenplane.com">tech@citizenplane.com</a>.
152
162
 
153
163
  ## πŸ‘ Respect earns Respect
164
+
154
165
  Please respect our Code of Conduct, in short:
155
166
 
156
167
  - Using welcoming and inclusive language
@@ -160,6 +171,7 @@ Please respect our Code of Conduct, in short:
160
171
  - Showing empathy towards other community members
161
172
 
162
173
  ## License
174
+
163
175
  Pimp is released under the MIT license.
164
176
 
165
177
  Copyright Β© 2021 CitizenPlane, Inc.
Binary file