@saasquatch/mint-components 1.15.0-16 → 1.15.0-18

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 (60) hide show
  1. package/dist/cjs/{ShadowViewAddon-8bab3674.js → ShadowViewAddon-974f6839.js} +58 -19
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-big-stat_41.cjs.entry.js +33 -3
  5. package/dist/cjs/sqm-pagination_3.cjs.entry.js +13 -3
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +17 -2
  7. package/dist/collection/components/sqm-big-stat/BigStat.stories.js +13 -0
  8. package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +15 -7
  9. package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +162 -2
  10. package/dist/collection/components/sqm-big-stat/useBigStat.js +10 -0
  11. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +13 -4
  12. package/dist/collection/components/sqm-pagination/sqm-pagination-view.js +3 -3
  13. package/dist/collection/components/sqm-pagination/sqm-pagination.js +43 -0
  14. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +3 -1
  15. package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +4 -4
  16. package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +20 -8
  17. package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +110 -2
  18. package/dist/esm/{ShadowViewAddon-967f1f54.js → ShadowViewAddon-6a9f6e48.js} +58 -19
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/mint-components.js +1 -1
  21. package/dist/esm/sqm-big-stat_41.entry.js +33 -3
  22. package/dist/esm/sqm-pagination_3.entry.js +13 -3
  23. package/dist/esm/sqm-stencilbook.entry.js +17 -2
  24. package/dist/esm-es5/ShadowViewAddon-6a9f6e48.js +1 -0
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/esm-es5/mint-components.js +1 -1
  27. package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
  28. package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
  29. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  30. package/dist/mint-components/mint-components.esm.js +1 -1
  31. package/dist/mint-components/p-0321e5a5.entry.js +13 -0
  32. package/dist/mint-components/p-094b3b54.system.entry.js +1 -0
  33. package/dist/mint-components/{p-44eead35.entry.js → p-3d8c4dd2.entry.js} +3 -3
  34. package/dist/mint-components/p-72263a72.js +394 -0
  35. package/dist/mint-components/p-81d6479a.system.js +1 -0
  36. package/dist/mint-components/{p-b22a7b2d.entry.js → p-d30919cd.entry.js} +1 -1
  37. package/dist/mint-components/p-e70a89e3.system.entry.js +1 -0
  38. package/dist/mint-components/p-ead64a3d.system.entry.js +1 -0
  39. package/dist/mint-components/p-ee06426a.system.js +1 -1
  40. package/dist/types/components/sqm-big-stat/BigStat.stories.d.ts +2 -0
  41. package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +5 -0
  42. package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +41 -0
  43. package/dist/types/components/sqm-pagination/sqm-pagination-view.d.ts +1 -0
  44. package/dist/types/components/sqm-pagination/sqm-pagination.d.ts +9 -0
  45. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +1 -1
  46. package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +2 -1
  47. package/dist/types/components/sqm-stat-container/sqm-stat-container-view.d.ts +3 -0
  48. package/dist/types/components/sqm-stat-container/sqm-stat-container.d.ts +23 -0
  49. package/dist/types/components.d.ts +150 -4
  50. package/docs/docs.docx +0 -0
  51. package/docs/raisins.json +1 -1
  52. package/grapesjs/grapesjs.js +1 -1
  53. package/package.json +1 -1
  54. package/dist/esm-es5/ShadowViewAddon-967f1f54.js +0 -1
  55. package/dist/mint-components/p-266bbd02.system.js +0 -1
  56. package/dist/mint-components/p-8f6297b0.js +0 -394
  57. package/dist/mint-components/p-9abb9ab0.entry.js +0 -13
  58. package/dist/mint-components/p-ae07ce99.system.entry.js +0 -1
  59. package/dist/mint-components/p-b12e132b.system.entry.js +0 -1
  60. package/dist/mint-components/p-d68003fe.system.entry.js +0 -1
@@ -74,6 +74,10 @@ export const InvalidStatValue = () => {
74
74
  };
75
75
  return h(BigStatView, Object.assign({}, props), "Big stat");
76
76
  };
77
+ export const CustomStyles = () => {
78
+ return (h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
79
+ h("p", null, "Giftcards Earned")));
80
+ };
77
81
  export const MultipleStats = () => {
78
82
  return (h("sqm-stat-container", { space: "xxx-large", display: "flex" },
79
83
  h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/referralsCount" },
@@ -86,3 +90,12 @@ export const MultipleStats = () => {
86
90
  h("sqm-text", null,
87
91
  h("p", null, "Points Balance")))));
88
92
  };
93
+ export const MultipleStatsWithCustomBranding = () => {
94
+ return (h("sqm-stat-container", { space: "xxx-large", display: "grid", alignment: "center", "hide-border": "true" },
95
+ h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
96
+ h("p", null, "Giftcards Earned")),
97
+ h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
98
+ h("p", null, "Referrals")),
99
+ h("sqm-big-stat", { "stat-font-weight": "500", "stat-text-color": "#1ed760", "stat-font-size": "45", "description-text-color": "#121212", "description-font-size": "18", alignment: "center", "stat-type": "/integrationRewardsCountFiltered/AVAILABLE/global", "flex-reverse": true },
100
+ h("p", null, "Points balance"))));
101
+ };
@@ -1,13 +1,13 @@
1
1
  import { h } from "@stencil/core";
2
2
  import { createStyleSheet } from "../../styling/JSS";
3
3
  export function BigStatView(props) {
4
- const { statvalue, flexReverse, alignment } = props;
5
- // Dependent on props, not feasiable to move out
4
+ const { statvalue, flexReverse, alignment, statTextColor, statFontSize, descriptionTextColor, descriptionFontSize, statFontWeight, } = props;
5
+ // Dependent on props, not feasible to move out
6
6
  const style = {
7
7
  Container: {
8
8
  display: "flex",
9
- height: "inherit",
10
- "justify-content": "space-between",
9
+ // height: "inherit",
10
+ // "justify-content": "space-between",
11
11
  "flex-direction": `${flexReverse ? "column-reverse" : "column"}`,
12
12
  "align-items": `${alignment === "left"
13
13
  ? "flex-start"
@@ -16,14 +16,22 @@ export function BigStatView(props) {
16
16
  : "center"}`,
17
17
  },
18
18
  Stat: {
19
- "font-size": "var(--sl-font-size-x-large)",
19
+ "font-size": statFontSize
20
+ ? `${statFontSize}px`
21
+ : "var(--sl-font-size-xx-large)",
20
22
  "text-align": alignment,
23
+ color: statTextColor || "var(--sqm-text)",
24
+ lineHeight: "35px",
25
+ fontWeight: statFontWeight || "var(--sl-font-weight-normal)",
21
26
  },
22
27
  Description: {
23
- "font-size": "var(--sl-font-size-small)",
28
+ "font-size": descriptionFontSize
29
+ ? `${descriptionFontSize}px`
30
+ : "var(--sl-font-size-small)",
24
31
  "font-weight": "var(--sl-font-weight-normal)",
25
- color: "var(--sqm-text-subdued)",
32
+ color: descriptionTextColor || "var(--sqm-text)",
26
33
  "text-align": alignment,
34
+ lineHeight: "20px",
27
35
  },
28
36
  };
29
37
  const sheet = createStyleSheet(style);
@@ -23,8 +23,19 @@ export class BigStat {
23
23
  *
24
24
  * @uiName Flex reverse
25
25
  * @default
26
+ * @uiGroup Style
26
27
  */
27
28
  this.flexReverse = false;
29
+ /**
30
+ * Controls the alignment of the flexbox
31
+ *
32
+ * @uiName Alignment
33
+ * @uiType string
34
+ * @uiEnum ["left", "right", "center"]
35
+ * @uiEnumNames ["Left", "Right", "Center"]
36
+ * @uiGroup Style
37
+ */
38
+ this.alignment = "center";
28
39
  this.ignored = true;
29
40
  withHooks(this);
30
41
  }
@@ -86,6 +97,9 @@ export class BigStat {
86
97
  }, {
87
98
  "text": undefined,
88
99
  "name": "default"
100
+ }, {
101
+ "text": "Style",
102
+ "name": "uiGroup"
89
103
  }],
90
104
  "text": "Controls the order of the stat value & description column"
91
105
  },
@@ -116,11 +130,15 @@ export class BigStat {
116
130
  }, {
117
131
  "text": "[\"Left\", \"Right\", \"Center\"]",
118
132
  "name": "uiEnumNames"
133
+ }, {
134
+ "text": "Style",
135
+ "name": "uiGroup"
119
136
  }],
120
137
  "text": "Controls the alignment of the flexbox"
121
138
  },
122
139
  "attribute": "alignment",
123
- "reflect": false
140
+ "reflect": false,
141
+ "defaultValue": "\"center\""
124
142
  },
125
143
  "programId": {
126
144
  "type": "string",
@@ -145,12 +163,154 @@ export class BigStat {
145
163
  "attribute": "program-id",
146
164
  "reflect": false
147
165
  },
166
+ "statTextColor": {
167
+ "type": "string",
168
+ "mutable": false,
169
+ "complexType": {
170
+ "original": "string",
171
+ "resolved": "string",
172
+ "references": {}
173
+ },
174
+ "required": false,
175
+ "optional": true,
176
+ "docs": {
177
+ "tags": [{
178
+ "text": "Stat text color",
179
+ "name": "uiName"
180
+ }, {
181
+ "text": "color",
182
+ "name": "uiWidget"
183
+ }, {
184
+ "text": "string",
185
+ "name": "uiType"
186
+ }, {
187
+ "text": "color",
188
+ "name": "format"
189
+ }, {
190
+ "text": "Style",
191
+ "name": "uiGroup"
192
+ }],
193
+ "text": "Color of the stat text"
194
+ },
195
+ "attribute": "stat-text-color",
196
+ "reflect": false
197
+ },
198
+ "statFontSize": {
199
+ "type": "number",
200
+ "mutable": false,
201
+ "complexType": {
202
+ "original": "number",
203
+ "resolved": "number",
204
+ "references": {}
205
+ },
206
+ "required": false,
207
+ "optional": true,
208
+ "docs": {
209
+ "tags": [{
210
+ "text": "Stat font size",
211
+ "name": "uiName"
212
+ }, {
213
+ "text": "string",
214
+ "name": "uiType"
215
+ }, {
216
+ "text": "Style",
217
+ "name": "uiGroup"
218
+ }],
219
+ "text": "Font size of the stat text in pixels"
220
+ },
221
+ "attribute": "stat-font-size",
222
+ "reflect": false
223
+ },
224
+ "statFontWeight": {
225
+ "type": "number",
226
+ "mutable": false,
227
+ "complexType": {
228
+ "original": "number",
229
+ "resolved": "number",
230
+ "references": {}
231
+ },
232
+ "required": false,
233
+ "optional": true,
234
+ "docs": {
235
+ "tags": [{
236
+ "text": "Stat font size",
237
+ "name": "uiName"
238
+ }, {
239
+ "text": "Style",
240
+ "name": "uiGroup"
241
+ }, {
242
+ "text": "[100, 200, 300, 400, 500, 600, 700, 800, 900]",
243
+ "name": "uiEnum"
244
+ }, {
245
+ "text": "[\"Thin\", \"Extra Light\", \"Light\", \"Normal\", \"Medium\", \"Semi Bold\", \"Bold\", \"Extra Bold\", \"Heavy\"]",
246
+ "name": "uiEnumNames"
247
+ }],
248
+ "text": "Font size of the stat text in pixels"
249
+ },
250
+ "attribute": "stat-font-weight",
251
+ "reflect": false
252
+ },
253
+ "descriptionTextColor": {
254
+ "type": "string",
255
+ "mutable": false,
256
+ "complexType": {
257
+ "original": "string",
258
+ "resolved": "string",
259
+ "references": {}
260
+ },
261
+ "required": false,
262
+ "optional": true,
263
+ "docs": {
264
+ "tags": [{
265
+ "text": "Description text color",
266
+ "name": "uiName"
267
+ }, {
268
+ "text": "color",
269
+ "name": "uiWidget"
270
+ }, {
271
+ "text": "string",
272
+ "name": "uiType"
273
+ }, {
274
+ "text": "color",
275
+ "name": "format"
276
+ }, {
277
+ "text": "Style",
278
+ "name": "uiGroup"
279
+ }],
280
+ "text": "Color of the description text"
281
+ },
282
+ "attribute": "description-text-color",
283
+ "reflect": false
284
+ },
285
+ "descriptionFontSize": {
286
+ "type": "number",
287
+ "mutable": false,
288
+ "complexType": {
289
+ "original": "number",
290
+ "resolved": "number",
291
+ "references": {}
292
+ },
293
+ "required": false,
294
+ "optional": true,
295
+ "docs": {
296
+ "tags": [{
297
+ "text": "Description font size",
298
+ "name": "uiName"
299
+ }, {
300
+ "text": "Style",
301
+ "name": "uiGroup"
302
+ }],
303
+ "text": "Font size of the description text in pixels"
304
+ },
305
+ "attribute": "description-font-size",
306
+ "reflect": false
307
+ },
148
308
  "demoData": {
149
309
  "type": "unknown",
150
310
  "mutable": false,
151
311
  "complexType": {
152
312
  "original": "DemoData<BigStatViewProps>",
153
- "resolved": "{ loading?: boolean; value?: number; statvalue?: string; flexReverse?: boolean; alignment?: \"left\" | \"right\" | \"center\"; labelSlot?: VNode; }",
313
+ "resolved": "{ loading?: boolean; value?: number; statvalue?: string; flexReverse?: boolean; alignment?: \"left\" | \"right\" | \"center\"; labelSlot?: VNode; statTextColor?: string; statFontSize?: number; descriptionTextColor?: string; descriptionFontSize?: number; statFontWeight?: number; }",
154
314
  "references": {
155
315
  "DemoData": {
156
316
  "location": "import",
@@ -890,6 +890,11 @@ export function useBigStat(props) {
890
890
  flexReverse,
891
891
  alignment,
892
892
  loading: false,
893
+ statTextColor: props.statTextColor,
894
+ statFontSize: props.statFontSize,
895
+ descriptionTextColor: props.descriptionTextColor,
896
+ descriptionFontSize: props.descriptionFontSize,
897
+ statFontWeight: props.statFontWeight,
893
898
  },
894
899
  label: "BAD PROP TYPE",
895
900
  };
@@ -919,6 +924,11 @@ export function useBigStat(props) {
919
924
  loading: stat === null || stat === void 0 ? void 0 : stat.loading,
920
925
  flexReverse,
921
926
  alignment,
927
+ statTextColor: props.statTextColor,
928
+ statFontSize: props.statFontSize,
929
+ descriptionTextColor: props.descriptionTextColor,
930
+ descriptionFontSize: props.descriptionFontSize,
931
+ statFontWeight: props.statFontWeight,
922
932
  },
923
933
  label,
924
934
  };
@@ -13,8 +13,12 @@ export function useDemoBigStat(props) {
13
13
  value: 0,
14
14
  statvalue: "!!!",
15
15
  loading: false,
16
- flexReverse: false,
17
- alignment: "center",
16
+ flexReverse: props.flexReverse,
17
+ alignment: props.alignment,
18
+ statTextColor: props.statTextColor,
19
+ statFontSize: props.statFontSize,
20
+ descriptionTextColor: props.descriptionTextColor,
21
+ descriptionFontSize: props.descriptionFontSize,
18
22
  },
19
23
  label: "BAD PROP TYPE",
20
24
  };
@@ -26,8 +30,13 @@ export function useDemoBigStat(props) {
26
30
  props: deepmerge({
27
31
  statvalue: "12345",
28
32
  value: 0,
29
- flexReverse: false,
30
- alignment: "center",
33
+ flexReverse: props.flexReverse,
34
+ alignment: props.alignment,
35
+ statTextColor: props.statTextColor,
36
+ statFontSize: props.statFontSize,
37
+ descriptionTextColor: props.descriptionTextColor,
38
+ descriptionFontSize: props.descriptionFontSize,
39
+ statFontWeight: props.statFontWeight,
31
40
  }, props.demoData || {}, { arrayMerge: (_, a) => a }),
32
41
  label: label !== null && label !== void 0 ? label : "Demo Label",
33
42
  };
@@ -16,7 +16,7 @@ const style = {
16
16
  const sheet = createStyleSheet(style);
17
17
  const styleString = sheet.toString();
18
18
  export function PaginationView(props) {
19
- const { states, callbacks, text } = props;
19
+ const { states, callbacks, text, buttonType } = props;
20
20
  const { onNext, onPrev } = callbacks;
21
21
  const { currentPage, totalPages, loading } = states;
22
22
  if (totalPages === 1)
@@ -24,9 +24,9 @@ export function PaginationView(props) {
24
24
  return (h("span", { class: sheet.classes.Container, part: "sqm-base" },
25
25
  h("style", { type: "text/css" }, styleString),
26
26
  !loading && (h(Fragment, null,
27
- h("sl-button", { onClick: onPrev, part: "sqm-pagination-button", circle: true, disabled: currentPage === 1 },
27
+ h("sl-button", { exportparts: `base: ${props.buttonType === "primary" ? "primary" : "secondary"}button-base`, onClick: onPrev, part: "sqm-pagination-button", circle: true, disabled: currentPage === 1 },
28
28
  h("sl-icon", { name: "chevron-left", label: "Previous Page" })),
29
29
  h("div", { class: sheet.classes.TextContainer }, text.paginationText))),
30
- h("sl-button", { onClick: onNext, part: "sqm-pagination-button", circle: true, disabled: currentPage === totalPages },
30
+ h("sl-button", { exportparts: `base: ${props.buttonType === "primary" ? "primary" : "secondary"}button-base`, onClick: onNext, part: "sqm-pagination-button", circle: true, disabled: currentPage === totalPages },
31
31
  h("sl-icon", { name: "chevron-right", label: "Previous Page" }))));
32
32
  }
@@ -19,6 +19,15 @@ export class Pagination {
19
19
  * @uiName Pagination text
20
20
  */
21
21
  this.paginationText = "{currentPage} of {totalPages}";
22
+ /**
23
+ * The type of the button (primary or secondary) that will be used to copy the link.
24
+ * @uiName Button Type
25
+ * @uiType string
26
+ * @uiEnum ["primary", "secondary"]
27
+ * @uiEnumNames ["Primary", "Secondary"]
28
+ * @uiGroup Style
29
+ */
30
+ this.buttonType = "secondary";
22
31
  withHooks(this);
23
32
  }
24
33
  disconnectedCallback() { }
@@ -52,6 +61,39 @@ export class Pagination {
52
61
  "reflect": false,
53
62
  "defaultValue": "\"{currentPage} of {totalPages}\""
54
63
  },
64
+ "buttonType": {
65
+ "type": "string",
66
+ "mutable": false,
67
+ "complexType": {
68
+ "original": "\"primary\" | \"secondary\"",
69
+ "resolved": "\"primary\" | \"secondary\"",
70
+ "references": {}
71
+ },
72
+ "required": false,
73
+ "optional": true,
74
+ "docs": {
75
+ "tags": [{
76
+ "text": "Button Type",
77
+ "name": "uiName"
78
+ }, {
79
+ "text": "string",
80
+ "name": "uiType"
81
+ }, {
82
+ "text": "[\"primary\", \"secondary\"]",
83
+ "name": "uiEnum"
84
+ }, {
85
+ "text": "[\"Primary\", \"Secondary\"]",
86
+ "name": "uiEnumNames"
87
+ }, {
88
+ "text": "Style",
89
+ "name": "uiGroup"
90
+ }],
91
+ "text": "The type of the button (primary or secondary) that will be used to copy the link."
92
+ },
93
+ "attribute": "button-type",
94
+ "reflect": false,
95
+ "defaultValue": "\"secondary\""
96
+ },
55
97
  "demoData": {
56
98
  "type": "unknown",
57
99
  "mutable": false,
@@ -95,6 +137,7 @@ function useDemoPagination(props) {
95
137
  totalPages: 5,
96
138
  loading: false,
97
139
  },
140
+ buttonType: props.buttonType,
98
141
  callbacks: {
99
142
  onNext: () => setCurrentPage(currentPage + 1),
100
143
  onPrev: () => setCurrentPage(currentPage - 1),
@@ -8,7 +8,9 @@ export function ProgramExplainerStepView(props) {
8
8
  width: "100%",
9
9
  padding: "var(--sl-spacing-x-large)",
10
10
  lineHeight: "var(--sl-line-height-dense)",
11
- borderRadius: props.borderRadius || "var(--sl-border-radius-large)",
11
+ borderRadius: props.borderRadius
12
+ ? `${props.borderRadius}px`
13
+ : "var(--sl-border-radius-large)",
12
14
  color: props.textColor || "var(--sqm-text)",
13
15
  background: props.backgroundColor || "var(--sl-color-primary-50)",
14
16
  "@media (max-width: 499px)": {
@@ -115,11 +115,11 @@ export class ProgramExplainerStep {
115
115
  "reflect": false
116
116
  },
117
117
  "borderRadius": {
118
- "type": "string",
118
+ "type": "number",
119
119
  "mutable": false,
120
120
  "complexType": {
121
- "original": "string",
122
- "resolved": "string",
121
+ "original": "number",
122
+ "resolved": "number",
123
123
  "references": {}
124
124
  },
125
125
  "required": false,
@@ -132,7 +132,7 @@ export class ProgramExplainerStep {
132
132
  "text": "number",
133
133
  "name": "type"
134
134
  }],
135
- "text": ""
135
+ "text": "Amount in pixels"
136
136
  },
137
137
  "attribute": "border-radius",
138
138
  "reflect": false
@@ -5,25 +5,37 @@ export function StatContainerView(props, children) {
5
5
  const spaceValue = getComputedStyle(document.documentElement).getPropertyValue(`--sl-spacing-${props.space}`);
6
6
  return `${Math.floor(parseInt(spaceValue) / 2)}rem`;
7
7
  };
8
- // Dependent on props, not feasiable to move out
8
+ // take alignment variable and convert it to CSS flexbox alignment
9
+ const alignment = props.alignment === "center"
10
+ ? "center"
11
+ : props.alignment === "right"
12
+ ? "flex-end"
13
+ : "flex-start";
14
+ // Dependent on props, not feasible to move out
9
15
  const style = {
10
16
  StatContainer: {
11
17
  width: "100%",
12
- display: props.display || "grid",
13
- "grid-template-columns": "repeat(auto-fill, minmax(130px, auto))",
14
- gap: divideSpace(),
15
- // First set of styles applies when shadow DOM is disabled, second set applies when shadow DOM is enabled
18
+ display: "flex",
19
+ flexWrap: "wrap",
20
+ alignItems: "center",
21
+ justifyContent: alignment,
22
+ flexDirection: "row",
23
+ gap: `var(--sl-spacing-${props.gap})`,
24
+ // Apply border styles conditionally based on the hideBorder prop
16
25
  "& > *": {
17
- "border-right": "1px solid #EAEAEA",
26
+ "border-right": props.hideBorder
27
+ ? "none"
28
+ : "1px solid var(--sqm-text-subdued)",
18
29
  "padding-right": divideSpace(),
19
30
  },
20
31
  "& > :last-child": {
21
32
  "border-right": "none",
22
33
  },
23
34
  "& > ::slotted(*)": {
24
- "border-right": "1px solid #EAEAEA",
35
+ "border-right": props.hideBorder
36
+ ? "none"
37
+ : "1px solid var(--sqm-text-subdued)",
25
38
  "padding-right": divideSpace(),
26
- height: "100%",
27
39
  },
28
40
  "& > ::slotted(*:last-child)": {
29
41
  "border-right": "none",
@@ -21,12 +21,29 @@ export class StatContainer {
21
21
  */
22
22
  this.space = "xxx-large";
23
23
  /**
24
+ * @undocumented
24
25
  * @uiName Display
25
26
  * @uiType string
26
27
  * @uiEnum ["grid", "flex"]
27
28
  * @uiEnumNames ["Grid", "Flex"]
28
29
  */
29
- this.display = "grid";
30
+ this.display = "flex";
31
+ /**
32
+ * Controls the alignment of the flexbox
33
+ *
34
+ * @uiName Alignment
35
+ * @uiType string
36
+ * @uiEnum ["left", "right", "center"]
37
+ * @uiEnumNames ["Left", "Right", "Center"]
38
+ */
39
+ this.alignment = "center";
40
+ /**
41
+ * @uiName Gap
42
+ * @uiType string
43
+ * @uiEnum ["none", "xxx-small", "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "xxx-large", "xxxx-large"]
44
+ * @uiEnumNames ["None", "XXX-Small", "XX-Small", "X-Small", "Small", "Medium", "Large", "X-Large", "XX-Large", "XXX-Large", "XXXX-Large"]
45
+ */
46
+ this.gap = "x-large";
30
47
  withHooks(this);
31
48
  }
32
49
  disconnectedCallback() { }
@@ -84,6 +101,9 @@ export class StatContainer {
84
101
  "optional": false,
85
102
  "docs": {
86
103
  "tags": [{
104
+ "text": undefined,
105
+ "name": "undocumented"
106
+ }, {
87
107
  "text": "Display",
88
108
  "name": "uiName"
89
109
  }, {
@@ -100,7 +120,95 @@ export class StatContainer {
100
120
  },
101
121
  "attribute": "display",
102
122
  "reflect": false,
103
- "defaultValue": "\"grid\""
123
+ "defaultValue": "\"flex\""
124
+ },
125
+ "hideBorder": {
126
+ "type": "boolean",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "boolean",
130
+ "resolved": "boolean",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": true,
135
+ "docs": {
136
+ "tags": [{
137
+ "text": "Hide border",
138
+ "name": "uiName"
139
+ }, {
140
+ "text": "boolean",
141
+ "name": "uiType"
142
+ }],
143
+ "text": "Hide the seperating border between stats"
144
+ },
145
+ "attribute": "hide-border",
146
+ "reflect": false
147
+ },
148
+ "alignment": {
149
+ "type": "string",
150
+ "mutable": false,
151
+ "complexType": {
152
+ "original": "\"left\" | \"right\" | \"center\"",
153
+ "resolved": "\"center\" | \"left\" | \"right\"",
154
+ "references": {}
155
+ },
156
+ "required": false,
157
+ "optional": true,
158
+ "docs": {
159
+ "tags": [{
160
+ "text": "Alignment",
161
+ "name": "uiName"
162
+ }, {
163
+ "text": "string",
164
+ "name": "uiType"
165
+ }, {
166
+ "text": "[\"left\", \"right\", \"center\"]",
167
+ "name": "uiEnum"
168
+ }, {
169
+ "text": "[\"Left\", \"Right\", \"Center\"]",
170
+ "name": "uiEnumNames"
171
+ }],
172
+ "text": "Controls the alignment of the flexbox"
173
+ },
174
+ "attribute": "alignment",
175
+ "reflect": false,
176
+ "defaultValue": "\"center\""
177
+ },
178
+ "gap": {
179
+ "type": "string",
180
+ "mutable": false,
181
+ "complexType": {
182
+ "original": "Spacing",
183
+ "resolved": "\"large\" | \"medium\" | \"none\" | \"small\" | \"x-large\" | \"x-small\" | \"xx-large\" | \"xx-small\" | \"xxx-large\" | \"xxx-small\" | \"xxxx-large\"",
184
+ "references": {
185
+ "Spacing": {
186
+ "location": "import",
187
+ "path": "../../global/mixins"
188
+ }
189
+ }
190
+ },
191
+ "required": false,
192
+ "optional": false,
193
+ "docs": {
194
+ "tags": [{
195
+ "text": "Gap",
196
+ "name": "uiName"
197
+ }, {
198
+ "text": "string",
199
+ "name": "uiType"
200
+ }, {
201
+ "text": "[\"none\", \"xxx-small\", \"xx-small\", \"x-small\", \"small\", \"medium\", \"large\", \"x-large\", \"xx-large\", \"xxx-large\", \"xxxx-large\"]",
202
+ "name": "uiEnum"
203
+ }, {
204
+ "text": "[\"None\", \"XXX-Small\", \"XX-Small\", \"X-Small\", \"Small\", \"Medium\", \"Large\", \"X-Large\", \"XX-Large\", \"XXX-Large\", \"XXXX-Large\"]",
205
+ "name": "uiEnumNames"
206
+ }],
207
+ "text": ""
208
+ },
209
+ "attribute": "gap",
210
+ "reflect": false,
211
+ "defaultValue": "\"x-large\""
104
212
  }
105
213
  }; }
106
214
  static get states() { return {