@nys-cui/cui-formpill 0.2.10 → 0.2.20

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 (41) hide show
  1. package/component-base/README.md +43 -0
  2. package/component-base/cui.jsonc +6 -0
  3. package/component-base/package.json +42 -0
  4. package/component-base/src/assets/scss/_button-menu.scss +270 -0
  5. package/component-base/src/assets/scss/_buttons.scss +200 -0
  6. package/component-base/src/assets/scss/_cui-asof.scss +86 -0
  7. package/component-base/src/assets/scss/_cui-formpill.scss +284 -0
  8. package/component-base/src/assets/scss/_cui-general.scss +19 -0
  9. package/component-base/src/assets/scss/_cui-message.scss +119 -0
  10. package/component-base/src/assets/scss/_cui-spinner.scss +27 -0
  11. package/component-base/src/assets/scss/_cui-tree.scss +136 -0
  12. package/component-base/src/assets/scss/_cui-widget.scss +128 -0
  13. package/component-base/src/assets/scss/_field-check-group.scss +296 -0
  14. package/component-base/src/assets/scss/_field-radio-group.scss +236 -0
  15. package/component-base/src/assets/scss/_fonts.scss +20 -0
  16. package/component-base/src/assets/scss/_globalNotes.scss +419 -0
  17. package/component-base/src/assets/scss/_grid.scss +489 -0
  18. package/component-base/src/assets/scss/_help.scss +46 -0
  19. package/component-base/src/assets/scss/_inputs.scss +1145 -0
  20. package/component-base/src/assets/scss/_modal.scss +56 -0
  21. package/component-base/src/assets/scss/_normalize.scss +3 -0
  22. package/component-base/src/assets/scss/_popovers.scss +119 -0
  23. package/component-base/src/assets/scss/_quick_lookup.scss +87 -0
  24. package/component-base/src/assets/scss/_sidebar-context.scss +896 -0
  25. package/component-base/src/assets/scss/_table.scss +702 -0
  26. package/component-base/src/assets/scss/_toast.scss +219 -0
  27. package/component-base/src/assets/scss/_utility.scss +64 -0
  28. package/component-base/src/assets/scss/_variables.scss +58 -0
  29. package/component-base/src/assets/scss/main.scss +451 -0
  30. package/component-base/src/assets/scss/normalize/_import-now.scss +11 -0
  31. package/component-base/src/assets/scss/normalize/_normalize-mixin.scss +570 -0
  32. package/component-base/src/assets/scss/normalize/_variables.scss +37 -0
  33. package/component-base/src/assets/scss/normalize/_vertical-rhythm.scss +63 -0
  34. package/component-base/src/assets/scss/readme.md +1 -0
  35. package/component-base/src/modules/dom.js +21 -0
  36. package/component-base/src/screens/index/cui.jsonc +3 -0
  37. package/component-base/src/screens/index/index.js +228 -0
  38. package/component-base/src/screens/index/index.tpl.html +32 -0
  39. package/component-base/src/spa.js +117 -0
  40. package/package.json +1 -1
  41. package/src/cui-formpill.js +452 -1000
@@ -0,0 +1,570 @@
1
+ @use "sass:math";
2
+
3
+ // Helper function for the normalize() mixin.
4
+
5
+ // Initialize the global variables needed by _normalize-include.
6
+ $_normalize-include: () !default;
7
+ $_normalize-exclude: () !default;
8
+
9
+ @function _normalize-include($section, $exclude: null) {
10
+ // Since we are given 2 parameters, set the global variables.
11
+ @if $exclude != null {
12
+ $include: $section;
13
+ // Sass doesn't have static variables, so the work-around is to stuff these
14
+ // values into global variables so we can access them in future calls.
15
+ $_normalize-include: if(type-of($include) == 'list', $include, ($include)) !global;
16
+ $_normalize-exclude: if(type-of($exclude) == 'list', $exclude, ($exclude)) !global;
17
+ @return true;
18
+ }
19
+
20
+ // Check if $section is in the $include list.
21
+ @if index($_normalize-include, $section) {
22
+ @return true;
23
+ }
24
+ // If $include is set to (all), make sure $section is not in $exclude.
25
+ @else if not index($_normalize-exclude, $section) and index($_normalize-include, all) {
26
+ @return true;
27
+ }
28
+ @return false;
29
+ }
30
+
31
+ @mixin normalize($include: (all), $exclude: ()) {
32
+ // Initialize the helper function by passing it this mixin's parameters.
33
+ $init: _normalize-include($include, $exclude);
34
+
35
+ // If we've customized any font variables, we'll need extra properties.
36
+ @if $normalize-vertical-rhythm == null
37
+ and (
38
+ $base-line-height != 24px
39
+ or $base-unit != 'em'
40
+ or $h2-font-size != 1.5 * $base-font-size
41
+ or $h3-font-size != 1.17 * $base-font-size
42
+ or $h4-font-size != 1 * $base-font-size
43
+ or $h5-font-size != 0.83 * $base-font-size
44
+ or $h6-font-size != 0.67 * $base-font-size
45
+ ) {
46
+ $normalize-vertical-rhythm: true !global;
47
+ }
48
+
49
+ /*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */
50
+
51
+ @if _normalize-include(document) {
52
+ /* Document
53
+ ========================================================================== */
54
+
55
+ /**
56
+ * 1. Correct the line height in all browsers.
57
+ * 2. Prevent adjustments of font size after orientation changes in iOS.
58
+ */
59
+
60
+ html {
61
+ @if $base-font-family {
62
+ /* Change the default font family in all browsers (opinionated). */
63
+ font-family: $base-font-family;
64
+ }
65
+ @if $base-font-size != 16px or $normalize-vertical-rhythm {
66
+ // Correct old browser bug that prevented accessible resizing of text
67
+ // when root font-size is set with px or em.
68
+ font-size: math.div($base-font-size, 16px) * 100%;
69
+ }
70
+ @if $normalize-vertical-rhythm {
71
+ line-height: math.div($base-line-height, $base-font-size) * 1em; /* 1 */
72
+ }
73
+ @else {
74
+ line-height: 1.15; /* 1 */
75
+ }
76
+ -webkit-text-size-adjust: 100%; /* 2 */
77
+ }
78
+ }
79
+
80
+ @if _normalize-include(sections) {
81
+ /* Sections
82
+ ========================================================================== */
83
+
84
+ /**
85
+ * Remove the margin in all browsers.
86
+ */
87
+
88
+ body {
89
+ margin: 0;
90
+ }
91
+
92
+ /**
93
+ * Render the `main` element consistently in IE.
94
+ */
95
+
96
+ main {
97
+ display: block;
98
+ }
99
+
100
+ /**
101
+ * Correct the font size and margin on `h1` elements within `section` and
102
+ * `article` contexts in Chrome, Firefox, and Safari.
103
+ */
104
+
105
+ h1 {
106
+ @include normalize-font-size($h1-font-size);
107
+ @if $normalize-vertical-rhythm {
108
+ @include normalize-line-height($h1-font-size);
109
+ }
110
+
111
+ @if $normalize-vertical-rhythm {
112
+ /* Set 1 unit of vertical rhythm on the top and bottom margins. */
113
+ @include normalize-margin(1 0, $h1-font-size);
114
+ }
115
+ @else {
116
+ margin: 0.67em 0;
117
+ }
118
+ }
119
+
120
+ @if $normalize-vertical-rhythm {
121
+ h2 {
122
+ @include normalize-font-size($h2-font-size);
123
+ @include normalize-line-height($h2-font-size);
124
+ @include normalize-margin(1 0, $h2-font-size);
125
+ }
126
+
127
+ h3 {
128
+ @include normalize-font-size($h3-font-size);
129
+ @include normalize-line-height($h3-font-size);
130
+ @include normalize-margin(1 0, $h3-font-size);
131
+ }
132
+
133
+ h4 {
134
+ @include normalize-font-size($h4-font-size);
135
+ @include normalize-line-height($h4-font-size);
136
+ @include normalize-margin(1 0, $h4-font-size);
137
+ }
138
+
139
+ h5 {
140
+ @include normalize-font-size($h5-font-size);
141
+ @include normalize-line-height($h5-font-size);
142
+ @include normalize-margin(1 0, $h5-font-size);
143
+ }
144
+
145
+ h6 {
146
+ @include normalize-font-size($h6-font-size);
147
+ @include normalize-line-height($h6-font-size);
148
+ @include normalize-margin(1 0, $h6-font-size);
149
+ }
150
+ }
151
+ }
152
+
153
+ @if _normalize-include(grouping) {
154
+ /* Grouping content
155
+ ========================================================================== */
156
+
157
+ @if $normalize-vertical-rhythm {
158
+ /**
159
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
160
+ */
161
+
162
+ blockquote {
163
+ @include normalize-margin(1 $indent-amount);
164
+ }
165
+
166
+ dl,
167
+ ol,
168
+ ul {
169
+ @include normalize-margin(1 0);
170
+ }
171
+
172
+ /**
173
+ * Turn off margins on nested lists.
174
+ */
175
+
176
+ ol,
177
+ ul {
178
+ ol,
179
+ ul {
180
+ margin: 0;
181
+ }
182
+ }
183
+
184
+ dd {
185
+ margin: 0 0 0 $indent-amount;
186
+ }
187
+
188
+ ol,
189
+ ul {
190
+ padding: 0 0 0 $indent-amount;
191
+ }
192
+
193
+ figure {
194
+ @include normalize-margin(1 $indent-amount);
195
+ }
196
+ }
197
+
198
+ /**
199
+ * 1. Add the correct box sizing in Firefox.
200
+ * 2. Show the overflow in Edge and IE.
201
+ */
202
+
203
+ hr {
204
+ box-sizing: content-box; /* 1 */
205
+ height: 0; /* 1 */
206
+ overflow: visible; /* 2 */
207
+ }
208
+
209
+ /**
210
+ * Add the correct display in IE.
211
+ */
212
+
213
+ main {
214
+ display: block;
215
+ }
216
+
217
+ @if $normalize-vertical-rhythm {
218
+ /**
219
+ * Set 1 unit of vertical rhythm on the top and bottom margin.
220
+ */
221
+
222
+ p,
223
+ pre {
224
+ @include normalize-margin(1 0);
225
+ }
226
+ }
227
+
228
+ /**
229
+ * 1. Correct the inheritance and scaling of font size in all browsers.
230
+ * 2. Correct the odd `em` font sizing in all browsers.
231
+ */
232
+
233
+ pre {
234
+ font-family: monospace, monospace; /* 1 */
235
+ font-size: 1em; /* 2 */
236
+ }
237
+ }
238
+
239
+ @if _normalize-include(links) {
240
+ /* Links
241
+ ========================================================================== */
242
+
243
+ /**
244
+ * Remove the gray background on active links in IE 10.
245
+ */
246
+
247
+ a {
248
+ background-color: transparent;
249
+ }
250
+ }
251
+
252
+ @if _normalize-include(text) {
253
+ /* Text-level semantics
254
+ ========================================================================== */
255
+
256
+ /**
257
+ * 1. Remove the bottom border in Chrome 57-
258
+ * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
259
+ */
260
+
261
+ abbr[title] {
262
+ border-bottom: none; /* 1 */
263
+ text-decoration: underline; /* 2 */
264
+ text-decoration: underline dotted; /* 2 */
265
+ }
266
+
267
+ /**
268
+ * Add the correct font weight in Chrome, Edge, and Safari.
269
+ */
270
+
271
+ b,
272
+ strong {
273
+ font-weight: bolder;
274
+ }
275
+
276
+ /**
277
+ * 1. Correct the inheritance and scaling of font size in all browsers.
278
+ * 2. Correct the odd `em` font sizing in all browsers.
279
+ */
280
+
281
+ code,
282
+ kbd,
283
+ samp {
284
+ font-family: monospace, monospace; /* 1 */
285
+ font-size: 1em; /* 2 */
286
+ }
287
+
288
+ /**
289
+ * Add the correct font size in all browsers.
290
+ */
291
+
292
+ small {
293
+ font-size: 80%;
294
+ }
295
+
296
+ /**
297
+ * Prevent `sub` and `sup` elements from affecting the line height in
298
+ * all browsers.
299
+ */
300
+
301
+ sub,
302
+ sup {
303
+ font-size: 75%;
304
+ line-height: 0;
305
+ position: relative;
306
+ vertical-align: baseline;
307
+ }
308
+
309
+ sub {
310
+ bottom: -0.25em;
311
+ }
312
+
313
+ sup {
314
+ top: -0.5em;
315
+ }
316
+ }
317
+
318
+ @if _normalize-include(embedded) {
319
+ /* Embedded content
320
+ ========================================================================== */
321
+
322
+ /**
323
+ * Remove the border on images inside links in IE 10.
324
+ */
325
+
326
+ img {
327
+ border-style: none;
328
+ }
329
+ }
330
+
331
+ @if _normalize-include(forms) {
332
+ /* Forms
333
+ ========================================================================== */
334
+
335
+ /**
336
+ * 1. Change the font styles in all browsers.
337
+ * 2. Remove the margin in Firefox and Safari.
338
+ */
339
+
340
+ button,
341
+ input,
342
+ optgroup,
343
+ select,
344
+ textarea {
345
+ font-family: inherit; /* 1 */
346
+ font-size: 100%; /* 1 */
347
+ @if $normalize-vertical-rhythm {
348
+ line-height: math.div($base-line-height, $base-font-size) * 1em; /* 1 */
349
+ }
350
+ @else {
351
+ line-height: 1.15; /* 1 */
352
+ }
353
+ margin: 0; /* 2 */
354
+ }
355
+
356
+ /**
357
+ * Show the overflow in IE.
358
+ */
359
+
360
+ button {
361
+ overflow: visible;
362
+ }
363
+
364
+ /**
365
+ * Remove the inheritance of text transform in Edge, Firefox, and IE.
366
+ * 1. Remove the inheritance of text transform in Firefox.
367
+ */
368
+
369
+ button,
370
+ select { /* 1 */
371
+ text-transform: none;
372
+ }
373
+
374
+ /**
375
+ * Correct the inability to style clickable types in iOS and Safari.
376
+ */
377
+
378
+ button,
379
+ [type="button"],
380
+ [type="reset"],
381
+ [type="submit"] {
382
+ appearance: button;
383
+ -webkit-appearance: button;
384
+ }
385
+
386
+ button,
387
+ [type="button"],
388
+ [type="reset"],
389
+ [type="submit"] {
390
+
391
+ /**
392
+ * Remove the inner border and padding in Firefox.
393
+ */
394
+
395
+ &::-moz-focus-inner {
396
+ border-style: none;
397
+ padding: 0;
398
+ }
399
+
400
+ /**
401
+ * Restore the focus styles unset by the previous rule.
402
+ */
403
+
404
+ &:-moz-focusring {
405
+ outline: 1px dotted ButtonText;
406
+ }
407
+ }
408
+
409
+ /**
410
+ * Show the overflow in Edge.
411
+ */
412
+
413
+ input {
414
+ overflow: visible;
415
+ }
416
+
417
+ /**
418
+ * 1. Add the correct box sizing in IE 10.
419
+ * 2. Remove the padding in IE 10.
420
+ */
421
+
422
+ [type="checkbox"],
423
+ [type="radio"] {
424
+ box-sizing: border-box; /* 1 */
425
+ padding: 0; /* 2 */
426
+ }
427
+
428
+ /**
429
+ * Correct the cursor style of increment and decrement buttons in Chrome.
430
+ */
431
+
432
+ [type="number"]::-webkit-inner-spin-button,
433
+ [type="number"]::-webkit-outer-spin-button {
434
+ height: auto;
435
+ }
436
+
437
+ /**
438
+ * 1. Correct the odd appearance in Chrome and Safari.
439
+ * 2. Correct the outline style in Safari.
440
+ */
441
+
442
+ [type="search"] {
443
+ appearance: textfield;
444
+ -webkit-appearance: textfield; /* 1 */
445
+ outline-offset: -2px; /* 2 */
446
+
447
+ /**
448
+ * Remove the inner padding in Chrome and Safari on macOS.
449
+ */
450
+
451
+ &::-webkit-search-decoration {
452
+ -webkit-appearance: none;
453
+ }
454
+ }
455
+
456
+ /**
457
+ * 1. Correct the inability to style clickable types in iOS and Safari.
458
+ * 2. Change font properties to `inherit` in Safari.
459
+ */
460
+
461
+ ::-webkit-file-upload-button {
462
+ -webkit-appearance: button; /* 1 */
463
+ font: inherit; /* 2 */
464
+ }
465
+
466
+ /**
467
+ * Correct the padding in Firefox.
468
+ */
469
+
470
+ fieldset {
471
+ padding: 0.35em 0.75em 0.625em;
472
+ }
473
+
474
+ /**
475
+ * 1. Correct the text wrapping in Edge and IE.
476
+ * 2. Correct the color inheritance from `fieldset` elements in IE.
477
+ * 3. Remove the padding so developers are not caught out when they zero out
478
+ * `fieldset` elements in all browsers.
479
+ */
480
+
481
+ legend {
482
+ box-sizing: border-box; /* 1 */
483
+ display: table; /* 1 */
484
+ max-width: 100%; /* 1 */
485
+ padding: 0; /* 3 */
486
+ color: inherit; /* 2 */
487
+ white-space: normal; /* 1 */
488
+ }
489
+
490
+ /**
491
+ * Add the correct vertical alignment in Chrome, Firefox, and Opera.
492
+ */
493
+
494
+ progress {
495
+ vertical-align: baseline;
496
+ }
497
+
498
+ /**
499
+ * Remove the default vertical scrollbar in IE 10+.
500
+ */
501
+
502
+ textarea {
503
+ overflow: auto;
504
+ }
505
+ }
506
+
507
+ @if _normalize-include(interactive) {
508
+ /* Interactive
509
+ ========================================================================== */
510
+
511
+ /*
512
+ * Add the correct display in Edge, IE 10+, and Firefox.
513
+ */
514
+
515
+ details {
516
+ display: block;
517
+ }
518
+
519
+ /*
520
+ * Add the correct display in all browsers.
521
+ */
522
+
523
+ summary {
524
+ display: list-item;
525
+ }
526
+
527
+ @if $normalize-vertical-rhythm {
528
+ menu {
529
+ /*
530
+ * 1. Set 1 unit of vertical rhythm on the top and bottom margin.
531
+ * 2. Set consistent space for the list style image.
532
+ */
533
+
534
+ @include normalize-margin(1 0); /* 1 */
535
+ padding: 0 0 0 $indent-amount; /* 2 */
536
+
537
+ /**
538
+ * Turn off margins on nested lists.
539
+ */
540
+
541
+ menu &,
542
+ ol &,
543
+ ul & {
544
+ margin: 0;
545
+ }
546
+ }
547
+ }
548
+ }
549
+
550
+ @if _normalize-include(misc) {
551
+ /* Misc
552
+ ========================================================================== */
553
+
554
+ /**
555
+ * Add the correct display in IE.
556
+ */
557
+
558
+ template {
559
+ display: none;
560
+ }
561
+
562
+ /**
563
+ * Add the correct display in IE 10.
564
+ */
565
+
566
+ [hidden] {
567
+ display: none;
568
+ }
569
+ }
570
+ }
@@ -0,0 +1,37 @@
1
+ //
2
+ // Variables
3
+ //
4
+ // You can override the default values by setting the variables in your Sass
5
+ // before importing the normalize-scss library.
6
+
7
+ // The font size set on the root html element.
8
+ $base-font-size: 16px !default;
9
+
10
+ // The base line height determines the basic unit of vertical rhythm.
11
+ $base-line-height: 24px !default;
12
+
13
+ // The length unit in which to output vertical rhythm values.
14
+ // Supported values: px, em, rem.
15
+ $base-unit: 'em' !default;
16
+
17
+ // The default font family.
18
+ $base-font-family: null !default;
19
+
20
+ // The font sizes for h1-h6.
21
+ $h1-font-size: 2 * $base-font-size !default;
22
+ $h2-font-size: 1.5 * $base-font-size !default;
23
+ $h3-font-size: 1.17 * $base-font-size !default;
24
+ $h4-font-size: 1 * $base-font-size !default;
25
+ $h5-font-size: 0.83 * $base-font-size !default;
26
+ $h6-font-size: 0.67 * $base-font-size !default;
27
+
28
+ // The amount lists and blockquotes are indented.
29
+ $indent-amount: 40px !default;
30
+
31
+ // The following variable controls whether normalize-scss will output
32
+ // font-sizes, line-heights and block-level top/bottom margins that form a basic
33
+ // vertical rhythm on the page, which differs from the original Normalize.css.
34
+ // However, changing any of the variables above will cause
35
+ // $normalize-vertical-rhythm to be automatically set to true. To prevent
36
+ // outputting any vertical rhythm rules, set this variable to false.
37
+ $normalize-vertical-rhythm: null !default;
@@ -0,0 +1,63 @@
1
+ @use "sass:math";
2
+
3
+ //
4
+ // Vertical Rhythm
5
+ //
6
+ // This is the minimal amount of code needed to create vertical rhythm in our
7
+ // CSS. If you are looking for a robust solution, look at the excellent Typey
8
+ // library. @see https://github.com/jptaranto/typey
9
+
10
+ @function normalize-rhythm($value, $relative-to: $base-font-size, $unit: $base-unit) {
11
+ @if unit($value) != px {
12
+ @error "The normalize vertical-rhythm module only supports px inputs. The typey library is better.";
13
+ }
14
+ @if $unit == rem {
15
+ @return math.div($value, $base-font-size) * 1rem;
16
+ }
17
+ @else if $unit == em {
18
+ @return math.div($value, $relative-to) * 1em;
19
+ }
20
+ @else { // $unit == px
21
+ @return $value;
22
+ }
23
+ }
24
+
25
+ @mixin normalize-font-size($value, $relative-to: $base-font-size) {
26
+ @if unit($value) != 'px' {
27
+ @error "normalize-font-size() only supports px inputs. The typey library is better.";
28
+ }
29
+ font-size: normalize-rhythm($value, $relative-to);
30
+ }
31
+
32
+ @mixin normalize-rhythm($property, $values, $relative-to: $base-font-size) {
33
+ $value-list: $values;
34
+ $sep: space;
35
+ @if type-of($values) == 'list' {
36
+ $sep: list-separator($values);
37
+ }
38
+ @else {
39
+ $value-list: append((), $values);
40
+ }
41
+
42
+ $normalized-values: ();
43
+ @each $value in $value-list {
44
+ @if unitless($value) and $value != 0 {
45
+ $value: $value * normalize-rhythm($base-line-height, $relative-to);
46
+ }
47
+ $normalized-values: append($normalized-values, $value, $sep);
48
+ }
49
+ #{$property}: $normalized-values;
50
+ }
51
+
52
+ @mixin normalize-margin($values, $relative-to: $base-font-size) {
53
+ @include normalize-rhythm(margin, $values, $relative-to);
54
+ }
55
+
56
+ @mixin normalize-line-height($font-size, $min-line-padding: 2px) {
57
+ $lines: ceil(math.div($font-size, $base-line-height));
58
+ // If lines are cramped include some extra leading.
59
+ @if ($lines * $base-line-height - $font-size) < ($min-line-padding * 2) {
60
+ $lines: $lines + 1;
61
+ }
62
+ @include normalize-rhythm(line-height, $lines, $font-size);
63
+ }
@@ -0,0 +1 @@
1
+ _normalize.scss and normalize folder copied from https://www.npmjs.com/package/normalize-scss#normalizecss-v8 and slightly adapted to current Dart Sass standards.
@@ -0,0 +1,21 @@
1
+ export function clearElements(dElem) {
2
+ while(dElem.firstElementChild) {
3
+ dElem.removeChild(dElem.firstElementChild);
4
+ }
5
+ }
6
+
7
+ export function createElement(sTag, oAttributes, sTextContent) {
8
+ let dNewElem = document.createElement(sTag);
9
+
10
+ if(oAttributes && Object.keys(oAttributes).length) {
11
+ for(let sAttributeName in oAttributes) {
12
+ dNewElem.setAttribute(sAttributeName, oAttributes[sAttributeName]);
13
+ }
14
+ }
15
+
16
+ if(sTextContent && sTextContent.length) {
17
+ dNewElem.appendChild(document.createTextNode(sTextContent));
18
+ }
19
+
20
+ return dNewElem;
21
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "mode": "screen"
3
+ }