tyrell-components 1.0.0-RC7 → 1.0.0-TC10
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/dist/tyrell.js +1 -1
- package/lib/components/button.d.ts +9 -0
- package/lib/components/button.d.ts.map +1 -1
- package/lib/components/button.js +34 -1
- package/lib/components/button.js.map +1 -1
- package/lib/components/dropdown.d.ts +15 -13
- package/lib/components/dropdown.d.ts.map +1 -1
- package/lib/components/dropdown.js +52 -37
- package/lib/components/dropdown.js.map +1 -1
- package/lib/components/file-upload.d.ts +121 -0
- package/lib/components/file-upload.d.ts.map +1 -0
- package/lib/components/file-upload.js +441 -0
- package/lib/components/file-upload.js.map +1 -0
- package/lib/components/multiselect.d.ts +15 -4
- package/lib/components/multiselect.d.ts.map +1 -1
- package/lib/components/multiselect.js +56 -21
- package/lib/components/multiselect.js.map +1 -1
- package/lib/index.d.ts +8 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/lib/styles/button.d.ts +1 -1
- package/lib/styles/button.d.ts.map +1 -1
- package/lib/styles/button.js +41 -0
- package/lib/styles/button.js.map +1 -1
- package/lib/styles/dropdown.d.ts +1 -1
- package/lib/styles/dropdown.d.ts.map +1 -1
- package/lib/styles/dropdown.js +73 -0
- package/lib/styles/dropdown.js.map +1 -1
- package/lib/styles/file-upload.d.ts +2 -0
- package/lib/styles/file-upload.d.ts.map +1 -0
- package/lib/styles/file-upload.js +241 -0
- package/lib/styles/file-upload.js.map +1 -0
- package/lib/styles/multiselect.d.ts +1 -1
- package/lib/styles/multiselect.d.ts.map +1 -1
- package/lib/styles/multiselect.js +71 -0
- package/lib/styles/multiselect.js.map +1 -1
- package/lib/utils/loader-registry.d.ts +35 -0
- package/lib/utils/loader-registry.d.ts.map +1 -0
- package/lib/utils/loader-registry.js +43 -0
- package/lib/utils/loader-registry.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.d.ts.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/package.json +5 -1
|
@@ -768,6 +768,77 @@ export const multiselectStyles = `
|
|
|
768
768
|
display: none !important;
|
|
769
769
|
}
|
|
770
770
|
|
|
771
|
+
/* ==================== LOADING STATE ====================
|
|
772
|
+
Spinner overlay shown inside the options area while the parent
|
|
773
|
+
(external-search mode) is fetching. Search input stays usable.
|
|
774
|
+
|
|
775
|
+
Carries its own surface so it stays visible even when the host
|
|
776
|
+
has restyled the popup with a transparent or unusual background.
|
|
777
|
+
Override with --ty-loader-bg / --ty-loader-radius / --ty-loader-border.
|
|
778
|
+
*/
|
|
779
|
+
.dropdown-loading {
|
|
780
|
+
display: none;
|
|
781
|
+
align-items: center;
|
|
782
|
+
justify-content: center;
|
|
783
|
+
gap: var(--ty-spacing-2);
|
|
784
|
+
padding: var(--ty-spacing-4) var(--ty-spacing-3);
|
|
785
|
+
color: var(--ty-text-soft);
|
|
786
|
+
font-size: var(--ty-font-sm);
|
|
787
|
+
min-height: 4rem;
|
|
788
|
+
/* Match the .dropdown-options popup look — same background, border, radius, shadow */
|
|
789
|
+
background: var(--ty-loader-bg, var(--input-bg, var(--ty-input-bg)));
|
|
790
|
+
border: 1px solid var(--ty-loader-border, var(--input-border, var(--ty-input-border)));
|
|
791
|
+
border-radius: var(--ty-loader-radius, var(--ty-radius-lg));
|
|
792
|
+
box-shadow: var(--ty-loader-shadow, 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04));
|
|
793
|
+
box-sizing: border-box;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
.dropdown-options-wrapper.loading .dropdown-loading {
|
|
797
|
+
display: flex;
|
|
798
|
+
}
|
|
799
|
+
|
|
800
|
+
/* Slot is transparent for layout — fallback (spinner + text) and user-provided
|
|
801
|
+
slotted content both act as direct flex children of .dropdown-loading. */
|
|
802
|
+
.dropdown-loading > slot[name="loading"] {
|
|
803
|
+
display: contents;
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
.dropdown-options-wrapper.loading .dropdown-options,
|
|
807
|
+
.dropdown-options-wrapper.loading > slot#options-slot,
|
|
808
|
+
.dropdown-options-wrapper.loading .empty-state {
|
|
809
|
+
display: none;
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
.dropdown-loading-spinner {
|
|
813
|
+
display: inline-flex;
|
|
814
|
+
align-items: center;
|
|
815
|
+
justify-content: center;
|
|
816
|
+
width: 1.125rem;
|
|
817
|
+
height: 1.125rem;
|
|
818
|
+
flex-shrink: 0;
|
|
819
|
+
animation: ty-multiselect-spin 0.7s linear infinite;
|
|
820
|
+
color: var(--ty-color-primary);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.dropdown-loading-spinner svg {
|
|
824
|
+
width: 100%;
|
|
825
|
+
height: 100%;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.dropdown-loading-text {
|
|
829
|
+
color: var(--ty-text-soft);
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
@keyframes ty-multiselect-spin {
|
|
833
|
+
to { transform: rotate(360deg); }
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
@media (prefers-reduced-motion: reduce) {
|
|
837
|
+
.dropdown-loading-spinner {
|
|
838
|
+
animation-duration: 1.6s;
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
|
|
771
842
|
/* Custom scrollbar styles */
|
|
772
843
|
${customScrollbarStyles}
|
|
773
844
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiselect.js","sourceRoot":"","sources":["../../src/styles/multiselect.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,CAAC,MAAM,iBAAiB,GAAG
|
|
1
|
+
{"version":3,"file":"multiselect.js","sourceRoot":"","sources":["../../src/styles/multiselect.ts"],"names":[],"mappings":"AA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
|
+
* Set once at app bootstrap to override the default spinner SVG used by
|
|
5
|
+
* every loading-aware component (`ty-button`, `ty-dropdown`, `ty-multiselect`,
|
|
6
|
+
* etc.). Components call `getLoaderSvg()` on every render, so changing the
|
|
7
|
+
* registered SVG affects future renders.
|
|
8
|
+
*
|
|
9
|
+
* The wrapper element rotates the SVG with `transform: rotate()`, so prefer
|
|
10
|
+
* a *static* SVG. If you must use a self-animating SVG, disable the wrapper
|
|
11
|
+
* spin with the `--ty-loader-animation: none` CSS custom property.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { setLoaderSvg } from 'tyrell-components'
|
|
15
|
+
* setLoaderSvg('<svg viewBox="0 0 24 24">...</svg>')
|
|
16
|
+
*
|
|
17
|
+
* // CDN / vanilla
|
|
18
|
+
* window.tyLoader.set('<svg ...>...</svg>')
|
|
19
|
+
*
|
|
20
|
+
* // Reset to default
|
|
21
|
+
* setLoaderSvg(null)
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Register a custom spinner SVG (markup string). Pass `null` to reset to
|
|
25
|
+
* the built-in default.
|
|
26
|
+
*/
|
|
27
|
+
export declare function setLoaderSvg(svg: string | null): void;
|
|
28
|
+
/**
|
|
29
|
+
* Get the currently registered spinner SVG, or the built-in default if
|
|
30
|
+
* none has been set. Components call this on every render.
|
|
31
|
+
*/
|
|
32
|
+
export declare function getLoaderSvg(): string;
|
|
33
|
+
/** Reset the registered loader back to the built-in default. */
|
|
34
|
+
export declare function resetLoaderSvg(): void;
|
|
35
|
+
//# sourceMappingURL=loader-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-registry.d.ts","sourceRoot":"","sources":["../../src/utils/loader-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAMH;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAErD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAErC;AAED,gEAAgE;AAChE,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global loader-icon registry.
|
|
3
|
+
*
|
|
4
|
+
* Set once at app bootstrap to override the default spinner SVG used by
|
|
5
|
+
* every loading-aware component (`ty-button`, `ty-dropdown`, `ty-multiselect`,
|
|
6
|
+
* etc.). Components call `getLoaderSvg()` on every render, so changing the
|
|
7
|
+
* registered SVG affects future renders.
|
|
8
|
+
*
|
|
9
|
+
* The wrapper element rotates the SVG with `transform: rotate()`, so prefer
|
|
10
|
+
* a *static* SVG. If you must use a self-animating SVG, disable the wrapper
|
|
11
|
+
* spin with the `--ty-loader-animation: none` CSS custom property.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* import { setLoaderSvg } from 'tyrell-components'
|
|
15
|
+
* setLoaderSvg('<svg viewBox="0 0 24 24">...</svg>')
|
|
16
|
+
*
|
|
17
|
+
* // CDN / vanilla
|
|
18
|
+
* window.tyLoader.set('<svg ...>...</svg>')
|
|
19
|
+
*
|
|
20
|
+
* // Reset to default
|
|
21
|
+
* setLoaderSvg(null)
|
|
22
|
+
*/
|
|
23
|
+
const DEFAULT_LOADER_SVG = `<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><circle cx="12" cy="12" r="10" stroke="currentColor" stroke-width="3" stroke-opacity="0.25"/><path d="M22 12a10 10 0 0 1-10 10" stroke="currentColor" stroke-width="3" stroke-linecap="round"/></svg>`;
|
|
24
|
+
let customLoaderSvg = null;
|
|
25
|
+
/**
|
|
26
|
+
* Register a custom spinner SVG (markup string). Pass `null` to reset to
|
|
27
|
+
* the built-in default.
|
|
28
|
+
*/
|
|
29
|
+
export function setLoaderSvg(svg) {
|
|
30
|
+
customLoaderSvg = svg && svg.trim() ? svg : null;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the currently registered spinner SVG, or the built-in default if
|
|
34
|
+
* none has been set. Components call this on every render.
|
|
35
|
+
*/
|
|
36
|
+
export function getLoaderSvg() {
|
|
37
|
+
return customLoaderSvg ?? DEFAULT_LOADER_SVG;
|
|
38
|
+
}
|
|
39
|
+
/** Reset the registered loader back to the built-in default. */
|
|
40
|
+
export function resetLoaderSvg() {
|
|
41
|
+
customLoaderSvg = null;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=loader-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loader-registry.js","sourceRoot":"","sources":["../../src/utils/loader-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,kBAAkB,GAAG,kSAAkS,CAAA;AAE7T,IAAI,eAAe,GAAkB,IAAI,CAAA;AAEzC;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,GAAkB;IAC7C,eAAe,GAAG,GAAG,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAA;AAClD,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY;IAC1B,OAAO,eAAe,IAAI,kBAAkB,CAAA;AAC9C,CAAC;AAED,gEAAgE;AAChE,MAAM,UAAU,cAAc;IAC5B,eAAe,GAAG,IAAI,CAAA;AACxB,CAAC"}
|
package/lib/version.d.ts
CHANGED
package/lib/version.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,eAAe,CAAA"}
|
package/lib/version.js
CHANGED
package/lib/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,0EAA0E;AAC1E,+CAA+C;AAE/C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,oCAAoC;AACpC,0EAA0E;AAC1E,+CAA+C;AAE/C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tyrell-components",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-TC10",
|
|
4
4
|
"description": "Tyrell Components - Framework-agnostic web components with semantic design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -44,6 +44,10 @@
|
|
|
44
44
|
"types": "./lib/components/copy.d.ts",
|
|
45
45
|
"import": "./lib/components/copy.js"
|
|
46
46
|
},
|
|
47
|
+
"./file-upload": {
|
|
48
|
+
"types": "./lib/components/file-upload.d.ts",
|
|
49
|
+
"import": "./lib/components/file-upload.js"
|
|
50
|
+
},
|
|
47
51
|
"./popup": {
|
|
48
52
|
"types": "./lib/components/popup.d.ts",
|
|
49
53
|
"import": "./lib/components/popup.js"
|