@lostgradient/cinder 0.23.1 → 0.24.1
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 +59 -0
- package/components.json +1 -1
- package/dist/_internal/text-direction-sheet-index.d.ts +69 -0
- package/dist/components/access-gate/index.js +447 -354
- package/dist/components/approval-card/index.js +72 -1
- package/dist/components/autocomplete/index.js +72 -1
- package/dist/components/avatar-group/index.js +72 -1
- package/dist/components/carousel/index.js +73 -1
- package/dist/components/combobox/index.js +72 -1
- package/dist/components/command-menu/index.js +74 -1
- package/dist/components/context-menu/index.js +74 -1
- package/dist/components/date-picker/index.js +72 -1
- package/dist/components/date-range-field/index.js +72 -1
- package/dist/components/dropdown/index.js +74 -1
- package/dist/components/dropdown-menu/index.js +74 -1
- package/dist/components/file-upload/file-upload-list.svelte.d.ts +12 -0
- package/dist/components/file-upload/file-upload-utilities.d.ts +15 -0
- package/dist/components/file-upload/file-upload.css +152 -11
- package/dist/components/file-upload/file-upload.schema.js +39 -5
- package/dist/components/file-upload/file-upload.types.d.ts +33 -5
- package/dist/components/file-upload/index.js +1017 -264
- package/dist/components/hover-card/index.js +72 -1
- package/dist/components/invocation-rule-builder/index.js +72 -1
- package/dist/components/json-schema-editor/index.js +72 -1
- package/dist/components/mega-menu/index.js +73 -1
- package/dist/components/menu-bar/index.js +74 -1
- package/dist/components/multi-select/index.js +72 -1
- package/dist/components/navigation-bar/index.js +72 -1
- package/dist/components/popover/index.js +72 -1
- package/dist/components/portal/index.js +72 -1
- package/dist/components/selection-popover/index.js +72 -1
- package/dist/components/slider/index.js +73 -1
- package/dist/components/speed-dial/index.js +72 -1
- package/dist/components/speed-dial-action/index.js +72 -1
- package/dist/components/tooltip/index.js +72 -1
- package/dist/index.js +18932 -18257
- package/dist/server/components/access-gate/index.js +7 -4
- package/dist/server/components/approval-card/index.js +6 -5
- package/dist/server/components/autocomplete/index.js +6 -5
- package/dist/server/components/avatar-group/index.js +6 -5
- package/dist/server/components/carousel/index.js +3 -2
- package/dist/server/components/combobox/index.js +7 -6
- package/dist/server/components/command-menu/index.js +6 -5
- package/dist/server/components/context-menu/index.js +7 -6
- package/dist/server/components/date-picker/index.js +7 -6
- package/dist/server/components/date-range-field/index.js +7 -6
- package/dist/server/components/dropdown/index.js +7 -6
- package/dist/server/components/dropdown-menu/index.js +7 -6
- package/dist/server/components/file-upload/index.js +10 -2
- package/dist/server/components/hover-card/index.js +5 -4
- package/dist/server/components/icons/index.js +17 -11
- package/dist/server/components/invocation-rule-builder/index.js +7 -6
- package/dist/server/components/json-schema-editor/index.js +10 -7
- package/dist/server/components/mega-menu/index.js +4 -3
- package/dist/server/components/menu-bar/index.js +7 -6
- package/dist/server/components/multi-select/index.js +5 -4
- package/dist/server/components/navigation-bar/index.js +5 -4
- package/dist/server/components/popover/index.js +6 -5
- package/dist/server/components/portal/index.js +4 -3
- package/dist/server/components/selection-popover/index.js +5 -4
- package/dist/server/components/slider/index.js +4 -3
- package/dist/server/components/speed-dial/index.js +6 -5
- package/dist/server/components/speed-dial-action/index.js +5 -4
- package/dist/server/components/tooltip/index.js +6 -5
- package/dist/server/index.js +45 -39
- package/dist/server/{index.server-116jzzd0.js → index.server-0d1703dw.js} +1 -1
- package/dist/server/index.server-3cpak389.js +689 -0
- package/dist/server/{index.server-wmeaz6qk.js → index.server-5smw78xz.js} +78 -109
- package/dist/server/{index.server-nwgxhrzg.js → index.server-6vd98s4m.js} +1 -1
- package/dist/server/{index.server-4hvjet4z.js → index.server-7h3nmj3g.js} +7 -5
- package/dist/server/{index.server-3e8n2sry.js → index.server-7vzk6qhf.js} +2 -2
- package/dist/server/{index.server-h6qhx8mw.js → index.server-83fg1k4x.js} +7 -1
- package/dist/server/{index.server-5mz0e28m.js → index.server-8bv9bkm6.js} +1 -1
- package/dist/server/{index.server-59hgwg0n.js → index.server-8xr5tbrn.js} +1 -1
- package/dist/server/{index.server-x5zjwrnb.js → index.server-aphnpg78.js} +2 -2
- package/dist/server/{index.server-9scm7zf9.js → index.server-aywvs10h.js} +1 -1
- package/dist/server/index.server-bfkka7x4.js +2 -0
- package/dist/server/{index.server-2h45p8kd.js → index.server-bjj2hpx1.js} +2 -2
- package/dist/server/{index.server-4w0rydct.js → index.server-bw1wbzzk.js} +1 -1
- package/dist/server/{index.server-w5f4ex0f.js → index.server-c71m0a88.js} +1 -1
- package/dist/server/{index.server-kergq7c5.js → index.server-cmz3t3zw.js} +1 -1
- package/dist/server/{index.server-t2p901p7.js → index.server-cn3tg876.js} +1 -1
- package/dist/server/{index.server-6z6s8qz8.js → index.server-d05m93p4.js} +1 -1
- package/dist/server/{index.server-yr2ndv9a.js → index.server-d7twz1zm.js} +1 -1
- package/dist/server/{index.server-1cnz5ax1.js → index.server-emqv9bz6.js} +1 -1
- package/dist/server/index.server-fvtdyxbc.js +2 -0
- package/dist/server/{index.server-5wmzrvvs.js → index.server-gg4jre7c.js} +1 -1
- package/dist/server/{index.server-t91tbrmn.js → index.server-h76gdmj1.js} +2 -2
- package/dist/server/{index.server-bjw3e1wh.js → index.server-hvp84h1d.js} +1 -1
- package/dist/server/{index.server-7kez94sz.js → index.server-j6wms88v.js} +1 -1
- package/dist/server/{index.server-8t53gqe7.js → index.server-k21nfvxe.js} +2 -2
- package/dist/server/{index.server-6771g0q4.js → index.server-mf4dr1kp.js} +5 -1
- package/dist/server/{index.server-s2dseqdh.js → index.server-p69bvf14.js} +1 -1
- package/dist/server/{index.server-br3khchh.js → index.server-ppw26tpq.js} +1 -1
- package/dist/server/{index.server-q7r53g7z.js → index.server-s4pfz6pb.js} +1 -1
- package/dist/server/index.server-sje2hers.js +97 -0
- package/dist/server/{index.server-drdtprjs.js → index.server-spdds2hk.js} +1 -1
- package/dist/server/index.server-sz6y8xqk.js +2 -0
- package/dist/server/index.server-tkv7aey1.js +35 -0
- package/dist/server/{index.server-rf9pd5mr.js → index.server-w20xg416.js} +1 -1
- package/dist/server/index.server-xvg6mjdw.js +73 -0
- package/dist/server/{index.server-03ndc3td.js → index.server-ye5xkaq2.js} +1 -1
- package/dist/server/{index.server-ejdprw7f.js → index.server-ykvb4rcc.js} +1 -1
- package/dist/server/index.server-yq9evnp4.js +38 -0
- package/dist/server/index.server-yrfah2yz.js +33 -0
- package/dist/server/{index.server-9n2bc545.js → index.server-zbgdfzy6.js} +1 -1
- package/dist/server/{index.server-n6wm89xy.js → index.server-zj0x74bt.js} +1 -1
- package/package.json +556 -556
- package/src/_internal/text-direction-css.ts +6 -0
- package/src/_internal/text-direction-sheet-index.ts +170 -0
- package/src/components/file-upload/file-upload-list.svelte +198 -0
- package/src/components/file-upload/file-upload-utilities.ts +262 -0
- package/src/components/file-upload/file-upload.css +152 -11
- package/src/components/file-upload/file-upload.examples.json +1 -1
- package/src/components/file-upload/file-upload.schema.json +38 -4
- package/src/components/file-upload/file-upload.schema.ts +40 -4
- package/src/components/file-upload/file-upload.svelte +176 -146
- package/src/components/file-upload/file-upload.types.ts +33 -5
- package/src/components/portal/portal.utilities.svelte.ts +8 -0
- package/dist/server/index.server-1qvmrpnx.js +0 -328
- package/dist/server/index.server-4n1mxg74.js +0 -2
- package/dist/server/index.server-7trweg3f.js +0 -61
|
@@ -1895,6 +1895,76 @@ function classNames(...parts) {
|
|
|
1895
1895
|
import * as $2 from "svelte/internal/client";
|
|
1896
1896
|
import { untrack } from "svelte";
|
|
1897
1897
|
|
|
1898
|
+
// src/_internal/text-direction-sheet-index.ts
|
|
1899
|
+
var sheetIndex = new WeakMap;
|
|
1900
|
+
function resetDirectionStyleSheetIndex() {
|
|
1901
|
+
sheetIndex = new WeakMap;
|
|
1902
|
+
}
|
|
1903
|
+
function styleSheetDeclaresDirection(sheet) {
|
|
1904
|
+
let rules;
|
|
1905
|
+
try {
|
|
1906
|
+
rules = sheet.cssRules;
|
|
1907
|
+
} catch {
|
|
1908
|
+
return true;
|
|
1909
|
+
}
|
|
1910
|
+
const cached = sheetIndex.get(sheet);
|
|
1911
|
+
if (cached !== undefined && cached.ruleCount === rules.length)
|
|
1912
|
+
return cached.declaresDirection;
|
|
1913
|
+
const isConstructed = Reflect.get(sheet, "ownerNode") == null;
|
|
1914
|
+
const scan = { declaresDirection: false, cacheable: !isConstructed };
|
|
1915
|
+
scanRuleList(rules, scan);
|
|
1916
|
+
if (scan.cacheable || scan.declaresDirection) {
|
|
1917
|
+
sheetIndex.set(sheet, { ruleCount: rules.length, declaresDirection: scan.declaresDirection });
|
|
1918
|
+
} else {
|
|
1919
|
+
sheetIndex.delete(sheet);
|
|
1920
|
+
}
|
|
1921
|
+
return scan.declaresDirection;
|
|
1922
|
+
}
|
|
1923
|
+
function scanRuleList(rules, state) {
|
|
1924
|
+
for (const rule of Array.from(rules)) {
|
|
1925
|
+
if (state.declaresDirection)
|
|
1926
|
+
return;
|
|
1927
|
+
if (Reflect.get(rule, "type") === 3) {
|
|
1928
|
+
state.cacheable = false;
|
|
1929
|
+
const imported = Reflect.get(rule, "styleSheet");
|
|
1930
|
+
if (imported) {
|
|
1931
|
+
try {
|
|
1932
|
+
const importedRules = Reflect.get(imported, "cssRules");
|
|
1933
|
+
if (isRuleCollection(importedRules))
|
|
1934
|
+
scanRuleList(importedRules, state);
|
|
1935
|
+
} catch {
|
|
1936
|
+
state.declaresDirection = true;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
continue;
|
|
1940
|
+
}
|
|
1941
|
+
const style = Reflect.get(rule, "style");
|
|
1942
|
+
if (typeof style === "object" && style !== null && typeof Reflect.get(rule, "selectorText") === "string" && Boolean(Reflect.get(style, "direction"))) {
|
|
1943
|
+
state.declaresDirection = true;
|
|
1944
|
+
return;
|
|
1945
|
+
}
|
|
1946
|
+
if (!("cssRules" in rule))
|
|
1947
|
+
continue;
|
|
1948
|
+
try {
|
|
1949
|
+
const nested = Reflect.get(rule, "cssRules");
|
|
1950
|
+
if (isRuleCollection(nested))
|
|
1951
|
+
scanRuleList(nested, state);
|
|
1952
|
+
} catch {
|
|
1953
|
+
state.declaresDirection = true;
|
|
1954
|
+
return;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
function isRuleCollection(value) {
|
|
1959
|
+
if (typeof CSSRuleList !== "undefined" && value instanceof CSSRuleList)
|
|
1960
|
+
return true;
|
|
1961
|
+
if (Array.isArray(value))
|
|
1962
|
+
return true;
|
|
1963
|
+
if (typeof value !== "object" || value === null)
|
|
1964
|
+
return false;
|
|
1965
|
+
return typeof Reflect.get(value, Symbol.iterator) === "function";
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1898
1968
|
// ../../node_modules/esm-env/true.js
|
|
1899
1969
|
var true_default = true;
|
|
1900
1970
|
// src/utilities/dev-warn.ts
|
|
@@ -2408,6 +2478,7 @@ function invalidateComputedDirections() {
|
|
|
2408
2478
|
});
|
|
2409
2479
|
}
|
|
2410
2480
|
function invalidatePortalDirection() {
|
|
2481
|
+
resetDirectionStyleSheetIndex();
|
|
2411
2482
|
if (computedDirectionObservations.size === 0)
|
|
2412
2483
|
return;
|
|
2413
2484
|
refreshMediaQueryObservers();
|
|
@@ -5138,4 +5209,4 @@ export {
|
|
|
5138
5209
|
Date_picker as DatePicker
|
|
5139
5210
|
};
|
|
5140
5211
|
|
|
5141
|
-
//# debugId=
|
|
5212
|
+
//# debugId=B14D7BA88EE90A2064756E2164756E21
|
|
@@ -1895,6 +1895,76 @@ function classNames(...parts) {
|
|
|
1895
1895
|
import * as $2 from "svelte/internal/client";
|
|
1896
1896
|
import { untrack } from "svelte";
|
|
1897
1897
|
|
|
1898
|
+
// src/_internal/text-direction-sheet-index.ts
|
|
1899
|
+
var sheetIndex = new WeakMap;
|
|
1900
|
+
function resetDirectionStyleSheetIndex() {
|
|
1901
|
+
sheetIndex = new WeakMap;
|
|
1902
|
+
}
|
|
1903
|
+
function styleSheetDeclaresDirection(sheet) {
|
|
1904
|
+
let rules;
|
|
1905
|
+
try {
|
|
1906
|
+
rules = sheet.cssRules;
|
|
1907
|
+
} catch {
|
|
1908
|
+
return true;
|
|
1909
|
+
}
|
|
1910
|
+
const cached = sheetIndex.get(sheet);
|
|
1911
|
+
if (cached !== undefined && cached.ruleCount === rules.length)
|
|
1912
|
+
return cached.declaresDirection;
|
|
1913
|
+
const isConstructed = Reflect.get(sheet, "ownerNode") == null;
|
|
1914
|
+
const scan = { declaresDirection: false, cacheable: !isConstructed };
|
|
1915
|
+
scanRuleList(rules, scan);
|
|
1916
|
+
if (scan.cacheable || scan.declaresDirection) {
|
|
1917
|
+
sheetIndex.set(sheet, { ruleCount: rules.length, declaresDirection: scan.declaresDirection });
|
|
1918
|
+
} else {
|
|
1919
|
+
sheetIndex.delete(sheet);
|
|
1920
|
+
}
|
|
1921
|
+
return scan.declaresDirection;
|
|
1922
|
+
}
|
|
1923
|
+
function scanRuleList(rules, state) {
|
|
1924
|
+
for (const rule of Array.from(rules)) {
|
|
1925
|
+
if (state.declaresDirection)
|
|
1926
|
+
return;
|
|
1927
|
+
if (Reflect.get(rule, "type") === 3) {
|
|
1928
|
+
state.cacheable = false;
|
|
1929
|
+
const imported = Reflect.get(rule, "styleSheet");
|
|
1930
|
+
if (imported) {
|
|
1931
|
+
try {
|
|
1932
|
+
const importedRules = Reflect.get(imported, "cssRules");
|
|
1933
|
+
if (isRuleCollection(importedRules))
|
|
1934
|
+
scanRuleList(importedRules, state);
|
|
1935
|
+
} catch {
|
|
1936
|
+
state.declaresDirection = true;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
continue;
|
|
1940
|
+
}
|
|
1941
|
+
const style = Reflect.get(rule, "style");
|
|
1942
|
+
if (typeof style === "object" && style !== null && typeof Reflect.get(rule, "selectorText") === "string" && Boolean(Reflect.get(style, "direction"))) {
|
|
1943
|
+
state.declaresDirection = true;
|
|
1944
|
+
return;
|
|
1945
|
+
}
|
|
1946
|
+
if (!("cssRules" in rule))
|
|
1947
|
+
continue;
|
|
1948
|
+
try {
|
|
1949
|
+
const nested = Reflect.get(rule, "cssRules");
|
|
1950
|
+
if (isRuleCollection(nested))
|
|
1951
|
+
scanRuleList(nested, state);
|
|
1952
|
+
} catch {
|
|
1953
|
+
state.declaresDirection = true;
|
|
1954
|
+
return;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
function isRuleCollection(value) {
|
|
1959
|
+
if (typeof CSSRuleList !== "undefined" && value instanceof CSSRuleList)
|
|
1960
|
+
return true;
|
|
1961
|
+
if (Array.isArray(value))
|
|
1962
|
+
return true;
|
|
1963
|
+
if (typeof value !== "object" || value === null)
|
|
1964
|
+
return false;
|
|
1965
|
+
return typeof Reflect.get(value, Symbol.iterator) === "function";
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1898
1968
|
// ../../node_modules/esm-env/true.js
|
|
1899
1969
|
var true_default = true;
|
|
1900
1970
|
// src/utilities/dev-warn.ts
|
|
@@ -2408,6 +2478,7 @@ function invalidateComputedDirections() {
|
|
|
2408
2478
|
});
|
|
2409
2479
|
}
|
|
2410
2480
|
function invalidatePortalDirection() {
|
|
2481
|
+
resetDirectionStyleSheetIndex();
|
|
2411
2482
|
if (computedDirectionObservations.size === 0)
|
|
2412
2483
|
return;
|
|
2413
2484
|
refreshMediaQueryObservers();
|
|
@@ -5464,4 +5535,4 @@ export {
|
|
|
5464
5535
|
Date_range_field as DateRangeField
|
|
5465
5536
|
};
|
|
5466
5537
|
|
|
5467
|
-
//# debugId=
|
|
5538
|
+
//# debugId=2F0E0DF3F6FC074D64756E2164756E21
|
|
@@ -1895,6 +1895,76 @@ function classNames(...parts) {
|
|
|
1895
1895
|
import * as $2 from "svelte/internal/client";
|
|
1896
1896
|
import { untrack } from "svelte";
|
|
1897
1897
|
|
|
1898
|
+
// src/_internal/text-direction-sheet-index.ts
|
|
1899
|
+
var sheetIndex = new WeakMap;
|
|
1900
|
+
function resetDirectionStyleSheetIndex() {
|
|
1901
|
+
sheetIndex = new WeakMap;
|
|
1902
|
+
}
|
|
1903
|
+
function styleSheetDeclaresDirection(sheet) {
|
|
1904
|
+
let rules;
|
|
1905
|
+
try {
|
|
1906
|
+
rules = sheet.cssRules;
|
|
1907
|
+
} catch {
|
|
1908
|
+
return true;
|
|
1909
|
+
}
|
|
1910
|
+
const cached = sheetIndex.get(sheet);
|
|
1911
|
+
if (cached !== undefined && cached.ruleCount === rules.length)
|
|
1912
|
+
return cached.declaresDirection;
|
|
1913
|
+
const isConstructed = Reflect.get(sheet, "ownerNode") == null;
|
|
1914
|
+
const scan = { declaresDirection: false, cacheable: !isConstructed };
|
|
1915
|
+
scanRuleList(rules, scan);
|
|
1916
|
+
if (scan.cacheable || scan.declaresDirection) {
|
|
1917
|
+
sheetIndex.set(sheet, { ruleCount: rules.length, declaresDirection: scan.declaresDirection });
|
|
1918
|
+
} else {
|
|
1919
|
+
sheetIndex.delete(sheet);
|
|
1920
|
+
}
|
|
1921
|
+
return scan.declaresDirection;
|
|
1922
|
+
}
|
|
1923
|
+
function scanRuleList(rules, state) {
|
|
1924
|
+
for (const rule of Array.from(rules)) {
|
|
1925
|
+
if (state.declaresDirection)
|
|
1926
|
+
return;
|
|
1927
|
+
if (Reflect.get(rule, "type") === 3) {
|
|
1928
|
+
state.cacheable = false;
|
|
1929
|
+
const imported = Reflect.get(rule, "styleSheet");
|
|
1930
|
+
if (imported) {
|
|
1931
|
+
try {
|
|
1932
|
+
const importedRules = Reflect.get(imported, "cssRules");
|
|
1933
|
+
if (isRuleCollection(importedRules))
|
|
1934
|
+
scanRuleList(importedRules, state);
|
|
1935
|
+
} catch {
|
|
1936
|
+
state.declaresDirection = true;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
continue;
|
|
1940
|
+
}
|
|
1941
|
+
const style = Reflect.get(rule, "style");
|
|
1942
|
+
if (typeof style === "object" && style !== null && typeof Reflect.get(rule, "selectorText") === "string" && Boolean(Reflect.get(style, "direction"))) {
|
|
1943
|
+
state.declaresDirection = true;
|
|
1944
|
+
return;
|
|
1945
|
+
}
|
|
1946
|
+
if (!("cssRules" in rule))
|
|
1947
|
+
continue;
|
|
1948
|
+
try {
|
|
1949
|
+
const nested = Reflect.get(rule, "cssRules");
|
|
1950
|
+
if (isRuleCollection(nested))
|
|
1951
|
+
scanRuleList(nested, state);
|
|
1952
|
+
} catch {
|
|
1953
|
+
state.declaresDirection = true;
|
|
1954
|
+
return;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
function isRuleCollection(value) {
|
|
1959
|
+
if (typeof CSSRuleList !== "undefined" && value instanceof CSSRuleList)
|
|
1960
|
+
return true;
|
|
1961
|
+
if (Array.isArray(value))
|
|
1962
|
+
return true;
|
|
1963
|
+
if (typeof value !== "object" || value === null)
|
|
1964
|
+
return false;
|
|
1965
|
+
return typeof Reflect.get(value, Symbol.iterator) === "function";
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1898
1968
|
// ../../node_modules/esm-env/true.js
|
|
1899
1969
|
var true_default = true;
|
|
1900
1970
|
// src/utilities/dev-warn.ts
|
|
@@ -2408,6 +2478,7 @@ function invalidateComputedDirections() {
|
|
|
2408
2478
|
});
|
|
2409
2479
|
}
|
|
2410
2480
|
function invalidatePortalDirection() {
|
|
2481
|
+
resetDirectionStyleSheetIndex();
|
|
2411
2482
|
if (computedDirectionObservations.size === 0)
|
|
2412
2483
|
return;
|
|
2413
2484
|
refreshMediaQueryObservers();
|
|
@@ -3631,6 +3702,8 @@ function matchesDirectionStyleRule(element, getParentElement) {
|
|
|
3631
3702
|
for (const [sheet, fallbackRoot] of styleSheets) {
|
|
3632
3703
|
if (!isActiveStyleSheet(sheet))
|
|
3633
3704
|
continue;
|
|
3705
|
+
if (!styleSheetDeclaresDirection(sheet))
|
|
3706
|
+
continue;
|
|
3634
3707
|
let rules;
|
|
3635
3708
|
try {
|
|
3636
3709
|
rules = sheet.cssRules;
|
|
@@ -5541,4 +5614,4 @@ export {
|
|
|
5541
5614
|
Dropdown2 as Dropdown
|
|
5542
5615
|
};
|
|
5543
5616
|
|
|
5544
|
-
//# debugId=
|
|
5617
|
+
//# debugId=00F466FE7EA24B5064756E2164756E21
|
|
@@ -1895,6 +1895,76 @@ function classNames(...parts) {
|
|
|
1895
1895
|
import * as $2 from "svelte/internal/client";
|
|
1896
1896
|
import { untrack } from "svelte";
|
|
1897
1897
|
|
|
1898
|
+
// src/_internal/text-direction-sheet-index.ts
|
|
1899
|
+
var sheetIndex = new WeakMap;
|
|
1900
|
+
function resetDirectionStyleSheetIndex() {
|
|
1901
|
+
sheetIndex = new WeakMap;
|
|
1902
|
+
}
|
|
1903
|
+
function styleSheetDeclaresDirection(sheet) {
|
|
1904
|
+
let rules;
|
|
1905
|
+
try {
|
|
1906
|
+
rules = sheet.cssRules;
|
|
1907
|
+
} catch {
|
|
1908
|
+
return true;
|
|
1909
|
+
}
|
|
1910
|
+
const cached = sheetIndex.get(sheet);
|
|
1911
|
+
if (cached !== undefined && cached.ruleCount === rules.length)
|
|
1912
|
+
return cached.declaresDirection;
|
|
1913
|
+
const isConstructed = Reflect.get(sheet, "ownerNode") == null;
|
|
1914
|
+
const scan = { declaresDirection: false, cacheable: !isConstructed };
|
|
1915
|
+
scanRuleList(rules, scan);
|
|
1916
|
+
if (scan.cacheable || scan.declaresDirection) {
|
|
1917
|
+
sheetIndex.set(sheet, { ruleCount: rules.length, declaresDirection: scan.declaresDirection });
|
|
1918
|
+
} else {
|
|
1919
|
+
sheetIndex.delete(sheet);
|
|
1920
|
+
}
|
|
1921
|
+
return scan.declaresDirection;
|
|
1922
|
+
}
|
|
1923
|
+
function scanRuleList(rules, state) {
|
|
1924
|
+
for (const rule of Array.from(rules)) {
|
|
1925
|
+
if (state.declaresDirection)
|
|
1926
|
+
return;
|
|
1927
|
+
if (Reflect.get(rule, "type") === 3) {
|
|
1928
|
+
state.cacheable = false;
|
|
1929
|
+
const imported = Reflect.get(rule, "styleSheet");
|
|
1930
|
+
if (imported) {
|
|
1931
|
+
try {
|
|
1932
|
+
const importedRules = Reflect.get(imported, "cssRules");
|
|
1933
|
+
if (isRuleCollection(importedRules))
|
|
1934
|
+
scanRuleList(importedRules, state);
|
|
1935
|
+
} catch {
|
|
1936
|
+
state.declaresDirection = true;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
continue;
|
|
1940
|
+
}
|
|
1941
|
+
const style = Reflect.get(rule, "style");
|
|
1942
|
+
if (typeof style === "object" && style !== null && typeof Reflect.get(rule, "selectorText") === "string" && Boolean(Reflect.get(style, "direction"))) {
|
|
1943
|
+
state.declaresDirection = true;
|
|
1944
|
+
return;
|
|
1945
|
+
}
|
|
1946
|
+
if (!("cssRules" in rule))
|
|
1947
|
+
continue;
|
|
1948
|
+
try {
|
|
1949
|
+
const nested = Reflect.get(rule, "cssRules");
|
|
1950
|
+
if (isRuleCollection(nested))
|
|
1951
|
+
scanRuleList(nested, state);
|
|
1952
|
+
} catch {
|
|
1953
|
+
state.declaresDirection = true;
|
|
1954
|
+
return;
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
}
|
|
1958
|
+
function isRuleCollection(value) {
|
|
1959
|
+
if (typeof CSSRuleList !== "undefined" && value instanceof CSSRuleList)
|
|
1960
|
+
return true;
|
|
1961
|
+
if (Array.isArray(value))
|
|
1962
|
+
return true;
|
|
1963
|
+
if (typeof value !== "object" || value === null)
|
|
1964
|
+
return false;
|
|
1965
|
+
return typeof Reflect.get(value, Symbol.iterator) === "function";
|
|
1966
|
+
}
|
|
1967
|
+
|
|
1898
1968
|
// ../../node_modules/esm-env/true.js
|
|
1899
1969
|
var true_default = true;
|
|
1900
1970
|
// src/utilities/dev-warn.ts
|
|
@@ -2408,6 +2478,7 @@ function invalidateComputedDirections() {
|
|
|
2408
2478
|
});
|
|
2409
2479
|
}
|
|
2410
2480
|
function invalidatePortalDirection() {
|
|
2481
|
+
resetDirectionStyleSheetIndex();
|
|
2411
2482
|
if (computedDirectionObservations.size === 0)
|
|
2412
2483
|
return;
|
|
2413
2484
|
refreshMediaQueryObservers();
|
|
@@ -3390,6 +3461,8 @@ function matchesDirectionStyleRule(element, getParentElement) {
|
|
|
3390
3461
|
for (const [sheet, fallbackRoot] of styleSheets) {
|
|
3391
3462
|
if (!isActiveStyleSheet(sheet))
|
|
3392
3463
|
continue;
|
|
3464
|
+
if (!styleSheetDeclaresDirection(sheet))
|
|
3465
|
+
continue;
|
|
3393
3466
|
let rules;
|
|
3394
3467
|
try {
|
|
3395
3468
|
rules = sheet.cssRules;
|
|
@@ -4720,4 +4793,4 @@ export {
|
|
|
4720
4793
|
Dropdown_menu as DropdownMenu
|
|
4721
4794
|
};
|
|
4722
4795
|
|
|
4723
|
-
//# debugId=
|
|
4796
|
+
//# debugId=55988525721F874664756E2164756E21
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { FileUploadEntry } from './file-upload.types.ts';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
entries: FileUploadEntry[];
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
removable: boolean;
|
|
6
|
+
onFileRetry: ((entry: FileUploadEntry) => void) | undefined;
|
|
7
|
+
onRemove: (entry: FileUploadEntry) => void;
|
|
8
|
+
onQueueEmptyFocus: () => void;
|
|
9
|
+
};
|
|
10
|
+
declare const FileUploadList: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
11
|
+
type FileUploadList = ReturnType<typeof FileUploadList>;
|
|
12
|
+
export default FileUploadList;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import FileIcon from 'lucide-svelte/icons/file';
|
|
2
|
+
import type { FileUploadEntry } from './file-upload.types.ts';
|
|
3
|
+
export declare const INTERACTIVE_DESCENDANT_SELECTOR: string;
|
|
4
|
+
export declare function installFileUploadSurfaceActivation(node: HTMLElement, isDisabled: () => boolean, openPicker: () => void): {
|
|
5
|
+
destroy: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function dataTransferHasFiles(dataTransfer: DataTransfer | null | undefined): boolean;
|
|
8
|
+
export declare function acceptsFile(file: File, accept: string | undefined): boolean;
|
|
9
|
+
export declare function nativeFilesMatch(fileList: FileList | null, files: File[]): boolean;
|
|
10
|
+
export declare function fileUploadLimit(multiple: boolean, maxFiles: number | undefined): number | undefined;
|
|
11
|
+
export declare function installFilePickerReturnFallback(inputElement: HTMLInputElement, handleReturn: () => void): () => void;
|
|
12
|
+
export declare function synchronizeNativeFileInput(inputElement: HTMLInputElement | null | undefined, entries: FileUploadEntry[], multiple: boolean, maxFiles: number | undefined): void;
|
|
13
|
+
export declare function constrainFileUploadEntries(entries: FileUploadEntry[], limit: number | undefined): FileUploadEntry[];
|
|
14
|
+
export declare function formatAcceptDescription(accept: string | undefined): string;
|
|
15
|
+
export declare function fileTypeIcon(fileType: string): typeof FileIcon;
|
|
@@ -11,16 +11,22 @@
|
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.cinder-file-upload__dropzone {
|
|
14
|
+
position: relative;
|
|
14
15
|
display: grid;
|
|
15
16
|
gap: var(--cinder-space-3);
|
|
17
|
+
justify-items: center;
|
|
16
18
|
border: 2px dashed var(--cinder-file-upload-border-color);
|
|
17
19
|
border-radius: var(--cinder-radius-lg);
|
|
18
20
|
background: var(--cinder-file-upload-background);
|
|
19
|
-
|
|
21
|
+
min-block-size: 12rem;
|
|
22
|
+
inline-size: 100%;
|
|
23
|
+
padding: var(--cinder-space-6);
|
|
24
|
+
text-align: center;
|
|
20
25
|
transition:
|
|
21
26
|
border-color var(--cinder-duration-fast) var(--cinder-ease-standard),
|
|
22
27
|
background-color var(--cinder-duration-fast) var(--cinder-ease-standard),
|
|
23
28
|
box-shadow var(--cinder-duration-fast) var(--cinder-ease-standard);
|
|
29
|
+
cursor: pointer;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
.cinder-file-upload__dropzone[data-drag-active] {
|
|
@@ -34,9 +40,21 @@
|
|
|
34
40
|
opacity: 0.7;
|
|
35
41
|
}
|
|
36
42
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
43
|
+
@supports not selector(:has(*)) {
|
|
44
|
+
.cinder-file-upload__dropzone:focus-within {
|
|
45
|
+
outline: var(--cinder-ring-width) solid transparent;
|
|
46
|
+
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@supports selector(:has(*)) {
|
|
51
|
+
.cinder-file-upload__dropzone:has(.cinder-file-upload__input:focus-visible),
|
|
52
|
+
.cinder-file-upload__dropzone--border-beam[data-drag-active],
|
|
53
|
+
.cinder-file-upload__dropzone--border-beam:has(.cinder-file-upload__input:focus-visible),
|
|
54
|
+
.cinder-file-upload__dropzone--border-beam:has(.cinder-file-upload__button:focus-visible) {
|
|
55
|
+
outline: var(--cinder-ring-width) solid transparent;
|
|
56
|
+
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
57
|
+
}
|
|
40
58
|
}
|
|
41
59
|
|
|
42
60
|
.cinder-file-upload__input {
|
|
@@ -55,22 +73,41 @@
|
|
|
55
73
|
.cinder-file-upload__body {
|
|
56
74
|
display: grid;
|
|
57
75
|
gap: var(--cinder-space-2);
|
|
58
|
-
justify-items:
|
|
76
|
+
justify-items: center;
|
|
59
77
|
}
|
|
60
78
|
|
|
61
|
-
.cinder-file-
|
|
79
|
+
.cinder-file-upload__upload-icon {
|
|
62
80
|
display: inline-flex;
|
|
63
81
|
align-items: center;
|
|
64
|
-
|
|
82
|
+
justify-content: center;
|
|
83
|
+
border: 1px solid var(--cinder-border-muted);
|
|
84
|
+
border-radius: var(--cinder-radius-md);
|
|
85
|
+
background: var(--cinder-surface);
|
|
86
|
+
color: var(--cinder-accent-text);
|
|
87
|
+
inline-size: 2.5rem;
|
|
88
|
+
block-size: 2.5rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.cinder-file-upload__upload-icon-svg {
|
|
92
|
+
inline-size: 1rem;
|
|
93
|
+
block-size: 1rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.cinder-file-upload__title,
|
|
97
|
+
.cinder-file-upload__description {
|
|
98
|
+
margin: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.cinder-file-upload__title {
|
|
65
102
|
color: var(--cinder-text);
|
|
66
103
|
font-size: var(--cinder-text-sm);
|
|
67
104
|
font-weight: var(--cinder-font-medium);
|
|
68
105
|
}
|
|
69
106
|
|
|
70
|
-
.cinder-file-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
107
|
+
.cinder-file-upload__description {
|
|
108
|
+
color: var(--cinder-text-muted);
|
|
109
|
+
font-size: var(--cinder-text-xs);
|
|
110
|
+
line-height: var(--cinder-leading-relaxed);
|
|
74
111
|
}
|
|
75
112
|
|
|
76
113
|
.cinder-file-upload__button {
|
|
@@ -86,6 +123,11 @@
|
|
|
86
123
|
font-weight: var(--cinder-font-semibold);
|
|
87
124
|
}
|
|
88
125
|
|
|
126
|
+
.cinder-file-upload__button:focus-visible {
|
|
127
|
+
outline: var(--cinder-ring-width) solid transparent;
|
|
128
|
+
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
129
|
+
}
|
|
130
|
+
|
|
89
131
|
.cinder-file-upload__hint {
|
|
90
132
|
color: var(--cinder-text-muted);
|
|
91
133
|
font-size: var(--cinder-text-sm);
|
|
@@ -123,6 +165,20 @@
|
|
|
123
165
|
min-inline-size: 0;
|
|
124
166
|
}
|
|
125
167
|
|
|
168
|
+
.cinder-file-upload__file-details {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: var(--cinder-space-3);
|
|
172
|
+
min-inline-size: 0;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.cinder-file-upload__file-icon {
|
|
176
|
+
flex: none;
|
|
177
|
+
color: var(--cinder-text-muted);
|
|
178
|
+
inline-size: 1.25rem;
|
|
179
|
+
block-size: 1.25rem;
|
|
180
|
+
}
|
|
181
|
+
|
|
126
182
|
.cinder-file-upload__file-name {
|
|
127
183
|
overflow-wrap: anywhere;
|
|
128
184
|
color: var(--cinder-text);
|
|
@@ -158,6 +214,28 @@
|
|
|
158
214
|
flex: none;
|
|
159
215
|
}
|
|
160
216
|
|
|
217
|
+
.cinder-file-upload__row-actions {
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: var(--cinder-space-2);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.cinder-file-upload__remove {
|
|
224
|
+
display: inline-flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
border: 0;
|
|
228
|
+
border-radius: var(--cinder-radius-sm);
|
|
229
|
+
background: transparent;
|
|
230
|
+
color: var(--cinder-text-muted);
|
|
231
|
+
padding: var(--cinder-space-1);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.cinder-file-upload__remove svg {
|
|
235
|
+
inline-size: 1rem;
|
|
236
|
+
block-size: 1rem;
|
|
237
|
+
}
|
|
238
|
+
|
|
161
239
|
.cinder-file-upload__progress {
|
|
162
240
|
overflow: hidden;
|
|
163
241
|
border-radius: 999px;
|
|
@@ -173,10 +251,73 @@
|
|
|
173
251
|
}
|
|
174
252
|
|
|
175
253
|
.cinder-file-upload__error {
|
|
254
|
+
margin: 0;
|
|
176
255
|
color: var(--cinder-color-danger-fg);
|
|
177
256
|
font-size: var(--cinder-text-xs);
|
|
178
257
|
}
|
|
179
258
|
|
|
259
|
+
.cinder-file-upload__error-row {
|
|
260
|
+
display: flex;
|
|
261
|
+
align-items: center;
|
|
262
|
+
justify-content: space-between;
|
|
263
|
+
gap: var(--cinder-space-2);
|
|
264
|
+
flex-wrap: wrap;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.cinder-file-upload__retry {
|
|
268
|
+
display: inline-flex;
|
|
269
|
+
align-items: center;
|
|
270
|
+
gap: var(--cinder-space-1);
|
|
271
|
+
border: 1px solid var(--cinder-border);
|
|
272
|
+
border-radius: var(--cinder-radius-sm);
|
|
273
|
+
background: var(--cinder-surface-raised);
|
|
274
|
+
color: var(--cinder-text);
|
|
275
|
+
padding: var(--cinder-space-1) var(--cinder-space-2);
|
|
276
|
+
font-size: var(--cinder-text-xs);
|
|
277
|
+
font-weight: var(--cinder-font-medium);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
@media (hover: hover) {
|
|
281
|
+
.cinder-file-upload__retry:hover:not(:disabled),
|
|
282
|
+
.cinder-file-upload__remove:hover:not(:disabled) {
|
|
283
|
+
background: var(--cinder-surface-hover);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
.cinder-file-upload__retry:focus-visible,
|
|
288
|
+
.cinder-file-upload__remove:focus-visible {
|
|
289
|
+
outline: var(--cinder-ring-width) solid transparent;
|
|
290
|
+
box-shadow: var(--_cinder-focus-ring-shadow);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.cinder-file-upload__retry-icon {
|
|
294
|
+
inline-size: 0.875rem;
|
|
295
|
+
block-size: 0.875rem;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@media (forced-colors: active) {
|
|
299
|
+
.cinder-file-upload__dropzone--border-beam[data-drag-active],
|
|
300
|
+
.cinder-file-upload__button:focus-visible,
|
|
301
|
+
.cinder-file-upload__retry:focus-visible,
|
|
302
|
+
.cinder-file-upload__remove:focus-visible {
|
|
303
|
+
outline-color: Highlight;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@supports not selector(:has(*)) {
|
|
307
|
+
.cinder-file-upload__dropzone:focus-within {
|
|
308
|
+
outline-color: Highlight;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
@supports selector(:has(*)) {
|
|
313
|
+
.cinder-file-upload__dropzone:has(.cinder-file-upload__input:focus-visible),
|
|
314
|
+
.cinder-file-upload__dropzone--border-beam:has(.cinder-file-upload__input:focus-visible),
|
|
315
|
+
.cinder-file-upload__dropzone--border-beam:has(.cinder-file-upload__button:focus-visible) {
|
|
316
|
+
outline-color: Highlight;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
180
321
|
@media (prefers-reduced-motion: reduce) {
|
|
181
322
|
.cinder-file-upload__dropzone,
|
|
182
323
|
.cinder-file-upload__progress-fill {
|