@policystudio/policy-studio-ui-vue 1.1.88 → 1.1.90-beta.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 (67) hide show
  1. package/.eslintignore +1 -0
  2. package/.eslintrc.js +70 -67
  3. package/.github/workflows/deploy-storybook.yml +1 -1
  4. package/.storybook/eventBus.js +25 -2
  5. package/.storybook/main.js +17 -21
  6. package/babel.config.js +17 -3
  7. package/dist/css/psui_styles.css +0 -1
  8. package/package.json +36 -23
  9. package/scripts/kill-port.sh +12 -0
  10. package/src/assets/scss/components/PsTableResults.scss +3 -2
  11. package/src/components/accordion/PsAccordion.vue +20 -21
  12. package/src/components/accordion/PsAccordionItem.vue +30 -8
  13. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +6 -3
  14. package/src/components/badges-and-tags/PsCardInfos.vue +3 -1
  15. package/src/components/badges-and-tags/PsChartLegend.vue +19 -5
  16. package/src/components/badges-and-tags/PsCostEffectBar.vue +4 -5
  17. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
  18. package/src/components/badges-and-tags/PsTestimonialCard.vue +6 -4
  19. package/src/components/buttons/PsButton.vue +30 -11
  20. package/src/components/chips/PsChips.vue +5 -2
  21. package/src/components/controls/PsCheckbox.vue +5 -2
  22. package/src/components/controls/PsCheckboxSimple.vue +4 -4
  23. package/src/components/controls/PsDraggable.vue +70 -67
  24. package/src/components/controls/PsInlineSelector.vue +13 -14
  25. package/src/components/controls/PsRadioButton.vue +10 -5
  26. package/src/components/controls/PsRadioButtonSimple.vue +3 -3
  27. package/src/components/controls/PsSlider.vue +6 -6
  28. package/src/components/controls/PsSwitch.vue +13 -3
  29. package/src/components/controls/PsToggle.vue +14 -11
  30. package/src/components/data-graphics/PsBarChart.vue +4 -2
  31. package/src/components/datatable/PsDataTable.vue +14 -5
  32. package/src/components/datatable/PsDataTableItem.vue +17 -4
  33. package/src/components/forms/PsDropdown.vue +8 -5
  34. package/src/components/forms/PsDropdownList.vue +1 -1
  35. package/src/components/forms/PsInput.vue +30 -14
  36. package/src/components/forms/PsInputSelect.vue +33 -11
  37. package/src/components/forms/PsInputTextArea.vue +15 -4
  38. package/src/components/navigations/PsBreadcrumb.vue +1 -1
  39. package/src/components/notifications/PsDialog.vue +11 -5
  40. package/src/components/notifications/PsSimpleAlert.vue +22 -10
  41. package/src/components/notifications/PsToast.vue +8 -3
  42. package/src/components/playground/PsScrollBar.vue +122 -50
  43. package/src/components/table-results/PsTableResults.vue +79 -58
  44. package/src/components/table-results/PsTableResultsBody.vue +3 -1
  45. package/src/components/table-results/PsTableResultsHead.vue +27 -8
  46. package/src/components/table-results/PsTableResultsHeadComparison.vue +24 -8
  47. package/src/components/table-results/PsTableResultsHeadFlexible.vue +18 -6
  48. package/src/components/table-results/PsTableResultsRow.vue +6 -2
  49. package/src/components/tabs/PsTabHeader.vue +19 -16
  50. package/src/components/tooltip/PsDialogTooltip.vue +18 -8
  51. package/src/components/tooltip/PsRichTooltip.vue +12 -5
  52. package/src/components/tooltip/PsTooltip.vue +17 -9
  53. package/src/components/ui/PsDotLoader.vue +5 -5
  54. package/src/components/ui/PsIcon.vue +6 -2
  55. package/src/index.js +0 -1
  56. package/src/stories/Button.stories.js +48 -130
  57. package/src/stories/Button.vue +59 -0
  58. package/src/stories/{ElevationSystem.stories.mdx → ElevationSystem.mdx} +1 -1
  59. package/src/stories/Header.stories.js +41 -0
  60. package/src/stories/Header.vue +77 -0
  61. package/src/stories/{Introduction.stories.mdx → Introduction.mdx} +101 -101
  62. package/src/stories/{Typography.stories.mdx → Typography.mdx} +107 -105
  63. package/src/stories/button.css +30 -0
  64. package/src/stories/header.css +32 -0
  65. package/webpack.config.js +22 -0
  66. package/backup-package-lock.json +0 -37194
  67. /package/src/stories/{Colors.stories.mdx → Colors.mdx} +0 -0
@@ -1,4 +1,4 @@
1
- import { Meta } from '@storybook/addon-docs';
1
+ import { Meta } from "@storybook/blocks";
2
2
  import Code from './assets/code-brackets.svg';
3
3
  import Colors from './assets/colors.svg';
4
4
  import Comments from './assets/comments.svg';
@@ -10,7 +10,104 @@ import StackAlt from './assets/stackalt.svg';
10
10
 
11
11
  <Meta title="Policy Studio" />
12
12
 
13
- <style>{`
13
+ #Welcome to UI Explorer
14
+
15
+ Storybook helps you build UI components in isolation from your app's business logic, data, and context.
16
+ That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
17
+
18
+ Browse example stories now by navigating to them in the sidebar.
19
+ View their code in the `src/stories` directory to learn how they work.
20
+ We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
21
+
22
+ <div className="subheading">Configure</div>
23
+
24
+ <div className="link-list">
25
+ <a
26
+ className="link-item"
27
+ href="https://storybook.js.org/docs/react/addons/addon-types"
28
+ target="_blank"
29
+ >
30
+ <img src={Plugin} alt="plugin" />
31
+ <span>
32
+ <strong>Presets for popular tools</strong>
33
+ Easy setup for TypeScript, SCSS and more.
34
+ </span>
35
+ </a>
36
+ <a
37
+ className="link-item"
38
+ href="https://storybook.js.org/docs/react/configure/webpack"
39
+ target="_blank"
40
+ >
41
+ <img src={StackAlt} alt="Build" />
42
+ <span>
43
+ <strong>Build configuration</strong>
44
+ How to customize webpack and Babel
45
+ </span>
46
+ </a>
47
+ <a
48
+ className="link-item"
49
+ href="https://storybook.js.org/docs/react/configure/styling-and-css"
50
+ target="_blank"
51
+ >
52
+ <img src={Colors} alt="colors" />
53
+ <span>
54
+ <strong>Styling</strong>
55
+ How to load and configure CSS libraries
56
+ </span>
57
+ </a>
58
+ <a
59
+ className="link-item"
60
+ href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
61
+ target="_blank"
62
+ >
63
+ <img src={Flow} alt="flow" />
64
+ <span>
65
+ <strong>Data</strong>
66
+ Providers and mocking for data libraries
67
+ </span>
68
+ </a>
69
+ </div>
70
+
71
+ <div className="subheading">Learn</div>
72
+
73
+ <div className="link-list">
74
+ <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
75
+ <img src={Repo} alt="repo" />
76
+ <span>
77
+ <strong>Storybook documentation</strong>
78
+ Configure, customize, and extend
79
+ </span>
80
+ </a>
81
+ <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
82
+ <img src={Direction} alt="direction" />
83
+ <span>
84
+ <strong>In-depth guides</strong>
85
+ Best practices from leading teams
86
+ </span>
87
+ </a>
88
+ <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
89
+ <img src={Code} alt="code" />
90
+ <span>
91
+ <strong>GitHub project</strong>
92
+ View the source and add issues
93
+ </span>
94
+ </a>
95
+ <a className="link-item" href="https://discord.gg/storybook" target="_blank">
96
+ <img src={Comments} alt="comments" />
97
+ <span>
98
+ <strong>Discord chat</strong>
99
+ Chat with maintainers and the community
100
+ </span>
101
+ </a>
102
+ </div>
103
+
104
+ <div className="tip-wrapper">
105
+ <span className="tip">Tip</span>
106
+ <code>src/stories/Introduction.stories.mdx</code>
107
+ </div>
108
+
109
+ <style>
110
+ {`
14
111
  .subheading {
15
112
  --mediumdark: '#999999';
16
113
  font-weight: 900;
@@ -110,102 +207,5 @@ import StackAlt from './assets/stackalt.svg';
110
207
  font-size: 12px;
111
208
  display: inline-block;
112
209
  }
113
-
114
-
115
- `}</style>
116
-
117
- # Welcome to UI Explorer
118
-
119
- Storybook helps you build UI components in isolation from your app's business logic, data, and context.
120
- That makes it easy to develop hard-to-reach states. Save these UI states as **stories** to revisit during development, testing, or QA.
121
-
122
- Browse example stories now by navigating to them in the sidebar.
123
- View their code in the `src/stories` directory to learn how they work.
124
- We recommend building UIs with a [**component-driven**](https://componentdriven.org) process starting with atomic components and ending with pages.
125
-
126
- <div className="subheading">Configure</div>
127
-
128
- <div className="link-list">
129
- <a
130
- className="link-item"
131
- href="https://storybook.js.org/docs/react/addons/addon-types"
132
- target="_blank"
133
- >
134
- <img src={Plugin} alt="plugin" />
135
- <span>
136
- <strong>Presets for popular tools</strong>
137
- Easy setup for TypeScript, SCSS and more.
138
- </span>
139
- </a>
140
- <a
141
- className="link-item"
142
- href="https://storybook.js.org/docs/react/configure/webpack"
143
- target="_blank"
144
- >
145
- <img src={StackAlt} alt="Build" />
146
- <span>
147
- <strong>Build configuration</strong>
148
- How to customize webpack and Babel
149
- </span>
150
- </a>
151
- <a
152
- className="link-item"
153
- href="https://storybook.js.org/docs/react/configure/styling-and-css"
154
- target="_blank"
155
- >
156
- <img src={Colors} alt="colors" />
157
- <span>
158
- <strong>Styling</strong>
159
- How to load and configure CSS libraries
160
- </span>
161
- </a>
162
- <a
163
- className="link-item"
164
- href="https://storybook.js.org/docs/react/get-started/setup#configure-storybook-for-your-stack"
165
- target="_blank"
166
- >
167
- <img src={Flow} alt="flow" />
168
- <span>
169
- <strong>Data</strong>
170
- Providers and mocking for data libraries
171
- </span>
172
- </a>
173
- </div>
174
-
175
- <div className="subheading">Learn</div>
176
-
177
- <div className="link-list">
178
- <a className="link-item" href="https://storybook.js.org/docs" target="_blank">
179
- <img src={Repo} alt="repo" />
180
- <span>
181
- <strong>Storybook documentation</strong>
182
- Configure, customize, and extend
183
- </span>
184
- </a>
185
- <a className="link-item" href="https://storybook.js.org/tutorials/" target="_blank">
186
- <img src={Direction} alt="direction" />
187
- <span>
188
- <strong>In-depth guides</strong>
189
- Best practices from leading teams
190
- </span>
191
- </a>
192
- <a className="link-item" href="https://github.com/storybookjs/storybook" target="_blank">
193
- <img src={Code} alt="code" />
194
- <span>
195
- <strong>GitHub project</strong>
196
- View the source and add issues
197
- </span>
198
- </a>
199
- <a className="link-item" href="https://discord.gg/storybook" target="_blank">
200
- <img src={Comments} alt="comments" />
201
- <span>
202
- <strong>Discord chat</strong>
203
- Chat with maintainers and the community
204
- </span>
205
- </a>
206
- </div>
207
-
208
- <div className="tip-wrapper">
209
- <span className="tip">Tip</span>Edit the Markdown in{' '}
210
- <code>src/stories/Introduction.stories.mdx</code>
211
- </div>
210
+ `}
211
+ </style>
@@ -1,111 +1,7 @@
1
- import { Meta } from '@storybook/addon-docs';
1
+ import { Meta } from "@storybook/blocks";
2
2
 
3
3
  <Meta title="Typography" />
4
4
 
5
- <style>{`
6
- .subheading {
7
- --mediumdark: '#999999';
8
- font-weight: 900;
9
- font-size: 13px;
10
- color: #999;
11
- letter-spacing: 6px;
12
- line-height: 24px;
13
- text-transform: uppercase;
14
- margin-bottom: 12px;
15
- margin-top: 40px;
16
- }
17
-
18
- .link-list {
19
- display: grid;
20
- grid-template-columns: 1fr;
21
- grid-template-rows: 1fr 1fr;
22
- row-gap: 10px;
23
- }
24
-
25
- @media (min-width: 620px) {
26
- .link-list {
27
- row-gap: 20px;
28
- column-gap: 20px;
29
- grid-template-columns: 1fr 1fr;
30
- }
31
- }
32
-
33
- @media all and (-ms-high-contrast:none) {
34
- .link-list {
35
- display: -ms-grid;
36
- -ms-grid-columns: 1fr 1fr;
37
- -ms-grid-rows: 1fr 1fr;
38
- }
39
- }
40
-
41
- .link-item {
42
- display: block;
43
- padding: 20px 30px 20px 15px;
44
- border: 1px solid #00000010;
45
- border-radius: 5px;
46
- transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
47
- color: #333333;
48
- display: flex;
49
- align-items: flex-start;
50
- }
51
-
52
- .link-item:hover {
53
- border-color: #1EA7FD50;
54
- transform: translate3d(0, -3px, 0);
55
- box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
56
- }
57
-
58
- .link-item:active {
59
- border-color: #1EA7FD;
60
- transform: translate3d(0, 0, 0);
61
- }
62
-
63
- .link-item strong {
64
- font-weight: 700;
65
- display: block;
66
- margin-bottom: 2px;
67
- }
68
-
69
- .link-item img {
70
- height: 40px;
71
- width: 40px;
72
- margin-right: 15px;
73
- flex: none;
74
- }
75
-
76
- .link-item span {
77
- font-size: 14px;
78
- line-height: 20px;
79
- }
80
-
81
- .tip {
82
- display: inline-block;
83
- border-radius: 1em;
84
- font-size: 11px;
85
- line-height: 12px;
86
- font-weight: 700;
87
- background: #E7FDD8;
88
- color: #66BF3C;
89
- padding: 4px 12px;
90
- margin-right: 10px;
91
- vertical-align: top;
92
- }
93
-
94
- .tip-wrapper {
95
- font-size: 13px;
96
- line-height: 20px;
97
- margin-top: 40px;
98
- margin-bottom: 40px;
99
- }
100
-
101
- .tip-wrapper code {
102
- font-size: 12px;
103
- display: inline-block;
104
- }
105
-
106
-
107
- `}</style>
108
-
109
5
  # Typography
110
6
  Typography serves to present your design and content as clearly and efficiently as possible.
111
7
 
@@ -208,3 +104,109 @@ Keeping typography consistent and sticking to logical hierarchies ensures that e
208
104
  </tr>
209
105
  </table>
210
106
 
107
+ <style>
108
+ {`
109
+ .subheading {
110
+ --mediumdark: '#999999';
111
+ font-weight: 900;
112
+ font-size: 13px;
113
+ color: #999;
114
+ letter-spacing: 6px;
115
+ line-height: 24px;
116
+ text-transform: uppercase;
117
+ margin-bottom: 12px;
118
+ margin-top: 40px;
119
+ }
120
+
121
+ .link-list {
122
+ display: grid;
123
+ grid-template-columns: 1fr;
124
+ grid-template-rows: 1fr 1fr;
125
+ row-gap: 10px;
126
+ }
127
+
128
+ @media (min-width: 620px) {
129
+ .link-list {
130
+ row-gap: 20px;
131
+ column-gap: 20px;
132
+ grid-template-columns: 1fr 1fr;
133
+ }
134
+ }
135
+
136
+ @media all and (-ms-high-contrast:none) {
137
+ .link-list {
138
+ display: -ms-grid;
139
+ -ms-grid-columns: 1fr 1fr;
140
+ -ms-grid-rows: 1fr 1fr;
141
+ }
142
+ }
143
+
144
+ .link-item {
145
+ display: block;
146
+ padding: 20px 30px 20px 15px;
147
+ border: 1px solid #00000010;
148
+ border-radius: 5px;
149
+ transition: background 150ms ease-out, border 150ms ease-out, transform 150ms ease-out;
150
+ color: #333333;
151
+ display: flex;
152
+ align-items: flex-start;
153
+ }
154
+
155
+ .link-item:hover {
156
+ border-color: #1EA7FD50;
157
+ transform: translate3d(0, -3px, 0);
158
+ box-shadow: rgba(0, 0, 0, 0.08) 0 3px 10px 0;
159
+ }
160
+
161
+ .link-item:active {
162
+ border-color: #1EA7FD;
163
+ transform: translate3d(0, 0, 0);
164
+ }
165
+
166
+ .link-item strong {
167
+ font-weight: 700;
168
+ display: block;
169
+ margin-bottom: 2px;
170
+ }
171
+
172
+ .link-item img {
173
+ height: 40px;
174
+ width: 40px;
175
+ margin-right: 15px;
176
+ flex: none;
177
+ }
178
+
179
+ .link-item span {
180
+ font-size: 14px;
181
+ line-height: 20px;
182
+ }
183
+
184
+ .tip {
185
+ display: inline-block;
186
+ border-radius: 1em;
187
+ font-size: 11px;
188
+ line-height: 12px;
189
+ font-weight: 700;
190
+ background: #E7FDD8;
191
+ color: #66BF3C;
192
+ padding: 4px 12px;
193
+ margin-right: 10px;
194
+ vertical-align: top;
195
+ }
196
+
197
+ .tip-wrapper {
198
+ font-size: 13px;
199
+ line-height: 20px;
200
+ margin-top: 40px;
201
+ margin-bottom: 40px;
202
+ }
203
+
204
+ .tip-wrapper code {
205
+ font-size: 12px;
206
+ display: inline-block;
207
+ }
208
+ `}
209
+ </style>
210
+
211
+
212
+
@@ -0,0 +1,30 @@
1
+ .storybook-button {
2
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
+ font-weight: 700;
4
+ border: 0;
5
+ border-radius: 3em;
6
+ cursor: pointer;
7
+ display: inline-block;
8
+ line-height: 1;
9
+ }
10
+ .storybook-button--primary {
11
+ color: white;
12
+ background-color: #1ea7fd;
13
+ }
14
+ .storybook-button--secondary {
15
+ color: #333;
16
+ background-color: transparent;
17
+ box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
18
+ }
19
+ .storybook-button--small {
20
+ font-size: 12px;
21
+ padding: 10px 16px;
22
+ }
23
+ .storybook-button--medium {
24
+ font-size: 14px;
25
+ padding: 11px 20px;
26
+ }
27
+ .storybook-button--large {
28
+ font-size: 16px;
29
+ padding: 12px 24px;
30
+ }
@@ -0,0 +1,32 @@
1
+ .storybook-header {
2
+ font-family: 'Nunito Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
3
+ border-bottom: 1px solid rgba(0, 0, 0, 0.1);
4
+ padding: 15px 20px;
5
+ display: flex;
6
+ align-items: center;
7
+ justify-content: space-between;
8
+ }
9
+
10
+ .storybook-header svg {
11
+ display: inline-block;
12
+ vertical-align: top;
13
+ }
14
+
15
+ .storybook-header h1 {
16
+ font-weight: 700;
17
+ font-size: 20px;
18
+ line-height: 1;
19
+ margin: 6px 0 6px 10px;
20
+ display: inline-block;
21
+ vertical-align: top;
22
+ }
23
+
24
+ .storybook-header button + button {
25
+ margin-left: 10px;
26
+ }
27
+
28
+ .storybook-header .welcome {
29
+ color: #333;
30
+ font-size: 14px;
31
+ margin-right: 10px;
32
+ }
@@ -0,0 +1,22 @@
1
+ module.exports = {
2
+ resolve: {
3
+ alias: {
4
+ vue: '@vue/compat'
5
+ }
6
+ },
7
+ module: {
8
+ rules: [
9
+ {
10
+ test: /\.vue$/,
11
+ loader: 'vue-loader',
12
+ options: {
13
+ compilerOptions: {
14
+ compatConfig: {
15
+ MODE: 2
16
+ }
17
+ }
18
+ }
19
+ }
20
+ ]
21
+ }
22
+ }