do-ui-design-system 1.0.7 → 1.0.9
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/atoms/Badge/Badge.svelte +38 -0
- package/dist/atoms/Badge/Badge.svelte.d.ts +47 -0
- package/dist/atoms/Badge/Badge.svelte.d.ts.map +1 -0
- package/dist/atoms/Badge/iProps.d.ts +8 -0
- package/dist/atoms/Badge/iProps.d.ts.map +1 -0
- package/dist/atoms/Badge/iProps.js +1 -0
- package/dist/atoms/Counter/Counter.svelte +15 -0
- package/dist/atoms/Counter/Counter.svelte.d.ts +29 -0
- package/dist/atoms/Counter/Counter.svelte.d.ts.map +1 -0
- package/dist/atoms/Counter/iProps.d.ts +4 -0
- package/dist/atoms/Counter/iProps.d.ts.map +1 -0
- package/dist/atoms/Counter/iProps.js +1 -0
- package/dist/atoms/index.d.ts +3 -1
- package/dist/atoms/index.d.ts.map +1 -1
- package/dist/atoms/index.js +3 -1
- package/dist/do-theme/badge.css +53 -0
- package/dist/do-theme/counter.css +18 -0
- package/dist/do-theme/index.css +2 -0
- package/dist/do-theme/var-dark.css +11 -0
- package/dist/do-theme/var-light.css +13 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/molecules/CounterBadge/CounterBadge.svelte +27 -0
- package/dist/molecules/CounterBadge/CounterBadge.svelte.d.ts +38 -0
- package/dist/molecules/CounterBadge/CounterBadge.svelte.d.ts.map +1 -0
- package/dist/molecules/CounterBadge/iProps.d.ts +9 -0
- package/dist/molecules/CounterBadge/iProps.d.ts.map +1 -0
- package/dist/molecules/CounterBadge/iProps.js +1 -0
- package/dist/molecules/index.d.ts +2 -2
- package/dist/molecules/index.d.ts.map +1 -1
- package/dist/molecules/index.js +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let label: string = 'Texto';
|
|
3
|
+
export let maxLength: number | null = null;
|
|
4
|
+
export let customClass: string = '';
|
|
5
|
+
export let enableTooltip: boolean = false;
|
|
6
|
+
export let tooltipContent: string = '';
|
|
7
|
+
|
|
8
|
+
$: displayedText =
|
|
9
|
+
maxLength && label.length > maxLength ? label.slice(0, maxLength) + '…' : label;
|
|
10
|
+
$: isTruncated = maxLength && label.length > maxLength;
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<!-- @component Badge
|
|
14
|
+
```Svelte
|
|
15
|
+
<Badge label={label} maxLength={maxLength} customClass={customClass} enableTooltip={enableTooltip} tooltipContent={tooltipContent}>
|
|
16
|
+
<slot />
|
|
17
|
+
</Badge>
|
|
18
|
+
```
|
|
19
|
+
- `label?`: string
|
|
20
|
+
- `maxLength?`: number | null - max length of the text, if exceeded it will be truncated and "…" will be added
|
|
21
|
+
- `customClass?`: string - additional custom class for styling
|
|
22
|
+
- `enableTooltip?`: boolean - if true, the tooltipContent content will be displayed
|
|
23
|
+
- `tooltipContent?`: any HTML content. The display will be triggered while hovering over the component
|
|
24
|
+
|
|
25
|
+
-->
|
|
26
|
+
<div class="do-badge-wrapper">
|
|
27
|
+
<div class={`do-badge do-badge-primary ${customClass}`} {...isTruncated ? { title: label } : {}}>
|
|
28
|
+
<span>
|
|
29
|
+
{displayedText}
|
|
30
|
+
</span>
|
|
31
|
+
<slot />
|
|
32
|
+
{#if enableTooltip}
|
|
33
|
+
<div class="do-badge-tooltip">
|
|
34
|
+
{@html tooltipContent}
|
|
35
|
+
</div>
|
|
36
|
+
{/if}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
+
default: any;
|
|
16
|
+
} ? Props extends Record<string, never> ? any : {
|
|
17
|
+
children?: any;
|
|
18
|
+
} : {});
|
|
19
|
+
/**
|
|
20
|
+
* Badge
|
|
21
|
+
* ```Svelte
|
|
22
|
+
* <Badge label={label} maxLength={maxLength} customClass={customClass} enableTooltip={enableTooltip} tooltipContent={tooltipContent}>
|
|
23
|
+
* <slot />
|
|
24
|
+
* </Badge>
|
|
25
|
+
* ```
|
|
26
|
+
* - `label?`: string
|
|
27
|
+
* - `maxLength?`: number | null - max length of the text, if exceeded it will be truncated and "…" will be added
|
|
28
|
+
* - `customClass?`: string - additional custom class for styling
|
|
29
|
+
* - `enableTooltip?`: boolean - if true, the tooltipContent content will be displayed
|
|
30
|
+
* - `tooltipContent?`: any HTML content. The display will be triggered while hovering over the component
|
|
31
|
+
*/
|
|
32
|
+
declare const Badge: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
33
|
+
label?: string;
|
|
34
|
+
maxLength?: number | null;
|
|
35
|
+
customClass?: string;
|
|
36
|
+
enableTooltip?: boolean;
|
|
37
|
+
tooltipContent?: string;
|
|
38
|
+
}, {
|
|
39
|
+
default: {};
|
|
40
|
+
}>, {
|
|
41
|
+
[evt: string]: CustomEvent<any>;
|
|
42
|
+
}, {
|
|
43
|
+
default: {};
|
|
44
|
+
}, {}, string>;
|
|
45
|
+
type Badge = InstanceType<typeof Badge>;
|
|
46
|
+
export default Badge;
|
|
47
|
+
//# sourceMappingURL=Badge.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Badge/Badge.svelte.ts"],"names":[],"mappings":"AAgCA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AACD,KAAK,gCAAgC,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,GACvD,CAAC,KAAK,SAAS;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GACzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,GAAG,GACH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,GAClB,EAAE,CAAC,CAAC;AAId;;;;;;;;;;;;GAYG;AACH,QAAA,MAAM,KAAK;YA5BkJ,MAAM;gBAAc,MAAM,GAAG,IAAI;kBAAgB,MAAM;oBAAkB,OAAO;qBAAmB,MAAM;;;;;;;cA4BtK,CAAC;AAC/E,KAAK,KAAK,GAAG,YAAY,CAAC,OAAO,KAAK,CAAC,CAAC;AAC1C,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Badge/iProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export let label: string = '10';
|
|
3
|
+
</script>
|
|
4
|
+
|
|
5
|
+
<!-- @component Counter
|
|
6
|
+
```Svelte
|
|
7
|
+
<Counter label={label} />
|
|
8
|
+
```
|
|
9
|
+
- `label?`: string - the text to display in the counter
|
|
10
|
+
- *If `label` is not provided, it defaults to '10'
|
|
11
|
+
-->
|
|
12
|
+
|
|
13
|
+
<div class="do-counter do-counter-primary">
|
|
14
|
+
<span>{label}</span>
|
|
15
|
+
</div>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Counter
|
|
16
|
+
* ```Svelte
|
|
17
|
+
* <Counter label={label} />
|
|
18
|
+
* ```
|
|
19
|
+
* - `label?`: string - the text to display in the counter
|
|
20
|
+
* - *If `label` is not provided, it defaults to '10'
|
|
21
|
+
*/
|
|
22
|
+
declare const Counter: $$__sveltets_2_IsomorphicComponent<{
|
|
23
|
+
label?: string;
|
|
24
|
+
}, {
|
|
25
|
+
[evt: string]: CustomEvent<any>;
|
|
26
|
+
}, {}, {}, string>;
|
|
27
|
+
type Counter = InstanceType<typeof Counter>;
|
|
28
|
+
export default Counter;
|
|
29
|
+
//# sourceMappingURL=Counter.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Counter.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Counter/Counter.svelte.ts"],"names":[],"mappings":"AAeA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD;;;;;;;GAOG;AACH,QAAA,MAAM,OAAO;YAlB8B,MAAM;;;kBAkB2C,CAAC;AAC3E,KAAK,OAAO,GAAG,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;AAC9C,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Counter/iProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/atoms/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import Button from "./Button/Button.svelte";
|
|
2
2
|
import Icon from "./Icons/Icon.svelte";
|
|
3
|
-
|
|
3
|
+
import Badge from "./Badge/Badge.svelte";
|
|
4
|
+
import Counter from "./Counter/Counter.svelte";
|
|
5
|
+
export { Button, Icon, Badge, Counter };
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/atoms/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,IAAI,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/atoms/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,IAAI,MAAM,qBAAqB,CAAC;AACvC,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,OAAO,MAAM,0BAA0B,CAAC;AAE/C,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC"}
|
package/dist/atoms/index.js
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.do-badge-wrapper {
|
|
2
|
+
position: relative;
|
|
3
|
+
display: inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.do-badge {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
padding: 6px 10px;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
border: 1px solid;
|
|
12
|
+
gap: 4px;
|
|
13
|
+
border-radius: 24px;
|
|
14
|
+
font-size: 12px;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
line-height: normal;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.do-badge-tooltip {
|
|
21
|
+
position: absolute;
|
|
22
|
+
top: 100%;
|
|
23
|
+
left: 0;
|
|
24
|
+
background: var(--do-badge-tooltip-bg);
|
|
25
|
+
color: var(--do-badge-tooltip-content);
|
|
26
|
+
font-size: 12px;
|
|
27
|
+
padding: 4px 8px;
|
|
28
|
+
border-radius: 4px;
|
|
29
|
+
white-space: nowrap;
|
|
30
|
+
margin-top: 4px;
|
|
31
|
+
opacity: 0;
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
transition: opacity 0.2s ease-in-out;
|
|
34
|
+
z-index: 10;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.do-badge-wrapper:hover .do-badge-tooltip {
|
|
38
|
+
opacity: 1;
|
|
39
|
+
pointer-events: auto;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.do-badge-primary {
|
|
43
|
+
color: var(--do-badge-primary-content);
|
|
44
|
+
border-color: var(--do-badge-primary-border);
|
|
45
|
+
background-color: var(--do-badge-primary-bg);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.do-badge-primary:hover,
|
|
49
|
+
.do-badge-primary:focus {
|
|
50
|
+
color: var(--do-badge-primary-hover-content);
|
|
51
|
+
border-color: var(--do-badge-primary-border);
|
|
52
|
+
background-color: var(--do-badge-primary-hover-bg);
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.do-counter {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
padding: 2px 3px;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
7
|
+
border-radius: 48px;
|
|
8
|
+
font-size: 12px;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-weight: 400;
|
|
11
|
+
line-height: normal;
|
|
12
|
+
align-self: stretch;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.do-counter-primary {
|
|
16
|
+
color: var(--do-counter-primary-content);
|
|
17
|
+
background-color: var(--do-counter-primary-bg);
|
|
18
|
+
}
|
package/dist/do-theme/index.css
CHANGED
|
@@ -46,7 +46,18 @@
|
|
|
46
46
|
--do-chip-content-hover: #FAFAFA;
|
|
47
47
|
--do-chip-bg-hover: #27272A;
|
|
48
48
|
|
|
49
|
+
/*badge colors*/
|
|
50
|
+
--do-badge-primary-content: #FAFAFA;
|
|
51
|
+
--do-badge-primary-bg: #52525B;
|
|
52
|
+
--do-badge-primary-hover-content: #FAFAFA;
|
|
53
|
+
--do-badge-primary-hover-bg: #27272A;
|
|
54
|
+
--do-badge-primary-border: #71717A;
|
|
55
|
+
--do-badge-tooltip-content:#FAFAFA;
|
|
56
|
+
--do-badge-tooltip-bg:#71717A;
|
|
49
57
|
|
|
58
|
+
/*counter colors*/
|
|
59
|
+
--do-counter-primary-content:#FAFAFA;
|
|
60
|
+
--do-counter-primary-bg:#71717A;
|
|
50
61
|
|
|
51
62
|
/* base sizes */
|
|
52
63
|
--size-selector: 0.25rem;
|
|
@@ -49,6 +49,19 @@
|
|
|
49
49
|
--do-chip-content-hover: #fafafa;
|
|
50
50
|
--do-chip-bg-hover: #27272a;
|
|
51
51
|
|
|
52
|
+
/*badge colors*/
|
|
53
|
+
--do-badge-primary-content: #3F3F46;
|
|
54
|
+
--do-badge-primary-bg: #FAFAFA;
|
|
55
|
+
--do-badge-primary-hover-content:#FAFAFA;
|
|
56
|
+
--do-badge-primary-hover-bg: #52525B;
|
|
57
|
+
--do-badge-primary-border: #A3A3A3;
|
|
58
|
+
--do-badge-tooltip-content: #3F3F46;
|
|
59
|
+
--do-badge-tooltip-bg: #D4D4D8;
|
|
60
|
+
|
|
61
|
+
/*counter colors*/
|
|
62
|
+
--do-counter-primary-content: #3F3F46;
|
|
63
|
+
--do-counter-primary-bg: #D4D4D8;
|
|
64
|
+
|
|
52
65
|
/* base sizes */
|
|
53
66
|
--size-selector: 0.25rem;
|
|
54
67
|
--size-field: 0.25rem;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Button, Icon } from './atoms/index.js';
|
|
2
|
-
import { IconButton,
|
|
3
|
-
export { Button, Icon, IconButton,
|
|
1
|
+
import { Button, Icon, Counter, Badge } from './atoms/index.js';
|
|
2
|
+
import { IconButton, CounterBadge } from './molecules/index.js';
|
|
3
|
+
export { Button, Icon, Counter, Badge, IconButton, CounterBadge };
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAC,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAC,UAAU,EAAE,YAAY,EAAC,MAAM,sBAAsB,CAAC;AAE9D,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Button, Icon } from './atoms/index.js';
|
|
2
|
-
import { IconButton,
|
|
3
|
-
export { Button, Icon, IconButton,
|
|
1
|
+
import { Button, Icon, Counter, Badge } from './atoms/index.js';
|
|
2
|
+
import { IconButton, CounterBadge } from './molecules/index.js';
|
|
3
|
+
export { Button, Icon, Counter, Badge, IconButton, CounterBadge };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import Badge from '../../atoms/Badge/Badge.svelte';
|
|
3
|
+
import Counter from '../../atoms/Counter/Counter.svelte';
|
|
4
|
+
|
|
5
|
+
export let badgeLabel: string = 'Texto';
|
|
6
|
+
export let badgeCustomClass: string = '';
|
|
7
|
+
export let counterLabel: string = '10';
|
|
8
|
+
export let enableTooltip: boolean = false;
|
|
9
|
+
export let maxLength: number | null = null;
|
|
10
|
+
export let tooltipContent: string = '';
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<!-- @component CounterBadge
|
|
14
|
+
```Svelte
|
|
15
|
+
<CounterBadge badgeLabel={badgeLabel} counterLabel={counterLabel} badgeCustomClass={badgeCustomClass} enableTooltip={enableTooltip} maxLength={maxLength} tooltipContent={tooltipContent} />
|
|
16
|
+
```
|
|
17
|
+
- `badgeLabel?`: string
|
|
18
|
+
- `counterLabel?`: string
|
|
19
|
+
- `badgeCustomClass?`: string - additional custom class for styling
|
|
20
|
+
- `maxLength?`: number | null - max length of the text, if exceeded it will be truncated and "…" will be added
|
|
21
|
+
- `enableTooltip?`: boolean - if true, the tooltipContent content will be displayed
|
|
22
|
+
- `tooltipContent?`: any HTML content related to the counted elements to display while hovering
|
|
23
|
+
-->
|
|
24
|
+
|
|
25
|
+
<Badge label={badgeLabel} customClass={badgeCustomClass} {maxLength} {enableTooltip} {tooltipContent}>
|
|
26
|
+
<Counter label={counterLabel} />
|
|
27
|
+
</Badge>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: Props & {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* CounterBadge
|
|
16
|
+
* ```Svelte
|
|
17
|
+
* <CounterBadge badgeLabel={badgeLabel} counterLabel={counterLabel} badgeCustomClass={badgeCustomClass} enableTooltip={enableTooltip} maxLength={maxLength} tooltipContent={tooltipContent} />
|
|
18
|
+
* ```
|
|
19
|
+
* - `badgeLabel?`: string
|
|
20
|
+
* - `counterLabel?`: string
|
|
21
|
+
* - `badgeCustomClass?`: string - additional custom class for styling
|
|
22
|
+
* - `maxLength?`: number | null - max length of the text, if exceeded it will be truncated and "…" will be added
|
|
23
|
+
* - `enableTooltip?`: boolean - if true, the tooltipContent content will be displayed
|
|
24
|
+
* - `tooltipContent?`: any HTML content related to the counted elements to display while hovering
|
|
25
|
+
*/
|
|
26
|
+
declare const CounterBadge: $$__sveltets_2_IsomorphicComponent<{
|
|
27
|
+
badgeLabel?: string;
|
|
28
|
+
badgeCustomClass?: string;
|
|
29
|
+
counterLabel?: string;
|
|
30
|
+
enableTooltip?: boolean;
|
|
31
|
+
maxLength?: number | null;
|
|
32
|
+
tooltipContent?: string;
|
|
33
|
+
}, {
|
|
34
|
+
[evt: string]: CustomEvent<any>;
|
|
35
|
+
}, {}, {}, string>;
|
|
36
|
+
type CounterBadge = InstanceType<typeof CounterBadge>;
|
|
37
|
+
export default CounterBadge;
|
|
38
|
+
//# sourceMappingURL=CounterBadge.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CounterBadge.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/CounterBadge/CounterBadge.svelte.ts"],"names":[],"mappings":"AA0BA,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAKD;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,YAAY;iBAtBiM,MAAM;uBAAqB,MAAM;mBAAiB,MAAM;oBAAkB,OAAO;gBAAc,MAAM,GAAG,IAAI;qBAAmB,MAAM;;;kBAsBvP,CAAC;AAChF,KAAK,YAAY,GAAG,YAAY,CAAC,OAAO,YAAY,CAAC,CAAC;AACxD,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/CounterBadge/iProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import IconButton from "./IconButton/IconButton.svelte";
|
|
2
|
-
import
|
|
3
|
-
export { IconButton,
|
|
2
|
+
import CounterBadge from "./CounterBadge/CounterBadge.svelte";
|
|
3
|
+
export { IconButton, CounterBadge };
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/molecules/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/molecules/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAExD,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/molecules/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import IconButton from "./IconButton/IconButton.svelte";
|
|
2
|
-
import ActionChip from "./ActionChip/ActionChip.svelte";
|
|
3
|
-
|
|
2
|
+
// import ActionChip from "./ActionChip/ActionChip.svelte"; //agregar cuando se implemente en el figma del ds
|
|
3
|
+
import CounterBadge from "./CounterBadge/CounterBadge.svelte";
|
|
4
|
+
export { IconButton, CounterBadge };
|