@public-ui/hydrate 3.0.9-rc.1 → 3.0.9-rc.2
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/index.js +75 -27
- package/dist/index.mjs +75 -27
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -146,7 +146,7 @@ function _mergeNamespaces(n, m) {
|
|
|
146
146
|
|
|
147
147
|
const NAMESPACE = 'kolibri';
|
|
148
148
|
const BUILD = /* kolibri */ { hydratedSelectorName: "hydrated", slotRelocation: true, state: true, updatable: true};
|
|
149
|
-
const Env = /* kolibri */ {"kolibriVersion":"3.0.9-rc.
|
|
149
|
+
const Env = /* kolibri */ {"kolibriVersion":"3.0.9-rc.2"};
|
|
150
150
|
|
|
151
151
|
function getDefaultExportFromCjs (x) {
|
|
152
152
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -2340,13 +2340,13 @@ const validateIcons = (component, value, options = {}) => {
|
|
|
2340
2340
|
isString$2(value, 1) ||
|
|
2341
2341
|
(typeof value === 'object' &&
|
|
2342
2342
|
value !== null &&
|
|
2343
|
-
(isString$2(value.left,
|
|
2343
|
+
(isString$2(value.left, 0) ||
|
|
2344
2344
|
isIcon(value.left) ||
|
|
2345
|
-
isString$2(value.right,
|
|
2345
|
+
isString$2(value.right, 0) ||
|
|
2346
2346
|
isIcon(value.right) ||
|
|
2347
|
-
isString$2(value.top,
|
|
2347
|
+
isString$2(value.top, 0) ||
|
|
2348
2348
|
isIcon(value.top) ||
|
|
2349
|
-
isString$2(value.bottom,
|
|
2349
|
+
isString$2(value.bottom, 0) ||
|
|
2350
2350
|
isIcon(value.bottom))));
|
|
2351
2351
|
}, new Set(['KoliBriIcon']), value, Object.assign(Object.assign({}, options), { defaultValue: {}, hooks: {
|
|
2352
2352
|
afterPatch: (_a = options.hooks) === null || _a === void 0 ? void 0 : _a.afterPatch,
|
|
@@ -23309,7 +23309,23 @@ class KolInputRadio {
|
|
|
23309
23309
|
}
|
|
23310
23310
|
async kolFocus() {
|
|
23311
23311
|
var _a;
|
|
23312
|
-
(_a = this.
|
|
23312
|
+
(_a = this.getFocusableInput()) === null || _a === void 0 ? void 0 : _a.focus();
|
|
23313
|
+
}
|
|
23314
|
+
getFocusableInput() {
|
|
23315
|
+
const options = this.state._options;
|
|
23316
|
+
const isComponentDisabled = Boolean(this.state._disabled);
|
|
23317
|
+
const selectedIndex = options.findIndex((option) => option.value === this.state._value && !isComponentDisabled && !option.disabled);
|
|
23318
|
+
if (selectedIndex !== -1) {
|
|
23319
|
+
const input = this.inputRefs.get(selectedIndex);
|
|
23320
|
+
if (input) {
|
|
23321
|
+
return input;
|
|
23322
|
+
}
|
|
23323
|
+
}
|
|
23324
|
+
const firstEnabledIndex = options.findIndex((option) => !isComponentDisabled && !option.disabled);
|
|
23325
|
+
if (firstEnabledIndex !== -1) {
|
|
23326
|
+
return this.inputRefs.get(firstEnabledIndex);
|
|
23327
|
+
}
|
|
23328
|
+
return undefined;
|
|
23313
23329
|
}
|
|
23314
23330
|
getFormFieldProps() {
|
|
23315
23331
|
return {
|
|
@@ -23330,7 +23346,7 @@ class KolInputRadio {
|
|
|
23330
23346
|
};
|
|
23331
23347
|
}
|
|
23332
23348
|
render() {
|
|
23333
|
-
return (hAsync(FormFieldStateWrapper, Object.assign({ key: '
|
|
23349
|
+
return (hAsync(FormFieldStateWrapper, Object.assign({ key: '9e2b42643b7eec87fcef68c4e8bf471e67738689' }, this.getFormFieldProps()), this.state._options.map((option, index) => this.renderOption(option, index))));
|
|
23334
23350
|
}
|
|
23335
23351
|
calculateDisabled(option) {
|
|
23336
23352
|
return Boolean(this.state._disabled) || Boolean(option.disabled);
|
|
@@ -23351,7 +23367,12 @@ class KolInputRadio {
|
|
|
23351
23367
|
getInputProps(option, id, index, selected) {
|
|
23352
23368
|
return {
|
|
23353
23369
|
state: this.state,
|
|
23354
|
-
inputProps: Object.assign(Object.assign({ id: id, ref:
|
|
23370
|
+
inputProps: Object.assign(Object.assign({ id: id, ref: (ref) => {
|
|
23371
|
+
this.catchInputRef(index)(ref);
|
|
23372
|
+
if (selected) {
|
|
23373
|
+
this.catchRef(ref);
|
|
23374
|
+
}
|
|
23375
|
+
}, 'aria-label': this.state._hideLabel && typeof option.label === 'string' ? option.label : undefined, type: 'radio', name: this.state._name || this.state._id, value: `-${index}`, checked: selected, disabled: this.calculateDisabled(option) }, this.controller.onFacade), { onChange: this.onChange, onClick: undefined, onInput: this.onInput, onKeyDown: this.onKeyDown.bind(this), onFocus: (event) => {
|
|
23355
23376
|
this.controller.onFacade.onFocus(event);
|
|
23356
23377
|
this.inputHasFocus = true;
|
|
23357
23378
|
}, onBlur: (event) => {
|
|
@@ -23367,9 +23388,18 @@ class KolInputRadio {
|
|
|
23367
23388
|
}
|
|
23368
23389
|
constructor(hostRef) {
|
|
23369
23390
|
registerInstance(this, hostRef);
|
|
23391
|
+
this.inputRefs = new Map();
|
|
23370
23392
|
this.catchRef = (ref) => {
|
|
23371
23393
|
this.inputRef = ref;
|
|
23372
23394
|
};
|
|
23395
|
+
this.catchInputRef = (index) => (ref) => {
|
|
23396
|
+
if (ref) {
|
|
23397
|
+
this.inputRefs.set(index, ref);
|
|
23398
|
+
}
|
|
23399
|
+
else {
|
|
23400
|
+
this.inputRefs.delete(index);
|
|
23401
|
+
}
|
|
23402
|
+
};
|
|
23373
23403
|
this._disabled = false;
|
|
23374
23404
|
this._hideMsg = false;
|
|
23375
23405
|
this._hideLabel = false;
|
|
@@ -24660,7 +24690,7 @@ class KolNav {
|
|
|
24660
24690
|
'kol-nav__list--horizontal': props.deep === 0 && props.orientation === 'horizontal',
|
|
24661
24691
|
'kol-nav__list--vertical': props.deep !== 0 || props.orientation === 'vertical',
|
|
24662
24692
|
}), id: props.deep > 0 ? props.id : undefined }, props.links.map((link, index) => {
|
|
24663
|
-
return this.li(props.collapsible, props.
|
|
24693
|
+
return this.li(props.collapsible, props.deep, index, link, props.orientation, props.id);
|
|
24664
24694
|
})));
|
|
24665
24695
|
};
|
|
24666
24696
|
this._collapsible = true;
|
|
@@ -24685,19 +24715,40 @@ class KolNav {
|
|
|
24685
24715
|
collapseChildren(children) {
|
|
24686
24716
|
this.state = Object.assign(Object.assign({}, this.state), { _expandedChildren: this.state._expandedChildren.filter((searchChildren) => searchChildren !== children) });
|
|
24687
24717
|
}
|
|
24688
|
-
|
|
24689
|
-
|
|
24690
|
-
|
|
24691
|
-
|
|
24692
|
-
? ((_a = entry._icons) === null || _a === void 0 ? void 0 : _a.toString()) || (this.state._hideLabel ? 'codicon codicon-symbol-method' : undefined)
|
|
24693
|
-
: undefined,
|
|
24694
|
-
right: collapsible && hasChildren ? 'codicon codicon-' + (expanded ? 'remove' : 'add') : undefined,
|
|
24718
|
+
buildIconObject(collapsible, expanded, leftIcon) {
|
|
24719
|
+
const icon = {
|
|
24720
|
+
left: '',
|
|
24721
|
+
right: '',
|
|
24695
24722
|
};
|
|
24723
|
+
if (this.state._hasIconsWhenExpanded && leftIcon) {
|
|
24724
|
+
icon.left = leftIcon;
|
|
24725
|
+
}
|
|
24726
|
+
if (this.state._hideLabel) {
|
|
24727
|
+
if (leftIcon) {
|
|
24728
|
+
icon.left = leftIcon;
|
|
24729
|
+
}
|
|
24730
|
+
else {
|
|
24731
|
+
icon.left = 'codicon codicon-symbol-method';
|
|
24732
|
+
}
|
|
24733
|
+
}
|
|
24734
|
+
if (collapsible) {
|
|
24735
|
+
if (expanded) {
|
|
24736
|
+
icon.right = 'codicon codicon-remove';
|
|
24737
|
+
}
|
|
24738
|
+
else {
|
|
24739
|
+
icon.right = 'codicon codicon-add';
|
|
24740
|
+
}
|
|
24741
|
+
}
|
|
24742
|
+
return icon;
|
|
24743
|
+
}
|
|
24744
|
+
entry(collapsible, hasChildren, entry, expanded, ariaID) {
|
|
24745
|
+
var _a;
|
|
24746
|
+
const icons = this.buildIconObject(collapsible && hasChildren, expanded, (_a = entry._icons) === null || _a === void 0 ? void 0 : _a.toString());
|
|
24696
24747
|
return (hAsync("div", { class: "kol-nav__entry-wrapper" }, entryIsLink(entry) ? (hAsync(KolLinkWcTag, Object.assign({ class: clsx('kol-nav__entry kol-nav__entry--link', {
|
|
24697
24748
|
'kol-nav__entry--collapsible': collapsible,
|
|
24698
|
-
}) }, entry, { _hideLabel:
|
|
24749
|
+
}) }, entry, { _hideLabel: this.state._hideLabel, _icons: icons, _ariaControls: collapsible && hasChildren && expanded ? ariaID : undefined, _ariaExpanded: collapsible && hasChildren ? expanded : undefined }))) : (hAsync(KolButtonWcTag, { class: clsx('kol-nav__entry kol-nav__entry--button', {
|
|
24699
24750
|
'kol-nav__entry--collapsible': collapsible,
|
|
24700
|
-
}), _label: entry._label, _hideLabel:
|
|
24751
|
+
}), _label: entry._label, _hideLabel: this.state._hideLabel, _icons: icons, _ariaControls: collapsible && hasChildren && expanded ? ariaID : undefined, _ariaExpanded: collapsible && hasChildren ? expanded : undefined, _on: {
|
|
24701
24752
|
onClick: (event, value) => {
|
|
24702
24753
|
if (entryIsButton(entry) && typeof entry._on.onClick === 'function') {
|
|
24703
24754
|
entry._on.onClick(event, value);
|
|
@@ -24706,7 +24757,7 @@ class KolNav {
|
|
|
24706
24757
|
},
|
|
24707
24758
|
} }))));
|
|
24708
24759
|
}
|
|
24709
|
-
li(collapsible,
|
|
24760
|
+
li(collapsible, deep, index, link, orientation, ariaIDparent) {
|
|
24710
24761
|
const active = !!link._active;
|
|
24711
24762
|
const hasChildren = Array.isArray(link._children) && link._children.length > 0;
|
|
24712
24763
|
const expanded = Boolean(link._children && this.state._expandedChildren.includes(link._children));
|
|
@@ -24715,7 +24766,7 @@ class KolNav {
|
|
|
24715
24766
|
'kol-nav__list-item--active': active,
|
|
24716
24767
|
'kol-nav__list-item--expanded': expanded,
|
|
24717
24768
|
'kol-nav__list-item--has-children': hasChildren,
|
|
24718
|
-
}), key: index }, this.entry(collapsible,
|
|
24769
|
+
}), key: index }, this.entry(collapsible, hasChildren, link, expanded, ariaID), expanded && hAsync(this.linkList, { collapsible: collapsible, deep: deep + 1, links: link._children || [], orientation: orientation, id: ariaID })));
|
|
24719
24770
|
}
|
|
24720
24771
|
initializeExpandedChildren() {
|
|
24721
24772
|
this.state = Object.assign(Object.assign({}, this.state), { _expandedChildren: [] });
|
|
@@ -24744,14 +24795,11 @@ class KolNav {
|
|
|
24744
24795
|
hasCompactButton = false;
|
|
24745
24796
|
devWarning(`[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden.`);
|
|
24746
24797
|
}
|
|
24747
|
-
|
|
24748
|
-
const hideLabel = this.state._hideLabel === true;
|
|
24749
|
-
const orientation = this.state._orientation;
|
|
24750
|
-
return (hAsync("div", { key: '12bfebdeb71dff8a681907c30a9bdde7f0d359b3', class: clsx('kol-nav', `kol-nav--${orientation}`, {
|
|
24798
|
+
return (hAsync("div", { key: 'b8db85b304f436fa5882f487f6b83a74f833c943', class: clsx('kol-nav', `kol-nav--${this.state._orientation}`, {
|
|
24751
24799
|
'kol-nav--is-compact': this.state._hideLabel,
|
|
24752
|
-
}) }, hAsync("nav", { key: '
|
|
24800
|
+
}) }, hAsync("nav", { key: 'e10d8ebdf16027383e98ea463f20b5ee7a30617d', "aria-label": this.state._label, class: "kol-nav__navigation", id: this.navId }, hAsync(this.linkList, { key: '88b5acc16bcebe287533a7f0ed06a2a3d6994a6d', collapsible: this.state._collapsible, deep: 0, links: this.state._links, orientation: this.state._orientation, id: this.listId })), hasCompactButton && (hAsync("div", { key: 'e7f4432560e5315178f182b7197da9d66f1ee901', class: "kol-nav__compact" }, hAsync(KolButtonWcTag, { key: '23b584805e69dc1cb20204a77adae0aefb313b21', class: "kol-nav__toggle-button", _ariaControls: this.navId, _ariaExpanded: !this.state._hideLabel, _icons: this.state._hideLabel ? 'codicon codicon-chevron-right' : 'codicon codicon-chevron-left', _hideLabel: true, _label: translate(this.state._hideLabel ? 'kol-nav-maximize' : 'kol-nav-minimize'), _on: {
|
|
24753
24801
|
onClick: () => {
|
|
24754
|
-
this.state = Object.assign(Object.assign({}, this.state), { _hideLabel: this.state._hideLabel
|
|
24802
|
+
this.state = Object.assign(Object.assign({}, this.state), { _hideLabel: !this.state._hideLabel });
|
|
24755
24803
|
},
|
|
24756
24804
|
}, _tooltipAlign: "right" })))));
|
|
24757
24805
|
}
|
|
@@ -30524,7 +30572,7 @@ class KolTextarea {
|
|
|
30524
30572
|
}; }
|
|
30525
30573
|
}
|
|
30526
30574
|
|
|
30527
|
-
const defaultStyleCss$4 = "/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}";
|
|
30575
|
+
const defaultStyleCss$4 = "/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n max-width: 90vw;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}";
|
|
30528
30576
|
|
|
30529
30577
|
const TRANSITION_TIMEOUT = 300;
|
|
30530
30578
|
class KolToastContainer {
|
package/dist/index.mjs
CHANGED
|
@@ -144,7 +144,7 @@ function _mergeNamespaces(n, m) {
|
|
|
144
144
|
|
|
145
145
|
const NAMESPACE = 'kolibri';
|
|
146
146
|
const BUILD = /* kolibri */ { hydratedSelectorName: "hydrated", slotRelocation: true, state: true, updatable: true};
|
|
147
|
-
const Env = /* kolibri */ {"kolibriVersion":"3.0.9-rc.
|
|
147
|
+
const Env = /* kolibri */ {"kolibriVersion":"3.0.9-rc.2"};
|
|
148
148
|
|
|
149
149
|
function getDefaultExportFromCjs (x) {
|
|
150
150
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -2338,13 +2338,13 @@ const validateIcons = (component, value, options = {}) => {
|
|
|
2338
2338
|
isString$2(value, 1) ||
|
|
2339
2339
|
(typeof value === 'object' &&
|
|
2340
2340
|
value !== null &&
|
|
2341
|
-
(isString$2(value.left,
|
|
2341
|
+
(isString$2(value.left, 0) ||
|
|
2342
2342
|
isIcon(value.left) ||
|
|
2343
|
-
isString$2(value.right,
|
|
2343
|
+
isString$2(value.right, 0) ||
|
|
2344
2344
|
isIcon(value.right) ||
|
|
2345
|
-
isString$2(value.top,
|
|
2345
|
+
isString$2(value.top, 0) ||
|
|
2346
2346
|
isIcon(value.top) ||
|
|
2347
|
-
isString$2(value.bottom,
|
|
2347
|
+
isString$2(value.bottom, 0) ||
|
|
2348
2348
|
isIcon(value.bottom))));
|
|
2349
2349
|
}, new Set(['KoliBriIcon']), value, Object.assign(Object.assign({}, options), { defaultValue: {}, hooks: {
|
|
2350
2350
|
afterPatch: (_a = options.hooks) === null || _a === void 0 ? void 0 : _a.afterPatch,
|
|
@@ -23307,7 +23307,23 @@ class KolInputRadio {
|
|
|
23307
23307
|
}
|
|
23308
23308
|
async kolFocus() {
|
|
23309
23309
|
var _a;
|
|
23310
|
-
(_a = this.
|
|
23310
|
+
(_a = this.getFocusableInput()) === null || _a === void 0 ? void 0 : _a.focus();
|
|
23311
|
+
}
|
|
23312
|
+
getFocusableInput() {
|
|
23313
|
+
const options = this.state._options;
|
|
23314
|
+
const isComponentDisabled = Boolean(this.state._disabled);
|
|
23315
|
+
const selectedIndex = options.findIndex((option) => option.value === this.state._value && !isComponentDisabled && !option.disabled);
|
|
23316
|
+
if (selectedIndex !== -1) {
|
|
23317
|
+
const input = this.inputRefs.get(selectedIndex);
|
|
23318
|
+
if (input) {
|
|
23319
|
+
return input;
|
|
23320
|
+
}
|
|
23321
|
+
}
|
|
23322
|
+
const firstEnabledIndex = options.findIndex((option) => !isComponentDisabled && !option.disabled);
|
|
23323
|
+
if (firstEnabledIndex !== -1) {
|
|
23324
|
+
return this.inputRefs.get(firstEnabledIndex);
|
|
23325
|
+
}
|
|
23326
|
+
return undefined;
|
|
23311
23327
|
}
|
|
23312
23328
|
getFormFieldProps() {
|
|
23313
23329
|
return {
|
|
@@ -23328,7 +23344,7 @@ class KolInputRadio {
|
|
|
23328
23344
|
};
|
|
23329
23345
|
}
|
|
23330
23346
|
render() {
|
|
23331
|
-
return (hAsync(FormFieldStateWrapper, Object.assign({ key: '
|
|
23347
|
+
return (hAsync(FormFieldStateWrapper, Object.assign({ key: '9e2b42643b7eec87fcef68c4e8bf471e67738689' }, this.getFormFieldProps()), this.state._options.map((option, index) => this.renderOption(option, index))));
|
|
23332
23348
|
}
|
|
23333
23349
|
calculateDisabled(option) {
|
|
23334
23350
|
return Boolean(this.state._disabled) || Boolean(option.disabled);
|
|
@@ -23349,7 +23365,12 @@ class KolInputRadio {
|
|
|
23349
23365
|
getInputProps(option, id, index, selected) {
|
|
23350
23366
|
return {
|
|
23351
23367
|
state: this.state,
|
|
23352
|
-
inputProps: Object.assign(Object.assign({ id: id, ref:
|
|
23368
|
+
inputProps: Object.assign(Object.assign({ id: id, ref: (ref) => {
|
|
23369
|
+
this.catchInputRef(index)(ref);
|
|
23370
|
+
if (selected) {
|
|
23371
|
+
this.catchRef(ref);
|
|
23372
|
+
}
|
|
23373
|
+
}, 'aria-label': this.state._hideLabel && typeof option.label === 'string' ? option.label : undefined, type: 'radio', name: this.state._name || this.state._id, value: `-${index}`, checked: selected, disabled: this.calculateDisabled(option) }, this.controller.onFacade), { onChange: this.onChange, onClick: undefined, onInput: this.onInput, onKeyDown: this.onKeyDown.bind(this), onFocus: (event) => {
|
|
23353
23374
|
this.controller.onFacade.onFocus(event);
|
|
23354
23375
|
this.inputHasFocus = true;
|
|
23355
23376
|
}, onBlur: (event) => {
|
|
@@ -23365,9 +23386,18 @@ class KolInputRadio {
|
|
|
23365
23386
|
}
|
|
23366
23387
|
constructor(hostRef) {
|
|
23367
23388
|
registerInstance(this, hostRef);
|
|
23389
|
+
this.inputRefs = new Map();
|
|
23368
23390
|
this.catchRef = (ref) => {
|
|
23369
23391
|
this.inputRef = ref;
|
|
23370
23392
|
};
|
|
23393
|
+
this.catchInputRef = (index) => (ref) => {
|
|
23394
|
+
if (ref) {
|
|
23395
|
+
this.inputRefs.set(index, ref);
|
|
23396
|
+
}
|
|
23397
|
+
else {
|
|
23398
|
+
this.inputRefs.delete(index);
|
|
23399
|
+
}
|
|
23400
|
+
};
|
|
23371
23401
|
this._disabled = false;
|
|
23372
23402
|
this._hideMsg = false;
|
|
23373
23403
|
this._hideLabel = false;
|
|
@@ -24658,7 +24688,7 @@ class KolNav {
|
|
|
24658
24688
|
'kol-nav__list--horizontal': props.deep === 0 && props.orientation === 'horizontal',
|
|
24659
24689
|
'kol-nav__list--vertical': props.deep !== 0 || props.orientation === 'vertical',
|
|
24660
24690
|
}), id: props.deep > 0 ? props.id : undefined }, props.links.map((link, index) => {
|
|
24661
|
-
return this.li(props.collapsible, props.
|
|
24691
|
+
return this.li(props.collapsible, props.deep, index, link, props.orientation, props.id);
|
|
24662
24692
|
})));
|
|
24663
24693
|
};
|
|
24664
24694
|
this._collapsible = true;
|
|
@@ -24683,19 +24713,40 @@ class KolNav {
|
|
|
24683
24713
|
collapseChildren(children) {
|
|
24684
24714
|
this.state = Object.assign(Object.assign({}, this.state), { _expandedChildren: this.state._expandedChildren.filter((searchChildren) => searchChildren !== children) });
|
|
24685
24715
|
}
|
|
24686
|
-
|
|
24687
|
-
|
|
24688
|
-
|
|
24689
|
-
|
|
24690
|
-
? ((_a = entry._icons) === null || _a === void 0 ? void 0 : _a.toString()) || (this.state._hideLabel ? 'codicon codicon-symbol-method' : undefined)
|
|
24691
|
-
: undefined,
|
|
24692
|
-
right: collapsible && hasChildren ? 'codicon codicon-' + (expanded ? 'remove' : 'add') : undefined,
|
|
24716
|
+
buildIconObject(collapsible, expanded, leftIcon) {
|
|
24717
|
+
const icon = {
|
|
24718
|
+
left: '',
|
|
24719
|
+
right: '',
|
|
24693
24720
|
};
|
|
24721
|
+
if (this.state._hasIconsWhenExpanded && leftIcon) {
|
|
24722
|
+
icon.left = leftIcon;
|
|
24723
|
+
}
|
|
24724
|
+
if (this.state._hideLabel) {
|
|
24725
|
+
if (leftIcon) {
|
|
24726
|
+
icon.left = leftIcon;
|
|
24727
|
+
}
|
|
24728
|
+
else {
|
|
24729
|
+
icon.left = 'codicon codicon-symbol-method';
|
|
24730
|
+
}
|
|
24731
|
+
}
|
|
24732
|
+
if (collapsible) {
|
|
24733
|
+
if (expanded) {
|
|
24734
|
+
icon.right = 'codicon codicon-remove';
|
|
24735
|
+
}
|
|
24736
|
+
else {
|
|
24737
|
+
icon.right = 'codicon codicon-add';
|
|
24738
|
+
}
|
|
24739
|
+
}
|
|
24740
|
+
return icon;
|
|
24741
|
+
}
|
|
24742
|
+
entry(collapsible, hasChildren, entry, expanded, ariaID) {
|
|
24743
|
+
var _a;
|
|
24744
|
+
const icons = this.buildIconObject(collapsible && hasChildren, expanded, (_a = entry._icons) === null || _a === void 0 ? void 0 : _a.toString());
|
|
24694
24745
|
return (hAsync("div", { class: "kol-nav__entry-wrapper" }, entryIsLink(entry) ? (hAsync(KolLinkWcTag, Object.assign({ class: clsx('kol-nav__entry kol-nav__entry--link', {
|
|
24695
24746
|
'kol-nav__entry--collapsible': collapsible,
|
|
24696
|
-
}) }, entry, { _hideLabel:
|
|
24747
|
+
}) }, entry, { _hideLabel: this.state._hideLabel, _icons: icons, _ariaControls: collapsible && hasChildren && expanded ? ariaID : undefined, _ariaExpanded: collapsible && hasChildren ? expanded : undefined }))) : (hAsync(KolButtonWcTag, { class: clsx('kol-nav__entry kol-nav__entry--button', {
|
|
24697
24748
|
'kol-nav__entry--collapsible': collapsible,
|
|
24698
|
-
}), _label: entry._label, _hideLabel:
|
|
24749
|
+
}), _label: entry._label, _hideLabel: this.state._hideLabel, _icons: icons, _ariaControls: collapsible && hasChildren && expanded ? ariaID : undefined, _ariaExpanded: collapsible && hasChildren ? expanded : undefined, _on: {
|
|
24699
24750
|
onClick: (event, value) => {
|
|
24700
24751
|
if (entryIsButton(entry) && typeof entry._on.onClick === 'function') {
|
|
24701
24752
|
entry._on.onClick(event, value);
|
|
@@ -24704,7 +24755,7 @@ class KolNav {
|
|
|
24704
24755
|
},
|
|
24705
24756
|
} }))));
|
|
24706
24757
|
}
|
|
24707
|
-
li(collapsible,
|
|
24758
|
+
li(collapsible, deep, index, link, orientation, ariaIDparent) {
|
|
24708
24759
|
const active = !!link._active;
|
|
24709
24760
|
const hasChildren = Array.isArray(link._children) && link._children.length > 0;
|
|
24710
24761
|
const expanded = Boolean(link._children && this.state._expandedChildren.includes(link._children));
|
|
@@ -24713,7 +24764,7 @@ class KolNav {
|
|
|
24713
24764
|
'kol-nav__list-item--active': active,
|
|
24714
24765
|
'kol-nav__list-item--expanded': expanded,
|
|
24715
24766
|
'kol-nav__list-item--has-children': hasChildren,
|
|
24716
|
-
}), key: index }, this.entry(collapsible,
|
|
24767
|
+
}), key: index }, this.entry(collapsible, hasChildren, link, expanded, ariaID), expanded && hAsync(this.linkList, { collapsible: collapsible, deep: deep + 1, links: link._children || [], orientation: orientation, id: ariaID })));
|
|
24717
24768
|
}
|
|
24718
24769
|
initializeExpandedChildren() {
|
|
24719
24770
|
this.state = Object.assign(Object.assign({}, this.state), { _expandedChildren: [] });
|
|
@@ -24742,14 +24793,11 @@ class KolNav {
|
|
|
24742
24793
|
hasCompactButton = false;
|
|
24743
24794
|
devWarning(`[KolNav] Wenn eine horizontale Navigation verwendet wird, kann die Option _hasCompactButton nicht aktiviert werden.`);
|
|
24744
24795
|
}
|
|
24745
|
-
|
|
24746
|
-
const hideLabel = this.state._hideLabel === true;
|
|
24747
|
-
const orientation = this.state._orientation;
|
|
24748
|
-
return (hAsync("div", { key: '12bfebdeb71dff8a681907c30a9bdde7f0d359b3', class: clsx('kol-nav', `kol-nav--${orientation}`, {
|
|
24796
|
+
return (hAsync("div", { key: 'b8db85b304f436fa5882f487f6b83a74f833c943', class: clsx('kol-nav', `kol-nav--${this.state._orientation}`, {
|
|
24749
24797
|
'kol-nav--is-compact': this.state._hideLabel,
|
|
24750
|
-
}) }, hAsync("nav", { key: '
|
|
24798
|
+
}) }, hAsync("nav", { key: 'e10d8ebdf16027383e98ea463f20b5ee7a30617d', "aria-label": this.state._label, class: "kol-nav__navigation", id: this.navId }, hAsync(this.linkList, { key: '88b5acc16bcebe287533a7f0ed06a2a3d6994a6d', collapsible: this.state._collapsible, deep: 0, links: this.state._links, orientation: this.state._orientation, id: this.listId })), hasCompactButton && (hAsync("div", { key: 'e7f4432560e5315178f182b7197da9d66f1ee901', class: "kol-nav__compact" }, hAsync(KolButtonWcTag, { key: '23b584805e69dc1cb20204a77adae0aefb313b21', class: "kol-nav__toggle-button", _ariaControls: this.navId, _ariaExpanded: !this.state._hideLabel, _icons: this.state._hideLabel ? 'codicon codicon-chevron-right' : 'codicon codicon-chevron-left', _hideLabel: true, _label: translate(this.state._hideLabel ? 'kol-nav-maximize' : 'kol-nav-minimize'), _on: {
|
|
24751
24799
|
onClick: () => {
|
|
24752
|
-
this.state = Object.assign(Object.assign({}, this.state), { _hideLabel: this.state._hideLabel
|
|
24800
|
+
this.state = Object.assign(Object.assign({}, this.state), { _hideLabel: !this.state._hideLabel });
|
|
24753
24801
|
},
|
|
24754
24802
|
}, _tooltipAlign: "right" })))));
|
|
24755
24803
|
}
|
|
@@ -30522,7 +30570,7 @@ class KolTextarea {
|
|
|
30522
30570
|
}; }
|
|
30523
30571
|
}
|
|
30524
30572
|
|
|
30525
|
-
const defaultStyleCss$4 = "/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}";
|
|
30573
|
+
const defaultStyleCss$4 = "/*\n* This file defines the layer order for all CSS layers used in KoliBri.\n* The order is important as it determines the cascade priority.\n*\n* Layer order (lowest to highest priority):\n* 1. kol-a11y - Accessibility defaults and requirements\n* 2. kol-global - Global component styles and resets\n* 3. kol-component - Component-specific styles\n* 4. kol-theme-global - Theme-specific global styles\n* 5. kol-theme-component - Theme-specific component styles\n*/\n@layer kol-a11y, kol-global, kol-component, kol-theme-global, kol-theme-component;\n/* forward the rem function */\n/*\n * This file contains all rules for accessibility.\n */\n@layer kol-a11y {\n :host {\n /*\n * Minimum size of interactive elements.\n */\n --a11y-min-size: calc(44 * 1rem / var(--kolibri-root-font-size, 16));\n /*\n * No element should be used without verifying the contrast ratio of its background and font colors.\n * By initially setting the background color to white and the font color to black,\n * the contrast ratio is ensured and explicit adjustment is forced.\n */\n color: black;\n background-color: white;\n /*\n * Verdana is an accessible font that can be used without requiring additional loading time.\n */\n font-family: Verdana;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n /*\n * Text should be aligned left by default to provide a predictable starting point.\n */\n text-align: left;\n }\n * {\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n hyphens: auto;\n /*\n * This rule enables the word dividing for all texts. That is important for high zoom levels.\n */\n word-break: break-word;\n }\n /*\n * All interactive elements should have a minimum size of to-rem(44).\n */\n /* input:not([type='checkbox'], [type='radio'], [type='range']), */\n /* option, */\n /* select, */\n /* textarea, */\n button,\n .kol-input .input {\n min-width: var(--a11y-min-size);\n min-height: var(--a11y-min-size);\n }\n /*\n * Some interactive elements should not inherit the font-family and font-size.\n */\n a,\n button,\n h1,\n h2,\n h3,\n h4,\n h5,\n h6,\n input,\n option,\n select,\n textarea {\n /*\n * All elements should inherit the text color from his parent element.\n */\n color: inherit;\n /*\n * All elements should inherit the font family from his parent element.\n */\n font-family: inherit;\n /*\n * All elements should inherit the font size from his parent element.\n */\n font-size: inherit;\n /*\n * Letter spacing is required for all texts.\n */\n letter-spacing: inherit;\n /*\n * Word spacing is required for all texts.\n */\n word-spacing: inherit;\n }\n /**\n * Sometimes we need the semantic element for accessibility reasons,\n * but we don't want to show it.\n *\n * - https://www.a11yproject.com/posts/how-to-hide-content/\n */\n .visually-hidden {\n position: fixed;\n top: 0;\n left: 0;\n width: 1px;\n height: 1px;\n overflow: hidden;\n white-space: nowrap;\n clip-path: inset(50%);\n }\n}\n@layer kol-global {\n /*\n * Dieses CSS stellt sicher, dass der Standard-Style\n * von A und Button resettet werden.\n */\n :is(a, button) {\n background-color: transparent;\n width: 100%;\n margin: 0;\n padding: 0;\n border: none;\n /* 100% needed for custom width from outside */\n }\n /*\n * Ensure elements with hidden attribute to be actually not visible\n * @see https://meowni.ca/hidden.is.a.lie.html\n */\n [hidden] {\n display: none !important;\n }\n .badge-text-hint {\n color: black;\n background-color: lightgray;\n }\n}\n@layer kol-global {\n :host {\n /*\n * The max-width is needed to prevent the table from overflowing the\n * parent node, if the table is wider than the parent node.\n */\n max-width: 100%;\n font-size: calc(16 * 1rem / var(--kolibri-root-font-size, 16));\n }\n * {\n /*\n * We prefer to box-sizing: border-box for all elements.\n */\n box-sizing: border-box;\n }\n .kol-span {\n /* KolSpan is a layout component with icons in all directions and a label text in the middle. */\n display: flex;\n flex-flow: column;\n align-items: center;\n justify-content: center;\n /* The sub span in KolSpan is the horizontal span with icon left and right and the label text in the middle. */\n }\n .kol-span__container {\n display: flex;\n align-items: center;\n }\n a,\n button {\n cursor: pointer;\n }\n .kol-span .kol-span__label--hide-label .kol-span__label {\n display: none;\n }\n /* Reset browser agent style. */\n button:disabled {\n color: unset;\n }\n .disabled label,\n .disabled:focus-within label,\n [aria-disabled=true],\n [aria-disabled=true]:focus,\n [disabled],\n [disabled]:focus {\n opacity: 0.5;\n outline: none;\n cursor: not-allowed;\n }\n [aria-disabled=true]:focus .kol-span,\n [disabled]:focus .kol-span {\n outline: none !important;\n }\n}\n@layer kol-component {\n :host {\n display: block;\n }\n}\n@layer kol-component {\n .kol-tooltip {\n display: contents;\n }\n .kol-tooltip__floating {\n opacity: 0;\n display: none;\n position: fixed;\n /* Avoid layout interference - see https://floating-ui.com/docs/computePosition */\n top: 0;\n left: 0;\n /* Can be used to specify the tooltip-width from the outside. Unset by default. */\n width: var(--kol-tooltip-width, max-content);\n min-width: calc(8 * 1rem / var(--kolibri-root-font-size, 16));\n max-width: 90vw;\n max-height: 90vh;\n animation-direction: normal;\n /* Can be used to specify the animation duration from the outside. 250ms by default. */\n animation-duration: var(--kolibri-tooltip-animation-duration, 250ms);\n animation-fill-mode: forwards;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n }\n .kol-tooltip__floating.hide {\n animation-name: hideTooltip;\n }\n .kol-tooltip__floating.show {\n animation-name: showTooltip;\n }\n .kol-tooltip__arrow {\n transform: rotate(45deg);\n color: #000;\n background-color: #fff;\n position: absolute;\n z-index: 999;\n width: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n height: calc(10 * 1rem / var(--kolibri-root-font-size, 16));\n }\n .kol-tooltip__content {\n color: #000;\n background-color: #fff;\n position: relative;\n z-index: 1000;\n }\n @keyframes hideTooltip {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n display: none;\n }\n }\n @keyframes showTooltip {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n }\n}\n@layer kol-component {\n .kol-alert {\n display: grid;\n }\n .kol-alert__container {\n display: flex;\n place-items: center;\n }\n .kol-alert__container-content {\n flex-grow: 1;\n }\n .kol-alert__closer {\n /* Visible with forced colors */\n outline: transparent solid calc(1 * 1rem / var(--kolibri-root-font-size, 16));\n }\n :host {\n display: flex;\n position: fixed;\n z-index: 200;\n max-width: 90vw;\n flex-direction: column;\n }\n .kol-toast-container__close-all {\n align-self: flex-end;\n }\n}";
|
|
30526
30574
|
|
|
30527
30575
|
const TRANSITION_TIMEOUT = 300;
|
|
30528
30576
|
class KolToastContainer {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@public-ui/hydrate",
|
|
3
|
-
"version": "3.0.9-rc.
|
|
3
|
+
"version": "3.0.9-rc.2",
|
|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"homepage": "https://public-ui.github.io",
|
|
6
6
|
"repository": {
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"prettier": "3.7.4",
|
|
53
53
|
"prettier-plugin-organize-imports": "4.3.0",
|
|
54
54
|
"rimraf": "6.1.2",
|
|
55
|
-
"@public-ui/components": "3.0.9-rc.
|
|
55
|
+
"@public-ui/components": "3.0.9-rc.2"
|
|
56
56
|
},
|
|
57
57
|
"sideEffects": false,
|
|
58
58
|
"type": "commonjs",
|