do-ui-design-system 1.0.1 → 1.0.2
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/Button/Button.svelte +17 -2
- package/dist/atoms/Button/Button.svelte.d.ts +7 -0
- package/dist/atoms/Button/Button.svelte.d.ts.map +1 -1
- package/dist/atoms/Button/iProps.d.ts +3 -0
- package/dist/atoms/Button/iProps.d.ts.map +1 -1
- package/dist/atoms/Icons/Icon.svelte +6 -2
- package/dist/atoms/Icons/Icon.svelte.d.ts +4 -0
- package/dist/atoms/Icons/Icon.svelte.d.ts.map +1 -1
- package/dist/atoms/Icons/iProps.d.ts +2 -0
- package/dist/atoms/Icons/iProps.d.ts.map +1 -1
- package/dist/do-theme/button.css +21 -0
- package/dist/do-theme/var-dark.css +9 -0
- package/dist/do-theme/var-light.css +30 -21
- package/dist/molecules/Chip/ActionChip.svelte +51 -0
- package/dist/molecules/Chip/ActionChip.svelte.d.ts +49 -0
- package/dist/molecules/Chip/ActionChip.svelte.d.ts.map +1 -0
- package/dist/molecules/Chip/iProps.d.ts +15 -0
- package/dist/molecules/Chip/iProps.d.ts.map +1 -0
- package/dist/molecules/Chip/iProps.js +1 -0
- package/dist/molecules/IconButton/IconButton.svelte +32 -5
- package/dist/molecules/IconButton/IconButton.svelte.d.ts +10 -0
- package/dist/molecules/IconButton/IconButton.svelte.d.ts.map +1 -1
- package/dist/molecules/IconButton/iProps.d.ts +6 -0
- package/dist/molecules/IconButton/iProps.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,6 +8,17 @@
|
|
|
8
8
|
export let disabled: iProps['disabled'] = false;
|
|
9
9
|
export let loading: iProps['loading'] = false;
|
|
10
10
|
export let type: iProps['type'] = 'button';
|
|
11
|
+
export let circle: iProps['circle'] = false;
|
|
12
|
+
export let customStyles: iProps['customStyles'] = '';
|
|
13
|
+
export let customClass: iProps['class'] = '';
|
|
14
|
+
|
|
15
|
+
$: borderRadius = circle
|
|
16
|
+
? 'border-radius:24px; padding: 6px; border: none;'
|
|
17
|
+
: rounded
|
|
18
|
+
? 'border-radius:3rem;'
|
|
19
|
+
: '';
|
|
20
|
+
|
|
21
|
+
$: mergedStyles = `${borderRadius} ${customStyles}`.trim();
|
|
11
22
|
</script>
|
|
12
23
|
|
|
13
24
|
<!-- @component
|
|
@@ -21,13 +32,17 @@
|
|
|
21
32
|
- `rounded?`: boolean
|
|
22
33
|
- `loading?`: boolean
|
|
23
34
|
- `type?`: 'button' | 'submit' | 'reset'
|
|
35
|
+
- `circle?`: boolean
|
|
36
|
+
- `type?`: any CSS style
|
|
37
|
+
- `customClass?`: string
|
|
38
|
+
- `customStyles?`: any CSS style
|
|
24
39
|
-->
|
|
25
40
|
|
|
26
41
|
<button
|
|
27
42
|
{...$$restProps}
|
|
28
43
|
{type}
|
|
29
|
-
style=
|
|
30
|
-
class={['do-btn', `${variant}`, `${size}`].join(' ')}
|
|
44
|
+
style={mergedStyles}
|
|
45
|
+
class={['do-btn', `${variant}`, `${size}`, `${customClass}`].join(' ')}
|
|
31
46
|
{disabled}
|
|
32
47
|
on:click
|
|
33
48
|
>
|
|
@@ -27,6 +27,10 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
|
27
27
|
* - `rounded?`: boolean
|
|
28
28
|
* - `loading?`: boolean
|
|
29
29
|
* - `type?`: 'button' | 'submit' | 'reset'
|
|
30
|
+
* - `circle?`: boolean
|
|
31
|
+
* - `type?`: any CSS style
|
|
32
|
+
* - `customClass?`: string
|
|
33
|
+
* - `customStyles?`: any CSS style
|
|
30
34
|
*/
|
|
31
35
|
declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
32
36
|
[x: string]: any;
|
|
@@ -37,6 +41,9 @@ declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWit
|
|
|
37
41
|
disabled?: boolean | undefined;
|
|
38
42
|
loading?: boolean | undefined;
|
|
39
43
|
type?: "submit" | "reset" | "button" | undefined;
|
|
44
|
+
circle?: boolean | undefined;
|
|
45
|
+
customStyles?: string | undefined;
|
|
46
|
+
customClass?: import("svelte/elements").ClassValue | null | undefined;
|
|
40
47
|
}, {
|
|
41
48
|
default: {};
|
|
42
49
|
}>, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Button/Button.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Button/Button.svelte.ts"],"names":[],"mappings":"AAuCA,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;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;cAA4G,CAAC;AACvG,KAAK,MAAM,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Button/iProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,MAAO,SAAQ,oBAAoB;IACnD,OAAO,CAAC,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,aAAa,GAAG,eAAe,GAAG,oBAAoB,CAAC;IAC7H,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Button/iProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,MAAO,SAAQ,oBAAoB;IACnD,OAAO,CAAC,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,aAAa,GAAG,eAAe,GAAG,oBAAoB,CAAC;IAC7H,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
export let name: iProps['name'] = "icon-contrast";
|
|
5
5
|
export let color: iProps['color'] = "inherit";
|
|
6
6
|
export let size: iProps['size'] = "inherit";
|
|
7
|
+
export let customStyles: iProps['customStyles'] = '';
|
|
8
|
+
export let customClass: iProps['customClass'] = '';
|
|
7
9
|
|
|
8
10
|
</script>
|
|
9
11
|
|
|
@@ -14,10 +16,12 @@
|
|
|
14
16
|
- `name`: one of the .icon classes suggested by the component.
|
|
15
17
|
- `color?`: Any color style (ex. #000).
|
|
16
18
|
- `size?`: Any size style (ex. 1rem).
|
|
19
|
+
- `customClass?`: string
|
|
20
|
+
- `customStyles?`: any CSS style
|
|
17
21
|
-->
|
|
18
22
|
|
|
19
23
|
<i
|
|
20
24
|
{...$$restProps}
|
|
21
|
-
class={`${name}`}
|
|
22
|
-
style={`color:${color};font-size:${size}
|
|
25
|
+
class={[`${name}`, `${customClass}`].join(' ')}
|
|
26
|
+
style={[`color:${color};font-size:${size};line-height:1;`, `${customStyles}`].join(' ')}
|
|
23
27
|
></i>
|
|
@@ -19,12 +19,16 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
19
19
|
* - `name`: one of the .icon classes suggested by the component.
|
|
20
20
|
* - `color?`: Any color style (ex. #000).
|
|
21
21
|
* - `size?`: Any size style (ex. 1rem).
|
|
22
|
+
* - `customClass?`: string
|
|
23
|
+
* - `customStyles?`: any CSS style
|
|
22
24
|
*/
|
|
23
25
|
declare const Icon: $$__sveltets_2_IsomorphicComponent<{
|
|
24
26
|
[x: string]: any;
|
|
25
27
|
name?: iProps["name"] | undefined;
|
|
26
28
|
color?: string | undefined;
|
|
27
29
|
size?: string | undefined;
|
|
30
|
+
customStyles?: string | undefined;
|
|
31
|
+
customClass?: string | undefined;
|
|
28
32
|
}, {
|
|
29
33
|
[evt: string]: CustomEvent<any>;
|
|
30
34
|
}, {}, {}, string>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Icons/Icon.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Icon.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Icons/Icon.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,aAAa,CAAC;AAkB1C,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;;;;;;;;;GASG;AACH,QAAA,MAAM,IAAI;;WApBkH,MAAM,CAAC,MAAM,CAAC;;;;;;;kBAoB1B,CAAC;AAC/F,KAAK,IAAI,GAAG,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AACxC,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Icons/iProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,WAAW,MAAO,SAAQ,mBAAmB;IAC/C,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Icons/iProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAEtE,MAAM,WAAW,MAAO,SAAQ,mBAAmB;IAC/C,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
package/dist/do-theme/button.css
CHANGED
|
@@ -36,8 +36,13 @@
|
|
|
36
36
|
border-radius: 3rem;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
.btn-circle {
|
|
40
|
+
border-radius: var(--radius-circle);
|
|
41
|
+
}
|
|
42
|
+
|
|
39
43
|
.do-btn:disabled {
|
|
40
44
|
opacity: 40%;
|
|
45
|
+
pointer-events: none;
|
|
41
46
|
}
|
|
42
47
|
|
|
43
48
|
.do-btn-primary {
|
|
@@ -130,6 +135,22 @@
|
|
|
130
135
|
animation: rotation 1s linear infinite;
|
|
131
136
|
}
|
|
132
137
|
|
|
138
|
+
.do-chip-primary {
|
|
139
|
+
color: var(--do-chip-content);
|
|
140
|
+
background-color: var(--do-chip-bg);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.do-chip-btn-primary {
|
|
144
|
+
color: var(--do-chip-content);
|
|
145
|
+
background-color: var(--do-chip-bg);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.do-chip-primary:hover,
|
|
149
|
+
.do-chip-primary:focus {
|
|
150
|
+
color: var(--do-chip-content-hover);
|
|
151
|
+
background-color: var(--do-chip-bg-hover);
|
|
152
|
+
}
|
|
153
|
+
|
|
133
154
|
@keyframes rotation {
|
|
134
155
|
0% {
|
|
135
156
|
transform: rotate(0deg);
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
--color-tertiary: #eff6ff;
|
|
5
5
|
--color-accent: #1d4ed8;
|
|
6
6
|
|
|
7
|
+
/*buttons variables*/
|
|
7
8
|
--do-color-primary: #27272a;
|
|
8
9
|
--do-color-primary-content: #fafafa;
|
|
9
10
|
--do-color-primary-hover: #F4F4F5;
|
|
@@ -39,6 +40,13 @@
|
|
|
39
40
|
--do-color-link-secondary-content: none;
|
|
40
41
|
--do-color-link-secondary-hover: #1D4ED8;
|
|
41
42
|
|
|
43
|
+
/*chip colors*/
|
|
44
|
+
--do-chip-content: #FAFAFA;
|
|
45
|
+
--do-chip-bg: #71717A;
|
|
46
|
+
--do-chip-content-hover: #FAFAFA;
|
|
47
|
+
--do-chip-bg-hover: #27272A;
|
|
48
|
+
|
|
49
|
+
|
|
42
50
|
|
|
43
51
|
/* base sizes */
|
|
44
52
|
--size-selector: 0.25rem;
|
|
@@ -48,6 +56,7 @@
|
|
|
48
56
|
--radius-selector: 0.25rem;
|
|
49
57
|
--radius-field: 0.25rem;
|
|
50
58
|
--radius-box: 0.25rem;
|
|
59
|
+
--radius-circle: 50%;
|
|
51
60
|
|
|
52
61
|
/*styles*/
|
|
53
62
|
--do-text-base: #27272a;
|
|
@@ -1,45 +1,53 @@
|
|
|
1
|
-
:root,
|
|
1
|
+
:root,
|
|
2
|
+
[data-do-theme='light'] {
|
|
2
3
|
--color-primary: #fafafa;
|
|
3
4
|
--color-secondary: #27272a;
|
|
4
|
-
--color-accent: #
|
|
5
|
-
--color-tertiary: #1d4ed8;
|
|
5
|
+
--color-accent: #dbeafe;
|
|
6
|
+
--color-tertiary: #1d4ed8;
|
|
6
7
|
|
|
8
|
+
/*buttons variables*/
|
|
7
9
|
--do-color-primary: #fafafa;
|
|
8
|
-
--do-color-primary-content: #
|
|
9
|
-
--do-color-primary-border: #
|
|
10
|
-
--do-color-primary-hover: #
|
|
10
|
+
--do-color-primary-content: #18181b;
|
|
11
|
+
--do-color-primary-border: #f4f4f5;
|
|
12
|
+
--do-color-primary-hover: #d4d4d8;
|
|
11
13
|
--do-color-primary-content-hover: #27272a;
|
|
12
14
|
--do-color-primary-border-hover: #e4e4e7;
|
|
13
15
|
|
|
14
16
|
--do-color-secondary: #27272a;
|
|
15
17
|
--do-color-secondary-content: #fafafa;
|
|
16
|
-
--do-color-secondary-border: #
|
|
17
|
-
--do-color-secondary-hover: #
|
|
18
|
+
--do-color-secondary-border: #52525b;
|
|
19
|
+
--do-color-secondary-hover: #52525b;
|
|
18
20
|
--do-color-secondary-content-hover: #fafafa;
|
|
19
21
|
--do-color-secondary-border-hover: #71717a;
|
|
20
22
|
|
|
21
|
-
--do-color-tertiary: #
|
|
23
|
+
--do-color-tertiary: #1e40af;
|
|
22
24
|
--do-color-tertiary-content: #eff6ff;
|
|
23
|
-
--do-color-tertiary-border: #
|
|
24
|
-
--do-color-tertiary-hover: #
|
|
25
|
-
--do-color-tertiary-hover-content: #
|
|
26
|
-
--do-color-tertiary-hover-border: #
|
|
27
|
-
|
|
25
|
+
--do-color-tertiary-border: #1d4ed8;
|
|
26
|
+
--do-color-tertiary-hover: #eff6ff;
|
|
27
|
+
--do-color-tertiary-hover-content: #1e40af;
|
|
28
|
+
--do-color-tertiary-hover-border: #dbeafe;
|
|
29
|
+
|
|
28
30
|
--do-color-accent: #eff6ff;
|
|
29
31
|
--do-color-accent-content: #1d4ed8;
|
|
30
|
-
--do-color-accent-border: #
|
|
31
|
-
--do-color-accent-hover: #
|
|
32
|
-
--do-color-accent-hover-content: #
|
|
33
|
-
--do-color-accent-hover-border: #
|
|
32
|
+
--do-color-accent-border: #dbeafe;
|
|
33
|
+
--do-color-accent-hover: #dbeafe;
|
|
34
|
+
--do-color-accent-hover-content: #1e40af;
|
|
35
|
+
--do-color-accent-hover-border: #dbeafe;
|
|
34
36
|
|
|
35
|
-
--do-color-link: #
|
|
37
|
+
--do-color-link: #27272a;
|
|
36
38
|
--do-color-link-content: none;
|
|
37
|
-
--do-color-link-hover-content: #
|
|
39
|
+
--do-color-link-hover-content: #18181b;
|
|
38
40
|
--do-color-link-hover-border: rgba(0, 0, 0, 0.2);
|
|
39
41
|
|
|
40
42
|
--do-color-link-secondary: #1d4ed8;
|
|
41
43
|
--do-color-link-secondary-content: none;
|
|
42
|
-
--do-color-link-secondary-hover: #
|
|
44
|
+
--do-color-link-secondary-hover: #eff6ff;
|
|
45
|
+
|
|
46
|
+
/*chip variables*/
|
|
47
|
+
--do-chip-content: #3f3f46;
|
|
48
|
+
--do-chip-bg: #fafafa;
|
|
49
|
+
--do-chip-content-hover: #fafafa;
|
|
50
|
+
--do-chip-bg-hover: #27272a;
|
|
43
51
|
|
|
44
52
|
/* base sizes */
|
|
45
53
|
--size-selector: 0.25rem;
|
|
@@ -49,6 +57,7 @@
|
|
|
49
57
|
--radius-selector: 0.25rem;
|
|
50
58
|
--radius-field: 0.25rem;
|
|
51
59
|
--radius-box: 0.25rem;
|
|
60
|
+
--radius-circle: 50%;
|
|
52
61
|
|
|
53
62
|
/*styles*/
|
|
54
63
|
--do-text-base: #27272a;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import IconButton from '../IconButton/IconButton.svelte';
|
|
3
|
+
import type { iProps } from './iProps.ts';
|
|
4
|
+
|
|
5
|
+
export let label: iProps['label'] = 'Label';
|
|
6
|
+
export let iconName: iProps['iconName'] = 'icon-close';
|
|
7
|
+
export let containerCustomClass: iProps['containerCustomClass'] = '';
|
|
8
|
+
export let containerCustomStyles: iProps['containerCustomStyles'] = '';
|
|
9
|
+
export let iCustomStyles: iProps['iCustomStyles'] = '';
|
|
10
|
+
export let iCustomClass: iProps['iCustomClass'] = '';
|
|
11
|
+
export let btnCustomClass: iProps['btnCustomClass'] = '';
|
|
12
|
+
export let btnCustomStyles: iProps['btnCustomStyles'] = '';
|
|
13
|
+
export let labelStyles: iProps['labelStyles'] = '';
|
|
14
|
+
export let labelClass: iProps['labelClass'] = '';
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<!-- @component
|
|
18
|
+
```Svelte
|
|
19
|
+
<Chip label={label} iconName={iconName} />
|
|
20
|
+
```
|
|
21
|
+
- `label`: string
|
|
22
|
+
- `iconName`: one of the .icon classes suggested by the component.
|
|
23
|
+
- `containerCustomClass?`: string
|
|
24
|
+
- `containerCustomStyles?`: any CSS style
|
|
25
|
+
- `iCustomClass?`: string
|
|
26
|
+
- `iCustomStyles?`: any CSS style
|
|
27
|
+
- `btnCustomClass?`: string
|
|
28
|
+
- `btnCustomStyles?`: any CSS style
|
|
29
|
+
- `labelStyles?`: any CSS style
|
|
30
|
+
- `labelClass?`: string
|
|
31
|
+
-->
|
|
32
|
+
|
|
33
|
+
<div
|
|
34
|
+
class={[`do-chip-primary`, `${containerCustomClass}`].join(' ')}
|
|
35
|
+
style={[
|
|
36
|
+
`display: inline-flex; padding: 6px 10px; align-items: center; gap: 4px; border-radius: 24px; border: 1px solid var(--Zinc-400, #A1A1AA);`,
|
|
37
|
+
`${containerCustomStyles}`
|
|
38
|
+
].join(' ')}
|
|
39
|
+
>
|
|
40
|
+
<span class={labelClass} style={[`padding-left: 10px`, `${labelStyles}`].join(' ')}>{label}</span>
|
|
41
|
+
<IconButton
|
|
42
|
+
{...$$restProps}
|
|
43
|
+
{iconName}
|
|
44
|
+
circle
|
|
45
|
+
on:click
|
|
46
|
+
btnCustomClass={[`do-chip-btn-primary`, `${btnCustomClass}`].join(' ')}
|
|
47
|
+
btnCustomStyles={btnCustomStyles}
|
|
48
|
+
iCustomClass={iCustomClass}
|
|
49
|
+
iCustomStyles={iCustomStyles}
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { iProps } from './iProps.ts';
|
|
2
|
+
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> {
|
|
3
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
4
|
+
$$bindings?: Bindings;
|
|
5
|
+
} & Exports;
|
|
6
|
+
(internal: unknown, props: Props & {
|
|
7
|
+
$$events?: Events;
|
|
8
|
+
$$slots?: Slots;
|
|
9
|
+
}): Exports & {
|
|
10
|
+
$set?: any;
|
|
11
|
+
$on?: any;
|
|
12
|
+
};
|
|
13
|
+
z_$$bindings?: Bindings;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* ```Svelte
|
|
17
|
+
* <Chip label={label} iconName={iconName} />
|
|
18
|
+
* ```
|
|
19
|
+
* - `label`: string
|
|
20
|
+
* - `iconName`: one of the .icon classes suggested by the component.
|
|
21
|
+
* - `containerCustomClass?`: string
|
|
22
|
+
* - `containerCustomStyles?`: any CSS style
|
|
23
|
+
* - `iCustomClass?`: string
|
|
24
|
+
* - `iCustomStyles?`: any CSS style
|
|
25
|
+
* - `btnCustomClass?`: string
|
|
26
|
+
* - `btnCustomStyles?`: any CSS style
|
|
27
|
+
* - `labelStyles?`: any CSS style
|
|
28
|
+
* - `labelClass?`: string
|
|
29
|
+
*/
|
|
30
|
+
declare const ActionChip: $$__sveltets_2_IsomorphicComponent<{
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
label?: iProps["label"] | undefined;
|
|
33
|
+
iconName?: iProps["iconName"] | undefined;
|
|
34
|
+
containerCustomClass?: string | undefined;
|
|
35
|
+
containerCustomStyles?: string | undefined;
|
|
36
|
+
iCustomStyles?: string | undefined;
|
|
37
|
+
iCustomClass?: string | undefined;
|
|
38
|
+
btnCustomClass?: string | undefined;
|
|
39
|
+
btnCustomStyles?: string | undefined;
|
|
40
|
+
labelStyles?: string | undefined;
|
|
41
|
+
labelClass?: string | undefined;
|
|
42
|
+
}, {
|
|
43
|
+
click: MouseEvent;
|
|
44
|
+
} & {
|
|
45
|
+
[evt: string]: CustomEvent<any>;
|
|
46
|
+
}, {}, {}, string>;
|
|
47
|
+
type ActionChip = InstanceType<typeof ActionChip>;
|
|
48
|
+
export default ActionChip;
|
|
49
|
+
//# sourceMappingURL=ActionChip.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionChip.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/Chip/ActionChip.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA8B1C,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;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,UAAU;;YAzBgU,MAAM,CAAC,OAAO,CAAC;eAAa,MAAM,CAAC,UAAU,CAAC;;;;;;;;;;;;;kBAyBxQ,CAAC;AACrG,KAAK,UAAU,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { IconNames } from "../../do-theme/icomoon/iconList.ts";
|
|
2
|
+
import type { HTMLButtonAttributes } from "svelte/elements";
|
|
3
|
+
export interface iProps extends HTMLButtonAttributes {
|
|
4
|
+
label: string;
|
|
5
|
+
iconName: IconNames;
|
|
6
|
+
containerCustomClass?: string;
|
|
7
|
+
containerCustomStyles?: string;
|
|
8
|
+
iCustomClass?: string;
|
|
9
|
+
iCustomStyles?: string;
|
|
10
|
+
btnCustomClass?: string;
|
|
11
|
+
btnCustomStyles?: string;
|
|
12
|
+
labelStyles?: string;
|
|
13
|
+
labelClass?: string;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=iProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/Chip/iProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,MAAO,SAAQ,oBAAoB;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
export let iconColor: iProps['iconColor'] = 'inherit';
|
|
13
13
|
export let iconPosition: iProps['iconPosition'] = 'end';
|
|
14
14
|
export let rounded: iProps['rounded'] = false;
|
|
15
|
+
export let circle: iProps['circle'] = false;
|
|
16
|
+
export let btnCustomClass: iProps['btnCustomClass'] = '';
|
|
17
|
+
export let iCustomClass: iProps['iCustomClass'] = '';
|
|
18
|
+
export let btnCustomStyles: iProps['btnCustomStyles'] = '';
|
|
19
|
+
export let iCustomStyles: iProps['iCustomStyles'] = '';
|
|
15
20
|
</script>
|
|
16
21
|
|
|
17
22
|
<!-- @component
|
|
@@ -28,18 +33,40 @@
|
|
|
28
33
|
- `iconSize?`: rem units
|
|
29
34
|
- `iconColor?`: hex units #000
|
|
30
35
|
- `iconPosition?`: 'start' | 'end'
|
|
36
|
+
- `circle?`: boolean
|
|
37
|
+
- `btnCustomClass?`: string
|
|
38
|
+
- `iCustomClass?`: string
|
|
39
|
+
- `btnCustomStyles?`: any CSS style
|
|
40
|
+
- `iCustomStyles?`: any CSS style
|
|
31
41
|
```
|
|
32
42
|
-->
|
|
33
43
|
|
|
34
|
-
<Button
|
|
44
|
+
<Button
|
|
45
|
+
{...$$restProps}
|
|
46
|
+
{variant}
|
|
47
|
+
{size}
|
|
48
|
+
{disabled}
|
|
49
|
+
{rounded}
|
|
50
|
+
{circle}
|
|
51
|
+
customClass={btnCustomClass}
|
|
52
|
+
customStyles={btnCustomStyles}
|
|
53
|
+
on:click
|
|
54
|
+
>
|
|
35
55
|
{#if loading}
|
|
36
|
-
<i class="icon-loading do-loader" style={iconPosition === 'start' ? 'order:1;' : 'order:2;'}
|
|
56
|
+
<i class="icon-loading do-loader" style={iconPosition === 'start' ? 'order:1;' : 'order:2;'}
|
|
57
|
+
></i>
|
|
37
58
|
{:else}
|
|
38
|
-
<div class="do-btn__icon" style=
|
|
39
|
-
<Icon
|
|
59
|
+
<div class="do-btn__icon" style={`${iconPosition === 'start' ? 'order:1;' : 'order:2;'}`}>
|
|
60
|
+
<Icon
|
|
61
|
+
name={iconName}
|
|
62
|
+
size={iconSize}
|
|
63
|
+
color={iconColor}
|
|
64
|
+
customClass={iCustomClass}
|
|
65
|
+
customStyles={iCustomStyles}
|
|
66
|
+
/>
|
|
40
67
|
</div>
|
|
41
68
|
{/if}
|
|
42
69
|
{#if label}
|
|
43
70
|
<span style={iconPosition === 'start' ? 'order:2;' : 'order:1;'}>{label}</span>
|
|
44
71
|
{/if}
|
|
45
|
-
</Button>
|
|
72
|
+
</Button>
|
|
@@ -26,6 +26,11 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
26
26
|
* - `iconSize?`: rem units
|
|
27
27
|
* - `iconColor?`: hex units #000
|
|
28
28
|
* - `iconPosition?`: 'start' | 'end'
|
|
29
|
+
* - `circle?`: boolean
|
|
30
|
+
* - `btnCustomClass?`: string
|
|
31
|
+
* - `iCustomClass?`: string
|
|
32
|
+
* - `btnCustomStyles?`: any CSS style
|
|
33
|
+
* - `iCustomStyles?`: any CSS style
|
|
29
34
|
* ```
|
|
30
35
|
*/
|
|
31
36
|
declare const IconButton: $$__sveltets_2_IsomorphicComponent<{
|
|
@@ -40,6 +45,11 @@ declare const IconButton: $$__sveltets_2_IsomorphicComponent<{
|
|
|
40
45
|
iconColor?: string | undefined;
|
|
41
46
|
iconPosition?: "start" | "end" | undefined;
|
|
42
47
|
rounded?: boolean | undefined;
|
|
48
|
+
circle?: boolean | undefined;
|
|
49
|
+
btnCustomClass?: string | undefined;
|
|
50
|
+
iCustomClass?: string | undefined;
|
|
51
|
+
btnCustomStyles?: string | undefined;
|
|
52
|
+
iCustomStyles?: string | undefined;
|
|
43
53
|
}, {
|
|
44
54
|
click: MouseEvent;
|
|
45
55
|
} & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/IconButton/IconButton.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"IconButton.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/IconButton/IconButton.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAwC1C,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;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,QAAA,MAAM,UAAU;;;;;;;eA/Bif,MAAM,CAAC,UAAU,CAAC;;;;;;;;;;;;;;kBA+B7Z,CAAC;AACrG,KAAK,UAAU,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,CAAC;AACpD,eAAe,UAAU,CAAC"}
|
|
@@ -11,5 +11,11 @@ export interface iProps extends HTMLButtonAttributes {
|
|
|
11
11
|
iconColor?: string;
|
|
12
12
|
iconPosition?: 'start' | 'end';
|
|
13
13
|
rounded?: boolean;
|
|
14
|
+
circle?: boolean;
|
|
15
|
+
customClass?: string;
|
|
16
|
+
btnCustomClass?: string;
|
|
17
|
+
iCustomClass?: string;
|
|
18
|
+
btnCustomStyles?: string;
|
|
19
|
+
iCustomStyles?: string;
|
|
14
20
|
}
|
|
15
21
|
//# sourceMappingURL=iProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/IconButton/iProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,MAAO,SAAQ,oBAAoB;IACnD,OAAO,CAAC,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,aAAa,GAAG,eAAe,CAAC;IACtG,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/molecules/IconButton/iProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,MAAO,SAAQ,oBAAoB;IACnD,OAAO,CAAC,EAAE,gBAAgB,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,aAAa,GAAG,eAAe,CAAC;IACtG,IAAI,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IAC/C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IAC/B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;CACvB"}
|