@hyvor/design 0.0.44 → 0.0.46

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.
@@ -120,4 +120,15 @@ function handleClick() {
120
120
  color: var(--text-light);
121
121
  }
122
122
 
123
+ div.action-list-item.disabled {
124
+ opacity: 0.5;
125
+ cursor: not-allowed;
126
+ pointer-events: none;
127
+ }
128
+
129
+ div.action-list-item.disabled:hover {
130
+ background-color: transparent;
131
+ pointer-events: none;
132
+ }
133
+
123
134
  </style>
@@ -324,7 +324,6 @@ export let button = {};
324
324
  .button.invisible.accent:hover {
325
325
  background-color: var(--accent-light);
326
326
  box-shadow: none !important;
327
- color: var(--text-light);
328
327
  }
329
328
  .button.invisible.gray:hover {
330
329
  background-color: var(--gray-light);
@@ -1,8 +1,11 @@
1
1
  <script>export let checked = void 0;
2
2
  export let group = [];
3
3
  export let value = "on";
4
+ export let disabled = false;
4
5
  export let input = {};
5
6
  function handleChange() {
7
+ if (disabled)
8
+ return;
6
9
  const index = group.indexOf(value);
7
10
  if (checked === void 0)
8
11
  checked = index >= 0;
@@ -28,6 +31,7 @@ function handleChange() {
28
31
  type="checkbox"
29
32
  bind:checked
30
33
  bind:this={input}
34
+ disabled={disabled}
31
35
 
32
36
  on:keyup
33
37
  on:keydown
@@ -127,4 +131,19 @@ function handleChange() {
127
131
  input:checked ~ span.placeholder:after {
128
132
  display:block;
129
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
+ }
130
149
  </style>
@@ -5,6 +5,7 @@ declare const __propDef: {
5
5
  checked?: boolean | undefined;
6
6
  group?: (string | number)[] | undefined;
7
7
  value?: string | number | undefined;
8
+ disabled?: boolean | undefined;
8
9
  input?: HTMLInputElement | undefined;
9
10
  };
10
11
  events: {
@@ -1,4 +1,5 @@
1
1
  <script>import { tick, onMount, onDestroy } from "svelte";
2
+ import { fade } from "svelte/transition";
2
3
  export let text = "";
3
4
  export let position = "top";
4
5
  export let color = "black";
@@ -69,6 +70,7 @@ onMount(() => {
69
70
  class="tooltip {position}"
70
71
  style:max-width={maxWidth + 'px'}
71
72
  bind:this={tooltip}
73
+ transition:fade={{duration: 100}}
72
74
  >
73
75
  {#if $$slots.tooltip}
74
76
  <slot name="tooltip" />
@@ -81,7 +83,8 @@ onMount(() => {
81
83
 
82
84
  <style>
83
85
  .tooltip-wrap {
84
- display: inline;
86
+ display: inline-flex;
87
+ align-items: center;
85
88
  position: relative;
86
89
 
87
90
  --local-bg: #24292f;
package/dist/index.css CHANGED
@@ -43,4 +43,11 @@ button, a {
43
43
  box-shadow: var(--box-shadow);
44
44
  border-radius: var(--box-radius);
45
45
  background-color: var(--box-background);
46
+ }
47
+
48
+ .hds-container {
49
+ width: 1000px;
50
+ max-width: 100%;
51
+ padding: 0 15px;
52
+ margin: auto;
46
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyvor/design",
3
- "version": "0.0.44",
3
+ "version": "0.0.46",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "scripts": {