do-ui-design-system 0.0.10 → 0.0.11

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 (29) hide show
  1. package/dist/components/atoms/Button/Button.stories.svelte +92 -0
  2. package/dist/components/atoms/Button/Button.stories.svelte.d.ts +19 -0
  3. package/dist/{atoms → components/atoms}/Icons/Icon.svelte.d.ts +1 -1
  4. package/dist/components/atoms/Icons/Icons.stories.svelte +50 -0
  5. package/dist/components/atoms/Icons/Icons.stories.svelte.d.ts +18 -0
  6. package/dist/components/index.d.ts +2 -0
  7. package/dist/components/index.js +3 -0
  8. package/dist/components/molecules/IconButton/IconButton.stories.svelte +77 -0
  9. package/dist/components/molecules/IconButton/IconButton.stories.svelte.d.ts +19 -0
  10. package/dist/{molecules → components/molecules}/IconButton/iProps.d.ts +1 -1
  11. package/dist/do-theme/post-compiled.css +155 -39
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.js +2 -11
  14. package/package.json +20 -17
  15. package/dist/do-theme/icomoon/generate-icon-list.d.cts +0 -1
  16. /package/dist/{atoms → components/atoms}/Button/Button.svelte +0 -0
  17. /package/dist/{atoms → components/atoms}/Button/Button.svelte.d.ts +0 -0
  18. /package/dist/{atoms → components/atoms}/Button/iProps.d.ts +0 -0
  19. /package/dist/{atoms → components/atoms}/Button/iProps.js +0 -0
  20. /package/dist/{atoms → components/atoms}/Icons/Icon.svelte +0 -0
  21. /package/dist/{atoms → components/atoms}/Icons/iProps.d.ts +0 -0
  22. /package/dist/{atoms → components/atoms}/Icons/iProps.js +0 -0
  23. /package/dist/{atoms → components/atoms}/index.d.ts +0 -0
  24. /package/dist/{atoms → components/atoms}/index.js +0 -0
  25. /package/dist/{molecules → components/molecules}/IconButton/IconButton.svelte +0 -0
  26. /package/dist/{molecules → components/molecules}/IconButton/IconButton.svelte.d.ts +0 -0
  27. /package/dist/{molecules → components/molecules}/IconButton/iProps.js +0 -0
  28. /package/dist/{molecules → components/molecules}/index.d.ts +0 -0
  29. /package/dist/{molecules → components/molecules}/index.js +0 -0
@@ -0,0 +1,92 @@
1
+ <script module lang="ts">
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import Button from './Button.svelte';
4
+ import { fn } from '@storybook/test';
5
+ import type { ArgTypes, Args } from '@storybook/core/types';
6
+
7
+ const colorOptions = ['btn-primary', 'btn-secondary', 'btn-accent', 'btn-neutral'];
8
+ const sizeOptions = ['btn-sm', 'btn-md', 'btn-lg'];
9
+ // const typeOptions = ['rounded'];
10
+
11
+ const { Story } = defineMeta({
12
+ title: 'DO - Sistema de diseño/Átomos/Botón',
13
+ component: Button,
14
+ tags: ['autodocs'],
15
+ parameters: {
16
+ docs: {
17
+ toc: {
18
+ disable: true // 👈 Disables the table of contents
19
+ }
20
+ }
21
+ }
22
+ });
23
+ const argTypes: ArgTypes = {
24
+ label: {
25
+ control: { type: 'text' },
26
+ description: 'Texto del botón'
27
+ },
28
+ color: {
29
+ control: { type: 'radio' },
30
+ options: colorOptions,
31
+ description: 'Color del botón'
32
+ },
33
+ size: {
34
+ control: { type: 'radio' },
35
+ options: sizeOptions,
36
+ description: 'Tamaño del botón'
37
+ },
38
+ disabled: {
39
+ control: { type: 'boolean' },
40
+ description: 'Deshabilitar el botón'
41
+ },
42
+ loading: {
43
+ control: { type: 'boolean' },
44
+ description: 'Mostrar el estado de carga'
45
+ },
46
+ type: {
47
+ control: { type: 'radio' },
48
+ options: ['button', 'submit', 'reset'],
49
+ description: 'Tipo de botón'
50
+ }
51
+ };
52
+ const args: Args = {
53
+ size: 'btn-md',
54
+ label: 'Botón',
55
+ color: 'btn-primary',
56
+ type: 'button',
57
+ disabled: false,
58
+ loading: false
59
+ };
60
+ const colors = [
61
+ { color: 'btn-primary', label: 'Primary', size: 'btn-md' },
62
+ { color: 'btn-secondary', label: 'Secondary', size: 'btn-md' },
63
+ { color: 'btn-neutral', label: 'Neutral', size: 'btn-md' },
64
+ { color: 'btn-accent', label: 'Accent', size: 'btn-md' }
65
+ ] as const;
66
+ </script>
67
+
68
+ <Story name="Botón" {argTypes} {args} />
69
+
70
+ <Story name="Colores" parameters={{ controls: { disable: true } }}>
71
+ <div class="margin mb-4 flex flex-row gap-[2rem]">
72
+ {#each colors as { color, label, size }}
73
+ <Button {color} {size} {label} on:click={()=> args.onClick()} />
74
+ {/each}
75
+ </div>
76
+ </Story>
77
+
78
+ <Story name="Modo: disabled" parameters={{ controls: { disable: true } }}>
79
+ <div class="margin mb-4 flex flex-row gap-[2rem]">
80
+ {#each colors as { color, label, size }}
81
+ <Button {color} {size} {label} onClick={fn()} disabled={true} />
82
+ {/each}
83
+ </div>
84
+ </Story>
85
+
86
+ <Story name="Modo: loading" parameters={{ controls: { disable: true } }}>
87
+ <div class="margin mb-4 flex flex-row gap-[2rem]">
88
+ {#each colors as { color, label, size }}
89
+ <Button {color} {size} loading {label} onClick={fn()} />
90
+ {/each}
91
+ </div>
92
+ </Story>
@@ -0,0 +1,19 @@
1
+ import Button from './Button.svelte';
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: {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports & {
10
+ $set?: any;
11
+ $on?: any;
12
+ };
13
+ z_$$bindings?: Bindings;
14
+ }
15
+ declare const Button: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
+ [evt: string]: CustomEvent<any>;
17
+ }, {}, {}, string>;
18
+ type Button = InstanceType<typeof Button>;
19
+ export default Button;
@@ -22,7 +22,7 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
22
22
  */
23
23
  declare const Icon: $$__sveltets_2_IsomorphicComponent<{
24
24
  [x: string]: any;
25
- name?: iProps["name"] | undefined;
25
+ name?: iProps["name"];
26
26
  color?: string | undefined;
27
27
  size?: string | undefined;
28
28
  }, {
@@ -0,0 +1,50 @@
1
+ <script module lang="ts">
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import type { ArgTypes, Args } from '@storybook/core/types';
4
+ import Icon from './Icon.svelte';
5
+ import iconList from "../../../do-theme/icomoon/iconList.ts";
6
+
7
+ const colorOptions = ['text-red-600', 'text-zinc-600', 'text-green-600', 'text-blue-600'];
8
+ const sizeOptions = ['text-xs', 'text-sm', 'text-base', 'text-lg', 'text-xl', 'text-2xl', 'text-3xl'];
9
+
10
+ const { Story } = defineMeta({
11
+ title: 'DO - Sistema de diseño/Átomos/Íconos',
12
+ component: Icon,
13
+ tags: ['autodocs'],
14
+ parameters:{
15
+ docs: {
16
+ source: {
17
+ code: `
18
+ <i class="icon-name some-tw-text-size some-tw-text-color"></i>
19
+ `
20
+ }
21
+ }
22
+ }
23
+ });
24
+
25
+ const argTypes: ArgTypes = {
26
+ name: {
27
+ control: { type: 'select' }
28
+ },
29
+ color: {
30
+ control: { type: 'select' },
31
+ defaultValue: 'text-red-600',
32
+ options: colorOptions
33
+ },
34
+ size: {
35
+ control: { type: 'select' },
36
+ options: sizeOptions
37
+ },
38
+ }
39
+ </script>
40
+
41
+ <Story name="Ícono" {argTypes} />
42
+
43
+
44
+ <Story name="Listado" {argTypes} parameters={{ controls: { disable: true } }}>
45
+ <section class="flex flex-wrap gap-4">
46
+ {#each iconList as icon}
47
+ <Icon name={icon}/>
48
+ {/each}
49
+ </section>
50
+ </Story>
@@ -0,0 +1,18 @@
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: {
6
+ $$events?: Events;
7
+ $$slots?: Slots;
8
+ }): Exports & {
9
+ $set?: any;
10
+ $on?: any;
11
+ };
12
+ z_$$bindings?: Bindings;
13
+ }
14
+ declare const Icons: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
+ [evt: string]: CustomEvent<any>;
16
+ }, {}, {}, string>;
17
+ type Icons = InstanceType<typeof Icons>;
18
+ export default Icons;
@@ -0,0 +1,2 @@
1
+ export * from './atoms';
2
+ export * from './molecules';
@@ -0,0 +1,3 @@
1
+ // src/lib/components/index.ts
2
+ export * from './atoms';
3
+ export * from './molecules';
@@ -0,0 +1,77 @@
1
+ <script module lang="ts">
2
+ import { defineMeta } from '@storybook/addon-svelte-csf';
3
+ import IconButton from './IconButton.svelte';
4
+ import { fn } from '@storybook/test';
5
+ import type { Args, ArgTypes } from '@storybook/core/types';
6
+
7
+ const colorOptions = ['btn-primary', 'btn-secondary', 'btn-accent', 'btn-neutral'];
8
+ const sizeOptions = ['btn-sm', 'btn-md', 'btn-lg'];
9
+
10
+ // const typeOptions = ['rounded'];
11
+
12
+ const { Story } = defineMeta({
13
+ title: 'DO - Sistema de diseño/Moléculas',
14
+ component: IconButton,
15
+ argTypes: {
16
+ label: {
17
+ control: { type: 'text' },
18
+ description: 'Texto del botón',
19
+ }
20
+ }
21
+ });
22
+ const argTypes: ArgTypes = {
23
+ disabled: {
24
+ control: { type: 'boolean' },
25
+ options: [true, false],
26
+ description: 'Deshabilitar el botón'
27
+ },
28
+ size: {
29
+ control: { type: 'radio' },
30
+ options: sizeOptions,
31
+ description: 'Tamaño del botón'
32
+ },
33
+ label: {
34
+ control: { type: 'text' },
35
+ description: 'Texto del botón'
36
+ },
37
+ color: {
38
+ control: { type: 'radio' },
39
+ options: colorOptions,
40
+ description: 'Color del botón'
41
+ },
42
+ onClick: {
43
+ action: 'clicked',
44
+ description: 'Función que se ejecuta al hacer clic en el botón',
45
+ },
46
+ iconPosition: {
47
+ control: { type: 'radio' },
48
+ options: ['start', 'end'],
49
+ description: 'Posición del ícono'
50
+ },
51
+ iconSize: {
52
+ control: { type: 'select' },
53
+ options: ['inherit', 'text-sm', 'text-md', 'text-lg', 'text-xl', 'text-2xl'],
54
+ description: 'Tamaño del ícono'
55
+ },
56
+ iconName: {
57
+ control: { type: 'select' },
58
+ description: 'Nombre del ícono'
59
+ },
60
+ };
61
+
62
+ const args: Args = {
63
+ color: 'btn-primary',
64
+ size: 'btn-md',
65
+ label: 'Botón ícono',
66
+ disabled: false,
67
+ onClick: fn(),
68
+ iconName: 'icon-arrow',
69
+ iconColor: 'inherit',
70
+ iconPosition: 'end',
71
+ type: 'button',
72
+ loading: false,
73
+ iconSize: 'inherit'
74
+ };
75
+ </script>
76
+
77
+ <Story name="Boton ícono" {argTypes} {args}/>
@@ -0,0 +1,19 @@
1
+ import IconButton from './IconButton.svelte';
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: {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports & {
10
+ $set?: any;
11
+ $on?: any;
12
+ };
13
+ z_$$bindings?: Bindings;
14
+ }
15
+ declare const IconButton: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
16
+ [evt: string]: CustomEvent<any>;
17
+ }, {}, {}, string>;
18
+ type IconButton = InstanceType<typeof IconButton>;
19
+ export default IconButton;
@@ -1,4 +1,4 @@
1
- import type { IconNames } from '../../do-theme/icomoon/iconList.ts';
1
+ import type { IconNames } from '../../../do-theme/icomoon/iconList.ts';
2
2
  import type { HTMLButtonAttributes } from 'svelte/elements';
3
3
  export interface iProps extends HTMLButtonAttributes {
4
4
  color?: 'btn-primary' | 'btn-secondary' | 'btn-neutral' | 'btn-accent' | string;
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.4 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.6 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  *, ::after, ::before, ::backdrop, ::file-selector-button {
4
4
  box-sizing: border-box;
@@ -444,6 +444,7 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
444
444
  border-style: solid;
445
445
  border-color: var(--btn-border);
446
446
  text-shadow: 0 0.5px oklch(100% 0 0 / calc(var(--depth) * 0.15));
447
+ touch-action: manipulation;
447
448
  box-shadow: 0 0.5px 0 0.5px oklch(100% 0 0 / calc(var(--depth) * 6%)) inset, var(--btn-shadow);
448
449
  --size: calc(var(--size-field, 0.25rem) * 10);
449
450
  --btn-bg: var(--btn-color, var(--color-base-200));
@@ -474,6 +475,7 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
474
475
  &:focus-visible {
475
476
  outline-width: 2px;
476
477
  outline-style: solid;
478
+ isolation: isolate;
477
479
  }
478
480
  &:active:not(.btn-active) {
479
481
  translate: 0 0.5px;
@@ -547,6 +549,112 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
547
549
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
548
550
  mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' stroke='black' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cg transform-origin='center'%3E%3Ccircle cx='12' cy='12' r='9.5' fill='none' stroke-width='3' stroke-linecap='round'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='2s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dasharray' values='0,150;42,150;42,150' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-dashoffset' values='0;-16;-59' keyTimes='0;0.475;1' dur='1.5s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/g%3E%3C/svg%3E");
549
551
  }
552
+ .input {
553
+ cursor: text;
554
+ border: var(--border) solid #0000;
555
+ position: relative;
556
+ display: inline-flex;
557
+ flex-shrink: 1;
558
+ -webkit-appearance: none;
559
+ -moz-appearance: none;
560
+ appearance: none;
561
+ align-items: center;
562
+ gap: calc(0.25rem * 2);
563
+ background-color: var(--color-base-100);
564
+ padding-inline: calc(0.25rem * 3);
565
+ vertical-align: middle;
566
+ white-space: nowrap;
567
+ width: clamp(3rem, 20rem, 100%);
568
+ height: var(--size);
569
+ font-size: 0.875rem;
570
+ border-start-start-radius: var(--join-ss, var(--radius-field));
571
+ border-start-end-radius: var(--join-se, var(--radius-field));
572
+ border-end-start-radius: var(--join-es, var(--radius-field));
573
+ border-end-end-radius: var(--join-ee, var(--radius-field));
574
+ border-color: var(--input-color);
575
+ box-shadow: 0 1px var(--input-color) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
576
+ @supports (color: color-mix(in lab, red, red)) {
577
+ box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000) inset, 0 -1px oklch(100% 0 0 / calc(var(--depth) * 0.1)) inset;
578
+ }
579
+ --size: calc(var(--size-field, 0.25rem) * 10);
580
+ --input-color: var(--color-base-content);
581
+ @supports (color: color-mix(in lab, red, red)) {
582
+ --input-color: color-mix(in oklab, var(--color-base-content) 20%, #0000);
583
+ }
584
+ &:where(input) {
585
+ display: inline-flex;
586
+ }
587
+ :where(input) {
588
+ display: inline-flex;
589
+ height: 100%;
590
+ width: 100%;
591
+ -webkit-appearance: none;
592
+ -moz-appearance: none;
593
+ appearance: none;
594
+ background-color: transparent;
595
+ border: none;
596
+ &:focus, &:focus-within {
597
+ --tw-outline-style: none;
598
+ outline-style: none;
599
+ @media (forced-colors: active) {
600
+ outline: 2px solid transparent;
601
+ outline-offset: 2px;
602
+ }
603
+ }
604
+ }
605
+ :where(input[type="date"]) {
606
+ display: inline-block;
607
+ }
608
+ &:focus, &:focus-within {
609
+ --input-color: var(--color-base-content);
610
+ box-shadow: 0 1px var(--input-color);
611
+ @supports (color: color-mix(in lab, red, red)) {
612
+ box-shadow: 0 1px color-mix(in oklab, var(--input-color) calc(var(--depth) * 10%), #0000);
613
+ }
614
+ outline: 2px solid var(--input-color);
615
+ outline-offset: 2px;
616
+ isolation: isolate;
617
+ z-index: 1;
618
+ }
619
+ &:has(> input[disabled]), &:is(:disabled, [disabled]) {
620
+ cursor: not-allowed;
621
+ border-color: var(--color-base-200);
622
+ background-color: var(--color-base-200);
623
+ color: var(--color-base-content);
624
+ @supports (color: color-mix(in lab, red, red)) {
625
+ color: color-mix(in oklab, var(--color-base-content) 40%, transparent);
626
+ }
627
+ &::-moz-placeholder {
628
+ color: var(--color-base-content);
629
+ @supports (color: color-mix(in lab, red, red)) {
630
+ color: color-mix(in oklab, var(--color-base-content) 20%, transparent);
631
+ }
632
+ }
633
+ &::placeholder {
634
+ color: var(--color-base-content);
635
+ @supports (color: color-mix(in lab, red, red)) {
636
+ color: color-mix(in oklab, var(--color-base-content) 20%, transparent);
637
+ }
638
+ }
639
+ box-shadow: none;
640
+ }
641
+ &:has(> input[disabled]) > input[disabled] {
642
+ cursor: not-allowed;
643
+ }
644
+ &::-webkit-date-and-time-value {
645
+ text-align: inherit;
646
+ }
647
+ &[type="number"] {
648
+ &::-webkit-inner-spin-button {
649
+ margin-block: calc(0.25rem * -3);
650
+ margin-inline-end: calc(0.25rem * -3);
651
+ }
652
+ }
653
+ &::-webkit-calendar-picker-indicator {
654
+ position: absolute;
655
+ inset-inline-end: 0.75em;
656
+ }
657
+ }
550
658
  .table {
551
659
  font-size: 0.875rem;
552
660
  position: relative;
@@ -683,6 +791,8 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
683
791
  }
684
792
  outline: 2px solid var(--input-color);
685
793
  outline-offset: 2px;
794
+ isolation: isolate;
795
+ z-index: 1;
686
796
  }
687
797
  &:has(> select[disabled]), &:is(:disabled, [disabled]) {
688
798
  cursor: not-allowed;
@@ -829,7 +939,10 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
829
939
  vertical-align: middle;
830
940
  color: color-mix(in srgb, #000 30%, transparent);
831
941
  @supports (color: color-mix(in lab, red, red)) {
832
- color: color-mix(in oklab, var(--color-black) 30%, transparent);
942
+ color: color-mix(in srgb, #000 30%, transparent);
943
+ @supports (color: color-mix(in lab, red, red)) {
944
+ color: color-mix(in oklab, var(--color-black) 30%, transparent);
945
+ }
833
946
  }
834
947
  background-image: radial-gradient( circle at 35% 30%, oklch(1 0 0 / calc(var(--depth) * 0.5)), #0000 );
835
948
  box-shadow: 0 2px 3px -1px currentColor;
@@ -1414,21 +1527,6 @@ body {
1414
1527
  --noise: 0;
1415
1528
  }
1416
1529
  }
1417
- @layer base {
1418
- @property --radialprogress {
1419
- syntax: "<percentage>";
1420
- inherits: true;
1421
- initial-value: 0%;
1422
- }
1423
- }
1424
- @layer base {
1425
- :root {
1426
- scrollbar-color: currentColor #0000;
1427
- @supports (color: color-mix(in lab, red, red)) {
1428
- scrollbar-color: color-mix(in oklch, currentColor 35%, #0000) #0000;
1429
- }
1430
- }
1431
- }
1432
1530
  @layer base {
1433
1531
  :root:has( .modal-open, .modal[open], .modal:target, .modal-toggle:checked, .drawer:not([class*="drawer-open"]) > .drawer-toggle:checked ) {
1434
1532
  overflow: hidden;
@@ -1442,10 +1540,17 @@ body {
1442
1540
  }
1443
1541
  @layer base {
1444
1542
  :root {
1445
- --fx-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");
1543
+ scrollbar-color: currentColor #0000;
1544
+ @supports (color: color-mix(in lab, red, red)) {
1545
+ scrollbar-color: color-mix(in oklch, currentColor 35%, #0000) #0000;
1546
+ }
1446
1547
  }
1447
- .chat {
1448
- --mask-chat: url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");
1548
+ }
1549
+ @layer base {
1550
+ @property --radialprogress {
1551
+ syntax: "<percentage>";
1552
+ inherits: true;
1553
+ initial-value: 0%;
1449
1554
  }
1450
1555
  }
1451
1556
  @layer base {
@@ -1457,32 +1562,37 @@ body {
1457
1562
  --root-bg: color-mix(in srgb, var(--color-base-100), oklch(0% 0 0) 40%);
1458
1563
  }
1459
1564
  }
1460
- }
1461
- @keyframes skeleton {
1462
- 0% {
1463
- background-position: 150%;
1464
- }
1465
- 100% {
1466
- background-position: -50%;
1565
+ :where(.modal[open], .modal-open, .modal-toggle:checked + .modal):not(.modal-start, .modal-end) {
1566
+ scrollbar-gutter: stable;
1467
1567
  }
1468
1568
  }
1469
- @keyframes progress {
1470
- 50% {
1471
- background-position-x: -115%;
1569
+ @layer base {
1570
+ :root {
1571
+ --fx-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='a'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.34' numOctaves='4' stitchTiles='stitch'%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23a)' opacity='0.2'%3E%3C/rect%3E%3C/svg%3E");
1572
+ }
1573
+ .chat {
1574
+ --mask-chat: url("data:image/svg+xml,%3csvg width='13' height='13' xmlns='http://www.w3.org/2000/svg'%3e%3cpath fill='black' d='M0 11.5004C0 13.0004 2 13.0004 2 13.0004H12H13V0.00036329L12.5 0C12.5 0 11.977 2.09572 11.8581 2.50033C11.6075 3.35237 10.9149 4.22374 9 5.50036C6 7.50036 0 10.0004 0 11.5004Z'/%3e%3c/svg%3e");
1472
1575
  }
1473
1576
  }
1474
- @keyframes radio {
1577
+ @keyframes dropdown {
1475
1578
  0% {
1476
- padding: 5px;
1579
+ opacity: 0;
1477
1580
  }
1581
+ }
1582
+ @keyframes progress {
1478
1583
  50% {
1479
- padding: 3px;
1584
+ background-position-x: -115%;
1480
1585
  }
1481
1586
  }
1482
- @keyframes dropdown {
1587
+ @keyframes toast {
1483
1588
  0% {
1589
+ scale: 0.9;
1484
1590
  opacity: 0;
1485
1591
  }
1592
+ 100% {
1593
+ scale: 1;
1594
+ opacity: 1;
1595
+ }
1486
1596
  }
1487
1597
  @keyframes rating {
1488
1598
  0%, 40% {
@@ -1490,14 +1600,20 @@ body {
1490
1600
  filter: brightness(1.05) contrast(1.05);
1491
1601
  }
1492
1602
  }
1493
- @keyframes toast {
1603
+ @keyframes radio {
1494
1604
  0% {
1495
- scale: 0.9;
1496
- opacity: 0;
1605
+ padding: 5px;
1606
+ }
1607
+ 50% {
1608
+ padding: 3px;
1609
+ }
1610
+ }
1611
+ @keyframes skeleton {
1612
+ 0% {
1613
+ background-position: 150%;
1497
1614
  }
1498
1615
  100% {
1499
- scale: 1;
1500
- opacity: 1;
1616
+ background-position: -50%;
1501
1617
  }
1502
1618
  }
1503
1619
  @layer base {
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import './do-theme/index.css';
2
- export * from './atoms';
3
- export * from './molecules';
2
+ export * from './components/atoms';
3
+ export * from './components/molecules';
package/dist/index.js CHANGED
@@ -1,12 +1,3 @@
1
- //css export
2
1
  import './do-theme/index.css';
3
- // import {Button, Icon} from './atoms/index.ts';
4
- // import {IconButton} from './molecules/index.ts';
5
- // export {Button, Icon, IconButton};
6
- export * from './atoms';
7
- export * from './molecules';
8
- // //export atoms
9
- // export { default as Button } from './atoms/Button/Button.svelte';
10
- // export { default as Icon } from './atoms/Icons/Icon.svelte';
11
- // //export molecules
12
- // export { default as IconButton } from './molecules/IconButton/IconButton.svelte';
2
+ export * from './components/atoms';
3
+ export * from './components/molecules';
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "do-ui-design-system",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "description": "Design system en Svelte + Tailwind + DaisyUI",
5
5
  "author": "Data Observatory",
6
6
  "license": "MIT",
7
7
  "main": "./dist/index.js",
8
8
  "scripts": {
9
9
  "dev": "vite dev",
10
- "build": "postcss src/app.css -o src/lib/do-theme/post-compiled.css && vite build && npm run prepack",
10
+ "build": "postcss src/app.css -o src/lib/do-theme/post-compiled.css && npm run prepack",
11
11
  "preview": "vite preview",
12
12
  "prepare": "svelte-kit sync || echo ''",
13
13
  "prepack": "svelte-kit sync && svelte-package && publint",
@@ -26,11 +26,10 @@
26
26
  "files": [
27
27
  "dist",
28
28
  "src/lib/do-theme/index.css",
29
- "!dist/**/*.test.*",
30
- "!dist/**/*.spec.*",
31
- "!dist/**/*.stories.*",
32
- "!dist/**/*.mdx*",
33
- "!dist/**/*.iProps*"
29
+ "!src/lib/**/*.stories.svelte",
30
+ "!src/lib/**/*.test.*",
31
+ "!src/lib/**/*.spec.*",
32
+ "!src/lib/**/*.mdx"
34
33
  ],
35
34
  "svelte": "./dist/index.js",
36
35
  "types": "./dist/index.d.ts",
@@ -42,17 +41,20 @@
42
41
  "import": "./dist/index.js",
43
42
  "default": "./dist/index.js"
44
43
  },
44
+ "./styles.css": {
45
+ "default": "./src/lib/do-theme/index.css"
46
+ },
45
47
  "./atoms": {
46
- "types": "./dist/atoms/index.d.ts",
47
- "svelte": "./dist/atoms/index.js",
48
- "import": "./dist/atoms/index.js",
49
- "default": "./dist/atoms/index.js"
48
+ "types": "./dist/components/atoms/index.d.ts",
49
+ "svelte": "./dist/components/atoms/index.js",
50
+ "import": "./dist/components/atoms/index.js",
51
+ "default": "./dist/components/atoms/index.js"
50
52
  },
51
53
  "./molecules": {
52
- "types": "./dist/molecules/index.d.ts",
53
- "svelte": "./dist/molecules/index.js",
54
- "import": "./dist/molecules/index.js",
55
- "default": "./dist/molecules/index.js"
54
+ "types": "./dist/components/molecules/index.d.ts",
55
+ "svelte": "./dist/components/molecules/index.js",
56
+ "import": "./dist/components/molecules/index.js",
57
+ "default": "./dist/components/molecules/index.js"
56
58
  }
57
59
  },
58
60
  "peerDependencies": {
@@ -74,10 +76,11 @@
74
76
  "@sveltejs/kit": "^2.16.0",
75
77
  "@sveltejs/package": "^2.0.0",
76
78
  "@sveltejs/vite-plugin-svelte": "^5.0.0",
77
- "@tailwindcss/vite": "^4.0.0",
78
79
  "@tailwindcss/postcss": "^4.1.4",
80
+ "@tailwindcss/vite": "^4.0.0",
79
81
  "@testing-library/jest-dom": "^6.6.3",
80
82
  "@testing-library/svelte": "^5.2.4",
83
+ "@types/node": "^22.15.17",
81
84
  "@vitest/browser": "^3.1.1",
82
85
  "@vitest/coverage-v8": "^3.1.1",
83
86
  "autoprefixer": "^10.4.21",
@@ -95,7 +98,7 @@
95
98
  "prettier-plugin-tailwindcss": "^0.6.11",
96
99
  "publint": "^0.3.2",
97
100
  "storybook": "^8.6.11",
98
- "svelte": "^5.25.10",
101
+ "svelte": "^5.28.2",
99
102
  "svelte-check": "^4.0.0",
100
103
  "tailwindcss": "^4.1.4",
101
104
  "typescript": "^5.8.3",
@@ -1 +0,0 @@
1
- export {};
File without changes
File without changes