@policystudio/policy-studio-ui-vue 1.1.90-beta.10 → 1.1.90-beta.17

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 (132) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.github/workflows/deploy-storybook.yml +4 -4
  3. package/.nvmrc +1 -0
  4. package/dist/css/psui_styles_output.css +6986 -0
  5. package/package.json +9 -23
  6. package/src/assets/scss/components/PsDataTable.scss +1 -1
  7. package/src/components/accordion/PsAccordionItem.vue +75 -75
  8. package/src/components/badges-and-tags/PsBadgeWithIcon.vue +31 -34
  9. package/src/components/badges-and-tags/PsCardInfos.vue +40 -41
  10. package/src/components/badges-and-tags/PsChartLegend.vue +47 -51
  11. package/src/components/badges-and-tags/PsClimateZoneBadge.vue +14 -19
  12. package/src/components/badges-and-tags/PsCostEffectBar.vue +24 -56
  13. package/src/components/badges-and-tags/PsDateCardInfo.vue +17 -18
  14. package/src/components/badges-and-tags/PsHighlightRippleDot.vue +3 -2
  15. package/src/components/badges-and-tags/PsMiniTag.vue +39 -41
  16. package/src/components/badges-and-tags/PsProgressBar.vue +72 -68
  17. package/src/components/badges-and-tags/PsTagScope.vue +17 -22
  18. package/src/components/badges-and-tags/PsTestimonialCard.vue +20 -26
  19. package/src/components/buttons/PsButton.vue +61 -62
  20. package/src/components/chips/PsChips.vue +98 -101
  21. package/src/components/controls/PsCheckbox.vue +84 -84
  22. package/src/components/controls/PsCheckboxSimple.vue +95 -95
  23. package/src/components/controls/PsDraggable.vue +53 -55
  24. package/src/components/controls/PsInlineSelector.vue +99 -99
  25. package/src/components/controls/PsRadioButton.vue +59 -58
  26. package/src/components/controls/PsRadioButtonSimple.vue +79 -75
  27. package/src/components/controls/PsSlider.vue +185 -176
  28. package/src/components/controls/PsSwitch.vue +51 -52
  29. package/src/components/controls/PsToggle.vue +53 -50
  30. package/src/components/data-graphics/PsBarChart.vue +19 -21
  31. package/src/components/datatable/PsDataTable.vue +56 -60
  32. package/src/components/datatable/PsDataTableItem.vue +14 -28
  33. package/src/components/forms/PsDropdown.vue +164 -162
  34. package/src/components/forms/PsDropdownList.vue +132 -129
  35. package/src/components/forms/PsInput.vue +155 -153
  36. package/src/components/forms/PsInputSelect.vue +91 -92
  37. package/src/components/forms/PsInputTextArea.vue +71 -71
  38. package/src/components/navigations/PsBreadcrumb.vue +26 -34
  39. package/src/components/notifications/PsDialog.vue +57 -56
  40. package/src/components/notifications/PsSimpleAlert.vue +28 -29
  41. package/src/components/notifications/PsToast.vue +40 -39
  42. package/src/components/table-results/PsTableResults.vue +452 -458
  43. package/src/components/table-results/PsTableResultsBody.vue +66 -67
  44. package/src/components/table-results/PsTableResultsHead.vue +62 -56
  45. package/src/components/table-results/PsTableResultsHeadComparison.vue +62 -56
  46. package/src/components/table-results/PsTableResultsHeadFlexible.vue +63 -56
  47. package/src/components/table-results/PsTableResultsRow.vue +55 -56
  48. package/src/components/tabs/PsTabHeader.vue +106 -100
  49. package/src/components/tooltip/PsDialogTooltip.vue +96 -101
  50. package/src/components/tooltip/PsRichTooltip.vue +42 -45
  51. package/src/components/tooltip/PsTooltip.vue +111 -116
  52. package/src/components/ui/PsDotLoader.vue +1 -5
  53. package/src/components/ui/PsIcon.vue +126 -129
  54. package/src/index.ts +56 -66
  55. package/src/tsconfig.json +12 -0
  56. package/src/{shims-vue.d.ts → types/index.d.ts} +0 -5
  57. package/src/util/{GeneralFunctions.ts → GeneralFunctions.js} +3 -5
  58. package/src/util/directives.ts +24 -0
  59. package/src/util/eventBus.js +10 -0
  60. package/src/util/{imageLoader.ts → imageLoader.js} +9 -8
  61. package/tailwind.config.js +1 -1
  62. package/tsconfig.json +16 -18
  63. package/.storybook/PolicyStudio.ts +0 -11
  64. package/.storybook/eventBus.ts +0 -26
  65. package/.storybook/main.ts +0 -21
  66. package/.storybook/manager.ts +0 -7
  67. package/.storybook/preview.ts +0 -17
  68. package/dist/css/psui_styles.css +0 -4647
  69. package/postcss.config.js +0 -8
  70. package/src/assets/images/multifamily-units.svg +0 -10
  71. package/src/assets/images/policy-studio.svg +0 -15
  72. package/src/components/playground/PsScrollBar.vue +0 -320
  73. package/src/contents/ComparisonData.ts +0 -378
  74. package/src/contents/FlexibleData.ts +0 -502
  75. package/src/contents/ResultsData.ts +0 -531
  76. package/src/stories/Accordion.stories.ts +0 -59
  77. package/src/stories/BadgeWithIcon.stories.ts +0 -31
  78. package/src/stories/BarChart.stories.ts +0 -17
  79. package/src/stories/Breadcrumb.stories.ts +0 -22
  80. package/src/stories/Button.stories.ts +0 -48
  81. package/src/stories/Button.vue +0 -59
  82. package/src/stories/CardInfos.stories.ts +0 -15
  83. package/src/stories/ChartLegend.stories.ts +0 -15
  84. package/src/stories/Checkbox.stories.ts +0 -45
  85. package/src/stories/CheckboxSimple.stories.ts +0 -49
  86. package/src/stories/Chips.stories.ts +0 -33
  87. package/src/stories/ClimateZoneBadge.stories.ts +0 -28
  88. package/src/stories/Colors.mdx +0 -70
  89. package/src/stories/CostEffectBar.stories.ts +0 -26
  90. package/src/stories/Datatable.stories.ts +0 -53
  91. package/src/stories/DateCardInfo.stories.ts +0 -20
  92. package/src/stories/Dialog.stories.ts +0 -131
  93. package/src/stories/Draggable.stories.ts +0 -32
  94. package/src/stories/Dropdown.stories.ts +0 -89
  95. package/src/stories/DropdownList.stories.ts +0 -213
  96. package/src/stories/ElevationSystem.mdx +0 -41
  97. package/src/stories/Header.stories.ts +0 -42
  98. package/src/stories/Header.vue +0 -77
  99. package/src/stories/HighlightRippleDot.stories.ts +0 -16
  100. package/src/stories/Icon.stories.ts +0 -22
  101. package/src/stories/InlineSelector.stories.ts +0 -18
  102. package/src/stories/Input.stories.ts +0 -244
  103. package/src/stories/InputSelect.stories.ts +0 -31
  104. package/src/stories/InputTextArea.stories.ts +0 -25
  105. package/src/stories/Introduction.mdx +0 -211
  106. package/src/stories/MiniTag.stories.ts +0 -59
  107. package/src/stories/Playground.stories.ts +0 -16
  108. package/src/stories/ProgressBar.stories.ts +0 -24
  109. package/src/stories/RadioButton.stories.ts +0 -41
  110. package/src/stories/RadioButtonSimple.stories.ts +0 -43
  111. package/src/stories/SimpleAlert.stories.ts +0 -22
  112. package/src/stories/Slider.stories.ts +0 -79
  113. package/src/stories/Switch.stories.ts +0 -39
  114. package/src/stories/TabHeader.stories.ts +0 -56
  115. package/src/stories/TableResults.stories.ts +0 -728
  116. package/src/stories/TagScope.stories.ts +0 -17
  117. package/src/stories/TestimonialCard.stories.ts +0 -27
  118. package/src/stories/Toast.stories.ts +0 -52
  119. package/src/stories/Toggle.stories.ts +0 -48
  120. package/src/stories/Tooltip.stories.ts +0 -114
  121. package/src/stories/Typography.mdx +0 -212
  122. package/src/stories/assets/code-brackets.svg +0 -1
  123. package/src/stories/assets/colors.svg +0 -1
  124. package/src/stories/assets/comments.svg +0 -1
  125. package/src/stories/assets/direction.svg +0 -1
  126. package/src/stories/assets/flow.svg +0 -1
  127. package/src/stories/assets/plugin.svg +0 -1
  128. package/src/stories/assets/repo.svg +0 -1
  129. package/src/stories/assets/stackalt.svg +0 -1
  130. package/src/stories/button.css +0 -30
  131. package/src/stories/header.css +0 -32
  132. package/webpack.config.js +0 -36
@@ -1,89 +0,0 @@
1
- import PsDropdown from '../components/forms/PsDropdown.vue'
2
- import PsDropdownList from '../components/forms/PsDropdownList.vue'
3
- export default {
4
- title: 'Components/Dropdown',
5
- component: { PsDropdown, PsDropdownList },
6
- }
7
-
8
- const Template = (args:any, { argTypes }:{ argTypes:any }) => ({
9
- props: Object.keys(argTypes),
10
- components: { PsDropdown, PsDropdownList },
11
- template: `
12
- <div style='background: #E6ECF2; width:1200px; height: 700px; padding: 20px;' class='psui-flex psui-gap-64 psui-bg-gray-20 '>
13
- <PsDropdown>
14
- <template #dropdownTrigger>
15
- <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
16
- </template>
17
- <template #items>
18
- <div class='psui-pb-5'>
19
- <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 20px 8px 20px;'>divider label</p>
20
-
21
- <ul>
22
- <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 01</li>
23
- <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 02</li>
24
- <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 03</li>
25
-
26
- <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
27
-
28
- <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 04</li>
29
- <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 05</li>
30
- <li style='padding: 7px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer'>Selectable option 06</li>
31
- </ul>
32
- </div>
33
- </template>
34
- </PsDropdown>
35
-
36
- <PsDropdown>
37
- <template #dropdownTrigger>
38
- <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-2'>more_horiz</i>
39
- </template>
40
- <template #items>
41
- <div class='psui-pb-5'>
42
- <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
43
-
44
- <ul>
45
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
46
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
47
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
48
-
49
- <p class='psui-uppercase psui-text-gray-40 psui-text-accentSmall' style='padding: 24px 24px 8px 24px;'>divider label</p>
50
-
51
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
52
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
53
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
54
- </ul>
55
- </div>
56
- </template>
57
- </PsDropdown>
58
-
59
- <PsDropdown>
60
- <template #dropdownTrigger>
61
- <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
62
- </template>
63
- <template #items>
64
- <PsDropdownList v-bind='$props'></PsDropdownList>
65
- </template>
66
- </PsDropdown>
67
-
68
- <PsDropdown>
69
- <template #dropdownTrigger>
70
- <i class='psui-icon psui-text-gray-50 psui-cursor-pointer psui-h-auto'>more_horiz</i>
71
- </template>
72
- <template #items>
73
- <div class='psui-my-3'>
74
- <ul>
75
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>public</i><span>Selectable option 01</span></li>
76
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>share</i><span>Selectable option 02</span></li>
77
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>person</i><span>Selectable option 03</span></li>
78
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>settings</i><span>Selectable option 04</span></li>
79
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>save</i><span>Selectable option 05</span></li>
80
- <li style='padding: 5px 20px; font-size:14px' class='hover:psui-bg-blue-10 hover:psui-text-blue-60 psui-text-gray-60 psui-font-bold psui-cursor-pointer psui-flex psui-items-center psui-gap-3'><i style='font-size: 22px;' class='psui-icon'>equalizer</i><span>Selectable option 06</span></li>
81
- </ul>
82
- </div>
83
- </template>
84
- </PsDropdown>
85
- </div>
86
- `,
87
- })
88
-
89
- export const DropdownMenu = Template.bind({})
@@ -1,213 +0,0 @@
1
- // @ts-ignore
2
- import PsDropdownList, { itemStyle } from '../components/forms/PsDropdownList.vue'
3
- export default {
4
- title: 'Components/Dropdown/Dropdown List',
5
- component: { PsDropdownList },
6
- argTypes: {
7
- layout: {
8
- control: {
9
- type: 'inline-radio',
10
- options: itemStyle
11
- }
12
- },
13
- rigthLabelFormatter: {
14
- control: {
15
- type: 'select',
16
- options: [null, 'label', 'function']
17
- }
18
- }
19
- }
20
- }
21
- // @ts-ignore
22
- const Template = (args, { argTypes }) => ({
23
- props: Object.keys(argTypes),
24
- components: { PsDropdownList },
25
- data: () => ({
26
- selected: item,
27
- onlyTextItems: onlyTextItems,
28
- richItems: richItems,
29
- }),
30
- template: `
31
- <div style="width:100%;" class="psui-flex psui-gap-8 psui-bg-gray-20 psui-rounded-xl psui-p-10">
32
- <div class="psui-w-1/2">
33
- <p class="psui-text-h4 psui-font-bold psui-text-blue-80 psui-mb-2">OnlyText</p>
34
-
35
- <div class="psui-rounded psui-bg-white psui-shadow-elevation-20 psui-py-3">
36
- <PsDropdownList
37
- v-bind="$props"
38
- :items="onlyTextItems"
39
- :selected.sync="selected"
40
- left-label="title"
41
- key-value="key"
42
- layout="onlytext"
43
- :study-data="study_data"
44
- />
45
- </div>
46
- </div>
47
-
48
- <div class="psui-w-1/2">
49
- <p class="psui-text-h4 psui-font-bold psui-text-blue-80 psui-mb-2">Rich</p>
50
-
51
- <div class="psui-rounded psui-bg-white psui-shadow-elevation-20 psui-py-3">
52
- <PsDropdownList
53
- v-bind="$props"
54
- :items="richItems"
55
- :selected.sync="selected"
56
- left-label="title"
57
- key-value="key"
58
- layout="rich"
59
- :study-data="study_data"
60
- />
61
- </div>
62
- </div>
63
- </div>
64
- `,
65
- })
66
-
67
- const onlyTextItems = [
68
- {
69
- 'key': 'item_01',
70
- 'title': 'Dropdown Item',
71
- },
72
- {
73
- 'key': 'item_02',
74
- 'title': 'Dropdown Item',
75
- },
76
- {
77
- 'key': 'item_03',
78
- 'title': 'Dropdown Item',
79
- },
80
- {
81
- 'key': 'item_04',
82
- 'title': 'Dropdown Item',
83
- },
84
- {
85
- 'key': 'item_05',
86
- 'title': 'Dropdown Item',
87
- },
88
- {
89
- 'key': 'item_06',
90
- 'title': 'Dropdown Item',
91
- },
92
- ]
93
-
94
- const richItems = [
95
- {
96
- 'isActive': true,
97
- 'key': 'forecast_units_affected',
98
- 'title': 'Affected Units',
99
- 'description': '(lifecycle)',
100
- 'right_label': '00',
101
- 'hasProjections': true,
102
- 'hasHelper': {
103
- 'type': 'helpers',
104
- 'id': 17,
105
- 'slug': 'forecast_units_affected'
106
- },
107
- 'chartProjection': {
108
- 'title': 'Number of Affected Units',
109
- 'subtitle': ''
110
- }
111
- },
112
- {
113
- 'isActive': false,
114
- 'key': 'forecast_initial_cost',
115
- 'title': 'Compliance Cost',
116
- 'description': '(lifecycle)',
117
- 'right_label': '00',
118
- 'hasProjections': true,
119
- 'hasHelper': {
120
- 'type': 'helpers',
121
- 'id': 20,
122
- 'slug': 'forecast_initial_cost'
123
- },
124
- 'chartProjection': {
125
- 'title': 'Compliance Cost',
126
- 'subtitle': ''
127
- }
128
- },
129
- {
130
- 'isActive': true,
131
- 'key': 'forecast_emissions_savings',
132
- 'title': 'Emissions Reductions',
133
- 'description': '(lifecycle MTCO²e)',
134
- 'right_label': '00',
135
- 'hasProjections': true,
136
- 'hasHelper': {
137
- 'type': 'helpers',
138
- 'id': 18,
139
- 'slug': 'forecast_emissions_savings'
140
- },
141
- 'chartProjection': {
142
- 'title': 'Emissions Reductions',
143
- 'subtitle': 'MTCO²e'
144
- }
145
- },
146
- {
147
- 'isActive': true,
148
- 'key': 'forecast_lifecycle_savings',
149
- 'title': 'Lifecycle Savings',
150
- 'description': '(on-bill)',
151
- 'right_label': '00',
152
- 'hasProjections': true,
153
- 'hasHelper': {
154
- 'type': 'helpers',
155
- 'id': 19,
156
- 'slug': 'forecast_lifecycle_savings'
157
- },
158
- 'chartProjection': {
159
- 'title': 'Bill Savings',
160
- 'subtitle': ''
161
- }
162
- },
163
- {
164
- 'isActive': false,
165
- 'key': 'forecast_kwh_savings',
166
- 'title': 'Electricity Savings',
167
- 'description': '(lifecycle kWh)',
168
- 'right_label': '00',
169
- 'hasProjections': true,
170
- 'hasHelper': {
171
- 'type': 'helpers',
172
- 'id': 21,
173
- 'slug': 'forecast_kwh_savings'
174
- },
175
- 'chartProjection': {
176
- 'title': 'Electricity Savings',
177
- 'subtitle': 'kWh'
178
- }
179
- },
180
- {
181
- 'isActive': false,
182
- 'key': 'forecast_therms_savings',
183
- 'title': 'Gas Savings',
184
- 'description': '(lifecycle therms)',
185
- 'right_label': '00',
186
- 'hasProjections': true,
187
- 'hasHelper': {
188
- 'type': 'helpers',
189
- 'id': 22,
190
- 'slug': 'forecast_therms_savings'
191
- },
192
- 'chartProjection': {
193
- 'title': 'Gas Savings',
194
- 'subtitle': 'therms'
195
- }
196
- }
197
- ]
198
- const item = richItems[0]
199
- const studyData = {
200
- 'forecast_units_affected': 7001.75,
201
- 'forecast_emissions_savings': 17575.66588897,
202
- 'forecast_therms_savings': 5060589.279978376,
203
- 'forecast_kwh_savings': -104561078.77158748,
204
- 'forecast_lifecycle_savings': -40645997.14350001,
205
- 'forecast_initial_cost': -21144739.311334003
206
- }
207
-
208
- export const DropdownList = Template.bind({})
209
- // @ts-ignore
210
- DropdownList.args = {
211
- items: onlyTextItems,
212
- study_data: studyData,
213
- }
@@ -1,41 +0,0 @@
1
- import { Meta, Story } from '@storybook/addon-docs';
2
-
3
- <Meta title="Elevation system" />
4
-
5
- <style>{`
6
- .mx-auto { margin: 0 auto; }
7
- `}</style>
8
-
9
- # Elevation system
10
- Elevation is the distance between two surfaces on the z-axis. Evidenced by the use of shadows.
11
-
12
- ## 1. Introduction
13
- Elevation is evidenced by the use of shadows. It's another way to establish a visual hierarchy, create prominence, and increase contrast between interface elements and regions. Because shadows express the degree of elevation between surfaces, they must be used consistently across the tool.
14
-
15
- ### 1.1. Shadow and light
16
- The shadows in our elements are projected by these two light sources: main light and ambient light.
17
- <div class="psui-grid psui-grid-cols-3 psui-gap-4">
18
- <div class="psui-bg-gray-20 psui-pt-8">
19
- <div class="psui-bg-white psui-w-48 psui-h-48 psui-rounded-md psui-shadow mx-auto"></div>
20
- <p class="psui-text-center">Shadow cast by main light</p>
21
- </div>
22
- <div class="psui-bg-gray-20 psui-pt-8">
23
- <div class="psui-bg-white psui-w-48 psui-h-48 psui-rounded-md psui-shadow-sm mx-auto"></div>
24
- <p class="psui-text-center">Shadow cast by ambient light</p>
25
- </div>
26
- <div class="psui-bg-gray-20 psui-pt-8">
27
- <div class="psui-bg-white psui-w-48 psui-h-48 psui-rounded-md psui-shadow-md mx-auto"></div>
28
- <p class="psui-text-center">Combined shadow from main and ambient lights</p>
29
- </div>
30
- </div>
31
-
32
- ## 2. Elevation system
33
- Shadows provide cues about depth, direction of movement, and surface edges. A surface’s shadow is determined by its elevation and relationship to other surfaces.
34
- <div class="psui-grid psui-grid-cols-2 psui-gap-6 psui-p-6 psui-bg-gray-20">
35
- <div class="psui-rounded-md psui-p-8 psui-h-20 psui-shadow-elevation--5">Elevation -5</div>
36
- <div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-5">Elevation 5</div>
37
- <div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-10">Elevation 10</div>
38
- <div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-20">Elevation 20</div>
39
- <div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-30">Elevation 30</div>
40
- <div class="psui-rounded-md psui-p-8 psui-h-20 psui-bg-white psui-shadow-elevation-40">Elevation 40</div>
41
- </div>
@@ -1,42 +0,0 @@
1
- import MyHeader from './Header.vue'
2
-
3
- export default {
4
- title: 'Example/Header',
5
- component: MyHeader,
6
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
7
- tags: ['autodocs'],
8
- // @ts-ignore
9
- render: (args) => ({
10
- // Components used in your story `template` are defined in the `components` object
11
- components: {
12
- MyHeader,
13
- },
14
- // The story's `args` need to be mapped into the template through the `setup()` method
15
- setup() {
16
- // Story args can be spread into the returned object
17
- return {
18
- ...args,
19
- }
20
- },
21
- // Then, the spread values can be accessed directly in the template
22
- template: '<my-header :user="user" />',
23
- }),
24
- parameters: {
25
- // More on how to position stories at: https://storybook.js.org/docs/configure/story-layout
26
- layout: 'fullscreen',
27
- },
28
- }
29
-
30
- export const LoggedIn = {
31
- args: {
32
- user: {
33
- name: 'Jane Doe',
34
- },
35
- },
36
- }
37
-
38
- export const LoggedOut = {
39
- args: {
40
- user: null,
41
- },
42
- }
@@ -1,77 +0,0 @@
1
- <template>
2
- <header>
3
- <div class="storybook-header">
4
- <div>
5
- <svg
6
- width="32"
7
- height="32"
8
- viewBox="0 0 32 32"
9
- xmlns="http://www.w3.org/2000/svg"
10
- >
11
- <g
12
- fill="none"
13
- fill-rule="evenodd"
14
- >
15
- <path
16
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
17
- fill="#FFF"
18
- />
19
- <path
20
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
21
- fill="#555AB9"
22
- />
23
- <path
24
- d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
25
- fill="#91BAF8"
26
- />
27
- </g>
28
- </svg>
29
- <h1>Acme</h1>
30
- </div>
31
- <div>
32
- <span
33
- class="welcome"
34
- v-if="user"
35
- >Welcome, aa<b>{{ user.name }}</b>!</span>
36
- <my-button
37
- size="small"
38
- @click="$emit('logout')"
39
- label="Log out"
40
- v-if="user"
41
- />
42
- <my-button
43
- size="small"
44
- @click="$emit('login')"
45
- label="Log in"
46
- v-if="!user"
47
- />
48
- <my-button
49
- primary
50
- size="small"
51
- @click="$emit('createAccount')"
52
- label="Sign up"
53
- v-if="!user"
54
- />
55
- </div>
56
- </div>
57
- </header>
58
- </template>
59
-
60
- <script>
61
- import './header.css'
62
- import MyButton from './Button.vue'
63
-
64
- export default {
65
- name: 'MyHeader',
66
-
67
- components: { MyButton },
68
-
69
- props: {
70
- user: {
71
- type: Object,
72
- },
73
- },
74
-
75
- emits: ['login', 'logout', 'createAccount'],
76
- }
77
- </script>
@@ -1,16 +0,0 @@
1
- import PsHighlightRippleDot from '../components/badges-and-tags/PsHighlightRippleDot.vue'
2
-
3
- export default {
4
- title: 'Badges & Tags/Badges/HighlightRippleDot',
5
- component: PsHighlightRippleDot,
6
- }
7
- // @ts-ignore
8
- const Template = (args, { argTypes }) => ({
9
- props: Object.keys(argTypes),
10
- components: { PsHighlightRippleDot },
11
- template: '<PsHighlightRippleDot v-bind="$props" />',
12
- })
13
-
14
- export const HighlightRippleDot = Template.bind({})
15
- // @ts-ignore
16
- HighlightRippleDot.args = {}
@@ -1,22 +0,0 @@
1
- import PsIcon from '../components/ui/PsIcon.vue'
2
-
3
- export default {
4
- title: 'Components/Icon',
5
- component: PsIcon,
6
- argTypes: {},
7
- }
8
- // @ts-ignore
9
- const Template = (args, { argTypes }) => ({
10
- props: Object.keys(argTypes),
11
- components: { PsIcon },
12
- template: `
13
- <div class='psui-flex'>
14
- <PsIcon v-bind="$props" type='svg' icon="/images/multifamily-units.svg" />
15
- <PsIcon v-bind="$props" type='svg' icon="/images/multifamily-units.svg"/>
16
- </div>
17
- `,
18
- })
19
-
20
- export const IconSimple = Template.bind({})
21
- // @ts-ignore
22
- IconSimple.args = {}
@@ -1,18 +0,0 @@
1
- import PsInlineSelector from '../components/controls/PsInlineSelector.vue'
2
-
3
- export default {
4
- title: 'Controls & Selectors/InlineSelector',
5
- component: PsInlineSelector,
6
- }
7
-
8
- const TemplateDefault = (args:any, {argTypes}:{argTypes:any}) => ({
9
- props: Object.keys(argTypes),
10
- components: {PsInlineSelector},
11
- template: `
12
- <div style="width: auto; margin-right: auto; display: flex; align-items: center;">
13
- <PsInlineSelector v-bind="$props"></PsInlineSelector>
14
- </div>
15
- `
16
- })
17
-
18
- export const Default = TemplateDefault.bind({})