@xplortech/apollo-core 0.5.2 → 0.5.3

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 (173) hide show
  1. package/dist/apollo-core/apollo-core.css +5468 -9
  2. package/dist/apollo-core/apollo-core.esm.js +125 -1
  3. package/dist/apollo-core/app-globals-0f993ce5.js +3 -0
  4. package/dist/apollo-core/css-shim-bbdf0cc6.js +4 -0
  5. package/dist/apollo-core/dom-1f98a75f.js +73 -0
  6. package/dist/apollo-core/index-3c9f25ef.js +2938 -0
  7. package/dist/apollo-core/index-912d1a21.js +584 -0
  8. package/dist/apollo-core/index.esm.js +1 -0
  9. package/dist/{cjs/regular-872f5226.js → apollo-core/regular-133c23b5.js} +12 -3
  10. package/dist/apollo-core/shadow-css-67b66845.js +389 -0
  11. package/dist/apollo-core/xpl-application-shell.entry.js +50 -0
  12. package/dist/apollo-core/xpl-avatar.entry.js +19 -0
  13. package/dist/apollo-core/xpl-backdrop.entry.js +21 -0
  14. package/dist/{esm → apollo-core}/xpl-badge.entry.js +1 -1
  15. package/dist/{collection/components/xpl-breadcrumbs/xpl-breadcrumb-item/xpl-breadcrumb-item.js → apollo-core/xpl-breadcrumb-item.entry.js} +9 -12
  16. package/dist/apollo-core/xpl-breadcrumbs.entry.js +14 -0
  17. package/dist/{esm → apollo-core}/xpl-button-row.entry.js +1 -1
  18. package/dist/apollo-core/xpl-button.entry.js +34 -0
  19. package/dist/apollo-core/xpl-checkbox.entry.js +25 -0
  20. package/dist/{esm → apollo-core}/xpl-choicelist.entry.js +1 -1
  21. package/dist/apollo-core/xpl-content-area.entry.js +16 -0
  22. package/dist/{esm → apollo-core}/xpl-divider.entry.js +1 -1
  23. package/dist/{esm → apollo-core}/xpl-grid-item.entry.js +1 -1
  24. package/dist/{esm → apollo-core}/xpl-grid.entry.js +1 -1
  25. package/dist/{esm → apollo-core}/xpl-input.entry.js +20 -3
  26. package/dist/{esm → apollo-core}/xpl-list.entry.js +2 -2
  27. package/dist/apollo-core/xpl-main-nav.entry.js +26 -0
  28. package/dist/apollo-core/xpl-nav-item.entry.js +12 -0
  29. package/dist/{esm → apollo-core}/xpl-pagination.entry.js +1 -1
  30. package/dist/apollo-core/xpl-radio.entry.js +25 -0
  31. package/dist/apollo-core/xpl-secondary-nav.entry.js +12 -0
  32. package/dist/{esm → apollo-core}/xpl-select.entry.js +43 -3
  33. package/dist/{esm → apollo-core}/xpl-table.entry.js +1 -1
  34. package/dist/{esm → apollo-core}/xpl-tag.entry.js +1 -1
  35. package/dist/{esm → apollo-core}/xpl-toggle.entry.js +2 -2
  36. package/dist/apollo-core/xpl-utility-bar.entry.js +25 -0
  37. package/dist/types/components/xpl-choicelist/choice.d.ts +1 -1
  38. package/dist/types/components/xpl-choicelist/xpl-choicelist.d.ts +1 -0
  39. package/dist/types/components/xpl-dropdown/dropdownchoice.d.ts +5 -5
  40. package/dist/types/components/xpl-dropdown/xpl-dropdown.d.ts +1 -0
  41. package/dist/types/components/xpl-list/listitem.d.ts +15 -15
  42. package/dist/types/components/xpl-list/xpl-list.d.ts +1 -0
  43. package/dist/types/components/xpl-select/xpl-select.d.ts +1 -0
  44. package/dist/types/components.d.ts +3 -0
  45. package/package.json +1 -1
  46. package/dist/apollo-core/p-0203d4e8.entry.js +0 -1
  47. package/dist/apollo-core/p-0b2c612e.entry.js +0 -1
  48. package/dist/apollo-core/p-128a0240.entry.js +0 -1
  49. package/dist/apollo-core/p-2f90296c.js +0 -10
  50. package/dist/apollo-core/p-30003b15.entry.js +0 -1
  51. package/dist/apollo-core/p-4e56a2ca.entry.js +0 -1
  52. package/dist/apollo-core/p-5854d1e4.entry.js +0 -1
  53. package/dist/apollo-core/p-611536d8.entry.js +0 -1
  54. package/dist/apollo-core/p-7c9fee7e.entry.js +0 -1
  55. package/dist/apollo-core/p-8b6633c7.js +0 -1
  56. package/dist/apollo-core/p-97cd1f73.entry.js +0 -1
  57. package/dist/apollo-core/p-9c5ca308.entry.js +0 -1
  58. package/dist/apollo-core/p-ad90fe4d.js +0 -1
  59. package/dist/apollo-core/p-bd4a7e3c.entry.js +0 -1
  60. package/dist/apollo-core/p-dab8e7a1.entry.js +0 -1
  61. package/dist/apollo-core/p-eb63b401.entry.js +0 -1
  62. package/dist/apollo-core/p-ee2f4422.entry.js +0 -1
  63. package/dist/apollo-core/p-f167aa05.entry.js +0 -1
  64. package/dist/cjs/apollo-core.cjs.js +0 -19
  65. package/dist/cjs/index-944adb2e.js +0 -1609
  66. package/dist/cjs/index.cjs.js +0 -2
  67. package/dist/cjs/loader.cjs.js +0 -21
  68. package/dist/cjs/v4-14140ff3.js +0 -77
  69. package/dist/cjs/xpl-application-shell_11.cjs.entry.js +0 -230
  70. package/dist/cjs/xpl-badge.cjs.entry.js +0 -21
  71. package/dist/cjs/xpl-button-row.cjs.entry.js +0 -24
  72. package/dist/cjs/xpl-checkbox_2.cjs.entry.js +0 -51
  73. package/dist/cjs/xpl-choicelist.cjs.entry.js +0 -36
  74. package/dist/cjs/xpl-divider.cjs.entry.js +0 -18
  75. package/dist/cjs/xpl-grid-item.cjs.entry.js +0 -25
  76. package/dist/cjs/xpl-grid.cjs.entry.js +0 -35
  77. package/dist/cjs/xpl-input.cjs.entry.js +0 -2527
  78. package/dist/cjs/xpl-list.cjs.entry.js +0 -63
  79. package/dist/cjs/xpl-pagination.cjs.entry.js +0 -76
  80. package/dist/cjs/xpl-select.cjs.entry.js +0 -623
  81. package/dist/cjs/xpl-table.cjs.entry.js +0 -89
  82. package/dist/cjs/xpl-tag.cjs.entry.js +0 -21
  83. package/dist/cjs/xpl-toggle.cjs.entry.js +0 -34
  84. package/dist/collection/collection-manifest.json +0 -37
  85. package/dist/collection/components/xpl-application-shell/xpl-application-shell.js +0 -143
  86. package/dist/collection/components/xpl-avatar/xpl-avatar.js +0 -158
  87. package/dist/collection/components/xpl-backdrop/xpl-backdrop.js +0 -41
  88. package/dist/collection/components/xpl-badge/xpl-badge.js +0 -50
  89. package/dist/collection/components/xpl-breadcrumbs/xpl-breadcrumbs/xpl-breadcrumbs.js +0 -15
  90. package/dist/collection/components/xpl-button/xpl-button.js +0 -214
  91. package/dist/collection/components/xpl-button-row/xpl-button-row.js +0 -119
  92. package/dist/collection/components/xpl-checkbox/xpl-checkbox.js +0 -185
  93. package/dist/collection/components/xpl-choicelist/xpl-choicelist.js +0 -143
  94. package/dist/collection/components/xpl-content-area/xpl-content-area.js +0 -39
  95. package/dist/collection/components/xpl-divider/xpl-divider.js +0 -30
  96. package/dist/collection/components/xpl-dropdown/xpl-dropdown.js +0 -32
  97. package/dist/collection/components/xpl-grid/xpl-grid.js +0 -26
  98. package/dist/collection/components/xpl-grid-item/xpl-grid-item.js +0 -93
  99. package/dist/collection/components/xpl-input/xpl-input.js +0 -471
  100. package/dist/collection/components/xpl-list/xpl-list.js +0 -93
  101. package/dist/collection/components/xpl-main-nav/xpl-main-nav.js +0 -72
  102. package/dist/collection/components/xpl-nav-item/xpl-nav-item.js +0 -10
  103. package/dist/collection/components/xpl-pagination/xpl-pagination.js +0 -189
  104. package/dist/collection/components/xpl-radio/xpl-radio.js +0 -168
  105. package/dist/collection/components/xpl-secondary-nav/xpl-secondary-nav.js +0 -9
  106. package/dist/collection/components/xpl-select/xpl-select.js +0 -311
  107. package/dist/collection/components/xpl-table/xpl-table.js +0 -194
  108. package/dist/collection/components/xpl-tag/xpl-tag.js +0 -30
  109. package/dist/collection/components/xpl-toggle/xpl-toggle.js +0 -157
  110. package/dist/collection/components/xpl-utility-bar/xpl-utility-bar.js +0 -70
  111. package/dist/custom-elements/index.js +0 -19959
  112. package/dist/esm/apollo-core.js +0 -17
  113. package/dist/esm/index-899dba3b.js +0 -1580
  114. package/dist/esm/index.js +0 -1
  115. package/dist/esm/loader.js +0 -17
  116. package/dist/esm/polyfills/core-js.js +0 -11
  117. package/dist/esm/polyfills/css-shim.js +0 -1
  118. package/dist/esm/polyfills/dom.js +0 -79
  119. package/dist/esm/polyfills/es5-html-element.js +0 -1
  120. package/dist/esm/polyfills/index.js +0 -34
  121. package/dist/esm/polyfills/system.js +0 -6
  122. package/dist/esm/regular-86225e9d.js +0 -16041
  123. package/dist/esm/v4-929670b7.js +0 -75
  124. package/dist/esm/xpl-application-shell_11.entry.js +0 -216
  125. package/dist/esm/xpl-checkbox_2.entry.js +0 -46
  126. package/dist/index.cjs.js +0 -1
  127. package/dist/index.js +0 -1
  128. package/dist/stories/application-shell.stories.js +0 -766
  129. package/dist/stories/avatar.stories.js +0 -173
  130. package/dist/stories/backdrop.stories.js +0 -18
  131. package/dist/stories/badge.stories.js +0 -48
  132. package/dist/stories/breadcrumbs.stories.js +0 -115
  133. package/dist/stories/button-row.stories.js +0 -64
  134. package/dist/stories/button.stories.js +0 -98
  135. package/dist/stories/checkbox.stories.js +0 -76
  136. package/dist/stories/choicelist.stories.js +0 -112
  137. package/dist/stories/content-area.stories.js +0 -53
  138. package/dist/stories/divider.stories.js +0 -34
  139. package/dist/stories/grid.stories.js +0 -100
  140. package/dist/stories/input.stories.js +0 -252
  141. package/dist/stories/list.stories.js +0 -134
  142. package/dist/stories/main-nav.stories.js +0 -308
  143. package/dist/stories/pagination.stories.js +0 -84
  144. package/dist/stories/radio.stories.js +0 -66
  145. package/dist/stories/secondary-nav.stories.js +0 -76
  146. package/dist/stories/select.stories.js +0 -111
  147. package/dist/stories/table.stories.js +0 -107
  148. package/dist/stories/tabs.stories.js +0 -24
  149. package/dist/stories/toggle.stories.js +0 -80
  150. package/dist/stories/utility-bar.stories.js +0 -94
  151. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/application-shell.stories.d.ts +0 -0
  152. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/avatar.stories.d.ts +0 -0
  153. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/backdrop.stories.d.ts +0 -0
  154. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/badge.stories.d.ts +0 -0
  155. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/breadcrumbs.stories.d.ts +0 -0
  156. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/button-row.stories.d.ts +0 -0
  157. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/button.stories.d.ts +0 -0
  158. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/checkbox.stories.d.ts +0 -0
  159. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/choicelist.stories.d.ts +0 -0
  160. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/content-area.stories.d.ts +0 -0
  161. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/divider.stories.d.ts +0 -0
  162. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/grid.stories.d.ts +0 -0
  163. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/input.stories.d.ts +0 -0
  164. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/list.stories.d.ts +0 -0
  165. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/main-nav.stories.d.ts +0 -0
  166. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/pagination.stories.d.ts +0 -0
  167. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/radio.stories.d.ts +0 -0
  168. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/secondary-nav.stories.d.ts +0 -0
  169. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/select.stories.d.ts +0 -0
  170. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/table.stories.d.ts +0 -0
  171. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/tabs.stories.d.ts +0 -0
  172. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/toggle.stories.d.ts +0 -0
  173. /package/dist/types/Users/{fernandogelin/Projects → roc/Sites}/apollo/.stencil/stories/utility-bar.stories.d.ts +0 -0
@@ -1,173 +0,0 @@
1
- import { v4 as uuid } from "uuid";
2
- export default {
3
- title: "Components/Avatar",
4
- };
5
- const script = ({ id }) => `
6
- (function() {
7
- const avatar = document.getElementById("${id}");
8
- avatar.addEventListener('click', e => e.preventDefault());
9
- })();
10
- `;
11
- export const Avatar = ({ placeholder, name, size, color, status, link, disabled, }) => {
12
- const id = uuid();
13
- let attrs = "";
14
- if (placeholder === "")
15
- attrs += ` src="https://pbs.twimg.com/profile_images/1388990311637127168/njwE8QEa_reasonably_small.jpg"`;
16
- if (name !== "")
17
- attrs += ` name="${name}"`;
18
- if (size !== "default")
19
- attrs += ` size="${size}"`;
20
- if (color !== "secondary")
21
- attrs += ` color="${color}"`;
22
- if (status !== "none")
23
- attrs += ` status="${status}"`;
24
- if (link)
25
- attrs += ` href="#"`;
26
- if (disabled)
27
- attrs += ` disabled`;
28
- return `<xpl-avatar id="${id}"${attrs}>${placeholder}</xpl-avatar><script>${script({ id })}</script>`;
29
- };
30
- Avatar.argTypes = {
31
- placeholder: {
32
- type: { name: "string", required: false },
33
- },
34
- name: {
35
- type: { name: "string", required: false },
36
- },
37
- size: {
38
- options: ["default", "md", "sm"],
39
- control: {
40
- type: "select",
41
- },
42
- },
43
- color: {
44
- options: ["green", "yellow", "pink", "primary", "secondary"],
45
- control: {
46
- type: "select",
47
- },
48
- },
49
- status: {
50
- options: ["none", "active", "warning", "inactive"],
51
- control: {
52
- type: "select",
53
- },
54
- },
55
- link: {
56
- control: {
57
- type: "boolean",
58
- },
59
- },
60
- disabled: {
61
- control: {
62
- type: "boolean",
63
- },
64
- },
65
- };
66
- Avatar.parameters = {
67
- layout: "centered",
68
- "web-component": {
69
- render({ placeholder, name, size, color, status, link, disabled }) {
70
- let attrs = "";
71
- if (placeholder === "")
72
- attrs += ` src="image.png"`;
73
- if (name !== "")
74
- attrs += ` name="${name}"`;
75
- if (size !== "default")
76
- attrs += ` size="${size}"`;
77
- if (color !== "secondary")
78
- attrs += ` color="${color}"`;
79
- if (status !== "none")
80
- attrs += ` status="${status}"`;
81
- if (link)
82
- attrs += ` href="#"`;
83
- if (disabled)
84
- attrs += ` disabled`;
85
- return `<xpl-avatar${attrs}>${placeholder}</xpl-avatar>`;
86
- },
87
- },
88
- html: {
89
- render({ placeholder, name, size, color, status, link, disabled }) {
90
- let className = "xpl-avatar";
91
- if (size)
92
- className += ` xpl-avatar--${size}`;
93
- if (color)
94
- className += ` xpl-avatar--${color}`;
95
- let attrs = "";
96
- if (link)
97
- attrs += ` href="#"`;
98
- const inner = `
99
- <div>
100
- ${!placeholder
101
- ? ` <img alt="${name}" src="image.png" />`
102
- : ` <div class="xpl-avatar__placeholder">${placeholder}</div>`}${status !== "none"
103
- ? `
104
- <div class="xpl-avatar__dot--${status}"></div>`
105
- : ""}
106
- </div>
107
- `;
108
- let tag = link && !disabled ? "a" : "div";
109
- if (link && disabled) {
110
- className += " xpl-avatar--disabled";
111
- // do not show href
112
- attrs = "";
113
- }
114
- return `<${tag} class="${className}"${attrs}>${inner}</${tag}>`;
115
- },
116
- },
117
- };
118
- Avatar.args = {
119
- placeholder: "",
120
- name: "Firstname Lastname",
121
- size: "default",
122
- color: "secondary",
123
- status: "none",
124
- link: false,
125
- disabled: false,
126
- };
127
- /* export const AvatarGroup = ({ size, reverse }) => {
128
- let className = "xpl-avatar-group";
129
- if (size !== "default") className += " xpl-avatar-group--" + size;
130
- if (reverse) className += " xpl-avatar-group--reverse";
131
- return `<div class="${className}">
132
- <img
133
- src="https://pbs.twimg.com/profile_images/1388990311637127168/njwE8QEa_reasonably_small.jpg"
134
- alt=""
135
- /><img
136
- src="https://pbs.twimg.com/profile_images/1388990311637127168/njwE8QEa_reasonably_small.jpg"
137
- alt=""
138
- /><img
139
- src="https://pbs.twimg.com/profile_images/1388990311637127168/njwE8QEa_reasonably_small.jpg"
140
- alt=""
141
- /><img
142
- src="https://pbs.twimg.com/profile_images/1388990311637127168/njwE8QEa_reasonably_small.jpg"
143
- alt=""
144
- /><img
145
- src="https://pbs.twimg.com/profile_images/1388990311637127168/njwE8QEa_reasonably_small.jpg"
146
- alt=""
147
- />
148
- </div>`;
149
- };
150
-
151
- AvatarGroup.argTypes = {
152
- size: {
153
- options: ["s", "default", "l"],
154
- control: {
155
- type: "select",
156
- },
157
- },
158
- reverse: {
159
- control: {
160
- type: "boolean",
161
- },
162
- },
163
- };
164
-
165
- AvatarGroup.parameters = {
166
- layout: "centered",
167
- };
168
-
169
- AvatarGroup.args = {
170
- size: "default",
171
- reverse: false,
172
- };
173
- */
@@ -1,18 +0,0 @@
1
- export default {
2
- title: "Components/Backdrop",
3
- };
4
- export const Backdrop = () => `
5
- <img src="https://media.giphy.com/media/mi6DsSSNKDbUY/giphy-downsized-large.gif" />
6
- <xpl-backdrop></xpl-backdrop>
7
- `;
8
- Backdrop.parameters = {
9
- layout: "centered",
10
- "web-component": {
11
- render: Backdrop,
12
- },
13
- html: {
14
- render() {
15
- return `<div class="xpl-backdrop" aria-hidden="true"></div>`;
16
- },
17
- },
18
- };
@@ -1,48 +0,0 @@
1
- export default {
2
- title: "Components/Badge",
3
- argTypes: {
4
- variant: {
5
- options: ["default", "success", "warning", "inactive", "error"],
6
- control: {
7
- type: "select",
8
- },
9
- },
10
- dot: {
11
- control: {
12
- type: "boolean",
13
- },
14
- },
15
- text: {
16
- type: { name: "string", required: false },
17
- },
18
- },
19
- };
20
- export const Badge = ({ variant, dot, text }) => {
21
- let attrs = "";
22
- if (variant !== "default")
23
- attrs += ` variant="${variant}"`;
24
- if (dot)
25
- attrs += " dot";
26
- return `<xpl-badge${attrs}>${text}</xpl-badge>`;
27
- };
28
- Badge.parameters = {
29
- layout: "centered",
30
- "web-component": {
31
- render: Badge,
32
- },
33
- html: {
34
- render({ dot, variant, text }) {
35
- let className = "xpl-badge";
36
- if (dot)
37
- className += " xpl-badge--dot";
38
- if (variant !== "default")
39
- className += " xpl-badge--" + variant;
40
- return `<div class="${className}">${text}</div>`;
41
- },
42
- },
43
- };
44
- Badge.args = {
45
- variant: "default",
46
- dot: false,
47
- text: "Badge",
48
- };
@@ -1,115 +0,0 @@
1
- export default {
2
- title: "Components/Navigation/Breadcrumbs",
3
- argTypes: {
4
- items: {
5
- options: [1, 2, 3],
6
- control: {
7
- type: "select",
8
- },
9
- },
10
- first: {
11
- type: { name: 'string', required: false }
12
- },
13
- second: {
14
- type: { name: 'string', required: false }
15
- },
16
- third: {
17
- type: { name: 'string', required: false }
18
- }
19
- }
20
- };
21
- export const Breadcrumbs = ({ first, second, third, items }) => {
22
- const slotMap = {
23
- 0: first,
24
- 1: second,
25
- 2: third
26
- };
27
- const breadcrumbItems = Array.from({ length: items }).map((_u, i) => {
28
- return `<xpl-breadcrumb-item>
29
- ${slotMap[i]}
30
- </xpl-breadcrumb-item>`;
31
- }).join('\n');
32
- return `
33
- <xpl-breadcrumbs>
34
- ${breadcrumbItems}
35
- </xpl-breadcrumbs>
36
- `;
37
- };
38
- const BreadCrumbsHTML = () => `
39
- <nav class="xpl-breadcrumbs" aria-label="Breadcrumb">
40
- <ol role="list">
41
- <li class="xpl-breadcrumb-item">
42
- <a href="javascript:;">Locations</a>
43
- <span
44
- ><svg
45
- aria-hidden="true"
46
- focusable="false"
47
- data-prefix="fas"
48
- data-icon="chevron-right"
49
- class="svg-inline--fa fa-chevron-right fa-w-10"
50
- role="img"
51
- xmlns="http://www.w3.org/2000/svg"
52
- viewBox="0 0 320 512"
53
- >
54
- <path
55
- fill="currentColor"
56
- d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"
57
- ></path></svg
58
- ></span>
59
- </li>
60
- <li class="xpl-breadcrumb-item">
61
- <a href="javascript:;">Dupont Circle</a>
62
- <span
63
- ><svg
64
- aria-hidden="true"
65
- focusable="false"
66
- data-prefix="fas"
67
- data-icon="chevron-right"
68
- class="svg-inline--fa fa-chevron-right fa-w-10"
69
- role="img"
70
- xmlns="http://www.w3.org/2000/svg"
71
- viewBox="0 0 320 512"
72
- >
73
- <path
74
- fill="currentColor"
75
- d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"
76
- ></path></svg
77
- ></span>
78
- </li>
79
- <li class="xpl-breadcrumb-item" aria-current=page>
80
- <a href="javascript:;">Class A</a>
81
- <span
82
- ><svg
83
- aria-hidden="true"
84
- focusable="false"
85
- data-prefix="fas"
86
- data-icon="chevron-right"
87
- class="svg-inline--fa fa-chevron-right fa-w-10"
88
- role="img"
89
- xmlns="http://www.w3.org/2000/svg"
90
- viewBox="0 0 320 512"
91
- >
92
- <path
93
- fill="currentColor"
94
- d="M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"
95
- ></path></svg
96
- ></span>
97
- </li>
98
- </ol>
99
- </nav>
100
- `;
101
- Breadcrumbs.parameters = {
102
- layout: "centered",
103
- "web-component": {
104
- render: Breadcrumbs
105
- },
106
- html: {
107
- render: BreadCrumbsHTML
108
- }
109
- };
110
- Breadcrumbs.args = {
111
- first: '<a href="javascript:;">Locations</a>',
112
- second: '<a href="javascript:;">Dupont Circle</a>',
113
- third: '<a href="javascript:;">Class A</a>',
114
- items: 3
115
- };
@@ -1,64 +0,0 @@
1
- export default {
2
- title: "Components/Button Row",
3
- argTypes: {
4
- primary: {
5
- type: { name: "string", required: true },
6
- },
7
- secondary: {
8
- type: { name: "string", required: false },
9
- },
10
- tertiary: {
11
- type: { name: "string", required: false },
12
- },
13
- },
14
- };
15
- export const ButtonRow = ({ primary, secondary, tertiary }) => {
16
- let attrs = "";
17
- if (primary)
18
- attrs += ` primary="${primary}"`;
19
- if (secondary)
20
- attrs += ` secondary="${secondary}"`;
21
- if (tertiary)
22
- attrs += ` tertiary="${tertiary}"`;
23
- return `<xpl-button-row${attrs}></xpl-button-row>
24
-
25
- <!-- add event listeners to the buttons like this: -->
26
- <script>
27
- const buttonRow = document.getElementById("button-row");
28
- buttonRow.addEventListener("clickPrimary", () => { ... });
29
- buttonRow.addEventListener("clickSecondary", () => { ... });
30
- buttonRow.addEventListener("clickTertiary", () => { ... });
31
- </script>
32
- `;
33
- };
34
- ButtonRow.parameters = {
35
- layout: "centered",
36
- "web-component": {
37
- render: ButtonRow,
38
- },
39
- html: {
40
- render({ primary, secondary, tertiary }) {
41
- return `<div class="xpl-button-row">
42
- <div class="xpl-button-row-inner">${secondary ? `
43
- <button class="xpl-button xpl-button--secondary">
44
- ${secondary}
45
- </button>` : `
46
- <div></div><!-- empty div included for layout only -->`}
47
- <div>${tertiary ? `
48
- <button class="xpl-button xpl-button--subtle">
49
- ${tertiary}
50
- </button>` : ''}
51
- <button class="xpl-button">
52
- ${primary}
53
- </button>
54
- </div>
55
- </div>
56
- </div>`;
57
- },
58
- },
59
- };
60
- ButtonRow.args = {
61
- primary: "Save",
62
- secondary: "",
63
- tertiary: "",
64
- };
@@ -1,98 +0,0 @@
1
- export default {
2
- title: "Components/Button",
3
- argTypes: {
4
- text: {
5
- type: { name: "string", required: false },
6
- },
7
- variant: {
8
- options: ["primary", "secondary", "subtle", "warning"],
9
- control: {
10
- type: "select",
11
- },
12
- },
13
- disabled: {
14
- control: {
15
- type: "boolean",
16
- },
17
- },
18
- size: {
19
- options: ["default", "sm", "xs"],
20
- control: {
21
- type: "select",
22
- },
23
- },
24
- icon: {
25
- options: ["", "home", "user", "heart", "check"],
26
- control: {
27
- type: "select",
28
- },
29
- },
30
- iconTrailing: {
31
- control: {
32
- type: "boolean",
33
- },
34
- },
35
- },
36
- };
37
- export const Button = ({ variant, size, disabled, icon, iconTrailing, text, }) => {
38
- let attrs = "";
39
- if (variant !== "primary")
40
- attrs += ` variant="${variant}"`;
41
- if (size !== "default")
42
- attrs += ` size="${size}"`;
43
- if (disabled)
44
- attrs += " disabled";
45
- if (icon)
46
- attrs += ` icon="${icon}"`;
47
- if (iconTrailing)
48
- attrs += " icon-trailing";
49
- if (text === "")
50
- attrs += " icon-only";
51
- return `<xpl-button${attrs}>${text}</xpl-button>`;
52
- };
53
- const HtmlButton = ({ variant, size, disabled, icon, iconTrailing, text }) => {
54
- let className = "xpl-button";
55
- if (variant === "secondary")
56
- className += " xpl-button--secondary";
57
- if (variant === "subtle")
58
- className += " xpl-button--subtle";
59
- if (variant === "warning")
60
- className += " xpl-button--warning";
61
- if (size === "sm")
62
- className += " xpl-button--sm";
63
- if (size === "xs")
64
- className += " xpl-button--xs";
65
- const iconOnly = icon && text === "";
66
- if (iconOnly)
67
- className += " xpl-button--icon-only";
68
- let attrs = "";
69
- if (disabled)
70
- attrs += " disabled";
71
- const iconHtml = icon
72
- ? `<i class="far fa-${icon} ${iconTrailing
73
- ? "trailing"
74
- : iconOnly
75
- ? ""
76
- : "leading"}"></i>`
77
- : "";
78
- return `<button class="${className}"${attrs}>
79
- ${icon && !iconTrailing ? iconHtml : ""}${iconOnly ? `<span class="sr-only">${text}</span>` : text}${icon && iconTrailing ? iconHtml : ""}
80
- </button>`;
81
- };
82
- Button.parameters = {
83
- layout: "centered",
84
- "web-component": {
85
- render: Button,
86
- },
87
- html: {
88
- render: HtmlButton,
89
- },
90
- };
91
- Button.args = {
92
- variant: "primary",
93
- size: "default",
94
- disabled: false,
95
- icon: "",
96
- iconTrailing: false,
97
- text: "Click Me",
98
- };
@@ -1,76 +0,0 @@
1
- export default {
2
- title: "Components/Checkbox",
3
- argTypes: {
4
- label: {
5
- type: { name: "string", required: true },
6
- },
7
- description: {
8
- type: { name: "string", required: false },
9
- },
10
- checked: {
11
- control: {
12
- type: "boolean",
13
- },
14
- },
15
- disabled: {
16
- control: {
17
- type: "boolean",
18
- },
19
- },
20
- indeterminate: {
21
- control: {
22
- type: "boolean",
23
- },
24
- },
25
- styled: {
26
- control: {
27
- type: "boolean",
28
- },
29
- },
30
- },
31
- };
32
- export const Checkbox = ({ label, description, checked, disabled, indeterminate, styled, }) => {
33
- let attrs = "";
34
- if (description)
35
- attrs += ` description="${description}"`;
36
- if (checked)
37
- attrs += ` checked`;
38
- if (disabled)
39
- attrs += ` disabled`;
40
- if (indeterminate)
41
- attrs += ` indeterminate`;
42
- if (styled)
43
- attrs += ` styled`;
44
- return `<xpl-checkbox${attrs}>${label}</xpl-checkbox>`;
45
- };
46
- Checkbox.parameters = {
47
- layout: "centered",
48
- "web-component": {
49
- render: Checkbox,
50
- },
51
- html: {
52
- render({ label, description, checked, disabled, indeterminate, styled }) {
53
- let attrs = "";
54
- if (checked)
55
- attrs += ` checked`;
56
- if (disabled)
57
- attrs += ` disabled`;
58
- if (indeterminate)
59
- attrs += ` indeterminate`;
60
- return `<div class="xpl-checkbox-radio-container${styled ? " styled" : ""}${disabled ? " disabled" : ""}">
61
- <input class="xpl-checkbox" id="id" type="checkbox"${attrs}></input>
62
- <label class="xpl-label${disabled ? " xpl-label--disabled" : ""}" for="id">${label}${description ? `
63
- <small class="xpl-description${disabled ? " xpl-description--disabled" : ""}">${description}</small>
64
- ` : ""}</label>
65
- </div>`;
66
- },
67
- },
68
- };
69
- Checkbox.args = {
70
- label: "Checkbox",
71
- description: "",
72
- checked: false,
73
- disabled: false,
74
- indeterminate: false,
75
- styled: false
76
- };