do-ui-design-system 0.0.5 → 0.0.6

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.
@@ -9,17 +9,18 @@
9
9
  export let type: iProps['type'] = 'button';
10
10
  </script>
11
11
 
12
- <!--
13
- @component
14
- Props:
15
- - color?: btn-primary | btn-secondary | btn-neutral | btn-accent, or any other tailwind color class
16
- - size?: any tailwind size class.
17
- - label: string
18
- - onClick: () => void
19
- - disabled: boolean
20
- - loading: boolean
21
- - type: 'button' | 'submit' | 'reset'
12
+ <!-- @component
13
+ ```Svelte
14
+ <Button color?={color} size?={size} label?={label} disabled?={disabled} loading?={loading} type?={type}/>
15
+ ```
16
+ - `color?`: btn-primary | btn-secondary | btn-neutral | btn-accent, or any other tailwind color class
17
+ - `size?`: any tailwind size class.
18
+ - `label?`: string
19
+ - `disabled?`: boolean
20
+ - `loading?`: boolean
21
+ - `type?`: 'button' | 'submit' | 'reset'
22
22
  -->
23
+
23
24
  <button
24
25
  {...$$restProps}
25
26
  {type}
@@ -17,14 +17,15 @@ type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
17
17
  children?: any;
18
18
  } : {});
19
19
  /**
20
- * Props:
21
- * - color?: btn-primary | btn-secondary | btn-neutral | btn-accent, or any other tailwind color class
22
- * - size?: any tailwind size class.
23
- * - label: string
24
- * - onClick: () => void
25
- * - disabled: boolean
26
- * - loading: boolean
27
- * - type: 'button' | 'submit' | 'reset'
20
+ * ```Svelte
21
+ * <Button color?={color} size?={size} label?={label} disabled?={disabled} loading?={loading} type?={type}/>
22
+ * ```
23
+ * - `color?`: btn-primary | btn-secondary | btn-neutral | btn-accent, or any other tailwind color class
24
+ * - `size?`: any tailwind size class.
25
+ * - `label?`: string
26
+ * - `disabled?`: boolean
27
+ * - `loading?`: boolean
28
+ * - `type?`: 'button' | 'submit' | 'reset'
28
29
  */
29
30
  declare const Button: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
30
31
  [x: string]: any;
@@ -5,7 +5,6 @@ export interface iProps extends HTMLButtonAttributes {
5
5
  size?: string;
6
6
  label?: string;
7
7
  disabled?: boolean;
8
- onClick?: () => void;
9
8
  loading?: boolean;
10
9
  loadingIcon?: undefined;
11
10
  }
@@ -18,5 +18,5 @@
18
18
 
19
19
  <i
20
20
  {...$$restProps}
21
- class={`no-underline inline-block py-1.5 px-1 ${name} ${color} ${size}`}
21
+ class={`${name} ${color} ${size}`}
22
22
  ></i>
@@ -1,6 +1,7 @@
1
1
  .btn {
2
2
  font-weight: 500;
3
3
  padding: 6px 16px;
4
+ gap: 0.5rem;
4
5
  }
5
6
 
6
7
  .loading-spinner {
@@ -54,8 +55,16 @@
54
55
  .btn-neutral:is(:disabled, [disabled], .btn-disabled):is(:disabled, [disabled], .btn-disabled) {
55
56
  border-color: var(--do-transparent);
56
57
  background-color: var(--do-transparent);
58
+ /* text-decoration: underline; */
59
+ }
60
+
61
+ .btn-neutral:not(i){
57
62
  text-decoration: underline;
58
63
  }
64
+ /* .btn-neutral i{
65
+ text-decoration: none;
66
+ display: inline-block;
67
+ } */
59
68
 
60
69
  .btn-accent:is(:disabled, [disabled], .btn-disabled):is(:disabled, [disabled], .btn-disabled) {
61
70
  color: var(--color-neutral);
@@ -850,9 +850,6 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
850
850
  .\!inline {
851
851
  display: inline !important;
852
852
  }
853
- .block {
854
- display: block;
855
- }
856
853
  .contents {
857
854
  display: contents;
858
855
  }
@@ -865,9 +862,6 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
865
862
  .hidden {
866
863
  display: none;
867
864
  }
868
- .inline-block {
869
- display: inline-block;
870
- }
871
865
  .table {
872
866
  display: table;
873
867
  }
@@ -893,11 +887,8 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
893
887
  -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");
894
888
  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");
895
889
  }
896
- .px-1 {
897
- padding-inline: calc(var(--spacing) * 1);
898
- }
899
- .py-1\.5 {
900
- padding-block: calc(var(--spacing) * 1.5);
890
+ .px-1\.5 {
891
+ padding-inline: calc(var(--spacing) * 1.5);
901
892
  }
902
893
  .text-2xl {
903
894
  font-size: var(--text-2xl);
@@ -942,9 +933,6 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
942
933
  .text-zinc-600 {
943
934
  color: var(--color-zinc-600);
944
935
  }
945
- .no-underline {
946
- text-decoration-line: none;
947
- }
948
936
  .underline {
949
937
  text-decoration-line: underline;
950
938
  }
@@ -1172,6 +1160,7 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
1172
1160
  .btn {
1173
1161
  font-weight: 500;
1174
1162
  padding: 6px 16px;
1163
+ gap: 0.5rem;
1175
1164
  }
1176
1165
  .loading-spinner {
1177
1166
  width: 1em;
@@ -1215,6 +1204,8 @@ button, input:where([type='button'], [type='reset'], [type='submit']), ::file-se
1215
1204
  .btn-neutral:is(:disabled, [disabled], .btn-disabled):is(:disabled, [disabled], .btn-disabled) {
1216
1205
  border-color: var(--do-transparent);
1217
1206
  background-color: var(--do-transparent);
1207
+ }
1208
+ .btn-neutral:not(i) {
1218
1209
  text-decoration: underline;
1219
1210
  }
1220
1211
  .btn-accent:is(:disabled, [disabled], .btn-disabled):is(:disabled, [disabled], .btn-disabled) {
@@ -1,6 +1,5 @@
1
1
  <script lang="ts">
2
- import Icon from '../../atoms/Icons/Icon.svelte';
3
- import Button from '../../atoms/Button/Button.svelte';
2
+ import {Button, Icon} from '../../atoms/index.ts';
4
3
  import type { iProps } from './iProps.ts';
5
4
 
6
5
  export let color: iProps['color'] = 'btn-primary';
@@ -16,32 +15,31 @@
16
15
 
17
16
  <!-- @component
18
17
  ```Svelte
18
+ <IconButton label?={'text'} color?={'color'} size?={'size'} on:click={()=>{}} disabled?={disabled} loading?={loading} iconName?={'iconName'} iconSize?={'iconSize'} />
19
19
  ```
20
- - `color`: 'btn-primary' | 'btn-secondary' | 'btn-accent' | 'btn-neutral', or any Tailwind color class
21
- - `size`: any Tailwind size class
22
- - `label`: string
23
- - `onClick`: () => void
24
- - `disabled`: boolean
25
- - `loading`: boolean
26
- - `iconName`: any icon name from the Icon component
27
- - `iconSize`: any Tailwind text size class
28
- - `iconColor`: any tailwind color class
29
- - `iconPosition`: 'start' | 'end'
20
+ - `color?`: 'btn-primary' | 'btn-secondary' | 'btn-accent' | 'btn-neutral', or any Tailwind color class
21
+ - `size?`: any Tailwind size class
22
+ - `label?`: string
23
+ - `disabled?`: boolean
24
+ - `loading?`: boolean
25
+ - `iconName?`: any icon name from the Icon component
26
+ - `iconSize?`: any Tailwind text size class
27
+ - `iconColor?`: any tailwind color class
28
+ - `iconPosition?`: 'start' | 'end'
30
29
  ```
31
- @endcomponent
32
30
  -->
33
31
 
34
32
  <Button {...$$restProps} {color} {size} {disabled} on:click>
35
33
 
36
34
  {#if loading}
37
35
  <span
38
- class={`loading loading-spinner ${iconPosition === 'start' ? 'order-1' : 'order-2'}`}
36
+ class={`loading loading-spinner ${iconPosition === 'start' ? 'order-1' : 'order-2'} px-1.5`}
39
37
  class:!inline={loading}
40
38
  role="status">&nbsp;</span
41
39
  >
42
40
  {:else}
43
41
  <div class={`${iconPosition === 'start' ? 'order-1' : 'order-2'}`}>
44
- <Icon name={iconName} size={iconSize} color={iconColor} class='block'/>
42
+ <Icon name={iconName} size={iconSize} color={iconColor}/>
45
43
  </div>
46
44
  {/if}
47
45
  {#if label}
@@ -14,19 +14,18 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
14
14
  }
15
15
  /**
16
16
  * ```Svelte
17
+ * <IconButton label?={'text'} color?={'color'} size?={'size'} on:click={()=>{}} disabled?={disabled} loading?={loading} iconName?={'iconName'} iconSize?={'iconSize'} />
17
18
  * ```
18
- * - `color`: 'btn-primary' | 'btn-secondary' | 'btn-accent' | 'btn-neutral', or any Tailwind color class
19
- * - `size`: any Tailwind size class
20
- * - `label`: string
21
- * - `onClick`: () => void
22
- * - `disabled`: boolean
23
- * - `loading`: boolean
24
- * - `iconName`: any icon name from the Icon component
25
- * - `iconSize`: any Tailwind text size class
26
- * - `iconColor`: any tailwind color class
27
- * - `iconPosition`: 'start' | 'end'
19
+ * - `color?`: 'btn-primary' | 'btn-secondary' | 'btn-accent' | 'btn-neutral', or any Tailwind color class
20
+ * - `size?`: any Tailwind size class
21
+ * - `label?`: string
22
+ * - `disabled?`: boolean
23
+ * - `loading?`: boolean
24
+ * - `iconName?`: any icon name from the Icon component
25
+ * - `iconSize?`: any Tailwind text size class
26
+ * - `iconColor?`: any tailwind color class
27
+ * - `iconPosition?`: 'start' | 'end'
28
28
  * ```
29
- * @endcomponent
30
29
  */
31
30
  declare const IconButton: $$__sveltets_2_IsomorphicComponent<{
32
31
  [x: string]: any;
@@ -5,7 +5,6 @@ export interface iProps extends HTMLButtonAttributes {
5
5
  size?: 'btn-sm' | 'btn-md' | 'btn-lg' | string;
6
6
  label?: string;
7
7
  disabled?: boolean;
8
- onClick?: () => void | undefined;
9
8
  loading?: boolean;
10
9
  iconName: IconNames | '';
11
10
  iconSize?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "do-ui-design-system",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Design system en Svelte + Tailwind + DaisyUI",
5
5
  "author": "Data Observatory",
6
6
  "license": "MIT",
@@ -38,7 +38,20 @@
38
38
  ".": {
39
39
  "types": "./dist/index.d.ts",
40
40
  "svelte": "./dist/index.js",
41
- "import": "./dist/index.js"
41
+ "import": "./dist/index.js",
42
+ "default": "./dist/index.js"
43
+ },
44
+ "./atoms": {
45
+ "types": "./dist/atoms/index.d.ts",
46
+ "svelte": "./dist/atoms/index.js",
47
+ "import": "./dist/atoms/index.js",
48
+ "default": "./dist/atoms/index.js"
49
+ },
50
+ "./molecules": {
51
+ "types": "./dist/molecules/index.d.ts",
52
+ "svelte": "./dist/molecules/index.js",
53
+ "import": "./dist/molecules/index.js",
54
+ "default": "./dist/molecules/index.js"
42
55
  }
43
56
  },
44
57
  "peerDependencies": {