do-ui-design-system 1.0.11 → 1.0.12

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 (50) hide show
  1. package/dist/atoms/Badge/Badge.svelte +47 -36
  2. package/dist/atoms/Badge/Badge.svelte.d.ts +22 -16
  3. package/dist/atoms/Badge/Badge.svelte.d.ts.map +1 -1
  4. package/dist/atoms/Badge/iProps.d.ts +8 -3
  5. package/dist/atoms/Badge/iProps.d.ts.map +1 -1
  6. package/dist/atoms/Button/Button.svelte +84 -31
  7. package/dist/atoms/Button/Button.svelte.d.ts +37 -46
  8. package/dist/atoms/Button/Button.svelte.d.ts.map +1 -1
  9. package/dist/atoms/Button/iProps.d.ts +12 -6
  10. package/dist/atoms/Button/iProps.d.ts.map +1 -1
  11. package/dist/atoms/Card/Card.svelte +18 -5
  12. package/dist/atoms/Card/Card.svelte.d.ts +5 -2
  13. package/dist/atoms/Card/Card.svelte.d.ts.map +1 -1
  14. package/dist/atoms/Card/iProps.d.ts +1 -0
  15. package/dist/atoms/Card/iProps.d.ts.map +1 -1
  16. package/dist/atoms/Chip/Chip.svelte +71 -0
  17. package/dist/atoms/Chip/Chip.svelte.d.ts +35 -0
  18. package/dist/atoms/Chip/Chip.svelte.d.ts.map +1 -0
  19. package/dist/atoms/Chip/iProps.d.ts +12 -0
  20. package/dist/atoms/Chip/iProps.d.ts.map +1 -0
  21. package/dist/atoms/Icons/Icon.svelte +44 -14
  22. package/dist/atoms/Icons/Icon.svelte.d.ts +29 -32
  23. package/dist/atoms/Icons/Icon.svelte.d.ts.map +1 -1
  24. package/dist/atoms/Icons/iProps.d.ts +9 -3
  25. package/dist/atoms/Icons/iProps.d.ts.map +1 -1
  26. package/dist/atoms/Icons/iProps.js +1 -1
  27. package/dist/atoms/index.d.ts +6 -5
  28. package/dist/atoms/index.d.ts.map +1 -1
  29. package/dist/atoms/index.js +6 -5
  30. package/dist/do-theme/badge.css +8 -52
  31. package/dist/do-theme/button.css +13 -0
  32. package/dist/do-theme/chip.css +67 -0
  33. package/dist/do-theme/index.css +1 -1
  34. package/dist/do-theme/var-dark.css +19 -17
  35. package/dist/do-theme/var-light.css +22 -20
  36. package/dist/index.d.ts +3 -3
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +3 -3
  39. package/dist/molecules/ActionChip/ActionChip.svelte.d.ts +1 -1
  40. package/dist/molecules/IconButton/IconButton.svelte.d.ts +1 -1
  41. package/dist/molecules/index.d.ts +1 -2
  42. package/dist/molecules/index.d.ts.map +1 -1
  43. package/dist/molecules/index.js +1 -2
  44. package/package.json +1 -1
  45. package/dist/atoms/Counter/Counter.svelte +0 -15
  46. package/dist/atoms/Counter/Counter.svelte.d.ts +0 -29
  47. package/dist/atoms/Counter/Counter.svelte.d.ts.map +0 -1
  48. package/dist/atoms/Counter/iProps.d.ts +0 -4
  49. package/dist/atoms/Counter/iProps.d.ts.map +0 -1
  50. /package/dist/atoms/{Counter → Chip}/iProps.js +0 -0
@@ -0,0 +1,35 @@
1
+ import type { Snippet } from 'svelte';
2
+ import type { iProps } from './iProps.ts';
3
+ type $$ComponentProps = {
4
+ label?: iProps['label'];
5
+ ariaLabel?: iProps['ariaLabel'];
6
+ role?: iProps['role'];
7
+ tabIndex?: iProps['tabIndex'];
8
+ id?: iProps['id'];
9
+ maxLength?: iProps['maxLength'];
10
+ variant?: iProps['variant'];
11
+ customClass?: iProps['customClass'];
12
+ dataTestId?: iProps['dataTestId'];
13
+ children?: Snippet;
14
+ };
15
+ /**
16
+ * Chip
17
+ * ```Svelte
18
+ * <Chip label={label} aria-label={ariaLabel} role={role} tabindex={tabIndex} id={id} maxLength={maxLength} variant={variant} customClass={customClass} data-testid={dataTestId}>
19
+ * {@render children()} // render custom content inside Chip tags
20
+ * </Chip>
21
+ * ```
22
+ * - `label?`: string
23
+ * - `ariaLabel?`: string
24
+ * - `role?`: 'status' | 'note' | 'button'
25
+ * - `tabIndex?`: -1 | 0 | number
26
+ * - `id?`: string
27
+ * - `maxLength?`: number | null - max length of the text, if exceeded it will be truncated and "…" will be added
28
+ * - `variant?`: 'do-chip-primary' | 'do-chip-secondary' | 'do-chip-accent'
29
+ * - `customClass?`: string - additional custom class for styling
30
+ * - `dataTestId?`: string
31
+ */
32
+ declare const Chip: import("svelte").Component<$$ComponentProps, {}, "">;
33
+ type Chip = ReturnType<typeof Chip>;
34
+ export default Chip;
35
+ //# sourceMappingURL=Chip.svelte.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Chip.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Chip/Chip.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEzC,KAAK,gBAAgB,GAAI;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;IACpC,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAwCH;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,IAAI,sDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface iProps {
2
+ label?: string;
3
+ ariaLabel?: string;
4
+ role?: 'status' | 'note' | 'button';
5
+ tabIndex?: -1 | 0 | number;
6
+ id?: string;
7
+ maxLength?: number | null | undefined;
8
+ variant?: 'do-chip-primary' | 'do-chip-secondary' | 'do-chip-accent';
9
+ customClass?: string;
10
+ dataTestId?: string;
11
+ }
12
+ //# sourceMappingURL=iProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iProps.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Chip/iProps.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IACpC,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,OAAO,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,gBAAgB,CAAC;IACrE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -1,27 +1,57 @@
1
1
  <script lang="ts">
2
- import { type iProps } from "./iProps.ts";
2
+ import type { iProps } from './iProps.ts';
3
3
 
4
- export let name: iProps['name'] = "icon-contrast";
5
- export let color: iProps['color'] = "inherit";
6
- export let size: iProps['size'] = "inherit";
7
- export let customStyles: iProps['customStyles'] = '';
8
- export let customClass: iProps['customClass'] = '';
4
+ let {
5
+ name = 'icon-contrast',
6
+ color = 'inherit',
7
+ size = 'inherit',
8
+ ariaHidden,
9
+ role,
10
+ ariaLabel,
11
+ title,
12
+ tabIndex,
13
+ id,
14
+ customStyles,
15
+ customClass
16
+ }: {
17
+ name: iProps['name'];
18
+ color?: iProps['color'];
19
+ size?: iProps['size'];
20
+ ariaHidden?: iProps['ariaHidden'];
21
+ role?: iProps['role'];
22
+ ariaLabel?: iProps['ariaLabel'];
23
+ title?: iProps['title'];
24
+ tabIndex?: iProps['tabIndex'];
25
+ id?: iProps['id'];
26
+ customStyles?: iProps['customStyles'];
27
+ customClass?: iProps['customClass'];
28
+ } = $props();
29
+ </script>
9
30
 
10
- </script>
11
-
12
- <!-- @component
31
+ <!-- @component
13
32
  ```Svelte
14
33
  <Icon name={icon} color?={color} size?={size}/>
15
34
  ```
16
35
  - `name`: one of the .icon classes suggested by the component.
17
36
  - `color?`: Any color style (ex. #000).
18
37
  - `size?`: Any size style (ex. 1rem).
38
+ - `ariaHidden?`: boolean
39
+ - `role?`: 'img' | 'presentation' | 'none'
40
+ - `ariaLabel?`: string
41
+ - `title?`: string
42
+ - `tabIndex?`: -1 | 0 | number
43
+ - `id?`: string
19
44
  - `customClass?`: string
20
45
  - `customStyles?`: any CSS style
21
46
  -->
22
47
 
23
- <i
24
- {...$$restProps}
25
- class={[`${name}`, `${customClass}`].join(' ')}
26
- style={[`color:${color};font-size:${size};line-height:1;`, `${customStyles}`].join(' ')}
27
- ></i>
48
+ <i
49
+ aria-hidden={ariaHidden}
50
+ {role}
51
+ aria-label={ariaLabel}
52
+ {title}
53
+ {...tabIndex === 0 ? { tabindex: 0 } : {}}
54
+ {id}
55
+ class={[`${name}`, `${customClass}`].join(' ')}
56
+ style={[`color:${color};font-size:${size};line-height:1;`, `${customStyles}`].join(' ')}
57
+ ></i>
@@ -1,37 +1,34 @@
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
- }
1
+ import type { iProps } from './iProps.ts';
2
+ type $$ComponentProps = {
3
+ name: iProps['name'];
4
+ color?: iProps['color'];
5
+ size?: iProps['size'];
6
+ ariaHidden?: iProps['ariaHidden'];
7
+ role?: iProps['role'];
8
+ ariaLabel?: iProps['ariaLabel'];
9
+ title?: iProps['title'];
10
+ tabIndex?: iProps['tabIndex'];
11
+ id?: iProps['id'];
12
+ customStyles?: iProps['customStyles'];
13
+ customClass?: iProps['customClass'];
14
+ };
15
15
  /**
16
16
  * ```Svelte
17
- * <Icon name={icon} color?={color} size?={size}/>
18
- * ```
19
- * - `name`: one of the .icon classes suggested by the component.
20
- * - `color?`: Any color style (ex. #000).
21
- * - `size?`: Any size style (ex. 1rem).
22
- * - `customClass?`: string
23
- * - `customStyles?`: any CSS style
17
+ * <Icon name={icon} color?={color} size?={size}/>
18
+ * ```
19
+ * - `name`: one of the .icon classes suggested by the component.
20
+ * - `color?`: Any color style (ex. #000).
21
+ * - `size?`: Any size style (ex. 1rem).
22
+ * - `ariaHidden?`: boolean
23
+ * - `role?`: 'img' | 'presentation' | 'none'
24
+ * - `ariaLabel?`: string
25
+ * - `title?`: string
26
+ * - `tabIndex?`: -1 | 0 | number
27
+ * - `id?`: string
28
+ * - `customClass?`: string
29
+ * - `customStyles?`: any CSS style
24
30
  */
25
- declare const Icon: $$__sveltets_2_IsomorphicComponent<{
26
- [x: string]: any;
27
- name?: iProps["name"] | undefined;
28
- color?: string | undefined;
29
- size?: string | undefined;
30
- customStyles?: string | undefined;
31
- customClass?: string | undefined;
32
- }, {
33
- [evt: string]: CustomEvent<any>;
34
- }, {}, {}, string>;
35
- type Icon = InstanceType<typeof Icon>;
31
+ declare const Icon: import("svelte").Component<$$ComponentProps, {}, "">;
32
+ type Icon = ReturnType<typeof Icon>;
36
33
  export default Icon;
37
34
  //# sourceMappingURL=Icon.svelte.d.ts.map
@@ -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;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
+ {"version":3,"file":"Icon.svelte.d.ts","sourceRoot":"","sources":["../../../src/lib/atoms/Icons/Icon.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEzC,KAAK,gBAAgB,GAAI;IACxB,IAAI,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC,cAAc,CAAC,CAAC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC,aAAa,CAAC,CAAC;CACpC,CAAC;AAyBH;;;;;;;;;;;;;;;GAeG;AACH,QAAA,MAAM,IAAI,sDAAwC,CAAC;AACnD,KAAK,IAAI,GAAG,UAAU,CAAC,OAAO,IAAI,CAAC,CAAC;AACpC,eAAe,IAAI,CAAC"}
@@ -1,9 +1,15 @@
1
- import type { HTMLLabelAttributes } from "svelte/elements";
2
- import { type IconNames } from "./../../do-theme/icomoon/iconList.ts";
1
+ import type { HTMLLabelAttributes } from 'svelte/elements';
2
+ import { type IconNames } from './../../do-theme/icomoon/iconList.ts';
3
3
  export interface iProps extends HTMLLabelAttributes {
4
- name: IconNames | "";
4
+ name: IconNames | '';
5
5
  color?: string;
6
6
  size?: string;
7
+ ariaHidden?: boolean;
8
+ role?: 'img' | 'presentation' | 'none';
9
+ ariaLabel?: string;
10
+ title?: string;
11
+ tabIndex?: -1 | 0 | number;
12
+ id?: string;
7
13
  customClass?: string;
8
14
  customStyles?: string;
9
15
  }
@@ -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;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
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;IAClD,IAAI,EAAE,SAAS,GAAG,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,GAAG,cAAc,GAAG,MAAM,CAAC;IACvC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -1 +1 @@
1
- import {} from "./../../do-theme/icomoon/iconList.ts";
1
+ import {} from './../../do-theme/icomoon/iconList.ts';
@@ -1,6 +1,7 @@
1
- import Button from "./Button/Button.svelte";
2
- import Icon from "./Icons/Icon.svelte";
3
- import Badge from "./Badge/Badge.svelte";
4
- import Counter from "./Counter/Counter.svelte";
5
- export { Button, Icon, Badge, Counter };
1
+ import Badge from './Badge/Badge.svelte';
2
+ import Button from './Button/Button.svelte';
3
+ import Card from './Card/Card.svelte';
4
+ import Chip from './Chip/Chip.svelte';
5
+ import Icon from './Icons/Icon.svelte';
6
+ export { Card, Chip, Badge, Button, Icon };
6
7
  //# 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;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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/atoms/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,sBAAsB,CAAC;AACzC,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC"}
@@ -1,5 +1,6 @@
1
- import Button from "./Button/Button.svelte";
2
- import Icon from "./Icons/Icon.svelte";
3
- import Badge from "./Badge/Badge.svelte";
4
- import Counter from "./Counter/Counter.svelte";
5
- export { Button, Icon, Badge, Counter };
1
+ import Badge from './Badge/Badge.svelte';
2
+ import Button from './Button/Button.svelte';
3
+ import Card from './Card/Card.svelte';
4
+ import Chip from './Chip/Chip.svelte';
5
+ import Icon from './Icons/Icon.svelte';
6
+ export { Card, Chip, Badge, Button, Icon };
@@ -1,67 +1,23 @@
1
- .do-badge--wrapper {
2
- position: relative;
3
- display: inline-block;
4
- }
5
-
6
1
  .do-badge {
7
2
  display: inline-flex;
8
- padding: 6px 10px;
3
+ padding: 2px 6px;
4
+ flex-direction: column;
9
5
  justify-content: center;
10
6
  align-items: center;
11
- border: 1px solid;
12
- gap: 4px;
13
- border-radius: 24px;
7
+ border-radius: 48px;
14
8
  font-size: 12px;
15
9
  font-style: normal;
16
- font-weight: 500;
10
+ font-weight: 400;
17
11
  line-height: normal;
18
- white-space: nowrap;
19
- }
20
-
21
- .do-badge__tooltip {
22
- position: absolute;
23
- top: 100%;
24
- left: 0;
25
- background: var(--do-badge-tooltip-bg);
26
- color: var(--do-badge-tooltip-content);
27
- font-size: 12px;
28
- padding: 4px 8px;
29
- border-radius: 4px;
30
- white-space: nowrap;
31
- margin-top: 4px;
32
- opacity: 0;
33
- pointer-events: none;
34
- transition: opacity 0.2s ease-in-out;
35
- z-index: 10;
36
- }
37
-
38
- .do-badge--wrapper:hover .do-badge__tooltip {
39
- opacity: 1;
40
- pointer-events: auto;
12
+ align-self: stretch;
41
13
  }
42
14
 
43
15
  .do-badge-primary {
44
- color: var(--do-badge-primary-content);
45
- border-color: var(--do-badge-primary-border);
46
- background-color: var(--do-badge-primary-bg);
47
- }
48
-
49
- .do-badge-primary:hover,
50
- .do-badge-primary:focus {
51
- color: var(--do-badge-primary-hover-content);
52
- border-color: var(--do-badge-primary-border);
53
- background-color: var(--do-badge-primary-hover-bg);
16
+ color: var(--do-badge-primary-content);
17
+ background-color: var(--do-badge-primary-bg);
54
18
  }
55
19
 
56
20
  .do-badge-accent {
57
21
  color: var(--do-badge-accent-content);
58
- border-color: var(--do-badge-accent-border);
59
22
  background-color: var(--do-badge-accent-bg);
60
- }
61
-
62
- .do-badge-accent:hover,
63
- .do-badge-accent:focus {
64
- color: var(--do-badge-accent-hover-content);
65
- border-color: var(--do-badge-accent-border);
66
- background-color: var(--do-badge-accent-hover-bg);
67
- }
23
+ }
@@ -151,6 +151,19 @@ background-color: var(--do-chip-bg);
151
151
  background-color: var(--do-chip-bg-hover);
152
152
  }
153
153
 
154
+ .do-btn-ghost {
155
+ background-color: transparent;
156
+ border-color: none;
157
+ color: inherit;
158
+ }
159
+
160
+ .do-btn-ghost:hover {
161
+ background-color: transparent;
162
+ border-color: none;
163
+ backdrop-filter: blur(0.5rem);
164
+ color: #FFF8;
165
+ }
166
+
154
167
  @keyframes rotation {
155
168
  0% {
156
169
  transform: rotate(0deg);
@@ -0,0 +1,67 @@
1
+ .do-chip--wrapper {
2
+ position: relative;
3
+ display: inline-flex;
4
+ }
5
+
6
+ .do-chip {
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
+ white-space: nowrap;
19
+ }
20
+
21
+ .do-chip__tooltip {
22
+ position: absolute;
23
+ top: 100%;
24
+ left: 0;
25
+ background: var(--do-chip-tooltip-bg);
26
+ color: var(--do-chip-tooltip-content);
27
+ font-size: 12px;
28
+ padding: 4px 8px;
29
+ border-radius: 4px;
30
+ white-space: nowrap;
31
+ margin-top: 4px;
32
+ opacity: 0;
33
+ pointer-events: none;
34
+ transition: opacity 0.2s ease-in-out;
35
+ z-index: 10;
36
+ }
37
+
38
+ .do-chip--wrapper:hover .do-chip__tooltip {
39
+ opacity: 1;
40
+ pointer-events: auto;
41
+ }
42
+
43
+ .do-chip-primary {
44
+ color: var(--do-chip-primary-content);
45
+ border: 1px solid var(--do-chip-primary-border);
46
+ background-color: var(--do-chip-primary-bg);
47
+ }
48
+
49
+ .do-chip-primary:hover,
50
+ .do-chip-primary:focus {
51
+ color: var(--do-chip-primary-hover-content);
52
+ border-color: var(--do-chip-primary-border);
53
+ background-color: var(--do-chip-primary-hover-bg);
54
+ }
55
+
56
+ .do-chip-accent {
57
+ color: var(--do-chip-accent-content);
58
+ border-color: var(--do-chip-accent-border);
59
+ background-color: var(--do-chip-accent-bg);
60
+ }
61
+
62
+ .do-chip-accent:hover,
63
+ .do-chip-accent:focus {
64
+ color: var(--do-chip-accent-hover-content);
65
+ border-color: var(--do-chip-accent-border);
66
+ background-color: var(--do-chip-accent-hover-bg);
67
+ }
@@ -9,8 +9,8 @@
9
9
  @import "./button.css";
10
10
  @import "./border.css";
11
11
  @import "./card.css";
12
+ @import "./chip.css";
12
13
  @import "./color.css";
13
- @import "./counter.css";
14
14
 
15
15
  /*
16
16
  To modify themes (light and dark):
@@ -50,24 +50,26 @@
50
50
  --do-chip-content-hover: #FAFAFA;
51
51
  --do-chip-bg-hover: #27272A;
52
52
 
53
- /*badge colors*/
54
- --do-badge-primary-content: #FAFAFA;
55
- --do-badge-primary-bg: #52525B;
56
- --do-badge-primary-hover-content: #FAFAFA;
57
- --do-badge-primary-hover-bg: #27272A;
58
- --do-badge-primary-border: #71717A;
59
- --do-badge-tooltip-content:#FAFAFA;
60
- --do-badge-tooltip-bg:#71717A;
61
- --do-badge-accent-content: #FAFAFA;
62
- --do-badge-accent-bg: #3B82F6;
63
- --do-badge-accent-hover-content: #FAFAFA;
64
- --do-badge-accent-hover-bg: #1D4ED8;
65
- --do-badge-accent-border: #1D4ED8;
66
- --do-badge-accent-hover-border: #1E40AF;
53
+ /*chip colors*/
54
+ --do-chip-primary-content: #FAFAFA;
55
+ --do-chip-primary-bg: #52525B;
56
+ --do-chip-primary-hover-content: #FAFAFA;
57
+ --do-chip-primary-hover-bg: #27272A;
58
+ --do-chip-primary-border: #71717A;
59
+ --do-chip-tooltip-content:#FAFAFA;
60
+ --do-chip-tooltip-bg:#71717A;
61
+ --do-chip-accent-content: #FAFAFA;
62
+ --do-chip-accent-bg: #3B82F6;
63
+ --do-chip-accent-hover-content: #FAFAFA;
64
+ --do-chip-accent-hover-bg: #1D4ED8;
65
+ --do-chip-accent-border: #1D4ED8;
66
+ --do-chip-accent-hover-border: #1E40AF;
67
67
 
68
- /*counter colors*/
69
- --do-counter-primary-content:#FAFAFA;
70
- --do-counter-primary-bg:#71717A;
68
+ /*badge colors*/
69
+ --do-badge-primary-content:#FAFAFA;
70
+ --do-badge-primary-bg:#71717A;
71
+ --do-badge-accent-content:#2563EB;
72
+ --do-badge-accent-bg:#FAFAFA;
71
73
 
72
74
  /* base sizes */
73
75
  --size-selector: 0.25rem;
@@ -12,8 +12,8 @@
12
12
  --do-color-white: #fff;
13
13
  --do-color-black: #000;
14
14
  --do-color-grey-border: #e4e4e7;
15
- --do-color-grey: #F4F4F5;
16
- --color-dark-grey: #18181B;
15
+ --do-color-grey: #f4f4f5;
16
+ --color-dark-grey: #18181b;
17
17
  --color-dark-grey-border: #303030;
18
18
 
19
19
  /*buttons variables*/
@@ -52,24 +52,26 @@
52
52
  --do-chip-content-hover: #fafafa;
53
53
  --do-chip-bg-hover: #27272a;
54
54
 
55
- /*badge colors*/
56
- --do-badge-primary-content: #3F3F46;
57
- --do-badge-primary-bg: #FAFAFA;
58
- --do-badge-primary-hover-content:#FAFAFA;
59
- --do-badge-primary-hover-bg: #52525B;
60
- --do-badge-primary-border: #A3A3A3;
61
- --do-badge-tooltip-content: #3F3F46;
62
- --do-badge-tooltip-bg: #D4D4D8;
63
- --do-badge-accent-content: #1D4ED8;
64
- --do-badge-accent-bg: #DBEAFE;
65
- --do-badge-accent-hover-content: #FAFAFA;
66
- --do-badge-accent-hover-bg: #1D4ED8;
67
- --do-badge-accent-border: #BFDBFE;
68
- --do-badge-accent-hover-border: #1E40AF;
55
+ /*chip colors*/
56
+ --do-chip-primary-content: #3f3f46;
57
+ --do-chip-primary-bg: #fafafa;
58
+ --do-chip-primary-hover-content: #fafafa;
59
+ --do-chip-primary-hover-bg: #52525b;
60
+ --do-chip-primary-border: #a3a3a3;
61
+ --do-chip-tooltip-content: #3f3f46;
62
+ --do-chip-tooltip-bg: #d4d4d8;
63
+ --do-chip-accent-content: #1d4ed8;
64
+ --do-chip-accent-bg: #dbeafe;
65
+ --do-chip-accent-hover-content: #fafafa;
66
+ --do-chip-accent-hover-bg: #1d4ed8;
67
+ --do-chip-accent-border: #bfdbfe;
68
+ --do-chip-accent-hover-border: #1e40af;
69
69
 
70
- /*counter colors*/
71
- --do-counter-primary-content: #3F3F46;
72
- --do-counter-primary-bg: #D4D4D8;
70
+ /*badge colors*/
71
+ --do-badge-primary-content: #3f3f46;
72
+ --do-badge-primary-bg: #d4d4d8;
73
+ --do-badge-accent-content: #EFF6FF;
74
+ --do-badge-accent-bg: #1D4ED8;
73
75
 
74
76
  /* base sizes */
75
77
  --size-selector: 0.25rem;
@@ -88,7 +90,7 @@
88
90
  --do-card-secondary-border: var(--do-color-grey-border);
89
91
 
90
92
  /*styles*/
91
- --do-text-base: #18181B;
93
+ --do-text-base: #18181b;
92
94
  --do-text-contrast: #fff;
93
95
  --do-transparent: transparent;
94
96
 
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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 };
1
+ import { Badge, Button, Card, Chip, Icon } from './atoms/index.js';
2
+ import { IconButton } from './molecules/index.js';
3
+ export { Button, Icon, Badge, IconButton, Card, Chip };
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACnE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
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 };
1
+ import { Badge, Button, Card, Chip, Icon } from './atoms/index.js';
2
+ import { IconButton } from './molecules/index.js';
3
+ export { Button, Icon, Badge, IconButton, Card, Chip };
@@ -40,7 +40,7 @@ declare const ActionChip: $$__sveltets_2_IsomorphicComponent<{
40
40
  labelStyles?: string | undefined;
41
41
  labelClass?: string | undefined;
42
42
  }, {
43
- click: MouseEvent;
43
+ click: any;
44
44
  } & {
45
45
  [evt: string]: CustomEvent<any>;
46
46
  }, {}, {}, string>;
@@ -53,7 +53,7 @@ declare const IconButton: $$__sveltets_2_IsomorphicComponent<{
53
53
  btnCustomStyles?: string | undefined;
54
54
  iCustomStyles?: string | undefined;
55
55
  }, {
56
- click: MouseEvent;
56
+ click: any;
57
57
  } & {
58
58
  [evt: string]: CustomEvent<any>;
59
59
  }, {}, {}, string>;
@@ -1,4 +1,3 @@
1
1
  import IconButton from "./IconButton/IconButton.svelte";
2
- import CounterBadge from "./CounterBadge/CounterBadge.svelte";
3
- export { IconButton, CounterBadge };
2
+ export { IconButton };
4
3
  //# 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;AAExD,OAAO,YAAY,MAAM,oCAAoC,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/molecules/index.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAGxD,OAAO,EAAE,UAAU,EAAE,CAAC"}
@@ -1,4 +1,3 @@
1
1
  import IconButton from "./IconButton/IconButton.svelte";
2
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 };
3
+ export { IconButton };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "do-ui-design-system",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Design system en Svelte + CSS + Storybook",
5
5
  "author": "Data Observatory",
6
6
  "license": "MIT",
@@ -1,15 +0,0 @@
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>