@kernel4632/kima 0.9.3 → 0.9.5
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/components/core/tabs.ce.vue_vue_type_style_index_0_scoped_0d322299_lang.css +1 -0
- package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_b575c982_lang.css +1 -0
- package/dist/kima-elements-core.js +6 -6
- package/dist/kima-elements.js +7118 -7062
- package/dist/style.css +2 -2
- package/dist/styles/core.css +1 -1
- package/dist/styles/tabs.css +1 -1
- package/dist/styles/tag-group.css +1 -1
- package/dist/vue/components/core/tabs.ce.js +5 -5
- package/dist/vue/components/utility/tag-group.ce.js +52 -48
- package/dist/vue/utils/motion.js +107 -54
- package/package.json +1 -1
- package/dist/components/core/tabs.ce.vue_vue_type_style_index_0_scoped_9535a533_lang.css +0 -1
- package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_892954ad_lang.css +0 -1
package/dist/style.css
CHANGED
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
/*$vite$:1*/
|
|
71
71
|
@keyframes kima-ripple-glow-2bcc172e{0%{opacity:.14}55%{opacity:.1}to{opacity:0}}.kima-switch[data-v-2bcc172e]{align-items:center;gap:var(--kima-space-2);color:var(--kima-color-on-surface);font-size:var(--kima-font-size-body-large);cursor:pointer;-webkit-user-select:none;user-select:none;display:inline-flex;position:relative}.kima-switch__input[data-v-2bcc172e]{z-index:3;opacity:0;width:100%;height:100%;cursor:inherit;margin:0;position:absolute;inset:0}.kima-switch__control[data-v-2bcc172e]{border-radius:var(--kima-radius-full);flex:none;justify-content:center;align-items:center;padding:6px;display:inline-flex;position:relative}.kima-switch__control[data-v-2bcc172e]:after{content:"";z-index:1;border-radius:inherit;opacity:0;pointer-events:none;transition:opacity var(--kima-duration-effects) var(--kima-curve-standard);background:currentColor;position:absolute;inset:0}.kima-switch__control[data-v-2bcc172e]>*{z-index:2;position:relative}.kima-switch__control[data-v-2bcc172e]:hover:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-hover)}.kima-switch__control[data-v-2bcc172e]:focus-visible:after{opacity:var(--kima-state-focus)}.kima-switch__control[data-v-2bcc172e]:active:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-pressed)}.kima-switch__control[data-v-2bcc172e]{position:relative;overflow:hidden}.kima-switch__control[data-v-2bcc172e] .kima-ripple{z-index:2;pointer-events:none;animation:kima-ripple-glow-2bcc172e var(--kima-duration-slower) linear forwards;background:currentColor;position:absolute;inset:0}.kima-switch__label[data-v-2bcc172e]{min-width:0;line-height:1.4}.kima-switch__track[data-v-2bcc172e]{box-sizing:border-box;flex:0 0 var(--kima-switch-track-width);width:var(--kima-switch-track-width);height:var(--kima-switch-track-height);border:var(--kima-switch-outline-width) solid var(--kima-color-outline);border-radius:var(--kima-radius-full);background:var(--kima-color-transparent);transition:background-color var(--kima-duration-effects) var(--kima-curve-standard), border-color var(--kima-duration-effects) var(--kima-curve-standard);display:block;position:relative}.kima-switch__thumb[data-v-2bcc172e]{box-sizing:border-box;width:var(--kima-switch-thumb-size);height:var(--kima-switch-thumb-size);border-radius:var(--kima-radius-full);background:var(--kima-color-on-surface-variant);transition:left var(--kima-duration-slow) var(--kima-curve-emphasized), width var(--kima-duration-medium) var(--kima-curve-emphasized), height var(--kima-duration-medium) var(--kima-curve-emphasized), background-color var(--kima-duration-effects) var(--kima-curve-standard);justify-content:center;align-items:center;display:inline-flex;position:absolute;top:50%;left:2px;transform:translateY(-50%)}.kima-switch__check[data-v-2bcc172e]{color:var(--kima-color-primary);opacity:0;transition:opacity var(--kima-duration-effects) var(--kima-curve-standard)}.kima-switch--checked .kima-switch__track[data-v-2bcc172e]{border-color:var(--kima-color-primary);background:var(--kima-color-primary)}.kima-switch--checked .kima-switch__track .kima-switch__thumb[data-v-2bcc172e]{left:calc(100% - var(--kima-switch-thumb-selected) - 2px);width:var(--kima-switch-thumb-selected);height:var(--kima-switch-thumb-selected);background:var(--kima-color-on-primary)}.kima-switch--checked .kima-switch__track .kima-switch__check[data-v-2bcc172e]{opacity:1}.kima-switch__input:active~.kima-switch__control .kima-switch__track .kima-switch__thumb[data-v-2bcc172e]{width:var(--kima-switch-thumb-pressed)}.kima-switch__input:focus-visible~.kima-switch__control[data-v-2bcc172e]{outline:var(--kima-focus-ring-width) solid var(--kima-color-primary);outline-offset:var(--kima-focus-ring-offset)}.kima-switch--disabled[data-v-2bcc172e]{color:var(--kima-color-on-surface-variant);cursor:not-allowed}.kima-switch--disabled .kima-switch__control[data-v-2bcc172e]{pointer-events:none}.kima-switch--disabled .kima-switch__control[data-v-2bcc172e],.kima-switch--disabled .kima-switch__track[data-v-2bcc172e]{opacity:var(--kima-opacity-disabled)}@media (prefers-reduced-motion:reduce){.kima-switch__track[data-v-2bcc172e],.kima-switch__thumb[data-v-2bcc172e],.kima-switch__check[data-v-2bcc172e]{transition:none}}
|
|
72
72
|
/*$vite$:1*/
|
|
73
|
-
.kima-tabs[data-v-
|
|
73
|
+
.kima-tabs[data-v-0d322299]{--kima-tabs-height:var(--kima-tab-height);--kima-tabs-gap:var(--kima-space-4);--kima-tabs-indicator-height:var(--kima-tab-indicator-height);box-sizing:border-box;width:100%;min-width:0;color:var(--kima-color-on-surface);font-family:var(--kima-font-family);display:flex}.kima-tabs--horizontal[data-v-0d322299]{flex-direction:column}.kima-tabs--vertical[data-v-0d322299]{--kima-tabs-height:48px;gap:var(--kima-tabs-gap);flex-direction:row}.kima-tabs__list[data-v-0d322299]{min-width:0;padding:var(--kima-space-1);border-radius:var(--kima-radius-m);background:var(--kima-color-layer-1);display:flex;position:relative}.kima-tabs--vertical .kima-tabs__list[data-v-0d322299]{flex-direction:column;flex:0 0 min(180px,35%);align-self:flex-start;width:min(180px,35%)}.kima-tabs__tab[data-v-0d322299]{box-sizing:border-box;min-width:64px;min-height:var(--kima-tabs-height);padding:var(--kima-space-2) var(--kima-space-3);border-radius:var(--kima-radius-s);color:var(--kima-color-on-surface-variant);background:var(--kima-color-transparent);font:inherit;font-size:var(--kima-font-size-medium);font-weight:var(--kima-font-weight-medium);white-space:normal;overflow-wrap:anywhere;cursor:pointer;transition:color var(--kima-duration-effects) var(--kima-ease-effects), background-color var(--kima-duration-effects) var(--kima-ease-effects);border:0;flex:1 1 0;justify-content:center;align-items:center;display:inline-flex;position:relative}.kima-tabs__tab[data-v-0d322299]:hover:not(:disabled){background:var(--kima-color-layer-1)}.kima-tabs__tab[data-v-0d322299]:active:not(:disabled){background:var(--kima-color-layer-2)}.kima-tabs__tab[data-v-0d322299]:focus-visible{outline:var(--kima-focus-ring-width) solid var(--kima-color-primary);outline-offset:var(--kima-focus-ring-offset)}.kima-tabs__tab[aria-selected=true][data-v-0d322299]{color:var(--kima-color-primary)}.kima-tabs__tab[data-v-0d322299]:disabled{cursor:not-allowed;color:var(--kima-color-on-surface-38)}.kima-tabs--vertical .kima-tabs__tab[data-v-0d322299]{flex:none;justify-content:flex-start;min-height:48px}.kima-tabs__panels[data-v-0d322299]{flex:auto;min-width:0;display:grid;position:relative}.kima-tabs__panel.kima-content-leave-active[data-v-0d322299]{transition-duration:var(--kima-duration-fast);position:absolute;inset-block-start:0;inset-inline:0}.kima-tabs__marker[data-v-0d322299]{pointer-events:none;background:var(--kima-color-primary);border-radius:var(--kima-radius-full);position:absolute;top:0;left:0}.kima-tabs__marker--ready[data-v-0d322299]{transition:transform var(--kima-duration-slow) var(--kima-curve-emphasized), width var(--kima-duration-slow) var(--kima-curve-emphasized), height var(--kima-duration-slow) var(--kima-curve-emphasized), opacity var(--kima-duration-effects) var(--kima-curve-standard)}.kima-tabs__panel[data-v-0d322299]{min-width:0;padding-top:var(--kima-tabs-gap);outline:none;flex:auto;grid-area:1/1;align-self:start}.kima-tabs__panel[data-v-0d322299]:focus-visible{outline:2px solid var(--kima-color-primary);outline-offset:2px}.kima-tabs--vertical .kima-tabs__panel[data-v-0d322299]{padding-top:0}@media (width<=560px){.kima-tabs__tab[data-v-0d322299]{padding-inline:var(--kima-space-2);font-size:var(--kima-font-size-sm)}}
|
|
74
74
|
/*$vite$:1*/
|
|
75
75
|
@keyframes kima-ripple-glow-f22e5c02{0%{opacity:.14}55%{opacity:.1}to{opacity:0}}.kima-text-field[data-v-f22e5c02]{width:100%;color:var(--kima-color-on-surface);font-family:var(--kima-font-family);display:block}.kima-text-field__control[data-v-f22e5c02]{position:relative}.kima-text-field__control[data-v-f22e5c02]:after{content:"";z-index:1;border-radius:inherit;opacity:0;pointer-events:none;transition:opacity var(--kima-duration-effects) var(--kima-curve-standard);background:currentColor;position:absolute;inset:0}.kima-text-field__control[data-v-f22e5c02]>*{z-index:2;position:relative}.kima-text-field__control[data-v-f22e5c02]:hover:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-hover)}.kima-text-field__control[data-v-f22e5c02]:focus-visible:after{opacity:var(--kima-state-focus)}.kima-text-field__control[data-v-f22e5c02]:active:not(:disabled):not([aria-disabled=true]):after{opacity:var(--kima-state-pressed)}.kima-text-field__control[data-v-f22e5c02]{position:relative;overflow:hidden}.kima-text-field__control[data-v-f22e5c02] .kima-ripple{z-index:2;pointer-events:none;animation:kima-ripple-glow-f22e5c02 var(--kima-duration-slower) linear forwards;background:currentColor;position:absolute;inset:0}.kima-text-field__control[data-v-f22e5c02]{height:var(--kima-field-height);box-sizing:border-box;border-radius:var(--kima-radius-m);background:var(--kima-color-layer-2);transition:background-color var(--kima-duration-effects) var(--kima-curve-standard), box-shadow var(--kima-duration-effects) var(--kima-curve-standard);align-items:center;display:flex}.kima-text-field__control[data-v-f22e5c02]:focus-within{background:var(--kima-color-layer-3);box-shadow:inset 0 0 0 var(--kima-outline-width-focused) var(--kima-color-primary)}.kima-text-field--error .kima-text-field__control[data-v-f22e5c02]{background:var(--kima-color-error-container);box-shadow:none}.kima-text-field--error .kima-text-field__control[data-v-f22e5c02]:focus-within{background:var(--kima-color-error-container);box-shadow:inset 0 0 0 var(--kima-outline-width-focused) var(--kima-color-error)}.kima-text-field--disabled[data-v-f22e5c02]{opacity:var(--kima-opacity-disabled)}.kima-text-field__control input[data-v-f22e5c02]{transition:color var(--kima-duration-effects) var(--kima-curve-standard), background-color var(--kima-duration-effects) var(--kima-curve-standard), border-color var(--kima-duration-effects) var(--kima-curve-standard), box-shadow var(--kima-duration-effects) var(--kima-curve-standard), opacity var(--kima-duration-effects) var(--kima-curve-standard);box-sizing:border-box;min-width:0;height:100%;padding:0 var(--kima-field-padding);color:var(--kima-color-on-surface);background:var(--kima-color-transparent);font:inherit;font-size:var(--kima-font-size-body-large);border:0;outline:0;flex:auto}.kima-text-field--error .kima-text-field__control input[data-v-f22e5c02]{color:var(--kima-color-on-error-container)}.kima-text-field__control input[data-v-f22e5c02]::placeholder{color:var(--kima-color-on-surface-variant);opacity:1}.kima-text-field--error .kima-text-field__control input[data-v-f22e5c02]::placeholder{color:var(--kima-color-on-error-container);opacity:.7}.kima-text-field__actions[data-v-f22e5c02]{align-items:center;gap:var(--kima-space-1);margin-right:var(--kima-space-1);flex:none;display:flex}.kima-text-field__action[data-v-f22e5c02]{transition:color var(--kima-duration-effects) var(--kima-curve-standard), background-color var(--kima-duration-effects) var(--kima-curve-standard), border-color var(--kima-duration-effects) var(--kima-curve-standard), box-shadow var(--kima-duration-effects) var(--kima-curve-standard), opacity var(--kima-duration-effects) var(--kima-curve-standard);border-radius:var(--kima-radius-full);width:32px;height:32px;color:var(--kima-color-on-surface-variant);background:var(--kima-color-transparent);cursor:pointer;border:0;justify-content:center;align-items:center;padding:0;display:inline-flex}.kima-text-field__action[data-v-f22e5c02]:hover:not(:disabled){color:var(--kima-color-primary);background:color-mix(in srgb, var(--kima-color-primary) 12%, var(--kima-color-transparent))}.kima-text-field__action[data-v-f22e5c02]:focus-visible{outline:2px solid var(--kima-color-primary);outline-offset:1px}.kima-text-field__action[data-v-f22e5c02]:disabled{cursor:not-allowed}.kima-text-field--error .kima-text-field__action[data-v-f22e5c02]:hover:not(:disabled){color:var(--kima-color-error);background:color-mix(in srgb, var(--kima-color-error) 12%, var(--kima-color-transparent))}.kima-text-field__action--clear[data-v-f22e5c02]{margin-right:var(--kima-space-1)}.kima-text-field__message-wrap[data-v-f22e5c02]{display:grid}.kima-text-field__message[data-v-f22e5c02]{min-height:1.2em;margin:var(--kima-space-1) var(--kima-field-padding) 0;color:var(--kima-color-on-surface-variant);font-size:var(--kima-font-size-small);grid-area:1/1;line-height:1.2}.kima-text-field__message--error[data-v-f22e5c02]{color:var(--kima-color-error)}
|
|
76
76
|
/*$vite$:1*/
|
|
@@ -264,7 +264,7 @@ kima-affix{display:contents}.kima-affix[data-v-f21e108b]{z-index:10;color:var(--
|
|
|
264
264
|
/*$vite$:1*/
|
|
265
265
|
.kima-qr-code[data-v-3ef776fe]{max-width:100%;color:var(--kima-color-on-surface);font-family:var(--kima-font-family);display:inline-block}.kima-qr-code svg[data-v-3ef776fe]{max-width:100%;height:auto;fill:var(--kima-color-on-surface);display:block}.kima-qr-code__paper[data-v-3ef776fe]{fill:var(--kima-color-surface)}
|
|
266
266
|
/*$vite$:1*/
|
|
267
|
-
.kima-tag-group[data-v-
|
|
267
|
+
.kima-tag-group[data-v-b575c982]{color:var(--kima-color-on-surface);font-family:var(--kima-font-family)}.kima-tag-group__items[data-v-b575c982]{gap:var(--kima-space-2);flex-wrap:wrap;display:flex;position:relative}
|
|
268
268
|
/*$vite$:1*/
|
|
269
269
|
@keyframes kima-ripple-glow-b5823fc3{0%{opacity:.14}55%{opacity:.1}to{opacity:0}}.kima-tour[data-v-b5823fc3]{font-family:var(--kima-font-family);color:var(--kima-color-on-surface)}.kima-tour__dialog[data-v-b5823fc3]{width:100%;max-width:none;height:100%;max-height:none;color:inherit;background:var(--kima-color-transparent);transition:opacity var(--kima-duration-medium), display var(--kima-duration-medium) allow-discrete, overlay var(--kima-duration-medium) allow-discrete;border:0;margin:0;padding:0;position:fixed;inset:0}.kima-tour__dialog[data-v-b5823fc3]::backdrop{background:var(--kima-color-transparent)}.kima-tour__dialog[data-v-b5823fc3]:not([open]){opacity:0}@starting-style{.kima-tour__dialog[open][data-v-b5823fc3]{opacity:0}}.kima-tour__mask[data-v-b5823fc3]{background:color-mix(in srgb, var(--kima-color-scrim) var(--kima-scrim-opacity), transparent);-webkit-backdrop-filter:blur(var(--kima-backdrop-blur));backdrop-filter:blur(var(--kima-backdrop-blur));pointer-events:auto;position:fixed}.kima-tour__spotlight[data-v-b5823fc3]{outline:3px solid var(--kima-color-primary);border-radius:var(--kima-radius-s);pointer-events:none;transition:top var(--kima-duration-medium) var(--kima-curve-emphasized), left var(--kima-duration-medium) var(--kima-curve-emphasized), width var(--kima-duration-medium), height var(--kima-duration-medium);position:fixed}.kima-tour__panel[data-v-b5823fc3]{background:var(--kima-color-popup);box-shadow:var(--kima-elevation-3);box-sizing:border-box;max-height:calc(100vh - 32px);padding:var(--kima-space-5);border-radius:var(--kima-radius-xl);border:0;position:fixed;overflow:auto}.kima-tour__panel h2[data-v-b5823fc3]{margin:var(--kima-space-2) 0}.kima-tour__actions[data-v-b5823fc3]{gap:var(--kima-space-2);flex-wrap:wrap;display:flex}@media (prefers-reduced-motion:reduce){.kima-tour__dialog[data-v-b5823fc3],.kima-tour__spotlight[data-v-b5823fc3]{transition:none}}
|
|
270
270
|
/*$vite$:1*/
|
package/dist/styles/core.css
CHANGED
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
@import "../components/display/spinner.ce.vue_vue_type_style_index_0_scoped_d7ff1dc3_lang.css";
|
|
36
36
|
@import "../components/core/switch.ce.vue_vue_type_style_index_0_scoped_2bcc172e_lang.css";
|
|
37
37
|
@import "../components/data/table.ce.vue_vue_type_style_index_0_scoped_c1ac8a33_lang.css";
|
|
38
|
-
@import "../components/core/tabs.ce.
|
|
38
|
+
@import "../components/core/tabs.ce.vue_vue_type_style_index_0_scoped_0d322299_lang.css";
|
|
39
39
|
@import "../components/core/text-field.ce.vue_vue_type_style_index_0_scoped_f22e5c02_lang.css";
|
|
40
40
|
@import "../components/input/textarea.ce.vue_vue_type_style_index_0_scoped_60d0751b_lang.css";
|
|
41
41
|
@import "../components/core/time-picker.ce.vue_vue_type_style_index_0_scoped_afd1d777_lang.css";
|
package/dist/styles/tabs.css
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@import "_tokens.css";
|
|
2
|
-
@import "../components/core/tabs.ce.
|
|
2
|
+
@import "../components/core/tabs.ce.vue_vue_type_style_index_0_scoped_0d322299_lang.css";
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
@import "../components/core/icon.ce.vue_vue_type_style_index_0_scoped_5c94f2ca_lang.css";
|
|
4
4
|
@import "../components/core/icon-button.ce.vue_vue_type_style_index_0_scoped_a18b4478_lang.css";
|
|
5
5
|
@import "../components/interaction/chip.ce.vue_vue_type_style_index_0_scoped_541c9ed1_lang.css";
|
|
6
|
-
@import "../components/utility/tag-group.ce.
|
|
6
|
+
@import "../components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_b575c982_lang.css";
|
|
@@ -103,7 +103,7 @@ var O = ["aria-orientation"], k = [
|
|
|
103
103
|
}
|
|
104
104
|
function Q(e, t) {
|
|
105
105
|
if (t.isComposing) return;
|
|
106
|
-
let n = W.value === "horizontal", r = n ? t.key === "ArrowRight" : t.key === "ArrowDown",
|
|
106
|
+
let n = W.value === "horizontal", r = n && F.value && getComputedStyle(F.value).direction === "rtl", i = n ? t.key === (r ? "ArrowLeft" : "ArrowRight") : t.key === "ArrowDown", a = n ? t.key === (r ? "ArrowRight" : "ArrowLeft") : t.key === "ArrowUp";
|
|
107
107
|
if (t.key === "Home") {
|
|
108
108
|
t.preventDefault(), Z(X(0, 1));
|
|
109
109
|
return;
|
|
@@ -116,10 +116,10 @@ var O = ["aria-orientation"], k = [
|
|
|
116
116
|
t.preventDefault(), Y(M.items[e]);
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
if (!
|
|
119
|
+
if (!i && !a) return;
|
|
120
120
|
t.preventDefault();
|
|
121
|
-
let
|
|
122
|
-
Z(X((e +
|
|
121
|
+
let o = i ? 1 : -1;
|
|
122
|
+
Z(X((e + o + M.items.length) % M.items.length, o));
|
|
123
123
|
}
|
|
124
124
|
return T(() => M.modelValue, (e) => {
|
|
125
125
|
H.value = e;
|
|
@@ -189,5 +189,5 @@ var O = ["aria-orientation"], k = [
|
|
|
189
189
|
_: 2
|
|
190
190
|
}, 1040))), 128))], 512)], 2));
|
|
191
191
|
}
|
|
192
|
-
}, [["__scopeId", "data-v-
|
|
192
|
+
}, [["__scopeId", "data-v-0d322299"]]);
|
|
193
193
|
export { j as default };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
-
import { freezeLeaveLayout as t, presenceTransition as n } from "../../utils/motion.js";
|
|
3
|
-
import { useInteractionModel as
|
|
4
|
-
import { useContentMotion as
|
|
5
|
-
import
|
|
2
|
+
import { freezeLeaveLayout as t, presenceTransition as n, useLayoutFlip as r } from "../../utils/motion.js";
|
|
3
|
+
import { useInteractionModel as i, useInteractionReset as a, useInteractionRoot as o } from "../../utils/interaction.js";
|
|
4
|
+
import { useContentMotion as s } from "../../utils/content-motion.js";
|
|
5
|
+
import c from "../interaction/chip.ce.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { Fragment as
|
|
7
|
+
import { Fragment as l, TransitionGroup as u, computed as d, createBlock as f, createElementBlock as p, createVNode as m, mergeProps as h, nextTick as g, onMounted as _, openBlock as v, ref as y, renderList as b, unref as x, watch as S, withCtx as C } from "vue";
|
|
8
8
|
// src/components/utility/tag-group.ce.vue
|
|
9
|
-
var
|
|
9
|
+
var w = ["aria-label"], T = [
|
|
10
10
|
"name",
|
|
11
11
|
"value",
|
|
12
12
|
"disabled"
|
|
13
|
-
],
|
|
13
|
+
], E = /*#__PURE__*/ e(/* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
|
|
14
14
|
__name: "tag-group.ce",
|
|
15
15
|
props: {
|
|
16
16
|
items: {
|
|
@@ -36,77 +36,81 @@ var C = ["aria-label"], w = [
|
|
|
36
36
|
"change",
|
|
37
37
|
"remove"
|
|
38
38
|
],
|
|
39
|
-
setup(e, { emit:
|
|
40
|
-
let
|
|
39
|
+
setup(e, { emit: E }) {
|
|
40
|
+
let D = e, O = E, { root: k, forwardedAttrs: A } = o(), [j, M] = i(D, "items", O), [N, P] = i(D, "modelValue", O), F = y(0), I = d(() => j.value.map((e) => typeof e == "object" ? e : {
|
|
41
41
|
value: e,
|
|
42
42
|
label: String(e)
|
|
43
43
|
}));
|
|
44
|
-
|
|
45
|
-
let
|
|
46
|
-
function
|
|
47
|
-
|
|
44
|
+
s(k, () => I.value);
|
|
45
|
+
let L = y(null), R = r(L, "[data-kima-flip-key]"), z = (e) => N.value.includes(e.value);
|
|
46
|
+
function B(e) {
|
|
47
|
+
D.disabled || e.disabled || (P(z(e) ? N.value.filter((t) => t !== e.value) : [...N.value, e.value]), O("change", N.value));
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
return [...
|
|
49
|
+
function V() {
|
|
50
|
+
return [...k.value?.querySelectorAll("button:not(:disabled)") || []].filter((e) => !e.closest("[inert]"));
|
|
51
51
|
}
|
|
52
|
-
async function
|
|
53
|
-
await
|
|
54
|
-
let t =
|
|
55
|
-
|
|
56
|
-
e.tabIndex = t ===
|
|
57
|
-
}), e && t[
|
|
52
|
+
async function H(e = !1) {
|
|
53
|
+
await g();
|
|
54
|
+
let t = V();
|
|
55
|
+
F.value = Math.max(0, Math.min(F.value, t.length - 1)), t.forEach((e, t) => {
|
|
56
|
+
e.tabIndex = t === F.value ? 0 : -1;
|
|
57
|
+
}), e && t[F.value]?.focus();
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
|
|
59
|
+
function U(e) {
|
|
60
|
+
D.disabled || e.disabled || (R.capture(), M(j.value.filter((t) => (typeof t == "object" ? t.value : t) !== e.value)), P(N.value.filter((t) => t !== e.value)), O("remove", e), R.play(), H(!0));
|
|
61
61
|
}
|
|
62
|
-
function
|
|
63
|
-
let t =
|
|
62
|
+
function W(e) {
|
|
63
|
+
let t = V(), n = t.indexOf(e.target);
|
|
64
64
|
if (!(n < 0) && ([
|
|
65
65
|
"ArrowRight",
|
|
66
66
|
"ArrowLeft",
|
|
67
67
|
"Home",
|
|
68
68
|
"End"
|
|
69
|
-
].includes(e.key) && (e.preventDefault(),
|
|
69
|
+
].includes(e.key) && (e.preventDefault(), F.value = e.key === "Home" ? 0 : e.key === "End" ? t.length - 1 : (n + (e.key === "ArrowLeft" ? -1 : 1) + t.length) % t.length, H(!0)), ["Delete", "Backspace"].includes(e.key) && D.removable)) {
|
|
70
70
|
let t = e.target.closest("[data-tag-index]")?.dataset.tagIndex;
|
|
71
|
-
t != null && (e.preventDefault(),
|
|
71
|
+
t != null && (e.preventDefault(), U(I.value[Number(t)]));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
() =>
|
|
77
|
-
() =>
|
|
78
|
-
() =>
|
|
79
|
-
], () =>
|
|
74
|
+
return S([
|
|
75
|
+
I,
|
|
76
|
+
() => D.disabled,
|
|
77
|
+
() => D.selectable,
|
|
78
|
+
() => D.removable
|
|
79
|
+
], () => H(), {
|
|
80
80
|
immediate: !0,
|
|
81
81
|
flush: "post"
|
|
82
|
-
}),
|
|
82
|
+
}), _(() => H()), a(k, N, P), a(k, j, M), (r, i) => (v(), p("div", h({
|
|
83
83
|
ref_key: "root",
|
|
84
|
-
ref:
|
|
85
|
-
},
|
|
84
|
+
ref: k
|
|
85
|
+
}, x(A), {
|
|
86
86
|
class: "kima-tag-group",
|
|
87
87
|
role: "group",
|
|
88
88
|
"aria-label": e.label,
|
|
89
|
-
onKeydown:
|
|
90
|
-
}), [
|
|
89
|
+
onKeydown: W
|
|
90
|
+
}), [m(u, h({
|
|
91
|
+
ref_key: "flipRoot",
|
|
92
|
+
ref: L,
|
|
91
93
|
name: "kima-list",
|
|
92
94
|
tag: "div",
|
|
93
95
|
class: "kima-tag-group__items"
|
|
94
96
|
}, {
|
|
95
|
-
...
|
|
96
|
-
onBeforeLeave:
|
|
97
|
+
...x(n),
|
|
98
|
+
onBeforeLeave: x(t)
|
|
97
99
|
}), {
|
|
98
|
-
default:
|
|
100
|
+
default: C(() => [(v(!0), p(l, null, b(I.value, (t, n) => (v(), f(c, {
|
|
99
101
|
key: t.value,
|
|
102
|
+
"data-kima-flip-key": t.value,
|
|
100
103
|
"data-tag-index": n,
|
|
101
104
|
label: t.label,
|
|
102
105
|
value: t.value,
|
|
103
106
|
selectable: e.selectable,
|
|
104
107
|
removable: e.removable,
|
|
105
108
|
disabled: e.disabled || t.disabled,
|
|
106
|
-
"model-value":
|
|
107
|
-
onChange: (e) =>
|
|
108
|
-
onRemove: (e) =>
|
|
109
|
+
"model-value": z(t),
|
|
110
|
+
onChange: (e) => B(t),
|
|
111
|
+
onRemove: (e) => U(t)
|
|
109
112
|
}, null, 8, [
|
|
113
|
+
"data-kima-flip-key",
|
|
110
114
|
"data-tag-index",
|
|
111
115
|
"label",
|
|
112
116
|
"value",
|
|
@@ -118,13 +122,13 @@ var C = ["aria-label"], w = [
|
|
|
118
122
|
"onRemove"
|
|
119
123
|
]))), 128))]),
|
|
120
124
|
_: 1
|
|
121
|
-
}, 16), (
|
|
125
|
+
}, 16), (v(!0), p(l, null, b(x(N), (t) => (v(), p("input", {
|
|
122
126
|
key: t,
|
|
123
127
|
type: "hidden",
|
|
124
128
|
name: e.name,
|
|
125
129
|
value: t,
|
|
126
130
|
disabled: e.disabled
|
|
127
|
-
}, null, 8,
|
|
131
|
+
}, null, 8, T))), 128))], 16, w));
|
|
128
132
|
}
|
|
129
|
-
}), [["__scopeId", "data-v-
|
|
130
|
-
export {
|
|
133
|
+
}), [["__scopeId", "data-v-b575c982"]]);
|
|
134
|
+
export { E as default };
|
package/dist/vue/utils/motion.js
CHANGED
|
@@ -1,31 +1,84 @@
|
|
|
1
|
+
import { onBeforeUnmount as e } from "vue";
|
|
1
2
|
// src/utils/motion.js
|
|
2
|
-
var
|
|
3
|
-
function n(
|
|
3
|
+
var t = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
function n(t, n = "[data-kima-flip-key]") {
|
|
5
|
+
let r = /* @__PURE__ */ new Map(), a = 0, o = !1;
|
|
6
|
+
function s() {
|
|
7
|
+
let e = t?.value ?? t;
|
|
8
|
+
return e?.nodeType === 1 ? e : e?.$el?.nodeType === 1 ? e.$el : null;
|
|
9
|
+
}
|
|
10
|
+
function c(e) {
|
|
11
|
+
return e.getAttribute(n.slice(1, -1)) || e.dataset.kimaFlipKey || e;
|
|
12
|
+
}
|
|
13
|
+
function l() {
|
|
14
|
+
let e = s();
|
|
15
|
+
e && (r = new Map([...e.children].map((e) => {
|
|
16
|
+
let t = e.getBoundingClientRect();
|
|
17
|
+
return [c(e), {
|
|
18
|
+
node: e,
|
|
19
|
+
x: t.x,
|
|
20
|
+
y: t.y
|
|
21
|
+
}];
|
|
22
|
+
})));
|
|
23
|
+
}
|
|
24
|
+
function u() {
|
|
25
|
+
cancelAnimationFrame(a), a = requestAnimationFrame(() => {
|
|
26
|
+
if (o) return;
|
|
27
|
+
let e = s();
|
|
28
|
+
if (!e || i(e) || !e.animate) {
|
|
29
|
+
r.clear();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
let t = getComputedStyle(e), n = t.getPropertyValue("--kima-duration-slow").trim(), a = n ? parseFloat(n) * (n.endsWith("ms") ? 1 : 1e3) : 300;
|
|
33
|
+
if (!Number.isFinite(a) || a <= 0) r.clear();
|
|
34
|
+
else {
|
|
35
|
+
for (let n of e.children) {
|
|
36
|
+
let e = r.get(c(n));
|
|
37
|
+
if (!e) continue;
|
|
38
|
+
let i = n.getBoundingClientRect(), o = e.x - i.x, s = e.y - i.y;
|
|
39
|
+
Math.abs(o) < .5 && Math.abs(s) < .5 || n.animate([{ transform: `translate(${o}px, ${s}px)` }, { transform: "translate(0, 0)" }], {
|
|
40
|
+
duration: a,
|
|
41
|
+
easing: t.getPropertyValue("--kima-curve-emphasized").trim() || "ease-out"
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
r.clear();
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
return e(() => {
|
|
49
|
+
o = !0, cancelAnimationFrame(a);
|
|
50
|
+
}), {
|
|
51
|
+
capture: l,
|
|
52
|
+
play: u
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
var r = /* @__PURE__ */ new WeakMap();
|
|
56
|
+
function i(e) {
|
|
4
57
|
return (e?.closest?.("[data-kima-reduced-motion]"))?.getAttribute("data-kima-reduced-motion") === "reduce" ? !0 : e?.ownerDocument?.defaultView?.matchMedia?.("(prefers-reduced-motion: reduce)").matches ?? !1;
|
|
5
58
|
}
|
|
6
|
-
function
|
|
59
|
+
function a(e) {
|
|
7
60
|
let t = parseFloat(e) || 0;
|
|
8
61
|
return e.trim().endsWith("ms") ? t : t * 1e3;
|
|
9
62
|
}
|
|
10
|
-
function
|
|
63
|
+
function o(e) {
|
|
11
64
|
e.inert = !0, e.setAttribute("aria-hidden", "true");
|
|
12
65
|
}
|
|
13
|
-
function
|
|
66
|
+
function s(e) {
|
|
14
67
|
e.inert = !1, e.removeAttribute("aria-hidden");
|
|
15
68
|
}
|
|
16
|
-
var
|
|
17
|
-
onBeforeEnter:
|
|
18
|
-
onBeforeLeave:
|
|
19
|
-
},
|
|
20
|
-
function
|
|
21
|
-
let t =
|
|
22
|
-
t && (Object.assign(e.style, t),
|
|
69
|
+
var c = {
|
|
70
|
+
onBeforeEnter: s,
|
|
71
|
+
onBeforeLeave: o
|
|
72
|
+
}, l = /* @__PURE__ */ new WeakMap();
|
|
73
|
+
function u(e) {
|
|
74
|
+
let t = l.get(e);
|
|
75
|
+
t && (Object.assign(e.style, t), l.delete(e)), s(e);
|
|
23
76
|
}
|
|
24
|
-
function
|
|
77
|
+
function d(e) {
|
|
25
78
|
let t = e.parentElement;
|
|
26
79
|
if (!t) return;
|
|
27
80
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
28
|
-
e.ownerDocument.defaultView.getComputedStyle(t).position === "static" && (t.style.position = "relative"),
|
|
81
|
+
e.ownerDocument.defaultView.getComputedStyle(t).position === "static" && (t.style.position = "relative"), l.has(e) || l.set(e, Object.fromEntries([
|
|
29
82
|
"position",
|
|
30
83
|
"top",
|
|
31
84
|
"left",
|
|
@@ -45,41 +98,41 @@ function l(e) {
|
|
|
45
98
|
height: `${n.height}px`,
|
|
46
99
|
boxSizing: "border-box",
|
|
47
100
|
margin: "0"
|
|
48
|
-
}),
|
|
101
|
+
}), o(e);
|
|
49
102
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
103
|
+
var f = /* @__PURE__ */ new WeakMap();
|
|
104
|
+
function p(e) {
|
|
52
105
|
let t = e?.getBoundingClientRect().height || 0;
|
|
53
|
-
t > 0 &&
|
|
106
|
+
t > 0 && f.set(e, t);
|
|
54
107
|
}
|
|
55
|
-
function
|
|
56
|
-
let
|
|
57
|
-
|
|
58
|
-
height:
|
|
59
|
-
opacity: getComputedStyle(
|
|
60
|
-
}),
|
|
108
|
+
function m(e) {
|
|
109
|
+
let n = t.get(e);
|
|
110
|
+
n && (r.set(e, {
|
|
111
|
+
height: e.getBoundingClientRect().height,
|
|
112
|
+
opacity: getComputedStyle(e).opacity
|
|
113
|
+
}), n.observer?.disconnect(), t.delete(e), n.animation?.cancel(), e.style.overflow = n.overflow);
|
|
61
114
|
}
|
|
62
|
-
function
|
|
63
|
-
let s =
|
|
64
|
-
o && c && (
|
|
65
|
-
let l = s.getComputedStyle(
|
|
66
|
-
|
|
67
|
-
let
|
|
68
|
-
if (!p || !
|
|
69
|
-
|
|
115
|
+
function h(e, n, o) {
|
|
116
|
+
let s = e.ownerDocument.defaultView, c = e.style.display === "none" || s.getComputedStyle(e).display === "none";
|
|
117
|
+
o && c && (e.style.display = "");
|
|
118
|
+
let l = s.getComputedStyle(e), u = r.get(e);
|
|
119
|
+
r.delete(e);
|
|
120
|
+
let d = e.getBoundingClientRect().height || f.get(e) || 0, p = i(e) ? 0 : a(l.getPropertyValue("--kima-duration-slow") || "300ms"), m = l.getPropertyValue("--kima-curve-emphasized").trim() || "ease-out";
|
|
121
|
+
if (!p || !e.animate) {
|
|
122
|
+
n();
|
|
70
123
|
return;
|
|
71
124
|
}
|
|
72
125
|
let h = {
|
|
73
|
-
overflow:
|
|
126
|
+
overflow: e.style.overflow,
|
|
74
127
|
animation: null,
|
|
75
128
|
observer: null
|
|
76
129
|
};
|
|
77
|
-
|
|
78
|
-
let g = o ?
|
|
79
|
-
function _(
|
|
80
|
-
let
|
|
81
|
-
height: `${
|
|
82
|
-
opacity:
|
|
130
|
+
t.set(e, h), e.style.overflow = "clip";
|
|
131
|
+
let g = o ? d : 0;
|
|
132
|
+
function _(r, i) {
|
|
133
|
+
let a = e.animate([{
|
|
134
|
+
height: `${r}px`,
|
|
135
|
+
opacity: i
|
|
83
136
|
}, {
|
|
84
137
|
height: `${g}px`,
|
|
85
138
|
opacity: +!!o
|
|
@@ -88,24 +141,24 @@ function p(i, a, o) {
|
|
|
88
141
|
easing: m,
|
|
89
142
|
fill: "both"
|
|
90
143
|
});
|
|
91
|
-
h.animation =
|
|
92
|
-
|
|
144
|
+
h.animation = a, a.finished.then(() => {
|
|
145
|
+
t.get(e) === h && h.animation === a && (h.observer?.disconnect(), t.delete(e), e.style.overflow = h.overflow, n(), a.cancel());
|
|
93
146
|
}).catch(() => {});
|
|
94
147
|
}
|
|
95
|
-
if (_(
|
|
96
|
-
let
|
|
148
|
+
if (_(u?.height ?? (o ? 0 : d), u?.opacity ?? (o ? 0 : l.opacity)), o && s.ResizeObserver && e.firstElementChild) {
|
|
149
|
+
let n = e.firstElementChild.getBoundingClientRect().height;
|
|
97
150
|
h.observer = new s.ResizeObserver(() => {
|
|
98
|
-
let
|
|
99
|
-
if (Math.abs(
|
|
100
|
-
let
|
|
101
|
-
g +=
|
|
102
|
-
}), h.observer.observe(
|
|
151
|
+
let r = e.firstElementChild?.getBoundingClientRect().height ?? n;
|
|
152
|
+
if (Math.abs(r - n) < .5 || t.get(e) !== h) return;
|
|
153
|
+
let i = e.getBoundingClientRect().height, a = s.getComputedStyle(e).opacity;
|
|
154
|
+
g += r - n, n = r, h.animation.cancel(), _(i, a);
|
|
155
|
+
}), h.observer.observe(e.firstElementChild);
|
|
103
156
|
}
|
|
104
157
|
}
|
|
105
|
-
var
|
|
106
|
-
onEnter: (e, t) =>
|
|
107
|
-
onLeave: (e, t) =>
|
|
108
|
-
onEnterCancelled:
|
|
109
|
-
onLeaveCancelled:
|
|
158
|
+
var g = {
|
|
159
|
+
onEnter: (e, t) => h(e, t, !0),
|
|
160
|
+
onLeave: (e, t) => h(e, t, !1),
|
|
161
|
+
onEnterCancelled: m,
|
|
162
|
+
onLeaveCancelled: m
|
|
110
163
|
};
|
|
111
|
-
export {
|
|
164
|
+
export { s as activateMotionElement, g as collapseTransition, d as freezeLeaveLayout, i as prefersReducedMotion, c as presenceTransition, p as rememberCollapseHeight, u as restoreLeaveLayout, o as retireMotionElement, n as useLayoutFlip };
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.kima-tabs[data-v-9535a533]{--kima-tabs-height:var(--kima-tab-height);--kima-tabs-gap:var(--kima-space-4);--kima-tabs-indicator-height:var(--kima-tab-indicator-height);min-width:0;color:var(--kima-color-on-surface);font-family:var(--kima-font-family);display:flex}.kima-tabs--horizontal[data-v-9535a533]{flex-direction:column}.kima-tabs--vertical[data-v-9535a533]{--kima-tabs-height:48px;gap:var(--kima-tabs-gap);flex-direction:row}.kima-tabs__list[data-v-9535a533]{min-width:0;padding:var(--kima-space-1);border-radius:var(--kima-radius-m);background:var(--kima-color-layer-1);display:flex;position:relative}.kima-tabs--vertical .kima-tabs__list[data-v-9535a533]{flex-direction:column;flex:0 0 180px;align-self:flex-start;width:180px}.kima-tabs__tab[data-v-9535a533]{box-sizing:border-box;min-width:64px;min-height:var(--kima-tabs-height);padding:0 var(--kima-space-3);border-radius:var(--kima-radius-s);color:var(--kima-color-on-surface-variant);background:var(--kima-color-transparent);font:inherit;font-size:var(--kima-font-size-medium);font-weight:var(--kima-font-weight-medium);cursor:pointer;transition:color var(--kima-duration-effects) var(--kima-ease-effects), background-color var(--kima-duration-effects) var(--kima-ease-effects);border:0;flex:1 1 0;justify-content:center;align-items:center;display:inline-flex;position:relative}.kima-tabs__tab[data-v-9535a533]:hover:not(:disabled){background:var(--kima-color-layer-1)}.kima-tabs__tab[data-v-9535a533]:active:not(:disabled){background:var(--kima-color-layer-2)}.kima-tabs__tab[data-v-9535a533]:focus-visible{outline:var(--kima-focus-ring-width) solid var(--kima-color-primary);outline-offset:var(--kima-focus-ring-offset)}.kima-tabs__tab[aria-selected=true][data-v-9535a533]{color:var(--kima-color-primary)}.kima-tabs__tab[data-v-9535a533]:disabled{cursor:not-allowed;color:var(--kima-color-on-surface-38)}.kima-tabs--vertical .kima-tabs__tab[data-v-9535a533]{flex:none;justify-content:flex-start;min-height:48px}.kima-tabs__panels[data-v-9535a533]{flex:auto;min-width:0;display:grid;position:relative}.kima-tabs__panel.kima-content-leave-active[data-v-9535a533]{position:absolute;inset-block-start:0;inset-inline:0}.kima-tabs__marker[data-v-9535a533]{pointer-events:none;background:var(--kima-color-primary);border-radius:var(--kima-radius-full);position:absolute;top:0;left:0}.kima-tabs__marker--ready[data-v-9535a533]{transition:transform var(--kima-duration-slow) var(--kima-curve-emphasized), width var(--kima-duration-slow) var(--kima-curve-emphasized), height var(--kima-duration-slow) var(--kima-curve-emphasized), opacity var(--kima-duration-effects) var(--kima-curve-standard)}.kima-tabs__panel[data-v-9535a533]{min-width:0;padding-top:var(--kima-tabs-gap);outline:none;flex:auto;grid-area:1/1;align-self:start}.kima-tabs__panel[data-v-9535a533]:focus-visible{outline:2px solid var(--kima-color-primary);outline-offset:2px}.kima-tabs--vertical .kima-tabs__panel[data-v-9535a533]{padding-top:0}@media (width<=560px){.kima-tabs__tab[data-v-9535a533]{padding-inline:var(--kima-space-2);font-size:var(--kima-font-size-sm)}}
|
package/dist/components/utility/tag-group.ce.vue_vue_type_style_index_0_scoped_892954ad_lang.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.kima-tag-group[data-v-892954ad]{color:var(--kima-color-on-surface);font-family:var(--kima-font-family)}.kima-tag-group__items[data-v-892954ad]{gap:var(--kima-space-2);flex-wrap:wrap;display:flex;position:relative}
|