@agnos-ui/core-bootstrap 0.3.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.
Files changed (82) hide show
  1. package/README.md +8 -0
  2. package/accordion-Bgd6SWnD.js +30 -0
  3. package/accordion-jB0Q8V5J.cjs +29 -0
  4. package/alert-B9JCvO-j.cjs +22 -0
  5. package/alert-CegOWFcG.js +23 -0
  6. package/collapse-CVjUhnIz.js +19 -0
  7. package/collapse-sUYbZqEx.cjs +18 -0
  8. package/components/accordion/accordion.d.ts +50 -0
  9. package/components/accordion/index.cjs +14 -0
  10. package/components/accordion/index.d.ts +1 -0
  11. package/components/accordion/index.js +7 -0
  12. package/components/alert/alert.d.ts +36 -0
  13. package/components/alert/index.cjs +13 -0
  14. package/components/alert/index.d.ts +1 -0
  15. package/components/alert/index.js +6 -0
  16. package/components/modal/index.cjs +13 -0
  17. package/components/modal/index.d.ts +1 -0
  18. package/components/modal/index.js +6 -0
  19. package/components/modal/modal.d.ts +48 -0
  20. package/components/pagination/index.cjs +14 -0
  21. package/components/pagination/index.d.ts +2 -0
  22. package/components/pagination/index.js +7 -0
  23. package/components/pagination/pageFactory.d.ts +8 -0
  24. package/components/pagination/pagination.d.ts +95 -0
  25. package/components/progressbar/index.cjs +13 -0
  26. package/components/progressbar/index.d.ts +1 -0
  27. package/components/progressbar/index.js +6 -0
  28. package/components/progressbar/progressbar.d.ts +49 -0
  29. package/components/rating/index.cjs +13 -0
  30. package/components/rating/index.d.ts +1 -0
  31. package/components/rating/index.js +6 -0
  32. package/components/rating/rating.d.ts +26 -0
  33. package/components/select/index.cjs +13 -0
  34. package/components/select/index.d.ts +1 -0
  35. package/components/select/index.js +6 -0
  36. package/components/select/select.d.ts +42 -0
  37. package/components/slider/index.cjs +13 -0
  38. package/components/slider/index.d.ts +1 -0
  39. package/components/slider/index.js +6 -0
  40. package/components/slider/slider.d.ts +41 -0
  41. package/components/toast/index.cjs +13 -0
  42. package/components/toast/index.d.ts +1 -0
  43. package/components/toast/index.js +6 -0
  44. package/components/toast/toast.d.ts +35 -0
  45. package/config.cjs +1 -0
  46. package/config.d.ts +47 -0
  47. package/config.js +1 -0
  48. package/css/agnosui.css +199 -0
  49. package/css/agnosui.css.map +1 -0
  50. package/fade-CJ0jXGio.cjs +9 -0
  51. package/fade-uOobJKgw.js +10 -0
  52. package/index.cjs +108 -0
  53. package/index.d.ts +11 -0
  54. package/index.js +45 -0
  55. package/modal-CJt6Fp1P.cjs +31 -0
  56. package/modal-CXM6wQ-N.js +32 -0
  57. package/package.json +75 -0
  58. package/pageFactory-C8ZmJXYi.js +82 -0
  59. package/pageFactory-Dubi5rdt.cjs +81 -0
  60. package/progressbar-Cb_c2h_2.js +25 -0
  61. package/progressbar-I6Jvhy5T.cjs +24 -0
  62. package/rating-BvtHfl45.cjs +12 -0
  63. package/rating-CNQcp5pm.js +13 -0
  64. package/scss/_select.scss +7 -0
  65. package/scss/_slider.scss +219 -0
  66. package/scss/_toast.scss +3 -0
  67. package/scss/_variables.scss +63 -0
  68. package/scss/agnosui.scss +6 -0
  69. package/select-2BdFlVLo.js +18 -0
  70. package/select-psgTS2xQ.cjs +17 -0
  71. package/services/transitions/collapse.d.ts +3 -0
  72. package/services/transitions/fade.d.ts +2 -0
  73. package/services/transitions/index.cjs +7 -0
  74. package/services/transitions/index.d.ts +2 -0
  75. package/services/transitions/index.js +7 -0
  76. package/slider-DCSKvhja.cjs +14 -0
  77. package/slider-DjrZ5zAy.js +15 -0
  78. package/toast-kK5X1pf9.js +19 -0
  79. package/toast-kMbwghA_.cjs +18 -0
  80. package/types.cjs +1 -0
  81. package/types.d.ts +1 -0
  82. package/types.js +1 -0
package/README.md ADDED
@@ -0,0 +1,8 @@
1
+ # @agnos-ui/core-bootstrap
2
+
3
+ [![npm](https://img.shields.io/npm/v/@agnos-ui/core-bootstrap)](https://www.npmjs.com/package/@agnos-ui/core-bootstrap)
4
+
5
+ This package is made of styles and widget extensions necessary to use AgnosUI with Bootstrap.
6
+ It contains both CSS and SCSS files allowing same customizability as Bootstrap.
7
+
8
+ It is a dependency of `@agnos-ui/angular-bootstrap`, `@agnos-ui/react-bootstrap` and `@agnos-ui/svelte-bootstrap`.
@@ -0,0 +1,30 @@
1
+ import { getAccordionDefaultConfig as getAccordionDefaultConfig$1, createAccordionItem as createAccordionItem$1, factoryCreateAccordion } from "@agnos-ui/core/components/accordion";
2
+ import { c as collapseVerticalTransition } from "./collapse-CVjUhnIz.js";
3
+ import { extendWidgetProps } from "@agnos-ui/core/services/extendWidget";
4
+ const defaultConfigExtraProps = {
5
+ slotItemStructure: void 0,
6
+ slotItemBody: void 0,
7
+ slotItemHeader: void 0
8
+ };
9
+ const defaultPropsWithoutOverride = {
10
+ ...getAccordionDefaultConfig$1(),
11
+ ...defaultConfigExtraProps
12
+ };
13
+ const accordionItemProps = Object.keys(defaultPropsWithoutOverride);
14
+ const createAccordionItem = extendWidgetProps(createAccordionItem$1, defaultConfigExtraProps);
15
+ const coreOverride = {
16
+ itemTransition: collapseVerticalTransition
17
+ };
18
+ function getAccordionDefaultConfig() {
19
+ return { ...defaultPropsWithoutOverride, ...coreOverride };
20
+ }
21
+ const createAccordion = factoryCreateAccordion(
22
+ createAccordionItem,
23
+ accordionItemProps,
24
+ getAccordionDefaultConfig()
25
+ );
26
+ export {
27
+ createAccordion as a,
28
+ createAccordionItem as c,
29
+ getAccordionDefaultConfig as g
30
+ };
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ const accordion = require("@agnos-ui/core/components/accordion");
3
+ const collapse = require("./collapse-sUYbZqEx.cjs");
4
+ const extendWidget = require("@agnos-ui/core/services/extendWidget");
5
+ const defaultConfigExtraProps = {
6
+ slotItemStructure: void 0,
7
+ slotItemBody: void 0,
8
+ slotItemHeader: void 0
9
+ };
10
+ const defaultPropsWithoutOverride = {
11
+ ...accordion.getAccordionDefaultConfig(),
12
+ ...defaultConfigExtraProps
13
+ };
14
+ const accordionItemProps = Object.keys(defaultPropsWithoutOverride);
15
+ const createAccordionItem = extendWidget.extendWidgetProps(accordion.createAccordionItem, defaultConfigExtraProps);
16
+ const coreOverride = {
17
+ itemTransition: collapse.collapseVerticalTransition
18
+ };
19
+ function getAccordionDefaultConfig() {
20
+ return { ...defaultPropsWithoutOverride, ...coreOverride };
21
+ }
22
+ const createAccordion = accordion.factoryCreateAccordion(
23
+ createAccordionItem,
24
+ accordionItemProps,
25
+ getAccordionDefaultConfig()
26
+ );
27
+ exports.createAccordion = createAccordion;
28
+ exports.createAccordionItem = createAccordionItem;
29
+ exports.getAccordionDefaultConfig = getAccordionDefaultConfig;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ const alert = require("@agnos-ui/core/components/alert");
3
+ const writables = require("@agnos-ui/core/utils/writables");
4
+ const extendWidget = require("@agnos-ui/core/services/extendWidget");
5
+ const fade = require("./fade-CJ0jXGio.cjs");
6
+ const defaultConfigExtraProps = {
7
+ slotStructure: void 0,
8
+ slotDefault: void 0,
9
+ type: "primary"
10
+ };
11
+ const coreOverride = {
12
+ transition: fade.fadeTransition
13
+ };
14
+ const configValidator = {
15
+ type: writables.typeString
16
+ };
17
+ function getAlertDefaultConfig() {
18
+ return { ...alert.getAlertDefaultConfig(), ...defaultConfigExtraProps, ...coreOverride };
19
+ }
20
+ const createAlert = extendWidget.extendWidgetProps(alert.createAlert, defaultConfigExtraProps, configValidator, coreOverride);
21
+ exports.createAlert = createAlert;
22
+ exports.getAlertDefaultConfig = getAlertDefaultConfig;
@@ -0,0 +1,23 @@
1
+ import { getAlertDefaultConfig as getAlertDefaultConfig$1, createAlert as createAlert$1 } from "@agnos-ui/core/components/alert";
2
+ import { typeString } from "@agnos-ui/core/utils/writables";
3
+ import { extendWidgetProps } from "@agnos-ui/core/services/extendWidget";
4
+ import { f as fadeTransition } from "./fade-uOobJKgw.js";
5
+ const defaultConfigExtraProps = {
6
+ slotStructure: void 0,
7
+ slotDefault: void 0,
8
+ type: "primary"
9
+ };
10
+ const coreOverride = {
11
+ transition: fadeTransition
12
+ };
13
+ const configValidator = {
14
+ type: typeString
15
+ };
16
+ function getAlertDefaultConfig() {
17
+ return { ...getAlertDefaultConfig$1(), ...defaultConfigExtraProps, ...coreOverride };
18
+ }
19
+ const createAlert = extendWidgetProps(createAlert$1, defaultConfigExtraProps, configValidator, coreOverride);
20
+ export {
21
+ createAlert as c,
22
+ getAlertDefaultConfig as g
23
+ };
@@ -0,0 +1,19 @@
1
+ import { createCollapseTransition } from "@agnos-ui/core/services/transitions/collapse";
2
+ const verticalConfig = {
3
+ dimension: "height",
4
+ hideClasses: ["collapse"],
5
+ showClasses: ["collapse", "show"],
6
+ animationPendingClasses: ["collapsing"]
7
+ };
8
+ const horizontalConfig = {
9
+ dimension: "width",
10
+ hideClasses: ["collapse", "collapse-horizontal"],
11
+ showClasses: ["collapse", "collapse-horizontal", "show"],
12
+ animationPendingClasses: ["collapsing", "collapse-horizontal"]
13
+ };
14
+ const collapseVerticalTransition = createCollapseTransition(verticalConfig);
15
+ const collapseHorizontalTransition = createCollapseTransition(horizontalConfig);
16
+ export {
17
+ collapseHorizontalTransition as a,
18
+ collapseVerticalTransition as c
19
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ const collapse = require("@agnos-ui/core/services/transitions/collapse");
3
+ const verticalConfig = {
4
+ dimension: "height",
5
+ hideClasses: ["collapse"],
6
+ showClasses: ["collapse", "show"],
7
+ animationPendingClasses: ["collapsing"]
8
+ };
9
+ const horizontalConfig = {
10
+ dimension: "width",
11
+ hideClasses: ["collapse", "collapse-horizontal"],
12
+ showClasses: ["collapse", "collapse-horizontal", "show"],
13
+ animationPendingClasses: ["collapsing", "collapse-horizontal"]
14
+ };
15
+ const collapseVerticalTransition = collapse.createCollapseTransition(verticalConfig);
16
+ const collapseHorizontalTransition = collapse.createCollapseTransition(horizontalConfig);
17
+ exports.collapseHorizontalTransition = collapseHorizontalTransition;
18
+ exports.collapseVerticalTransition = collapseVerticalTransition;
@@ -0,0 +1,50 @@
1
+ import type { AccordionApi, AccordionDirectives, AccordionItemActions, AccordionItemApi, AccordionProps as CoreProps, AccordionState as CoreState, AccordionItemState as CoreItemState, AccordionItemProps as CoreItemProps, AccordionItemDirectives } from '@agnos-ui/core/components/accordion';
2
+ import type { ExtendWidgetAdaptSlotWidgetProps } from '@agnos-ui/core/services/extendWidget';
3
+ import type { SlotContent, Widget, WidgetFactory, WidgetSlotContext } from '@agnos-ui/core/types';
4
+ export * from '@agnos-ui/core/components/accordion';
5
+ export type AccordionItemContext = WidgetSlotContext<AccordionItemWidget>;
6
+ interface AccordionExtraProps {
7
+ /**
8
+ * Structure of the accordion-item. The default item structure is: accordion-item
9
+ * contains accordion header and accordion-item body container; the accordion header contains the accordion button
10
+ * (that contains `slotItemHeader`), while the accordion-item body container contains the accordion body (that contains `slotItemBody`).
11
+ * The itemTransition it applied on this element.
12
+ *
13
+ * It is a prop of the accordion-item.
14
+ */
15
+ slotItemStructure: SlotContent<AccordionItemContext>;
16
+ /**
17
+ * Content present in the accordion body.
18
+ *
19
+ * It is a prop of the accordion-item.
20
+ */
21
+ slotItemBody: SlotContent<AccordionItemContext>;
22
+ /**
23
+ * Content present in the accordion button inside the accordion header.
24
+ *
25
+ * It is a prop of the accordion-item.
26
+ */
27
+ slotItemHeader: SlotContent<AccordionItemContext>;
28
+ }
29
+ export interface AccordionState extends ExtendWidgetAdaptSlotWidgetProps<CoreState, AccordionExtraProps, object> {
30
+ }
31
+ export interface AccordionProps extends ExtendWidgetAdaptSlotWidgetProps<CoreProps, AccordionExtraProps, object> {
32
+ }
33
+ export type AccordionWidget = Widget<AccordionProps, AccordionState, AccordionApi, object, AccordionDirectives>;
34
+ export interface AccordionItemState extends ExtendWidgetAdaptSlotWidgetProps<CoreItemState, AccordionExtraProps, object> {
35
+ }
36
+ export interface AccordionItemProps extends ExtendWidgetAdaptSlotWidgetProps<CoreItemProps, AccordionExtraProps, object> {
37
+ }
38
+ export type AccordionItemWidget = Widget<AccordionItemProps, AccordionItemState, AccordionItemApi, AccordionItemActions, AccordionItemDirectives>;
39
+ /**
40
+ * Create an AccordioItemnWidget with given config props
41
+ * @param config - an optional alert config
42
+ * @returns an AccordionWidget
43
+ */
44
+ export declare const createAccordionItem: WidgetFactory<import("@agnos-ui/core/services/extendWidget").ExtendWidgetProps<import("@agnos-ui/core/components/accordion").AccordionItemWidget, AccordionExtraProps, object>>;
45
+ /**
46
+ * Retrieve a shallow copy of the default accordion config
47
+ * @returns the default accordion config
48
+ */
49
+ export declare function getAccordionDefaultConfig(): AccordionProps;
50
+ export declare const createAccordion: WidgetFactory<AccordionWidget>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const accordion = require("../../accordion-jB0Q8V5J.cjs");
4
+ const accordion$1 = require("@agnos-ui/core/components/accordion");
5
+ exports.createAccordion = accordion.createAccordion;
6
+ exports.createAccordionItem = accordion.createAccordionItem;
7
+ exports.getAccordionDefaultConfig = accordion.getAccordionDefaultConfig;
8
+ Object.keys(accordion$1).forEach((k) => {
9
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
10
+ Object.defineProperty(exports, k, {
11
+ enumerable: true,
12
+ get: () => accordion$1[k]
13
+ });
14
+ });
@@ -0,0 +1 @@
1
+ export * from './accordion';
@@ -0,0 +1,7 @@
1
+ import { a, c, g } from "../../accordion-Bgd6SWnD.js";
2
+ export * from "@agnos-ui/core/components/accordion";
3
+ export {
4
+ a as createAccordion,
5
+ c as createAccordionItem,
6
+ g as getAccordionDefaultConfig
7
+ };
@@ -0,0 +1,36 @@
1
+ import type { AlertDirectives, AlertState as CoreState, AlertProps as CoreProps, AlertApi } from '@agnos-ui/core/components/alert';
2
+ import type { SlotContent, Widget, WidgetFactory, WidgetSlotContext } from '@agnos-ui/core/types';
3
+ import type { ExtendWidgetAdaptSlotWidgetProps } from '@agnos-ui/core/services/extendWidget';
4
+ import type { BSContextualClass } from '../../types';
5
+ export * from '@agnos-ui/core/components/alert';
6
+ export type AlertContext = WidgetSlotContext<AlertWidget>;
7
+ interface AlertExtraProps {
8
+ /**
9
+ * Global template for the alert component
10
+ */
11
+ slotStructure: SlotContent<AlertContext>;
12
+ /**
13
+ * Template for the alert content
14
+ */
15
+ slotDefault: SlotContent<AlertContext>;
16
+ /**
17
+ * Type of the alert, following bootstrap types.
18
+ */
19
+ type: BSContextualClass;
20
+ }
21
+ export interface AlertState extends ExtendWidgetAdaptSlotWidgetProps<CoreState, AlertExtraProps, object> {
22
+ }
23
+ export interface AlertProps extends ExtendWidgetAdaptSlotWidgetProps<CoreProps, AlertExtraProps, object> {
24
+ }
25
+ export type AlertWidget = Widget<AlertProps, AlertState, AlertApi, object, AlertDirectives>;
26
+ /**
27
+ * Retrieve a shallow copy of the default Alert config
28
+ * @returns the default Alert config
29
+ */
30
+ export declare function getAlertDefaultConfig(): AlertProps;
31
+ /**
32
+ * Create an AlertWidget with given config props
33
+ * @param config - an optional alert config
34
+ * @returns an AlertWidget
35
+ */
36
+ export declare const createAlert: WidgetFactory<AlertWidget>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const alert = require("../../alert-B9JCvO-j.cjs");
4
+ const alert$1 = require("@agnos-ui/core/components/alert");
5
+ exports.createAlert = alert.createAlert;
6
+ exports.getAlertDefaultConfig = alert.getAlertDefaultConfig;
7
+ Object.keys(alert$1).forEach((k) => {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
9
+ Object.defineProperty(exports, k, {
10
+ enumerable: true,
11
+ get: () => alert$1[k]
12
+ });
13
+ });
@@ -0,0 +1 @@
1
+ export * from './alert';
@@ -0,0 +1,6 @@
1
+ import { c, g } from "../../alert-CegOWFcG.js";
2
+ export * from "@agnos-ui/core/components/alert";
3
+ export {
4
+ c as createAlert,
5
+ g as getAlertDefaultConfig
6
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const modal = require("../../modal-CJt6Fp1P.cjs");
4
+ const modal$1 = require("@agnos-ui/core/components/modal");
5
+ exports.createModal = modal.createModal;
6
+ exports.getModalDefaultConfig = modal.getModalDefaultConfig;
7
+ Object.keys(modal$1).forEach((k) => {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
9
+ Object.defineProperty(exports, k, {
10
+ enumerable: true,
11
+ get: () => modal$1[k]
12
+ });
13
+ });
@@ -0,0 +1 @@
1
+ export * from './modal';
@@ -0,0 +1,6 @@
1
+ import { c, g } from "../../modal-CXM6wQ-N.js";
2
+ export * from "@agnos-ui/core/components/modal";
3
+ export {
4
+ c as createModal,
5
+ g as getModalDefaultConfig
6
+ };
@@ -0,0 +1,48 @@
1
+ import type { ModalProps as CoreProps, ModalState as CoreState, ModalActions, ModalApi, ModalDirectives } from '@agnos-ui/core/components/modal';
2
+ import type { PropsConfig, SlotContent, Widget, WidgetSlotContext } from '@agnos-ui/core/types';
3
+ import type { ExtendWidgetAdaptSlotWidgetProps } from '@agnos-ui/core/services/extendWidget';
4
+ export * from '@agnos-ui/core/components/modal';
5
+ export type ModalContext<Data> = WidgetSlotContext<ModalWidget<Data>>;
6
+ interface ModalExtraProps<Data> {
7
+ /**
8
+ * Body of the modal.
9
+ */
10
+ slotDefault: SlotContent<ModalContext<Data>>;
11
+ /**
12
+ * Footer of the modal.
13
+ */
14
+ slotFooter: SlotContent<ModalContext<Data>>;
15
+ /**
16
+ * Header of the modal. The default header includes {@link ModalCommonPropsAndState.slotTitle|slotTitle}.
17
+ */
18
+ slotHeader: SlotContent<ModalContext<Data>>;
19
+ /**
20
+ * Structure of the modal.
21
+ * The default structure uses {@link ModalCommonPropsAndState.slotHeader|slotHeader}, {@link ModalCommonPropsAndState.slotDefault|slotDefault} and {@link ModalCommonPropsAndState.slotFooter|slotFooter}.
22
+ */
23
+ slotStructure: SlotContent<ModalContext<Data>>;
24
+ /**
25
+ * Title of the modal.
26
+ */
27
+ slotTitle: SlotContent<ModalContext<Data>>;
28
+ /**
29
+ * Option to create a fullscreen modal, according to the bootstrap documentation.
30
+ */
31
+ fullscreen: boolean;
32
+ }
33
+ export interface ModalState<Data> extends ExtendWidgetAdaptSlotWidgetProps<CoreState<Data>, ModalExtraProps<Data>, object> {
34
+ }
35
+ export interface ModalProps<Data> extends ExtendWidgetAdaptSlotWidgetProps<CoreProps<Data>, ModalExtraProps<Data>, object> {
36
+ }
37
+ export type ModalWidget<Data> = Widget<ModalProps<Data>, ModalState<Data>, ModalApi<Data>, ModalActions, ModalDirectives>;
38
+ /**
39
+ * Retrieve a shallow copy of the default modal config
40
+ * @returns the default modal config
41
+ */
42
+ export declare function getModalDefaultConfig(): ModalProps<any>;
43
+ /**
44
+ * Creates a new modal widget instance.
45
+ * @param config - config of the modal, either as a store or as an object containing values or stores.
46
+ * @returns a new modal widget instance
47
+ */
48
+ export declare const createModal: <Data>(config?: PropsConfig<ModalProps<Data>>) => ModalWidget<Data>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const pageFactory = require("../../pageFactory-Dubi5rdt.cjs");
4
+ const pagination = require("@agnos-ui/core/components/pagination");
5
+ exports.createPagination = pageFactory.createPagination;
6
+ exports.getPaginationDefaultConfig = pageFactory.getPaginationDefaultConfig;
7
+ exports.ngBootstrapPagination = pageFactory.ngBootstrapPagination;
8
+ Object.keys(pagination).forEach((k) => {
9
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
10
+ Object.defineProperty(exports, k, {
11
+ enumerable: true,
12
+ get: () => pagination[k]
13
+ });
14
+ });
@@ -0,0 +1,2 @@
1
+ export * from './pagination';
2
+ export * from './pageFactory';
@@ -0,0 +1,7 @@
1
+ import { c, g, n } from "../../pageFactory-C8ZmJXYi.js";
2
+ export * from "@agnos-ui/core/components/pagination";
3
+ export {
4
+ c as createPagination,
5
+ g as getPaginationDefaultConfig,
6
+ n as ngBootstrapPagination
7
+ };
@@ -0,0 +1,8 @@
1
+ /**
2
+ * This is the pagination algorithm used by ng-bootstrap. While this is not the default implementation of our widget, we export it to ease the migration from ng-bootstrap pagination.
3
+ * @param maxSize - the max size
4
+ * @param rotate - rotate the pages
5
+ * @param ellipses - enable ellipses
6
+ * @returns the pages
7
+ */
8
+ export declare function ngBootstrapPagination(maxSize: number, rotate: boolean, ellipses: boolean): (page: number, pageCount: number) => number[];
@@ -0,0 +1,95 @@
1
+ import { type ExtendWidgetAdaptSlotWidgetProps } from '@agnos-ui/core/services/extendWidget';
2
+ import type { SlotContent, Widget, WidgetFactory, WidgetSlotContext } from '@agnos-ui/core/types';
3
+ import type { PaginationActions, PaginationApi, PaginationDirectives, PaginationProps as CoreProps, PaginationState as CoreState } from '@agnos-ui/core/components/pagination';
4
+ export * from '@agnos-ui/core/components/pagination';
5
+ /**
6
+ * A type for the slot context of the pagination widget
7
+ */
8
+ export type PaginationContext = WidgetSlotContext<PaginationWidget>;
9
+ /**
10
+ * A type for the slot context of the pagination widget when the slot is the number label
11
+ */
12
+ export interface PaginationNumberContext extends PaginationContext {
13
+ /**
14
+ * Displayed page
15
+ */
16
+ displayedPage: number;
17
+ }
18
+ interface PaginationExtraProps {
19
+ /**
20
+ * The template to use for the structure of the pagination component
21
+ * The default structure uses {@link PaginationCommonPropsAndState.slotEllipsis|slotEllipsis}, {@link PaginationCommonPropsAndState.slotFirst|slotFirst},
22
+ * {@link PaginationCommonPropsAndState.slotPrevious|slotPrevious}, {@link PaginationCommonPropsAndState.slotNext|slotNext},
23
+ * {@link PaginationCommonPropsAndState.slotLast|slotLast}, {@link PaginationCommonPropsAndState.slotPages|slotPages},
24
+ * {@link PaginationCommonPropsAndState.slotNumberLabel|slotNumberLabel},
25
+ */
26
+ slotStructure: SlotContent<PaginationContext>;
27
+ /**
28
+ * The template to use for the ellipsis slot
29
+ * for I18n, we suggest to use the global configuration
30
+ * override any configuration parameters provided for this
31
+ * @defaultValue '…'
32
+ */
33
+ slotEllipsis: SlotContent<PaginationContext>;
34
+ /**
35
+ * The template to use for the first slot
36
+ * for I18n, we suggest to use the global configuration
37
+ * override any configuration parameters provided for this
38
+ * @defaultValue '«'
39
+ */
40
+ slotFirst: SlotContent<PaginationContext>;
41
+ /**
42
+ * The template to use for the previous slot
43
+ * for I18n, we suggest to use the global configuration
44
+ * override any configuration parameters provided for this
45
+ * @defaultValue '‹'
46
+ */
47
+ slotPrevious: SlotContent<PaginationContext>;
48
+ /**
49
+ * The template to use for the next slot
50
+ * for I18n, we suggest to use the global configuration
51
+ * override any configuration parameters provided for this
52
+ * @defaultValue '›'
53
+ */
54
+ slotNext: SlotContent<PaginationContext>;
55
+ /**
56
+ * The template to use for the last slot
57
+ * for I18n, we suggest to use the global configuration
58
+ * override any configuration parameters provided for this
59
+ * @defaultValue '»'
60
+ */
61
+ slotLast: SlotContent<PaginationContext>;
62
+ /**
63
+ * The template to use for the pages slot
64
+ * To use to customize the pages view
65
+ * override any configuration parameters provided for this
66
+ */
67
+ slotPages: SlotContent<PaginationContext>;
68
+ /**
69
+ * The template to use for the number slot
70
+ * override any configuration parameters provided for this
71
+ * for I18n, we suggest to use the global configuration
72
+ * @defaultValue
73
+ * ```ts
74
+ * ({displayedPage}) => `${displayedPage}`
75
+ * ```
76
+ * @param displayedPage - The current page number
77
+ */
78
+ slotNumberLabel: SlotContent<PaginationNumberContext>;
79
+ }
80
+ export interface PaginationState extends ExtendWidgetAdaptSlotWidgetProps<CoreState, PaginationExtraProps, object> {
81
+ }
82
+ export interface PaginationProps extends ExtendWidgetAdaptSlotWidgetProps<CoreProps, PaginationExtraProps, object> {
83
+ }
84
+ export type PaginationWidget = Widget<PaginationProps, PaginationState, PaginationApi, PaginationActions, PaginationDirectives>;
85
+ /**
86
+ * Retrieve a shallow copy of the default Pagination config
87
+ * @returns the default Pagination config
88
+ */
89
+ export declare function getPaginationDefaultConfig(): PaginationProps;
90
+ /**
91
+ * Create a PaginationWidget with given config props
92
+ * @param config - an optional alert config
93
+ * @returns a PaginationWidget
94
+ */
95
+ export declare const createPagination: WidgetFactory<PaginationWidget>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const progressbar = require("../../progressbar-I6Jvhy5T.cjs");
4
+ const progressbar$1 = require("@agnos-ui/core/components/progressbar");
5
+ exports.createProgressbar = progressbar.createProgressbar;
6
+ exports.getProgressbarDefaultConfig = progressbar.getProgressbarDefaultConfig;
7
+ Object.keys(progressbar$1).forEach((k) => {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
9
+ Object.defineProperty(exports, k, {
10
+ enumerable: true,
11
+ get: () => progressbar$1[k]
12
+ });
13
+ });
@@ -0,0 +1 @@
1
+ export * from './progressbar';
@@ -0,0 +1,6 @@
1
+ import { c, g } from "../../progressbar-Cb_c2h_2.js";
2
+ export * from "@agnos-ui/core/components/progressbar";
3
+ export {
4
+ c as createProgressbar,
5
+ g as getProgressbarDefaultConfig
6
+ };
@@ -0,0 +1,49 @@
1
+ import type { ProgressbarDirectives, ProgressbarState as CoreState, ProgressbarProps as CoreProps, ProgressbarApi } from '@agnos-ui/core/components/progressbar';
2
+ import type { SlotContent, Widget, WidgetFactory, WidgetSlotContext } from '@agnos-ui/core/types';
3
+ import type { ExtendWidgetAdaptSlotWidgetProps } from '@agnos-ui/core/services/extendWidget';
4
+ import type { BSContextualClass } from '../../types';
5
+ export * from '@agnos-ui/core/components/progressbar';
6
+ export type ProgressbarContext = WidgetSlotContext<ProgressbarWidget>;
7
+ interface ProgressbarExtraProps {
8
+ /**
9
+ * Global template for the Progressbar.
10
+ */
11
+ slotStructure: SlotContent<ProgressbarContext>;
12
+ /**
13
+ * Label of the progress.
14
+ */
15
+ slotDefault: SlotContent<ProgressbarContext>;
16
+ /**
17
+ * Height of the progressbar, can be any valid css height value.
18
+ */
19
+ height: string;
20
+ /**
21
+ * If `true`, shows a striped progressbar.
22
+ */
23
+ striped: boolean;
24
+ /**
25
+ * If `true`, animates a striped progressbar.
26
+ * Takes effect only for browsers supporting CSS3 animations, and if `striped` is `true`.
27
+ */
28
+ animated: boolean;
29
+ /**
30
+ * Type of the progressbar, following bootstrap types.
31
+ */
32
+ type: BSContextualClass | undefined;
33
+ }
34
+ export interface ProgressbarState extends ExtendWidgetAdaptSlotWidgetProps<CoreState, ProgressbarExtraProps, object> {
35
+ }
36
+ export interface ProgressbarProps extends ExtendWidgetAdaptSlotWidgetProps<CoreProps, ProgressbarExtraProps, object> {
37
+ }
38
+ export type ProgressbarWidget = Widget<ProgressbarProps, ProgressbarState, ProgressbarApi, object, ProgressbarDirectives>;
39
+ /**
40
+ * Retrieve a shallow copy of the default Progressbar config
41
+ * @returns the default Progressbar config
42
+ */
43
+ export declare function getProgressbarDefaultConfig(): ProgressbarProps;
44
+ /**
45
+ * Create a Progressbar with given config props
46
+ * @param config - an optional progressbar config
47
+ * @returns a ProgressbarWidget
48
+ */
49
+ export declare const createProgressbar: WidgetFactory<ProgressbarWidget>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const rating = require("../../rating-BvtHfl45.cjs");
4
+ const rating$1 = require("@agnos-ui/core/components/rating");
5
+ exports.createRating = rating.createRating;
6
+ exports.getRatingDefaultConfig = rating.getRatingDefaultConfig;
7
+ Object.keys(rating$1).forEach((k) => {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
9
+ Object.defineProperty(exports, k, {
10
+ enumerable: true,
11
+ get: () => rating$1[k]
12
+ });
13
+ });
@@ -0,0 +1 @@
1
+ export * from './rating';
@@ -0,0 +1,6 @@
1
+ import { c, g } from "../../rating-CNQcp5pm.js";
2
+ export * from "@agnos-ui/core/components/rating";
3
+ export {
4
+ c as createRating,
5
+ g as getRatingDefaultConfig
6
+ };
@@ -0,0 +1,26 @@
1
+ import type { RatingActions, RatingDirectives, StarContext, RatingState as CoreState, RatingProps as CoreProps } from '@agnos-ui/core/components/rating';
2
+ import { type ExtendWidgetAdaptSlotWidgetProps } from '@agnos-ui/core/services/extendWidget';
3
+ import type { SlotContent, Widget, WidgetFactory } from '@agnos-ui/core/types';
4
+ export * from '@agnos-ui/core/components/rating';
5
+ interface RatingExtraProps {
6
+ /**
7
+ * The template to override the way each star is displayed.
8
+ */
9
+ slotStar: SlotContent<StarContext>;
10
+ }
11
+ export interface RatingState extends ExtendWidgetAdaptSlotWidgetProps<CoreState, RatingExtraProps, object> {
12
+ }
13
+ export interface RatingProps extends ExtendWidgetAdaptSlotWidgetProps<CoreProps, RatingExtraProps, object> {
14
+ }
15
+ export type RatingWidget = Widget<RatingProps, RatingState, object, RatingActions, RatingDirectives>;
16
+ /**
17
+ * Retrieve a shallow copy of the default Rating config
18
+ * @returns the default Rating config
19
+ */
20
+ export declare function getRatingDefaultConfig(): RatingProps;
21
+ /**
22
+ * Create a Progressbar with given config props
23
+ * @param config - an optional progressbar config
24
+ * @returns a ProgressbarWidget
25
+ */
26
+ export declare const createRating: WidgetFactory<RatingWidget>;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const select = require("../../select-psgTS2xQ.cjs");
4
+ const select$1 = require("@agnos-ui/core/components/select");
5
+ exports.createSelect = select.createSelect;
6
+ exports.getSelectDefaultConfig = select.getSelectDefaultConfig;
7
+ Object.keys(select$1).forEach((k) => {
8
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
9
+ Object.defineProperty(exports, k, {
10
+ enumerable: true,
11
+ get: () => select$1[k]
12
+ });
13
+ });