@ulu/frontend 0.1.0-beta.75 → 0.1.0-beta.77
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.
- package/CHANGELOG.md +17 -0
- package/dist/ulu-frontend.min.css +1 -1
- package/dist/ulu-frontend.min.js +18 -17
- package/docs-dev/assets/main.js +7747 -503
- package/docs-dev/assets/style.css +221 -166
- package/docs-dev/changelog/index.html +22 -0
- package/docs-dev/demos/button/index.html +38 -7
- package/docs-dev/demos/card/index.html +16 -16
- package/docs-dev/demos/data-table/index.html +100 -100
- package/docs-dev/demos/modals/index.html +25 -0
- package/docs-dev/demos/popovers/index.html +5 -5
- package/docs-dev/javascript/ui-modal-builder/index.html +10 -0
- package/docs-dev/javascript/utils-dom/index.html +1 -215
- package/docs-dev/sass/components/modal/index.html +38 -10
- package/js/ui/dialog.js +1 -1
- package/js/ui/modal-builder.js +20 -3
- package/js/ui/page.js +2 -2
- package/js/ui/print.js +1 -1
- package/js/ui/programmatic-modal.js +1 -1
- package/js/ui/scrollpoint.js +1 -1
- package/js/ui/theme-toggle.js +2 -1
- package/js/utils/dom.js +2 -120
- package/js/utils/system.js +2 -1
- package/package.json +2 -2
- package/scss/components/_modal.scss +29 -14
- package/types/ui/index.d.ts +1 -1
- package/types/ui/modal-builder.d.ts +10 -0
- package/types/ui/modal-builder.d.ts.map +1 -1
- package/types/ui/theme-toggle.d.ts.map +1 -1
- package/types/utils/dom.d.ts +0 -59
- package/types/utils/dom.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -1
- package/types/utils/system.d.ts.map +1 -1
- package/docs-dev/changelog/updates-and-changes/index.html +0 -5109
- package/docs-dev/demos/card-new/index.html +0 -5088
- package/docs-dev/demos/card-old/index.html +0 -5223
- package/docs-dev/demos/card.1/index.html +0 -5223
- package/docs-dev/demos/card.TRASH/index.html +0 -5541
- package/docs-dev/demos/list-inline.1/index.html +0 -4727
- package/docs-dev/guide/updates-and-changes/index.html +0 -5033
package/js/utils/system.js
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { hasRequiredProps } from "@ulu/utils/object.js";
|
|
7
|
-
import { getDatasetOptionalJson
|
|
7
|
+
import { getDatasetOptionalJson } from "@ulu/utils/browser/dom.js";
|
|
8
|
+
import { dataAttributeToDatasetKey } from "./dom.js";
|
|
8
9
|
import { getName } from "../events/index.js";
|
|
9
10
|
|
|
10
11
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ulu/frontend",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.77",
|
|
4
4
|
"description": "A versatile SCSS and JavaScript component library offering configurable, accessible components and flexible integration into any project, with SCSS modules suitable for modern JS frameworks.",
|
|
5
5
|
"browser": "js/index.js",
|
|
6
6
|
"main": "index.js",
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
},
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@floating-ui/dom": "^1.6.5",
|
|
101
|
-
"@ulu/utils": "^0.0.
|
|
101
|
+
"@ulu/utils": "^0.0.26",
|
|
102
102
|
"ally.js": "^1.4.1",
|
|
103
103
|
"aria-tablist": "^1.2.2",
|
|
104
104
|
"swipe-listener" : "^1.3.0"
|
|
@@ -53,6 +53,10 @@ $-fallbacks: (
|
|
|
53
53
|
/// @prop {CssValue} header-border-bottom [none] Bottom-border on the modal header.
|
|
54
54
|
/// @prop {Color} header-color [white] Type color of the header.
|
|
55
55
|
/// @prop {Dimension} header-padding [1rem] The padding of the modal header.
|
|
56
|
+
/// @prop {Dimension} footer-padding [(0.5rem 1rem)] The padding of the modal footer.
|
|
57
|
+
/// @prop {Color} footer-background-color [(0.5rem 1rem)] The background color of the footer
|
|
58
|
+
/// @prop {Color} footer-border-top [(0.5rem 1rem)] The border between body and footer
|
|
59
|
+
/// @prop {CssValue} footer-text-align [right] Text alignment for footer
|
|
56
60
|
/// @prop {Color} resizer-background-color [rgb(221, 221, 221)] The background color of the resizer.
|
|
57
61
|
/// @prop {Color} resizer-background-color-hover [rgb(192, 192, 192)] The background color of the resizer when hovered or focused.
|
|
58
62
|
/// @prop {Color} resizer-color [rgb(99, 99, 99)] The type color of the resizer.
|
|
@@ -69,8 +73,8 @@ $-fallbacks: (
|
|
|
69
73
|
$config: (
|
|
70
74
|
"backdrop-color" : true,
|
|
71
75
|
"backdrop-blur" : 4px,
|
|
72
|
-
"background-color":
|
|
73
|
-
"body-padding":
|
|
76
|
+
"background-color" : white,
|
|
77
|
+
"body-padding" : 1rem,
|
|
74
78
|
"border-radius" : true,
|
|
75
79
|
"box-shadow" : true,
|
|
76
80
|
"height": 340px,
|
|
@@ -91,6 +95,10 @@ $config: (
|
|
|
91
95
|
"header-border-bottom": none,
|
|
92
96
|
"header-color": white,
|
|
93
97
|
"header-padding": 1rem,
|
|
98
|
+
"footer-padding" : (0.5rem 1rem),
|
|
99
|
+
"footer-background-color" : #f6f6f6,
|
|
100
|
+
"footer-border-top" : none,
|
|
101
|
+
"footer-text-align" : right,
|
|
94
102
|
"resizer-background-color": rgb(221, 221, 221),
|
|
95
103
|
"resizer-background-color-hover": rgb(192, 192, 192),
|
|
96
104
|
"resizer-color": rgb(99, 99, 99),
|
|
@@ -142,6 +150,7 @@ $config: (
|
|
|
142
150
|
#{ $prefix } {
|
|
143
151
|
// Required for click outside
|
|
144
152
|
position: fixed;
|
|
153
|
+
flex-direction: column;
|
|
145
154
|
// Important: If you use the margin layout system (ie. auto) on dialogs they
|
|
146
155
|
// can't animate out correctly (thinking it jumps from dialog display system
|
|
147
156
|
// to normal block and doesn't work. This ALSO affects the z-index (seems to move from top-layer to normal layer). Z-index is for close
|
|
@@ -165,9 +174,8 @@ $config: (
|
|
|
165
174
|
box-sizing: border-box;
|
|
166
175
|
animation: uluModalCenterOut get("animation-duration-exit") get("animation-timing-function");
|
|
167
176
|
&[open] {
|
|
168
|
-
animation: uluModalCenterIn get("animation-duration") get("animation-timing-function");
|
|
169
177
|
display: flex;
|
|
170
|
-
|
|
178
|
+
animation: uluModalCenterIn get("animation-duration") get("animation-timing-function");
|
|
171
179
|
}
|
|
172
180
|
&::backdrop {
|
|
173
181
|
background: color.get(get("backdrop-color"));
|
|
@@ -190,6 +198,13 @@ $config: (
|
|
|
190
198
|
overflow: auto;
|
|
191
199
|
padding: get("body-padding");
|
|
192
200
|
}
|
|
201
|
+
#{ $prefix }__footer {
|
|
202
|
+
flex: 0;
|
|
203
|
+
padding: get("footer-padding");
|
|
204
|
+
background-color: color.get(get("footer-background-color"));
|
|
205
|
+
border-top: get("footer-border-top");
|
|
206
|
+
text-align: get("footer-text-align");
|
|
207
|
+
}
|
|
193
208
|
#{ $prefix }__title {
|
|
194
209
|
display: flex;
|
|
195
210
|
align-items: baseline;
|
|
@@ -371,13 +386,13 @@ $config: (
|
|
|
371
386
|
to {
|
|
372
387
|
opacity: 1;
|
|
373
388
|
transform: translate(-50%, -50%);
|
|
374
|
-
display:
|
|
389
|
+
display: flex;
|
|
375
390
|
}
|
|
376
391
|
}
|
|
377
392
|
@keyframes uluModalCenterOut {
|
|
378
393
|
from {
|
|
379
394
|
opacity: 1;
|
|
380
|
-
display:
|
|
395
|
+
display: flex;
|
|
381
396
|
transform: translate(-50%, -50%);
|
|
382
397
|
}
|
|
383
398
|
to {
|
|
@@ -395,13 +410,13 @@ $config: (
|
|
|
395
410
|
to {
|
|
396
411
|
opacity: 1;
|
|
397
412
|
transform: translate(-50%, 0);
|
|
398
|
-
display:
|
|
413
|
+
display: flex;
|
|
399
414
|
}
|
|
400
415
|
}
|
|
401
416
|
@keyframes uluModalTopOut {
|
|
402
417
|
from {
|
|
403
418
|
opacity: 1;
|
|
404
|
-
display:
|
|
419
|
+
display: flex;
|
|
405
420
|
transform: translate(-50%, 0);
|
|
406
421
|
}
|
|
407
422
|
to {
|
|
@@ -419,13 +434,13 @@ $config: (
|
|
|
419
434
|
to {
|
|
420
435
|
opacity: 1;
|
|
421
436
|
transform: translate(-50%, 0);
|
|
422
|
-
display:
|
|
437
|
+
display: flex;
|
|
423
438
|
}
|
|
424
439
|
}
|
|
425
440
|
@keyframes uluModalBottomOut {
|
|
426
441
|
from {
|
|
427
442
|
opacity: 1;
|
|
428
|
-
display:
|
|
443
|
+
display: flex;
|
|
429
444
|
transform: translate(-50%, 0);
|
|
430
445
|
}
|
|
431
446
|
to {
|
|
@@ -443,13 +458,13 @@ $config: (
|
|
|
443
458
|
to {
|
|
444
459
|
opacity: 1;
|
|
445
460
|
transform: translateX(0);
|
|
446
|
-
display:
|
|
461
|
+
display: flex;
|
|
447
462
|
}
|
|
448
463
|
}
|
|
449
464
|
@keyframes uluModalLeftOut {
|
|
450
465
|
from {
|
|
451
466
|
opacity: 1;
|
|
452
|
-
display:
|
|
467
|
+
display: flex;
|
|
453
468
|
transform: translateX(0);
|
|
454
469
|
}
|
|
455
470
|
to {
|
|
@@ -467,13 +482,13 @@ $config: (
|
|
|
467
482
|
to {
|
|
468
483
|
opacity: 1;
|
|
469
484
|
transform: translateX(0);
|
|
470
|
-
display:
|
|
485
|
+
display: flex;
|
|
471
486
|
}
|
|
472
487
|
}
|
|
473
488
|
@keyframes uluModalRightOut {
|
|
474
489
|
from {
|
|
475
490
|
opacity: 1;
|
|
476
|
-
display:
|
|
491
|
+
display: flex;
|
|
477
492
|
transform: translateX(0);
|
|
478
493
|
}
|
|
479
494
|
to {
|
package/types/ui/index.d.ts
CHANGED
|
@@ -20,5 +20,5 @@ export * as printDetails from "./print-details.js";
|
|
|
20
20
|
export * as scrollSlider from "./scroll-slider.js";
|
|
21
21
|
export * as themeToggle from "./theme-toggle.js";
|
|
22
22
|
export * as detailsGroup from "./details-group.js";
|
|
23
|
-
declare namespace
|
|
23
|
+
declare namespace ___Users_joe_Projects_Personal_Github_frontend_js_ui_index_ { }
|
|
24
24
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -37,6 +37,8 @@ export namespace defaults {
|
|
|
37
37
|
let _class: string;
|
|
38
38
|
export { _class as class };
|
|
39
39
|
export let baseClass: string;
|
|
40
|
+
export let footerElement: any;
|
|
41
|
+
export let footerHtml: any;
|
|
40
42
|
export let classCloseIcon: any;
|
|
41
43
|
export let classResizerIcon: any;
|
|
42
44
|
export let debug: boolean;
|
|
@@ -125,6 +127,14 @@ export type DefaultModalOptions = {
|
|
|
125
127
|
* - The class name for the resizer icon. Uses the wrapped setting string.
|
|
126
128
|
*/
|
|
127
129
|
classResizerIcon: string;
|
|
130
|
+
/**
|
|
131
|
+
* - Element or selector to use as the footer (will be moved to dialog on creation, used for DOM API)
|
|
132
|
+
*/
|
|
133
|
+
footerElement: string | Node;
|
|
134
|
+
/**
|
|
135
|
+
* - Markup to use in the footer
|
|
136
|
+
*/
|
|
137
|
+
footerHtml: string | Node;
|
|
128
138
|
/**
|
|
129
139
|
* - Enables debug logging. Defaults to `false`.
|
|
130
140
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal-builder.d.ts","sourceRoot":"","sources":["../../js/ui/modal-builder.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"modal-builder.d.ts","sourceRoot":"","sources":["../../js/ui/modal-builder.js"],"names":[],"mappings":"AA+IA;;GAEG;AACH,gDAEC;AAED;;;GAGG;AACH,6BAQC;AAED;;;;GAIG;AACH,oCAHW,IAAI;;EA+Dd;AAxND;;GAEG;AACH,+CAGG;;;;;;;;;;;;;;;;;;;;;;;;IA6DD,uDAGC;IACD,yDAGC;IACD;;;;;OAKG;IACH,0DA2CC;;;;;;;;;;;;WA9GW,MAAM,GAAC,IAAI;;;;eACX,MAAM,GAAC,IAAI;;;;gBACX,MAAM;;;;aACN,MAAM;;;;cACN,OAAO;;;;iBACP,OAAO;;;;iBACP,OAAO;;;;cACP,QAAQ,GAAC,UAAU,GAAC,YAAY,GAAC,WAAW,GAAC,aAAa,GAAC,eAAe,GAAC,cAAc;;;;eACzF,OAAO;;;;gBACP,OAAO;;;;UACP,SAAS,GAAC,OAAO,GAAC,OAAO,GAAC,YAAY;;;;WACtC,OAAO;;;;iBACP,OAAO;;;;WACP,MAAM;;;;eACN,MAAM;;;;oBACN,MAAM;;;;sBACN,MAAM;;;;mBACN,MAAM,GAAC,IAAI;;;;gBACX,MAAM,GAAC,IAAI;;;;WACX,OAAO;;;;8BACE,MAAM,KAAG,MAAM;;;;mBACf,MAAM,KAAG,MAAM;;qCA3CD,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-toggle.d.ts","sourceRoot":"","sources":["../../js/ui/theme-toggle.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"theme-toggle.d.ts","sourceRoot":"","sources":["../../js/ui/theme-toggle.js"],"names":[],"mappings":"AAmGA;;GAEG;AACH,gDAEC;AAED;;;GAGG;AACH,6BASC;AAED;;;GAGG;AACH,oCAFW,WAAW;;;;;;EA+FrB;AAhND;;GAEG;AACH,+CAGG;;;;;;;;;;;;;;;;;;;;;;;IAmDD;;OAEG;IACH,mCAAiB;;;;;;;qCAlEkB,oBAAoB"}
|
package/types/utils/dom.d.ts
CHANGED
|
@@ -4,25 +4,6 @@
|
|
|
4
4
|
* @returns {string} - The dataset property name (e.g., "uluDialog").
|
|
5
5
|
*/
|
|
6
6
|
export function dataAttributeToDatasetKey(attribute: any): string;
|
|
7
|
-
/**
|
|
8
|
-
* Get an elements JSON dataset value
|
|
9
|
-
* @param {Node} element
|
|
10
|
-
* @param {String} key key in dataset object for element
|
|
11
|
-
* @returns {Object} Empty object or JSON object from dataset
|
|
12
|
-
*/
|
|
13
|
-
export function getDatasetJson(element: Node, key: string): any;
|
|
14
|
-
/**
|
|
15
|
-
* Get an elements JSON dataset value that could potentially just be a single string
|
|
16
|
-
* - If JSON it will return the object else it will return the value directly
|
|
17
|
-
* @param {Node} element
|
|
18
|
-
* @param {String} key key in dataset object for element
|
|
19
|
-
* @returns {Object|String} JSON object or current dataset value (string or empty string if no value)
|
|
20
|
-
*/
|
|
21
|
-
export function getDatasetOptionalJson(element: Node, key: string): any | string;
|
|
22
|
-
/**
|
|
23
|
-
* Check if a pointer event x/y was outside an elements bounding box
|
|
24
|
-
*/
|
|
25
|
-
export function wasClickOutside(element: any, event: any): boolean;
|
|
26
7
|
/**
|
|
27
8
|
* Sets up the positional classes that would come from the equal
|
|
28
9
|
* height module. Needs to be rerun by user when layout changes
|
|
@@ -34,20 +15,6 @@ export function wasClickOutside(element: any, event: any): boolean;
|
|
|
34
15
|
* @param {Object} classes Override the default equal heights classes
|
|
35
16
|
*/
|
|
36
17
|
export function setPositionClasses(parent: Node, classes?: any): void;
|
|
37
|
-
/**
|
|
38
|
-
* Resolve a target to Element
|
|
39
|
-
* @param {String|Node} target The selector or node/element
|
|
40
|
-
* @param {Object} context [document] The context to query possible selectors from
|
|
41
|
-
* @return {HTMLElement} The element or null if not found
|
|
42
|
-
*/
|
|
43
|
-
export function getElement(target: string | Node, context?: any): HTMLElement;
|
|
44
|
-
/**
|
|
45
|
-
* Resolve a target to Elements
|
|
46
|
-
* @param {String|Node} target The selector or node/element
|
|
47
|
-
* @param {Object} context [document] The context to query possible selectors from
|
|
48
|
-
* @return {Array} The elements or null if not found
|
|
49
|
-
*/
|
|
50
|
-
export function getElements(target: string | Node, context?: any): any[];
|
|
51
18
|
/**
|
|
52
19
|
* Resolves a class input (string or array) into a consistent array of class names.
|
|
53
20
|
* @param {string|string[]} input - The class input, which can be a string, an array of strings, or any other value.
|
|
@@ -58,30 +25,4 @@ export function getElements(target: string | Node, context?: any): any[];
|
|
|
58
25
|
* resolveClassArray("single-class"); // Returns ["single-class"]
|
|
59
26
|
*/
|
|
60
27
|
export function resolveClasses(classes: any): string[];
|
|
61
|
-
/**
|
|
62
|
-
* Sets a CSS custom property equal to the scrollbar width.
|
|
63
|
-
* @param {object} options - Configuration options.
|
|
64
|
-
* @param {HTMLElement} [options.scrollableChild=document.body] - An element that is a child of a scrollable container (used for width calculation).
|
|
65
|
-
* @param {Window|HTMLElement} [options.container=window] - The container that can be scrolled (used for width calculation).
|
|
66
|
-
* @param {HTMLElement} [options.propertyElement=document.documentElement] - The element to which the custom property will be added. Defaults to document.documentElement for :root access.
|
|
67
|
-
* @param {string} [options.propName="--ulu-scrollbar-width"] - The name of the custom property to set.
|
|
68
|
-
*/
|
|
69
|
-
export function addScrollbarProperty(options: {
|
|
70
|
-
scrollableChild?: HTMLElement;
|
|
71
|
-
container?: Window | HTMLElement;
|
|
72
|
-
propertyElement?: HTMLElement;
|
|
73
|
-
propName?: string;
|
|
74
|
-
}): void;
|
|
75
|
-
/**
|
|
76
|
-
* Calculates the width of the scrollbar.
|
|
77
|
-
*
|
|
78
|
-
* @param {HTMLElement} [element=document.body] -The element that is the child of a scrollable container
|
|
79
|
-
* @param {Window|HTMLElement} [container=window] - The container that can be scrolled
|
|
80
|
-
* @returns {number} The width of the scrollbar in pixels.
|
|
81
|
-
*/
|
|
82
|
-
export function getScrollbarWidth(element?: HTMLElement, container?: Window | HTMLElement): number;
|
|
83
|
-
/**
|
|
84
|
-
* @module utils/dom
|
|
85
|
-
*/
|
|
86
|
-
export const regexJsonString: RegExp;
|
|
87
28
|
//# sourceMappingURL=dom.d.ts.map
|
package/types/utils/dom.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../js/utils/dom.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../js/utils/dom.js"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,2DAFa,MAAM,CAIlB;AAED;;;;;;;;;GASG;AACH,2CAHa,IAAI,uBAoChB;AAED;;;;;;;;GAQG;AACH,8CANa,MAAM,EAAE,CAiBpB"}
|
package/types/utils/index.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ export * as index from "./index.js";
|
|
|
6
6
|
export * as pauseYoutubeVideo from "./pause-youtube-video.js";
|
|
7
7
|
export * as fileSave from "./file-save.js";
|
|
8
8
|
export * as fontAwesome from "./font-awesome.js";
|
|
9
|
-
declare namespace
|
|
9
|
+
declare namespace ___Users_joe_Projects_Personal_Github_frontend_js_utils_index_ { }
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../js/utils/system.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../js/utils/system.js"],"names":[],"mappings":"AAUA;;GAEG;AACH;IACE;;;MAGE;IACF,iCAGE;IACF,oCAEE;IAEF;;;;;OAKG;IACH;QAH2B,IAAI;QACJ,aAAa;OAUvC;IAFC,aAAwE;IACxE,iBAAgD;IAElD;;;;;;;;;OASG;IACH;QAP4B,KAAK;QACP,GAAG;QACF,QAAQ;QACV,MAAM;QACJ,aAAa;QACT,OAAO,EAA3B,WAAW;aAYrB;IACD;;;;;;;;OAQG;IACH;QAN4B,KAAK;QACP,GAAG,EAAlB,MAAM;QACU,QAAQ,EAAxB,OAAO;QACS,cAAc,EAA9B,OAAO;QACa,OAAO,EAA3B,WAAW;aAMrB;IACD;;;;OAIG;IACH,kCAGC;IACD;;;OAGG;IACH,uCAEC;IACD;;;OAGG;IACH,2CAEC;IACD;;;;;;OAMG;IACH,uDALW,WAAW,GAGT,MAAM;QAAC,OAAO,EAAE,WAAW,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,WAAU;KAAC,CAAC,CAS7E;IACD;;;OAGG;IACH,2BAFW,WAAW,QAIrB;IACD;;;OAGG;IACH,qCAGC;IACD;;OAEG;IACH,0BAEC;IACD;;OAEG;IACH,2BAEC;IACD;;OAEG;IACH,+BAEC;CACF;AAED;;GAEG;AACH;CAEC"}
|