@salla.sa/twilight-components 1.4.0 → 1.4.1
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/salla-button_23.cjs.entry.js +2 -2
- package/dist/collection/components/salla-scopes/salla-scopes.css +0 -14
- package/dist/collection/components/salla-scopes/salla-scopes.js +1 -1
- package/dist/collection/plugins/tailwind-theme/generator.js +1 -0
- package/dist/collection/plugins/tailwind-theme/index.js +27 -11
- package/dist/components/salla-scopes.js +2 -2
- package/dist/esm/salla-button_23.entry.js +2 -2
- package/dist/twilight-components/p-f14b508a.entry.js +4 -0
- package/dist/twilight-components/twilight-components.esm.js +1 -1
- package/example/assets/tailwind.css +18 -1
- package/package.json +1 -1
- package/dist/twilight-components/p-d65e71f2.entry.js +0 -4
|
@@ -1527,7 +1527,7 @@ var ModeType;
|
|
|
1527
1527
|
ModeType["AVAILABILITY"] = "availability";
|
|
1528
1528
|
})(ModeType || (ModeType = {}));
|
|
1529
1529
|
|
|
1530
|
-
const sallaScopesCss = ".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-
|
|
1530
|
+
const sallaScopesCss = ".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";
|
|
1531
1531
|
|
|
1532
1532
|
const SallaScopees = class {
|
|
1533
1533
|
constructor(hostRef) {
|
|
@@ -1622,7 +1622,7 @@ const SallaScopees = class {
|
|
|
1622
1622
|
return index$1.h("salla-placeholder", { alignment: "center", class: "s-scopes-placeholder" }, index$1.h("span", { slot: "title" }, this.branchNotFound), index$1.h("span", { slot: "description" }, this.ourServiceIsNotFound));
|
|
1623
1623
|
}
|
|
1624
1624
|
defaultContent() {
|
|
1625
|
-
return [index$1.h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => index$1.h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, index$1.h("input", { id: `${this.position} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), index$1.h("label", { htmlFor: this.position + '_scope_' + scope.id, class: "s-scopes-label s-scopes-clickable" }, index$1.h("span", null, scope.name))))), this.footerContent()];
|
|
1625
|
+
return [index$1.h("div", { class: "s-scopes-container s-scrollbar" }, this.scopes.map((scope) => index$1.h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, index$1.h("input", { id: `${this.position} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), index$1.h("label", { htmlFor: this.position + '_scope_' + scope.id, class: "s-scopes-label s-scopes-clickable" }, index$1.h("span", null, scope.name))))), this.footerContent()];
|
|
1626
1626
|
}
|
|
1627
1627
|
availabilityContent() {
|
|
1628
1628
|
return index$1.h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => index$1.h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, index$1.h("h2", { class: { "s-scopes-label": true, "s-scopes-clickable": this.isDefault } }, index$1.h("span", null, scope.name)), index$1.h("h2", { style: { 'color': scope.availability.color }, class: `s-scopes-${scope.availability.key}` }, scope.availability.label))));
|
|
@@ -8,20 +8,6 @@
|
|
|
8
8
|
align-items: center;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
.s-scopes-container::-webkit-scrollbar {
|
|
12
|
-
width: 5px;
|
|
13
|
-
}
|
|
14
|
-
.s-scopes-container::-webkit-scrollbar-track {
|
|
15
|
-
background-color: #eee;
|
|
16
|
-
}
|
|
17
|
-
.s-scopes-container::-webkit-scrollbar-thumb {
|
|
18
|
-
background-color: var(--color-primary);
|
|
19
|
-
border-radius: 10px;
|
|
20
|
-
-webkit-border-radius: 10px;
|
|
21
|
-
-moz-border-radius: 10px;
|
|
22
|
-
-ms-border-radius: 10px;
|
|
23
|
-
-o-border-radius: 10px;
|
|
24
|
-
}
|
|
25
11
|
.s-scopes-placeholder {
|
|
26
12
|
flex: 0 0 85%;
|
|
27
13
|
}
|
|
@@ -99,7 +99,7 @@ export class SallaScopees {
|
|
|
99
99
|
h("span", { slot: "description" }, this.ourServiceIsNotFound));
|
|
100
100
|
}
|
|
101
101
|
defaultContent() {
|
|
102
|
-
return [h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position },
|
|
102
|
+
return [h("div", { class: "s-scopes-container s-scrollbar" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position },
|
|
103
103
|
h("input", { id: `${this.position} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }),
|
|
104
104
|
h("label", { htmlFor: this.position + '_scope_' + scope.id, class: "s-scopes-label s-scopes-clickable" },
|
|
105
105
|
h("span", null, scope.name))))), this.footerContent()];
|
|
@@ -11,6 +11,7 @@ var utilities = {
|
|
|
11
11
|
'.s-input' : {'@apply appearance-none form-input': {}},
|
|
12
12
|
'.s-hidden' : {'@apply hidden': {}},
|
|
13
13
|
'.s-block' : {'@apply block': {}},
|
|
14
|
+
'.s-scrollbar' : {'@apply styled-scrollbar': {}},
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
fs.readdirSync(componentsPath, {withFileTypes: true})
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
const plugin = require('tailwindcss/plugin')
|
|
2
2
|
|
|
3
|
-
module.exports = plugin(function ({addUtilities, addVariant, matchUtilities, theme}) {
|
|
3
|
+
module.exports = plugin(function ({ addUtilities, addVariant, matchUtilities, theme }) {
|
|
4
4
|
addVariant('border', ['&:focus'])
|
|
5
5
|
|
|
6
6
|
addUtilities({
|
|
7
|
-
'.s-hidden': {'@apply hidden': {}},
|
|
8
|
-
'.s-has-error': {'@apply border-red-400 focus:border-red-500': {}},
|
|
9
|
-
'.rounded-icon': {'@apply w-16 h-16 flex justify-center items-center rounded-full text-3xl': {}},
|
|
10
|
-
'.form-input': {'@apply w-full h-10 transition-colors duration-300 focus:ring-transparent focus:border-primary dark:focus:border-primary sm:text-sm border-gray-200 dark:bg-gray-600 dark:border-gray-600 rounded-md': {}},
|
|
11
|
-
'.btn': {'@apply transition duration-300 flex-1 inline-flex justify-center items-center px-6 pb-2.5 pt-2 text-sm font-bold rounded-md hover:opacity-80 whitespace-nowrap': {}},
|
|
12
|
-
'.btn-primary': {'@apply text-primary-reverse border border-primary bg-primary': {}},
|
|
13
|
-
'.btn-danger': {'@apply bg-red-400 text-white hover:opacity-80': {}},
|
|
14
|
-
'.btn-outline': {'@apply text-gray-400 bg-white shadow-sm hover:text-gray-600 border border-gray-200': {}},
|
|
15
|
-
'.btn-outline-primary': {'@apply border border-primary text-primary hover:bg-primary hover:text-primary-reverse': {}},
|
|
7
|
+
'.s-hidden': { '@apply hidden': {} },
|
|
8
|
+
'.s-has-error': { '@apply border-red-400 focus:border-red-500': {} },
|
|
9
|
+
'.rounded-icon': { '@apply w-16 h-16 flex justify-center items-center rounded-full text-3xl': {} },
|
|
10
|
+
'.form-input': { '@apply w-full h-10 transition-colors duration-300 focus:ring-transparent focus:border-primary dark:focus:border-primary sm:text-sm border-gray-200 dark:bg-gray-600 dark:border-gray-600 rounded-md': {} },
|
|
11
|
+
'.btn': { '@apply transition duration-300 flex-1 inline-flex justify-center items-center px-6 pb-2.5 pt-2 text-sm font-bold rounded-md hover:opacity-80 whitespace-nowrap': {} },
|
|
12
|
+
'.btn-primary': { '@apply text-primary-reverse border border-primary bg-primary': {} },
|
|
13
|
+
'.btn-danger': { '@apply bg-red-400 text-white hover:opacity-80': {} },
|
|
14
|
+
'.btn-outline': { '@apply text-gray-400 bg-white shadow-sm hover:text-gray-600 border border-gray-200': {} },
|
|
15
|
+
'.btn-outline-primary': { '@apply border border-primary text-primary hover:bg-primary hover:text-primary-reverse': {} },
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
// todo :: move it to global
|
|
@@ -23,6 +23,22 @@ module.exports = plugin(function ({addUtilities, addVariant, matchUtilities, the
|
|
|
23
23
|
'border-right-color': '#9f7171 !important',
|
|
24
24
|
'background-color': '#f98181'
|
|
25
25
|
}
|
|
26
|
+
},
|
|
27
|
+
'.styled-scrollbar': {
|
|
28
|
+
'&::-webkit-scrollbar': {
|
|
29
|
+
'width': '5px'
|
|
30
|
+
},
|
|
31
|
+
'&::-webkit-scrollbar-track': {
|
|
32
|
+
'background-color': '#eee'
|
|
33
|
+
},
|
|
34
|
+
'&::-webkit-scrollbar-thumb': {
|
|
35
|
+
'background-color': 'var(--color-primary)',
|
|
36
|
+
'border-radius': '10px',
|
|
37
|
+
'-webkit-border-radius': '10px',
|
|
38
|
+
'-moz-border-radius': '10px',
|
|
39
|
+
'-ms-border-radius': '10px',
|
|
40
|
+
'-o-border-radius': '10px'
|
|
41
|
+
}
|
|
26
42
|
}
|
|
27
43
|
});
|
|
28
44
|
|
|
@@ -55,7 +71,7 @@ module.exports = plugin(function ({addUtilities, addVariant, matchUtilities, the
|
|
|
55
71
|
'elastic': 'cubic-bezier(0.55, 0, 0.1, 1)',
|
|
56
72
|
},
|
|
57
73
|
screens: {
|
|
58
|
-
'xxs': {'min': '380px', 'max': '479px'},
|
|
74
|
+
'xxs': { 'min': '380px', 'max': '479px' },
|
|
59
75
|
'xs': '480px',
|
|
60
76
|
},
|
|
61
77
|
}
|
|
@@ -28,7 +28,7 @@ var ModeType;
|
|
|
28
28
|
ModeType["AVAILABILITY"] = "availability";
|
|
29
29
|
})(ModeType || (ModeType = {}));
|
|
30
30
|
|
|
31
|
-
const sallaScopesCss = ".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-
|
|
31
|
+
const sallaScopesCss = ".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";
|
|
32
32
|
|
|
33
33
|
const SallaScopees = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
34
34
|
constructor() {
|
|
@@ -124,7 +124,7 @@ const SallaScopees = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
124
124
|
return h("salla-placeholder", { alignment: "center", class: "s-scopes-placeholder" }, h("span", { slot: "title" }, this.branchNotFound), h("span", { slot: "description" }, this.ourServiceIsNotFound));
|
|
125
125
|
}
|
|
126
126
|
defaultContent() {
|
|
127
|
-
return [h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, h("input", { id: `${this.position} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), h("label", { htmlFor: this.position + '_scope_' + scope.id, class: "s-scopes-label s-scopes-clickable" }, h("span", null, scope.name))))), this.footerContent()];
|
|
127
|
+
return [h("div", { class: "s-scopes-container s-scrollbar" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, h("input", { id: `${this.position} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), h("label", { htmlFor: this.position + '_scope_' + scope.id, class: "s-scopes-label s-scopes-clickable" }, h("span", null, scope.name))))), this.footerContent()];
|
|
128
128
|
}
|
|
129
129
|
availabilityContent() {
|
|
130
130
|
return h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, h("h2", { class: { "s-scopes-label": true, "s-scopes-clickable": this.isDefault } }, h("span", null, scope.name)), h("h2", { style: { 'color': scope.availability.color }, class: `s-scopes-${scope.availability.key}` }, scope.availability.label))));
|
|
@@ -1523,7 +1523,7 @@ var ModeType;
|
|
|
1523
1523
|
ModeType["AVAILABILITY"] = "availability";
|
|
1524
1524
|
})(ModeType || (ModeType = {}));
|
|
1525
1525
|
|
|
1526
|
-
const sallaScopesCss = ".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-
|
|
1526
|
+
const sallaScopesCss = ".s-scopes-availability-content{display:flex;justify-content:center;align-items:center}.s-scopes-placeholder{flex:0 0 85%}";
|
|
1527
1527
|
|
|
1528
1528
|
const SallaScopees = class {
|
|
1529
1529
|
constructor(hostRef) {
|
|
@@ -1618,7 +1618,7 @@ const SallaScopees = class {
|
|
|
1618
1618
|
return h("salla-placeholder", { alignment: "center", class: "s-scopes-placeholder" }, h("span", { slot: "title" }, this.branchNotFound), h("span", { slot: "description" }, this.ourServiceIsNotFound));
|
|
1619
1619
|
}
|
|
1620
1620
|
defaultContent() {
|
|
1621
|
-
return [h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, h("input", { id: `${this.position} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), h("label", { htmlFor: this.position + '_scope_' + scope.id, class: "s-scopes-label s-scopes-clickable" }, h("span", null, scope.name))))), this.footerContent()];
|
|
1621
|
+
return [h("div", { class: "s-scopes-container s-scrollbar" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, h("input", { id: `${this.position} + '_scope_' + ${scope.id}`, name: "lang", type: "radio", value: scope.id, onChange: (event) => this.handleScopeSelection(event), class: "s-scopes-input", checked: !!this.current_scope && this.current_scope.id == scope.id }), h("label", { htmlFor: this.position + '_scope_' + scope.id, class: "s-scopes-label s-scopes-clickable" }, h("span", null, scope.name))))), this.footerContent()];
|
|
1622
1622
|
}
|
|
1623
1623
|
availabilityContent() {
|
|
1624
1624
|
return h("div", { class: "s-scopes-container" }, this.scopes.map((scope) => h("div", { class: "s-scopes-input-wrap", "data-position": this.position }, h("h2", { class: { "s-scopes-label": true, "s-scopes-clickable": this.isDefault } }, h("span", null, scope.name)), h("h2", { style: { 'color': scope.availability.color }, class: `s-scopes-${scope.availability.key}` }, scope.availability.label))));
|