fluentui-svelte 0.1.2 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -6
- package/dist/components/auto-suggest-box/auto-suggest-box.svelte +74 -56
- package/dist/components/auto-suggest-box/docs/llms.md +46 -13
- package/dist/components/auto-suggest-box/option.svelte +2 -1
- package/dist/components/auto-suggest-box/types.d.ts +5 -0
- package/dist/components/avatar/avatar.svelte +1 -1
- package/dist/components/avatar/docs/llms.md +20 -14
- package/dist/components/badge/badge-icon.svelte +5 -8
- package/dist/components/badge/badge.svelte +6 -2
- package/dist/components/badge/docs/llms.md +29 -16
- package/dist/components/button/button.svelte +13 -7
- package/dist/components/button/docs/llms.md +33 -24
- package/dist/components/button/types.d.ts +5 -1
- package/dist/components/calendar-date-picker/docs/llms.md +17 -7
- package/dist/components/calendar-view/calendar-view-header.svelte +2 -2
- package/dist/components/calendar-view/calendar-view-header.svelte.d.ts +2 -17
- package/dist/components/calendar-view/calendar-view-months.svelte +1 -1
- package/dist/components/calendar-view/calendar-view-years.svelte +1 -1
- package/dist/components/calendar-view/calendar-view.svelte +66 -52
- package/dist/components/calendar-view/docs/llms.md +42 -30
- package/dist/components/card/card-context.svelte.d.ts +2 -0
- package/dist/components/card/card-context.svelte.js +2 -0
- package/dist/components/card/card-footer.svelte +37 -0
- package/dist/components/card/card-footer.svelte.d.ts +4 -0
- package/dist/components/card/card-header.svelte +81 -0
- package/dist/components/card/card-header.svelte.d.ts +4 -0
- package/dist/components/card/card-preview.svelte +64 -0
- package/dist/components/card/card-preview.svelte.d.ts +4 -0
- package/dist/components/card/card.svelte +242 -0
- package/dist/components/card/card.svelte.d.ts +39 -0
- package/dist/components/card/docs/llms.md +226 -0
- package/dist/components/card/types.d.ts +129 -0
- package/dist/components/card/types.js +1 -0
- package/dist/components/checkbox/checkbox.svelte +5 -3
- package/dist/components/checkbox/docs/llms.md +18 -12
- package/dist/components/date-picker/docs/llms.md +25 -15
- package/dist/components/dialog/dialog-surface.svelte +8 -8
- package/dist/components/dialog/dialog.svelte +41 -39
- package/dist/components/dialog/docs/llms.md +59 -34
- package/dist/components/divider/docs/llms.md +14 -9
- package/dist/components/dropdown/docs/llms.md +34 -15
- package/dist/components/dropdown/dropdown.svelte +4 -2
- package/dist/components/dropdown-select/docs/llms.md +28 -14
- package/dist/components/expander/docs/llms.md +19 -12
- package/dist/components/flyout/docs/llms.md +17 -11
- package/dist/components/hyperlink/docs/llms.md +11 -7
- package/dist/components/info-bar/docs/llms.md +15 -9
- package/dist/components/label/docs/llms.md +15 -11
- package/dist/components/list-view/docs/llms.md +34 -24
- package/dist/components/list-view/list-view-item.svelte +10 -4
- package/dist/components/list-view/list-view.svelte +68 -63
- package/dist/components/menu/context-menu-trigger.svelte +45 -40
- package/dist/components/menu/docs/llms.md +63 -34
- package/dist/components/menu/menu-item-checkbox.svelte +4 -2
- package/dist/components/menu/menu-item-radio.svelte +4 -2
- package/dist/components/menu/menu-item-switch.svelte +4 -2
- package/dist/components/menu/menu-item.svelte +6 -2
- package/dist/components/menu/menu-popover.svelte +21 -10
- package/dist/components/menu/menu-trigger.svelte +22 -9
- package/dist/components/menu/menu.svelte +98 -87
- package/dist/components/number-box/docs/llms.md +10 -6
- package/dist/components/persona/docs/llms.md +19 -14
- package/dist/components/progress-bar/docs/llms.md +18 -10
- package/dist/components/progress-ring/docs/llms.md +19 -12
- package/dist/components/radio-button/docs/llms.md +13 -8
- package/dist/components/skeleton/docs/llms.md +13 -8
- package/dist/components/slider/docs/llms.md +33 -21
- package/dist/components/slider/slider.svelte +13 -11
- package/dist/components/text-box/docs/llms.md +23 -17
- package/dist/components/textarea/docs/llms.md +16 -7
- package/dist/components/time-picker/docs/llms.md +20 -10
- package/dist/components/toggle-switch/docs/llms.md +13 -9
- package/dist/components/tooltip/docs/llms.md +24 -10
- package/dist/components/tree-view/docs/llms.md +53 -35
- package/dist/components/tree-view/tree-view-item-content.svelte +1 -1
- package/dist/components/tree-view/tree-view-item.svelte +3 -3
- package/dist/components/tree-view/tree-view.svelte +89 -93
- package/dist/css/class-darkmode.css +3 -1
- package/dist/css/media-darkmode.css +3 -1
- package/dist/css/theme.css +3 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +6 -0
- package/dist/internal/components/render-soc/render-soc.svelte +17 -23
- package/dist/internal/components/render-soc/render-soc.svelte.d.ts +16 -16
- package/dist/providers/fluentui-svelte/fluentui-svelte.svelte +15 -15
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
--fs-control-stroke-on-accent-tertiary: #00000037;
|
|
92
92
|
--fs-control-stroke-on-accent-disabled: #00000033;
|
|
93
93
|
--fs-control-stroke-on-image: #0000006b;
|
|
94
|
-
--fs-card-stroke-default: #
|
|
94
|
+
--fs-card-stroke-default: #0000001a;
|
|
95
95
|
--fs-card-stroke-solid: #1c1c1c;
|
|
96
96
|
|
|
97
97
|
/* Control Strong Stroke */
|
|
@@ -112,6 +112,7 @@
|
|
|
112
112
|
/* Card Background */
|
|
113
113
|
--fs-card-background-default: #ffffff0d;
|
|
114
114
|
--fs-card-background-secondary: #ffffff08;
|
|
115
|
+
--fs-card-background-tertiary: #ffffff1c; /* 6.98% opacity */
|
|
115
116
|
|
|
116
117
|
/* Smoke Background */
|
|
117
118
|
/* --fs-smoke-background-default: #0000004d; <- Same on light/dark */
|
|
@@ -159,6 +160,7 @@
|
|
|
159
160
|
|
|
160
161
|
/* Shadows */
|
|
161
162
|
--fs-shadow-card: 0 0.125rem 0.25rem #00000021; /* 13% opacity */
|
|
163
|
+
--fs-shadow-card-hover: 0 0.125rem 0.25rem #00000042; /* 26% opacity */
|
|
162
164
|
--fs-shadow-tooltip: 0 0.25rem 0.5rem #00000042; /* 26% opacity */
|
|
163
165
|
--fs-shadow-flyout: 0 0.5rem 1rem #00000042; /* 26% opacity */
|
|
164
166
|
--fs-shadow-dialog: 0 2rem 4rem #0000005e, 0 1.125rem 1.313rem #0000005e; /* 37% opacity */
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
--fs-control-stroke-on-accent-tertiary: #00000037;
|
|
93
93
|
--fs-control-stroke-on-accent-disabled: #00000033;
|
|
94
94
|
--fs-control-stroke-on-image: #0000006b;
|
|
95
|
-
--fs-card-stroke-default: #
|
|
95
|
+
--fs-card-stroke-default: #0000001a;
|
|
96
96
|
--fs-card-stroke-solid: #1c1c1c;
|
|
97
97
|
|
|
98
98
|
/* Control Strong Stroke */
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
/* Card Background */
|
|
114
114
|
--fs-card-background-default: #ffffff0d;
|
|
115
115
|
--fs-card-background-secondary: #ffffff08;
|
|
116
|
+
--fs-card-background-tertiary: #ffffff1c; /* 6.98% opacity */
|
|
116
117
|
|
|
117
118
|
/* Smoke Background */
|
|
118
119
|
/* --fs-smoke-background-default: #0000004d; <- Same on light/dark */
|
|
@@ -160,6 +161,7 @@
|
|
|
160
161
|
|
|
161
162
|
/* Shadows */
|
|
162
163
|
--fs-shadow-card: 0 0.125rem 0.25rem #00000021; /* 13% opacity */
|
|
164
|
+
--fs-shadow-card-hover: 0 0.125rem 0.25rem #00000042; /* 26% opacity */
|
|
163
165
|
--fs-shadow-tooltip: 0 0.25rem 0.5rem #00000042; /* 26% opacity */
|
|
164
166
|
--fs-shadow-flyout: 0 0.5rem 1rem #00000042; /* 26% opacity */
|
|
165
167
|
--fs-shadow-dialog: 0 2rem 4rem #0000005e, 0 1.125rem 1.313rem #0000005e; /* 37% opacity */
|
package/dist/css/theme.css
CHANGED
|
@@ -129,6 +129,7 @@
|
|
|
129
129
|
/* Card Background */
|
|
130
130
|
--fs-card-background-default: #ffffffb3;
|
|
131
131
|
--fs-card-background-secondary: #f6f6f680;
|
|
132
|
+
--fs-card-background-tertiary: #ffffff;
|
|
132
133
|
|
|
133
134
|
/* Smoke Background */
|
|
134
135
|
--fs-smoke-background-default: #0000004d;
|
|
@@ -179,7 +180,7 @@
|
|
|
179
180
|
/* Border Radius */
|
|
180
181
|
--fs-control-border-radius: 0.25rem;
|
|
181
182
|
--fs-control-inner-border-radius: 0.188rem;
|
|
182
|
-
--fs-control-overlay-border-radius: 0.
|
|
183
|
+
--fs-control-overlay-border-radius: 0.4375rem;
|
|
183
184
|
|
|
184
185
|
/* Durations */
|
|
185
186
|
--fs-fast-duration: 167ms;
|
|
@@ -232,6 +233,7 @@
|
|
|
232
233
|
|
|
233
234
|
/* Shadows */
|
|
234
235
|
--fs-shadow-card: 0 0.125rem 0.25rem #0000000a; /* 4% opacity */
|
|
236
|
+
--fs-shadow-card-hover: 0 0.125rem 0.25rem #0000001a; /* 10% opacity */
|
|
235
237
|
--fs-shadow-tooltip: 0 0.25rem 0.5rem #00000024; /* 14% opacity */
|
|
236
238
|
--fs-shadow-flyout: 0 0.5rem 1rem #00000024; /* 14% opacity */
|
|
237
239
|
--fs-shadow-dialog: 0 2rem 4rem #00000030, 0 1.125rem 1.313rem #00000026; /* 19% and 15% opacity respectively */
|
package/dist/index.d.ts
CHANGED
|
@@ -5,6 +5,10 @@ export { default as Badge } from './components/badge/badge.svelte';
|
|
|
5
5
|
export { default as BadgeIcon } from './components/badge/badge-icon.svelte';
|
|
6
6
|
export { default as Button } from './components/button/button.svelte';
|
|
7
7
|
export { default as SplitButton } from './components/button/split-button.svelte';
|
|
8
|
+
export { default as Card } from './components/card/card.svelte';
|
|
9
|
+
export { default as CardHeader } from './components/card/card-header.svelte';
|
|
10
|
+
export { default as CardFooter } from './components/card/card-footer.svelte';
|
|
11
|
+
export { default as CardPreview } from './components/card/card-preview.svelte';
|
|
8
12
|
export { default as CalendarView } from './components/calendar-view/calendar-view.svelte';
|
|
9
13
|
export { default as CalendarViewHeader } from './components/calendar-view/calendar-view-header.svelte';
|
|
10
14
|
export { default as CalendarViewControls } from './components/calendar-view/calendar-view-controls.svelte';
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,12 @@ export { default as BadgeIcon } from './components/badge/badge-icon.svelte';
|
|
|
13
13
|
export { default as Button } from './components/button/button.svelte';
|
|
14
14
|
export { default as SplitButton } from './components/button/split-button.svelte';
|
|
15
15
|
// End Button Component
|
|
16
|
+
// Start Card Component
|
|
17
|
+
export { default as Card } from './components/card/card.svelte';
|
|
18
|
+
export { default as CardHeader } from './components/card/card-header.svelte';
|
|
19
|
+
export { default as CardFooter } from './components/card/card-footer.svelte';
|
|
20
|
+
export { default as CardPreview } from './components/card/card-preview.svelte';
|
|
21
|
+
// End Card Component
|
|
16
22
|
// Start CalendarView Component
|
|
17
23
|
export { default as CalendarView } from './components/calendar-view/calendar-view.svelte';
|
|
18
24
|
export { default as CalendarViewHeader } from './components/calendar-view/calendar-view-header.svelte';
|
|
@@ -1,29 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
<script lang="ts" generics="T extends Snippet<unknown[]> | Component<any>">
|
|
1
|
+
<script lang="ts" generics="Args extends Record<string, unknown>">
|
|
3
2
|
import type { Component, Snippet } from 'svelte';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
let {
|
|
5
|
+
SoC,
|
|
6
|
+
args = {} as Args
|
|
7
|
+
}: {
|
|
8
|
+
/** A snippet or a component. Both receive `args`: the snippet as its single
|
|
9
|
+
* argument, the component as its props. */
|
|
10
|
+
SoC: Snippet<[Args]> | Component<Args>;
|
|
11
|
+
args?: Args;
|
|
12
|
+
} = $props();
|
|
7
13
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
type SOCProps<G> =
|
|
12
|
-
G extends Snippet<infer A> ? { SoC: T; args: A } : G extends Component<infer P> ? { SoC: T } & P : never;
|
|
13
|
-
|
|
14
|
-
let { SoC, args, ...props }: SOCProps<T> = $props();
|
|
14
|
+
// Snippets compile to ($$anchor, ...args) so they report length 1, components to
|
|
15
|
+
// ($$anchor, $$props) so they report 2. See https://github.com/sveltejs/svelte/issues/9774
|
|
16
|
+
const isSnippet = (value: Snippet<[Args]> | Component<Args>): value is Snippet<[Args]> => value.length === 1;
|
|
15
17
|
</script>
|
|
16
18
|
|
|
17
|
-
{#if SoC}
|
|
18
|
-
{
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
{@render SoC(args)}
|
|
22
|
-
{:else}
|
|
23
|
-
{/* @ts-expect-error - [] is not assignable to never */ null}
|
|
24
|
-
{@render SoC()}
|
|
25
|
-
{/if}
|
|
26
|
-
{:else if isComponent(SoC)}
|
|
27
|
-
<SoC {...props} />
|
|
28
|
-
{/if}
|
|
19
|
+
{#if isSnippet(SoC)}
|
|
20
|
+
{@render SoC(args)}
|
|
21
|
+
{:else}
|
|
22
|
+
<SoC {...args} />
|
|
29
23
|
{/if}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
import type { Component, Snippet } from 'svelte';
|
|
2
|
-
declare function $$render<
|
|
3
|
-
props:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
declare function $$render<Args extends Record<string, unknown>>(): {
|
|
3
|
+
props: {
|
|
4
|
+
/** A snippet or a component. Both receive `args`: the snippet as its single
|
|
5
|
+
* argument, the component as its props. */
|
|
6
|
+
SoC: Snippet<[Args]> | Component<Args>;
|
|
7
|
+
args?: Args;
|
|
8
|
+
};
|
|
9
9
|
exports: {};
|
|
10
10
|
bindings: "";
|
|
11
11
|
slots: {};
|
|
12
12
|
events: {};
|
|
13
13
|
};
|
|
14
|
-
declare class __sveltets_Render<
|
|
15
|
-
props(): ReturnType<typeof $$render<
|
|
16
|
-
events(): ReturnType<typeof $$render<
|
|
17
|
-
slots(): ReturnType<typeof $$render<
|
|
14
|
+
declare class __sveltets_Render<Args extends Record<string, unknown>> {
|
|
15
|
+
props(): ReturnType<typeof $$render<Args>>['props'];
|
|
16
|
+
events(): ReturnType<typeof $$render<Args>>['events'];
|
|
17
|
+
slots(): ReturnType<typeof $$render<Args>>['slots'];
|
|
18
18
|
bindings(): "";
|
|
19
19
|
exports(): {};
|
|
20
20
|
}
|
|
21
21
|
interface $$IsomorphicComponent {
|
|
22
|
-
new <
|
|
23
|
-
$$bindings?: ReturnType<__sveltets_Render<
|
|
24
|
-
} & ReturnType<__sveltets_Render<
|
|
25
|
-
<
|
|
22
|
+
new <Args extends Record<string, unknown>>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<Args>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<Args>['props']>, ReturnType<__sveltets_Render<Args>['events']>, ReturnType<__sveltets_Render<Args>['slots']>> & {
|
|
23
|
+
$$bindings?: ReturnType<__sveltets_Render<Args>['bindings']>;
|
|
24
|
+
} & ReturnType<__sveltets_Render<Args>['exports']>;
|
|
25
|
+
<Args extends Record<string, unknown>>(internal: unknown, props: ReturnType<__sveltets_Render<Args>['props']> & {}): ReturnType<__sveltets_Render<Args>['exports']>;
|
|
26
26
|
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
27
27
|
}
|
|
28
28
|
declare const RenderSoc: $$IsomorphicComponent;
|
|
29
|
-
type RenderSoc<
|
|
29
|
+
type RenderSoc<Args extends Record<string, unknown>> = InstanceType<typeof RenderSoc<Args>>;
|
|
30
30
|
export default RenderSoc;
|
|
@@ -20,21 +20,19 @@
|
|
|
20
20
|
// Syncing
|
|
21
21
|
let reducedMotion = $derived(userReducedMotion.current ?? prefersReducedMotion.current);
|
|
22
22
|
|
|
23
|
-
const
|
|
24
|
-
get tabspotInstance() {
|
|
25
|
-
return tabspotInstance;
|
|
26
|
-
},
|
|
27
|
-
get reducedMotion() {
|
|
28
|
-
return reducedMotion;
|
|
29
|
-
},
|
|
30
|
-
get theme() {
|
|
31
|
-
return mode.current;
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
setGlobalFSContext({
|
|
23
|
+
const context: FSProviderContext = $state({
|
|
36
24
|
config: null,
|
|
37
|
-
state:
|
|
25
|
+
state: {
|
|
26
|
+
get tabspotInstance() {
|
|
27
|
+
return tabspotInstance;
|
|
28
|
+
},
|
|
29
|
+
get reducedMotion() {
|
|
30
|
+
return reducedMotion;
|
|
31
|
+
},
|
|
32
|
+
get theme() {
|
|
33
|
+
return mode.current;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
38
36
|
events: null,
|
|
39
37
|
methods: {
|
|
40
38
|
setReducedMotion: (value) => {
|
|
@@ -46,6 +44,8 @@
|
|
|
46
44
|
}
|
|
47
45
|
});
|
|
48
46
|
|
|
47
|
+
setGlobalFSContext(context);
|
|
48
|
+
|
|
49
49
|
onMount(() => {
|
|
50
50
|
tabspotInstance ??= tabspot();
|
|
51
51
|
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
$effect(() => {
|
|
58
58
|
const root = document.documentElement;
|
|
59
59
|
|
|
60
|
-
root.dataset.fsReducedMotion = String(
|
|
60
|
+
root.dataset.fsReducedMotion = String(context.state.reducedMotion);
|
|
61
61
|
|
|
62
62
|
return () => {
|
|
63
63
|
delete root.dataset.fsReducedMotion;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export type BeforeOrAfter = 'before' | 'after';
|
|
|
20
20
|
export type ActiveOrInactive = 'active' | 'inactive';
|
|
21
21
|
export type Statuses = 'available' | 'busy' | 'offline' | 'away' | 'do-not-disturb' | 'out-of-office' | 'unknown' | 'blocked';
|
|
22
22
|
export type ProgressStatus = 'paused' | 'error';
|
|
23
|
+
export type Horientation = 'horizontal' | 'vertical';
|
|
23
24
|
export type YAxis = 'top' | 'bottom';
|
|
24
25
|
export type XAxis = 'left' | 'right';
|
|
25
26
|
export type YDirection = 'up' | 'middle' | 'down';
|