@getflip/swirl-components 0.85.1 → 0.87.0
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/components.json +712 -145
- package/dist/cjs/index-506fe4ea.js +32 -8
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-app-layout_7.cjs.entry.js +8 -3
- package/dist/cjs/swirl-autocomplete.cjs.entry.js +99 -15
- package/dist/cjs/swirl-button.cjs.entry.js +1 -1
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-emoji-clap.cjs.entry.js +23 -0
- package/dist/cjs/swirl-emoji-happy.cjs.entry.js +23 -0
- package/dist/cjs/swirl-emoji-idea.cjs.entry.js +23 -0
- package/dist/cjs/swirl-emoji-love.cjs.entry.js +23 -0
- package/dist/cjs/swirl-emoji-sad.cjs.entry.js +23 -0
- package/dist/cjs/swirl-emoji-thumbs-up.cjs.entry.js +23 -0
- package/dist/cjs/swirl-emoji.cjs.entry.js +23 -0
- package/dist/cjs/swirl-form-control.cjs.entry.js +1 -1
- package/dist/cjs/swirl-icon.cjs.entry.js +3 -3
- package/dist/cjs/{swirl-option-list.cjs.entry.js → swirl-option-list_2.cjs.entry.js} +29 -0
- package/dist/cjs/swirl-select.cjs.entry.js +2 -2
- package/dist/cjs/swirl-tab-bar.cjs.entry.js +2 -2
- package/dist/cjs/swirl-tab.cjs.entry.js +1 -0
- package/dist/cjs/swirl-tabs.cjs.entry.js +1 -0
- package/dist/cjs/swirl-text-input.cjs.entry.js +1 -1
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +0 -22
- package/dist/collection/collection-manifest.json +7 -0
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.css +15 -0
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.js +155 -26
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.spec.js +12 -14
- package/dist/collection/components/swirl-autocomplete/swirl-autocomplete.stories.js +15 -7
- package/dist/collection/components/swirl-button/swirl-button.css +5 -5
- package/dist/collection/components/swirl-emoji/emojis/swirl-emoji-clap.js +70 -0
- package/dist/collection/components/swirl-emoji/emojis/swirl-emoji-happy.js +70 -0
- package/dist/collection/components/swirl-emoji/emojis/swirl-emoji-idea.js +70 -0
- package/dist/collection/components/swirl-emoji/emojis/swirl-emoji-love.js +70 -0
- package/dist/collection/components/swirl-emoji/emojis/swirl-emoji-sad.js +70 -0
- package/dist/collection/components/swirl-emoji/emojis/swirl-emoji-thumbs-up.js +70 -0
- package/dist/collection/components/swirl-emoji/swirl-emoji.css +3 -0
- package/dist/collection/components/swirl-emoji/swirl-emoji.js +86 -0
- package/dist/collection/components/swirl-emoji/swirl-emoji.spec.js +17 -0
- package/dist/collection/components/swirl-emoji/swirl-emoji.stories.js +28 -0
- package/dist/collection/components/swirl-emoji/swirl-emoji.types.js +1 -0
- package/dist/collection/components/swirl-form-control/swirl-form-control.css +19 -0
- package/dist/collection/components/swirl-icon/swirl-icon.js +1 -1
- package/dist/collection/components/swirl-option-list/swirl-option-list.js +5 -0
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.css +44 -10
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.js +25 -2
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.stories.js +15 -4
- package/dist/collection/components/swirl-select/swirl-select.css +2 -1
- package/dist/collection/components/swirl-select/swirl-select.js +1 -1
- package/dist/collection/components/swirl-tab/swirl-tab.js +18 -0
- package/dist/collection/components/swirl-tab/swirl-tab.stories.js +1 -0
- package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.css +7 -2
- package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.js +1 -1
- package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.stories.js +2 -0
- package/dist/collection/components/swirl-tabs/swirl-tabs.js +1 -0
- package/dist/collection/components/swirl-tabs/swirl-tabs.stories.js +2 -2
- package/dist/collection/components/swirl-text-input/swirl-text-input.css +8 -0
- package/dist/collection/components/swirl-text-input/swirl-text-input.stories.js +1 -0
- package/dist/components/assets/pdfjs/pdf.worker.min.js +0 -22
- package/dist/components/swirl-autocomplete.js +142 -38
- package/dist/components/swirl-button2.js +1 -1
- package/dist/components/swirl-emoji-clap.d.ts +11 -0
- package/dist/components/swirl-emoji-clap.js +41 -0
- package/dist/components/swirl-emoji-happy.d.ts +11 -0
- package/dist/components/swirl-emoji-happy.js +41 -0
- package/dist/components/swirl-emoji-idea.d.ts +11 -0
- package/dist/components/swirl-emoji-idea.js +41 -0
- package/dist/components/swirl-emoji-love.d.ts +11 -0
- package/dist/components/swirl-emoji-love.js +41 -0
- package/dist/components/swirl-emoji-sad.d.ts +11 -0
- package/dist/components/swirl-emoji-sad.js +41 -0
- package/dist/components/swirl-emoji-thumbs-up.d.ts +11 -0
- package/dist/components/swirl-emoji-thumbs-up.js +41 -0
- package/dist/components/swirl-emoji.d.ts +11 -0
- package/dist/components/swirl-emoji.js +42 -0
- package/dist/components/swirl-form-control.js +1 -1
- package/dist/components/swirl-icon.js +3 -3
- package/dist/components/swirl-option-list2.js +5 -0
- package/dist/components/swirl-resource-list-item2.js +9 -3
- package/dist/components/swirl-select.js +2 -2
- package/dist/components/swirl-tab-bar2.js +2 -2
- package/dist/components/swirl-tab.js +2 -0
- package/dist/components/swirl-tabs.js +1 -0
- package/dist/components/swirl-text-input2.js +1 -1
- package/dist/esm/index-99d0060d.js +32 -8
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-app-layout_7.entry.js +8 -3
- package/dist/esm/swirl-autocomplete.entry.js +99 -15
- package/dist/esm/swirl-button.entry.js +1 -1
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-emoji-clap.entry.js +19 -0
- package/dist/esm/swirl-emoji-happy.entry.js +19 -0
- package/dist/esm/swirl-emoji-idea.entry.js +19 -0
- package/dist/esm/swirl-emoji-love.entry.js +19 -0
- package/dist/esm/swirl-emoji-sad.entry.js +19 -0
- package/dist/esm/swirl-emoji-thumbs-up.entry.js +19 -0
- package/dist/esm/swirl-emoji.entry.js +19 -0
- package/dist/esm/swirl-form-control.entry.js +1 -1
- package/dist/esm/swirl-icon.entry.js +3 -3
- package/dist/esm/{swirl-option-list.entry.js → swirl-option-list_2.entry.js} +29 -1
- package/dist/esm/swirl-select.entry.js +2 -2
- package/dist/esm/swirl-tab-bar.entry.js +2 -2
- package/dist/esm/swirl-tab.entry.js +1 -0
- package/dist/esm/swirl-tabs.entry.js +1 -0
- package/dist/esm/swirl-text-input.entry.js +1 -1
- package/dist/swirl-components/p-01a47a2e.entry.js +1 -0
- package/dist/swirl-components/{p-902fc533.entry.js → p-0f979ef7.entry.js} +1 -1
- package/dist/swirl-components/p-2d16eca4.entry.js +1 -0
- package/dist/swirl-components/p-377f7d35.entry.js +1 -0
- package/dist/swirl-components/p-3a430e14.entry.js +1 -0
- package/dist/swirl-components/p-66551e51.entry.js +1 -0
- package/dist/swirl-components/p-7dafac36.entry.js +1 -0
- package/dist/swirl-components/p-8153cd85.entry.js +1 -0
- package/dist/swirl-components/p-a298fdf9.entry.js +1 -0
- package/dist/swirl-components/p-b5be788e.entry.js +1 -0
- package/dist/swirl-components/p-bf258885.entry.js +1 -0
- package/dist/swirl-components/{p-a3e6a921.entry.js → p-c8870a5b.entry.js} +1 -1
- package/dist/swirl-components/p-cfbfb7be.entry.js +1 -0
- package/dist/swirl-components/p-e1daecf5.entry.js +1 -0
- package/dist/swirl-components/p-e9b2ed15.entry.js +1 -0
- package/dist/swirl-components/{p-ce1cd2e1.entry.js → p-e9e6bea8.entry.js} +1 -1
- package/dist/swirl-components/p-eb3c6b4d.entry.js +1 -0
- package/dist/swirl-components/swirl-components.css +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-autocomplete/swirl-autocomplete.d.ts +11 -4
- package/dist/types/components/swirl-autocomplete/swirl-autocomplete.stories.d.ts +7 -0
- package/dist/types/components/swirl-emoji/emojis/swirl-emoji-clap.d.ts +6 -0
- package/dist/types/components/swirl-emoji/emojis/swirl-emoji-happy.d.ts +6 -0
- package/dist/types/components/swirl-emoji/emojis/swirl-emoji-idea.d.ts +6 -0
- package/dist/types/components/swirl-emoji/emojis/swirl-emoji-love.d.ts +6 -0
- package/dist/types/components/swirl-emoji/emojis/swirl-emoji-sad.d.ts +6 -0
- package/dist/types/components/swirl-emoji/emojis/swirl-emoji-thumbs-up.d.ts +6 -0
- package/dist/types/components/swirl-emoji/swirl-emoji.d.ts +7 -0
- package/dist/types/components/swirl-emoji/swirl-emoji.stories.d.ts +20 -0
- package/dist/types/components/swirl-emoji/swirl-emoji.types.d.ts +1 -0
- package/dist/types/components/swirl-icon/swirl-icon.d.ts +1 -1
- package/dist/types/components/swirl-resource-list-item/swirl-resource-list-item.d.ts +2 -0
- package/dist/types/components/swirl-tab/swirl-tab.d.ts +1 -0
- package/dist/types/components/swirl-tab-bar/swirl-tab-bar.d.ts +1 -0
- package/dist/types/components.d.ts +138 -7
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
- package/vscode-data.json +139 -4
- package/dist/cjs/swirl-tag.cjs.entry.js +0 -30
- package/dist/esm/swirl-tag.entry.js +0 -26
- package/dist/swirl-components/p-06012b5a.entry.js +0 -1
- package/dist/swirl-components/p-18a16156.entry.js +0 -1
- package/dist/swirl-components/p-6f178b75.entry.js +0 -1
- package/dist/swirl-components/p-7521afa2.entry.js +0 -1
- package/dist/swirl-components/p-9c5e2b99.entry.js +0 -1
- package/dist/swirl-components/p-b86c0a97.entry.js +0 -1
- package/dist/swirl-components/p-c3d23855.entry.js +0 -1
- package/dist/swirl-components/p-f299ab14.entry.js +0 -1
package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.stories.js
CHANGED
|
@@ -25,7 +25,16 @@ const Template = (args) => {
|
|
|
25
25
|
const control = document.createElement("span");
|
|
26
26
|
const element = generateStoryElement("swirl-resource-list-item", args);
|
|
27
27
|
element.innerHTML = `
|
|
28
|
-
<swirl-avatar
|
|
28
|
+
<swirl-avatar
|
|
29
|
+
slot="media"
|
|
30
|
+
label="Jane Doe"
|
|
31
|
+
src="https://avatars.dicebear.com/api/adventurer-neutral/a.svg?size=144"></swirl-avatar>
|
|
32
|
+
|
|
33
|
+
<swirl-stack slot="badges" align="center" orientation="horizontal" spacing="8">
|
|
34
|
+
<swirl-icon-notifications-off size="16"></swirl-icon-notifications-off>
|
|
35
|
+
<swirl-badge label="1" size="s"></swirl-badge>
|
|
36
|
+
</swirl-stack>
|
|
37
|
+
|
|
29
38
|
`;
|
|
30
39
|
control.slot = "control";
|
|
31
40
|
control.innerHTML = `
|
|
@@ -33,8 +42,9 @@ const Template = (args) => {
|
|
|
33
42
|
<swirl-button
|
|
34
43
|
hide-label
|
|
35
44
|
icon="<swirl-icon-more-horizontal></swirl-icon-more-horizontal>"
|
|
36
|
-
|
|
37
|
-
|
|
45
|
+
label="Show menu"
|
|
46
|
+
size="s"
|
|
47
|
+
variant="flat"></swirl-button>
|
|
38
48
|
</swirl-popover-trigger>
|
|
39
49
|
`;
|
|
40
50
|
list.setAttribute("aria-label", "List");
|
|
@@ -57,11 +67,12 @@ const Template = (args) => {
|
|
|
57
67
|
`;
|
|
58
68
|
element.append(" ", control, "\n ");
|
|
59
69
|
list.append("\n ", element, "\n ");
|
|
60
|
-
container.append("\n ", list, "\n ", popover, "\n");
|
|
70
|
+
container.append("\n ", list, "\n\n ", popover, "\n");
|
|
61
71
|
return container;
|
|
62
72
|
};
|
|
63
73
|
export const SwirlResourceListItem = Template.bind({});
|
|
64
74
|
SwirlResourceListItem.args = {
|
|
65
75
|
description: "With a description",
|
|
66
76
|
label: "This is a resource item",
|
|
77
|
+
meta: "Today",
|
|
67
78
|
};
|
|
@@ -3,6 +3,7 @@ import classnames from "classnames";
|
|
|
3
3
|
export class SwirlTab {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.active = undefined;
|
|
6
|
+
this.icon = undefined;
|
|
6
7
|
this.label = undefined;
|
|
7
8
|
this.tabId = undefined;
|
|
8
9
|
}
|
|
@@ -41,6 +42,23 @@ export class SwirlTab {
|
|
|
41
42
|
"attribute": "active",
|
|
42
43
|
"reflect": false
|
|
43
44
|
},
|
|
45
|
+
"icon": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"mutable": false,
|
|
48
|
+
"complexType": {
|
|
49
|
+
"original": "string",
|
|
50
|
+
"resolved": "string",
|
|
51
|
+
"references": {}
|
|
52
|
+
},
|
|
53
|
+
"required": false,
|
|
54
|
+
"optional": true,
|
|
55
|
+
"docs": {
|
|
56
|
+
"tags": [],
|
|
57
|
+
"text": ""
|
|
58
|
+
},
|
|
59
|
+
"attribute": "icon",
|
|
60
|
+
"reflect": false
|
|
61
|
+
},
|
|
44
62
|
"label": {
|
|
45
63
|
"type": "string",
|
|
46
64
|
"mutable": false,
|
|
@@ -17,10 +17,11 @@
|
|
|
17
17
|
|
|
18
18
|
.tab-bar__tab {
|
|
19
19
|
position: relative;
|
|
20
|
-
display:
|
|
20
|
+
display: flex;
|
|
21
21
|
min-width: 0;
|
|
22
22
|
margin: 0;
|
|
23
23
|
padding: var(--s-space-4) var(--s-space-8);
|
|
24
|
+
align-items: center;
|
|
24
25
|
border: none;
|
|
25
26
|
color: var(--s-interactive-neutral-default);
|
|
26
27
|
background-color: transparent;
|
|
@@ -60,8 +61,12 @@
|
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
.tab-bar__tab-icon {
|
|
65
|
+
display: inline-flex;
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
.tab-bar__tab-label {
|
|
64
|
-
display:
|
|
69
|
+
display: inline-flex;
|
|
65
70
|
overflow: hidden;
|
|
66
71
|
width: 100%;
|
|
67
72
|
padding: var(--s-space-8) var(--s-space-8);
|
|
@@ -27,7 +27,7 @@ export class SwirlTabBar {
|
|
|
27
27
|
? "true"
|
|
28
28
|
: "false", class: className, id: `tab-${tab.id}`, key: tab.id,
|
|
29
29
|
// eslint-disable-next-line react/jsx-no-bind
|
|
30
|
-
onClick: () => this.activateTab.emit(tab.id), role: this.disableTabSemantics ? undefined : "tab", tabIndex: this.disableTabSemantics ? undefined : tab.active ? 0 : -1, type: "button" }, h("span", { class: "tab-bar__tab-label" }, tab.label)));
|
|
30
|
+
onClick: () => this.activateTab.emit(tab.id), role: this.disableTabSemantics ? undefined : "tab", tabIndex: this.disableTabSemantics ? undefined : tab.active ? 0 : -1, type: "button" }, tab.icon && (h("span", { class: "tab-bar__tab-icon", innerHTML: tab.icon })), h("span", { class: "tab-bar__tab-label" }, tab.label)));
|
|
31
31
|
}))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "swirl-tab-bar"; }
|
|
@@ -24,11 +24,13 @@ SwirlTabBar.args = {
|
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
active: true,
|
|
27
|
+
icon: '<swirl-icon glyph="emoji-mood" size="20"></swirl-icon>',
|
|
27
28
|
id: "tab2",
|
|
28
29
|
label: "Tab #2",
|
|
29
30
|
},
|
|
30
31
|
{
|
|
31
32
|
active: false,
|
|
33
|
+
icon: '<swirl-icon glyph="emoji-satisfied" size="20"></swirl-icon>',
|
|
32
34
|
id: "tab3",
|
|
33
35
|
label: "Tab #3",
|
|
34
36
|
},
|
|
@@ -13,8 +13,8 @@ export default {
|
|
|
13
13
|
const Template = (args) => {
|
|
14
14
|
const element = generateStoryElement("swirl-tabs", args);
|
|
15
15
|
element.innerHTML = `
|
|
16
|
-
<swirl-tab label="Tab #1" tab-id="tab-1"><swirl-text>Tab 1</swirl-text></swirl-tab>
|
|
17
|
-
<swirl-tab label="Tab #2" tab-id="tab-2"><swirl-text>Tab 2</swirl-text></swirl-tab>
|
|
16
|
+
<swirl-tab icon="<swirl-icon-emoji-satisfied></swirl-icon-emoji-satisfied>" label="Tab #1" tab-id="tab-1"><swirl-text>Tab 1</swirl-text></swirl-tab>
|
|
17
|
+
<swirl-tab icon="<swirl-icon-emoji-mood></swirl-icon-emoji-mood>" label="Tab #2" tab-id="tab-2"><swirl-text>Tab 2</swirl-text></swirl-tab>
|
|
18
18
|
<swirl-tab label="Tab Number 3" tab-id="tab-3"><swirl-text>Tab 3</swirl-text></swirl-tab>
|
|
19
19
|
`;
|
|
20
20
|
return element;
|
|
@@ -127,6 +127,14 @@
|
|
|
127
127
|
-moz-appearance: textfield;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
+
.text-input__input::-moz-placeholder {
|
|
131
|
+
font-size: var(--swirl-text-input-placeholder-size);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.text-input__input::placeholder {
|
|
135
|
+
font-size: var(--swirl-text-input-placeholder-size);
|
|
136
|
+
}
|
|
137
|
+
|
|
130
138
|
@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px) {
|
|
131
139
|
|
|
132
140
|
.text-input__input {
|
|
@@ -14,6 +14,7 @@ const Template = (args) => {
|
|
|
14
14
|
const formControl = document.createElement("swirl-form-control");
|
|
15
15
|
const element = generateStoryElement("swirl-text-input", args);
|
|
16
16
|
formControl.setAttribute("label", "Input");
|
|
17
|
+
formControl.setAttribute("disabled", args.disabled ? "true" : "false");
|
|
17
18
|
formControl.append("\n ", element, "\n");
|
|
18
19
|
return formControl;
|
|
19
20
|
};
|