@mgdis/mg-components 5.3.0 → 5.5.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/dist/cjs/{index-94497267.js → index-c3450336.js} +0 -0
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{mg-badge_29.cjs.entry.js → mg-badge_30.cjs.entry.js} +517 -715
- package/dist/cjs/mg-components.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +3 -2
- package/dist/collection/components/atoms/mg-badge/doc/mg-badge.stories.js +0 -7
- package/dist/collection/components/atoms/mg-badge/mg-badge.css +6 -0
- package/dist/collection/components/atoms/mg-badge/mg-badge.js +5 -8
- package/dist/collection/components/atoms/mg-button/doc/mg-button.stories.js +0 -7
- package/dist/collection/components/atoms/mg-button/mg-button.conf.js +1 -1
- package/dist/collection/components/atoms/mg-button/mg-button.css +19 -1
- package/dist/collection/components/atoms/mg-button/mg-button.js +13 -30
- package/dist/collection/components/atoms/mg-card/mg-card.css +6 -1
- package/dist/collection/components/atoms/mg-character-left/mg-character-left.js +2 -3
- package/dist/collection/components/atoms/mg-divider/mg-divider.js +0 -6
- package/dist/collection/components/atoms/mg-icon/mg-icon.conf.js +20 -4
- package/dist/collection/components/atoms/mg-icon/mg-icon.css +27 -0
- package/dist/collection/components/atoms/mg-icon/mg-icon.js +7 -12
- package/dist/collection/components/atoms/mg-input-title/mg-input-title.js +4 -8
- package/dist/collection/components/atoms/mg-tag/doc/mg-tag.stories.js +1 -9
- package/dist/collection/components/atoms/mg-tag/mg-tag.css +58 -0
- package/dist/collection/components/atoms/mg-tag/mg-tag.js +60 -15
- package/dist/collection/components/atoms/mg-tooltip/mg-tooltip.js +97 -68
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.css +7 -0
- package/dist/collection/components/molecules/inputs/mg-input-checkbox/mg-input-checkbox.js +17 -33
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.css +7 -0
- package/dist/collection/components/molecules/inputs/mg-input-date/mg-input-date.js +17 -25
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.css +6 -0
- package/dist/collection/components/molecules/inputs/mg-input-numeric/mg-input-numeric.js +24 -47
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.css +7 -0
- package/dist/collection/components/molecules/inputs/mg-input-password/mg-input-password.js +17 -29
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.css +7 -0
- package/dist/collection/components/molecules/inputs/mg-input-radio/mg-input-radio.js +18 -33
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.css +6 -0
- package/dist/collection/components/molecules/inputs/mg-input-select/mg-input-select.js +23 -33
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.css +6 -0
- package/dist/collection/components/molecules/inputs/mg-input-text/mg-input-text.js +23 -41
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.css +6 -0
- package/dist/collection/components/molecules/inputs/mg-input-textarea/mg-input-textarea.js +23 -45
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.css +6 -0
- package/dist/collection/components/molecules/inputs/mg-input-toggle/mg-input-toggle.js +16 -33
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.css +1 -1
- package/dist/collection/components/molecules/menu/mg-menu/mg-menu.js +8 -23
- package/dist/collection/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.js +8 -1
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.css +55 -24
- package/dist/collection/components/molecules/menu/mg-menu-item/mg-menu-item.js +18 -33
- package/dist/collection/components/molecules/mg-details/mg-details.css +6 -0
- package/dist/collection/components/molecules/mg-details/mg-details.js +4 -8
- package/dist/collection/components/molecules/mg-form/mg-form.js +9 -23
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.css +2 -2
- package/dist/collection/components/molecules/mg-illustrated-message/mg-illustrated-message.js +0 -6
- package/dist/collection/components/molecules/mg-message/mg-message.css +13 -19
- package/dist/collection/components/molecules/mg-message/mg-message.js +8 -27
- package/dist/collection/components/molecules/mg-modal/mg-modal.css +12 -7
- package/dist/collection/components/molecules/mg-modal/mg-modal.js +8 -26
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.css +6 -0
- package/dist/collection/components/molecules/mg-pagination/mg-pagination.js +4 -13
- package/dist/collection/components/molecules/mg-panel/mg-panel.css +10 -5
- package/dist/collection/components/molecules/mg-panel/mg-panel.js +11 -22
- package/dist/collection/components/molecules/mg-popover/mg-popover.css +13 -9
- package/dist/collection/components/molecules/mg-popover/mg-popover.js +7 -23
- package/dist/collection/components/molecules/mg-skip-links/doc/mg-skip-links.stories.js +24 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.conf.js +1 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.css +28 -0
- package/dist/collection/components/molecules/mg-skip-links/mg-skip-links.js +77 -0
- package/dist/collection/components/molecules/mg-tabs/mg-tabs.js +10 -23
- package/dist/collection/locales/en/messages.json +3 -0
- package/dist/collection/locales/fr/messages.json +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +8 -0
- package/dist/components/mg-badge2.js +6 -9
- package/dist/components/mg-button2.js +14 -31
- package/dist/components/mg-card.js +1 -37
- package/dist/components/mg-card2.js +39 -0
- package/dist/components/mg-character-left2.js +2 -3
- package/dist/components/mg-details.js +5 -9
- package/dist/components/mg-divider.js +0 -6
- package/dist/components/mg-form.js +9 -23
- package/dist/components/mg-icon2.js +28 -17
- package/dist/components/mg-illustrated-message.js +1 -7
- package/dist/components/mg-input-checkbox.js +18 -34
- package/dist/components/mg-input-date.js +18 -26
- package/dist/components/mg-input-numeric.js +25 -48
- package/dist/components/mg-input-password.js +18 -30
- package/dist/components/mg-input-radio.js +19 -34
- package/dist/components/mg-input-select2.js +25 -35
- package/dist/components/mg-input-text2.js +24 -42
- package/dist/components/mg-input-textarea.js +24 -46
- package/dist/components/mg-input-title2.js +4 -8
- package/dist/components/mg-input-toggle.js +17 -34
- package/dist/components/mg-menu-item.js +18 -33
- package/dist/components/mg-menu.js +9 -24
- package/dist/components/mg-message.js +17 -30
- package/dist/components/mg-modal.js +18 -30
- package/dist/components/mg-pagination.js +5 -14
- package/dist/components/mg-panel.js +20 -25
- package/dist/components/mg-popover.js +16 -26
- package/dist/components/mg-skip-links.d.ts +11 -0
- package/dist/components/mg-skip-links.js +66 -0
- package/dist/components/mg-tabs.js +10 -23
- package/dist/components/mg-tag.js +34 -12
- package/dist/components/mg-tooltip2.js +97 -68
- package/dist/esm/{index-aad0184c.js → index-78edde1d.js} +0 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{mg-badge_29.entry.js → mg-badge_30.entry.js} +517 -716
- package/dist/esm/mg-components.js +3 -3
- package/dist/esm/polyfills/core-js.js +0 -0
- package/dist/esm/polyfills/dom.js +0 -0
- package/dist/esm/polyfills/es5-html-element.js +0 -0
- package/dist/esm/polyfills/index.js +0 -0
- package/dist/esm/polyfills/system.js +0 -0
- package/dist/mg-components/locales/en/messages.json +3 -0
- package/dist/mg-components/locales/fr/messages.json +3 -0
- package/dist/mg-components/mg-components.css +1 -1
- package/dist/mg-components/mg-components.esm.js +1 -1
- package/dist/mg-components/{p-3899d5d2.js → p-125c54ca.js} +0 -0
- package/dist/mg-components/p-4961c96c.entry.js +1 -0
- package/dist/types/components/atoms/mg-badge/doc/mg-badge.stories.d.ts +0 -11
- package/dist/types/components/atoms/mg-badge/mg-badge.d.ts +1 -1
- package/dist/types/components/atoms/mg-button/doc/mg-button.stories.d.ts +0 -11
- package/dist/types/components/atoms/mg-button/mg-button.conf.d.ts +2 -2
- package/dist/types/components/atoms/mg-button/mg-button.d.ts +6 -6
- package/dist/types/components/atoms/mg-tag/doc/mg-tag.stories.d.ts +0 -13
- package/dist/types/components/atoms/mg-tag/mg-tag.conf.d.ts +5 -1
- package/dist/types/components/atoms/mg-tag/mg-tag.d.ts +27 -6
- package/dist/types/components/atoms/mg-tooltip/mg-tooltip.d.ts +15 -0
- package/dist/types/components/molecules/menu/mg-menu/mg-menu.d.ts +0 -5
- package/dist/types/components/molecules/menu/mg-menu-item/doc/mg-menu-item.stories.d.ts +1 -0
- package/dist/types/components/molecules/menu/mg-menu-item/mg-menu-item.d.ts +0 -4
- package/dist/types/components/molecules/mg-form/mg-form.d.ts +1 -1
- package/dist/types/components/molecules/mg-message/mg-message.d.ts +1 -1
- package/dist/types/components/molecules/mg-modal/mg-modal.d.ts +1 -1
- package/dist/types/components/molecules/mg-skip-links/doc/mg-skip-links.stories.d.ts +11 -0
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.conf.d.ts +7 -0
- package/dist/types/components/molecules/mg-skip-links/mg-skip-links.d.ts +34 -0
- package/dist/types/components/molecules/mg-tabs/mg-tabs.d.ts +2 -2
- package/dist/types/components.d.ts +37 -6
- package/dist/types/locales/index.d.ts +6 -0
- package/dist/types/stencil-public-runtime.d.ts +5 -0
- package/dist/types/utils/unit.test.utils.d.ts +42 -0
- package/package.json +36 -31
- package/readme.md +3 -1
- package/dist/mg-components/p-204af46f.entry.js +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-
|
|
3
|
+
const index = require('./index-c3450336.js');
|
|
4
4
|
|
|
5
5
|
/*
|
|
6
|
-
Stencil Client Patch Browser v2.
|
|
6
|
+
Stencil Client Patch Browser v2.20.0 | MIT Licensed | https://stenciljs.com
|
|
7
7
|
*/
|
|
8
8
|
const patchBrowser = () => {
|
|
9
9
|
const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('mg-components.cjs.js', document.baseURI).href));
|
|
@@ -15,5 +15,5 @@ const patchBrowser = () => {
|
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
patchBrowser().then(options => {
|
|
18
|
-
return index.bootstrapLazy([["mg-
|
|
18
|
+
return index.bootstrapLazy([["mg-badge_30.cjs",[[1,"mg-panel",{"identifier":[1],"panelTitle":[1025,"panel-title"],"titlePattern":[1025,"title-pattern"],"titlePatternErrorMessage":[1025,"title-pattern-error-message"],"expanded":[1028],"expandToggleDisabled":[1028,"expand-toggle-disabled"],"titleEditable":[4,"title-editable"],"classList":[32],"isEditing":[32],"updatedPanelTitle":[32]}],[1,"mg-pagination",{"identifier":[1],"label":[1025],"totalPages":[2,"total-pages"],"currentPage":[1538,"current-page"]}],[1,"mg-input-textarea",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"rows":[2],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"resizable":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-checkbox",{"value":[1040],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"checkboxItems":[32],"displayError":[64]}],[1,"mg-input-date",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"min":[1],"max":[1],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-numeric",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"type":[1],"currency":[1],"max":[2],"min":[2],"integerLength":[2,"integer-length"],"decimalLength":[2,"decimal-length"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"hasFocus":[32],"displayError":[64]}],[1,"mg-input-password",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"displayError":[64]}],[1,"mg-input-radio",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"inputVerticalList":[4,"input-vertical-list"],"required":[4],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"displayError":[64]}],[1,"mg-input-toggle",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"isOnOff":[4,"is-on-off"],"isIcon":[4,"is-icon"],"readonly":[4],"disabled":[4],"tooltip":[1],"helpText":[1,"help-text"],"classList":[32],"options":[32],"checked":[32]}],[1,"mg-message",{"identifier":[1],"delay":[2],"variant":[1],"closeButton":[1028,"close-button"],"hide":[1028],"classList":[32],"hasActions":[32]}],[1,"mg-modal",{"identifier":[1],"modalTitle":[1,"modal-title"],"closeButton":[1028,"close-button"],"hide":[1028],"hasActions":[32],"hasContent":[32],"classList":[32]},[[8,"keydown","handleKeyDown"]]],[1,"mg-popover",{"identifier":[1],"placement":[1],"closeButton":[4,"close-button"],"display":[1028],"disabled":[1028]}],[1,"mg-tabs",{"identifier":[1],"label":[1],"size":[1],"items":[16],"activeTab":[1538,"active-tab"],"tabs":[32],"classList":[32]}],[1,"mg-details",{"toggleClosed":[1,"toggle-closed"],"toggleOpened":[1,"toggle-opened"],"hideSummary":[4,"hide-summary"],"expanded":[1028]}],[1,"mg-menu-item",{"href":[1],"status":[1537],"size":[1],"expanded":[1028],"navigationButtonClassList":[32],"direction":[32],"isInMainMenu":[32],"hasChildren":[32]}],[1,"mg-divider",{"size":[1]}],[1,"mg-form",{"identifier":[1],"name":[1],"readonly":[4],"disabled":[4],"valid":[1028],"invalid":[1028],"classList":[32],"requiredMessage":[32],"displayError":[64]}],[1,"mg-illustrated-message",{"size":[1],"direction":[1]}],[1,"mg-menu",{"label":[1],"direction":[513],"isChildMenu":[32]}],[1,"mg-skip-links",{"links":[1040]}],[1,"mg-tag",{"variant":[1],"outline":[4],"soft":[4],"classList":[32]}],[1,"mg-input-text",{"value":[1537],"identifier":[1],"name":[1],"label":[1],"type":[1],"icon":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1],"maxlength":[2],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"pattern":[1],"patternErrorMessage":[1,"pattern-error-message"],"tooltip":[1],"displayCharacterLeft":[4,"display-character-left"],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"setFocus":[64],"displayError":[64]}],[1,"mg-input-select",{"value":[1032],"items":[16],"identifier":[1],"name":[1],"label":[1],"labelOnTop":[4,"label-on-top"],"labelHide":[4,"label-hide"],"placeholder":[1025],"placeholderHide":[4,"placeholder-hide"],"placeholderDisabled":[4,"placeholder-disabled"],"required":[4],"readonly":[4],"disabled":[4],"mgWidth":[8,"mg-width"],"tooltip":[1],"helpText":[1,"help-text"],"valid":[1028],"invalid":[1028],"classList":[32],"errorMessage":[32],"options":[32],"valueExist":[32],"readonlyValue":[32],"displayError":[64]}],[1,"mg-badge",{"value":[1032],"label":[1],"variant":[1],"outline":[4],"classList":[32]}],[2,"mg-character-left",{"identifier":[1],"characters":[1],"maxlength":[2]}],[1,"mg-card"],[1,"mg-button",{"variant":[1],"identifier":[1],"label":[1],"type":[1],"fullWidth":[1028,"full-width"],"form":[1025],"disabled":[1028],"isIcon":[4,"is-icon"],"disableOnClick":[4,"disable-on-click"],"loading":[32],"classList":[32]}],[6,"mg-input-title",{"identifier":[1],"required":[4],"isLegend":[4,"is-legend"],"tagName":[32]}],[1,"mg-tooltip",{"identifier":[1],"message":[1],"placement":[1],"display":[1028],"disabled":[1028]}],[1,"mg-icon",{"icon":[1],"size":[1],"variant":[1],"spin":[4],"classList":[32]}]]]], options);
|
|
19
19
|
});
|
|
@@ -28,12 +28,13 @@
|
|
|
28
28
|
"./components/molecules/mg-pagination/mg-pagination.js",
|
|
29
29
|
"./components/molecules/mg-panel/mg-panel.js",
|
|
30
30
|
"./components/molecules/mg-popover/mg-popover.js",
|
|
31
|
+
"./components/molecules/mg-skip-links/mg-skip-links.js",
|
|
31
32
|
"./components/molecules/mg-tabs/mg-tabs.js"
|
|
32
33
|
],
|
|
33
34
|
"compiler": {
|
|
34
35
|
"name": "@stencil/core",
|
|
35
|
-
"version": "2.
|
|
36
|
-
"typescriptVersion": "4.
|
|
36
|
+
"version": "2.20.0",
|
|
37
|
+
"typescriptVersion": "4.8.4"
|
|
37
38
|
},
|
|
38
39
|
"collections": [],
|
|
39
40
|
"bundles": []
|
|
@@ -5,13 +5,6 @@ export default {
|
|
|
5
5
|
component: 'mg-badge',
|
|
6
6
|
title: 'Atoms/mg-badge',
|
|
7
7
|
argTypes: {
|
|
8
|
-
variant: {
|
|
9
|
-
options: variants,
|
|
10
|
-
control: { type: 'select' },
|
|
11
|
-
table: {
|
|
12
|
-
defaultValue: { summary: variants[0] },
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
8
|
value: {
|
|
16
9
|
control: { type: 'text' },
|
|
17
10
|
},
|
|
@@ -8,17 +8,14 @@ export class MgBadge {
|
|
|
8
8
|
************/
|
|
9
9
|
// Classes
|
|
10
10
|
this.classOutline = `mg-badge--outline`;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
this.
|
|
15
|
-
/**
|
|
16
|
-
* Component classes
|
|
17
|
-
*/
|
|
11
|
+
this.value = undefined;
|
|
12
|
+
this.label = undefined;
|
|
13
|
+
this.variant = variants[0];
|
|
14
|
+
this.outline = undefined;
|
|
18
15
|
this.classList = new ClassList(['mg-badge']);
|
|
19
16
|
}
|
|
20
17
|
validateValue(newValue) {
|
|
21
|
-
if (`${newValue}`.match(/^(\d
|
|
18
|
+
if (`${newValue}`.match(/^(\d+\+*|[?*!a-z])$/i) === null) {
|
|
22
19
|
throw new Error('<mg-badge> prop "value" must be interger or ponctuation character.');
|
|
23
20
|
}
|
|
24
21
|
}
|
|
@@ -6,13 +6,6 @@ export default {
|
|
|
6
6
|
component: 'mg-button',
|
|
7
7
|
title: 'Atoms/mg-button',
|
|
8
8
|
argTypes: {
|
|
9
|
-
variant: {
|
|
10
|
-
options: variants,
|
|
11
|
-
control: { type: 'select' },
|
|
12
|
-
table: {
|
|
13
|
-
defaultValue: { summary: variants[0] },
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
9
|
type: {
|
|
17
10
|
options: [undefined, ...buttonTypes],
|
|
18
11
|
control: { type: 'select' },
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* List of all possibles variants
|
|
3
3
|
*/
|
|
4
|
-
export const variants = ['primary', 'secondary', 'danger', 'danger-alt', 'info', 'flat', 'success'];
|
|
4
|
+
export const variants = ['primary', 'secondary', 'danger', 'danger-alt', 'info', 'flat', 'success', 'link'];
|
|
5
5
|
/**
|
|
6
6
|
* List of all possibles button types
|
|
7
7
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
:host(:focus-visible) {
|
|
10
10
|
outline: 0;
|
|
11
11
|
}
|
|
12
|
-
:host(:focus-visible) .mg-button
|
|
12
|
+
:host(:focus-visible) .mg-button {
|
|
13
13
|
outline-color: -webkit-focus-ring-color;
|
|
14
14
|
outline-style: auto;
|
|
15
15
|
outline-width: 0.2rem;
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
display: block;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
:host([disabled]),
|
|
29
|
+
:host([aria-disabled=true]) {
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
.mg-button.mg-button--primary {
|
|
29
34
|
border-color: hsl(var(--mg-button-primary-border-color, var(--mg-button-primary-color-h), var(--mg-button-primary-color-s), calc(var(--mg-button-primary-color-l) - var(--mg-button-border-variation) * 10%)));
|
|
30
35
|
color: hsl(var(--mg-button-primary-font-color));
|
|
@@ -144,6 +149,19 @@
|
|
|
144
149
|
background: none;
|
|
145
150
|
border: none;
|
|
146
151
|
}
|
|
152
|
+
.mg-button.mg-button--link {
|
|
153
|
+
padding: unset;
|
|
154
|
+
min-height: unset;
|
|
155
|
+
background: unset;
|
|
156
|
+
border: unset;
|
|
157
|
+
text-decoration: underline;
|
|
158
|
+
}
|
|
159
|
+
.mg-button.mg-button--link slot {
|
|
160
|
+
font-weight: 600;
|
|
161
|
+
}
|
|
162
|
+
.mg-button.mg-button--link:hover {
|
|
163
|
+
text-decoration: none;
|
|
164
|
+
}
|
|
147
165
|
.mg-button.mg-button--full-width {
|
|
148
166
|
display: flex;
|
|
149
167
|
justify-content: center;
|
|
@@ -10,34 +10,6 @@ export class MgButton {
|
|
|
10
10
|
this.classDisabled = 'mg-button--disabled';
|
|
11
11
|
this.classLoading = 'mg-button--loading';
|
|
12
12
|
this.classFullWidth = 'mg-button--full-width';
|
|
13
|
-
/**
|
|
14
|
-
* Define button variant
|
|
15
|
-
*/
|
|
16
|
-
this.variant = variants[0]; // Primary
|
|
17
|
-
/**
|
|
18
|
-
* Set button to full-width
|
|
19
|
-
*/
|
|
20
|
-
this.fullWidth = false;
|
|
21
|
-
/**
|
|
22
|
-
* Define if button is round.
|
|
23
|
-
* Used for icon button.
|
|
24
|
-
*/
|
|
25
|
-
this.isIcon = false;
|
|
26
|
-
/**
|
|
27
|
-
* Option to set input disable on click, in order to prevent multi-click.
|
|
28
|
-
* Parent component have to remove the attribute 'disabled' when the process ends.
|
|
29
|
-
*/
|
|
30
|
-
this.disableOnClick = false;
|
|
31
|
-
/**
|
|
32
|
-
* Define if button is loading, default to false.
|
|
33
|
-
* Trigger when button is clicked or key-up ['enter', 'space], then value change to true.
|
|
34
|
-
* It's required to reset to false when action/promise in parent is done to stop the loading state
|
|
35
|
-
*/
|
|
36
|
-
this.loading = false;
|
|
37
|
-
/**
|
|
38
|
-
* Component classes
|
|
39
|
-
*/
|
|
40
|
-
this.classList = new ClassList(['mg-button']);
|
|
41
13
|
/**
|
|
42
14
|
* Trigger actions onClick event
|
|
43
15
|
*
|
|
@@ -80,6 +52,17 @@ export class MgButton {
|
|
|
80
52
|
this.element.dispatchEvent(new MouseEvent('click', { bubbles: true }));
|
|
81
53
|
}
|
|
82
54
|
};
|
|
55
|
+
this.variant = variants[0];
|
|
56
|
+
this.identifier = undefined;
|
|
57
|
+
this.label = undefined;
|
|
58
|
+
this.type = undefined;
|
|
59
|
+
this.fullWidth = false;
|
|
60
|
+
this.form = undefined;
|
|
61
|
+
this.disabled = undefined;
|
|
62
|
+
this.isIcon = false;
|
|
63
|
+
this.disableOnClick = false;
|
|
64
|
+
this.loading = false;
|
|
65
|
+
this.classList = new ClassList(['mg-button']);
|
|
83
66
|
}
|
|
84
67
|
validateVariant(newValue, oldValue) {
|
|
85
68
|
if (!variants.includes(newValue)) {
|
|
@@ -152,7 +135,7 @@ export class MgButton {
|
|
|
152
135
|
* @returns {HTMLElement} html element
|
|
153
136
|
*/
|
|
154
137
|
render() {
|
|
155
|
-
return (h(Host, { role: "button", tabIndex:
|
|
138
|
+
return (h(Host, { role: "button", tabIndex: 0, type: this.type, form: this.form, "full-width": this.fullWidth, "aria-label": this.label, "aria-disabled": this.disabled !== undefined && this.disabled.toString(), onClick: this.handleClick, onKeyup: this.handleKeyup, onKeydown: this.handleKeydown }, h("div", { class: this.classList.join(), id: this.identifier }, this.loading && h("mg-icon", { icon: "loader", spin: true }), h("div", { class: "mg-button__content" }, h("slot", null)))));
|
|
156
139
|
}
|
|
157
140
|
static get is() { return "mg-button"; }
|
|
158
141
|
static get encapsulation() { return "shadow"; }
|
|
@@ -173,7 +156,7 @@ export class MgButton {
|
|
|
173
156
|
"mutable": false,
|
|
174
157
|
"complexType": {
|
|
175
158
|
"original": "VariantType",
|
|
176
|
-
"resolved": "\"danger\" | \"danger-alt\" | \"flat\" | \"info\" | \"primary\" | \"secondary\" | \"success\"",
|
|
159
|
+
"resolved": "\"danger\" | \"danger-alt\" | \"flat\" | \"info\" | \"link\" | \"primary\" | \"secondary\" | \"success\"",
|
|
177
160
|
"references": {
|
|
178
161
|
"VariantType": {
|
|
179
162
|
"location": "import",
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
.mg-card {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
2
4
|
padding: var(--mg-card-padding);
|
|
3
|
-
|
|
5
|
+
overflow: var(--mg-card-overflow);
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
z-index: inherit;
|
|
4
8
|
background: var(--mg-card-background);
|
|
5
9
|
border: var(--mg-card-border);
|
|
10
|
+
border-radius: var(--mg-card-border-radius);
|
|
6
11
|
box-shadow: var(--mg-card-box-shadow);
|
|
7
12
|
}
|
|
@@ -2,10 +2,9 @@ import { h } from '@stencil/core';
|
|
|
2
2
|
import { initLocales } from '../../../locales';
|
|
3
3
|
export class MgCharacterLeft {
|
|
4
4
|
constructor() {
|
|
5
|
-
|
|
6
|
-
* Sets the characters to count
|
|
7
|
-
*/
|
|
5
|
+
this.identifier = undefined;
|
|
8
6
|
this.characters = '';
|
|
7
|
+
this.maxlength = undefined;
|
|
9
8
|
}
|
|
10
9
|
validateMaxlength(newValue) {
|
|
11
10
|
if (typeof newValue !== 'number') {
|
|
@@ -9,6 +9,8 @@ export const icons = {
|
|
|
9
9
|
'align-left': () => (h("path", { fill: "currentColor", d: "M2 10.71h7.45c.2 0 .36-.16.36-.36V9.27c0-.2-.16-.36-.36-.37H2c-.2 0-.36.17-.36.37v1.08c0 .2.16.36.36.36Zm0-7.23h7.45c.2 0 .36-.17.36-.37V2c0-.2-.16-.36-.36-.36H2a.36.36 0 0 0-.33.36v1.11c0 .19.14.35.33.37Zm11.88 1.81H2.12c-.25 0-.45.2-.45.45v.9c0 .25.2.45.45.46h11.76c.25 0 .45-.21.45-.46v-.9c0-.25-.2-.45-.45-.45Zm0 7.23H2.12c-.25 0-.45.21-.45.46v.9c0 .25.2.45.45.45h11.76c.25 0 .45-.2.45-.45V13c0-.25-.2-.45-.45-.46v-.02Z" })),
|
|
10
10
|
'align-right': () => (h("path", { fill: "currentColor", d: "M2.12 7.1h11.76c.25 0 .45-.21.45-.46v-.9c0-.25-.2-.45-.45-.45H2.12c-.25 0-.45.2-.45.45v.9c0 .25.2.45.45.46Zm11.76 5.42H2.12c-.25 0-.45.21-.45.46v.9c0 .25.2.45.45.45h11.76c.25 0 .45-.2.45-.45V13a.466.466 0 0 0-.44-.48h-.01ZM14 1.67H6.55a.36.36 0 0 0-.36.33v1.11c0 .2.16.36.36.37H14c.2 0 .36-.17.36-.37V2a.36.36 0 0 0-.36-.33Zm0 7.23H6.55c-.2 0-.36.17-.36.37v1.08c0 .2.16.36.36.36H14c.2 0 .36-.16.36-.36V9.27c0-.2-.16-.36-.36-.37Z" })),
|
|
11
11
|
'api': () => (h("path", { fill: "currentColor", d: "M14.44 11.47h-.02l-.66-.1-.02-.08c-.03-.11-.08-.21-.13-.31l-.04-.07.4-.54v-.02l-.52-.52h-.02l-.54.41-.07-.04c-.1-.05-.2-.09-.31-.13l-.08-.02-.1-.67v-.01h-.73v.02l-.1.66-.08.02c-.11.03-.21.08-.31.13l-.07.04-.55-.41-.52.52v.02l.41.54-.04.07c-.05.1-.09.2-.13.31l-.02.08-.67.1h-.01v.73h.02l.66.1.02.08c.03.1.08.21.13.3l.04.07-.41.55.52.52h.02l.54-.41.07.04c.1.05.2.09.31.13l.08.02.1.67v.01h.73v-.02l.1-.66.08-.02c.11-.03.21-.08.31-.13l.07-.04.55.41.52-.52v-.02l-.4-.54.04-.07c.05-.1.09-.2.13-.31l.02-.08.67-.1h.01v-.73Zm-2.46 1.38c-.56 0-1.01-.45-1.01-1.01s.45-1.01 1.01-1.01 1.01.45 1.01 1.01-.45 1.01-1.01 1.01ZM8.51 5.81c-.11-.09-.27-.14-.5-.14h-.38v1.17h.27c.26 0 .45-.05.58-.15.13-.1.19-.25.19-.44s-.05-.34-.16-.43Zm1.57 5.13-.3-.4c-.1-.1-.09-.27 0-.37l.52-.52c.1-.1.26-.1.37 0l.4.29c.06-.03.13-.06.2-.08l.07-.49c0-.14.12-.25.26-.25h.45a5.44 5.44 0 1 0-10.5-1.99 5.44 5.44 0 0 0 5.44 5.44c.78 0 1.54-.17 2.25-.49v-.6c0-.14.11-.26.26-.26l.49-.07c.02-.07.05-.13.08-.2Zm.18-5.96h.84v3.94h-.84V4.98ZM5.4 8.92l-.29-.94H3.67l-.29.94h-.9l1.39-3.96h1.02l1.4 3.96h-.9Zm3.72-1.74c-.26.23-.64.34-1.13.34h-.36v1.4h-.84V4.98h1.26c.48 0 .84.1 1.09.31.25.21.37.51.37.92 0 .42-.13.75-.4.97ZM4.4 5.57c-.06.23-.23.8-.51 1.71h1.03c-.26-.85-.41-1.33-.45-1.44-.03-.11-.06-.2-.07-.26Z" })),
|
|
12
|
+
'archive': () => (h("path", { fill: "currentColor", d: "M3 6v6.96c0 .57.46 1.04 1.04 1.04H12c.55 0 1-.45 1-1V6H3Zm7 2H6V7h4v1Zm3-3H3c-.55 0-1-.45-1-1V3c0-.55.45-1 1-1h10c.55 0 1 .45 1 1v1c0 .55-.45 1-1 1Z" })),
|
|
13
|
+
'archive-outline': () => (h("path", { fill: "currentColor", d: "M13 2H3c-.55 0-1 .45-1 1v2c0 .55.45 1 1 1v6.96c0 .57.46 1.04 1.04 1.04H12c.55 0 1-.45 1-1V6c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1Zm-1 11H4.04S4 12.98 4 12.96V6h8v7Zm1-8H3V3h10v2Zm-3 3H6V7h4v1Z" })),
|
|
12
14
|
'arrow-down': () => (h("path", { fill: "currentColor", d: "M13,10.1H10.23a.31.31,0,0,1-.32-.28h0V.94A.3.3,0,0,0,9.59.65H6.37A.32.32,0,0,0,6,.94H6V9.81a.29.29,0,0,1-.31.29H3a.3.3,0,0,0-.31.29.27.27,0,0,0,.08.22l5.06,4.58a.36.36,0,0,0,.46,0l5-4.58a.29.29,0,0,0,0-.42C13.22,10.1,13.12,10.1,13,10.1Z" })),
|
|
13
15
|
'arrow-down-right': () => (h("path", { fill: "currentColor", d: "m1.98 3.47 8.75 8.75H6.94c-.58 0-1.05.47-1.05 1.06s.47 1.05 1.05 1.05h6.33c.58 0 1.05-.47 1.05-1.05V6.94a1.05 1.05 0 1 0-2.1 0v3.79L3.47 1.98c-.41-.41-1.08-.41-1.49 0-.41.41-.41 1.08 0 1.49Z" })),
|
|
14
16
|
'arrow-left': () => (h("path", { fill: "currentColor", d: "M5.88,12.93V10.18a.3.3,0,0,1,.28-.32H15a.31.31,0,0,0,.29-.33h0V6.32A.31.31,0,0,0,15,6H6.17a.32.32,0,0,1-.29-.31h0V2.93a.3.3,0,0,0-.28-.32.32.32,0,0,0-.23.09L.79,7.76a.36.36,0,0,0,0,.46l4.58,5a.31.31,0,0,0,.43,0A.4.4,0,0,0,5.88,12.93Z" })),
|
|
@@ -25,7 +27,8 @@ export const icons = {
|
|
|
25
27
|
'arrows-rotate-backward': () => (h("path", { fill: "currentColor", d: "M2.3,7h3.4c0.3,0,0.6-0.3,0.6-0.6c0-0.1-0.1-0.3-0.2-0.4L5.1,4.9c1.7-1.6,4.4-1.5,6,0.2c0,0,0,0,0,0 c0.5,0.5,0.8,1.2,1,1.9h2.1C13.7,3.5,10.4,1.2,7,1.8C5.7,2,4.6,2.6,3.6,3.4L2.7,2.5c-0.2-0.2-0.6-0.2-0.8,0c0,0,0,0,0,0l0,0 C1.8,2.6,1.7,2.8,1.7,2.9v3.4C1.7,6.7,1.9,7,2.3,7z M13.7,9h-3.4C9.9,9,9.7,9.3,9.7,9.6c0,0.2,0.1,0.3,0.2,0.4l1.1,1.1 c-1.7,1.6-4.4,1.5-6-0.2C4.4,10.4,4,9.7,3.8,9H1.7c0.6,3.5,3.9,5.8,7.3,5.2c1.3-0.2,2.4-0.8,3.3-1.7l0.9,0.9c0.2,0.2,0.6,0.2,0.8,0 c0,0,0,0,0,0l0,0c0.1-0.1,0.2-0.3,0.2-0.4V9.6C14.3,9.3,14.1,9,13.7,9z" })),
|
|
26
28
|
'ban': () => (h("path", { fill: "currentColor", d: "M8 .67A7.33 7.33 0 1 0 15.33 8 7.33 7.33 0 0 0 8 .67Zm3.85 3.48a5.46 5.46 0 0 1 .61 7L4.88 3.54a5.46 5.46 0 0 1 6.97.61Zm-7.7 7.7a5.45 5.45 0 0 1-.61-7l7.58 7.58a5.46 5.46 0 0 1-7-.61Z" })),
|
|
27
29
|
'bell': () => (h("path", { fill: "currentColor", d: "M8 15.33a1.7 1.7 0 0 0 1.52-1.83h-3A1.7 1.7 0 0 0 8 15.33ZM13.13 11c-.46-.59-1.32-1.48-1.32-4.42a4.4 4.4 0 0 0-3.05-4.4v-.6A.85.85 0 0 0 8 .67a.85.85 0 0 0-.76.91v.6a4.4 4.4 0 0 0-3 4.44c0 2.94-.86 3.83-1.32 4.42a1 1 0 0 0-.2.63.85.85 0 0 0 .76.91h9.14a.85.85 0 0 0 .76-.91 1.05 1.05 0 0 0-.25-.67Z" })),
|
|
28
|
-
'briefcase': () => (h("path", { fill: "currentColor", d: "
|
|
30
|
+
'briefcase': () => (h("path", { fill: "currentColor", d: "M14 4.5h-3v-1c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v1H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-7c0-.55-.45-1-1-1Zm-8-1h4v1H6v-1Z" })),
|
|
31
|
+
'briefcase-outline': () => (h("path", { fill: "currentColor", d: "M14 4.5h-3v-1c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v1H2c-.55 0-1 .45-1 1v7c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-7c0-.55-.45-1-1-1Zm-8-1h4v1H6v-1Zm8 9H2v-7h12v7Z" })),
|
|
29
32
|
'calculator': () => (h("path", { fill: "currentColor", d: "M12.83.67H3.17a.5.5 0 0 0-.5.5v13.66a.5.5 0 0 0 .5.5h9.66a.5.5 0 0 0 .5-.5V1.17a.5.5 0 0 0-.5-.5ZM5.58 13.39a.29.29 0 0 1-.28.3H4.1a.29.29 0 0 1-.3-.28v-1.2a.29.29 0 0 1 .28-.3h1.2a.29.29 0 0 1 .3.28v1.2Zm0-3.28a.29.29 0 0 1-.3.3H4.1a.29.29 0 0 1-.3-.3V8.93a.29.29 0 0 1 .28-.3h1.2a.29.29 0 0 1 .3.28v1.2Zm3.29 3.28a.29.29 0 0 1-.3.3H7.38a.29.29 0 0 1-.3-.3v-1.18a.29.29 0 0 1 .3-.3h1.19a.29.29 0 0 1 .3.3Zm0-3.28a.32.32 0 0 1-.3.3H7.38a.32.32 0 0 1-.3-.3V8.93a.29.29 0 0 1 .3-.3h1.19a.29.29 0 0 1 .3.3Zm3.33 3.28a.29.29 0 0 1-.28.3h-1.25a.29.29 0 0 1-.3-.28V8.93a.29.29 0 0 1 .28-.3h1.25a.29.29 0 0 1 .3.28v4.48Zm0-7.15a.29.29 0 0 1-.3.3H4.1a.29.29 0 0 1-.3-.3V2.61a.29.29 0 0 1 .28-.3h7.82a.29.29 0 0 1 .3.28v3.65Z" })),
|
|
30
33
|
'calendar': () => (h("path", { fill: "currentColor", d: "M14.52 4.43h-13V2.92a1.28 1.28 0 0 1 1.25-1.28h10.36A1.39 1.39 0 0 1 14.52 3Zm0 .93v7.91a1.41 1.41 0 0 1-1.4 1.4H2.88a1.41 1.41 0 0 1-1.4-1.4V5.36Zm-3.73 3.37a.35.35 0 0 0 .35.35h1.16a.34.34 0 0 0 .35-.35V7.57a.35.35 0 0 0-.35-.35h-1.16a.35.35 0 0 0-.35.35Zm-5.58 2.56a.35.35 0 0 0-.35-.35H3.7a.35.35 0 0 0-.35.35v1.17a.35.35 0 0 0 .35.35h1.16a.35.35 0 0 0 .35-.35Zm0-3.72a.35.35 0 0 0-.35-.35H3.7a.35.35 0 0 0-.35.35v1.16a.34.34 0 0 0 .35.35h1.16a.35.35 0 0 0 .35-.35Zm3.72 3.72a.35.35 0 0 0-.35-.35H7.42a.35.35 0 0 0-.35.35v1.17a.35.35 0 0 0 .35.35h1.16a.35.35 0 0 0 .35-.35Zm0-3.72a.35.35 0 0 0-.35-.35H7.42a.35.35 0 0 0-.35.35v1.16a.35.35 0 0 0 .35.35h1.16a.35.35 0 0 0 .35-.35Z" })),
|
|
31
34
|
'calendar-euro': () => (h("path", { fill: "currentColor", d: "M11.06 3.51h-1.04v.62a.2.2 0 0 1-.2.2H9.4c-.11 0-.21-.09-.21-.2v-.62H4.23v.62c0 .11-.09.2-.21.2h-.41c-.11 0-.21-.09-.21-.2v-.62H2.37c-.57 0-1.03.47-1.03 1.03v7.03c0 .57.47 1.03 1.03 1.03h5.3c-.25-.25-.46-.52-.63-.83H2.68a.53.53 0 0 1-.52-.52V6.61c0-.11.09-.21.21-.21h5.29a4.4 4.4 0 0 1 3.19-1.36c.43 0 .85.06 1.24.18v-.69c0-.57-.46-1.03-1.03-1.03Zm-6.83-.62c0-.11-.09-.21-.21-.21h-.41c-.11 0-.21.09-.21.21v.62h.83v-.62Zm5.79 0c0-.11-.09-.21-.21-.21H9.4c-.11 0-.21.09-.21.21v.62h.83v-.62Zm2.07 3c-.39-.13-.81-.21-1.24-.21-.83 0-1.6.26-2.23.73-.96.69-1.59 1.82-1.59 3.09 0 .86.28 1.65.77 2.29.23.32.52.6.85.83.62.45 1.38.71 2.2.71 2.11 0 3.82-1.72 3.82-3.82 0-1.67-1.08-3.09-2.58-3.61Zm.12 6.18c.01.07-.04.15-.11.16-.09.03-.2.04-.3.05-.14.03-.28.04-.43.04-.61.02-1.18-.18-1.63-.54-.41-.32-.73-.77-.88-1.29h-.37c-.08 0-.15-.06-.15-.15V10c0-.08.07-.14.15-.14h.26v-.5h-.26c-.08 0-.15-.06-.15-.14v-.37c0-.08.07-.14.15-.14h.4a2.576 2.576 0 0 1 2.37-1.7h.1c.22 0 .44.02.64.06.04.01.07.03.08.06.02.03.03.07.02.11l-.02.07-.13.46a.14.14 0 0 1-.17.1c-.15-.03-.3-.04-.45-.05h-.08c-.58.01-1.1.35-1.34.88h1.71c.08.02.12.09.11.17l-.08.36a.15.15 0 0 1-.15.11H9.73c-.01.16-.01.33 0 .5h1.66c.08.02.13.09.11.17l-.07.33c-.02.06-.08.11-.14.11H9.91c.21.56.72.94 1.3 1 .05 0 .1.01.15.01.19 0 .37-.03.55-.06.07-.02.14.03.16.09v.02l.11.52Z" })),
|
|
@@ -41,9 +44,14 @@ export const icons = {
|
|
|
41
44
|
'chevron-up-circle': () => (h("path", { fill: "currentColor", d: "M.67 8C.67 3.95 3.95.67 8 .67S15.33 3.95 15.33 8 12.05 15.33 8 15.33C3.95 15.33.67 12.05.67 8ZM7.5 4.63l-4 4c-.28.27-.28.71-.01.99h.01l.5.53c.28.27.72.27 1 0l3-3 3 3c.28.27.72.27 1 0l.5-.51c.28-.27.28-.71.01-.99h-.01l-4-4.01a.697.697 0 0 0-.99-.01H7.5Z" })),
|
|
42
45
|
'clock': () => (h("path", { fill: "currentColor", d: "M8,.67C3.95,.67,.67,3.95,.67,8s3.28,7.33,7.33,7.33,7.33-3.28,7.33-7.33h0C15.33,3.95,12.05,.67,8,.67h0Zm1.69,10.33l-2.61-1.88c-.09-.07-.14-.17-.14-.28V3.84c0-.19,.16-.35,.35-.36h1.42c.2,0,.35,.16,.36,.36V7.93l1.87,1.37c.16,.1,.2,.32,.09,.47v.02h-.01l-.83,1.15c-.12,.15-.34,.18-.5,.06Z" })),
|
|
43
46
|
'conversation': () => (h("path", { fill: "currentColor", d: "M11.22,6.48c0-2.11-2.36-3.81-5.28-3.81S.67,4.37.67,6.48a3.15,3.15,0,0,0,1,2.19A5.17,5.17,0,0,1,.72,10a.2.2,0,0,0,0,.21.23.23,0,0,0,.19.12,4.79,4.79,0,0,0,2.25-.6,6.84,6.84,0,0,0,2.82.6C8.86,10.29,11.22,8.58,11.22,6.48Zm3.1,5.23a3.08,3.08,0,0,0,1-2.19C15.28,7.93,14,6.57,12,6a3.84,3.84,0,0,1,0,.48C12,9,9.3,11.05,6,11.05a7.16,7.16,0,0,1-.8-.05A5.6,5.6,0,0,0,10,13.33a6.7,6.7,0,0,0,2.82-.59,4.66,4.66,0,0,0,2.25.59.21.21,0,0,0,.19-.11.2.2,0,0,0,0-.21,5.15,5.15,0,0,1-.91-1.3Z" })),
|
|
47
|
+
'conversation-outline': () => [
|
|
48
|
+
h("path", { fill: "currentColor", d: "M15 8.5c0 .79-.39 1.51-1.01 2.09v1.91a.508.508 0 0 1-.68.47l-2.26-1.05c-.34.05-.69.08-1.05.08-.23 0-.47-.01-.69-.04-.18 0-.35-.03-.52-.07-.02 0-.03 0-.05-.01-.16-.02-.31-.06-.46-.1-.42-.1-.82-.25-1.18-.43l-.42-.24c-.06-.04-.12-.08-.18-.13.58-.03 1.13-.12 1.64-.27.56.19 1.19.29 1.86.29.29 0 .6-.02.91-.07l.29-.04.28.12 1.5.7v-1.12l.01-.43.31-.3c.32-.29.7-.77.7-1.36 0-.91-.82-1.72-2.01-2.15-.01-.39-.09-.77-.23-1.13.06.02.12.04.19.06.25.08.5.17.73.27.11.05.23.11.34.17.11.06.21.12.31.18.11.07.2.13.3.2.48.35.86.78 1.1 1.26a2.288 2.288 0 0 1 .17.45c.03.11.06.22.07.33.02.12.03.24.03.36Z" }),
|
|
49
|
+
h("path", { fill: "currentColor", d: "M6 4c2.17 0 4 1.14 4 2.5S8.17 9 6 9c-.29 0-.6-.02-.91-.07l-.3-.04-.27.13-1.51.7V8.17l-.32-.3c-.32-.3-.7-.77-.7-1.36 0-1.36 1.83-2.5 4-2.5m0-1c-2.76 0-5 1.57-5 3.5 0 .79.39 1.51 1.01 2.09v1.91c0 .29.24.5.5.5.06 0 .11 0 .17-.03l2.26-1.05c.34.05.69.08 1.05.08 2.76 0 5-1.57 5-3.5s-2.24-3.5-5-3.5Z" }),
|
|
50
|
+
],
|
|
44
51
|
'cog': () => (h("path", { fill: "currentColor", d: "M14.82 9.76 13.56 9a5.54 5.54 0 0 0 0-2.07l1.26-.72a.36.36 0 0 0 .18-.38A7.5 7.5 0 0 0 13.37 3a.35.35 0 0 0-.44 0l-1.26.72a5.51 5.51 0 0 0-1.79-1V1.21a.34.34 0 0 0-.27-.34 7.29 7.29 0 0 0-3.22 0 .34.34 0 0 0-.28.34v1.45a5.83 5.83 0 0 0-1.79 1L3.06 3a.35.35 0 0 0-.43 0A7.24 7.24 0 0 0 1 5.83a.34.34 0 0 0 .16.41L2.44 7a5.49 5.49 0 0 0 0 2l-1.26.73a.35.35 0 0 0-.16.41A7.24 7.24 0 0 0 2.63 13a.35.35 0 0 0 .43.07l1.26-.73a5.56 5.56 0 0 0 1.79 1v1.45a.35.35 0 0 0 .28.34 7.29 7.29 0 0 0 3.22 0 .35.35 0 0 0 .28-.34v-1.45a6 6 0 0 0 1.79-1l1.26.73a.35.35 0 0 0 .43-.07A7.39 7.39 0 0 0 15 10.17a.37.37 0 0 0-.17-.41Zm-6.82.6A2.36 2.36 0 1 1 10.35 8 2.36 2.36 0 0 1 8 10.36Z" })),
|
|
45
52
|
'comment': () => (h("path", { fill: "currentColor", d: "M8 1.67c-3.37-.12-6.21 2.51-6.33 5.88 0 1.36.5 2.68 1.41 3.69-.26 1-.72 1.94-1.36 2.76-.04.08-.04.17 0 .25.03.08.1.13.18.13 1.3-.03 2.54-.55 3.48-1.45.83.34 1.72.51 2.62.5 3.37.12 6.21-2.51 6.33-5.88-.12-3.37-2.96-6-6.33-5.88Zm2.53 8.43c0 .14-.11.25-.25.25H5.73c-.14 0-.25-.1-.26-.24V9.2c0-.17.13-.3.3-.31h4.5c.14 0 .26.12.26.26v.95Zm.92-3.29c0 .17-.13.3-.3.3h-6.3c-.17 0-.3-.13-.3-.3V6c0-.16.12-.29.28-.3H11.15c.16 0 .29.12.3.28V6.81Z" })),
|
|
46
53
|
'comment-sms': () => (h("path", { fill: "currentColor", d: "M8 2.67c-3.37 0-6.1 2.21-6.1 4.95.02 1.18.51 2.3 1.36 3.11-.26.85-.71 1.62-1.3 2.28a.2.2 0 0 0-.04.21c.03.07.1.11.17.11 1.22-.02 2.4-.45 3.34-1.22.82.31 1.68.46 2.56.46 3.37 0 6.1-2.22 6.1-4.95S11.37 2.67 8 2.67M4.95 8.39a.76.76 0 1 1 .76-.76c0 .42-.34.76-.76.76m3.05 0a.76.76 0 1 1 .76-.76c0 .42-.34.76-.76.76m3.05 0a.76.76 0 1 1-.02-1.52c.42 0 .77.33.77.75v.01c0 .42-.34.76-.76.76" })),
|
|
54
|
+
'copy': () => (h("path", { fill: "currentColor", d: "M13.33 4v10.21a1.13 1.13 0 0 1-1.12 1.12H6a1.12 1.12 0 0 1-1.12-1.12V4A1.12 1.12 0 0 1 6 2.91h6.17A1.13 1.13 0 0 1 13.33 4ZM10.52.67H3.79a1.13 1.13 0 0 0-1.12 1.12V12h1.12V1.79h6.73Z" })),
|
|
47
55
|
'credit-card': () => (h("path", { fill: "currentColor", d: "M14 2.67H2A1.33 1.33 0 0 0 .67 4v8A1.32 1.32 0 0 0 2 13.33h12A1.32 1.32 0 0 0 15.33 12V4A1.32 1.32 0 0 0 14 2.67M14 12H2V8h12Zm0-6.67H2V4h12Z" })),
|
|
48
56
|
'cross': () => (h("path", { fill: "currentColor", d: "M14.26 12.74 9.52 8l4.7-4.7a.29.29 0 0 0 0-.41l-1.1-1.1a.29.29 0 0 0-.41 0L8 6.48 3.26 1.74a.24.24 0 0 0-.34 0L1.74 2.91a.24.24 0 0 0 0 .34L6.48 8l-4.7 4.7a.29.29 0 0 0 0 .41l1.1 1.1a.29.29 0 0 0 .41 0L8 9.52l4.74 4.74a.24.24 0 0 0 .34 0l1.17-1.17a.24.24 0 0 0 0-.34Z" })),
|
|
49
57
|
'cross-circle': () => (h("path", { fill: "currentColor", d: "M8.06.67H8A7.33 7.33 0 0 0 .68 8v.1a7.42 7.42 0 0 0 7.23 7.23A7.33 7.33 0 1 0 8.06.67Zm3.6 9.57a.28.28 0 0 1 0 .4l-.19.2-.61.61-.2.19a.27.27 0 0 1-.39 0L8 9.41l-2.23 2.24a.27.27 0 0 1-.39 0l-.2-.2-.6-.6-.19-.2a.28.28 0 0 1 0-.4L6.6 8 4.36 5.76a.28.28 0 0 1 0-.4l1-1a.28.28 0 0 1 .4 0L8 6.59l2.24-2.24a.28.28 0 0 1 .4 0l.2.2.6.6.2.2a.28.28 0 0 1 0 .4L9.42 8Z" })),
|
|
@@ -84,8 +92,9 @@ export const icons = {
|
|
|
84
92
|
'filter': () => (h("path", { fill: "currentColor", d: "M13.74 1.66H2.26a.6.6 0 0 0-.59.6.59.59 0 0 0 .17.42l4.58 4.58v5.1a.58.58 0 0 0 .25.48l2 1.39a.6.6 0 0 0 .83-.15.59.59 0 0 0 .1-.34V7.26l4.58-4.58a.6.6 0 0 0 0-.84.64.64 0 0 0-.44-.18Z" })),
|
|
85
93
|
'floppy-disk': () => (h("path", { fill: "currentColor", d: "m13.93 4.44-2.37-2.37c-.25-.25-.6-.4-.96-.4H3.03c-.75 0-1.36.61-1.36 1.36v9.94c0 .75.61 1.36 1.36 1.36h9.94c.75 0 1.36-.61 1.36-1.36V5.4c0-.36-.14-.7-.4-.96ZM8 12.52A1.81 1.81 0 1 1 8 8.9a1.81 1.81 0 0 1 0 3.62Zm2.71-5.77c0 .09-.04.18-.1.24a.35.35 0 0 1-.24.1H3.82c-.19 0-.34-.15-.34-.34V3.82c0-.19.15-.34.34-.34h6.55c.19 0 .34.15.34.34v2.93Z" })),
|
|
86
94
|
'folder': () => (h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34Z" })),
|
|
87
|
-
'folder-lines': () =>
|
|
88
|
-
'folder-
|
|
95
|
+
'folder-lines': () => h("path", { fill: "currentColor", d: "M14 4H7L6 3H2c-.55 0-1 .45-1 1v8c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V5c0-.55-.45-1-1-1Zm-5 6H4V9h5v1Zm3-2H4V7h8v1Z" }),
|
|
96
|
+
'folder-lines-outline': () => (h("path", { fill: "currentColor", d: "M12 8H4V7h8v1ZM9 9H4v1h5V9ZM5.59 4H2v8h12V5H6.59l-.29-.29L5.59 4M6 3l1 1h7c.55 0 1 .45 1 1v6.99c0 .55-.45 1-1 1H2c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h4Z" })),
|
|
97
|
+
'folder-link': () => (h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34Zm-6.82 6.88H5.65c-1.34 0-2.42-1.08-2.42-2.42 0-1.34 1.08-2.42 2.42-2.42h.84c.14 0 .25.11.25.25 0 .06-.02.13-.06.17-.2.21-.36.45-.49.71-.04.07-.11.13-.19.14h-.33c-.62-.15-1.24.22-1.39.84-.15.62.22 1.24.84 1.39.15.04.31.04.47.02h1.58c.62 0 1.12-.48 1.15-1.1v-.22c-.02-.08 0-.16.06-.22.12-.13.29-.2.47-.2h.45c.12 0 .23.09.25.21.02.14.02.29 0 .43 0 1.32-1.05 2.39-2.37 2.42Zm3.17 0h-.84c-.06 0-.13-.02-.17-.07-.1-.1-.1-.25 0-.35.2-.21.36-.44.49-.7.02-.09.08-.16.17-.19h.36c.63.04 1.18-.43 1.23-1.07.04-.63-.43-1.18-1.07-1.23H8.83c-.64 0-1.15.51-1.15 1.15v.25c.02.08 0 .16-.06.22-.12.13-.29.21-.47.21H6.7c-.13 0-.24-.09-.26-.22-.01-.14-.01-.27 0-.41a2.41 2.41 0 0 1 2.38-2.43h1.52c1.34 0 2.42 1.07 2.43 2.41v.01c0 1.33-1.09 2.41-2.42 2.42Z" })),
|
|
89
98
|
'folder-outline': () => (h("path", { fill: "currentColor", d: "m6.22 3.67 1.55 1.49.29.28h5.93c.19 0 .34.16.34.34v6.21c0 .18-.15.34-.33.34H2.01c-.18 0-.34-.15-.34-.33V4.01c0-.18.15-.34.33-.34h4.22m.4-1H2C1.27 2.67.68 3.27.67 4v8c0 .73.6 1.32 1.33 1.33h12c.73 0 1.32-.6 1.33-1.33V5.78c0-.73-.6-1.33-1.33-1.34H8.46L6.62 2.67Z" })),
|
|
90
99
|
'folder-star': () => (h("path", { fill: "currentColor", d: "M14 4.44H8.46L6.62 2.67H2A1.35 1.35 0 0 0 .67 4v8A1.35 1.35 0 0 0 2 13.33h12A1.35 1.35 0 0 0 15.33 12V5.78A1.36 1.36 0 0 0 14 4.44Zm-.2 3.89L12 9.66l.69 2a.22.22 0 0 1-.08.27.26.26 0 0 1-.13.06.39.39 0 0 1-.15-.06l-1.77-1.26L8.75 12a.34.34 0 0 1-.15 0 .31.31 0 0 1-.13 0 .23.23 0 0 1-.08-.27l.69-2-1.81-1.35a.23.23 0 0 1-.1-.17.24.24 0 0 1 .24-.24h2.21l.67-2a.26.26 0 0 1 .15-.14.24.24 0 0 1 .31.14l.67 2h2.2a.26.26 0 0 1 .26.24.3.3 0 0 1-.08.12Z" })),
|
|
91
100
|
'graduation-cap': () => (h("path", { fill: "currentColor", d: "M14.93 5.14 8.54 2.76c-.35-.13-.73-.13-1.08 0L1.07 5.14c-.31.13-.48.47-.39.8.04.22.19.39.39.47l1.12.42c-.26.38-.4.84-.41 1.3-.35.28-.47.75-.3 1.16.06.12.14.23.24.31l-.59 3.19c-.06.22.07.45.28.53h1.37c.22-.02.38-.22.36-.44v-.1L2.55 9.6c.32-.31.4-.79.2-1.18a.814.814 0 0 0-.24-.28c0-.38.18-.75.47-1l4.48 1.65c.35.13.73.13 1.08 0l6.39-2.38c.31-.13.48-.47.39-.8a.625.625 0 0 0-.39-.47Zm-6.18 4.5c-.48.18-1.02.18-1.5 0L3.93 8.4l-.33 3.15c0 1 2 1.78 4.4 1.78s4.4-.79 4.4-1.78l-.33-3.15-3.32 1.24Z" })),
|
|
@@ -93,7 +102,9 @@ export const icons = {
|
|
|
93
102
|
h("path", { fill: "currentColor", d: "M8,1.67A6.37,6.37,0,0,0,3.6,3.42l-.91-.91a.6.6,0,0,0-.85,0h0a.58.58,0,0,0-.18.43V6.37A.61.61,0,0,0,2.24,7H5.68a.62.62,0,0,0,.62-.62A.69.69,0,0,0,6.12,6L5.05,4.87a4.29,4.29,0,1,1,.1,6.36.3.3,0,0,0-.41,0l-1,1a.3.3,0,0,0,0,.42h0A6.33,6.33,0,1,0,8,1.67Z" }),
|
|
94
103
|
h("path", { fill: "currentColor", d: "M9.85,9.3l-.36.36a.3.3,0,0,1-.43,0L7.45,8V5.15a.3.3,0,0,1,.3-.3h.5a.3.3,0,0,1,.3.3V7.58l1.3,1.3A.31.31,0,0,1,9.85,9.3Z" }),
|
|
95
104
|
],
|
|
96
|
-
'
|
|
105
|
+
'hand-up': () => (h("path", { fill: "currentColor", d: "M12.75 3.5c-.41 0-.75.34-.75.75v3.5c0 .14-.11.25-.25.25s-.25-.11-.25-.25v-4c0-.41-.34-.75-.75-.75s-.75.34-.75.75v4c0 .14-.11.25-.25.25s-.25-.11-.25-.25v-5c0-.41-.34-.75-.75-.75S8 2.34 8 2.75v5c0 .14-.11.25-.25.25s-.25-.11-.25-.25v-4c0-.41-.34-.75-.75-.75S6 3.34 6 3.75V11L3.97 9.54c-.34-.34-.88-.34-1.21 0s-.34.88 0 1.21l2.22 2.22c.66.66 1.55 1.03 2.47 1.03H11a2.5 2.5 0 0 0 2.5-2.5V4.25c0-.41-.34-.75-.75-.75Z" })),
|
|
106
|
+
'home': () => (h("path", { fill: "currentColor", d: "m13.55 5.5-5-3.33C8.38 2.06 8.19 2 7.99 2s-.39.06-.56.17L2.45 5.5c-.28.19-.45.5-.45.83v6.66c0 .55.45 1 1 1h4V12c0-.56.45-1.01 1-1.01s1 .45 1 1.01v1.99h4c.55 0 1-.45 1-1V6.33c0-.33-.17-.65-.45-.83Z" })),
|
|
107
|
+
'home-outline': () => (h("path", { fill: "currentColor", d: "m13.55 5.5-5-3.33C8.38 2.06 8.19 2 7.99 2s-.39.06-.56.17L2.45 5.5c-.28.19-.45.5-.45.83v6.66c0 .55.45 1 1 1h10c.55 0 1-.45 1-1V6.33c0-.33-.17-.65-.45-.83Zm-.56 7.5h-4v-1c0-.55-.45-1-1-1s-1 .45-1 1v1H3V6.33L8 3l5 3.33V13Z" })),
|
|
97
108
|
'info-circle': () => (h("path", { fill: "currentColor", d: "M8 .67A7.33 7.33 0 1 0 15.33 8 7.33 7.33 0 0 0 8 .67ZM9 12a.29.29 0 0 1-.3.3H7.35a.29.29 0 0 1-.3-.3V7.32A.29.29 0 0 1 7.33 7h1.32a.29.29 0 0 1 .35.3Zm0-6.74a.29.29 0 0 1-.3.3H7.35a.29.29 0 0 1-.3-.3V4a.29.29 0 0 1 .28-.3h1.32a.29.29 0 0 1 .3.28V4Z" })),
|
|
98
109
|
'key': () => (h("path", { fill: "currentColor", d: "M8.44 6.67a3.994 3.994 0 0 0-5.1-2.44A3.986 3.986 0 0 0 .9 9.33 3.994 3.994 0 0 0 6 11.77c1.14-.4 2.04-1.3 2.44-2.44h2.89V12H14V9.33h1.33V6.67H8.44ZM4.67 9.33c-.73 0-1.33-.6-1.33-1.33s.6-1.33 1.33-1.33C5.4 6.67 6 7.27 6 8c0 .73-.58 1.32-1.31 1.33h-.02Z" })),
|
|
99
110
|
'laptop': () => (h("path", { fill: "currentColor", d: "M12.89 12.08c.68-.02 1.23-.58 1.22-1.26v-6.9c0-.68-.54-1.24-1.22-1.25H3.11c-.68.01-1.23.57-1.22 1.25v6.9c-.01.68.53 1.25 1.22 1.26H.67c-.01.68.53 1.24 1.21 1.25h12.23c.68 0 1.23-.56 1.22-1.24h-2.44ZM3.11 3.92h9.78v6.9H3.11v-6.9ZM8 12.71c-.34 0-.62-.29-.61-.63 0-.34.27-.61.61-.61.34 0 .61.27.61.61 0 .34-.27.63-.61.63Z" })),
|
|
@@ -114,6 +125,11 @@ export const icons = {
|
|
|
114
125
|
],
|
|
115
126
|
'magnifying-glass': () => (h("path", { fill: "currentColor", d: "M11.24 9.5c1.48-2.44.71-5.62-1.73-7.1-.05-.03-.11-.07-.17-.1A5.232 5.232 0 0 0 2.52 4C.94 6.38 1.6 9.59 3.98 11.17a5.142 5.142 0 0 0 5.54.1L12.3 14c.39.39 1.02.39 1.41 0l.33-.33a.996.996 0 0 0 0-1.41l-2.8-2.76Zm-4.4.5c-1.76.02-3.2-1.4-3.22-3.16-.02-1.76 1.4-3.2 3.16-3.22 1.76-.02 3.2 1.4 3.22 3.16v.06A3.193 3.193 0 0 1 6.84 10Z" })),
|
|
116
127
|
'mail': () => (h("path", { fill: "currentColor", d: "M13.87 2.67H2.13C1.36 2.64.71 3.23.67 4v8c.03.77.68 1.36 1.45 1.33h11.75c.77.04 1.42-.55 1.46-1.32V4c-.03-.77-.68-1.36-1.45-1.33h-.01Zm0 2.66L8 8.67 2.13 5.33V4L8 7.33 13.87 4v1.33Z" })),
|
|
128
|
+
'notes': () => [
|
|
129
|
+
h("path", { fill: "currentColor", d: "M12.6 2.76v-.43c0-.75-.53-1.28-1.28-1.28H2.33c-.75 0-1.28.53-1.28 1.28v8.99c0 .75.53 1.28 1.28 1.28h.39V4.05c0-.75.53-1.28 1.28-1.28h8.6Z" }),
|
|
130
|
+
h("path", { fill: "currentColor", d: "M13.67 3.4H4.68c-.75 0-1.28.53-1.28 1.28v8.99c0 .75.53 1.28 1.28 1.28h6.42V11.1h3.85V4.68c0-.75-.53-1.28-1.28-1.28Zm-4.49 7.06H5.97V9.18h3.21v1.28Zm3.21-2.57H5.97V6.61h6.42v1.28Z" }),
|
|
131
|
+
h("path", { fill: "currentColor", d: "m11.74 14.42 2.68-2.68h-2.68v2.68z" }),
|
|
132
|
+
],
|
|
117
133
|
'notes-outline': () => (h("path", { fill: "currentColor", d: "M13.11 4.74v5.38h-3v3H4.73V4.74h8.38m0-1.2H4.73a1.2 1.2 0 0 0-1.2 1.2v8.38a1.2 1.2 0 0 0 1.2 1.19h6l3.59-3.59v-6a1.2 1.2 0 0 0-1.21-1.18Zm-4.19 6.58h-3V8.93h3Zm3-2.39h-6v-1.2h6ZM3.8 11.19h-1V2.81h8.38v1h1.2v-1a1.2 1.2 0 0 0-1.2-1.2H2.81a1.2 1.2 0 0 0-1.2 1.2v8.38a1.2 1.2 0 0 0 1.2 1.2h1Z" })),
|
|
118
134
|
'paper-plane': () => (h("path", { fill: "currentColor", d: "M14 1.69 1.84 7a.28.28 0 0 0-.15.36.29.29 0 0 0 .16.15l3.27 1.82a.57.57 0 0 0 .61-.06l6.45-5.57c.05 0 .15-.1.19-.06s0 .14-.06.18l-5.59 6.29a.52.52 0 0 0 0 .63l2.09 3.44a.28.28 0 0 0 .37.12.3.3 0 0 0 .13-.12l5-12.11a.3.3 0 0 0-.14-.37.28.28 0 0 0-.17-.01Z" })),
|
|
119
135
|
'paper-plane-slash': () => (h("path", { fill: "currentColor", d: "M2.67,1.69,14.26,13.28l-1,1-2.79-2.8-1.1,2.67a.3.3,0,0,1-.13.12.28.28,0,0,1-.37-.12L6.75,10.74a.52.52,0,0,1,0-.63L7.82,8.9l-.76-.76L5.76,9.27a.57.57,0,0,1-.61.06L1.88,7.51a.29.29,0,0,1-.16-.15A.28.28,0,0,1,1.87,7L4.68,5.76l-3-3Zm11.53,0a.28.28,0,0,0-.22,0L7.53,4.51,9.26,6.24l3-2.54s.15-.1.19-.06,0,.14-.06.18L9.75,6.73l1.88,1.88,2.71-6.54A.3.3,0,0,0,14.2,1.7Z" })),
|
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A11Y
|
|
3
|
+
*/
|
|
4
|
+
.sr-only {
|
|
5
|
+
border: 0 !important;
|
|
6
|
+
clip: rect(1px, 1px, 1px, 1px) !important;
|
|
7
|
+
-webkit-clip-path: inset(50%) !important;
|
|
8
|
+
clip-path: inset(50%) !important;
|
|
9
|
+
height: 1px !important;
|
|
10
|
+
margin: -1px !important;
|
|
11
|
+
overflow: hidden !important;
|
|
12
|
+
padding: 0 !important;
|
|
13
|
+
position: absolute !important;
|
|
14
|
+
width: 1px !important;
|
|
15
|
+
white-space: nowrap !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
*:focus:not(:focus-visible) {
|
|
19
|
+
outline: none;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@media (prefers-reduced-motion) {
|
|
23
|
+
.mg-a11y-animation {
|
|
24
|
+
animation: none !important;
|
|
25
|
+
transition: none !important;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
1
28
|
:host {
|
|
2
29
|
display: inline-flex;
|
|
3
30
|
vertical-align: middle;
|
|
@@ -3,24 +3,17 @@ import { icons, sizes, variants } from './mg-icon.conf';
|
|
|
3
3
|
import { ClassList } from '../../../utils/components.utils';
|
|
4
4
|
export class MgIcon {
|
|
5
5
|
constructor() {
|
|
6
|
-
/**
|
|
7
|
-
* Define icon size
|
|
8
|
-
*/
|
|
9
|
-
this.size = 'regular';
|
|
10
|
-
/**
|
|
11
|
-
* Make the icon spin
|
|
12
|
-
*/
|
|
13
|
-
this.spin = false;
|
|
14
|
-
/**
|
|
15
|
-
* Component classes
|
|
16
|
-
*/
|
|
17
|
-
this.classList = new ClassList(['mg-icon']);
|
|
18
6
|
/**
|
|
19
7
|
* getIcon
|
|
20
8
|
*
|
|
21
9
|
* @returns {HTMLElement} icon html
|
|
22
10
|
*/
|
|
23
11
|
this.getIcon = () => icons[this.icon]();
|
|
12
|
+
this.icon = undefined;
|
|
13
|
+
this.size = 'regular';
|
|
14
|
+
this.variant = undefined;
|
|
15
|
+
this.spin = false;
|
|
16
|
+
this.classList = new ClassList(['mg-icon']);
|
|
24
17
|
}
|
|
25
18
|
validateIcon(newValue, oldValue) {
|
|
26
19
|
if (!Object.keys(icons).includes(newValue)) {
|
|
@@ -58,9 +51,11 @@ export class MgIcon {
|
|
|
58
51
|
handleSpin(newValue) {
|
|
59
52
|
if (newValue) {
|
|
60
53
|
this.classList.add('mg-icon--spin');
|
|
54
|
+
this.classList.add('mg-a11y-animation');
|
|
61
55
|
}
|
|
62
56
|
else {
|
|
63
57
|
this.classList.delete('mg-icon--spin');
|
|
58
|
+
this.classList.delete('mg-a11y-animation');
|
|
64
59
|
}
|
|
65
60
|
}
|
|
66
61
|
/**
|
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import { h } from '@stencil/core';
|
|
2
2
|
export class MgInputTitle {
|
|
3
3
|
constructor() {
|
|
4
|
-
/**
|
|
5
|
-
* Switch from label to fieldset sementic
|
|
6
|
-
*/
|
|
7
|
-
this.isLegend = false;
|
|
8
|
-
/**
|
|
9
|
-
* Component parent tagname
|
|
10
|
-
*/
|
|
11
|
-
this.tagName = 'label';
|
|
12
4
|
this.getTagName = () => {
|
|
13
5
|
this.tagName = this.isLegend ? 'legend' : 'label';
|
|
14
6
|
};
|
|
7
|
+
this.identifier = undefined;
|
|
8
|
+
this.required = undefined;
|
|
9
|
+
this.isLegend = false;
|
|
10
|
+
this.tagName = 'label';
|
|
15
11
|
}
|
|
16
12
|
validateIdentifier(newValue) {
|
|
17
13
|
if (typeof newValue !== 'string' || newValue.trim() === '') {
|
|
@@ -4,15 +4,6 @@ import { variants } from '../mg-tag.conf';
|
|
|
4
4
|
export default {
|
|
5
5
|
component: 'mg-tag',
|
|
6
6
|
title: 'Atoms/mg-tag',
|
|
7
|
-
argTypes: {
|
|
8
|
-
variant: {
|
|
9
|
-
options: variants,
|
|
10
|
-
control: { type: 'select' },
|
|
11
|
-
table: {
|
|
12
|
-
defaultValue: { summary: variants[0] },
|
|
13
|
-
},
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
7
|
};
|
|
17
8
|
/**
|
|
18
9
|
* Template
|
|
@@ -27,4 +18,5 @@ MgTag.args = {
|
|
|
27
18
|
slot: 'Label',
|
|
28
19
|
variant: variants[0],
|
|
29
20
|
outline: false,
|
|
21
|
+
soft: false,
|
|
30
22
|
};
|
|
@@ -20,6 +20,15 @@
|
|
|
20
20
|
background-color: transparent;
|
|
21
21
|
color: hsl(var(--color-dark));
|
|
22
22
|
}
|
|
23
|
+
.mg-tag.mg-tag--primary.mg-tag--soft {
|
|
24
|
+
font-weight: 200;
|
|
25
|
+
background-color: hsl(var(--color-dark-h), var(--color-dark-s), 90%);
|
|
26
|
+
border-color: hsl(var(--color-dark-h), var(--color-dark-s), 90%);
|
|
27
|
+
color: hsl(var(--color-dark));
|
|
28
|
+
}
|
|
29
|
+
.mg-tag.mg-tag--primary.mg-tag--soft ::slotted(mg-icon) {
|
|
30
|
+
color: hsl(var(--color-dark));
|
|
31
|
+
}
|
|
23
32
|
.mg-tag.mg-tag--secondary {
|
|
24
33
|
background-color: hsl(var(--color-light));
|
|
25
34
|
border-color: hsl(var(--color-light));
|
|
@@ -29,6 +38,15 @@
|
|
|
29
38
|
background-color: transparent;
|
|
30
39
|
color: hsl(var(--color-light));
|
|
31
40
|
}
|
|
41
|
+
.mg-tag.mg-tag--secondary.mg-tag--soft {
|
|
42
|
+
font-weight: 200;
|
|
43
|
+
background-color: hsl(var(--color-light-h), var(--color-light-s), 90%);
|
|
44
|
+
border-color: hsl(var(--color-light-h), var(--color-light-s), 90%);
|
|
45
|
+
color: hsl(var(--color-dark));
|
|
46
|
+
}
|
|
47
|
+
.mg-tag.mg-tag--secondary.mg-tag--soft ::slotted(mg-icon) {
|
|
48
|
+
color: hsl(var(--color-dark));
|
|
49
|
+
}
|
|
32
50
|
.mg-tag.mg-tag--success {
|
|
33
51
|
background-color: hsl(var(--color-success));
|
|
34
52
|
border-color: hsl(var(--color-success));
|
|
@@ -38,6 +56,15 @@
|
|
|
38
56
|
background-color: transparent;
|
|
39
57
|
color: hsl(var(--color-success));
|
|
40
58
|
}
|
|
59
|
+
.mg-tag.mg-tag--success.mg-tag--soft {
|
|
60
|
+
font-weight: 200;
|
|
61
|
+
background-color: hsl(var(--color-success-h), var(--color-success-s), 90%);
|
|
62
|
+
border-color: hsl(var(--color-success-h), var(--color-success-s), 90%);
|
|
63
|
+
color: hsl(var(--color-dark));
|
|
64
|
+
}
|
|
65
|
+
.mg-tag.mg-tag--success.mg-tag--soft ::slotted(mg-icon) {
|
|
66
|
+
color: hsl(var(--color-success));
|
|
67
|
+
}
|
|
41
68
|
.mg-tag.mg-tag--warning {
|
|
42
69
|
background-color: hsl(var(--color-warning));
|
|
43
70
|
border-color: hsl(var(--color-warning));
|
|
@@ -47,6 +74,15 @@
|
|
|
47
74
|
background-color: transparent;
|
|
48
75
|
color: hsl(var(--color-warning));
|
|
49
76
|
}
|
|
77
|
+
.mg-tag.mg-tag--warning.mg-tag--soft {
|
|
78
|
+
font-weight: 200;
|
|
79
|
+
background-color: hsl(var(--color-warning-h), var(--color-warning-s), 90%);
|
|
80
|
+
border-color: hsl(var(--color-warning-h), var(--color-warning-s), 90%);
|
|
81
|
+
color: hsl(var(--color-dark));
|
|
82
|
+
}
|
|
83
|
+
.mg-tag.mg-tag--warning.mg-tag--soft ::slotted(mg-icon) {
|
|
84
|
+
color: hsl(var(--color-warning));
|
|
85
|
+
}
|
|
50
86
|
.mg-tag.mg-tag--danger {
|
|
51
87
|
background-color: hsl(var(--color-danger));
|
|
52
88
|
border-color: hsl(var(--color-danger));
|
|
@@ -56,6 +92,15 @@
|
|
|
56
92
|
background-color: transparent;
|
|
57
93
|
color: hsl(var(--color-danger));
|
|
58
94
|
}
|
|
95
|
+
.mg-tag.mg-tag--danger.mg-tag--soft {
|
|
96
|
+
font-weight: 200;
|
|
97
|
+
background-color: hsl(var(--color-danger-h), var(--color-danger-s), 90%);
|
|
98
|
+
border-color: hsl(var(--color-danger-h), var(--color-danger-s), 90%);
|
|
99
|
+
color: hsl(var(--color-dark));
|
|
100
|
+
}
|
|
101
|
+
.mg-tag.mg-tag--danger.mg-tag--soft ::slotted(mg-icon) {
|
|
102
|
+
color: hsl(var(--color-danger));
|
|
103
|
+
}
|
|
59
104
|
.mg-tag.mg-tag--info {
|
|
60
105
|
background-color: hsl(var(--color-info));
|
|
61
106
|
border-color: hsl(var(--color-info));
|
|
@@ -65,9 +110,22 @@
|
|
|
65
110
|
background-color: transparent;
|
|
66
111
|
color: hsl(var(--color-info));
|
|
67
112
|
}
|
|
113
|
+
.mg-tag.mg-tag--info.mg-tag--soft {
|
|
114
|
+
font-weight: 200;
|
|
115
|
+
background-color: hsl(var(--color-info-h), var(--color-info-s), 90%);
|
|
116
|
+
border-color: hsl(var(--color-info-h), var(--color-info-s), 90%);
|
|
117
|
+
color: hsl(var(--color-dark));
|
|
118
|
+
}
|
|
119
|
+
.mg-tag.mg-tag--info.mg-tag--soft ::slotted(mg-icon) {
|
|
120
|
+
color: hsl(var(--color-info));
|
|
121
|
+
}
|
|
68
122
|
|
|
69
123
|
.mg-tag,
|
|
70
124
|
mg-tag {
|
|
71
125
|
display: inline-block;
|
|
72
126
|
vertical-align: middle;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
::slotted(mg-icon) {
|
|
130
|
+
margin-right: 0.4rem;
|
|
73
131
|
}
|