@iroco/ui 0.20.0 → 0.50.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 (95) hide show
  1. package/Alert.svelte +72 -0
  2. package/Alert.svelte.d.ts +18 -0
  3. package/{lib/iroco.css → Button.svelte} +69 -88
  4. package/Button.svelte.d.ts +43 -0
  5. package/DataTable.svelte +94 -0
  6. package/DataTable.svelte.d.ts +27 -0
  7. package/{src/IconBurger.svelte → IconBurger.svelte} +2 -3
  8. package/IconBurger.svelte.d.ts +17 -0
  9. package/{src/IconClose.svelte → IconClose.svelte} +2 -3
  10. package/IconClose.svelte.d.ts +17 -0
  11. package/{src/IconFloppyDisk.svelte → IconFloppyDisk.svelte} +3 -4
  12. package/IconFloppyDisk.svelte.d.ts +18 -0
  13. package/{src/IconInfo.svelte → IconInfo.svelte} +2 -3
  14. package/IconInfo.svelte.d.ts +17 -0
  15. package/{src/IconIrocoLogo.svelte → IconIrocoLogo.svelte} +2 -3
  16. package/IconIrocoLogo.svelte.d.ts +17 -0
  17. package/IconMastodon.svelte +19 -0
  18. package/IconMastodon.svelte.d.ts +18 -0
  19. package/{src/IconMoreSign.svelte → IconMoreSign.svelte} +2 -3
  20. package/IconMoreSign.svelte.d.ts +17 -0
  21. package/{src/IconTrashCan.svelte → IconTrashCan.svelte} +4 -11
  22. package/IconTrashCan.svelte.d.ts +18 -0
  23. package/IrocoLogo.svelte +49 -0
  24. package/IrocoLogo.svelte.d.ts +19 -0
  25. package/{src/Loader.svelte → Loader.svelte} +1 -2
  26. package/Loader.svelte.d.ts +14 -0
  27. package/NavBar.svelte +669 -0
  28. package/NavBar.svelte.d.ts +21 -0
  29. package/Navigation.svelte +325 -0
  30. package/Navigation.svelte.d.ts +19 -0
  31. package/NumberInput.svelte +117 -0
  32. package/NumberInput.svelte.d.ts +25 -0
  33. package/NumberInputSized.svelte +4 -0
  34. package/NumberInputSized.svelte.d.ts +14 -0
  35. package/README.md +21 -31
  36. package/RadioButton.svelte +93 -0
  37. package/RadioButton.svelte.d.ts +23 -0
  38. package/RadioButtonTest.svelte +10 -0
  39. package/RadioButtonTest.svelte.d.ts +19 -0
  40. package/SlottedComponentWrapper.svelte +7 -0
  41. package/SlottedComponentWrapper.svelte.d.ts +23 -0
  42. package/TextInput.svelte +148 -0
  43. package/TextInput.svelte.d.ts +30 -0
  44. package/{src/TopBar.svelte → TopBar.svelte} +0 -0
  45. package/TopBar.svelte.d.ts +23 -0
  46. package/definition.d.ts +28 -0
  47. package/definition.js +35 -0
  48. package/index.d.ts +18 -0
  49. package/index.js +18 -0
  50. package/package.json +71 -113
  51. package/scss/button.scss +57 -55
  52. package/scss/check.scss +45 -46
  53. package/scss/colors.scss +39 -17
  54. package/scss/constants.scss +1 -1
  55. package/scss/containers.scss +126 -130
  56. package/scss/fields/_checkbox.scss +37 -42
  57. package/scss/fields/_input.scss +160 -169
  58. package/scss/fonts.scss +7 -7
  59. package/scss/forms.scss +53 -55
  60. package/scss/iroco.scss +22 -22
  61. package/scss/layouts.scss +21 -7
  62. package/scss/loader.scss +18 -16
  63. package/scss/style.scss +5 -5
  64. package/lib/button.scss +0 -61
  65. package/lib/check.scss +0 -48
  66. package/lib/colors.scss +0 -23
  67. package/lib/constants.scss +0 -1
  68. package/lib/containers.scss +0 -226
  69. package/lib/fields/_checkbox.scss +0 -44
  70. package/lib/fields/_input.scss +0 -171
  71. package/lib/fields/_style.scss +0 -2
  72. package/lib/fonts.scss +0 -11
  73. package/lib/forms.scss +0 -67
  74. package/lib/index.js +0 -5807
  75. package/lib/index.min.js +0 -330
  76. package/lib/index.mjs +0 -5780
  77. package/lib/index.mjs.css +0 -906
  78. package/lib/iroco.css.map +0 -1
  79. package/lib/iroco.scss +0 -37
  80. package/lib/layouts.scss +0 -7
  81. package/lib/loader.scss +0 -20
  82. package/lib/style.scss +0 -5
  83. package/src/Alert.svelte +0 -34
  84. package/src/Button.svelte +0 -24
  85. package/src/DataTable.svelte +0 -72
  86. package/src/Icon.svelte +0 -29
  87. package/src/IconMastodon.svelte +0 -13
  88. package/src/IrocoLogo.svelte +0 -45
  89. package/src/NavBar.svelte +0 -154
  90. package/src/Navigation.svelte +0 -107
  91. package/src/NumberInput.svelte +0 -23
  92. package/src/RadioButton.svelte +0 -56
  93. package/src/TextInput.svelte +0 -119
  94. package/src/definition.ts +0 -30
  95. package/src/index.ts +0 -21
@@ -1,44 +1,39 @@
1
1
  .ui-fields-checkbox {
2
-
3
- >.container {
4
- display: flex;
5
- align-items: center;
6
- justify-content: flex-start;
7
-
8
- >label {
9
- @include Arial(.9em, $blue, bold);
10
- letter-spacing: .05em;
11
- text-transform: uppercase;
12
- display: inline-block;
13
- margin-left: 20px;
14
-
15
- @include small-screen() {
16
- font-size: .8em;
17
- margin-left: 15px;
18
- }
19
-
20
- }
21
- }
22
-
23
- >.error, >.warning {
24
- display: flex;
25
- align-items: center;
26
- justify-content: flex-start;
27
- margin-top: 15px;
28
-
29
- >span {
30
- @include Arial(.9em, $red);
31
- margin-left: 10px;
32
- }
33
-
34
- }
35
-
36
- >.warning {
37
-
38
- >span {
39
- color: $blue;
40
- }
41
-
42
- }
43
-
2
+ > .container {
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: flex-start;
6
+
7
+ > label {
8
+ @include Arial(0.9em, $blue, bold);
9
+ letter-spacing: 0.05em;
10
+ text-transform: uppercase;
11
+ display: inline-block;
12
+ margin-left: 20px;
13
+
14
+ @include small-screen() {
15
+ font-size: 0.8em;
16
+ margin-left: 15px;
17
+ }
18
+ }
19
+ }
20
+
21
+ > .error,
22
+ > .warning {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: flex-start;
26
+ margin-top: 15px;
27
+
28
+ > span {
29
+ @include Arial(0.9em, $red);
30
+ margin-left: 10px;
31
+ }
32
+ }
33
+
34
+ > .warning {
35
+ > span {
36
+ color: $blue;
37
+ }
38
+ }
44
39
  }
@@ -1,171 +1,162 @@
1
1
  .ui-fields-input {
2
- width: 100%;
3
- transition: width linear 100ms;
4
-
5
- > label {
6
- @include Arial(1em, white, bold);
7
- letter-spacing: .05em;
8
- text-transform: uppercase;
9
- padding-bottom: 10px;
10
- display: inline-block;
11
- }
12
-
13
- input, input:active, input:focus {
14
- border: none;
15
- outline: none;
16
- text-decoration: none;
17
- background: transparent;
18
-
19
- }
20
-
21
- >.container {
22
- transition: background linear 100ms;
23
- background: white;
24
- width: 100%;
25
- display: flex;
26
- align-items: center;
27
- justify-content: space-between;
28
- position: relative;
29
-
30
- &:after {
31
- content: "";
32
- display: block;
33
- position: absolute;
34
- bottom: 0;
35
- left: 0;
36
- width: 0;
37
- height: 3px;
38
- background: $green;
39
- transition: all 400ms cubic-bezier(0.215, 0.61, 0.355, 1);
40
- }
41
-
42
- >.left-icon {
43
- padding-left: 15px;
44
- }
45
-
46
- >input {
47
- @include Arial(1em, $darkBlue);
48
- flex: 1;
49
- padding: 10px 15px;
50
- text-overflow: ellipsis;
51
- white-space: nowrap;
52
- overflow: hidden;
53
-
54
- &::placeholder {
55
- color: rgba($darkBlue, .3);
56
- font-style: italic;
57
- }
58
-
59
- }
60
-
61
- >.suggestions {
62
- overflow: hidden;
63
- visibility: hidden;
64
- opacity: 0;
65
- position: absolute;
66
- background: white;
67
- width: 100%;
68
- top: 100%;
69
- transition: opacity linear 100ms;
70
- @include modal-layout();
71
-
72
- >.suggestion {
73
- display: block;
74
- text-align: left;
75
- width: 100%;
76
- border: none;
77
- cursor: pointer;
78
- -webkit-touch-callout: none;
79
- -webkit-user-select: none;
80
- -khtml-user-select: none;
81
- -moz-user-select: none;
82
- -ms-user-select: none;
83
- user-select: none;
84
- flex-shrink: 0;
85
- border-top: solid $beige 1px;
86
- background: white;
87
- transition: background linear 100ms;
88
-
89
- &:first-child {
90
- border: none;
91
- }
92
-
93
- &:hover, &.selected {
94
- background: $lightGrey;
95
- }
96
-
97
- }
98
-
99
- }
100
- }
101
-
102
- >.instructions {
103
- @include Arial(1em, $darkBeige);
104
- margin-top: 10px;
105
- }
106
-
107
- >.error, >.warning {
108
- display: flex;
109
- align-items: center;
110
- justify-content: flex-start;
111
- margin-top: 15px;
112
-
113
- >span {
114
- @include Arial(.9em, $red);
115
- margin-left: 10px;
116
- }
117
-
118
- }
119
-
120
- >.warning {
121
-
122
- >span {
123
- color: $blue;
124
- }
125
-
126
- }
127
-
128
- &.active {
129
- >.container {
130
-
131
- &:after {
132
- width: 100%;
133
- }
134
-
135
- >.suggestions.active {
136
- visibility: visible;
137
- opacity: 1;
138
- }
139
- }
140
- }
141
-
142
- &.dark {
143
-
144
- >.container {
145
- background: $darkBlue;
146
-
147
- &:after {
148
- //background: $blue;
149
- }
150
-
151
- >input {
152
- padding: 15px 20px;
153
-
154
- &::placeholder {
155
- color: rgba(white, .3);
156
- }
157
-
158
- }
159
-
160
- }
161
-
162
- &.active, &.touched {
163
- >.container {
164
- background: white;
165
-
166
- }
167
- }
168
-
169
- }
170
-
2
+ width: 100%;
3
+ transition: width linear 100ms;
4
+
5
+ > label {
6
+ @include Arial(1em, white, bold);
7
+ letter-spacing: 0.05em;
8
+ text-transform: uppercase;
9
+ padding-bottom: 10px;
10
+ display: inline-block;
11
+ }
12
+
13
+ input,
14
+ input:active,
15
+ input:focus {
16
+ border: none;
17
+ outline: none;
18
+ text-decoration: none;
19
+ background: transparent;
20
+ }
21
+
22
+ > .container {
23
+ transition: background linear 100ms;
24
+ background: white;
25
+ width: 100%;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: space-between;
29
+ position: relative;
30
+
31
+ &:after {
32
+ content: '';
33
+ display: block;
34
+ position: absolute;
35
+ bottom: 0;
36
+ left: 0;
37
+ width: 0;
38
+ height: 3px;
39
+ background: $green;
40
+ transition: all 400ms cubic-bezier(0.215, 0.61, 0.355, 1);
41
+ }
42
+
43
+ > .left-icon {
44
+ padding-left: 15px;
45
+ }
46
+
47
+ > input {
48
+ @include Arial(1em, $darkBlue);
49
+ flex: 1;
50
+ padding: 10px 15px;
51
+ text-overflow: ellipsis;
52
+ white-space: nowrap;
53
+ overflow: hidden;
54
+
55
+ &::placeholder {
56
+ color: rgba($darkBlue, 0.3);
57
+ font-style: italic;
58
+ }
59
+ }
60
+
61
+ > .suggestions {
62
+ overflow: hidden;
63
+ visibility: hidden;
64
+ opacity: 0;
65
+ position: absolute;
66
+ background: white;
67
+ width: 100%;
68
+ top: 100%;
69
+ transition: opacity linear 100ms;
70
+ @include modal-layout();
71
+
72
+ > .suggestion {
73
+ display: block;
74
+ text-align: left;
75
+ width: 100%;
76
+ border: none;
77
+ cursor: pointer;
78
+ -webkit-touch-callout: none;
79
+ -webkit-user-select: none;
80
+ -khtml-user-select: none;
81
+ -moz-user-select: none;
82
+ -ms-user-select: none;
83
+ user-select: none;
84
+ flex-shrink: 0;
85
+ border-top: solid $beige 1px;
86
+ background: white;
87
+ transition: background linear 100ms;
88
+
89
+ &:first-child {
90
+ border: none;
91
+ }
92
+
93
+ &:hover,
94
+ &.selected {
95
+ background: $lightGrey;
96
+ }
97
+ }
98
+ }
99
+ }
100
+
101
+ > .instructions {
102
+ @include Arial(1em, $darkBeige);
103
+ margin-top: 10px;
104
+ }
105
+
106
+ > .error,
107
+ > .warning {
108
+ display: flex;
109
+ align-items: center;
110
+ justify-content: flex-start;
111
+ margin-top: 15px;
112
+
113
+ > span {
114
+ @include Arial(0.9em, $red);
115
+ margin-left: 10px;
116
+ }
117
+ }
118
+
119
+ > .warning {
120
+ > span {
121
+ color: $blue;
122
+ }
123
+ }
124
+
125
+ &.active {
126
+ > .container {
127
+ &:after {
128
+ width: 100%;
129
+ }
130
+
131
+ > .suggestions.active {
132
+ visibility: visible;
133
+ opacity: 1;
134
+ }
135
+ }
136
+ }
137
+
138
+ &.dark {
139
+ > .container {
140
+ background: $darkBlue;
141
+
142
+ &:after {
143
+ //background: $blue;
144
+ }
145
+
146
+ > input {
147
+ padding: 15px 20px;
148
+
149
+ &::placeholder {
150
+ color: rgba(white, 0.3);
151
+ }
152
+ }
153
+ }
154
+
155
+ &.active,
156
+ &.touched {
157
+ > .container {
158
+ background: white;
159
+ }
160
+ }
161
+ }
171
162
  }
package/scss/fonts.scss CHANGED
@@ -1,11 +1,11 @@
1
1
  $arial: 'Arial';
2
2
 
3
3
  @mixin Arial($size: 1em, $color: white, $weight: normal) {
4
- font-family: $arial, sans-serif;
5
- font-size: $size;
6
- font-weight: $weight;
7
- color: $color;
8
- margin: 0;
9
- padding: 0;
10
- transition: color ease-out 100ms, font-size ease-out 100ms;
4
+ font-family: $arial, sans-serif;
5
+ font-size: $size;
6
+ font-weight: $weight;
7
+ color: $color;
8
+ margin: 0;
9
+ padding: 0;
10
+ transition: color ease-out 100ms, font-size ease-out 100ms;
11
11
  }
package/scss/forms.scss CHANGED
@@ -1,67 +1,65 @@
1
1
  @use 'colors';
2
2
 
3
3
  .iroco-ui-form {
4
- input, textarea {
5
- outline: none;
6
- text-decoration: none;
7
- font-size: 14px;
4
+ input,
5
+ textarea {
6
+ outline: none;
7
+ text-decoration: none;
8
+ font-size: 14px;
8
9
 
9
- &:focus {
10
- outline: none;
11
- text-decoration: none;
12
- font-size: 14px;
13
- }
14
- }
10
+ &:focus {
11
+ outline: none;
12
+ text-decoration: none;
13
+ font-size: 14px;
14
+ }
15
+ }
15
16
 
16
- .iroco-ui-input {
17
- display: flex;
18
- flex-direction: column;
19
- > input {
20
- color: colors.$beige;
21
- background: colors.$darkBlue;
22
- border: 1px solid colors.$darkBlue;
23
- padding: 1em 1.5em;
24
- text-overflow: ellipsis;
25
- white-space: nowrap;
26
- overflow: hidden;
27
- border-radius: 0.5em;
17
+ .iroco-ui-input {
18
+ display: flex;
19
+ flex-direction: column;
20
+ > input {
21
+ color: colors.$beige;
22
+ background: colors.$darkBlue;
23
+ border: 1px solid colors.$darkBlue;
24
+ padding: 1em 1.5em;
25
+ text-overflow: ellipsis;
26
+ white-space: nowrap;
27
+ overflow: hidden;
28
+ border-radius: 0.5em;
28
29
 
29
- &::placeholder {
30
- color: rgba(colors.$beige, .5);
31
- }
32
- &.error {
33
- border-color: colors.$red;
34
- }
35
- &.readonlyInput{
36
- cursor: not-allowed;
37
- }
38
- }
39
- }
30
+ &::placeholder {
31
+ color: rgba(colors.$beige, 0.5);
32
+ }
33
+ &.error {
34
+ border-color: colors.$red;
35
+ }
36
+ &.readonlyInput {
37
+ cursor: not-allowed;
38
+ }
39
+ }
40
+ }
40
41
 
41
- .iroco-ui-label {
42
- color: rgba(colors.$beige, .6);
43
- font-weight: bold;
44
- padding-bottom: 10px;
45
- display: inline-block;
46
- }
42
+ .iroco-ui-label {
43
+ color: rgba(colors.$beige, 0.6);
44
+ font-weight: bold;
45
+ padding-bottom: 10px;
46
+ display: inline-block;
47
+ }
47
48
 
48
- .field {
49
- margin-top: 20px;
49
+ .field {
50
+ margin-top: 20px;
50
51
 
51
- &:first-child {
52
- margin: 0;
53
- }
54
- }
52
+ &:first-child {
53
+ margin: 0;
54
+ }
55
+ }
55
56
 
56
- >.submit {
57
- margin-top: 40px;
58
- }
57
+ > .submit {
58
+ margin-top: 40px;
59
+ }
59
60
 
60
- p.error {
61
- margin: 0;
62
- color: colors.$red;
63
- }
61
+ p.error {
62
+ margin: 0;
63
+ color: colors.$red;
64
+ }
64
65
  }
65
-
66
-
67
-
package/scss/iroco.scss CHANGED
@@ -1,37 +1,37 @@
1
- @use "colors";
2
- @use "fonts";
3
- @use "style";
1
+ @use 'colors';
2
+ @use 'fonts';
3
+ @use 'style';
4
4
 
5
5
  *,
6
6
  *::before,
7
7
  *::after {
8
- -webkit-box-sizing: border-box;
9
- box-sizing: border-box;
8
+ -webkit-box-sizing: border-box;
9
+ box-sizing: border-box;
10
10
  }
11
11
 
12
12
  a,
13
13
  a:visited,
14
14
  a:active,
15
15
  button {
16
- outline: none;
17
- text-decoration: none;
18
- font-size: 14px;
19
- color: colors.$beige;
16
+ outline: none;
17
+ text-decoration: none;
18
+ font-size: 14px;
19
+ color: colors.$beige;
20
20
  }
21
21
 
22
22
  html {
23
- margin: 0;
24
- padding: 0;
23
+ margin: 0;
24
+ padding: 0;
25
25
 
26
- > body {
27
- @include fonts.Arial(14px, white);
28
- margin: 0;
29
- padding: 0;
30
- cursor: default;
31
- text-rendering: optimizeLegibility;
32
- -webkit-font-smoothing: antialiased;
33
- -moz-osx-font-smoothing: grayscale;
34
- font-kerning: normal;
35
- background: colors.$darkBlue;
36
- }
26
+ > body {
27
+ @include fonts.Arial(14px, white);
28
+ margin: 0;
29
+ padding: 0;
30
+ cursor: default;
31
+ text-rendering: optimizeLegibility;
32
+ -webkit-font-smoothing: antialiased;
33
+ -moz-osx-font-smoothing: grayscale;
34
+ font-kerning: normal;
35
+ background: colors.$darkBlue;
36
+ }
37
37
  }
package/scss/layouts.scss CHANGED
@@ -1,7 +1,21 @@
1
- @mixin background-layout {z-index: -1;}
2
- @mixin page-layout {z-index: 1;}
3
- @mixin foreground-layout {z-index: 2;}
4
- @mixin header-layout {z-index: 3;}
5
- @mixin menu-layout {z-index: 4;}
6
- @mixin modal-layout {z-index: 5;}
7
- @mixin popup-layout {z-index: 6;}
1
+ @mixin background-layout {
2
+ z-index: -1;
3
+ }
4
+ @mixin page-layout {
5
+ z-index: 1;
6
+ }
7
+ @mixin foreground-layout {
8
+ z-index: 2;
9
+ }
10
+ @mixin header-layout {
11
+ z-index: 3;
12
+ }
13
+ @mixin menu-layout {
14
+ z-index: 4;
15
+ }
16
+ @mixin modal-layout {
17
+ z-index: 5;
18
+ }
19
+ @mixin popup-layout {
20
+ z-index: 6;
21
+ }
package/scss/loader.scss CHANGED
@@ -1,20 +1,22 @@
1
1
  .ui-loader {
2
- display: inline-block;
3
- position: relative;
2
+ display: inline-block;
3
+ position: relative;
4
4
 
5
- @keyframes spin {
6
- 0% { transform: rotate(0deg); }
7
- 100% { transform: rotate(360deg); }
8
- }
9
-
10
- >div {
11
- position: absolute;
12
- width: 100%;
13
- height: 100%;
14
- border-style: solid;
15
- border-radius: 50%;
16
- animation: spin 1s linear infinite;
17
-
18
- }
5
+ @keyframes spin {
6
+ 0% {
7
+ transform: rotate(0deg);
8
+ }
9
+ 100% {
10
+ transform: rotate(360deg);
11
+ }
12
+ }
19
13
 
14
+ > div {
15
+ position: absolute;
16
+ width: 100%;
17
+ height: 100%;
18
+ border-style: solid;
19
+ border-radius: 50%;
20
+ animation: spin 1s linear infinite;
21
+ }
20
22
  }