Skip to content

Commit

Permalink
chore: sub exports for svelte
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinderoubaix committed Dec 19, 2023
1 parent f1e24f2 commit f061ebd
Show file tree
Hide file tree
Showing 93 changed files with 343 additions and 211 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script context="module" lang="ts">
import {Accordion, AccordionItem} from '@agnos-ui/svelte';
import {Accordion, AccordionItem} from '@agnos-ui/svelte/components/accordion';
import '@agnos-ui/common/samples/accordion/custom.scss';
import {writable} from 'svelte/store';
import BODY from '@agnos-ui/common/samples/accordion/body.txt?raw';
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/accordion/Default.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script context="module" lang="ts">
import {Accordion, AccordionItem} from '@agnos-ui/svelte';
import {Accordion, AccordionItem} from '@agnos-ui/svelte/components/accordion';
import BODY from '@agnos-ui/common/samples/accordion/body.txt?raw';
</script>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Accordion, AccordionItem} from '@agnos-ui/svelte';
import {Accordion, AccordionItem} from '@agnos-ui/svelte/components/accordion';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('accordion');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script context="module" lang="ts">
import {Accordion, AccordionItem} from '@agnos-ui/svelte';
import {Accordion, AccordionItem} from '@agnos-ui/svelte/components/accordion';
import BODY from '@agnos-ui/common/samples/accordion/body.txt?raw';
</script>

Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/alert/Config.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Alert} from '@agnos-ui/svelte';
import {Alert} from '@agnos-ui/svelte/components/alert';
let alert: Alert;
let [animationOnInit, animation, dismissible] = [true, true, true];
Expand Down
4 changes: 2 additions & 2 deletions svelte/demo/src/app/samples/alert/Dynamic.route.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import {Alert} from '@agnos-ui/svelte';
import type {AlertProps} from '@agnos-ui/svelte';
import {Alert} from '@agnos-ui/svelte/components/alert';
import type {AlertProps} from '@agnos-ui/svelte/components/alert';
import {writable} from 'svelte/store';
function createAlerts() {
Expand Down
3 changes: 2 additions & 1 deletion svelte/demo/src/app/samples/alert/Generic.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import {Alert, createWidgetsDefaultConfig} from '@agnos-ui/svelte';
import {Alert} from '@agnos-ui/svelte/components/alert';
import {createWidgetsDefaultConfig} from '@agnos-ui/svelte/config';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const widgetsConfig$ = createWidgetsDefaultConfig();
Expand Down
3 changes: 2 additions & 1 deletion svelte/demo/src/app/samples/alert/Icon.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import {Alert, createWidgetsDefaultConfig} from '@agnos-ui/svelte';
import {Alert} from '@agnos-ui/svelte/components/alert';
import {createWidgetsDefaultConfig} from '@agnos-ui/svelte/config';
import Icon from './Icon.svelte';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down
3 changes: 2 additions & 1 deletion svelte/demo/src/app/samples/alert/Icon.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import {Slot, type AlertSlots} from '@agnos-ui/svelte';
import {Slot} from '@agnos-ui/svelte/slot';
import type {AlertSlots} from '@agnos-ui/svelte/components/alert';
import biCheckCircleFill from 'bootstrap-icons/icons/check-circle-fill.svg?raw';
import biInfoCircleFill from 'bootstrap-icons/icons/info-circle-fill.svg?raw';
import biExclamationTriangleFill from 'bootstrap-icons/icons/exclamation-triangle-fill.svg?raw';
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/alert/Playground.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Alert} from '@agnos-ui/svelte';
import {Alert} from '@agnos-ui/svelte/components/alert';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('alert');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import '@agnos-ui/common/samples/floatingui/floatingui.scss';
import {createFloatingUI} from '@agnos-ui/core';
import {createFloatingUI} from '@agnos-ui/svelte/services/floatingUI';
import {autoPlacement, hide, offset, shift} from '@floating-ui/dom';
const {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {activeElement$, createHasFocus} from '@agnos-ui/core';
import {activeElement$, createHasFocus} from '@agnos-ui/svelte/services/focustrack';
const {hasFocus$, directive} = createHasFocus();
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/modal/Component.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {openModal} from '@agnos-ui/svelte';
import {openModal} from '@agnos-ui/svelte/components/modal';
import ComponentModal from './ComponentModal.svelte';
const launch = () => openModal({slotTitle: 'Hi there!', slotDefault: ComponentModal, contentData: {name: 'World'}});
</script>
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/modal/ComponentModal.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type {ModalSlots} from '@agnos-ui/svelte';
import type {ModalSlots} from '@agnos-ui/svelte/components/modal';
type ModalContent = {name: string};
// cf https://github.com/ota-meshi/eslint-plugin-svelte/issues/348
type $$Props = ModalSlots<ModalContent>['default']; // eslint-disable-line @typescript-eslint/no-unused-vars
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/modal/Default.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Modal, modalCloseButtonClick, modalOutsideClick} from '@agnos-ui/svelte';
import {Modal, modalCloseButtonClick, modalOutsideClick} from '@agnos-ui/svelte/components/modal';
let modal: Modal<unknown>;
let message = '';
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/modal/Playground.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Modal} from '@agnos-ui/svelte';
import {Modal} from '@agnos-ui/svelte/components/modal';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('modal');
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/modal/Stack.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {openModal} from '@agnos-ui/svelte';
import {openModal} from '@agnos-ui/svelte/components/modal';
import StackModal from './StackModal.svelte';
</script>

Expand Down
4 changes: 2 additions & 2 deletions svelte/demo/src/app/samples/modal/StackModal.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type {ModalSlots} from '@agnos-ui/svelte';
import {openModal} from '@agnos-ui/svelte';
import type {ModalSlots} from '@agnos-ui/svelte/components/modal';
import {openModal} from '@agnos-ui/svelte/components/modal';
import Self from './StackModal.svelte';
// cf https://github.com/ota-meshi/eslint-plugin-svelte/issues/348
Expand Down
4 changes: 2 additions & 2 deletions svelte/demo/src/app/samples/navManager/NavManagerLine.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type {NavManagerItemConfig} from '@agnos-ui/core';
import {createNavManager} from '@agnos-ui/core';
import type {NavManagerItemConfig} from '@agnos-ui/svelte/services/navManager';
import {createNavManager} from '@agnos-ui/svelte/services/navManager';
const {directive, focusLeft, focusRight, focusFirst, focusLast} = createNavManager();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type {NavManagerItemConfig} from '@agnos-ui/core';
import {createNavManager} from '@agnos-ui/core';
import type {NavManagerItemConfig} from '@agnos-ui/svelte/services/navManager';
import {createNavManager} from '@agnos-ui/svelte/services/navManager';
const {directive, focusLeft, focusRight, focusFirst, focusLast} = createNavManager();
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/pagination/Custom.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Pagination} from '@agnos-ui/svelte';
import {Pagination} from '@agnos-ui/svelte/components/pagination';
import CustomPages from './CustomPages.svelte';
function getPageSymbol(displayedPage: number) {
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/pagination/CustomPages.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type {PaginationSlots} from '@agnos-ui/svelte';
import type {PaginationSlots} from '@agnos-ui/svelte/components/pagination';
// cf https://github.com/ota-meshi/eslint-plugin-svelte/issues/348
type $$Props = PaginationSlots['pages']; // eslint-disable-line @typescript-eslint/no-unused-vars
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Pagination} from '@agnos-ui/svelte';
import {Pagination} from '@agnos-ui/svelte/components/pagination';
let page = 4;
let pageAlone = 1;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Pagination} from '@agnos-ui/svelte';
import {Pagination} from '@agnos-ui/svelte/components/pagination';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('pagination');
Expand Down
4 changes: 2 additions & 2 deletions svelte/demo/src/app/samples/pagination/ReuseDefault.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import type {PaginationSlots} from '@agnos-ui/svelte';
import {Slot} from '@agnos-ui/svelte';
import type {PaginationSlots} from '@agnos-ui/svelte/components/pagination';
import {Slot} from '@agnos-ui/svelte/slot';
// cf https://github.com/ota-meshi/eslint-plugin-svelte/issues/348
type $$Props = PaginationSlots['pages']; // eslint-disable-line @typescript-eslint/no-unused-vars
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/progressbar/Coffee.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {type ProgressbarSlots} from '@agnos-ui/svelte';
import {type ProgressbarSlots} from '@agnos-ui/svelte/components/progressbar';
// cf https://github.com/ota-meshi/eslint-plugin-svelte/issues/348
type $$Props = ProgressbarSlots['content']; // eslint-disable-line @typescript-eslint/no-unused-vars
type $$Slots = ProgressbarSlots; // eslint-disable-line @typescript-eslint/no-unused-vars
Expand Down
3 changes: 2 additions & 1 deletion svelte/demo/src/app/samples/progressbar/Default.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import {Progressbar, createWidgetsDefaultConfig} from '@agnos-ui/svelte';
import {Progressbar} from '@agnos-ui/svelte/components/progressbar';
import {createWidgetsDefaultConfig} from '@agnos-ui/svelte/config';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const widgetsConfig$ = createWidgetsDefaultConfig();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Progressbar} from '@agnos-ui/svelte';
import {Progressbar} from '@agnos-ui/svelte/components/progressbar';
import Coffee from './Coffee.svelte';
import {onDestroy} from 'svelte';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Progressbar} from '@agnos-ui/svelte';
import {Progressbar} from '@agnos-ui/svelte/components/progressbar';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('progressbar');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Progressbar} from '@agnos-ui/svelte';
import {Progressbar} from '@agnos-ui/svelte/components/progressbar';
</script>

<div class="d-flex flex-column gap-2">
Expand Down
5 changes: 3 additions & 2 deletions svelte/demo/src/app/samples/rating/Config.route.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import type {RatingProps} from '@agnos-ui/svelte';
import {createWidgetsDefaultConfig, Rating} from '@agnos-ui/svelte';
import type {RatingProps} from '@agnos-ui/svelte/components/rating';
import {Rating} from '@agnos-ui/svelte/components/rating';
import {createWidgetsDefaultConfig} from '@agnos-ui/svelte/config';
import CustomStar from './CustomStar.svelte';
const widgetsConfig$ = createWidgetsDefaultConfig();
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/rating/CustomStar.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import type {StarContext} from '@agnos-ui/svelte';
import type {StarContext} from '@agnos-ui/svelte/components/rating';
type $$Props = StarContext; // eslint-disable-line @typescript-eslint/no-unused-vars
export let fill: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import '@agnos-ui/common/samples/rating/custom.scss';
import {Rating} from '@agnos-ui/svelte';
import {Rating} from '@agnos-ui/svelte/components/rating';
</script>

<Rating className="rating-custom" rating={7} ariaLabel="custom rating">
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/rating/Default.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Rating} from '@agnos-ui/svelte';
import {Rating} from '@agnos-ui/svelte/components/rating';
let rating = 3;
let hovered = 0;
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/rating/Form.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Rating} from '@agnos-ui/svelte';
import {Rating} from '@agnos-ui/svelte/components/rating';
let ctrl = {value: 0, valid: false, invalid: true, disabled: false};
$: {
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/rating/Playground.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Rating} from '@agnos-ui/svelte';
import {Rating} from '@agnos-ui/svelte/components/rating';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('rating');
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/rating/Readonly.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Rating} from '@agnos-ui/svelte';
import {Rating} from '@agnos-ui/svelte/components/rating';
import heartFill from 'bootstrap-icons/icons/heart-fill.svg?raw';
import '@agnos-ui/common/samples/rating/readonly.scss';
</script>
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/select/Custom.route.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import {abortPrevious, debounce} from '@agnos-ui/common/samples/utils/debounce';
import {Select} from '@agnos-ui/svelte';
import {Select} from '@agnos-ui/svelte/components/select';
import '@agnos-ui/common/samples/select/custom.scss';
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/select/Default.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Select} from '@agnos-ui/svelte';
import {Select} from '@agnos-ui/svelte/components/select';
const wordsA = ['apple', 'apricot', 'asparagus', 'astronaut', 'athletic', 'autumn', 'avocado'];
const wordsB = ['banana', 'baseball', 'basketball', 'beautiful', 'bedroom', 'bee', 'bicycle'];
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/select/Playground.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Select} from '@agnos-ui/svelte';
import {Select} from '@agnos-ui/svelte/components/select';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('select');
Expand Down
3 changes: 2 additions & 1 deletion svelte/demo/src/app/samples/select/Select.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import {Select, createWidgetsDefaultConfig} from '@agnos-ui/svelte';
import {Select} from '@agnos-ui/svelte/components/select';
import {createWidgetsDefaultConfig} from '@agnos-ui/svelte/config';
const mainList = ['Action 1', 'Action 2', 'Action 3', 'Other 1', 'Other 2', 'Other 3'];
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/slider/Default.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Slider} from '@agnos-ui/svelte';
import {Slider} from '@agnos-ui/svelte/components/slider';
let sliderControl = [70];
let disabledControl = [60];
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/slider/Playground.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Slider} from '@agnos-ui/svelte';
import {Slider} from '@agnos-ui/svelte/components/slider';
import {hashChangeHook} from '../../utils';
const props$ = hashChangeHook('slider');
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/slider/Range.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Slider} from '@agnos-ui/svelte';
import {Slider} from '@agnos-ui/svelte/components/slider';
let sliderControl = [10, 40, 50, 60, 90];
let sliderValues = [10, 40];
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/samples/slider/Vertical.route.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import {Slider} from '@agnos-ui/svelte';
import {Slider} from '@agnos-ui/svelte/components/slider';
let sliderControl = [10, 40];
let sliderControlRange = [40];
Expand Down
5 changes: 3 additions & 2 deletions svelte/demo/src/app/samples/transition/InnerComponent.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script context="module" lang="ts">
import {writable} from '@amadeus-it-group/tansu';
import type {TransitionFn} from '@agnos-ui/core';
import {collapseHorizontalTransition, collapseVerticalTransition, createTransition, fadeTransition} from '@agnos-ui/core';
import type {TransitionFn} from '@agnos-ui/svelte/services/transitions/baseTransitions';
import {createTransition} from '@agnos-ui/svelte/services/transitions/baseTransitions';
import {collapseHorizontalTransition, collapseVerticalTransition, fadeTransition} from '@agnos-ui/svelte/services/transitions/bootstrap';
const paramTransition$ = writable(collapseVerticalTransition);
const paramAnimation$ = writable(true);
Expand Down
2 changes: 1 addition & 1 deletion svelte/demo/src/app/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {computed} from '@amadeus-it-group/tansu';
import {createWidgetsDefaultConfig} from '@agnos-ui/svelte';
import {createWidgetsDefaultConfig} from '@agnos-ui/svelte/config';
import {hashObject$} from '@agnos-ui/common/utils';
import {getPropValues} from '@agnos-ui/common/propsValues';

Expand Down
3 changes: 2 additions & 1 deletion svelte/demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"extends": "../tsconfig.json"
"extends": "../tsconfig.json",
"include": ["src"]
}
Loading

0 comments on commit f061ebd

Please sign in to comment.