@policystudio/policy-studio-ui-vue 1.1.90-beta.5 → 1.1.91
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.
- package/.eslintrc.js +67 -81
- package/.github/workflows/deploy-storybook.yml +1 -1
- package/.storybook/PolicyStudio.js +10 -0
- package/.storybook/eventBus.js +3 -0
- package/.storybook/main.js +25 -0
- package/.storybook/manager.js +6 -0
- package/babel.config.js +3 -17
- package/backup-package-lock.json +37194 -0
- package/dist/css/psui_styles.css +110273 -4031
- package/package.json +33 -52
- package/postcss.config.js +1 -1
- package/src/assets/scss/base.scss +23 -27
- package/src/assets/scss/components/PsAccordion.scss +1 -1
- package/src/assets/scss/components/PsChips.scss +3 -3
- package/src/assets/scss/components/PsCostEffectBar.scss +4 -4
- package/src/assets/scss/components/PsProgressBar.scss +4 -4
- package/src/assets/scss/components/PsTabHeader.scss +1 -1
- package/src/assets/scss/components/PsTableResults.scss +1 -1
- package/src/assets/scss/components/PsTestimonialCard.scss +1 -1
- package/src/components/accordion/PsAccordion.vue +21 -20
- package/src/components/accordion/PsAccordionItem.vue +8 -30
- package/src/components/badges-and-tags/PsBadgeWithIcon.vue +4 -8
- package/src/components/badges-and-tags/PsCardInfos.vue +1 -3
- package/src/components/badges-and-tags/PsChartLegend.vue +5 -19
- package/src/components/badges-and-tags/PsCostEffectBar.vue +5 -4
- package/src/components/badges-and-tags/PsHighlightRippleDot.vue +1 -1
- package/src/components/badges-and-tags/PsProgressBar.vue +1 -1
- package/src/components/badges-and-tags/PsTestimonialCard.vue +4 -6
- package/src/components/buttons/PsButton.vue +88 -85
- package/src/components/chips/PsChips.vue +2 -5
- package/src/components/controls/PsCheckbox.vue +2 -5
- package/src/components/controls/PsCheckboxSimple.vue +4 -4
- package/src/components/controls/PsDraggable.vue +67 -70
- package/src/components/controls/PsInlineSelector.vue +14 -13
- package/src/components/controls/PsRadioButton.vue +5 -10
- package/src/components/controls/PsRadioButtonSimple.vue +3 -3
- package/src/components/controls/PsSlider.vue +6 -6
- package/src/components/controls/PsSwitch.vue +3 -13
- package/src/components/controls/PsToggle.vue +11 -14
- package/src/components/data-graphics/PsBarChart.vue +2 -4
- package/src/components/datatable/PsDataTable.vue +5 -14
- package/src/components/datatable/PsDataTableItem.vue +4 -17
- package/src/components/forms/PsDropdown.vue +5 -8
- package/src/components/forms/PsDropdownList.vue +1 -1
- package/src/components/forms/PsInput.vue +14 -30
- package/src/components/forms/PsInputSelect.vue +11 -33
- package/src/components/forms/PsInputTextArea.vue +4 -15
- package/src/components/navigations/PsBreadcrumb.vue +1 -1
- package/src/components/notifications/PsDialog.vue +5 -11
- package/src/components/notifications/PsSimpleAlert.vue +10 -22
- package/src/components/notifications/PsToast.vue +3 -8
- package/src/components/playground/PsScrollBar.vue +50 -122
- package/src/components/table-results/PsTableResults.vue +60 -76
- package/src/components/table-results/PsTableResultsBody.vue +1 -3
- package/src/components/table-results/PsTableResultsHead.vue +13 -32
- package/src/components/table-results/PsTableResultsHeadComparison.vue +8 -24
- package/src/components/table-results/PsTableResultsHeadFlexible.vue +11 -23
- package/src/components/table-results/PsTableResultsRow.vue +2 -6
- package/src/components/tabs/PsTabHeader.vue +16 -19
- package/src/components/tooltip/PsDialogTooltip.vue +8 -18
- package/src/components/tooltip/PsRichTooltip.vue +5 -12
- package/src/components/tooltip/PsTooltip.vue +9 -17
- package/src/components/ui/PsDotLoader.vue +5 -5
- package/src/components/ui/PsIcon.vue +2 -6
- package/src/{index.ts → index.js} +1 -0
- package/src/stories/{Accordion.stories.ts → Accordion.stories.js} +2 -2
- package/src/stories/{BadgeWithIcon.stories.ts → BadgeWithIcon.stories.js} +1 -1
- package/src/stories/{BarChart.stories.ts → BarChart.stories.js} +1 -1
- package/src/stories/{Breadcrumb.stories.ts → Breadcrumb.stories.js} +4 -1
- package/src/stories/Button.stories.js +130 -0
- package/src/stories/{CardInfos.stories.ts → CardInfos.stories.js} +2 -1
- package/src/stories/{ChartLegend.stories.ts → ChartLegend.stories.js} +2 -1
- package/src/stories/{Checkbox.stories.ts → Checkbox.stories.js} +1 -1
- package/src/stories/{CheckboxSimple.stories.ts → CheckboxSimple.stories.js} +1 -1
- package/src/stories/{Chips.stories.ts → Chips.stories.js} +22 -24
- package/src/stories/{ClimateZoneBadge.stories.ts → ClimateZoneBadge.stories.js} +1 -1
- package/src/stories/{CostEffectBar.stories.ts → CostEffectBar.stories.js} +1 -1
- package/src/stories/{Datatable.stories.ts → Datatable.stories.js} +2 -2
- package/src/stories/{DateCardInfo.stories.ts → DateCardInfo.stories.js} +5 -1
- package/src/stories/{ElevationSystem.mdx → ElevationSystem.stories.mdx} +1 -1
- package/src/stories/{InlineSelector.stories.ts → InlineSelector.stories.js} +1 -1
- package/src/stories/{InputTextArea.stories.ts → InputTextArea.stories.js} +1 -1
- package/src/stories/{Introduction.mdx → Introduction.stories.mdx} +101 -101
- package/src/stories/{RadioButtonSimple.stories.ts → RadioButtonSimple.stories.js} +1 -1
- package/src/stories/{Toggle.stories.ts → Toggle.stories.js} +1 -1
- package/src/stories/{Tooltip.stories.ts → Tooltip.stories.js} +3 -3
- package/src/stories/{Typography.mdx → Typography.stories.mdx} +105 -107
- package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +4 -4
- package/src/util/{imageLoader.ts → imageLoader.js} +7 -7
- package/tailwind.config.js +2 -11
- package/.eslintignore +0 -1
- package/.storybook/PolicyStudio.ts +0 -11
- package/.storybook/eventBus.ts +0 -26
- package/.storybook/main.ts +0 -21
- package/.storybook/manager.ts +0 -7
- package/scripts/kill-port.sh +0 -12
- package/src/App.vue +0 -30
- package/src/shims-vue.d.ts +0 -11
- package/src/stories/Button.stories.ts +0 -48
- package/src/stories/Button.vue +0 -59
- package/src/stories/Header.stories.ts +0 -41
- package/src/stories/Header.vue +0 -77
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/tsconfig.json +0 -42
- package/webpack.config.js +0 -22
- /package/.storybook/{preview.ts → preview.js} +0 -0
- /package/src/contents/{ComparisonData.ts → ComparisonData.js} +0 -0
- /package/src/contents/{FlexibleData.ts → FlexibleData.js} +0 -0
- /package/src/contents/{ResultsData.ts → ResultsData.js} +0 -0
- /package/src/stories/{Colors.mdx → Colors.stories.mdx} +0 -0
- /package/src/stories/{Dialog.stories.ts → Dialog.stories.js} +0 -0
- /package/src/stories/{Draggable.stories.ts → Draggable.stories.js} +0 -0
- /package/src/stories/{Dropdown.stories.ts → Dropdown.stories.js} +0 -0
- /package/src/stories/{DropdownList.stories.ts → DropdownList.stories.js} +0 -0
- /package/src/stories/{HighlightRippleDot.stories.ts → HighlightRippleDot.stories.js} +0 -0
- /package/src/stories/{Icon.stories.ts → Icon.stories.js} +0 -0
- /package/src/stories/{Input.stories.ts → Input.stories.js} +0 -0
- /package/src/stories/{InputSelect.stories.ts → InputSelect.stories.js} +0 -0
- /package/src/stories/{MiniTag.stories.ts → MiniTag.stories.js} +0 -0
- /package/src/stories/{Playground.stories.ts → Playground.stories.js} +0 -0
- /package/src/stories/{ProgressBar.stories.ts → ProgressBar.stories.js} +0 -0
- /package/src/stories/{RadioButton.stories.ts → RadioButton.stories.js} +0 -0
- /package/src/stories/{SimpleAlert.stories.ts → SimpleAlert.stories.js} +0 -0
- /package/src/stories/{Slider.stories.ts → Slider.stories.js} +0 -0
- /package/src/stories/{Switch.stories.ts → Switch.stories.js} +0 -0
- /package/src/stories/{TabHeader.stories.ts → TabHeader.stories.js} +0 -0
- /package/src/stories/{TableResults.stories.ts → TableResults.stories.js} +0 -0
- /package/src/stories/{TagScope.stories.ts → TagScope.stories.js} +0 -0
- /package/src/stories/{TestimonialCard.stories.ts → TestimonialCard.stories.js} +0 -0
- /package/src/stories/{Toast.stories.ts → Toast.stories.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Meta } from
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
|
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,104 +10,7 @@ import StackAlt from './assets/stackalt.svg';
|
|
|
10
10
|
|
|
11
11
|
<Meta title="Policy Studio" />
|
|
12
12
|
|
|
13
|
-
|
|
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
|
-
{`
|
|
13
|
+
<style>{`
|
|
111
14
|
.subheading {
|
|
112
15
|
--mediumdark: '#999999';
|
|
113
16
|
font-weight: 900;
|
|
@@ -207,5 +110,102 @@ We recommend building UIs with a [**component-driven**](https://componentdriven.
|
|
|
207
110
|
font-size: 12px;
|
|
208
111
|
display: inline-block;
|
|
209
112
|
}
|
|
210
|
-
|
|
211
|
-
|
|
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>
|
|
@@ -5,7 +5,7 @@ export default {
|
|
|
5
5
|
component: PsRadioButtonSimple,
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
const defaultTemplate = (args
|
|
8
|
+
const defaultTemplate = (args, {argTypes}) => ({
|
|
9
9
|
props: Object.keys(argTypes),
|
|
10
10
|
components: { PsRadioButtonSimple },
|
|
11
11
|
data: () => ({
|
|
@@ -34,7 +34,7 @@ window.addEventListener('click', (ev) => {
|
|
|
34
34
|
})
|
|
35
35
|
|
|
36
36
|
function copyText(textToCopy) {
|
|
37
|
-
|
|
37
|
+
var myTemporaryInputElement = document.createElement('input')
|
|
38
38
|
myTemporaryInputElement.type = 'text'
|
|
39
39
|
myTemporaryInputElement.value = textToCopy
|
|
40
40
|
document.body.appendChild(myTemporaryInputElement)
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
subcomponents: {PsRichTooltip, PsDialogTooltip}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
const TemplateDialog = (args
|
|
11
|
+
const TemplateDialog = (args, {argTypes}) => ({
|
|
12
12
|
props: Object.keys(argTypes),
|
|
13
13
|
components: {PsDialogTooltip},
|
|
14
14
|
template: `
|
|
@@ -41,7 +41,7 @@ const TemplateDialog = (args:any, {argTypes}:{argTypes:any}) => ({
|
|
|
41
41
|
`,
|
|
42
42
|
})
|
|
43
43
|
|
|
44
|
-
const TemplateRich = (args
|
|
44
|
+
const TemplateRich = (args,{argTypes})=>({
|
|
45
45
|
props: Object.keys(argTypes),
|
|
46
46
|
components: {PsRichTooltip},
|
|
47
47
|
template: `
|
|
@@ -74,7 +74,7 @@ const TemplateRich = (args:any, {argTypes}:{argTypes:any})=>({
|
|
|
74
74
|
`
|
|
75
75
|
})
|
|
76
76
|
|
|
77
|
-
const TemplateDefault = (args
|
|
77
|
+
const TemplateDefault = (args, {argTypes}) => ({
|
|
78
78
|
props: Object.keys(argTypes),
|
|
79
79
|
components: {PsTooltip},
|
|
80
80
|
template: `
|
|
@@ -1,111 +1,8 @@
|
|
|
1
|
-
import { Meta } from
|
|
1
|
+
import { Meta } from '@storybook/addon-docs';
|
|
2
2
|
|
|
3
3
|
<Meta title="Typography" />
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
Typography serves to present your design and content as clearly and efficiently as possible.
|
|
7
|
-
|
|
8
|
-
## 1. Introduction
|
|
9
|
-
We use only one font for all product experiences. This ensures that the UI is optimized to be highly readable, perform well and not cause disorientation as you browse the system.
|
|
10
|
-
|
|
11
|
-
### 1.1. Font family
|
|
12
|
-
We use the Lato typographic family: https://fonts.google.com/specimen/Lato
|
|
13
|
-
|
|
14
|
-
### 1.2. Font sizes
|
|
15
|
-
Keeping typography consistent and sticking to logical hierarchies ensures that elements in the UI are clear and easily recognizable when scanning the page. Text sizes, styles, and layouts were selected to balance content and UI and to foster familiarity.
|
|
16
|
-
|
|
17
|
-
<table>
|
|
18
|
-
<tr>
|
|
19
|
-
<td class="psui-w-48">
|
|
20
|
-
<p class="psui-font-bold">Headline 1</p>
|
|
21
|
-
psui-text-h1
|
|
22
|
-
</td>
|
|
23
|
-
<td class="psui-text-h1 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h1">The lazy fox jumped over the brown dog</td>
|
|
24
|
-
</tr>
|
|
25
|
-
<tr>
|
|
26
|
-
<td>
|
|
27
|
-
<p class="psui-font-bold">Headline 2</p>
|
|
28
|
-
psui-text-h2
|
|
29
|
-
</td>
|
|
30
|
-
<td class="psui-text-h2 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h2">The lazy fox jumped over the brown dog</td>
|
|
31
|
-
</tr>
|
|
32
|
-
<tr>
|
|
33
|
-
<td>
|
|
34
|
-
<p class="psui-font-bold">Headline 3</p>
|
|
35
|
-
psui-text-h3
|
|
36
|
-
</td>
|
|
37
|
-
<td class="psui-text-h3 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h3">The lazy fox jumped over the brown dog</td>
|
|
38
|
-
</tr>
|
|
39
|
-
<tr>
|
|
40
|
-
<td>
|
|
41
|
-
<p class="psui-font-bold">Headline 4</p>
|
|
42
|
-
psui-text-h4
|
|
43
|
-
</td>
|
|
44
|
-
<td class="psui-text-h4 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h4">The lazy fox jumped over the brown dog</td>
|
|
45
|
-
</tr>
|
|
46
|
-
<tr>
|
|
47
|
-
<td>
|
|
48
|
-
<p class="psui-font-bold">Headline 5</p>
|
|
49
|
-
psui-text-h5
|
|
50
|
-
</td>
|
|
51
|
-
<td class="psui-text-h5 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h5">The lazy fox jumped over the brown dog</td>
|
|
52
|
-
</tr>
|
|
53
|
-
<tr>
|
|
54
|
-
<td>
|
|
55
|
-
<p class="psui-font-bold" >Headline 6</p>
|
|
56
|
-
psui-text-h6
|
|
57
|
-
</td>
|
|
58
|
-
<td class="psui-text-h6 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h6">The lazy fox jumped over the brown dog</td>
|
|
59
|
-
</tr>
|
|
60
|
-
<tr>
|
|
61
|
-
<td>
|
|
62
|
-
<p class="psui-font-bold">Paragraph</p>
|
|
63
|
-
psui-text-p
|
|
64
|
-
</td>
|
|
65
|
-
<td class="psui-text-p psui-cursor-pointer click-to-copy" data-to-copy="psui-text-p">
|
|
66
|
-
This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
|
|
67
|
-
</td>
|
|
68
|
-
</tr>
|
|
69
|
-
<tr>
|
|
70
|
-
<td>
|
|
71
|
-
<p class="psui-font-bold">Small</p>
|
|
72
|
-
psui-text-small
|
|
73
|
-
</td>
|
|
74
|
-
<td class="psui-text-small psui-cursor-pointer click-to-copy" data-to-copy="psui-text-small">
|
|
75
|
-
This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
|
|
76
|
-
</td>
|
|
77
|
-
</tr>
|
|
78
|
-
<tr>
|
|
79
|
-
<td>
|
|
80
|
-
<p class="psui-font-bold">XSmall</p>
|
|
81
|
-
psui-text-xsmall
|
|
82
|
-
</td>
|
|
83
|
-
<td class="psui-text-xsmall psui-cursor-pointer click-to-copy" data-to-copy="psui-text-xsmall">
|
|
84
|
-
This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
|
|
85
|
-
</td>
|
|
86
|
-
</tr>
|
|
87
|
-
<tr>
|
|
88
|
-
<td class="psui-flex psui-flex-col">
|
|
89
|
-
<span class="psui-font-bold">Accent</span>
|
|
90
|
-
<span>psui-text-accent</span>
|
|
91
|
-
<span>psui-uppercase</span>
|
|
92
|
-
<span>psui-font-bold</span>
|
|
93
|
-
</td>
|
|
94
|
-
<td class="psui-text-accent psui-uppercase psui-font-bold psui-cursor-pointer click-to-copy" data-to-copy="psui-text-accent psui-uppercase psui-font-bold">The lazy fox jumped over the brown dog</td>
|
|
95
|
-
</tr>
|
|
96
|
-
<tr>
|
|
97
|
-
<td class="psui-flex psui-flex-col">
|
|
98
|
-
<span class="psui-font-bold">Accent Small</span>
|
|
99
|
-
<span>psui-text-accentSmall</span>
|
|
100
|
-
<span>psui-uppercase</span>
|
|
101
|
-
<span>psui-font-bold</span>
|
|
102
|
-
</td>
|
|
103
|
-
<td class="psui-text-accentSmall psui-uppercase psui-font-bold psui-cursor-pointer click-to-copy" data-to-copy="psui-text-accentSmall psui-uppercase psui-font-bold">The lazy fox jumped over the brown dog</td>
|
|
104
|
-
</tr>
|
|
105
|
-
</table>
|
|
106
|
-
|
|
107
|
-
<style>
|
|
108
|
-
{`
|
|
5
|
+
<style>{`
|
|
109
6
|
.subheading {
|
|
110
7
|
--mediumdark: '#999999';
|
|
111
8
|
font-weight: 900;
|
|
@@ -205,8 +102,109 @@ Keeping typography consistent and sticking to logical hierarchies ensures that e
|
|
|
205
102
|
font-size: 12px;
|
|
206
103
|
display: inline-block;
|
|
207
104
|
}
|
|
208
|
-
`}
|
|
209
|
-
</style>
|
|
210
105
|
|
|
106
|
+
|
|
107
|
+
`}</style>
|
|
108
|
+
|
|
109
|
+
# Typography
|
|
110
|
+
Typography serves to present your design and content as clearly and efficiently as possible.
|
|
111
|
+
|
|
112
|
+
## 1. Introduction
|
|
113
|
+
We use only one font for all product experiences. This ensures that the UI is optimized to be highly readable, perform well and not cause disorientation as you browse the system.
|
|
114
|
+
|
|
115
|
+
### 1.1. Font family
|
|
116
|
+
We use the Lato typographic family: https://fonts.google.com/specimen/Lato
|
|
117
|
+
|
|
118
|
+
### 1.2. Font sizes
|
|
119
|
+
Keeping typography consistent and sticking to logical hierarchies ensures that elements in the UI are clear and easily recognizable when scanning the page. Text sizes, styles, and layouts were selected to balance content and UI and to foster familiarity.
|
|
211
120
|
|
|
121
|
+
<table>
|
|
122
|
+
<tr>
|
|
123
|
+
<td class="psui-w-48">
|
|
124
|
+
<p class="psui-font-bold">Headline 1</p>
|
|
125
|
+
psui-text-h1
|
|
126
|
+
</td>
|
|
127
|
+
<td class="psui-text-h1 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h1">The lazy fox jumped over the brown dog</td>
|
|
128
|
+
</tr>
|
|
129
|
+
<tr>
|
|
130
|
+
<td>
|
|
131
|
+
<p class="psui-font-bold">Headline 2</p>
|
|
132
|
+
psui-text-h2
|
|
133
|
+
</td>
|
|
134
|
+
<td class="psui-text-h2 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h2">The lazy fox jumped over the brown dog</td>
|
|
135
|
+
</tr>
|
|
136
|
+
<tr>
|
|
137
|
+
<td>
|
|
138
|
+
<p class="psui-font-bold">Headline 3</p>
|
|
139
|
+
psui-text-h3
|
|
140
|
+
</td>
|
|
141
|
+
<td class="psui-text-h3 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h3">The lazy fox jumped over the brown dog</td>
|
|
142
|
+
</tr>
|
|
143
|
+
<tr>
|
|
144
|
+
<td>
|
|
145
|
+
<p class="psui-font-bold">Headline 4</p>
|
|
146
|
+
psui-text-h4
|
|
147
|
+
</td>
|
|
148
|
+
<td class="psui-text-h4 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h4">The lazy fox jumped over the brown dog</td>
|
|
149
|
+
</tr>
|
|
150
|
+
<tr>
|
|
151
|
+
<td>
|
|
152
|
+
<p class="psui-font-bold">Headline 5</p>
|
|
153
|
+
psui-text-h5
|
|
154
|
+
</td>
|
|
155
|
+
<td class="psui-text-h5 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h5">The lazy fox jumped over the brown dog</td>
|
|
156
|
+
</tr>
|
|
157
|
+
<tr>
|
|
158
|
+
<td>
|
|
159
|
+
<p class="psui-font-bold" >Headline 6</p>
|
|
160
|
+
psui-text-h6
|
|
161
|
+
</td>
|
|
162
|
+
<td class="psui-text-h6 psui-cursor-pointer click-to-copy" data-to-copy="psui-text-h6">The lazy fox jumped over the brown dog</td>
|
|
163
|
+
</tr>
|
|
164
|
+
<tr>
|
|
165
|
+
<td>
|
|
166
|
+
<p class="psui-font-bold">Paragraph</p>
|
|
167
|
+
psui-text-p
|
|
168
|
+
</td>
|
|
169
|
+
<td class="psui-text-p psui-cursor-pointer click-to-copy" data-to-copy="psui-text-p">
|
|
170
|
+
This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
|
|
171
|
+
</td>
|
|
172
|
+
</tr>
|
|
173
|
+
<tr>
|
|
174
|
+
<td>
|
|
175
|
+
<p class="psui-font-bold">Small</p>
|
|
176
|
+
psui-text-small
|
|
177
|
+
</td>
|
|
178
|
+
<td class="psui-text-small psui-cursor-pointer click-to-copy" data-to-copy="psui-text-small">
|
|
179
|
+
This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
|
|
180
|
+
</td>
|
|
181
|
+
</tr>
|
|
182
|
+
<tr>
|
|
183
|
+
<td>
|
|
184
|
+
<p class="psui-font-bold">XSmall</p>
|
|
185
|
+
psui-text-xsmall
|
|
186
|
+
</td>
|
|
187
|
+
<td class="psui-text-xsmall psui-cursor-pointer click-to-copy" data-to-copy="psui-text-xsmall">
|
|
188
|
+
This tool allows you to dive into the cost-effectiveness findings relevant to your City or County. We’ve also embedded explanations of terms and concepts throughout the tool, as well as much of the supplementary information contained in the cost-effectiveness studies.
|
|
189
|
+
</td>
|
|
190
|
+
</tr>
|
|
191
|
+
<tr>
|
|
192
|
+
<td class="psui-flex psui-flex-col">
|
|
193
|
+
<span class="psui-font-bold">Accent</span>
|
|
194
|
+
<span>psui-text-accent</span>
|
|
195
|
+
<span>psui-uppercase</span>
|
|
196
|
+
<span>psui-font-bold</span>
|
|
197
|
+
</td>
|
|
198
|
+
<td class="psui-text-accent psui-uppercase psui-font-bold psui-cursor-pointer click-to-copy" data-to-copy="psui-text-accent psui-uppercase psui-font-bold">The lazy fox jumped over the brown dog</td>
|
|
199
|
+
</tr>
|
|
200
|
+
<tr>
|
|
201
|
+
<td class="psui-flex psui-flex-col">
|
|
202
|
+
<span class="psui-font-bold">Accent Small</span>
|
|
203
|
+
<span>psui-text-accentSmall</span>
|
|
204
|
+
<span>psui-uppercase</span>
|
|
205
|
+
<span>psui-font-bold</span>
|
|
206
|
+
</td>
|
|
207
|
+
<td class="psui-text-accentSmall psui-uppercase psui-font-bold psui-cursor-pointer click-to-copy" data-to-copy="psui-text-accentSmall psui-uppercase psui-font-bold">The lazy fox jumped over the brown dog</td>
|
|
208
|
+
</tr>
|
|
209
|
+
</table>
|
|
212
210
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export const randomString = (length) => {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
var result = ''
|
|
3
|
+
var characters =
|
|
4
4
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'
|
|
5
|
-
|
|
6
|
-
for (
|
|
5
|
+
var charactersLength = characters.length
|
|
6
|
+
for (var i = 0; i < length; i++) {
|
|
7
7
|
result += characters.charAt(Math.floor(Math.random() * charactersLength))
|
|
8
8
|
}
|
|
9
9
|
return result
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
|
|
2
2
|
return new Promise((resolve, reject) => {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
var xhr = new XMLHttpRequest()
|
|
4
|
+
var notifiedNotComputable = false
|
|
5
5
|
|
|
6
6
|
xhr.open('GET', imageUrl, true)
|
|
7
7
|
xhr.responseType = 'arraybuffer'
|
|
8
8
|
|
|
9
9
|
xhr.onprogress = (ev) => {
|
|
10
10
|
if (ev.lengthComputable) {
|
|
11
|
-
|
|
11
|
+
let progress = parseInt((ev.loaded / ev.total) * 100)
|
|
12
12
|
if(onProgress) onProgress(progress)
|
|
13
13
|
} else {
|
|
14
14
|
if (!notifiedNotComputable) {
|
|
@@ -30,11 +30,11 @@ export default ({ imageUrl, onProgress = null, returnsBase64 = true }) => {
|
|
|
30
30
|
if(!returnsBase64) {
|
|
31
31
|
resolve()
|
|
32
32
|
} else {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
var options = {}
|
|
34
|
+
var headers = xhr.getAllResponseHeaders()
|
|
35
|
+
var mime = headers.match(/^Content-Type\\:\s*(.*?)$/mi)
|
|
36
36
|
if (mime && mime[1]) options.type = mime[1]
|
|
37
|
-
|
|
37
|
+
var blob = new Blob([xhr.response], options)
|
|
38
38
|
resolve(window.URL.createObjectURL(blob))
|
|
39
39
|
}
|
|
40
40
|
}
|
package/tailwind.config.js
CHANGED
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
/** @type {import('tailwindcss').Config} */
|
|
2
|
-
|
|
3
1
|
module.exports = {
|
|
4
2
|
prefix: 'psui-',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
'./src/**/*.vue',
|
|
8
|
-
'./src/**/*.js',
|
|
9
|
-
'./src/**/*.ts',
|
|
10
|
-
'./src/**/*.jsx',
|
|
11
|
-
'./src/**/*.tsx',
|
|
12
|
-
],
|
|
13
|
-
darkMode: 'media', // or 'media' or 'class'
|
|
3
|
+
purge: ['./index.html', './src/**/*.vue,js,ts,jsx,tsx}'],
|
|
4
|
+
darkMode: false, // or 'media' or 'class'
|
|
14
5
|
theme: {
|
|
15
6
|
colors: {
|
|
16
7
|
'white': '#ffffff ',
|
package/.eslintignore
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.storybook
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { create } from '@storybook/theming'
|
|
2
|
-
import PolicyStudioUiLogo from '../src/assets/images/policy-studio.svg'
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export default create({
|
|
6
|
-
base: 'light',
|
|
7
|
-
brandTitle: 'Policy Studio UI Vue',
|
|
8
|
-
brandUrl: 'https://policystudio.co/',
|
|
9
|
-
brandImage: PolicyStudioUiLogo,
|
|
10
|
-
brandTarget: '_blank',
|
|
11
|
-
});
|
package/.storybook/eventBus.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// this was a vue2 syntax
|
|
2
|
-
// import Vue from 'vue';
|
|
3
|
-
// export const eventBus = new Vue();
|
|
4
|
-
|
|
5
|
-
// import { createApp } from 'vue';
|
|
6
|
-
|
|
7
|
-
// export const app = createApp({});
|
|
8
|
-
// const emitter = app.config.globalProperties.$emitter = {};
|
|
9
|
-
|
|
10
|
-
// export const eventBus = {
|
|
11
|
-
// on(event, callback) {
|
|
12
|
-
// if (!emitter[event]) {
|
|
13
|
-
// emitter[event] = [];
|
|
14
|
-
// }
|
|
15
|
-
// emitter[event].push(callback);
|
|
16
|
-
// },
|
|
17
|
-
// emit(event, ...args) {
|
|
18
|
-
// if (emitter[event]) {
|
|
19
|
-
// emitter[event].forEach(callback => {
|
|
20
|
-
// callback(...args);
|
|
21
|
-
// });
|
|
22
|
-
// }
|
|
23
|
-
// },
|
|
24
|
-
// };
|
|
25
|
-
|
|
26
|
-
// app.mount('#app');
|
package/.storybook/main.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/** @type { import('@storybook/vue3-webpack5').StorybookConfig } */
|
|
2
|
-
const config = {
|
|
3
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
4
|
-
addons: [
|
|
5
|
-
"@storybook/addon-links",
|
|
6
|
-
"@storybook/addon-essentials",
|
|
7
|
-
"@storybook/addon-interactions",
|
|
8
|
-
],
|
|
9
|
-
framework: {
|
|
10
|
-
name: "@storybook/vue3-webpack5",
|
|
11
|
-
options: {
|
|
12
|
-
builder: {
|
|
13
|
-
useSWC: true,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
docs: {
|
|
18
|
-
autodocs: "tag",
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
export default config;
|
package/.storybook/manager.ts
DELETED
package/scripts/kill-port.sh
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# Find the process using port 3000
|
|
4
|
-
PROCESS_ID=$(lsof -t -i:6006)
|
|
5
|
-
|
|
6
|
-
# Check if a process is using the port
|
|
7
|
-
if [ -n "$PROCESS_ID" ]; then
|
|
8
|
-
echo "Killing process on port 6006 (PID: $PROCESS_ID)"
|
|
9
|
-
kill -9 $PROCESS_ID
|
|
10
|
-
else
|
|
11
|
-
echo "Port 6006 is not in use"
|
|
12
|
-
fi
|
package/src/App.vue
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<img
|
|
3
|
-
alt="Vue logo"
|
|
4
|
-
src="./assets/logo.png"
|
|
5
|
-
>
|
|
6
|
-
<HelloWorld msg="Welcome to Your Vue.js + TypeScript App" />
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script lang="ts">
|
|
10
|
-
import { defineComponent } from 'vue'
|
|
11
|
-
import HelloWorld from './components/HelloWorld.vue'
|
|
12
|
-
|
|
13
|
-
export default defineComponent({
|
|
14
|
-
name: 'App',
|
|
15
|
-
components: {
|
|
16
|
-
HelloWorld
|
|
17
|
-
}
|
|
18
|
-
})
|
|
19
|
-
</script>
|
|
20
|
-
|
|
21
|
-
<style>
|
|
22
|
-
#app {
|
|
23
|
-
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
24
|
-
-webkit-font-smoothing: antialiased;
|
|
25
|
-
-moz-osx-font-smoothing: grayscale;
|
|
26
|
-
text-align: center;
|
|
27
|
-
color: #2c3e50;
|
|
28
|
-
margin-top: 60px;
|
|
29
|
-
}
|
|
30
|
-
</style>
|