@saasquatch/mint-components 1.15.0-15 → 1.15.0-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.
- package/dist/cjs/{ShadowViewAddon-d2ed86e8.js → ShadowViewAddon-974f6839.js} +97 -57
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_41.cjs.entry.js +37 -5
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +31 -6
- package/dist/cjs/sqm-tabs.cjs.entry.js +9 -4
- package/dist/collection/components/sqm-big-stat/BigStat.stories.js +13 -0
- package/dist/collection/components/sqm-big-stat/sqm-big-stat-view.js +15 -7
- package/dist/collection/components/sqm-big-stat/sqm-big-stat.js +162 -2
- package/dist/collection/components/sqm-big-stat/useBigStat.js +10 -0
- package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +13 -4
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code-view.js +13 -13
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +3 -1
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +4 -4
- package/dist/collection/components/sqm-share-button/ShareButton.stories.js +3 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +23 -22
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +53 -7
- package/dist/collection/components/sqm-stat-container/sqm-stat-container-view.js +20 -8
- package/dist/collection/components/sqm-stat-container/sqm-stat-container.js +110 -2
- package/dist/collection/components/sqm-tabs/Tabs.stories.js +7 -0
- package/dist/collection/components/sqm-tabs/sqm-tabs-view.js +7 -2
- package/dist/collection/components/sqm-tabs/sqm-tabs.js +28 -2
- package/dist/esm/{ShadowViewAddon-3651cb42.js → ShadowViewAddon-6a9f6e48.js} +97 -57
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_41.entry.js +37 -5
- package/dist/esm/sqm-stencilbook.entry.js +31 -6
- package/dist/esm/sqm-tabs.entry.js +9 -4
- package/dist/esm-es5/ShadowViewAddon-6a9f6e48.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-094b3b54.system.entry.js +1 -0
- package/dist/mint-components/{p-9b2e60ce.entry.js → p-3d8c4dd2.entry.js} +3 -3
- package/dist/mint-components/p-72263a72.js +394 -0
- package/dist/mint-components/p-81d6479a.system.js +1 -0
- package/dist/mint-components/p-b6de39a2.entry.js +1 -0
- package/dist/mint-components/{p-60e72631.entry.js → p-d30919cd.entry.js} +2 -2
- package/dist/mint-components/p-ead64a3d.system.entry.js +1 -0
- package/dist/mint-components/p-ee06426a.system.js +1 -1
- package/dist/mint-components/p-fdaa4dbb.system.entry.js +1 -0
- package/dist/types/components/sqm-big-stat/BigStat.stories.d.ts +2 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat-view.d.ts +5 -0
- package/dist/types/components/sqm-big-stat/sqm-big-stat.d.ts +41 -0
- package/dist/types/components/sqm-coupon-code/sqm-coupon-code-view.d.ts +1 -0
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +1 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +2 -1
- package/dist/types/components/sqm-share-button/ShareButton.stories.d.ts +1 -1
- package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +2 -1
- package/dist/types/components/sqm-share-button/sqm-share-button.d.ts +15 -3
- package/dist/types/components/sqm-stat-container/sqm-stat-container-view.d.ts +3 -0
- package/dist/types/components/sqm-stat-container/sqm-stat-container.d.ts +23 -0
- package/dist/types/components/sqm-tabs/Tabs.stories.d.ts +1 -0
- package/dist/types/components/sqm-tabs/sqm-tabs-view.d.ts +1 -0
- package/dist/types/components/sqm-tabs/sqm-tabs.d.ts +8 -0
- package/dist/types/components.d.ts +176 -8
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-3651cb42.js +0 -1
- package/dist/mint-components/p-16dba1eb.system.js +0 -1
- package/dist/mint-components/p-70c8fea5.system.entry.js +0 -1
- package/dist/mint-components/p-9617685e.system.entry.js +0 -1
- package/dist/mint-components/p-a6ca754f.js +0 -394
- package/dist/mint-components/p-c060f770.system.entry.js +0 -1
- package/dist/mint-components/p-dcc81e90.entry.js +0 -1
|
@@ -28,8 +28,8 @@ export class ShareButton {
|
|
|
28
28
|
/**
|
|
29
29
|
* @uiType string
|
|
30
30
|
* @uiName Button style
|
|
31
|
-
* @uiEnum ["primary" , "success", "info", "warning", "danger", "default", "text" ]
|
|
32
|
-
* @uiEnumNames ["Primary", "Success", "Info", "Warning", "Danger", "Default", "Text"]
|
|
31
|
+
* @uiEnum ["primary", "secondary", "success", "info", "warning", "danger", "default", "text" ]
|
|
32
|
+
* @uiEnumNames ["Primary", "Secondary", "Success", "Info", "Warning", "Danger", "Default", "Text"]
|
|
33
33
|
*/
|
|
34
34
|
this.type = "default";
|
|
35
35
|
/**
|
|
@@ -41,11 +41,13 @@ export class ShareButton {
|
|
|
41
41
|
this.iconslot = "prefix";
|
|
42
42
|
/**
|
|
43
43
|
* @uiName Hide icon
|
|
44
|
+
* @uiGroup Style
|
|
44
45
|
* @default
|
|
45
46
|
*/
|
|
46
47
|
this.hideicon = false;
|
|
47
48
|
/**
|
|
48
49
|
* @uiName Hide text
|
|
50
|
+
* @uiGroup Style
|
|
49
51
|
* @default
|
|
50
52
|
*/
|
|
51
53
|
this.hidetext = false;
|
|
@@ -148,6 +150,9 @@ export class ShareButton {
|
|
|
148
150
|
"tags": [{
|
|
149
151
|
"text": "Border radius",
|
|
150
152
|
"name": "uiName"
|
|
153
|
+
}, {
|
|
154
|
+
"text": "Style",
|
|
155
|
+
"name": "uiGroup"
|
|
151
156
|
}],
|
|
152
157
|
"text": "Configure border radius with pixel amount"
|
|
153
158
|
},
|
|
@@ -174,12 +179,38 @@ export class ShareButton {
|
|
|
174
179
|
}, {
|
|
175
180
|
"text": "color",
|
|
176
181
|
"name": "format"
|
|
182
|
+
}, {
|
|
183
|
+
"text": "Style",
|
|
184
|
+
"name": "uiGroup"
|
|
177
185
|
}],
|
|
178
186
|
"text": ""
|
|
179
187
|
},
|
|
180
188
|
"attribute": "backgroundcolor",
|
|
181
189
|
"reflect": false
|
|
182
190
|
},
|
|
191
|
+
"border": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"mutable": false,
|
|
194
|
+
"complexType": {
|
|
195
|
+
"original": "string",
|
|
196
|
+
"resolved": "string",
|
|
197
|
+
"references": {}
|
|
198
|
+
},
|
|
199
|
+
"required": false,
|
|
200
|
+
"optional": true,
|
|
201
|
+
"docs": {
|
|
202
|
+
"tags": [{
|
|
203
|
+
"text": "Border",
|
|
204
|
+
"name": "uiName"
|
|
205
|
+
}, {
|
|
206
|
+
"text": "Style",
|
|
207
|
+
"name": "uiGroup"
|
|
208
|
+
}],
|
|
209
|
+
"text": ""
|
|
210
|
+
},
|
|
211
|
+
"attribute": "border",
|
|
212
|
+
"reflect": false
|
|
213
|
+
},
|
|
183
214
|
"textcolor": {
|
|
184
215
|
"type": "string",
|
|
185
216
|
"mutable": false,
|
|
@@ -200,6 +231,9 @@ export class ShareButton {
|
|
|
200
231
|
}, {
|
|
201
232
|
"text": "color",
|
|
202
233
|
"name": "format"
|
|
234
|
+
}, {
|
|
235
|
+
"text": "Style",
|
|
236
|
+
"name": "uiGroup"
|
|
203
237
|
}],
|
|
204
238
|
"text": ""
|
|
205
239
|
},
|
|
@@ -220,6 +254,9 @@ export class ShareButton {
|
|
|
220
254
|
"tags": [{
|
|
221
255
|
"text": "Display pill",
|
|
222
256
|
"name": "uiName"
|
|
257
|
+
}, {
|
|
258
|
+
"text": "Style",
|
|
259
|
+
"name": "uiGroup"
|
|
223
260
|
}],
|
|
224
261
|
"text": ""
|
|
225
262
|
},
|
|
@@ -250,8 +287,8 @@ export class ShareButton {
|
|
|
250
287
|
"type": "string",
|
|
251
288
|
"mutable": false,
|
|
252
289
|
"complexType": {
|
|
253
|
-
"original": "| \"primary\"\n | \"success\"\n | \"info\"\n | \"warning\"\n | \"danger\"\n | \"default\"\n | \"text\"",
|
|
254
|
-
"resolved": "\"danger\" | \"default\" | \"info\" | \"primary\" | \"success\" | \"text\" | \"warning\"",
|
|
290
|
+
"original": "| \"primary\"\n | \"secondary\"\n | \"success\"\n | \"info\"\n | \"warning\"\n | \"danger\"\n | \"default\"\n | \"text\"",
|
|
291
|
+
"resolved": "\"danger\" | \"default\" | \"info\" | \"primary\" | \"secondary\" | \"success\" | \"text\" | \"warning\"",
|
|
255
292
|
"references": {}
|
|
256
293
|
},
|
|
257
294
|
"required": false,
|
|
@@ -264,10 +301,10 @@ export class ShareButton {
|
|
|
264
301
|
"text": "Button style",
|
|
265
302
|
"name": "uiName"
|
|
266
303
|
}, {
|
|
267
|
-
"text": "[\"primary\" , \"success\", \"info\", \"warning\", \"danger\", \"default\", \"text\" ]",
|
|
304
|
+
"text": "[\"primary\", \"secondary\", \"success\", \"info\", \"warning\", \"danger\", \"default\", \"text\" ]",
|
|
268
305
|
"name": "uiEnum"
|
|
269
306
|
}, {
|
|
270
|
-
"text": "[\"Primary\", \"Success\", \"Info\", \"Warning\", \"Danger\", \"Default\", \"Text\"]",
|
|
307
|
+
"text": "[\"Primary\", \"Secondary\", \"Success\", \"Info\", \"Warning\", \"Danger\", \"Default\", \"Text\"]",
|
|
271
308
|
"name": "uiEnumNames"
|
|
272
309
|
}],
|
|
273
310
|
"text": ""
|
|
@@ -299,6 +336,9 @@ export class ShareButton {
|
|
|
299
336
|
}, {
|
|
300
337
|
"text": "[\"Small\", \"Medium\", \"Large\"]",
|
|
301
338
|
"name": "uiEnumNames"
|
|
339
|
+
}, {
|
|
340
|
+
"text": "Style",
|
|
341
|
+
"name": "uiGroup"
|
|
302
342
|
}],
|
|
303
343
|
"text": ""
|
|
304
344
|
},
|
|
@@ -369,6 +409,9 @@ export class ShareButton {
|
|
|
369
409
|
"tags": [{
|
|
370
410
|
"text": "Hide icon",
|
|
371
411
|
"name": "uiName"
|
|
412
|
+
}, {
|
|
413
|
+
"text": "Style",
|
|
414
|
+
"name": "uiGroup"
|
|
372
415
|
}, {
|
|
373
416
|
"text": undefined,
|
|
374
417
|
"name": "default"
|
|
@@ -393,6 +436,9 @@ export class ShareButton {
|
|
|
393
436
|
"tags": [{
|
|
394
437
|
"text": "Hide text",
|
|
395
438
|
"name": "uiName"
|
|
439
|
+
}, {
|
|
440
|
+
"text": "Style",
|
|
441
|
+
"name": "uiGroup"
|
|
396
442
|
}, {
|
|
397
443
|
"text": undefined,
|
|
398
444
|
"name": "default"
|
|
@@ -490,7 +536,7 @@ export class ShareButton {
|
|
|
490
536
|
"mutable": false,
|
|
491
537
|
"complexType": {
|
|
492
538
|
"original": "DemoData<ShareButtonViewProps>",
|
|
493
|
-
"resolved": "{ loading?: boolean; icon?: string; disabled?: boolean; onClick?: () => void; medium?: \"facebook\" | \"twitter\" | \"email\" | \"direct\" | \"linkedin\" | \"sms\" | \"fbmessenger\" | \"whatsapp\" | \"linemessenger\" | \"pinterest\" | \"reminder\" | \"unknown\"; pill?: boolean; type?: \"text\" | \"primary\" | \"warning\" | \"info\" | \"success\" | \"default\" | \"danger\"; size?: \"small\" | \"medium\" | \"large\"; hideicon?: boolean; hidetext?: boolean; iconslot?: \"prefix\" | \"suffix\"; hide?: boolean; borderradius?: number; backgroundcolor?: string; textcolor?: string; messageLink?: string; openInSameTab?: boolean; isPlainLink?: boolean; }",
|
|
539
|
+
"resolved": "{ loading?: boolean; icon?: string; disabled?: boolean; onClick?: () => void; medium?: \"facebook\" | \"twitter\" | \"email\" | \"direct\" | \"linkedin\" | \"sms\" | \"fbmessenger\" | \"whatsapp\" | \"linemessenger\" | \"pinterest\" | \"reminder\" | \"unknown\"; pill?: boolean; type?: \"text\" | \"primary\" | \"secondary\" | \"warning\" | \"info\" | \"success\" | \"default\" | \"danger\"; size?: \"small\" | \"medium\" | \"large\"; border?: string; hideicon?: boolean; hidetext?: boolean; iconslot?: \"prefix\" | \"suffix\"; hide?: boolean; borderradius?: number; backgroundcolor?: string; textcolor?: string; messageLink?: string; openInSameTab?: boolean; isPlainLink?: boolean; }",
|
|
494
540
|
"references": {
|
|
495
541
|
"DemoData": {
|
|
496
542
|
"location": "import",
|
|
@@ -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
|
-
//
|
|
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:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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":
|
|
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":
|
|
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 = "
|
|
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": "\"
|
|
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 {
|
|
@@ -13,6 +13,13 @@ export const SimpleTabs = () => (h("div", { style: { maxWidth: "700px", margin:
|
|
|
13
13
|
<sqm-tab header="Advanced">This is the advanced tab</sqm-tab>
|
|
14
14
|
</sqm-tabs>
|
|
15
15
|
` }));
|
|
16
|
+
export const CustomColor = () => (h("div", { style: { maxWidth: "700px", margin: "auto" }, innerHTML: `
|
|
17
|
+
<sqm-tabs text-color="red">
|
|
18
|
+
<sqm-tab header="General">This is the general tab</sqm-tab>
|
|
19
|
+
<sqm-tab header="Custom">This is the custom tab</sqm-tab>
|
|
20
|
+
<sqm-tab header="Advanced">This is the advanced tab</sqm-tab>
|
|
21
|
+
</sqm-tabs>
|
|
22
|
+
` }));
|
|
16
23
|
export const ManyTabs = () => (h("div", { style: { maxWidth: "700px", margin: "auto" }, innerHTML: `
|
|
17
24
|
<sqm-tabs>
|
|
18
25
|
<sqm-tab header="General">This is the general tab</sqm-tab>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
export const TabsView = ({ content, placement, }) => {
|
|
2
|
+
export const TabsView = ({ content, placement, textColor = "var(--sqm-text)", }) => {
|
|
3
3
|
// Vertical padding for top & bottom placement, horizontal for left & right.
|
|
4
4
|
const padding = !placement || placement === "top" || placement === "bottom"
|
|
5
5
|
? "var(--sl-spacing-x-large) 0;"
|
|
@@ -8,7 +8,12 @@ export const TabsView = ({ content, placement, }) => {
|
|
|
8
8
|
sl-tab-panel::part(base) {
|
|
9
9
|
padding: ${padding};
|
|
10
10
|
}
|
|
11
|
+
|
|
12
|
+
sl-tab::part(base) {
|
|
13
|
+
color: ${textColor};
|
|
14
|
+
}
|
|
11
15
|
`;
|
|
16
|
+
console.log("text color is ", textColor);
|
|
12
17
|
return (h(Host, null,
|
|
13
18
|
h("style", { type: "text/css" }, vanillaStyle),
|
|
14
19
|
h("sl-tab-group", { placement: placement }, content.tabs.map((tab) => {
|
|
@@ -19,7 +24,7 @@ export const TabsView = ({ content, placement, }) => {
|
|
|
19
24
|
h("slot", { name: slotName }))));
|
|
20
25
|
}
|
|
21
26
|
return [
|
|
22
|
-
h("sl-tab", { slot: "nav", panel: slotName, id: tab.getAttribute("id") || slotName }, tab.getAttribute("header")),
|
|
27
|
+
h("sl-tab", { slot: "nav", panel: slotName, part: "tab", id: tab.getAttribute("id") || slotName }, tab.getAttribute("header")),
|
|
23
28
|
h("sl-tab-panel", { name: slotName },
|
|
24
29
|
h("slot", { name: slotName })),
|
|
25
30
|
];
|
|
@@ -19,8 +19,8 @@ export class Tabs {
|
|
|
19
19
|
disconnectedCallback() { }
|
|
20
20
|
render() {
|
|
21
21
|
const { content } = useTabs();
|
|
22
|
-
const { placement } = getProps(this);
|
|
23
|
-
return (h(TabsView, { placement: placement, content: content },
|
|
22
|
+
const { placement, textColor } = getProps(this);
|
|
23
|
+
return (h(TabsView, { placement: placement, content: content, textColor: textColor },
|
|
24
24
|
h("slot", null)));
|
|
25
25
|
}
|
|
26
26
|
static get is() { return "sqm-tabs"; }
|
|
@@ -54,6 +54,32 @@ export class Tabs {
|
|
|
54
54
|
},
|
|
55
55
|
"attribute": "placement",
|
|
56
56
|
"reflect": false
|
|
57
|
+
},
|
|
58
|
+
"textColor": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"mutable": false,
|
|
61
|
+
"complexType": {
|
|
62
|
+
"original": "string",
|
|
63
|
+
"resolved": "string",
|
|
64
|
+
"references": {}
|
|
65
|
+
},
|
|
66
|
+
"required": false,
|
|
67
|
+
"optional": true,
|
|
68
|
+
"docs": {
|
|
69
|
+
"tags": [{
|
|
70
|
+
"text": "Text color",
|
|
71
|
+
"name": "uiName"
|
|
72
|
+
}, {
|
|
73
|
+
"text": "string",
|
|
74
|
+
"name": "uiType"
|
|
75
|
+
}, {
|
|
76
|
+
"text": "color",
|
|
77
|
+
"name": "uiWidget"
|
|
78
|
+
}],
|
|
79
|
+
"text": "Tab text color"
|
|
80
|
+
},
|
|
81
|
+
"attribute": "text-color",
|
|
82
|
+
"reflect": false
|
|
57
83
|
}
|
|
58
84
|
}; }
|
|
59
85
|
}
|