4 |
--------------------------------------------------------------------------------
/site/layout/footer.html:
--------------------------------------------------------------------------------
1 |
7 |
--------------------------------------------------------------------------------
/site/layout/header.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Nest
6 |
7 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/site/partials/badge/badge.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/site/partials/breadcrumb/breadcrumb-basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Home
5 |
6 |
7 |
8 |
9 | First
10 |
11 |
12 |
13 |
14 | Second
15 |
16 |
17 |
18 | Current
19 |
20 |
21 |
--------------------------------------------------------------------------------
/site/partials/button/button-basic.html:
--------------------------------------------------------------------------------
1 |
Primary
2 |
Success
3 |
Warning
4 |
Danger
5 |
Normal
6 |
--------------------------------------------------------------------------------
/site/partials/button/button-block.html:
--------------------------------------------------------------------------------
1 |
Block Button
2 |
--------------------------------------------------------------------------------
/site/partials/button/button-disabled.html:
--------------------------------------------------------------------------------
1 |
Disabled
2 |
--------------------------------------------------------------------------------
/site/partials/button/button-link.html:
--------------------------------------------------------------------------------
1 |
Primary
2 |
Success
3 |
Warning
4 |
Danger
5 |
--------------------------------------------------------------------------------
/site/partials/button/button-loading.html:
--------------------------------------------------------------------------------
1 |
Loading
2 |
--------------------------------------------------------------------------------
/site/partials/button/button-outline.html:
--------------------------------------------------------------------------------
1 |
Primary
2 |
Success
3 |
Warning
4 |
Danger
5 |
--------------------------------------------------------------------------------
/site/partials/button/button-size.html:
--------------------------------------------------------------------------------
1 |
Small
2 |
Medium
3 |
Large
4 |
--------------------------------------------------------------------------------
/site/partials/button/button-with-icon.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Prev
4 |
5 |
6 |
7 | Next
8 |
9 |
10 |
--------------------------------------------------------------------------------
/site/partials/checkbox/checkbox-basic.html:
--------------------------------------------------------------------------------
1 |
2 | Option 1
3 | Option 2
4 | Option 3
5 |
6 |
--------------------------------------------------------------------------------
/site/partials/input/input-basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/site/partials/json-tree/json-tree-basic.html:
--------------------------------------------------------------------------------
1 |
22 |
--------------------------------------------------------------------------------
/site/partials/link/link-basic.html:
--------------------------------------------------------------------------------
1 |
normal
2 |
success
3 |
warning
4 |
danger
5 |
--------------------------------------------------------------------------------
/site/partials/pagination/pagination-basic.html:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/site/partials/progress-bar/progress-bar-basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/site/partials/progress-bar/progress-bar-with-label.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/site/partials/radio/radio-basic.html:
--------------------------------------------------------------------------------
1 |
2 | Option 1
3 | Option 2
4 |
5 |
--------------------------------------------------------------------------------
/site/partials/radio/radio-button.html:
--------------------------------------------------------------------------------
1 |
2 | Option 1
3 | Option 2
4 | Option 3
5 | Option 4
6 |
7 |
--------------------------------------------------------------------------------
/site/partials/rate/rate-basic.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/site/partials/slider/slider-basic.html:
--------------------------------------------------------------------------------
1 |
7 |
8 |
15 |
--------------------------------------------------------------------------------
/site/partials/spinner/basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/site/partials/spinner/block.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/site/partials/switch/switch-basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/site/partials/switch/switch-disabled.html:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/site/partials/tag/tag-basic.html:
--------------------------------------------------------------------------------
1 |
normal
2 |
primary
3 |
success
4 |
warning
5 |
danger
6 |
--------------------------------------------------------------------------------
/site/partials/tag/tag-invert.html:
--------------------------------------------------------------------------------
1 |
normal
2 |
primary
3 |
success
4 |
warning
5 |
danger
6 |
--------------------------------------------------------------------------------
/site/partials/tag/tag-round.html:
--------------------------------------------------------------------------------
1 |
normal
2 |
primary
3 |
success
4 |
warning
5 |
danger
6 |
--------------------------------------------------------------------------------
/site/partials/tooltip/tooltip-basic.html:
--------------------------------------------------------------------------------
1 |
2 | Tooltip on left
3 |
4 |
5 |
6 | Tooltip on top
7 |
8 |
9 |
10 | Tooltip on bottom
11 |
12 |
13 |
14 | Tooltip on right
15 |
16 |
--------------------------------------------------------------------------------
/site/partials/tree/tree-basic.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/site/reset.css:
--------------------------------------------------------------------------------
1 | html {
2 | box-sizing: border-box;
3 | }
4 |
5 | html * {
6 | box-sizing: inherit;
7 | }
8 |
9 | body, ul, h1, h2, h3, h4, h5 {
10 | margin: 0;
11 | }
12 |
13 | body {
14 | font-size: 1rem;
15 | line-height: 1.5;
16 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
17 | tab-size: 32px;
18 | }
19 |
20 | button, input, textarea {
21 | outline: none;
22 | }
23 |
24 | hr {
25 | height: 1px;
26 | background-color: #ccc;
27 | margin: 20px 0;
28 | border: none;
29 | }
30 |
31 | pre {
32 | margin: 0;
33 | }
34 |
35 | pre > code {
36 | font-size: 1rem;
37 | }
38 |
39 | fieldset {
40 | border: none;
41 | padding: 0;
42 | margin: 0;
43 | }
44 |
--------------------------------------------------------------------------------
/site/site.css:
--------------------------------------------------------------------------------
1 | .sans-serif {
2 | font-family: -apple-system, BlinkMacSystemFont,
3 | 'avenir next', avenir,
4 | helvetica, 'helvetica neue',
5 | Ubuntu,
6 | 'segoe ui', arial,
7 | sans-serif;
8 | }
9 |
10 | /* Monospaced Typefaces (for code) */
11 |
12 | /* From http://cssfontstack.com */
13 | code, .code {
14 | font-family: Consolas,
15 | monaco,
16 | monospace;
17 | }
18 |
19 | /* Sans-Serif Typefaces */
20 |
21 | .helvetica {
22 | font-family: helvetica, 'helvetica neue',
23 | arial,
24 | sans-serif;
25 | }
26 |
27 | /* Serif Typefaces */
28 |
29 | .georgia {
30 | font-family: georgia,
31 | serif;
32 | }
33 |
34 | .times {
35 | font-family: Times,
36 | serif;
37 | }
38 |
39 | a {
40 | color: #333;
41 | }
42 | .brand {
43 | background-color: #64B5F6;
44 | padding: 100px 0 70px;
45 | min-height: 40%;
46 | color: white;
47 | position: relative
48 | }
49 | .brand .site-name {
50 | font-size: 4rem;
51 | font-weight: 400;
52 | display: inline-block;
53 | }
54 | .copyright {
55 | font-size: 14px;
56 | color: #999;
57 | margin-top: 40px !important
58 | }
59 | .copyright a {
60 | color: #778087;
61 | }
62 | pre {
63 | overflow: auto;
64 | }
65 | .container {
66 | max-width: 620px;
67 | margin: 0 auto;
68 | padding: 0 10px;
69 | }
70 | .main {
71 | padding: 20px 0 0 0;
72 | line-height: 1.7;
73 | font-size: 1.2rem
74 | }
75 | .main p {
76 | margin: 0 0 15px 0;
77 | }
78 | .nav {
79 | position: absolute;
80 | bottom: 0
81 | }
82 | .nav .nav-list {
83 | list-style: none;
84 | padding-left: 0;
85 | overflow: hidden;
86 | }
87 | .nav .nav-item {
88 | float: left;
89 | }
90 | .nav .nav-item a {
91 | margin-right: 20px;
92 | color: white;
93 | text-decoration: none;
94 | border-bottom: 3px solid transparent;
95 | display: block;
96 | height: 40px;
97 | line-height: 40px;
98 | transition: all .3s ease;
99 | }
100 | .nav .nav-item a.active {
101 | border-color: #4780AF;
102 | }
103 | .box-header {
104 | margin-bottom: 20px;
105 | border-bottom: 1px solid #e2e2e2;
106 | padding-bottom: 10px;
107 | }
108 | .box-sub-title {
109 | font-size: 1rem;
110 | margin-bottom: 10px;
111 | }
112 | .element-inline {
113 | border: 1px solid #e2e2e2;
114 | padding: 10px;
115 | border-radius: 2px 2px 0 0;
116 | font-size: 1rem;
117 | }
118 | .example-code {
119 | margin-bottom: 20px;
120 | border: 1px solid #e2e2e2;
121 | border-top: none
122 | }
123 | .example-code pre > code {
124 | font-size: 13px;
125 | }
126 | .footer {
127 | padding: 30px 0 60px;
128 | text-align: center;
129 | }
130 | .footer strong {
131 | color: #E66D6D;
132 | }
133 |
134 | .github-corner:hover .octo-arm {
135 | animation:octocat-wave 560ms ease-in-out
136 | }
137 | @keyframes octocat-wave {
138 | 0%,100% {
139 | transform:rotate(0)
140 | }
141 | 20%,60% {
142 | transform:rotate(-25deg)
143 | }
144 | 40%,80% {
145 | transform:rotate(10deg)
146 | }
147 | }
148 | @media (max-width:500px) {
149 | .github-corner:hover .octo-arm {
150 | animation:none
151 | }
152 | .github-corner .octo-arm {
153 | animation:octocat-wave 560ms ease-in-out
154 | }
155 | }
156 |
157 | /* Override github highlight */
158 |
159 | .hljs-tag, .hljs-name, .hljs-attribute {
160 | color: #3e3e90;
161 | }
162 |
163 | .hljs-number, .hljs-literal, .hljs-variable, .hljs-template-variable, .hljs-tag .hljs-attr {
164 | color: #317f7f;
165 | }
166 |
167 | .hljs-string, .hljs-doctag {
168 | color: #cd1a47;
169 | }
170 |
--------------------------------------------------------------------------------
/src/animations.less:
--------------------------------------------------------------------------------
1 | @keyframes spin {
2 | 0%, 40%, to {
3 | transform: scaleY(.4)
4 | }
5 | 20% {
6 | transform: scaleY(1)
7 | }
8 | }
9 |
10 | :local(.spin) {
11 | animation: spin 1.2s infinite ease-in-out
12 | }
13 |
--------------------------------------------------------------------------------
/src/components/alert/alert.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/alert/alert.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/alert/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "alert.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/badge/badge.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 | display: inline-block;
5 | position: relative;
6 | vertical-align: middle;
7 | line-height: 1;
8 | margin-right: 16px;
9 | }
10 |
11 | :local(.count) {
12 | box-sizing: border-box;
13 | display: block;
14 | padding: 0 6px;
15 | border-radius: 10px;
16 | background-color: @badge-background-color;
17 | position: absolute;
18 | top: -10px;
19 | right: 0;
20 | color: #FFF;
21 | font-size: 12px;
22 | min-width: 20px;
23 | height: 20px;
24 | line-height: 18px;
25 | transform: translateX(50%);
26 | box-shadow: 0 0 0 1px #fff;
27 | border: solid 1px transparent;
28 | }
29 |
30 | :local(.dot) {
31 | min-width: auto;
32 | width: 10px;
33 | height: 10px;
34 | padding: 0;
35 | top: -5px;
36 | }
37 |
--------------------------------------------------------------------------------
/src/components/badge/badge.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | { !countStr || opts.dot === true ? '' : countStr }
5 |
6 |
7 |
40 |
41 |
--------------------------------------------------------------------------------
/src/components/badge/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "badge.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/breadcrumb-item/breadcrumb-item.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-breadcrumb-item {
4 | font-size: 13px;
5 | color: #666;
6 |
7 | &:last-child {
8 | font-weight: bold;
9 |
10 | :local(.sep) {
11 | display: none;
12 | }
13 | }
14 |
15 | a {
16 | color: #666;
17 | text-decoration: none;
18 | }
19 | }
20 |
21 | :local(.sep) {
22 | display: inline-block;
23 | padding: 0 4px;
24 | color: #C5C5C5;
25 | }
26 |
--------------------------------------------------------------------------------
/src/components/breadcrumb-item/breadcrumb-item.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 | { sep }
4 |
5 |
11 |
12 |
--------------------------------------------------------------------------------
/src/components/breadcrumb-item/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "breadcrumb-item.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/breadcrumb/breadcrumb.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 | @import "../../helper.less";
3 |
4 | ui-breadcrumb {
5 | display: inline-block;
6 | }
7 |
--------------------------------------------------------------------------------
/src/components/breadcrumb/breadcrumb.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
7 |
8 |
--------------------------------------------------------------------------------
/src/components/breadcrumb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "breadcrumb.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/button/button.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | .button-color(@color; @background; @border){
4 | color: @color;
5 | background-color: @background;
6 | border: solid 1px @border;
7 | }
8 | .button-style(@color; @background; @border){
9 | .button-color(@color; @background; @border);
10 |
11 | &:hover {
12 | .button-color(@color; tint(@background, 20%); tint(@border, 20%));
13 | }
14 |
15 | &:active {
16 | .button-color(@color; shade(@background, 6%); shade(@border, 6%));
17 | text-shadow: 0 0 1px @color;
18 | }
19 |
20 | &:focus {
21 | box-shadow: 0 0 0 3px tint(@background, 85%);
22 | }
23 | }
24 | .button-outline-style(@color; @background; @border){
25 | .button-color(@color; @background; @border);
26 |
27 | &:hover {
28 | .button-color(@color; tint(@color, 95%); tint(@border, 20%));
29 | }
30 |
31 | &:active {
32 | .button-color(@color; tint(@color, 85%); @border);
33 | }
34 |
35 | &:focus {
36 | box-shadow: 0 0 0 3px transparent;
37 | text-shadow: none;
38 | }
39 | }
40 |
41 | .button-link-style(@color; @background; @border) {
42 | .button-color(@color; @background; @border);
43 |
44 | &:active {
45 | .button-color(shade(@color, 10%); @background; @border);
46 | }
47 |
48 | &:focus {
49 | box-shadow: 0 0 0 3px transparent;
50 | text-shadow: none;
51 | }
52 | }
53 |
54 | ui-button {
55 | display: inline-block;
56 | }
57 |
58 | /* Base */
59 |
60 | :local(.base) {
61 | display: inline-block;
62 | box-sizing: border-box;
63 | border-radius: 4px;
64 | text-align: center;
65 | cursor: pointer;
66 | outline: none;
67 | user-select: none;
68 | white-space: nowrap;
69 | transition: all .15s cubic-bezier(.645,.045,.355,1);
70 | transform: translate3d(0,0,0);
71 | box-shadow: 0 0 0 3px transparent;
72 | }
73 |
74 | :local(.base) > ui-icon {
75 | font-size: 12px;
76 | }
77 |
78 | /* Color */
79 |
80 | :local(.basic) {
81 | .button-color(#666; #f4f4f4; #d9d9d9);
82 | &:hover {
83 | .button-color(@primary-color; #FFF; @primary-color);
84 | }
85 | &:active {
86 | .button-color(shade(@primary-color, 15%); #FFF; shade(@primary-color, 15%));
87 | }
88 | }
89 |
90 | :local(.primary) {
91 | .button-style(#FFF; @primary-color; @primary-color);
92 | }
93 |
94 | :local(.success) {
95 | .button-style(#FFF; @success-color; @success-color);
96 | }
97 |
98 | :local(.warning) {
99 | .button-style(#666; @warning-color; @warning-color);
100 | }
101 |
102 | :local(.danger) {
103 | .button-style(#FFF; @danger-color; @danger-color);
104 | }
105 |
106 | /* Outline */
107 |
108 | :local(.primary.outline) {
109 | .button-outline-style(@primary-color; #FFF; @primary-color);
110 | }
111 |
112 | :local(.success.outline) {
113 | .button-outline-style(@success-color; #FFF; @success-color);
114 | }
115 |
116 | :local(.warning.outline) {
117 | .button-outline-style(@warning-color; #FFF; @warning-color);
118 | }
119 |
120 | :local(.danger.outline) {
121 | .button-outline-style(@danger-color; #FFF; @danger-color);
122 | }
123 |
124 | /* Link */
125 |
126 | :local(.primary.link) {
127 | .button-link-style(@primary-color; transparent; transparent);
128 | }
129 |
130 | :local(.success.link) {
131 | .button-link-style(@success-color; transparent; transparent);
132 | }
133 |
134 | :local(.warning.link) {
135 | .button-link-style(@warning-color; transparent; transparent);
136 | }
137 |
138 | :local(.danger.link) {
139 | .button-link-style(@danger-color; transparent; transparent);
140 | }
141 |
142 | /* Size */
143 |
144 | :local(.sm) {
145 | font-size: 11px;
146 | padding: 0 11px;
147 | height: 30px;
148 | }
149 |
150 | :local(.md) {
151 | font-size: 13px;
152 | padding: 0 15px;
153 | height: 32px;
154 | }
155 |
156 | :local(.lg) {
157 | font-size: 15px;
158 | padding: 0 15px;
159 | height: 37px;
160 | }
161 |
162 | /* Disabled */
163 |
164 | :local(.disabled) {
165 | cursor: @disabled-cursor;
166 | .button-color(@disabled-text-color; #f4f4f4; #d9d9d9);
167 |
168 | &:hover {
169 | .button-color(@disabled-text-color; #f4f4f4; #d9d9d9);
170 | }
171 |
172 | &:active {
173 | .button-color(@disabled-text-color; #f4f4f4; #d9d9d9);
174 | }
175 |
176 | &:focus {
177 | box-shadow: none;
178 | }
179 | }
180 |
181 | /* */
182 |
183 | @keyframes loadingCircle {
184 | 0% {
185 | transform-origin: 50% 50%;
186 | transform: rotate(0deg);
187 | }
188 |
189 | 100% {
190 | transform-origin: 50% 50%;
191 | transform: rotate(360deg);
192 | }
193 | }
194 |
195 | :local(.loading) {
196 | animation: loadingCircle .9s infinite linear;
197 | }
198 |
199 | /* block */
200 |
201 | ui-button[block] {
202 | width: 100%;
203 |
204 | :local(.base) {
205 | width: 100%;
206 | }
207 | }
208 |
--------------------------------------------------------------------------------
/src/components/button/button.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
42 |
43 |
--------------------------------------------------------------------------------
/src/components/button/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "button.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/checkbox-group/checkbox-group.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-checkbox-group {
4 | ui-checkbox {
5 | margin-right: 8px;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/components/checkbox-group/checkbox-group.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
48 |
49 |
--------------------------------------------------------------------------------
/src/components/checkbox-group/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "checkbox-group.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/checkbox/checkbox.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-checkbox {
4 | display: inline-block;
5 | cursor: pointer;
6 | color: #666;
7 | user-select: none;
8 | }
9 |
10 | :local(.base) {
11 | box-sizing: border-box;
12 | position: relative;
13 | display: inline-block;
14 | vertical-align: middle;
15 | width: 16px;
16 | height: 16px;
17 | border-radius: 3px;
18 | border: solid 1px #DDD;
19 |
20 | &::after {
21 | content: "";
22 | position: absolute;
23 | transition: all .2s cubic-bezier(0.6, -0.3, 0.5, 1.41);
24 | }
25 |
26 | &:local(.unchecked) {
27 | &::after {
28 | top: 1px;
29 | left: 4px;
30 | width: 4px;
31 | height: 7px;
32 | border: 2px solid #FFF;
33 | border-top: none;
34 | border-left: none;
35 | transform: rotate(15deg) scale(0);
36 | }
37 | }
38 |
39 | &:local(.checked) {
40 | background-color: @primary-color;
41 | border: solid 1px @primary-color;
42 |
43 | &::after {
44 | top: 1px;
45 | left: 4px;
46 | width: 4px;
47 | height: 7px;
48 | border: 2px solid #FFF;
49 | border-top: none;
50 | border-left: none;
51 | transform: rotate(45deg) scale(1);
52 | }
53 | }
54 |
55 | &:local(.halfchecked) {
56 | background-color: @primary-color;
57 | border: solid 1px @primary-color;
58 |
59 | &::after {
60 | top: 6px;
61 | left: 3px;
62 | width: 8px;
63 | height: 0;
64 | border: 1px solid #FFF;
65 | }
66 | }
67 |
68 | & + span {
69 | display: inline-block;
70 | font-size: 13px;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/src/components/checkbox/checkbox.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
45 |
46 |
--------------------------------------------------------------------------------
/src/components/checkbox/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "checkbox.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/col/col.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/col/col.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/col/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "col.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/collapse-pane/collapse-pane.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 | @import "../../helper.less";
3 |
4 | ui-collapse-pane {
5 | display: block;
6 | }
7 |
8 | ui-collapse > ui-collapse-pane:not(:last-child) {
9 | border-bottom: solid 1px @primary-color;
10 | }
11 |
12 | :local(.title) {
13 | background-color: fade(@primary-color, 15%);
14 | color: #FFF;
15 | cursor: pointer;
16 | font-size: 14px;
17 | }
18 |
19 | :local(.title-inner) {
20 | display: inline-block;
21 | padding: 10px;
22 | background-color: @primary-color;
23 | }
24 |
25 | :local(.content) {
26 | box-sizing: border-box;
27 | background-color: #FFF;
28 | transition: height .2s cubic-bezier(.215,.61,.355,1);
29 | }
30 | :local(.content-box) {
31 | padding: 10px;
32 | }
33 | :local(.content-inactive) {
34 | height: 0;
35 | }
36 | :local(.content-active) {
37 | height: auto;
38 | }
39 |
--------------------------------------------------------------------------------
/src/components/collapse-pane/collapse-pane.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | { opts.title }
6 |
7 |
8 |
13 |
14 |
31 |
32 |
--------------------------------------------------------------------------------
/src/components/collapse-pane/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "collapse-pane.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/collapse/collapse.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 |
4 | ui-collapse {
5 | display: block;
6 | border: solid 1px @primary-color;
7 | border-radius: 3px;
8 | overflow: hidden;
9 | }
10 |
--------------------------------------------------------------------------------
/src/components/collapse/collapse.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
13 |
14 |
--------------------------------------------------------------------------------
/src/components/collapse/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "collapse.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/color-picker/color-picker.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/color-picker/color-picker.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/color-picker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "color-picker.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/context-menu/context-menu.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/context-menu/context-menu.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/context-menu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "context-menu.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/date-picker/date-picker.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/date-picker/date-picker.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/date-picker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "date-picker.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/dropdown/dropdown.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/dropdown/dropdown.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/src/components/dropdown/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "dropdown.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/grid/grid.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/grid/grid.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/grid/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "grid.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/icon/icon.less:
--------------------------------------------------------------------------------
1 | ui-icon {
2 | display: inline-block;
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/icon/icon.tag:
--------------------------------------------------------------------------------
1 |
2 | { icon }
3 |
4 |
37 |
38 |
--------------------------------------------------------------------------------
/src/components/icon/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "icon.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/input-nao/input-nao.less:
--------------------------------------------------------------------------------
1 | ui-input-nao {
2 | display: inline-block;
3 | }
4 |
5 | .input {
6 | position: relative;
7 | display: inline-block;
8 | min-width: 170px;
9 | width: calc(100% - 2em);
10 | }
11 |
12 | .input__field {
13 | position: relative;
14 | display: block;
15 | float: right;
16 | width: 60%;
17 | border: none;
18 | border-radius: 0;
19 | background: #f0f0f0;
20 | color: #666;
21 | font-weight: 400;
22 | -webkit-appearance: none; /* for box shadows to show on iOS */
23 | text-overflow: ellipsis;
24 | }
25 |
26 | .input__field:focus {
27 | outline: none;
28 | }
29 |
30 | .input__label {
31 | display: inline-block;
32 | float: right;
33 | padding: 0 1em;
34 | width: 40%;
35 | color: #696969;
36 | font-weight: bold;
37 | font-size: 70.25%;
38 | -webkit-font-smoothing: antialiased;
39 | -moz-osx-font-smoothing: grayscale;
40 | -webkit-touch-callout: none;
41 | user-select: none;
42 | }
43 |
44 | .input__label-content {
45 | position: relative;
46 | display: block;
47 | width: 100%;
48 | }
49 |
50 | .graphic {
51 | position: absolute;
52 | top: 0;
53 | left: 0;
54 | fill: none;
55 | }
56 |
57 | .icon {
58 | color: #ddd;
59 | font-size: 150%;
60 | }
61 |
62 |
63 |
64 |
65 | .input--nao {
66 | overflow: hidden;
67 | padding-top: 1em;
68 | }
69 |
70 | .input__field--nao {
71 | width: 100%;
72 | background: transparent;
73 | color: #666;
74 | font-size: 1.25em;
75 | padding: .2em 0;
76 | }
77 |
78 | .input__label--nao {
79 | position: absolute;
80 | top: 1.5em;
81 | font-size: 0.85em;
82 | left: 0;
83 | display: block;
84 | width: 100%;
85 | text-align: left;
86 | padding: 0em;
87 | pointer-events: none;
88 | transform-origin: 0 0;
89 | transition: transform 0.2s 0.15s, color 1s;
90 | transition-timing-function: ease-out;
91 | }
92 |
93 | .graphic--nao {
94 | stroke: #92989e;
95 | pointer-events: none;
96 | transition: transform 0.7s, stroke 0.7s;
97 | transition-timing-function: cubic-bezier(0, 0.25, 0.5, 1);
98 | }
99 |
100 | .input__field--nao:focus + .input__label--nao,
101 | .input--filled .input__label--nao {
102 | color: #333;
103 | transform: translate3d(0, -1.25em, 0) scale3d(0.75, 0.75, 1);
104 | }
105 |
106 | .input__field--nao:focus ~ .graphic--nao,
107 | .input--filled .graphic--nao {
108 | stroke: #333;
109 | transform: translate3d(-66.6%, 0, 0);
110 | }
111 |
--------------------------------------------------------------------------------
/src/components/input-nao/input-nao.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | { opts.placeholder }
6 |
7 |
8 |
9 |
10 |
11 |
12 |
23 |
24 |
--------------------------------------------------------------------------------
/src/components/input-nao/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "input-nao.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/input/input.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-input {
4 | display: inline-block;
5 | }
6 |
7 | :local(.base) {
8 | width: 100%;
9 | outline: none;
10 | border-radius: 4px;
11 | border: solid 1px #DDD;
12 | color: #666;
13 | transition: all .3s ease;
14 | padding: 6px 8px;
15 | box-sizing: border-box;
16 | height: 32px;
17 | padding: 6px 10px;
18 | font-size: 13px;
19 |
20 | &:hover {
21 | border: solid 1px #C0C0C0;
22 | }
23 |
24 | &:focus {
25 | border: solid 1px @primary-color;
26 | box-shadow: 0 0 0 3px tint(@primary-color, 90%);
27 | }
28 | }
29 |
30 | /* Size */
31 |
32 | :local(.sm) {
33 | height: 30px;
34 | padding: 5px 7px;
35 | font-size: 12px;
36 | }
37 |
38 | :local(.lg) {
39 | height: 37px;
40 | padding: 8px 10px;
41 | font-size: 14px;
42 | }
43 |
44 | :local(.disabled) {
45 | cursor: @disabled-cursor;
46 | background-color: @input-disabled-background-color;
47 |
48 | &:hover {
49 | border: solid 1px #DDD;
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/components/input/input.tag:
--------------------------------------------------------------------------------
1 |
2 |
13 |
14 |
48 |
49 |
--------------------------------------------------------------------------------
/src/components/input/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "input.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/json-tree/json-tree.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | @json-tree-number-color: #3F51B5;
4 | @json-tree-string-color: #CF4643;
5 | @json-tree-boolean-color: #3F51B5;
6 | @json-tree-key-color: #9C27B0;
7 |
8 | :local(.base) {
9 |
10 | }
11 |
12 | .title, .caret {
13 | cursor: pointer;
14 | display: flex;
15 | align-items: center;
16 | }
17 |
18 | .caret {
19 | justify-content: center;
20 | width: 25px;
21 | color: #58666e;
22 | text-align: center;
23 | }
24 |
25 | .key {
26 | color: @json-tree-key-color;
27 | }
28 |
29 | .string {
30 | color: @json-tree-string-color;
31 | }
32 |
33 | .number {
34 | color: @json-tree-number-color;
35 | }
36 |
37 | .boolean {
38 | color: @json-tree-boolean-color;
39 | }
40 |
41 | .object {
42 | color: #333;
43 | }
44 |
45 | .children {
46 | padding-left: 10px;
47 | display: none;
48 | }
49 |
50 | .node.open > .children {
51 | display: block;
52 | }
53 |
54 | .caret-right {
55 | display: block;
56 | }
57 | .caret-down {
58 | display: none;
59 | }
60 | .node.open > .title > .caret-right {
61 | display: none;
62 | }
63 | .node.open > .title > .caret-down {
64 | display: block;
65 | }
66 |
--------------------------------------------------------------------------------
/src/components/json-tree/json-tree.tag:
--------------------------------------------------------------------------------
1 |
2 |
121 |
122 |
--------------------------------------------------------------------------------
/src/components/json-tree/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "json-tree.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/link/link.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | .link-style( @color ) {
4 | color: @color;
5 |
6 | &::after {
7 | background-color: @color;
8 | }
9 |
10 | &:active {
11 | color: shade(@color, 15%);
12 | }
13 |
14 | &:active::after {
15 | background-color: shade(@color, 15%);
16 | }
17 | }
18 |
19 | ui-link {
20 | display: inline-block;
21 | }
22 |
23 | :local(.base) {
24 | position: relative;
25 | display: inline-block;
26 | text-decoration: none;
27 |
28 | &::after {
29 | content: "";
30 | position: absolute;
31 | left: 0;
32 | bottom: 2px;
33 | width: 100%;
34 | height: 1px;
35 | background-color: @primary-color;
36 | transition: all ease 0.2s;
37 | transform: scaleX(0);
38 | }
39 |
40 | &:hover::after {
41 | transform: scaleX(1);
42 | }
43 |
44 | &:active {
45 | color: shade(@primary-color, 15%);
46 | }
47 |
48 | &:active::after {
49 | background-color: shade(@primary-color, 15%);
50 | }
51 | }
52 |
53 | :local(.primary) {
54 | .link-style( @primary-color );
55 | }
56 |
57 | :local(.success) {
58 | .link-style( @success-color );
59 | }
60 |
61 | :local(.warning) {
62 | .link-style( @warning-color );
63 | }
64 |
65 | :local(.danger) {
66 | .link-style( @danger-color );
67 | }
68 |
--------------------------------------------------------------------------------
/src/components/link/link.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
19 |
20 |
--------------------------------------------------------------------------------
/src/components/link/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "link.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/menu-item/menu-item.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-menu-item {
4 | display: block;
5 | white-space: nowrap;
6 | border-bottom: solid 1px transparent;
7 | transition: all ease .3s;
8 | color: #666;
9 | user-select: none;
10 | }
11 |
12 | ui-menu[horizontal] {
13 | & > ui-menu-item {
14 | float: left;
15 | position: relative;
16 | top: 1px;
17 | }
18 |
19 | & > ui-menu-item:hover {
20 | color: @primary-color;
21 | border-bottom: solid 1px @primary-color;
22 | }
23 |
24 | & > ui-submenu ui-menu-item {
25 | line-height: 40px;
26 | }
27 |
28 | & > ui-submenu ui-menu-item:hover {
29 | background-color: tint(@primary-color, 90%);
30 | }
31 | }
32 |
33 | :local(.base) {
34 | padding: 0 20px;
35 | }
36 |
--------------------------------------------------------------------------------
/src/components/menu-item/menu-item.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 | { opts.text }
4 |
5 |
6 |
19 |
20 |
--------------------------------------------------------------------------------
/src/components/menu-item/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "menu-item.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/menu/menu.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-menu {
4 | display: block;
5 | cursor: pointer;
6 | background-color: #FFF;
7 | font-size: 14px;
8 | }
9 |
10 | ui-menu[horizontal] {
11 | border-bottom: solid 1px #DDD;
12 | line-height: 45px;
13 |
14 | &::after {
15 | display: block;
16 | content: "";
17 | height: 0;
18 | clear: both;
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/components/menu/menu.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
12 |
13 |
--------------------------------------------------------------------------------
/src/components/menu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "menu.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/message/message.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-message {
4 | position: fixed;
5 | left: 50%;
6 | transform: translate3d(-50%,0,0);
7 | top: 40px;
8 | border-radius: 5px;
9 | box-shadow: 0 0 3px rgba(0,0,0,.3);
10 | padding: 10px;
11 | font-size: 12px;
12 | display: flex;
13 | align-items: center;
14 | background-color: #FFF;
15 | z-index: 1;
16 | }
17 |
18 | :local(.icon) {
19 | color: @primary-color;
20 | font-size: 15px;
21 | display: block;
22 | margin-right: 5px;
23 | }
24 |
--------------------------------------------------------------------------------
/src/components/message/message.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 | { opts.content }
4 |
5 |
11 |
12 |
--------------------------------------------------------------------------------
/src/components/message/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "message.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/modal/modal.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/modal/modal.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/modal/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "modal.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/number-input/number-input.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/number-input/number-input.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/number-input/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "number-input.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/pagination/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "pagination.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/pagination/pagination.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-pagination, [data-is="ui-pagination"] {
4 | display: inline-block;
5 | user-select: none;
6 |
7 | ui-button:not([primary]) {
8 | button {
9 | transition: none!important;
10 | }
11 | }
12 | }
13 |
14 | :local(.more) {
15 | color: #999;
16 | margin: 0 5px;
17 | }
18 |
--------------------------------------------------------------------------------
/src/components/pagination/pagination.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 | { parent.opts.prevText || 'prev' }
4 |
5 |
6 |
7 | { parent.min }
8 |
9 | ...
10 |
11 | { parent.current - 2 }
12 |
13 |
14 | { parent.current - 1 }
15 |
16 |
17 |
18 |
19 | { v }
20 |
21 |
22 |
23 | { parent.current || parent.min }
24 |
25 |
26 |
27 | { v }
28 |
29 |
30 |
31 |
32 | { parent.current + 1 }
33 |
34 |
35 | { parent.current + 2 }
36 |
37 | ...
38 |
39 | { parent.max }
40 |
41 |
42 |
43 | { parent.opts.nextText || 'next' }
44 |
45 |
46 |
97 |
98 |
--------------------------------------------------------------------------------
/src/components/popover/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "popover.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/popover/popover.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-popover {
4 | position: relative;
5 | }
6 |
7 | :local(.popover) {
8 | position: absolute;
9 | padding: 5px;
10 | left: 50%;
11 | transform: translate3d(-50%,0,0);
12 | min-width: 100px;
13 | text-align: center;
14 |
15 | &::after {
16 | content: "";
17 | display: block;
18 |
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/components/popover/popover.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | hover
6 |
7 |
8 |
19 |
20 |
--------------------------------------------------------------------------------
/src/components/progress-bar/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "progress-bar.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/progress-bar/progress-bar.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-progress-bar {
4 | :local(.progressbar) {
5 | display: flex;
6 | align-items: center;
7 | }
8 | }
9 |
10 | ui-progress-bar {
11 | :local(.progressbar) {
12 | height: 8px;
13 | }
14 | }
15 |
16 | ui-progress-bar[lg] {
17 | :local(.progressbar) {
18 | height: 12px;
19 | }
20 | }
21 |
22 | ui-progress-bar[sm] {
23 | :local(.progressbar) {
24 | height: 5px;
25 | }
26 | }
27 |
28 | :local(.outter) {
29 | height: 100%;
30 | border-radius: 10px;
31 | background-color: #DDD;
32 | overflow: hidden;
33 | flex: 1;
34 | }
35 |
36 | :local(.inner) {
37 | height: 100%;
38 | transition: width ease 1s;
39 | border-radius: 10px;
40 | overflow: hidden;
41 |
42 | &::after {
43 | content: "";
44 | display: block;
45 | height: 100%;
46 | width: 100%;
47 | background-color: #FFF;
48 | animation: progress-bar-active 2s ease infinite;
49 | }
50 | }
51 |
52 | :local(.label) {
53 | margin-left: 10px;
54 | font-size: 12px;
55 | color: #999;
56 | }
57 |
58 | :local(.primary) {
59 | background-color: @primary-color;
60 | }
61 |
62 | :local(.success) {
63 | background-color: @success-color;
64 | }
65 |
66 | :local(.warning) {
67 | background-color: @warning-color;
68 | }
69 |
70 | :local(.danger) {
71 | background-color: @danger-color;
72 | }
73 |
74 | @keyframes progress-bar-active {
75 | 0% {
76 | opacity: .3;
77 | width: 0;
78 | }
79 |
80 | 100% {
81 | opacity: 0;
82 | width: 100%;
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/src/components/progress-bar/progress-bar.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | { this.opts.value }%
8 |
9 |
10 |
11 |
23 |
24 |
--------------------------------------------------------------------------------
/src/components/radio-button/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "radio-button.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/radio-button/radio-button.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-radio-button {
4 | display: inline-block;
5 | }
6 |
7 | :local(.base) {
8 | display: block;
9 | box-sizing: border-box;
10 | padding: 0 12px;
11 | height: 32px;
12 | line-height: 30px;
13 | border: solid 1px #D9D9D9;
14 | cursor: pointer;
15 | font-size: 14px;
16 | color: #666;
17 |
18 | &:hover {
19 | color: @primary-color;
20 | }
21 | }
22 |
23 | ui-radio-group ui-radio-button {
24 | display: block;
25 | float: left;
26 |
27 | :local(.base) {
28 | border-left: none;
29 | }
30 | }
31 |
32 | ui-radio-button:first-child :local(.base) {
33 | border-top-left-radius: 5px;
34 | border-bottom-left-radius: 5px;
35 | border-left: solid 1px #D9D9D9;
36 | }
37 |
38 | ui-radio-button:last-child :local(.base) {
39 | border-top-right-radius: 5px;
40 | border-bottom-right-radius: 5px;
41 | }
42 |
43 | :local(.checked) {
44 | background: #fff;
45 | border-color: @primary-color;
46 | color: @primary-color;
47 | box-shadow: -1px 0 0 0 @primary-color;
48 | }
49 |
50 | ui-radio-button:first-child :local(.checked) {
51 | border-color: @primary-color;
52 | box-shadow: none!important;
53 | }
54 |
55 | :local(.checked):hover {
56 | border-color: tint(@primary-color, 10%);
57 | box-shadow: -1px 0 0 0 tint(@primary-color, 10%);
58 | color: tint(@primary-color, 10%);
59 | }
60 |
61 | :local(.checked):active {
62 | border-color: shade(@primary-color, 10%);
63 | box-shadow: -1px 0 0 0 shade(@primary-color, 10%);
64 | color: shade(@primary-color, 10%);
65 | }
66 |
--------------------------------------------------------------------------------
/src/components/radio-button/radio-button.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
25 |
26 |
--------------------------------------------------------------------------------
/src/components/radio-group/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "radio-group.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/radio-group/radio-group.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 | @import "../../helper.less";
3 |
4 | ui-radio-group {
5 | display: inline-block;
6 | .clearfix();
7 |
8 | ui-radio {
9 | margin-right: 8px;
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/components/radio-group/radio-group.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
60 |
61 |
--------------------------------------------------------------------------------
/src/components/radio/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "radio.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/radio/radio.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-radio {
4 | cursor: pointer;
5 | color: #666;
6 | user-select: none;
7 | }
8 |
9 | :local(.base) {
10 | box-sizing: border-box;
11 | position: relative;
12 | display: inline-block;
13 | width: 16px;
14 | height: 16px;
15 | border-radius: 50%;
16 | vertical-align: middle;
17 | border: solid 1px #DDD;
18 | }
19 |
20 | :local(.base::after) {
21 | content: "";
22 | position: absolute;
23 | width: 8px;
24 | height: 8px;
25 | left: 50%;
26 | top: 50%;
27 | border-radius: 50%;
28 | transform: translate3d(-50%,-50%,0) scale(1.9);
29 | transition: transform .3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
30 | }
31 |
32 | :local(.base.checked) {
33 | background-color: @primary-color;
34 | border: solid 1px @primary-color;
35 | }
36 |
37 | :local(.base.checked::after) {
38 | background-color: #FFF;
39 | transform: translate3d(-50%,-50%,0) scale(1);
40 | }
41 |
42 | :local(.base) + span {
43 | font-size: 14px;
44 | }
45 |
--------------------------------------------------------------------------------
/src/components/radio/radio.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
28 |
29 |
--------------------------------------------------------------------------------
/src/components/rate/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "rate.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/rate/rate.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-rate {
4 | font-size: 0;
5 | }
6 |
7 | @rate-active-color: @warning-color;
8 | @rate-inactive-color: #DDD;
9 |
10 | :local(.wrapper) {
11 | display: inline-block;
12 | }
13 |
14 | :local(.base) {
15 | position: relative;
16 | display: inline-block;
17 | font-size: 18px;
18 | margin-right: 4px;
19 | transition: transform .4s ease;
20 | cursor: pointer;
21 |
22 | &:hover {
23 | transform: scale(1.1);
24 | }
25 |
26 | &:local(.disabled) {
27 | transform: initial;
28 | }
29 |
30 | &::before {
31 | display: block;
32 | content: '\e60c';
33 | }
34 |
35 | :local(.star) {
36 | display: inline-block;
37 | position: absolute;
38 | top: 0;
39 | left: 0;
40 | width: 50%;
41 | overflow: hidden;
42 | pointer-events: none;
43 |
44 | &::before {
45 | display: block;
46 | content: '\e60c';
47 | color: transparent;
48 | }
49 | }
50 |
51 | &:local(.full) {
52 | &::before {
53 | color: @rate-active-color;
54 | }
55 |
56 | :local(.star) {
57 |
58 | }
59 | }
60 |
61 | &:local(.half) {
62 | &::before {
63 | color: @rate-inactive-color;
64 | }
65 |
66 | :local(.star) {
67 | &::before {
68 | color: @rate-active-color;
69 | }
70 | }
71 | }
72 |
73 | &:local(.zero) {
74 | &::before {
75 | color: @rate-inactive-color;
76 | }
77 |
78 | :local(.star) {
79 |
80 | }
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/src/components/rate/rate.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
10 |
11 |
12 |
85 |
86 |
--------------------------------------------------------------------------------
/src/components/renderer/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "renderer.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/renderer/renderer.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/renderer/renderer.tag:
--------------------------------------------------------------------------------
1 |
2 |
26 |
27 |
--------------------------------------------------------------------------------
/src/components/row/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "row.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/row/row.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/row/row.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/slider/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "slider.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/slider/slider.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | @handle-size: 10px;
4 | @handle-hover-size: 14px;
5 | @handle-transition-duration: .3s;
6 |
7 | :local(.base) {
8 | position: relative;
9 |
10 | ui-tooltip {
11 | position: absolute;
12 | }
13 | }
14 |
15 | :local(.handle) {
16 | position: absolute;
17 | width: @handle-size;
18 | height: @handle-size;
19 | top: 50%;
20 | border: solid 1px @primary-color;
21 | background-color: #FFF;
22 | margin-left: -( @handle-size / 2 );
23 | transform: translate3d(0, -50%, 0);
24 | border-radius: 50%;
25 | transition: width ease @handle-transition-duration, height ease @handle-transition-duration, transform ease @handle-transition-duration;
26 | transform-origin: 50% 50%;
27 |
28 | &:hover {
29 | width: @handle-hover-size;
30 | height: @handle-hover-size;
31 | transform: translate3d(-( @handle-hover-size - @handle-size ) / 2, -50%, 0);
32 | }
33 | }
34 |
35 | :local(.tracker) {
36 | background-color: #e6e6e6;
37 | height: 4px;
38 | border-radius: 10px;
39 | margin: 10px 0;
40 | overflow: hidden;
41 |
42 | :local(.tracker-inner) {
43 | height: 100%;
44 | background-color: tint(@primary-color, 45%);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/components/slider/slider.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
15 |
16 |
24 |
25 |
26 |
125 |
126 |
--------------------------------------------------------------------------------
/src/components/spinner/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "spinner.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/spinner/spinner.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-spinner {
4 | display: inline-block;
5 | vertical-align: middle;
6 | text-align: center;
7 | font-size: 0;
8 | }
9 |
10 | ui-spinner[block] {
11 | display: block;
12 | }
13 |
14 | :local(.rect) {
15 | composes: spin from '../../animations.less';
16 | display: inline-block;
17 | background-color: #DDD;
18 | vertical-align: middle;
19 | }
20 |
21 | :local(.rect2) {
22 | animation-delay: -1.1s;
23 | }
24 |
25 | :local(.rect3) {
26 | animation-delay: -1s;
27 | }
28 |
29 | ui-spinner[sm] :local(.rect) {
30 | width: 2px;
31 | height: 10px;
32 |
33 | &:not(:last-child) {
34 | margin-right: 2px;
35 | }
36 | }
37 |
38 | ui-spinner :local(.rect) {
39 | width: 3px;
40 | height: 21px;
41 |
42 | &:not(:last-child) {
43 | margin-right: 3px;
44 | }
45 | }
46 |
47 | ui-spinner[lg] :local(.rect) {
48 | width: 4px;
49 | height: 26px;
50 |
51 | &:not(:last-child) {
52 | margin-right: 4px;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/src/components/spinner/spinner.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
11 |
12 |
--------------------------------------------------------------------------------
/src/components/step/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "step.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/step/step.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/step/step.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/steps/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "ui-steps.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/steps/steps.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/steps/steps.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/submenu/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "submenu.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/submenu/submenu.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-submenu {
4 | display: block;
5 | position: relative;
6 | top: 1px;
7 | padding: 0 20px;
8 | color: #666;
9 | }
10 |
11 | ui-menu[horizontal] {
12 | & > ui-submenu {
13 | float: left;
14 | }
15 |
16 | & > ui-submenu:hover {
17 | color: @primary-color;
18 | border-bottom: solid 1px @primary-color;
19 | }
20 |
21 | & > ui-submenu:hover :local(.items) {
22 | display: block;
23 | }
24 | }
25 |
26 | :local(.items) {
27 | display: none;
28 | position: absolute;
29 | left: 0;
30 | margin-top: 5px;
31 | border: solid 1px #DDD;
32 | border-radius: 3px;
33 | overflow: hidden;
34 | }
35 |
--------------------------------------------------------------------------------
/src/components/submenu/submenu.tag:
--------------------------------------------------------------------------------
1 |
2 | { opts.text }
3 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
--------------------------------------------------------------------------------
/src/components/switch/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "switch.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/switch/switch.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | .switch-size(@width; @height; @distance; @border-radius) {
4 | width: @width;
5 | height: @height;
6 | border-radius: @border-radius;
7 |
8 | &::after {
9 | top: @distance;
10 | left: @distance;
11 | width: @height - @distance * 2;
12 | height: @height - @distance * 2;
13 | }
14 |
15 | &:local(.off)::after {
16 | top: @distance;
17 | left: @distance;
18 | }
19 |
20 | &:local(.on)::after {
21 | top: @distance;
22 | left: @width - @height + @distance;
23 | }
24 | }
25 |
26 | ui-switch {
27 | display: inline-block;
28 | color: #FFF;
29 | vertical-align: middle;
30 | }
31 |
32 | :local(.base) {
33 | position: relative;
34 | background-color: #DDD;
35 | background-color: @primary-color;
36 | padding: 0 5px;
37 | box-sizing: border-box;
38 | user-select: none;
39 | cursor: pointer;
40 | transition: background-color .3s cubic-bezier(.78,.14,.15,.86);
41 | .switch-size(49px; 27px; 2px; 15px);
42 |
43 | &::after {
44 | position: absolute;
45 | content: '';
46 | display: block;
47 | border-radius: 50%;
48 | background-color: #FFF;
49 | transition: left .3s cubic-bezier(.78,.14,.15,.86), background-color .3s cubic-bezier(.78,.14,.15,.86);
50 | }
51 | }
52 |
53 | :local(.off) {
54 | text-align: right;
55 | background-color: #DDD;
56 | }
57 |
58 | :local(.on) {
59 | text-align: left;
60 | background-color: @primary-color;
61 | }
62 |
63 | :local(.sm) {
64 | .switch-size(40px; 22px; 2px; 15px);
65 | }
66 |
67 | :local(.lg) {
68 | .switch-size(54px; 29px; 3px; 16px);
69 | }
70 |
71 | :local(.disabled) {
72 | cursor: not-allowed;
73 | background-color: #EDEDED;
74 |
75 | &::after {
76 | background-color: #DDD;
77 | }
78 | }
79 |
--------------------------------------------------------------------------------
/src/components/switch/switch.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
59 |
60 |
--------------------------------------------------------------------------------
/src/components/table/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "table.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/table/table.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/table/table.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/tabs/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "tabs.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/tabs/tabs.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/tabs/tabs.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/tag/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "tag.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/tag/tag.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | @tag-basic-background-color: #DCDCDC;
4 | @tag-basic-color: #666;
5 |
6 | .tag-color(@color; @background){
7 | color: @color;
8 | background-color: @background;
9 | }
10 | .tag-style(@color; @background) {
11 | .tag-color(@color; @background);
12 |
13 | &:hover {
14 | color: @color;
15 | background-color: shade(@background, 10%);
16 | }
17 | }
18 |
19 | ui-tag, [data-is="ui-tag"] {
20 | display: inline-block;
21 | padding: 0 9px;
22 | font-size: 11px;
23 | border-radius: 3px;
24 | cursor: pointer;
25 | user-select: none;
26 | height: 22px;
27 | line-height: 22px;
28 |
29 | .tag-style(@tag-basic-color, @tag-basic-background-color);
30 |
31 | &[primary] {
32 | .tag-style(#FFF, @primary-color);
33 | }
34 |
35 | &[success] {
36 | .tag-style(#FFF, @success-color);
37 | }
38 |
39 | &[warning] {
40 | .tag-style(#666, @warning-color);
41 | }
42 |
43 | &[danger] {
44 | .tag-style(#FFF, @danger-color);
45 | }
46 |
47 | /* round */
48 |
49 | &[round], &[rounded] {
50 | border-radius: 11px;
51 | }
52 |
53 | /* invert */
54 | /* no-hover-effect */
55 |
56 | &[invert] {
57 | .tag-color(@tag-basic-color, #FFF);
58 | }
59 |
60 | &[primary][invert] {
61 | .tag-color(@primary-color, #FFF);
62 | }
63 |
64 | &[success][invert] {
65 | .tag-color(@success-color, #FFF);
66 | }
67 |
68 | &[warning][invert] {
69 | .tag-color(@warning-color, #FFF);
70 | }
71 |
72 | &[danger][invert] {
73 | .tag-color(@danger-color, #FFF);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/components/tag/tag.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
--------------------------------------------------------------------------------
/src/components/time-picker/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "time-picker.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/time-picker/time-picker.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/time-picker/time-picker.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
--------------------------------------------------------------------------------
/src/components/tooltip/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "tooltip.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/tooltip/tooltip.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.target) {
4 | display: inline-block;
5 | }
6 |
7 | :local(.base) {
8 | position: absolute;
9 | font-size: @tooltip-font-size;
10 | }
11 |
12 | :local(.arrow) {
13 | position: absolute;
14 | width: 0;
15 | height: 0;
16 | border-color: transparent;
17 | border-style: solid;
18 | }
19 |
20 | :local(.content) {
21 | padding: 3px 8px;
22 | max-width: 250px;
23 | color: #FFF;
24 | border-radius: 4px;
25 | background-color: @tooltip-background-color;
26 | text-align: center;
27 | line-height: 1.5;
28 | }
29 |
30 |
31 | /* Placement */
32 |
33 | :local(.bottom) {
34 | padding: 5px 0;
35 |
36 | :local(.arrow) {
37 | top: 1px;
38 | left: 50%;
39 | margin-left: -5px;
40 | border-bottom-color: @tooltip-background-color;
41 | border-width: 0 5px 5px;
42 | }
43 | }
44 |
45 | :local(.top) {
46 | padding: 5px 0;
47 |
48 | :local(.arrow) {
49 | bottom: 1px;
50 | left: 50%;
51 | margin-left: -5px;
52 | border-top-color: @tooltip-background-color;
53 | border-width: 5px 5px 0;
54 | }
55 | }
56 |
57 | :local(.left) {
58 | padding: 0 5px;
59 |
60 | :local(.arrow) {
61 | right: 1px;
62 | top: 50%;
63 | margin-top: -5px;
64 | border-left-color: @tooltip-background-color;
65 | border-width: 5px 0 5px 5px;
66 | }
67 | }
68 |
69 | :local(.right) {
70 | padding: 0 5px;
71 |
72 | :local(.arrow) {
73 | left: 1px;
74 | top: 50%;
75 | margin-top: -5px;
76 | border-right-color: @tooltip-background-color;
77 | border-width: 5px 5px 5px 0;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/src/components/tooltip/tooltip.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | { opts.title }
10 |
11 |
12 |
13 |
124 |
125 |
--------------------------------------------------------------------------------
/src/components/tree-node/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "tree-node.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/tree-node/tree-node.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | ui-tree-node {
4 | display: block;
5 | cursor: pointer;
6 | }
7 |
8 | :local(.title) {
9 | display: inline-block;
10 | font-size: 13px;
11 | color: #666;
12 | }
13 |
14 | :local(.children) {
15 | padding-left: 20px;
16 | }
17 |
--------------------------------------------------------------------------------
/src/components/tree-node/tree-node.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 | { opts.title }
4 |
5 |
6 |
7 |
8 |
82 |
83 |
--------------------------------------------------------------------------------
/src/components/tree/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "main": "tree.tag"
3 | }
4 |
--------------------------------------------------------------------------------
/src/components/tree/tree.less:
--------------------------------------------------------------------------------
1 | @import "../../theme.less";
2 |
3 | :local(.base) {
4 |
5 | }
6 |
--------------------------------------------------------------------------------
/src/components/tree/tree.tag:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
112 |
113 |
--------------------------------------------------------------------------------
/src/font/demo.css:
--------------------------------------------------------------------------------
1 | *{margin: 0;padding: 0;list-style: none;}
2 | /*
3 | KISSY CSS Reset
4 | 理念:1. reset 的目的不是清除浏览器的默认样式,这仅是部分工作。清除和重置是紧密不可分的。
5 | 2. reset 的目的不是让默认样式在所有浏览器下一致,而是减少默认样式有可能带来的问题。
6 | 3. reset 期望提供一套普适通用的基础样式。但没有银弹,推荐根据具体需求,裁剪和修改后再使用。
7 | 特色:1. 适应中文;2. 基于最新主流浏览器。
8 | 维护:玉伯
, 正淳
9 | */
10 |
11 | /** 清除内外边距 **/
12 | body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, /* structural elements 结构元素 */
13 | dl, dt, dd, ul, ol, li, /* list elements 列表元素 */
14 | pre, /* text formatting elements 文本格式元素 */
15 | form, fieldset, legend, button, input, textarea, /* form elements 表单元素 */
16 | th, td /* table elements 表格元素 */ {
17 | margin: 0;
18 | padding: 0;
19 | }
20 |
21 | /** 设置默认字体 **/
22 | body,
23 | button, input, select, textarea /* for ie */ {
24 | font: 12px/1.5 tahoma, arial, \5b8b\4f53, sans-serif;
25 | }
26 | h1, h2, h3, h4, h5, h6 { font-size: 100%; }
27 | address, cite, dfn, em, var { font-style: normal; } /* 将斜体扶正 */
28 | code, kbd, pre, samp { font-family: courier new, courier, monospace; } /* 统一等宽字体 */
29 | small { font-size: 12px; } /* 小于 12px 的中文很难阅读,让 small 正常化 */
30 |
31 | /** 重置列表元素 **/
32 | ul, ol { list-style: none; }
33 |
34 | /** 重置文本格式元素 **/
35 | a { text-decoration: none; }
36 | a:hover { text-decoration: underline; }
37 |
38 |
39 | /** 重置表单元素 **/
40 | legend { color: #000; } /* for ie6 */
41 | fieldset, img { border: 0; } /* img 搭车:让链接里的 img 无边框 */
42 | button, input, select, textarea { font-size: 100%; } /* 使得表单元素在 ie 下能继承字体大小 */
43 | /* 注:optgroup 无法扶正 */
44 |
45 | /** 重置表格元素 **/
46 | table { border-collapse: collapse; border-spacing: 0; }
47 |
48 | /* 清除浮动 */
49 | .ks-clear:after, .clear:after {
50 | content: '\20';
51 | display: block;
52 | height: 0;
53 | clear: both;
54 | }
55 | .ks-clear, .clear {
56 | *zoom: 1;
57 | }
58 |
59 | .main {padding: 30px 100px;}
60 | .main h1{font-size:36px; color:#333; text-align:left;margin-bottom:30px; border-bottom: 1px solid #eee;}
61 |
62 | .helps{margin-top:40px;}
63 | .helps pre{
64 | padding:20px;
65 | margin:10px 0;
66 | border:solid 1px #e7e1cd;
67 | background-color: #fffdef;
68 | overflow: auto;
69 | }
70 |
71 | .icon_lists li{
72 | float:left;
73 | width: 100px;
74 | height:180px;
75 | text-align: center;
76 | }
77 | .icon_lists .icon{
78 | font-size: 42px;
79 | line-height: 100px;
80 | margin: 10px 0;
81 | color:#333;
82 | -webkit-transition: font-size 0.25s ease-out 0s;
83 | -moz-transition: font-size 0.25s ease-out 0s;
84 | transition: font-size 0.25s ease-out 0s;
85 |
86 | }
87 | .icon_lists .icon:hover{
88 | font-size: 100px;
89 | }
90 |
--------------------------------------------------------------------------------
/src/font/demo.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | IconFont
7 |
8 |
9 |
10 |
11 |
12 |
IconFont 图标
13 |
14 |
15 |
16 |
17 | heart
18 | 
19 | .heart
20 |
21 |
22 |
23 |
24 | Search
25 | 
26 | .search
27 |
28 |
29 |
30 |
31 | caret-right
32 | 
33 | .caret-right
34 |
35 |
36 |
37 |
38 | success
39 | 
40 | .success
41 |
42 |
43 |
44 |
45 | caret-down
46 | 
47 | .caretdown
48 |
49 |
50 |
51 |
52 | loading
53 | 
54 | .loading
55 |
56 |
57 |
58 |
59 | code
60 | 
61 | .code
62 |
63 |
64 |
65 |
66 | error
67 | 
68 | .error
69 |
70 |
71 |
72 |
73 | info
74 | 
75 | .guanyuwomen
76 |
77 |
78 |
79 |
80 | star
81 | 
82 | .star
83 |
84 |
85 |
86 |
87 | home
88 | 
89 | .home
90 |
91 |
92 |
93 |
94 | iconfont-unie61e
95 | 
96 | .iconfontunie61e
97 |
98 |
99 |
100 |
101 | iconfont-unie61f
102 | 
103 | .iconfontunie61f
104 |
105 |
106 |
107 |
108 | app-icon
109 | 
110 | .yingyong
111 |
112 |
113 |
114 |
115 | warn
116 | 
117 | .yduigantanhaoshixin
118 |
119 |
120 |
121 |
122 |
123 |
124 | 第一步:使用font-face声明字体
125 |
126 | @font-face {font-family: 'iconfont';
127 | src: url('iconfont.eot'); /* IE9*/
128 | src: url('iconfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
129 | url('iconfont.woff') format('woff'), /* chrome、firefox */
130 | url('iconfont.ttf') format('truetype'), /* chrome、firefox、opera、Safari, Android, iOS 4.2+*/
131 | url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
132 | }
133 |
134 | 第二步:定义使用iconfont的样式
135 |
136 | .iconfont{
137 | font-family:"iconfont" !important;
138 | font-size:16px;font-style:normal;
139 | -webkit-font-smoothing: antialiased;
140 | -webkit-text-stroke-width: 0.2px;
141 | -moz-osx-font-smoothing: grayscale;}
142 |
143 | 第三步:挑选相应图标并获取字体编码,应用于页面
144 |
145 | <i class="iconfont">3</i>
146 |
147 |
148 |
149 |
150 |
151 |
152 |
--------------------------------------------------------------------------------
/src/font/iconfont.css:
--------------------------------------------------------------------------------
1 |
2 | @font-face {font-family: "iconfont";
3 | src: url('iconfont.eot'); /* IE9*/
4 | src: url('iconfont.eot#iefix') format('embedded-opentype'), /* IE6-IE8 */
5 | url('iconfont.woff') format('woff'), /* chrome, firefox */
6 | url('iconfont.ttf') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+*/
7 | url('iconfont.svg#iconfont') format('svg'); /* iOS 4.1- */
8 | }
9 |
10 | .iconfont {
11 | font-family:"iconfont" !important;
12 | font-style:normal;
13 | -webkit-font-smoothing: antialiased;
14 | -webkit-text-stroke-width: 0.2px;
15 | -moz-osx-font-smoothing: grayscale;
16 | }
17 | .icon-heart:before { content: "\e60e"; }
18 | .icon-search:before { content: "\e609"; }
19 | .icon-caret-right:before { content: "\e603"; }
20 | .icon-success:before { content: "\e607"; }
21 | .icon-caretdown:before { content: "\e604"; }
22 | .icon-loading:before { content: "\e602"; }
23 | .icon-code:before { content: "\e60d"; }
24 | .icon-error:before { content: "\e605"; }
25 | .icon-guanyuwomen:before { content: "\e608"; }
26 | .icon-star:before { content: "\e60c"; }
27 | .icon-home:before { content: "\e60a"; }
28 | .icon-iconfontunie61e:before { content: "\e600"; }
29 | .icon-iconfontunie61f:before { content: "\e601"; }
30 | .icon-yingyong:before { content: "\e60b"; }
31 | .icon-yduigantanhaoshixin:before { content: "\e606"; }
32 |
--------------------------------------------------------------------------------
/src/font/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengzilong/Nest/60b193de305771b985837efa7a3cf0931d750c92/src/font/iconfont.eot
--------------------------------------------------------------------------------
/src/font/iconfont.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Created by FontForge 20120731 at Wed Aug 17 23:48:04 2016
6 | By admin
7 |
8 |
9 |
10 |
24 |
26 |
28 |
30 |
32 |
36 |
38 |
40 |
42 |
44 |
46 |
49 |
52 |
55 |
58 |
61 |
66 |
72 |
75 |
78 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/src/font/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengzilong/Nest/60b193de305771b985837efa7a3cf0931d750c92/src/font/iconfont.ttf
--------------------------------------------------------------------------------
/src/font/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fengzilong/Nest/60b193de305771b985837efa7a3cf0931d750c92/src/font/iconfont.woff
--------------------------------------------------------------------------------
/src/helper.less:
--------------------------------------------------------------------------------
1 | .clearfix() {
2 | &::after {
3 | content: "";
4 | display: table;
5 | clear: both;
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import './components/button';
2 | import './components/icon';
3 | import './components/badge';
4 | import './components/link';
5 | import './components/input-nao';
6 | import './components/input';
7 | import './components/radio';
8 | import './components/radio-button';
9 | import './components/radio-group';
10 | import './components/checkbox';
11 | import './components/checkbox-group';
12 | import './components/breadcrumb';
13 | import './components/breadcrumb-item';
14 | import './components/tag';
15 | import './components/json-tree';
16 | import './components/tree';
17 | import './components/tree-node';
18 | import './components/pagination';
19 | import './components/menu';
20 | import './components/submenu';
21 | import './components/menu-item';
22 | import './components/switch';
23 | import './components/progress-bar';
24 | import './components/popover';
25 | import './components/message';
26 | import './components/collapse';
27 | import './components/collapse-pane';
28 | import './components/tooltip';
29 | import './components/slider';
30 | import './components/spinner';
31 | import './components/renderer';
32 | import './components/rate';
33 |
--------------------------------------------------------------------------------
/src/theme.less:
--------------------------------------------------------------------------------
1 | @primary-color: #5fbfff;
2 | @success-color: #2ecc71;
3 | @warning-color: #f4d03f;
4 | @danger-color: #ec7063;
5 | @disabled-text-color: #d9d9d9;
6 | @disabled-cursor: not-allowed;
7 |
8 | /* Badge */
9 | @badge-background-color: #ec7063;
10 |
11 | /* Tooltip */
12 | @tooltip-font-size: 12px;
13 | @tooltip-background-color: #545454;
14 |
15 | /* Input */
16 | @input-disabled-background-color: #EDEDED;
17 |
18 | /* Button */
19 | @button-border-color: #d9d9d9;
20 |
21 | /* Tag */
22 | @tag-font-size: 11px;
23 |
--------------------------------------------------------------------------------
/src/util/debug.js:
--------------------------------------------------------------------------------
1 | import riot from 'riot';
2 |
3 | riot.mixin({
4 | _log() {
5 |
6 | }
7 | });
8 |
9 | // debug( 'ui-button', document.body );
10 |
--------------------------------------------------------------------------------
/src/util/extend.js:
--------------------------------------------------------------------------------
1 | export default ( object, ...args ) => {
2 | for( let i = 0, source; source = args[ i ]; i++ ) {
3 | if( !source ) {
4 | continue;
5 | }
6 |
7 | for( let property in source ) {
8 | object[ property ] = source[ property ];
9 | }
10 | }
11 |
12 | return object;
13 | };
14 |
--------------------------------------------------------------------------------
/todo.md:
--------------------------------------------------------------------------------
1 | - use css modules in `json-tree`
2 | - review existed components
3 | - refactor `json-tree`
4 | - implement `popover`
5 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | var webpack = require('webpack');
3 | var ExtractTextWebpackPlugin = require('extract-text-webpack-plugin');
4 | var autoprefixer = require('autoprefixer');
5 | var es6Promise = require('es6-promise');
6 | var cwd = process.cwd();
7 |
8 | es6Promise.polyfill();
9 |
10 | var webpackConfig = {
11 | context: cwd,
12 | entry: {
13 | 'nest': path.resolve( cwd, 'src/index.js' )
14 | },
15 | output: {
16 | path: path.resolve( cwd, 'dist' ),
17 | filename: '[name].js',
18 | library: 'nest',
19 | libraryTarget: 'umd',
20 | },
21 | module: {
22 | preLoaders: [
23 | {
24 | test: /\.tag$/,
25 | exclude: /node_modules/,
26 | loader: 'nest-loader',
27 | query: {
28 | type: 'none'
29 | }
30 | }
31 | ],
32 | loaders: [
33 | {
34 | test: /\.(ttf|woff|eot|svg)\??\d*$/,
35 | include: /src/,
36 | loader: 'url-loader?name=[path][name].[ext]?[hash:8]'
37 | },
38 | {
39 | test: /\.less$/,
40 | exclude: /node_modules/,
41 | loader: ExtractTextWebpackPlugin.extract('style-loader', 'css-loader?localIdentName=[name]__[local]--[hash:5]!postcss-loader!less-loader')
42 | },
43 | {
44 | test: /\.css$/,
45 | exclude: /node_modules/,
46 | loader: ExtractTextWebpackPlugin.extract('style-loader', 'css-loader?localIdentName=[name]__[local]--[hash:5]')
47 | },
48 | {
49 | test: /\.(js|tag)$/,
50 | exclude: /node_modules/,
51 | loader: 'babel-loader',
52 | }
53 | ]
54 | },
55 | babel: {
56 | "presets": [ "es2015" ]
57 | },
58 | postcss: [
59 | autoprefixer({ browsers: [ 'last 2 versions' ] })
60 | ],
61 | resolve: {
62 | extensions: [ '', '.js', '.tag', '.less', '.css' ]
63 | },
64 | externals: {
65 | riot: {
66 | root: 'riot',
67 | commonjs: 'riot',
68 | commonjs2: 'riot',
69 | amd: 'riot'
70 | }
71 | },
72 | plugins: [
73 | new ExtractTextWebpackPlugin( 'nest.css' )
74 | ]
75 | };
76 |
77 | if( process.env.NODE_ENV === 'production' ) {
78 | webpackConfig.plugins.push(
79 | new webpack.optimize.UglifyJsPlugin({
80 | compress: {
81 | warnings: false
82 | }
83 | })
84 | );
85 | } else {
86 | webpackConfig.devtool = 'source-map';
87 | }
88 |
89 | module.exports = webpackConfig;
90 |
--------------------------------------------------------------------------------