@ibis-design/svelte 0.2.0 → 0.6.0

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 (73) hide show
  1. package/README.md +12 -2
  2. package/dist/components/buttons/Button.svelte +106 -0
  3. package/dist/components/buttons/Button.svelte.d.ts +69 -0
  4. package/dist/components/buttons/DropdownButton.svelte +91 -0
  5. package/dist/components/buttons/DropdownButton.svelte.d.ts +33 -0
  6. package/dist/components/buttons/PillTab.svelte +84 -0
  7. package/dist/components/buttons/PillTab.svelte.d.ts +55 -0
  8. package/dist/components/buttons/button.css +193 -0
  9. package/dist/components/buttons/dropdownButton.css +82 -0
  10. package/dist/components/buttons/pillTab.css +59 -0
  11. package/dist/components/containers/Banner.svelte +73 -0
  12. package/dist/components/containers/Banner.svelte.d.ts +16 -0
  13. package/dist/components/containers/Card.svelte +34 -0
  14. package/dist/components/containers/Card.svelte.d.ts +14 -0
  15. package/dist/components/containers/PillTabs.svelte +22 -0
  16. package/dist/components/containers/PillTabs.svelte.d.ts +6 -0
  17. package/dist/components/containers/TipIndicator.svelte +78 -0
  18. package/dist/components/containers/TipIndicator.svelte.d.ts +28 -0
  19. package/dist/components/containers/Toaster.svelte +75 -0
  20. package/dist/components/containers/Toaster.svelte.d.ts +16 -0
  21. package/dist/components/containers/Tooltip.svelte.d.ts +26 -0
  22. package/dist/components/containers/banner.css +155 -0
  23. package/dist/components/containers/tipIndicator.css +79 -0
  24. package/dist/components/containers/toaster.css +137 -0
  25. package/dist/components/containers/tooltip.css +0 -0
  26. package/dist/components/inputs/.gitkeep +0 -0
  27. package/dist/components/inputs/Checkbox.svelte +95 -0
  28. package/dist/components/inputs/Checkbox.svelte.d.ts +33 -0
  29. package/dist/components/inputs/Chips.svelte +104 -0
  30. package/dist/components/inputs/Chips.svelte.d.ts +48 -0
  31. package/dist/components/inputs/Dropdown.svelte +83 -0
  32. package/dist/components/inputs/Dropdown.svelte.d.ts +15 -0
  33. package/dist/components/inputs/Radio.svelte +109 -0
  34. package/dist/components/inputs/Radio.svelte.d.ts +49 -0
  35. package/dist/components/inputs/Switch.svelte +45 -0
  36. package/dist/components/inputs/Switch.svelte.d.ts +21 -0
  37. package/dist/components/inputs/TextArea.svelte +65 -0
  38. package/dist/components/inputs/TextArea.svelte.d.ts +14 -0
  39. package/dist/components/inputs/TextInput.svelte +273 -0
  40. package/dist/components/inputs/TextInput.svelte.d.ts +140 -0
  41. package/dist/components/inputs/TextLink.svelte +102 -0
  42. package/dist/components/inputs/TextLink.svelte.d.ts +21 -0
  43. package/dist/components/inputs/checkbox.css +103 -0
  44. package/dist/components/inputs/chips.css +76 -0
  45. package/dist/components/inputs/dropdown.css +106 -0
  46. package/dist/components/inputs/radio.css +108 -0
  47. package/dist/components/inputs/switch.css +68 -0
  48. package/dist/components/inputs/textInput.css +152 -0
  49. package/dist/components/inputs/textarea.css +91 -0
  50. package/dist/components/inputs/textlink.css +163 -0
  51. package/dist/index.d.ts +21 -8
  52. package/dist/index.js +36 -2000
  53. package/dist/layouts/AppLayout.svelte +83 -0
  54. package/dist/layouts/AppLayout.svelte.d.ts +20 -0
  55. package/dist/layouts/AuthLayout.svelte +63 -0
  56. package/dist/layouts/AuthLayout.svelte.d.ts +18 -0
  57. package/dist/layouts/DashboardLayout.svelte +88 -0
  58. package/dist/layouts/DashboardLayout.svelte.d.ts +20 -0
  59. package/dist/types/button.js +5 -0
  60. package/dist/types/index.d.ts +2 -2
  61. package/dist/types/index.js +5 -0
  62. package/dist/types/layout.d.ts +1 -1
  63. package/dist/types/layout.js +1 -0
  64. package/package.json +49 -44
  65. package/dist/index.css +0 -1
  66. package/dist/index.js.map +0 -1
  67. package/dist/lib/components/buttons/Button.svelte.d.ts +0 -1
  68. package/dist/lib/components/buttons/DropdownButton.svelte.d.ts +0 -1
  69. package/dist/lib/components/containers/Card.svelte.d.ts +0 -1
  70. package/dist/lib/layouts/AppLayout.svelte.d.ts +0 -1
  71. package/dist/lib/layouts/AuthLayout.svelte.d.ts +0 -1
  72. package/dist/lib/layouts/DashboardLayout.svelte.d.ts +0 -1
  73. /package/dist/{types/input.d.ts → components/containers/Tooltip.svelte} +0 -0
@@ -0,0 +1,152 @@
1
+ .ibis-input {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--spacing-1);
5
+ width: 100%;
6
+ max-width: 300px;
7
+ max-height: 4rem;
8
+ }
9
+
10
+ .ibis-input__label {
11
+ font-size: var(--font-size-normal-text-default);
12
+ color: var(--color-neutral-700);
13
+ }
14
+
15
+ .ibis-input__label-wrapper {
16
+ display: flex;
17
+ flex-direction: column;
18
+ gap: 2px;
19
+ }
20
+
21
+ .ibis-input__description {
22
+ font-size: var(--font-size-normal-text-sm);
23
+ color: var(--color-neutral-500);
24
+ }
25
+
26
+ .ibis-input__wrapper {
27
+ display: flex;
28
+ align-items: stretch;
29
+ border-radius: var(--border-radius-lg);
30
+ overflow: hidden;
31
+ background-color: var(--color-neutral-100);
32
+ }
33
+
34
+ .ibis-input__prepend {
35
+ display: flex;
36
+ align-items: center;
37
+ padding: 0 var(--spacing-3);
38
+ border: var(--border-width-default) solid var(--color-neutral-200);
39
+ border-right: none;
40
+ border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
41
+ position: relative;
42
+ white-space: nowrap;
43
+ }
44
+
45
+ .ibis-input__field-wrapper {
46
+ display: flex;
47
+ align-items: center;
48
+ flex: 1;
49
+ border: var(--border-width-default) solid var(--color-neutral-200);
50
+ /* border-left: none; */
51
+ border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
52
+ }
53
+
54
+ .ibis-input__wrapper--with-prepend .ibis-input__field-wrapper {
55
+ border-left: none;
56
+ border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
57
+ }
58
+
59
+ .ibis-input__wrapper:not(.ibis-input__wrapper--with-prepend) .ibis-input__field-wrapper {
60
+ border-radius: var(--border-radius-lg);
61
+ }
62
+
63
+ .ibis-input__prepend::after {
64
+ content: '';
65
+ position: absolute;
66
+ right: 0;
67
+ top: 0;
68
+ bottom: 0;
69
+ width: 2px;
70
+ background-color: var(--color-neutral-200);
71
+ }
72
+
73
+ .ibis-input__field {
74
+ flex: 1;
75
+ width: 100%;
76
+ min-width: 0;
77
+ border: none;
78
+ outline: none;
79
+ background: transparent;
80
+ }
81
+
82
+ .ibis-input__prefix,
83
+ .ibis-input__suffix {
84
+ display: inline-flex;
85
+ align-items: center;
86
+ padding: 0 var(--spacing-2);
87
+ }
88
+
89
+ .ibis-input__help {
90
+ font-size: var(--font-size-normal-text-sm);
91
+ color: var(--color-neutral-500);
92
+ }
93
+
94
+ .ibis-input__error {
95
+ font-size: var(--font-size-normal-text-sm);
96
+ color: var(--color-status-error);
97
+ }
98
+
99
+ /* sizes */
100
+ .ibis-input--sm .ibis-input__field-wrapper {
101
+ padding: var(--spacing-1) var(--spacing-2);
102
+ }
103
+
104
+ .ibis-input--md .ibis-input__field-wrapper {
105
+ padding: var(--spacing-2);
106
+ }
107
+
108
+ .ibis-input--lg .ibis-input__field-wrapper {
109
+ padding: var(--spacing-3) var(--spacing-4);
110
+ }
111
+
112
+ .ibis-input:not(.ibis-input--disabled):not(.ibis-input--invalid)
113
+ .ibis-input__field-wrapper:not(:focus-within):hover {
114
+ border-color: var(--color-neutral-300);
115
+ }
116
+
117
+ .ibis-input__field-wrapper:focus-within {
118
+ border-color: var(--color-primary-400);
119
+ }
120
+
121
+ .ibis-input--invalid .ibis-input__field-wrapper {
122
+ border-color: var(--color-status-error);
123
+ border-width: var(--border-width-thin);
124
+ }
125
+
126
+ .ibis-input--invalid:not(.ibis-input--disabled):not(:focus-within)
127
+ .ibis-input__field-wrapper:hover {
128
+ border-width: var(--border-width-default);
129
+ }
130
+
131
+ .ibis-input--invalid:not(.ibis-input--disabled) .ibis-input__field-wrapper:focus-within {
132
+ border-width: var(--border-width-default);
133
+ }
134
+
135
+ .ibis-input__wrapper:not(:focus-within):hover .ibis-input__prepend::after {
136
+ background-color: var(--color-neutral-300);
137
+ }
138
+
139
+ .ibis-input__wrapper:focus-within .ibis-input__prepend::after {
140
+ background-color: var(--color-primary-400);
141
+ }
142
+
143
+ .ibis-input--invalid .ibis-input__prepend::after {
144
+ background-color: var(--color-status-error);
145
+ }
146
+
147
+ /* disabled */
148
+ .ibis-input--disabled .ibis-input__prepend,
149
+ .ibis-input--disabled .ibis-input__field-wrapper {
150
+ background-color: var(--color-neutral-400);
151
+ opacity: 0.5;
152
+ }
@@ -0,0 +1,91 @@
1
+ .ibis-input {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: var(--spacing-1);
5
+ width: 100%;
6
+ max-width: 400px;
7
+ }
8
+
9
+ .ibis-input__label {
10
+ font-size: var(--font-size-normal-text-default);
11
+ color: var(--color-neutral-700);
12
+ }
13
+
14
+ .ibis-input__wrapper {
15
+ display: flex;
16
+ flex-direction: column0;
17
+ border-radius: var(--border-radius-lg);
18
+ overflow: hidden;
19
+ background-color: var(--color-neutral-100);
20
+ border: var(--border-width-default) solid var(--color-neutral-200);
21
+ }
22
+
23
+ .ibis-input__field {
24
+ flex: 1;
25
+ width: 100%;
26
+ min-width: 0;
27
+ border: none;
28
+ outline: none;
29
+ background: transparent;
30
+ font-family: var(--font-family-sans);
31
+ font-size: inherit;
32
+ resize: vertical;
33
+ /* min-height: 80px; */
34
+ line-height: 1.4;
35
+ display: block;
36
+ box-sizing: border-box;
37
+ }
38
+
39
+ .ibis-input__help {
40
+ font-size: var(--font-size-normal-text-sm);
41
+ color: var(--color-neutral-500);
42
+ }
43
+
44
+ .ibis-input__error {
45
+ font-size: var(--font-size-normal-text-sm);
46
+ color: var(--color-status-error);
47
+ }
48
+
49
+ /* Sizes */
50
+ .ibis-input--sm .ibis-input__field {
51
+ padding: var(--spacing-1) var(--spacing-2);
52
+ }
53
+
54
+ .ibis-input--md .ibis-input__field {
55
+ padding: var(--spacing-2);
56
+ }
57
+
58
+ .ibis-input--lg .ibis-input__field {
59
+ padding: var(--spacing-3) var(--spacing-4);
60
+ }
61
+
62
+ /* Hover */
63
+ .ibis-input:not(.ibis-input--disabled):not(.ibis-input--invalid)
64
+ .ibis-input__wrapper:not(:focus-within):hover {
65
+ border-color: var(--color-neutral-300);
66
+ }
67
+
68
+ /* Focus */
69
+ .ibis-input__wrapper:focus-within {
70
+ border-color: var(--color-primary-400);
71
+ }
72
+
73
+ /* Invalid */
74
+ .ibis-input--invalid .ibis-input__wrapper {
75
+ border-color: var(--color-status-error);
76
+ border-width: var(--border-width-thin);
77
+ }
78
+
79
+ .ibis-input--invalid:not(.ibis-input--disabled):not(:focus-within) .ibis-input__wrapper:hover {
80
+ border-width: var(--border-width-default);
81
+ }
82
+
83
+ .ibis-input--invalid:not(.ibis-input--disabled) .ibis-input__wrapper:focus-within {
84
+ border-width: var(--border-width-default);
85
+ }
86
+
87
+ /* Disabled */
88
+ .ibis-input--disabled .ibis-input__wrapper {
89
+ background-color: var(--color-neutral-400);
90
+ opacity: 0.5;
91
+ }
@@ -0,0 +1,163 @@
1
+ .ibis-link {
2
+ position: relative;
3
+ display: inline-flex;
4
+ align-items: center;
5
+ gap: var(--spacing-1);
6
+
7
+ color: #522398; /*hardcoded*/
8
+ text-decoration: none;
9
+ cursor: pointer;
10
+
11
+ transition:
12
+ color var(--transition-duration-fast) var(--transition-timing-default),
13
+ opacity var(--transition-duration-fast) var(--transition-timing-default);
14
+ }
15
+
16
+ /* content */
17
+ .ibis-link__content {
18
+ display: inline-flex;
19
+ align-items: center;
20
+ gap: var(--spacing-1);
21
+ }
22
+
23
+ .ibis-link__content--hidden {
24
+ visibility: hidden;
25
+ }
26
+
27
+ /* sizes */
28
+ .ibis-link--sm {
29
+ font-size: var(--font-size-normal-text-sm);
30
+ }
31
+
32
+ .ibis-link--md {
33
+ font-size: var(--font-size-normal-text-default);
34
+ }
35
+
36
+ .ibis-link--lg {
37
+ font-size: var(--font-size-normal-text-lg);
38
+ }
39
+
40
+ /* underline */
41
+ .ibis-link--underline-always {
42
+ text-decoration: underline;
43
+ }
44
+
45
+ .ibis-link--underline-hover:hover {
46
+ text-decoration: underline;
47
+ }
48
+
49
+ .ibis-link--underline-none {
50
+ text-decoration: none;
51
+ }
52
+
53
+ /* states */
54
+ .ibis-link:hover {
55
+ color: #522398; /*hardcoded*/
56
+ }
57
+
58
+ .ibis-link:active {
59
+ color: var(--color-primary-600);
60
+ }
61
+
62
+ .ibis-link:focus-visible {
63
+ outline: 2px solid #522398; /*hardcoded*/
64
+ outline-offset: 2px;
65
+ }
66
+
67
+ /* disabled */
68
+ .ibis-link--disabled {
69
+ color: #8d8d8e; /*hardcoded*/
70
+ cursor: not-allowed;
71
+ pointer-events: none;
72
+ text-decoration: none;
73
+ }
74
+
75
+ /* loading */
76
+ .ibis-link--loading {
77
+ cursor: not-allowed;
78
+ pointer-events: none;
79
+ }
80
+
81
+ .ibis-link__loader {
82
+ position: absolute;
83
+ width: 1em;
84
+ height: 1em;
85
+ border: var(--border-width-default) solid currentColor;
86
+ border-top-color: transparent;
87
+ border-radius: 50%;
88
+ animation: ibis-spin 0.8s linear infinite;
89
+ top: 50%;
90
+ left: 50%;
91
+ transform: translate(-50%, -50%);
92
+ }
93
+
94
+ @keyframes ibis-spin {
95
+ from {
96
+ transform: translate(-50%, -50%) rotate(0deg);
97
+ }
98
+ to {
99
+ transform: translate(-50%, -50%) rotate(360deg);
100
+ }
101
+ }
102
+
103
+ /* skeleton */
104
+ .ibis-link--skeleton {
105
+ position: relative;
106
+ overflow: hidden;
107
+ color: transparent;
108
+ cursor: default;
109
+ pointer-events: none;
110
+ }
111
+
112
+ .ibis-link__content--skeleton {
113
+ position: relative;
114
+ color: transparent;
115
+ overflow: hidden;
116
+ }
117
+
118
+ .ibis-link__content--skeleton::after {
119
+ content: '';
120
+ position: absolute;
121
+ inset: 0;
122
+ background-color: var(--color-neutral-400);
123
+ z-index: 1;
124
+ }
125
+
126
+ .ibis-link__content--skeleton::before {
127
+ content: '';
128
+ position: absolute;
129
+ inset: 0;
130
+ background: linear-gradient(
131
+ 90deg,
132
+ rgba(255, 255, 255, 0.25) 0%,
133
+ rgba(255, 255, 255, 0.6) 50%,
134
+ rgba(255, 255, 255, 0.25) 100%
135
+ );
136
+ transform: translateX(-100%);
137
+ animation: ibis-shimmer 2s infinite;
138
+ z-index: 2;
139
+ }
140
+
141
+ @keyframes ibis-shimmer {
142
+ 0% {
143
+ transform: translateX(-100%);
144
+ }
145
+ 100% {
146
+ transform: translateX(100%);
147
+ }
148
+ }
149
+
150
+ /* Icons */
151
+ .ibis-link__icon {
152
+ display: inline-flex;
153
+ align-items: center;
154
+ justify-content: center;
155
+
156
+ width: 0.75em;
157
+ height: 0.75em;
158
+ }
159
+
160
+ .ibis-link__icon :global(svg) {
161
+ width: 100%;
162
+ height: 100%;
163
+ }
package/dist/index.d.ts CHANGED
@@ -13,11 +13,24 @@
13
13
  *
14
14
  * @packageDocumentation
15
15
  */
16
- export { default as Button } from './lib/components/buttons/Button.svelte';
17
- export { default as Button2 } from './lib/components/buttons/Button.svelte';
18
- export { default as DropdownButton } from './lib/components/buttons/DropdownButton.svelte';
19
- export { default as Card } from './lib/components/containers/Card.svelte';
20
- export { default as AuthLayout } from './lib/layouts/AuthLayout.svelte';
21
- export { default as AppLayout } from './lib/layouts/AppLayout.svelte';
22
- export { default as DashboardLayout } from './lib/layouts/DashboardLayout.svelte';
23
- export * from './types/index';
16
+ export { default as Button } from "./components/buttons/Button.svelte";
17
+ export { default as DropdownButton } from "./components/buttons/DropdownButton.svelte";
18
+ export { default as Card } from "./components/containers/Card.svelte";
19
+ export { default as AuthLayout } from "./layouts/AuthLayout.svelte";
20
+ export { default as AppLayout } from "./layouts/AppLayout.svelte";
21
+ export { default as DashboardLayout } from "./layouts/DashboardLayout.svelte";
22
+ export { default as Dropdown } from "./components/inputs/Dropdown.svelte";
23
+ export { default as Chips } from "./components/inputs/Chips.svelte";
24
+ export { default as TextInput } from "./components/inputs/TextInput.svelte";
25
+ export { default as TextArea } from "./components/inputs/TextArea.svelte";
26
+ export { default as Checkbox } from "./components/inputs/Checkbox.svelte";
27
+ export { default as Radio } from "./components/inputs/Radio.svelte";
28
+ export { default as Switch } from "./components/inputs/Switch.svelte";
29
+ export { default as Banner } from "./components/containers/Banner.svelte";
30
+ export { default as PillTab } from "./components/buttons/PillTab.svelte";
31
+ export { default as Toaster } from "./components/containers/Toaster.svelte";
32
+ export { default as TextLink } from "./components/inputs/TextLink.svelte";
33
+ export { default as TipIndicator } from "./components/containers/TipIndicator.svelte";
34
+ export { default as PillTabs } from "./components/containers/PillTabs.svelte";
35
+ export { default as Tooltip } from "./components/containers/Tooltip.svelte";
36
+ export * from "./types/index";