@hyvor/design 0.0.67 → 0.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. package/dist/components/ActionList/ActionList.svelte +2 -7
  2. package/dist/components/ActionList/ActionListGroup.svelte +24 -29
  3. package/dist/components/ActionList/ActionListItem.svelte +86 -88
  4. package/dist/components/ActionList/Selected.svelte +17 -20
  5. package/dist/components/Avatar/Avatar.svelte +7 -11
  6. package/dist/components/Avatar/AvatarStack.svelte +16 -20
  7. package/dist/components/Base/Base.svelte +3 -3
  8. package/dist/components/Box/Box.svelte +8 -8
  9. package/dist/components/Button/Button.svelte +33 -42
  10. package/dist/components/Button/ButtonGroup.svelte +6 -6
  11. package/dist/components/Callout/Callout.svelte +88 -86
  12. package/dist/components/Callout/Callout.svelte.d.ts +1 -0
  13. package/dist/components/Checkbox/Checkbox.svelte +113 -121
  14. package/dist/components/CodeBlock/CodeBlock.svelte +26 -23
  15. package/dist/components/CodeBlock/getCode.js +6 -6
  16. package/dist/components/CodeBlock/hljs.scss +189 -191
  17. package/dist/components/CodeBlock/prism.scss +370 -7
  18. package/dist/components/ColorPicker/ColorPicker.svelte +42 -42
  19. package/dist/components/Dark/DarkProvider.svelte +9 -9
  20. package/dist/components/Dark/DarkToggle.svelte +7 -10
  21. package/dist/components/Divider/Divider.svelte +6 -7
  22. package/dist/components/Dropdown/Dropdown.svelte +33 -108
  23. package/dist/components/Dropdown/DropdownContent.svelte +120 -0
  24. package/dist/components/Dropdown/DropdownContent.svelte.d.ts +24 -0
  25. package/dist/components/FormControl/Caption.svelte +9 -9
  26. package/dist/components/FormControl/FormControl.svelte +18 -18
  27. package/dist/components/FormControl/InputGroup.svelte +7 -8
  28. package/dist/components/FormControl/Label.svelte +5 -5
  29. package/dist/components/FormControl/Validation.svelte +18 -16
  30. package/dist/components/FormControl/Validation.svelte.d.ts +1 -1
  31. package/dist/components/HyvorBar/BarProducts.svelte +52 -0
  32. package/dist/components/HyvorBar/BarProducts.svelte.d.ts +39 -0
  33. package/dist/components/HyvorBar/BarSupport.svelte +119 -0
  34. package/dist/components/HyvorBar/BarSupport.svelte.d.ts +19 -0
  35. package/dist/components/HyvorBar/BarUpdates.svelte +58 -0
  36. package/dist/components/HyvorBar/BarUpdates.svelte.d.ts +18 -0
  37. package/dist/components/HyvorBar/BarUpdatesList.svelte +134 -0
  38. package/dist/components/HyvorBar/BarUpdatesList.svelte.d.ts +18 -0
  39. package/dist/components/HyvorBar/BarUser.svelte +60 -0
  40. package/dist/components/HyvorBar/BarUser.svelte.d.ts +16 -0
  41. package/dist/components/HyvorBar/BarUserPreview.svelte +42 -0
  42. package/dist/components/HyvorBar/BarUserPreview.svelte.d.ts +14 -0
  43. package/dist/components/HyvorBar/HyvorBar.svelte +150 -0
  44. package/dist/components/HyvorBar/HyvorBar.svelte.d.ts +19 -0
  45. package/dist/components/HyvorBar/bar.d.ts +33 -0
  46. package/dist/components/HyvorBar/bar.js +74 -0
  47. package/dist/components/HyvorBar/img/G2.svelte +9 -0
  48. package/dist/components/HyvorBar/img/G2.svelte.d.ts +23 -0
  49. package/dist/components/HyvorBar/img/Trustpilot.svelte +11 -0
  50. package/dist/components/HyvorBar/img/Trustpilot.svelte.d.ts +23 -0
  51. package/dist/components/IconButton/IconButton.svelte +19 -23
  52. package/dist/components/IconMessage/IconMessage.svelte +89 -38
  53. package/dist/components/IconMessage/IconMessage.svelte.d.ts +9 -1
  54. package/dist/components/Internationalization/InternationalizationProvider.svelte +2 -2
  55. package/dist/components/Internationalization/InternationalizationProvider.svelte.d.ts +1 -1
  56. package/dist/components/Internationalization/LanguageToggle.svelte +33 -36
  57. package/dist/components/Internationalization/LanguageToggle.svelte.d.ts +2 -2
  58. package/dist/components/Internationalization/T.svelte.d.ts +3 -3
  59. package/dist/components/Internationalization/i18n.d.ts +4 -4
  60. package/dist/components/Internationalization/i18n.js +13 -11
  61. package/dist/components/Internationalization/t.d.ts +3 -3
  62. package/dist/components/Internationalization/t.js +4 -4
  63. package/dist/components/Internationalization/types.d.ts +1 -1
  64. package/dist/components/Link/Link.svelte +53 -58
  65. package/dist/components/Loader/LoadButton.svelte +15 -29
  66. package/dist/components/Loader/Loader.svelte +56 -69
  67. package/dist/components/Modal/ConfirmModalProvider.svelte +18 -36
  68. package/dist/components/Modal/Modal.svelte +134 -164
  69. package/dist/components/Modal/ModalFooter.svelte +23 -26
  70. package/dist/components/Modal/confirm.d.ts +1 -1
  71. package/dist/components/Modal/confirm.js +4 -4
  72. package/dist/components/Modal/modal-types.d.ts +2 -2
  73. package/dist/components/NavLink/NavLink.svelte +78 -86
  74. package/dist/components/Radio/Radio.svelte +23 -31
  75. package/dist/components/Slider/Slider.svelte +71 -79
  76. package/dist/components/SplitControl/SplitControl.svelte +28 -42
  77. package/dist/components/Switch/Switch.svelte +60 -65
  78. package/dist/components/TabNav/TabNav.svelte +6 -10
  79. package/dist/components/TabNav/TabNavItem.svelte +36 -43
  80. package/dist/components/Table/Table.svelte +7 -4
  81. package/dist/components/Table/TableRow.svelte +23 -23
  82. package/dist/components/Tag/Tag.svelte +28 -36
  83. package/dist/components/Text/Text.svelte +15 -22
  84. package/dist/components/TextInput/TextInput.svelte +26 -26
  85. package/dist/components/Textarea/Textarea.svelte +38 -38
  86. package/dist/components/Toast/ToastIcon.svelte +29 -31
  87. package/dist/components/Toast/ToastMessage.svelte +33 -39
  88. package/dist/components/Toast/ToastProvider.svelte +16 -16
  89. package/dist/components/Toast/cleaner.js +5 -5
  90. package/dist/components/Toast/toast.d.ts +2 -2
  91. package/dist/components/Toast/toast.js +10 -10
  92. package/dist/components/Tooltip/Tooltip.svelte +82 -83
  93. package/dist/components/directives/clickOutside.js +4 -4
  94. package/dist/components/directives/debounce.d.ts +1 -0
  95. package/dist/components/directives/debounce.js +8 -0
  96. package/dist/components/index.d.ts +1 -0
  97. package/dist/components/index.js +1 -0
  98. package/dist/index.css +31 -33
  99. package/dist/marketing/Container/Container.svelte +8 -8
  100. package/dist/marketing/Docs/Content/Content.svelte +8 -7
  101. package/dist/marketing/Docs/Content/DocsImage.svelte +52 -62
  102. package/dist/marketing/Docs/Docs.svelte +21 -24
  103. package/dist/marketing/Docs/Nav/Nav.svelte +21 -22
  104. package/dist/marketing/Docs/Nav/NavCategory.svelte +28 -28
  105. package/dist/marketing/Docs/Nav/NavItem.svelte +21 -24
  106. package/dist/marketing/Docs/Sidebar/Sidebar.svelte +22 -25
  107. package/dist/marketing/Docs/Toc.svelte +17 -19
  108. package/dist/marketing/Document/Document.svelte +5 -5
  109. package/dist/marketing/Document/DocumentTitle.svelte +49 -49
  110. package/dist/marketing/Footer/Footer.svelte +111 -119
  111. package/dist/marketing/Footer/FooterLinkList.svelte +24 -26
  112. package/dist/marketing/Header/Header.svelte +7 -15
  113. package/dist/marketing/Logo/LogoBlogs.svelte +41 -0
  114. package/dist/marketing/Logo/LogoBlogs.svelte.d.ts +16 -0
  115. package/dist/marketing/Logo/LogoCore.svelte +41 -0
  116. package/dist/marketing/Logo/LogoCore.svelte.d.ts +16 -0
  117. package/dist/marketing/Logo/LogoFortguard.svelte +49 -0
  118. package/dist/marketing/Logo/LogoFortguard.svelte.d.ts +16 -0
  119. package/dist/marketing/Logo/LogoTalk.svelte +27 -0
  120. package/dist/marketing/Logo/LogoTalk.svelte.d.ts +16 -0
  121. package/dist/stores/dark.js +8 -8
  122. package/dist/variables.scss +41 -48
  123. package/package.json +59 -58
@@ -1,92 +1,94 @@
1
1
  <script>export let type = "soft";
2
+ export let title = void 0;
2
3
  </script>
3
4
 
4
-
5
- <div class={"callout " + type} {...$$restProps}>
6
-
7
- {#if $$slots.title}
8
-
9
- <div class="title-wrap">
10
-
11
- {#if $$slots.icon}
12
- <span class="title-icon"><slot name="icon" /></span>
13
- {/if}
14
-
15
- <div class="title"><slot name="title" /></div>
16
-
17
- </div>
18
-
19
- {/if}
20
-
21
- <div class="text-wrap">
22
- {#if $$slots.icon && !$$slots.title}
23
- <span class="icon"><slot name="icon" /></span>
24
- {/if}
25
-
26
- <div class="text">
27
- {#if $$slots.default}
28
- <slot />
29
- {/if}
30
- <slot name="text" />
31
- </div>
32
- </div>
33
-
5
+ <div class={'callout ' + type} {...$$restProps}>
6
+ {#if $$slots.title}
7
+ <div class="title-wrap">
8
+ {#if $$slots.icon}
9
+ <span class="title-icon"><slot name="icon" /></span>
10
+ {/if}
11
+
12
+ <div class="title"><slot name="title" /></div>
13
+ </div>
14
+ {:else if title}
15
+ <div class="title-wrap">
16
+ {#if $$slots.icon}
17
+ <span
18
+ class="title-icon
19
+ "><slot name="icon" /></span
20
+ >
21
+ {/if}
22
+
23
+ <div class="title">{title}</div>
24
+ </div>
25
+ {/if}
26
+
27
+ <div class="text-wrap">
28
+ {#if $$slots.icon && !$$slots.title && !title}
29
+ <span class="icon"><slot name="icon" /></span>
30
+ {/if}
31
+
32
+ <div class="text">
33
+ {#if $$slots.default}
34
+ <slot />
35
+ {/if}
36
+ <slot name="text" />
37
+ </div>
38
+ </div>
34
39
  </div>
35
40
 
36
-
37
41
  <style>
38
-
39
- .callout {
40
- padding: 15px 25px;
41
- border-radius: var(--box-radius);
42
- /* line-height: var(--line-height-content); */
43
- }
44
-
45
- .callout.soft {
46
- background-color: var(--accent-light);
47
- }
48
-
49
- .callout.info {
50
- background-color: var(--blue-light);
51
- color: var(--blue-dark);
52
- }
53
-
54
- .callout.warning {
55
- background-color: var(--orange-light);
56
- color: var(--orange-dark)
57
- }
58
-
59
- .callout.danger {
60
- background-color: var(--red-light);
61
- color: var(--red-dark);
62
- }
63
-
64
- .callout.success {
65
- background-color: var(--green-light);
66
- color: var(--green-dark);
67
- }
68
-
69
- .title-wrap {
70
- margin-bottom: 4px;
71
- display: flex;
72
- align-items: center;
73
- font-weight: 600;
74
- font-size: 18px;
75
- }
76
-
77
- .title-icon {
78
- vertical-align: middle;
79
- margin-right: 8px;
80
- }
81
-
82
- .text-wrap {
83
- display: flex;
84
- align-items: flex-start;
85
- }
86
-
87
- .icon {
88
- margin-right: 8px;
89
- font-size: 18px;
90
- }
91
-
92
- </style>
42
+ .callout {
43
+ padding: 15px 25px;
44
+ border-radius: var(--box-radius);
45
+ /* line-height: var(--line-height-content); */
46
+ }
47
+
48
+ .callout.soft {
49
+ background-color: var(--accent-light);
50
+ }
51
+
52
+ .callout.info {
53
+ background-color: var(--blue-light);
54
+ color: var(--blue-dark);
55
+ }
56
+
57
+ .callout.warning {
58
+ background-color: var(--orange-light);
59
+ color: var(--orange-dark);
60
+ }
61
+
62
+ .callout.danger {
63
+ background-color: var(--red-light);
64
+ color: var(--red-dark);
65
+ }
66
+
67
+ .callout.success {
68
+ background-color: var(--green-light);
69
+ color: var(--green-dark);
70
+ }
71
+
72
+ .title-wrap {
73
+ margin-bottom: 4px;
74
+ display: flex;
75
+ align-items: center;
76
+ font-weight: 600;
77
+ font-size: 18px;
78
+ }
79
+
80
+ .title-icon {
81
+ vertical-align: middle;
82
+ margin-right: 8px;
83
+ }
84
+
85
+ .text-wrap {
86
+ display: flex;
87
+ align-items: flex-start;
88
+ }
89
+
90
+ .icon {
91
+ margin-right: 8px;
92
+ font-size: 18px;
93
+ }
94
+ </style>
@@ -3,6 +3,7 @@ declare const __propDef: {
3
3
  props: {
4
4
  [x: string]: any;
5
5
  type?: "danger" | "success" | "warning" | "info" | "soft" | undefined;
6
+ title?: string | undefined;
6
7
  };
7
8
  events: {
8
9
  [evt: string]: CustomEvent<any>;
@@ -23,127 +23,119 @@ function handleChange() {
23
23
  }
24
24
  </script>
25
25
 
26
- <span
27
- class="checkbox-wrap"
28
- >
29
- <label>
30
- <input
31
- type="checkbox"
32
- bind:checked
33
- bind:this={input}
34
- disabled={disabled}
35
-
36
- on:keyup
37
- on:keydown
38
- on:keypress
39
- on:focus
40
- on:blur
41
- on:click
42
- on:mouseover
43
- on:mouseenter
44
- on:mouseleave
45
- on:change
46
-
47
- {...$$restProps}
48
-
49
- on:change={handleChange}
50
-
51
- />
52
- <span class="placeholder" />
53
- {#if $$slots.default}
54
- <span class="label">
55
- <slot />
56
- </span>
57
- {/if}
58
- </label>
26
+ <span class="checkbox-wrap">
27
+ <label>
28
+ <input
29
+ type="checkbox"
30
+ bind:checked
31
+ bind:this={input}
32
+ {disabled}
33
+ on:keyup
34
+ on:keydown
35
+ on:keypress
36
+ on:focus
37
+ on:blur
38
+ on:click
39
+ on:mouseover
40
+ on:mouseenter
41
+ on:mouseleave
42
+ on:change
43
+ {...$$restProps}
44
+ on:change={handleChange}
45
+ />
46
+ <span class="placeholder" />
47
+ {#if $$slots.default}
48
+ <span class="label">
49
+ <slot />
50
+ </span>
51
+ {/if}
52
+ </label>
59
53
  </span>
60
54
 
61
55
  <style>
62
-
63
- .label {
64
- margin-left: 8px;
65
- }
66
-
67
- .checkbox-wrap {
68
- position: relative;
69
- cursor: pointer;
70
- display: inline-flex;
71
- align-items: center;
72
- vertical-align: middle;
73
- }
74
-
75
- .checkbox-wrap label {
76
- display: inline-flex;
77
- align-items: center;
78
- cursor: pointer;
79
- }
80
-
81
- input {
82
- position: absolute;
83
- opacity: 0;
84
- width:0;
85
- height:0;
86
- }
87
-
88
- span.placeholder {
89
- display: inline-block;
90
- width:16px;
91
- height:16px;
92
- background-color: var(--input);
93
- border-radius: 2px;
94
- outline: 1px solid var(--accent);
95
- position: relative;
96
- }
97
-
98
- span.placeholder:focus-visible {
99
- box-shadow: 0 0 0 4px var(--accent-light);
100
- }
101
-
102
- /* the check icon */
103
- span.placeholder:after {
104
- content: "";
105
- position: absolute;
106
- display: none;
107
-
108
- /* check icon */
109
- left: 4.5px;
110
- top: 1px;
111
- width: 4px;
112
- height: 9px;
113
- border: solid var(--accent-text);
114
- border-width: 0 3px 3px 0;
115
- transform: rotate(45deg);
116
- transition: .2s box-shadow;
117
- }
118
-
119
- .checkbox-wrap:hover span.placeholder {
120
- box-shadow: 0 0 0 3px var(--accent-light);
121
- }
122
-
123
- input:checked ~ span.placeholder {
124
- background-color: var(--accent)!important;
125
- }
126
-
127
- input:focus ~ span.placeholder {
128
- box-shadow: 0 0 0 4px var(--accent-light);
129
- }
130
-
131
- input:checked ~ span.placeholder:after {
132
- display:block;
133
- }
134
-
135
- /* disabled styles */
136
- input:disabled ~ span.placeholder {
137
- background-color: var(--accent-light);
138
- border: none !important;
139
- opacity: 0.2;
140
- cursor: not-allowed;
141
- box-shadow: none !important;
142
-
143
- }
144
-
145
- input:disabled:checked ~ span.placeholder:after {
146
- display: none;
147
- pointer-events: none;
148
- }
149
- </style>
56
+ .label {
57
+ margin-left: 8px;
58
+ }
59
+
60
+ .checkbox-wrap {
61
+ position: relative;
62
+ cursor: pointer;
63
+ display: inline-flex;
64
+ align-items: center;
65
+ vertical-align: middle;
66
+ }
67
+
68
+ .checkbox-wrap label {
69
+ display: inline-flex;
70
+ align-items: center;
71
+ cursor: pointer;
72
+ }
73
+
74
+ input {
75
+ position: absolute;
76
+ opacity: 0;
77
+ width: 0;
78
+ height: 0;
79
+ }
80
+
81
+ span.placeholder {
82
+ display: inline-block;
83
+ width: 16px;
84
+ height: 16px;
85
+ background-color: var(--input);
86
+ border-radius: 2px;
87
+ outline: 1px solid var(--accent);
88
+ position: relative;
89
+ }
90
+
91
+ span.placeholder:focus-visible {
92
+ box-shadow: 0 0 0 4px var(--accent-light);
93
+ }
94
+
95
+ /* the check icon */
96
+ span.placeholder:after {
97
+ content: '';
98
+ position: absolute;
99
+ display: none;
100
+
101
+ /* check icon */
102
+ left: 4.5px;
103
+ top: 1px;
104
+ width: 4px;
105
+ height: 9px;
106
+ border: solid var(--accent-text);
107
+ border-width: 0 3px 3px 0;
108
+ transform: rotate(45deg);
109
+ transition: 0.2s box-shadow;
110
+ }
111
+
112
+ .checkbox-wrap:hover span.placeholder {
113
+ box-shadow: 0 0 0 3px var(--accent-light);
114
+ }
115
+
116
+ input:checked ~ span.placeholder {
117
+ background-color: var(--accent) !important;
118
+ }
119
+
120
+ input:focus ~ span.placeholder {
121
+ box-shadow: 0 0 0 4px var(--accent-light);
122
+ }
123
+
124
+ input:checked ~ span.placeholder:after {
125
+ display: block;
126
+ }
127
+
128
+ /* disabled styles */
129
+ input:disabled ~ span.placeholder {
130
+ background-color: var(--accent-light);
131
+ border: none !important;
132
+ opacity: 0.2;
133
+ cursor: not-allowed;
134
+ box-shadow: none !important;
135
+ }
136
+
137
+ input:disabled:checked ~ span.placeholder:after {
138
+ display: none;
139
+ pointer-events: none;
140
+ }
141
+ </style>
@@ -12,26 +12,29 @@ import getCode, {} from "./getCode.js";
12
12
  <pre class="language-{languageCode} hljs"><code>{@html getCode(code, languageCode)}</code></pre>
13
13
 
14
14
  <style>
15
- /*styles for CodeBlock component */
16
- pre {
17
- text-align: left;
18
- white-space: pre;
19
- word-spacing: normal;
20
- word-break: normal;
21
- word-wrap: normal;
22
- overflow: auto;
23
- border-radius: 20px;
24
- padding: 20px;
25
- line-height: 1.1;
26
- }
27
- pre code {
28
- all: unset;
29
- font-family: Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;
30
- font-size: 14px;
31
- line-height: 1.5;
32
- tab-size: 4;
33
- hyphens: none;
34
- }
35
-
36
-
37
- </style>
15
+ /*styles for CodeBlock component */
16
+ pre {
17
+ text-align: left;
18
+ white-space: pre;
19
+ word-spacing: normal;
20
+ word-break: normal;
21
+ word-wrap: normal;
22
+ overflow: auto;
23
+ border-radius: 20px;
24
+ padding: 20px;
25
+ line-height: 1.1;
26
+ }
27
+ pre code {
28
+ all: unset;
29
+ font-family:
30
+ Consolas,
31
+ Monaco,
32
+ Andale Mono,
33
+ Ubuntu Mono,
34
+ monospace;
35
+ font-size: 14px;
36
+ line-height: 1.5;
37
+ tab-size: 4;
38
+ hyphens: none;
39
+ }
40
+ </style>
@@ -14,24 +14,24 @@ hljs.registerLanguage('json', json);
14
14
  export default function getCode(code, language) {
15
15
  let ret = code;
16
16
  // remove the first empty line
17
- ret = ret.replace(/^[^\S\r\n]*\n/, "");
17
+ ret = ret.replace(/^[^\S\r\n]*\n/, '');
18
18
  // remove the last empty line
19
- ret = ret.replace(/\n[^\S\r\n]*$/, "");
20
- let lines = ret.split("\n");
19
+ ret = ret.replace(/\n[^\S\r\n]*$/, '');
20
+ let lines = ret.split('\n');
21
21
  let indent = null; // number of spaces to remove from each line
22
- lines = lines.map(line => {
22
+ lines = lines.map((line) => {
23
23
  if (indent === null) {
24
24
  // find the indent
25
25
  const match = line.match(/^(\s*)/);
26
26
  indent = match ? match[1].length : 0;
27
27
  }
28
- if (line.substring(0, indent).trim() !== "") {
28
+ if (line.substring(0, indent).trim() !== '') {
29
29
  return line;
30
30
  }
31
31
  // remove the indent
32
32
  line = line.substring(indent);
33
33
  return line;
34
34
  });
35
- ret = lines.join("\n");
35
+ ret = lines.join('\n');
36
36
  return hljs.highlight(ret, { language }).value;
37
37
  }