@marianmeres/stuic 1.99.0 → 1.101.0
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/actions/tooltip/_maybe-pick-safe-placement.d.ts +1 -2
- package/dist/actions/tooltip/_set-position.js +2 -1
- package/dist/actions/tooltip/tooltip.js +1 -1
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte +9 -10
- package/dist/components/AlertConfirmPrompt/AlertConfirmPrompt.svelte.d.ts +3 -2
- package/dist/components/Button/Button.svelte.d.ts +1 -1
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte +2 -1
- package/dist/components/DismissibleMessage/DismissibleMessage.svelte.d.ts +2 -1
- package/dist/components/HoverExpandableWidth/HoverExpandableWidth.svelte +1 -1
- package/dist/components/Input/Field.svelte +5 -7
- package/dist/components/Input/Field.svelte.d.ts +2 -1
- package/dist/components/Input/FieldCheckbox.svelte +3 -5
- package/dist/components/Input/FieldCheckbox.svelte.d.ts +2 -1
- package/dist/components/Input/FieldRadios.svelte +1 -1
- package/dist/components/Input/FieldSelect.svelte +3 -5
- package/dist/components/Input/FieldSelect.svelte.d.ts +2 -1
- package/dist/components/Input/XFieldRadioInternal.svelte +8 -8
- package/dist/components/Input/XFieldRadioInternal.svelte.d.ts +2 -1
- package/dist/components/Notifications/Notifications.svelte.d.ts +6 -6
- package/dist/components/Switch/Switch.svelte.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { calculateAlignment } from '../../
|
|
2
|
-
import type { Alignment } from '../../utils/calculate-alignment.js';
|
|
1
|
+
import type { Alignment, calculateAlignment } from '../../utils/calculate-alignment.js';
|
|
3
2
|
import type { TooltipLogger, TooltipOptions } from './tooltip.js';
|
|
4
3
|
export declare const _maybePickSafePlacement: (calc: ReturnType<typeof calculateAlignment>, opts: TooltipOptions, log: TooltipLogger) => Alignment | false;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { get as storeGet } from 'svelte/store';
|
|
2
|
-
import { calculateAlignment
|
|
2
|
+
import { calculateAlignment } from '../../utils/calculate-alignment.js';
|
|
3
|
+
import { windowSize } from '../../utils/window-size.js';
|
|
3
4
|
import { _maybePickSafePlacement } from './_maybe-pick-safe-placement.js';
|
|
4
5
|
export const _setPosition = async (boundaryRoot, // will default to window dimensions
|
|
5
6
|
parent, div, arrow, opts, log) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createStore } from '@marianmeres/store';
|
|
2
2
|
import { derived, get as storeGet, writable, } from 'svelte/store';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
import { windowSize } from '../../
|
|
4
|
+
import { windowSize } from '../../utils/window-size.js';
|
|
5
5
|
import { _makeInVisible, _makeVisible } from './_make-visible.js';
|
|
6
6
|
import { _setPosition } from './_set-position.js';
|
|
7
7
|
export class TooltipConfig {
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
<script context="module">import { createClog } from "@marianmeres/clog";
|
|
2
2
|
import { onMount } from "svelte";
|
|
3
3
|
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { focusTrap } from "../../actions/focus-trap.js";
|
|
5
|
+
import Button from "../Button/Button.svelte";
|
|
6
|
+
import Field from "../Input/Field.svelte";
|
|
7
|
+
import FieldSelect from "../Input/FieldSelect.svelte";
|
|
8
|
+
import Notifications from "../Notifications/Notifications.svelte";
|
|
9
|
+
import Thc from "../Thc/Thc.svelte";
|
|
10
|
+
import { acpDefaultIcons } from "./acp-icons.js";
|
|
4
11
|
import {
|
|
5
12
|
AlertConfirmPromptType,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
FieldSelect,
|
|
9
|
-
Notifications,
|
|
10
|
-
Thc,
|
|
11
|
-
createAlertConfirmPromptStore,
|
|
12
|
-
createNotificationsStore,
|
|
13
|
-
focusTrap
|
|
14
|
-
} from "../../index.js";
|
|
15
|
-
import { acpDefaultIcons } from "./acp-icons.js";
|
|
13
|
+
createAlertConfirmPromptStore
|
|
14
|
+
} from "./alert-confirm-prompt.js";
|
|
16
15
|
export class AlertConfirmPromptConfig {
|
|
17
16
|
// sane defaults which perhaps should stay untouched
|
|
18
17
|
static preset = {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import {
|
|
3
|
-
import type {
|
|
2
|
+
import type { NOTIFICATIONS_POSX, NOTIFICATIONS_POSY } from '../Notifications/Notifications.svelte';
|
|
3
|
+
import type { createNotificationsStore } from '../Notifications/notifications.js';
|
|
4
|
+
import { createAlertConfirmPromptStore, type AlertConfirmPromptKnownClasses, type AlertConfirmPromptVariant } from './alert-confirm-prompt.js';
|
|
4
5
|
export interface AlertConfirmPromptIcons extends Record<AlertConfirmPromptVariant, () => string> {
|
|
5
6
|
spinner: () => string;
|
|
6
7
|
}
|
|
@@ -50,7 +50,7 @@ declare const __propDef: {
|
|
|
50
50
|
square?: boolean | undefined;
|
|
51
51
|
disabled?: boolean | undefined;
|
|
52
52
|
value?: string | undefined;
|
|
53
|
-
size?: "
|
|
53
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
54
54
|
};
|
|
55
55
|
events: {
|
|
56
56
|
focus: FocusEvent;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script context="module">import { slide } from "svelte/transition";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
|
-
import
|
|
3
|
+
import Thc, { isTHCNotEmpty } from "../Thc/Thc.svelte";
|
|
4
|
+
import X from "../X/X.svelte";
|
|
4
5
|
const themes = {
|
|
5
6
|
primary: "bg-stuic-primary/10 text-stuic-primary dark:bg-stuic-primary dark:text-white/90",
|
|
6
7
|
secondary: "bg-stuic-secondary/10 text-stuic-secondary dark:bg-stuic-secondary dark:text-white/90",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import
|
|
2
|
+
import type { TW_COLORS } from '../../utils/tw-types.js';
|
|
3
|
+
import { type THC } from '../Thc/Thc.svelte';
|
|
3
4
|
export declare class DismissibleMessageConfig {
|
|
4
5
|
static class: {
|
|
5
6
|
box: string;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createEventDispatcher } from "svelte";
|
|
3
3
|
import { get } from "svelte/store";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
|
-
import { DevicePointer } from "../../
|
|
5
|
+
import { DevicePointer } from "../../utils/device-pointer.js";
|
|
6
6
|
import { prefersReducedMotionStore } from "../../utils/prefers-reduced-motion.js";
|
|
7
7
|
import { windowSize } from "../../utils/window-size.js";
|
|
8
8
|
const clog = createClog("HoverExpandableWidth");
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
import { createEventDispatcher } from "svelte";
|
|
3
3
|
import { slide } from "svelte/transition";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Thc
|
|
11
|
-
} from "../../index.js";
|
|
5
|
+
import { autogrow } from "../../actions/autogrow.js";
|
|
6
|
+
import { trim } from "../../actions/trim.js";
|
|
7
|
+
import { validate as validateAction } from "../../actions/validate.js";
|
|
8
|
+
import { getId } from "../../utils/get-id.js";
|
|
9
|
+
import Thc from "../Thc/Thc.svelte";
|
|
12
10
|
const _emptyClasses = () => ({
|
|
13
11
|
box: "",
|
|
14
12
|
wrap: "",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import {
|
|
2
|
+
import type { ValidateOptions } from '../../actions/validate.js';
|
|
3
|
+
import type { THC } from '../Thc/Thc.svelte';
|
|
3
4
|
export interface FieldConfigClasses {
|
|
4
5
|
box?: string;
|
|
5
6
|
wrap?: string;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
<script context="module">import { slide } from "svelte/transition";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
validate as validateAction
|
|
7
|
-
} from "../../index.js";
|
|
3
|
+
import { validate as validateAction } from "../../actions/validate.js";
|
|
4
|
+
import { getId } from "../../utils/get-id.js";
|
|
5
|
+
import Thc from "../Thc/Thc.svelte";
|
|
8
6
|
const _emptyClasses = () => ({
|
|
9
7
|
box: "",
|
|
10
8
|
label: "",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import
|
|
2
|
+
import type { ValidateOptions } from '../../actions/validate.js';
|
|
3
|
+
import type { THC } from '../Thc/Thc.svelte';
|
|
3
4
|
export interface FieldCheckboxConfigClasses {
|
|
4
5
|
box?: string;
|
|
5
6
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script context="module">import { createClog } from "@marianmeres/clog";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
|
-
import { getId } from "../../
|
|
3
|
+
import { getId } from "../../utils/get-id.js";
|
|
4
4
|
import XFieldRadioInternal from "./XFieldRadioInternal.svelte";
|
|
5
5
|
const _emptyClasses = () => ({
|
|
6
6
|
group: "",
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
import { createEventDispatcher } from "svelte";
|
|
3
3
|
import { slide } from "svelte/transition";
|
|
4
4
|
import { twMerge } from "tailwind-merge";
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
validate as validateAction
|
|
9
|
-
} from "../../index.js";
|
|
5
|
+
import { validate as validateAction } from "../../actions/validate.js";
|
|
6
|
+
import { getId } from "../../utils/get-id.js";
|
|
7
|
+
import Thc from "../Thc/Thc.svelte";
|
|
10
8
|
const _emptyClasses = () => ({
|
|
11
9
|
box: "",
|
|
12
10
|
wrap: "",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import
|
|
2
|
+
import type { ValidateOptions } from '../../actions/validate.js';
|
|
3
|
+
import type { THC } from '../Thc/Thc.svelte';
|
|
3
4
|
export interface FieldSelectConfigClasses {
|
|
4
5
|
box?: string;
|
|
5
6
|
wrap?: string;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
<script context="module">import {
|
|
2
|
-
import {
|
|
3
|
-
getId,
|
|
4
|
-
validate as validateAction,
|
|
5
|
-
FieldRadiosConfig,
|
|
6
|
-
Thc
|
|
7
|
-
} from "../../index.js";
|
|
1
|
+
<script context="module">import { createEventDispatcher } from "svelte";
|
|
8
2
|
import { slide } from "svelte/transition";
|
|
9
|
-
import {
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { validate as validateAction } from "../../actions/validate.js";
|
|
5
|
+
import { getId } from "../../utils/get-id.js";
|
|
6
|
+
import Thc from "../Thc/Thc.svelte";
|
|
7
|
+
import {
|
|
8
|
+
FieldRadiosConfig
|
|
9
|
+
} from "./FieldRadios.svelte";
|
|
10
10
|
const _PRESET = {
|
|
11
11
|
box: "flex items-start",
|
|
12
12
|
label: "block w-full",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import
|
|
2
|
+
import type { ValidateOptions } from '../../actions/validate.js';
|
|
3
|
+
import { type FieldRadiosConfigClasses, type FieldRadiosConfigClassesBySize } from './FieldRadios.svelte';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
6
|
class?: FieldRadiosConfigClasses | undefined;
|
|
@@ -28,14 +28,14 @@ declare const __propDef: {
|
|
|
28
28
|
classes?: Partial<NotificationKnownClasses> | undefined;
|
|
29
29
|
classesByType?: Partial<Record<string, Partial<NotificationKnownClasses>>> | undefined;
|
|
30
30
|
ariaCloseLabel?: string | undefined;
|
|
31
|
-
posX?: "
|
|
32
|
-
posXMobile?: "
|
|
31
|
+
posX?: "center" | "left" | "right" | undefined;
|
|
32
|
+
posXMobile?: "center" | "left" | "right" | undefined;
|
|
33
33
|
posY?: "center" | "top" | "bottom" | undefined;
|
|
34
34
|
posYMobile?: "center" | "top" | "bottom" | undefined;
|
|
35
35
|
getPositionConfig?: (() => {
|
|
36
|
-
posX: "
|
|
36
|
+
posX: "center" | "left" | "right";
|
|
37
37
|
posY: "center" | "top" | "bottom";
|
|
38
|
-
posXMobile: "
|
|
38
|
+
posXMobile: "center" | "left" | "right";
|
|
39
39
|
posYMobile: "center" | "top" | "bottom";
|
|
40
40
|
}) | undefined;
|
|
41
41
|
};
|
|
@@ -49,9 +49,9 @@ export type NotificationsEvents = typeof __propDef.events;
|
|
|
49
49
|
export type NotificationsSlots = typeof __propDef.slots;
|
|
50
50
|
export default class Notifications extends SvelteComponent<NotificationsProps, NotificationsEvents, NotificationsSlots> {
|
|
51
51
|
get getPositionConfig(): () => {
|
|
52
|
-
posX: "
|
|
52
|
+
posX: "center" | "left" | "right";
|
|
53
53
|
posY: "center" | "top" | "bottom";
|
|
54
|
-
posXMobile: "
|
|
54
|
+
posXMobile: "center" | "left" | "right";
|
|
55
55
|
posYMobile: "center" | "top" | "bottom";
|
|
56
56
|
};
|
|
57
57
|
}
|
|
@@ -36,7 +36,7 @@ declare const __propDef: {
|
|
|
36
36
|
stopPropagation?: boolean | undefined;
|
|
37
37
|
preventDefault?: boolean | undefined;
|
|
38
38
|
preHook?: SwitchPreHook | undefined;
|
|
39
|
-
size?: "
|
|
39
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | undefined;
|
|
40
40
|
};
|
|
41
41
|
events: {
|
|
42
42
|
click: MouseEvent;
|