native-document 1.0.14 → 1.0.16-8.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/.npmrc.example +1 -0
- package/.vitepress/config.js +166 -0
- package/CHANGELOG.md +153 -0
- package/cdn.js +19 -0
- package/components.d.ts +2 -0
- package/components.js +30 -0
- package/devtools/ComponentRegistry.js +113 -0
- package/devtools/index.js +8 -0
- package/devtools/plugin/dev-tools-plugin.js +15 -0
- package/devtools/transformers/nd-vite-devtools.js +55 -0
- package/devtools/transformers/src/transformComponentForHrm.js +73 -0
- package/devtools/transformers/src/transformJsFile.js +9 -0
- package/devtools/transformers/src/utils.js +79 -0
- package/devtools/transformers/templates/hrm.hook.template.js +46 -0
- package/devtools/transformers/templates/hrm.orbservable.hook.template.js +76 -0
- package/devtools/widget/Widget.js +49 -0
- package/devtools/widget/widget.css +81 -0
- package/devtools/widget.js +23 -0
- package/dist/native-document.components.min.css +1 -0
- package/dist/native-document.components.min.js +23847 -0
- package/dist/native-document.dev.js +8665 -1313
- package/dist/native-document.dev.js.map +1 -0
- package/dist/native-document.devtools.min.js +1 -0
- package/dist/native-document.min.js +1 -1
- package/docs/advanced-components.md +419 -0
- package/docs/anchor.md +218 -131
- package/docs/cache.md +180 -0
- package/docs/cli.md +179 -0
- package/docs/components/accordion.md +172 -0
- package/docs/components/alert.md +99 -0
- package/docs/components/avatar.md +160 -0
- package/docs/components/badge.md +102 -0
- package/docs/components/breadcrumb.md +89 -0
- package/docs/components/button.md +183 -0
- package/docs/components/card.md +69 -0
- package/docs/components/context-menu.md +118 -0
- package/docs/components/data-table.md +345 -0
- package/docs/components/dropdown.md +214 -0
- package/docs/components/form/autocomplete-field.md +81 -0
- package/docs/components/form/checkbox-field.md +41 -0
- package/docs/components/form/checkbox-group-field.md +54 -0
- package/docs/components/form/color-field.md +64 -0
- package/docs/components/form/date-field.md +92 -0
- package/docs/components/form/field-collection.md +63 -0
- package/docs/components/form/file-field.md +203 -0
- package/docs/components/form/form-control.md +87 -0
- package/docs/components/form/image-field.md +90 -0
- package/docs/components/form/index.md +115 -0
- package/docs/components/form/number-field.md +65 -0
- package/docs/components/form/radio-field.md +51 -0
- package/docs/components/form/select-field.md +123 -0
- package/docs/components/form/slider.md +136 -0
- package/docs/components/form/string-field.md +134 -0
- package/docs/components/form/textarea-field.md +65 -0
- package/docs/components/form-fields.md +372 -0
- package/docs/components/getting-started.md +264 -0
- package/docs/components/index.md +337 -0
- package/docs/components/layout.md +279 -0
- package/docs/components/list.md +73 -0
- package/docs/components/menu.md +215 -0
- package/docs/components/modal.md +156 -0
- package/docs/components/pagination.md +95 -0
- package/docs/components/popover.md +131 -0
- package/docs/components/progress.md +111 -0
- package/docs/components/shortcut-manager.md +221 -0
- package/docs/components/simple-table.md +107 -0
- package/docs/components/skeleton.md +155 -0
- package/docs/components/spinner.md +100 -0
- package/docs/components/splitter.md +133 -0
- package/docs/components/stepper.md +163 -0
- package/docs/components/switch.md +113 -0
- package/docs/components/tabs.md +153 -0
- package/docs/components/toast.md +119 -0
- package/docs/components/tooltip.md +151 -0
- package/docs/components/traits.md +261 -0
- package/docs/conditional-rendering.md +177 -501
- package/docs/contributing.md +300 -25
- package/docs/core-concepts.md +209 -367
- package/docs/elements.md +268 -255
- package/docs/extending-native-document-element.md +259 -0
- package/docs/filters.md +247 -0
- package/docs/getting-started.md +199 -260
- package/docs/i18n.md +241 -0
- package/docs/index.md +76 -0
- package/docs/lifecycle-events.md +146 -67
- package/docs/list-rendering.md +387 -0
- package/docs/memory-management.md +135 -46
- package/docs/native-document-element.md +487 -0
- package/docs/native-fetch.md +213 -0
- package/docs/observable-resource.md +364 -0
- package/docs/observables.md +690 -356
- package/docs/routing.md +246 -646
- package/docs/state-management.md +213 -306
- package/docs/svg-elements.md +231 -0
- package/docs/theming.md +409 -0
- package/docs/tutorials/.gitkeep +0 -0
- package/docs/validation.md +98 -93
- package/docs/vitepress-conventions.md +219 -0
- package/elements.d.ts +7 -0
- package/elements.js +3 -4
- package/eslint.config.js +35 -0
- package/i18n.js +1 -0
- package/i18n.ts +2 -0
- package/index.d.ts +21 -0
- package/index.def.js +1086 -0
- package/index.js +19 -8
- package/package.json +59 -9
- package/readme.md +294 -90
- package/rollup.config.js +52 -3
- package/router.d.ts +7 -0
- package/router.js +0 -0
- package/src/components/$traits/has-draggable/HasDraggable.d.ts +4 -0
- package/src/components/$traits/has-draggable/HasDraggable.js +82 -0
- package/src/components/$traits/has-draggable/has-draggable.css +8 -0
- package/src/components/$traits/has-items/HasItems.d.ts +9 -0
- package/src/components/$traits/has-items/HasItems.js +64 -0
- package/src/components/$traits/has-position/HasFullPosition.d.ts +14 -0
- package/src/components/$traits/has-position/HasFullPosition.js +95 -0
- package/src/components/$traits/has-position/HasPosition.d.ts +7 -0
- package/src/components/$traits/has-position/HasPosition.js +45 -0
- package/src/components/$traits/has-resizable/HasResizable.d.ts +13 -0
- package/src/components/$traits/has-resizable/HasResizable.js +122 -0
- package/src/components/$traits/has-resizable/has-resizable.css +121 -0
- package/src/components/$traits/has-validation/HasValidation.d.ts +17 -0
- package/src/components/$traits/has-validation/HasValidation.js +133 -0
- package/src/components/BaseComponent.d.ts +32 -0
- package/src/components/BaseComponent.js +247 -0
- package/src/components/accordion/Accordion.js +268 -0
- package/src/components/accordion/AccordionItem.js +233 -0
- package/src/components/accordion/index.js +7 -0
- package/src/components/accordion/types/Accordion.d.ts +47 -0
- package/src/components/accordion/types/AccordionItem.d.ts +48 -0
- package/src/components/alert/Alert.js +350 -0
- package/src/components/alert/index.js +6 -0
- package/src/components/alert/types/Alert.d.ts +62 -0
- package/src/components/avatar/Avatar.js +430 -0
- package/src/components/avatar/AvatarGroup.js +97 -0
- package/src/components/avatar/index.js +7 -0
- package/src/components/avatar/types/Avatar.d.ts +74 -0
- package/src/components/avatar/types/AvatarGroup.d.ts +32 -0
- package/src/components/badge/Badge.js +245 -0
- package/src/components/badge/index.js +6 -0
- package/src/components/badge/types/Badge.d.ts +51 -0
- package/src/components/base-component.css +0 -0
- package/src/components/breadcrumb/BreadCrumb.js +138 -0
- package/src/components/breadcrumb/index.js +5 -0
- package/src/components/breadcrumb/types/BreadCrumb.d.ts +42 -0
- package/src/components/button/Button.js +320 -0
- package/src/components/button/index.js +5 -0
- package/src/components/button/types/Button.d.ts +62 -0
- package/src/components/card/Card.js +282 -0
- package/src/components/card/index.js +5 -0
- package/src/components/card/types/Card.d.ts +42 -0
- package/src/components/context-menu/ContextMenu.js +127 -0
- package/src/components/context-menu/ContextMenuGroup.js +29 -0
- package/src/components/context-menu/ContextMenuItem.js +28 -0
- package/src/components/context-menu/index.js +10 -0
- package/src/components/context-menu/types/ContextMenu.d.ts +30 -0
- package/src/components/context-menu/types/ContextMenuGroup.d.ts +18 -0
- package/src/components/context-menu/types/ContextMenuItem.d.ts +18 -0
- package/src/components/divider/Divider.js +256 -0
- package/src/components/divider/index.js +6 -0
- package/src/components/divider/types/Divider.d.ts +55 -0
- package/src/components/dropdown/Dropdown.js +531 -0
- package/src/components/dropdown/DropdownDivider.js +45 -0
- package/src/components/dropdown/DropdownGroup.js +83 -0
- package/src/components/dropdown/DropdownItem.js +150 -0
- package/src/components/dropdown/DropdownTrigger.js +93 -0
- package/src/components/dropdown/helpers.js +53 -0
- package/src/components/dropdown/index.js +13 -0
- package/src/components/dropdown/types/Dropdown.d.ts +88 -0
- package/src/components/dropdown/types/DropdownDivider.d.ts +20 -0
- package/src/components/dropdown/types/DropdownGroup.d.ts +25 -0
- package/src/components/dropdown/types/DropdownItem.d.ts +41 -0
- package/src/components/dropdown/types/DropdownTrigger.d.ts +32 -0
- package/src/components/form/FormControl.js +498 -0
- package/src/components/form/field/Field.js +419 -0
- package/src/components/form/field/FieldCollection.js +292 -0
- package/src/components/form/field/types/AutocompleteField.js +168 -0
- package/src/components/form/field/types/CheckboxField.js +77 -0
- package/src/components/form/field/types/CheckboxGroupField.js +171 -0
- package/src/components/form/field/types/ColorField.js +102 -0
- package/src/components/form/field/types/DateField.js +315 -0
- package/src/components/form/field/types/EmailField.js +104 -0
- package/src/components/form/field/types/FileField.js +276 -0
- package/src/components/form/field/types/HiddenField.js +44 -0
- package/src/components/form/field/types/ImageField.js +138 -0
- package/src/components/form/field/types/NumberField.js +177 -0
- package/src/components/form/field/types/PasswordField.js +200 -0
- package/src/components/form/field/types/RadioField.js +145 -0
- package/src/components/form/field/types/RangeField.js +117 -0
- package/src/components/form/field/types/SearchField.js +66 -0
- package/src/components/form/field/types/SelectField.js +247 -0
- package/src/components/form/field/types/StringField.js +148 -0
- package/src/components/form/field/types/TelField.js +98 -0
- package/src/components/form/field/types/TextAreaField.js +142 -0
- package/src/components/form/field/types/TimeField.js +215 -0
- package/src/components/form/field/types/UrlField.js +115 -0
- package/src/components/form/field/types/file-field-mode/FileAvatarMode.js +183 -0
- package/src/components/form/field/types/file-field-mode/FileDropzoneMode.js +117 -0
- package/src/components/form/field/types/file-field-mode/FileItemPreview.js +150 -0
- package/src/components/form/field/types/file-field-mode/FileNativeMode.js +43 -0
- package/src/components/form/field/types/file-field-mode/FileUploadButtonMode.js +120 -0
- package/src/components/form/field/types/file-field-mode/FileWallMode.js +106 -0
- package/src/components/form/index.js +61 -0
- package/src/components/form/merge +0 -0
- package/src/components/form/types/Field.d.ts +73 -0
- package/src/components/form/types/FieldCollection.d.ts +53 -0
- package/src/components/form/types/FormControl.d.ts +64 -0
- package/src/components/form/types/fields/AutocompleteField.d.ts +48 -0
- package/src/components/form/types/fields/CheckboxField.d.ts +33 -0
- package/src/components/form/types/fields/CheckboxGroupField.d.ts +49 -0
- package/src/components/form/types/fields/ColorField.d.ts +37 -0
- package/src/components/form/types/fields/DateField.d.ts +70 -0
- package/src/components/form/types/fields/EmailField.d.ts +35 -0
- package/src/components/form/types/fields/FileAvatarMode.d.ts +46 -0
- package/src/components/form/types/fields/FileDropzoneMode.d.ts +28 -0
- package/src/components/form/types/fields/FileField.d.ts +56 -0
- package/src/components/form/types/fields/FileItemPreview.d.ts +35 -0
- package/src/components/form/types/fields/FileNativeMode.d.ts +21 -0
- package/src/components/form/types/fields/FileUploadButtonMode.d.ts +34 -0
- package/src/components/form/types/fields/FileWallMode.d.ts +32 -0
- package/src/components/form/types/fields/HiddenField.d.ts +26 -0
- package/src/components/form/types/fields/ImageField.d.ts +45 -0
- package/src/components/form/types/fields/NumberField.d.ts +48 -0
- package/src/components/form/types/fields/PasswordField.d.ts +46 -0
- package/src/components/form/types/fields/RadioField.d.ts +48 -0
- package/src/components/form/types/fields/RangeField.d.ts +44 -0
- package/src/components/form/types/fields/SearchField.d.ts +34 -0
- package/src/components/form/types/fields/SelectField.d.ts +71 -0
- package/src/components/form/types/fields/StringField.d.ts +48 -0
- package/src/components/form/types/fields/TelField.d.ts +37 -0
- package/src/components/form/types/fields/TextAreaField.d.ts +44 -0
- package/src/components/form/types/fields/TimeField.d.ts +51 -0
- package/src/components/form/types/fields/UrlField.d.ts +35 -0
- package/src/components/form/utils.js +17 -0
- package/src/components/form/validation/Validation.js +565 -0
- package/src/components/index.d.ts +160 -0
- package/src/components/list/HasListItem.js +171 -0
- package/src/components/list/List.js +125 -0
- package/src/components/list/ListDivider.js +39 -0
- package/src/components/list/ListGroup.js +135 -0
- package/src/components/list/ListItem.js +212 -0
- package/src/components/list/index.js +12 -0
- package/src/components/list/types/List.d.ts +43 -0
- package/src/components/list/types/ListGroup.d.ts +37 -0
- package/src/components/list/types/ListItem.d.ts +53 -0
- package/src/components/menu/HasMenuItem.js +182 -0
- package/src/components/menu/Menu.js +227 -0
- package/src/components/menu/MenuDivider.js +37 -0
- package/src/components/menu/MenuGroup.js +126 -0
- package/src/components/menu/MenuItem.js +190 -0
- package/src/components/menu/MenuLink.js +51 -0
- package/src/components/menu/index.js +14 -0
- package/src/components/menu/types/Menu.d.ts +60 -0
- package/src/components/menu/types/MenuDivider.d.ts +19 -0
- package/src/components/menu/types/MenuGroup.d.ts +44 -0
- package/src/components/menu/types/MenuItem.d.ts +46 -0
- package/src/components/menu/types/MenuLink.d.ts +16 -0
- package/src/components/modal/Modal.js +524 -0
- package/src/components/modal/index.js +5 -0
- package/src/components/modal/types/Modal.d.ts +94 -0
- package/src/components/pagination/Pagination.js +411 -0
- package/src/components/pagination/index.js +5 -0
- package/src/components/pagination/types/Pagination.d.ts +68 -0
- package/src/components/popover/Popover.js +459 -0
- package/src/components/popover/PopoverFooter.js +61 -0
- package/src/components/popover/PopoverHeader.js +68 -0
- package/src/components/popover/index.js +10 -0
- package/src/components/popover/types/Popover.d.ts +83 -0
- package/src/components/popover/types/PopoverFooter.d.ts +24 -0
- package/src/components/popover/types/PopoverHeader.d.ts +26 -0
- package/src/components/progress/Progress.js +401 -0
- package/src/components/progress/index.js +6 -0
- package/src/components/progress/types/Progress.d.ts +77 -0
- package/src/components/skeleton/Skeleton.js +228 -0
- package/src/components/skeleton/index.js +6 -0
- package/src/components/skeleton/types/Skeleton.d.ts +55 -0
- package/src/components/slider/Slider.js +406 -0
- package/src/components/slider/index.js +5 -0
- package/src/components/slider/types/Slider.d.ts +82 -0
- package/src/components/spacer/Spacer.js +27 -0
- package/src/components/spacer/index.js +5 -0
- package/src/components/spacer/types/Spacer.d.ts +19 -0
- package/src/components/spinner/Spinner.js +350 -0
- package/src/components/spinner/index.js +5 -0
- package/src/components/spinner/types/Spinner.d.ts +71 -0
- package/src/components/splitter/Splitter.js +164 -0
- package/src/components/splitter/SplitterGutter.js +140 -0
- package/src/components/splitter/SplitterPanel.js +143 -0
- package/src/components/splitter/index.js +10 -0
- package/src/components/splitter/types/Splitter.d.ts +38 -0
- package/src/components/splitter/types/SplitterGutter.d.ts +38 -0
- package/src/components/splitter/types/SplitterPanel.d.ts +41 -0
- package/src/components/stacks/AbsoluteStack.js +53 -0
- package/src/components/stacks/FixedStack.js +53 -0
- package/src/components/stacks/HStack.js +54 -0
- package/src/components/stacks/PositionStack.js +254 -0
- package/src/components/stacks/RelativeStack.js +53 -0
- package/src/components/stacks/Stack.js +166 -0
- package/src/components/stacks/VStack.js +55 -0
- package/src/components/stacks/index.js +21 -0
- package/src/components/stacks/types/AbsoluteStack.d.ts +16 -0
- package/src/components/stacks/types/FixedStack.d.ts +16 -0
- package/src/components/stacks/types/HStack.d.ts +16 -0
- package/src/components/stacks/types/PositionStack.d.ts +54 -0
- package/src/components/stacks/types/RelativeStack.d.ts +17 -0
- package/src/components/stacks/types/Stack.d.ts +39 -0
- package/src/components/stacks/types/VStack.d.ts +16 -0
- package/src/components/stepper/Stepper.js +461 -0
- package/src/components/stepper/StepperStep.js +241 -0
- package/src/components/stepper/index.js +8 -0
- package/src/components/stepper/types/Stepper.d.ts +68 -0
- package/src/components/stepper/types/StepperStep.d.ts +54 -0
- package/src/components/switch/Switch.js +266 -0
- package/src/components/switch/index.js +6 -0
- package/src/components/switch/types/Switch.d.ts +55 -0
- package/src/components/table/Column.js +212 -0
- package/src/components/table/ColumnGroup.js +90 -0
- package/src/components/table/DataTable.js +720 -0
- package/src/components/table/SimpleTable.js +139 -0
- package/src/components/table/index.js +7 -0
- package/src/components/table/types/Column.d.ts +49 -0
- package/src/components/table/types/ColumnGroup.d.ts +28 -0
- package/src/components/table/types/DataTable.d.ts +97 -0
- package/src/components/table/types/SimpleTable.d.ts +40 -0
- package/src/components/tabs/Tabs.js +395 -0
- package/src/components/tabs/index.js +6 -0
- package/src/components/tabs/types/Tabs.d.ts +78 -0
- package/src/components/toast/Toast.js +262 -0
- package/src/components/toast/ToastError.js +0 -0
- package/src/components/toast/ToastInfo.js +0 -0
- package/src/components/toast/ToastSuccess.js +0 -0
- package/src/components/toast/ToastWarning.js +0 -0
- package/src/components/toast/index.js +5 -0
- package/src/components/toast/types/Toast.d.ts +57 -0
- package/src/components/toast/types/ToastError.d.ts +7 -0
- package/src/components/toast/types/ToastInfo.d.ts +7 -0
- package/src/components/toast/types/ToastSuccess.d.ts +7 -0
- package/src/components/toast/types/ToastWarning.d.ts +7 -0
- package/src/components/tooltip/Tooltip.js +359 -0
- package/src/components/tooltip/index.js +5 -0
- package/src/components/tooltip/prototypes.js +6 -0
- package/src/components/tooltip/types/Tooltip.d.ts +65 -0
- package/src/{data → core/data}/MemoryManager.js +9 -22
- package/src/core/data/Observable.js +227 -0
- package/src/core/data/ObservableArray.js +522 -0
- package/src/core/data/ObservableChecker.js +39 -0
- package/src/core/data/ObservableItem.js +611 -0
- package/src/core/data/ObservableObject.js +274 -0
- package/src/core/data/ObservableResource.js +315 -0
- package/src/core/data/ObservableWhen.js +54 -0
- package/src/core/data/Store.js +520 -0
- package/src/core/data/observable-helpers/observable.is-to.js +390 -0
- package/src/core/data/observable-helpers/observable.prototypes.js +145 -0
- package/src/core/elements/anchor/anchor-with-sentinel.js +66 -0
- package/src/core/elements/anchor/anchor.js +210 -0
- package/src/core/elements/anchor/one-child-anchor-overwriting.js +66 -0
- package/src/core/elements/content-formatter.js +169 -0
- package/src/core/elements/control/for-each-array.js +292 -0
- package/src/core/elements/control/for-each.js +170 -0
- package/src/core/elements/control/show-if.js +94 -0
- package/src/core/elements/control/show-when.js +54 -0
- package/src/core/elements/control/switch.js +141 -0
- package/src/core/elements/description-list.js +19 -0
- package/src/core/elements/form.js +255 -0
- package/src/core/elements/fragment.js +8 -0
- package/src/core/elements/html5-semantics.js +55 -0
- package/src/core/elements/img.js +59 -0
- package/src/{elements → core/elements}/index.js +5 -4
- package/src/core/elements/interactive.js +25 -0
- package/src/core/elements/list.js +37 -0
- package/src/core/elements/medias.js +37 -0
- package/src/core/elements/meta-data.js +43 -0
- package/src/core/elements/svg.js +61 -0
- package/src/core/elements/table.js +73 -0
- package/src/{errors → core/errors}/ArgTypesError.js +1 -1
- package/src/{errors → core/errors}/NativeDocumentError.js +0 -0
- package/src/core/utils/HasEventEmitter.js +85 -0
- package/src/core/utils/args-types.js +140 -0
- package/src/core/utils/cache.js +5 -0
- package/src/core/utils/callback-handler.js +50 -0
- package/src/core/utils/debug-manager.js +40 -0
- package/src/core/utils/events.js +148 -0
- package/src/core/utils/filters/date.js +178 -0
- package/src/core/utils/filters/index.js +4 -0
- package/src/core/utils/filters/standard.js +263 -0
- package/src/core/utils/filters/strings.js +67 -0
- package/src/core/utils/filters/utils.js +77 -0
- package/src/core/utils/formatters.js +90 -0
- package/src/core/utils/helpers.js +144 -0
- package/src/core/utils/localstorage.js +57 -0
- package/src/core/utils/memoize.js +115 -0
- package/src/core/utils/plugins-manager.js +81 -0
- package/src/core/utils/property-accumulator.js +72 -0
- package/src/core/utils/prototypes.js +44 -0
- package/src/core/utils/shortcut-manager.js +242 -0
- package/src/{utils → core/utils}/validator.js +58 -22
- package/src/core/wrappers/AttributesWrapper.js +181 -0
- package/src/core/wrappers/DocumentObserver.js +182 -0
- package/src/core/wrappers/ElementCreator.js +110 -0
- package/src/core/wrappers/HtmlElementWrapper.js +98 -0
- package/src/core/wrappers/NDElement.js +613 -0
- package/src/core/wrappers/NdPrototype.js +233 -0
- package/src/core/wrappers/SingletonView.js +99 -0
- package/src/core/wrappers/SvgElementWrapper.js +15 -0
- package/src/core/wrappers/TemplateBinding.js +7 -0
- package/src/core/wrappers/constants.js +66 -0
- package/src/core/wrappers/prototypes/attributes-extensions.js +24 -0
- package/src/core/wrappers/prototypes/bind-class-extensions.js +0 -0
- package/src/core/wrappers/prototypes/nd-element-extensions.js +149 -0
- package/src/core/wrappers/prototypes/nd-element.transition.extensions.js +127 -0
- package/src/core/wrappers/template-cloner/NodeCloner.js +209 -0
- package/src/core/wrappers/template-cloner/TemplateCloner.js +192 -0
- package/src/core/wrappers/template-cloner/attributes-hydrator.js +142 -0
- package/src/core/wrappers/template-cloner/utils.js +173 -0
- package/src/fetch/NativeFetch.js +89 -0
- package/src/i18n/bin/scan.js +132 -0
- package/src/i18n/index.d.ts +2 -0
- package/src/i18n/service/I18nService.d.ts +27 -0
- package/src/i18n/service/I18nService.js +46 -0
- package/src/i18n/service/functions.d.ts +22 -0
- package/src/i18n/service/functions.js +29 -0
- package/src/router/Route.js +33 -8
- package/src/router/RouteGroupHelper.js +10 -2
- package/src/router/Router.js +63 -22
- package/src/router/RouterComponent.js +114 -6
- package/src/{errors → router/errors}/RouterError.js +0 -1
- package/src/router/link.js +9 -10
- package/src/router/modes/HashRouter.js +2 -2
- package/src/router/modes/HistoryRouter.js +2 -3
- package/src/router/modes/MemoryRouter.js +1 -1
- package/src/ui/components/accordion/AccordionItemRender.js +63 -0
- package/src/ui/components/accordion/AccordionRender.js +35 -0
- package/src/ui/components/accordion/accordion.css +121 -0
- package/src/ui/components/alert/AlertRender.js +81 -0
- package/src/ui/components/alert/alert.css +163 -0
- package/src/ui/components/avatar/avata-group/AvatarGroupRender.js +50 -0
- package/src/ui/components/avatar/avata-group/avatar-group.css +38 -0
- package/src/ui/components/avatar/avatar/AvatarRender.js +87 -0
- package/src/ui/components/avatar/avatar/avatar.css +189 -0
- package/src/ui/components/badge/BadgeRender.js +25 -0
- package/src/ui/components/badge/badge.css +168 -0
- package/src/ui/components/breadcrumb/BreadcrumbRender.js +44 -0
- package/src/ui/components/breadcrumb/breadcrumb.css +55 -0
- package/src/ui/components/button/ButtonRender.js +65 -0
- package/src/ui/components/button/button.css +296 -0
- package/src/ui/components/card/CardRender.js +133 -0
- package/src/ui/components/card/card.css +169 -0
- package/src/ui/components/contextmenu/ContextmenuRender.js +68 -0
- package/src/ui/components/contextmenu/contextmenu.css +36 -0
- package/src/ui/components/divider/DividerRender.js +70 -0
- package/src/ui/components/divider/divider.css +70 -0
- package/src/ui/components/dropdown/DropdownRender.js +92 -0
- package/src/ui/components/dropdown/divider/DropdownDividerRender.js +9 -0
- package/src/ui/components/dropdown/divider/dropdown-divider.css +0 -0
- package/src/ui/components/dropdown/dropdown.css +179 -0
- package/src/ui/components/dropdown/group/DropdownGroupRender.js +23 -0
- package/src/ui/components/dropdown/group/dropdown-group.css +0 -0
- package/src/ui/components/dropdown/item/DropdownItemRender.js +29 -0
- package/src/ui/components/dropdown/item/dropdown-item.css +0 -0
- package/src/ui/components/form/FieldCollectionRender.js +110 -0
- package/src/ui/components/form/FormControlRender.js +85 -0
- package/src/ui/components/form/field-collection.css +55 -0
- package/src/ui/components/form/fields/AutocompleteFieldRender.js +143 -0
- package/src/ui/components/form/fields/CheckboxFieldRender.js +59 -0
- package/src/ui/components/form/fields/CheckboxGroupFieldRender.js +92 -0
- package/src/ui/components/form/fields/ColorFieldRender.js +30 -0
- package/src/ui/components/form/fields/DateFieldRender.js +155 -0
- package/src/ui/components/form/fields/EmailFieldRender.js +5 -0
- package/src/ui/components/form/fields/FieldRender.js +118 -0
- package/src/ui/components/form/fields/FileFieldRender.js +41 -0
- package/src/ui/components/form/fields/HiddenFieldRender.js +13 -0
- package/src/ui/components/form/fields/ImageFieldRender.js +0 -0
- package/src/ui/components/form/fields/NumberFieldRender.js +52 -0
- package/src/ui/components/form/fields/PasswordFieldRender.js +65 -0
- package/src/ui/components/form/fields/RadioFieldRender.js +77 -0
- package/src/ui/components/form/fields/RangeFieldRender.js +122 -0
- package/src/ui/components/form/fields/SelectFieldRender.js +248 -0
- package/src/ui/components/form/fields/SliderFieldRender.js +359 -0
- package/src/ui/components/form/fields/StringFieldRender.js +6 -0
- package/src/ui/components/form/fields/TelFieldRender.js +6 -0
- package/src/ui/components/form/fields/TextAreaFieldRender.js +96 -0
- package/src/ui/components/form/fields/TimeFieldRender.js +142 -0
- package/src/ui/components/form/fields/UrlFieldRender.js +6 -0
- package/src/ui/components/form/fields/date-field.css +32 -0
- package/src/ui/components/form/fields/field.css +402 -0
- package/src/ui/components/form/fields/file-field.css +79 -0
- package/src/ui/components/form/fields/password-field.css +50 -0
- package/src/ui/components/form/fields/range-field.css +120 -0
- package/src/ui/components/form/fields/slider.css +195 -0
- package/src/ui/components/form/file-upload-mode/FileAvatarModeRender.js +143 -0
- package/src/ui/components/form/file-upload-mode/FileDropzoneModeRender.js +108 -0
- package/src/ui/components/form/file-upload-mode/FileNativeModeRender.js +22 -0
- package/src/ui/components/form/file-upload-mode/FileUploadButtonModeRender.js +89 -0
- package/src/ui/components/form/file-upload-mode/FileWallModeRender.js +90 -0
- package/src/ui/components/form/file-upload-mode/file-avatar-mode.css +139 -0
- package/src/ui/components/form/file-upload-mode/file-dropzone-mode.css +88 -0
- package/src/ui/components/form/file-upload-mode/file-upload-button-mode.css +44 -0
- package/src/ui/components/form/file-upload-mode/file-wall-mode.css +88 -0
- package/src/ui/components/form/form-control.css +40 -0
- package/src/ui/components/form/helpers.js +111 -0
- package/src/ui/components/form/index.js +27 -0
- package/src/ui/components/list/ListRender.js +18 -0
- package/src/ui/components/list/divider/ListDividerRender.js +10 -0
- package/src/ui/components/list/divider/list-divider.css +12 -0
- package/src/ui/components/list/group/ListGroupRender.js +61 -0
- package/src/ui/components/list/group/list-group.css +62 -0
- package/src/ui/components/list/item/ListItemRender.js +238 -0
- package/src/ui/components/list/item/list-item.css +191 -0
- package/src/ui/components/list/list.css +24 -0
- package/src/ui/components/menu/MenuDividerRender.js +12 -0
- package/src/ui/components/menu/MenuGroupRender.js +59 -0
- package/src/ui/components/menu/MenuItemRender.js +57 -0
- package/src/ui/components/menu/MenuLinkRender.js +55 -0
- package/src/ui/components/menu/MenuRender.js +22 -0
- package/src/ui/components/menu/helpers.js +121 -0
- package/src/ui/components/menu/menu.css +308 -0
- package/src/ui/components/modal/ModalRender.js +118 -0
- package/src/ui/components/modal/modal.css +156 -0
- package/src/ui/components/pagination/PaginationRender.js +112 -0
- package/src/ui/components/pagination/pagination.css +63 -0
- package/src/ui/components/popover/PopoverRender.js +233 -0
- package/src/ui/components/popover/popover.css +139 -0
- package/src/ui/components/progress/ProgressRender.js +168 -0
- package/src/ui/components/progress/progress.css +197 -0
- package/src/ui/components/skeleton/SkeletonRender.js +136 -0
- package/src/ui/components/skeleton/skeleton.css +154 -0
- package/src/ui/components/spacer/SpacerRender.js +10 -0
- package/src/ui/components/spinner/SpinnerRender.js +47 -0
- package/src/ui/components/spinner/spinner.css +152 -0
- package/src/ui/components/splitter/SplitterGutterRender.js +94 -0
- package/src/ui/components/splitter/SplitterPanelRender.js +38 -0
- package/src/ui/components/splitter/SplitterRender.js +75 -0
- package/src/ui/components/splitter/splitter.css +128 -0
- package/src/ui/components/stacks/PositionStackRender.js +39 -0
- package/src/ui/components/stacks/StackRender.js +41 -0
- package/src/ui/components/stacks/absolute-stack/AbsoluteStackRender.js +5 -0
- package/src/ui/components/stacks/fixed-stack/FixedStackRender.js +5 -0
- package/src/ui/components/stacks/h-stack/HStackRender.js +7 -0
- package/src/ui/components/stacks/h-stack/h-stack.css +4 -0
- package/src/ui/components/stacks/index.js +5 -0
- package/src/ui/components/stacks/position-stack.css +62 -0
- package/src/ui/components/stacks/relative-stack/RelativeStackRender.js +7 -0
- package/src/ui/components/stacks/relative-stack/relative-stack.css +3 -0
- package/src/ui/components/stacks/stack.css +78 -0
- package/src/ui/components/stacks/v-stack/VStackRender.js +6 -0
- package/src/ui/components/stacks/v-stack/v-stack.css +4 -0
- package/src/ui/components/stepper/StepperRender.js +71 -0
- package/src/ui/components/stepper/StepperStepRender.js +67 -0
- package/src/ui/components/stepper/stepper.css +359 -0
- package/src/ui/components/switch/SwitchRender.js +83 -0
- package/src/ui/components/switch/switch.css +143 -0
- package/src/ui/components/table/data-table/DataTableRender.js +50 -0
- package/src/ui/components/table/data-table/bulk-actions.js +34 -0
- package/src/ui/components/table/data-table/data-table.css +246 -0
- package/src/ui/components/table/data-table/pagination.js +56 -0
- package/src/ui/components/table/data-table/tables.js +368 -0
- package/src/ui/components/table/data-table/toolbar.js +67 -0
- package/src/ui/components/table/simple-table/SimpleTableRender.js +203 -0
- package/src/ui/components/table/simple-table/simple-table.css +50 -0
- package/src/ui/components/tabs/TabsRender.js +226 -0
- package/src/ui/components/tabs/tabs.css +253 -0
- package/src/ui/components/toast/ToastRender.js +99 -0
- package/src/ui/components/toast/toast.css +201 -0
- package/src/ui/components/tooltip/TooltipRender.js +8 -0
- package/src/ui/components/tooltip/tooltip.css +113 -0
- package/src/ui/index.js +47 -0
- package/src/ui/theme.js +0 -0
- package/src/ui/theme.scss +1 -0
- package/src/ui/tokens/animation.scss +36 -0
- package/src/ui/tokens/colors-dark.scss +58 -0
- package/src/ui/tokens/colors.scss +54 -0
- package/src/ui/tokens/components.scss +32 -0
- package/src/ui/tokens/fonts.scss +57 -0
- package/src/ui/tokens/glass.scss +10 -0
- package/src/ui/tokens/index.scss +38 -0
- package/src/ui/tokens/layouts.scss +228 -0
- package/src/ui/tokens/opacity.scss +21 -0
- package/src/ui/tokens/others.scss +11 -0
- package/src/ui/tokens/radius.scss +6 -0
- package/src/ui/tokens/reset.scss +51 -0
- package/src/ui/tokens/shadows.scss +29 -0
- package/src/ui/tokens/spacings.scss +13 -0
- package/src/ui/tokens/vars.scss +35 -0
- package/src/ui/tokens/viewports.scss +30 -0
- package/types/args-types.d.ts +58 -0
- package/types/control-flow.d.ts +62 -0
- package/types/elements.d.ts +231 -0
- package/types/filters/dates.d.ts +43 -0
- package/types/filters/index.d.ts +4 -0
- package/types/filters/standard.d.ts +70 -0
- package/types/filters/strings.d.ts +21 -0
- package/types/filters/types.d.ts +20 -0
- package/types/forms.d.ts +84 -0
- package/types/globals.d.ts +543 -0
- package/types/images.d.ts +23 -0
- package/types/localStorage.ts +102 -0
- package/types/memoize.d.ts +26 -0
- package/types/native-fetch.d.ts +72 -0
- package/types/nd-element.d.ts +407 -0
- package/types/observable-resource.d.ts +3 -0
- package/types/observable.d.ts +227 -0
- package/types/plugins-manager.d.ts +65 -0
- package/types/polyfill.d.ts +18 -0
- package/types/property-accumulator.d.ts +33 -0
- package/types/router.d.ts +85 -0
- package/types/service.d.ts +23 -0
- package/types/singleton.d.ts +19 -0
- package/types/store.d.ts +63 -0
- package/types/template-cloner.ts +43 -0
- package/types/validator.ts +66 -0
- package/ui.js +1 -0
- package/utils.d.ts +4 -0
- package/utils.js +12 -0
- package/src/data/Observable.js +0 -233
- package/src/data/ObservableChecker.js +0 -38
- package/src/data/ObservableItem.js +0 -116
- package/src/data/Store.js +0 -74
- package/src/elements/anchor.js +0 -84
- package/src/elements/content-formatter.js +0 -32
- package/src/elements/control/for-each.js +0 -174
- package/src/elements/control/show-if.js +0 -79
- package/src/elements/control/switch.js +0 -98
- package/src/elements/description-list.js +0 -5
- package/src/elements/form.js +0 -71
- package/src/elements/html5-semantics.js +0 -12
- package/src/elements/img.js +0 -45
- package/src/elements/interactive.js +0 -7
- package/src/elements/list.js +0 -6
- package/src/elements/medias.js +0 -8
- package/src/elements/meta-data.js +0 -9
- package/src/elements/table.js +0 -14
- package/src/utils/args-types.js +0 -100
- package/src/utils/debug-manager.js +0 -31
- package/src/utils/helpers.js +0 -37
- package/src/utils/plugins-manager.js +0 -12
- package/src/utils/prototypes.js +0 -45
- package/src/wrappers/AttributesWrapper.js +0 -157
- package/src/wrappers/DocumentObserver.js +0 -51
- package/src/wrappers/HtmlElementEventsWrapper.js +0 -77
- package/src/wrappers/HtmlElementWrapper.js +0 -206
- package/src/wrappers/constants.js +0 -2
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// =============================================================================
|
|
2
|
+
// NativeDocument Components — index.d.ts
|
|
3
|
+
// Barrel export for all component type definitions.
|
|
4
|
+
// =============================================================================
|
|
5
|
+
|
|
6
|
+
// --- Base & Traits -----------------------------------------------------------
|
|
7
|
+
export type { BaseComponent } from './BaseComponent';
|
|
8
|
+
export type { HasDraggable } from './$traits/has-draggable/HasDraggable';
|
|
9
|
+
export type { HasItems } from './$traits/has-items/HasItems';
|
|
10
|
+
export type { HasPosition } from './$traits/has-position/HasPosition';
|
|
11
|
+
export type { HasFullPosition } from './$traits/has-position/HasFullPosition';
|
|
12
|
+
export type { HasResizable } from './$traits/has-resizable/HasResizable';
|
|
13
|
+
export type { HasValidation } from './$traits/has-validation/HasValidation';
|
|
14
|
+
|
|
15
|
+
// --- Accordion ---------------------------------------------------------------
|
|
16
|
+
export type { Accordion, AccordionInterface, AccordionDescription } from './accordion/types/Accordion';
|
|
17
|
+
export type { AccordionItem, AccordionItemInterface, AccordionItemDescription } from './accordion/types/AccordionItem';
|
|
18
|
+
|
|
19
|
+
// --- Alert -------------------------------------------------------------------
|
|
20
|
+
export type { Alert, AlertInterface, AlertDescription } from './alert/types/Alert';
|
|
21
|
+
|
|
22
|
+
// --- Avatar ------------------------------------------------------------------
|
|
23
|
+
export type { Avatar, AvatarInterface, AvatarDescription } from './avatar/types/Avatar';
|
|
24
|
+
export type { AvatarGroup, AvatarGroupInterface, AvatarGroupDescription } from './avatar/types/AvatarGroup';
|
|
25
|
+
|
|
26
|
+
// --- Badge -------------------------------------------------------------------
|
|
27
|
+
export type { Badge, BadgeInterface, BadgeDescription } from './badge/types/Badge';
|
|
28
|
+
|
|
29
|
+
// --- Breadcrumb --------------------------------------------------------------
|
|
30
|
+
export type { BreadCrumb, BreadCrumbInterface, BreadCrumbDescription } from './breadcrumb/types/BreadCrumb';
|
|
31
|
+
|
|
32
|
+
// --- Button ------------------------------------------------------------------
|
|
33
|
+
export type { Button, ButtonInterface, ButtonDescription } from './button/types/Button';
|
|
34
|
+
|
|
35
|
+
// --- Card --------------------------------------------------------------------
|
|
36
|
+
export type { Card, CardInterface, CardDescription } from './card/types/Card';
|
|
37
|
+
|
|
38
|
+
// --- Context Menu ------------------------------------------------------------
|
|
39
|
+
export type { ContextMenu, ContextMenuInterface, ContextMenuDescription } from './context-menu/types/ContextMenu';
|
|
40
|
+
export type { ContextMenuGroup, ContextMenuGroupInterface } from './context-menu/types/ContextMenuGroup';
|
|
41
|
+
export type { ContextMenuItem, ContextMenuItemInterface } from './context-menu/types/ContextMenuItem';
|
|
42
|
+
|
|
43
|
+
// --- Divider -----------------------------------------------------------------
|
|
44
|
+
export type { Divider, DividerInterface, DividerDescription } from './divider/types/Divider';
|
|
45
|
+
|
|
46
|
+
// --- Dropdown ----------------------------------------------------------------
|
|
47
|
+
export type { Dropdown, DropdownInterface, DropdownDescription } from './dropdown/types/Dropdown';
|
|
48
|
+
export type { DropdownDivider, DropdownDividerInterface } from './dropdown/types/DropdownDivider';
|
|
49
|
+
export type { DropdownGroup, DropdownGroupInterface } from './dropdown/types/DropdownGroup';
|
|
50
|
+
export type { DropdownItem, DropdownItemInterface, DropdownItemDescription } from './dropdown/types/DropdownItem';
|
|
51
|
+
export type { DropdownTrigger, DropdownTriggerInterface, DropdownTriggerDescription } from './dropdown/types/DropdownTrigger';
|
|
52
|
+
|
|
53
|
+
// --- Form --------------------------------------------------------------------
|
|
54
|
+
export type { FormControl, FormControlInterface, FormControlDescription } from './form/types/FormControl';
|
|
55
|
+
export type { Field, FieldInterface, FieldDescription } from './form/types/Field';
|
|
56
|
+
export type { FieldCollection, FieldCollectionInterface, FieldCollectionDescription } from './form/types/FieldCollection';
|
|
57
|
+
export type { StringField, StringFieldInterface } from './form/types/fields/StringField';
|
|
58
|
+
export type { NumberField, NumberFieldInterface } from './form/types/fields/NumberField';
|
|
59
|
+
export type { EmailField, EmailFieldInterface } from './form/types/fields/EmailField';
|
|
60
|
+
export type { PasswordField, PasswordFieldInterface } from './form/types/fields/PasswordField';
|
|
61
|
+
export type { TelField, TelFieldInterface } from './form/types/fields/TelField';
|
|
62
|
+
export type { UrlField, UrlFieldInterface } from './form/types/fields/UrlField';
|
|
63
|
+
export type { TextAreaField, TextAreaFieldInterface } from './form/types/fields/TextAreaField';
|
|
64
|
+
export type { CheckboxField, CheckboxFieldInterface } from './form/types/fields/CheckboxField';
|
|
65
|
+
export type { CheckboxGroupField, CheckboxGroupFieldInterface } from './form/types/fields/CheckboxGroupField';
|
|
66
|
+
export type { RadioField, RadioFieldInterface } from './form/types/fields/RadioField';
|
|
67
|
+
export type { SelectField, SelectFieldInterface } from './form/types/fields/SelectField';
|
|
68
|
+
export type { AutocompleteField, AutocompleteFieldInterface } from './form/types/fields/AutocompleteField';
|
|
69
|
+
export type { HiddenField, HiddenFieldInterface } from './form/types/fields/HiddenField';
|
|
70
|
+
export type { ColorField, ColorFieldInterface } from './form/types/fields/ColorField';
|
|
71
|
+
export type { DateField, DateFieldInterface } from './form/types/fields/DateField';
|
|
72
|
+
export type { TimeField, TimeFieldInterface } from './form/types/fields/TimeField';
|
|
73
|
+
export type { RangeField, RangeFieldInterface } from './form/types/fields/RangeField';
|
|
74
|
+
export type { SearchField, SearchFieldInterface } from './form/types/fields/SearchField';
|
|
75
|
+
export type { FileField, FileFieldInterface } from './form/types/fields/FileField';
|
|
76
|
+
export type { ImageField, ImageFieldInterface } from './form/types/fields/ImageField';
|
|
77
|
+
export type { FileAvatarMode, FileAvatarModeInterface, FileAvatarModeDescription } from './form/types/fields/FileAvatarMode';
|
|
78
|
+
export type { FileDropzoneMode, FileDropzoneModeInterface, FileDropzoneModeDescription } from './form/types/fields/FileDropzoneMode';
|
|
79
|
+
export type { FileItemPreview, FileItemPreviewInterface, FileItemPreviewDescription } from './form/types/fields/FileItemPreview';
|
|
80
|
+
export type { FileNativeMode, FileNativeModeInterface, FileNativeModeDescription } from './form/types/fields/FileNativeMode';
|
|
81
|
+
export type { FileUploadButtonMode, FileUploadButtonModeInterface, FileUploadButtonModeDescription } from './form/types/fields/FileUploadButtonMode';
|
|
82
|
+
export type { FileWallMode, FileWallModeInterface, FileWallModeDescription } from './form/types/fields/FileWallMode';
|
|
83
|
+
|
|
84
|
+
// --- List --------------------------------------------------------------------
|
|
85
|
+
export type { List, ListInterface, ListDescription } from './list/types/List';
|
|
86
|
+
export type { ListGroup, ListGroupInterface, ListGroupDescription } from './list/types/ListGroup';
|
|
87
|
+
export type { ListItem, ListItemInterface, ListItemDescription } from './list/types/ListItem';
|
|
88
|
+
|
|
89
|
+
// --- Menu --------------------------------------------------------------------
|
|
90
|
+
export type { Menu, MenuInterface, MenuDescription } from './menu/types/Menu';
|
|
91
|
+
export type { MenuDivider, MenuDividerInterface, MenuDividerDescription } from './menu/types/MenuDivider';
|
|
92
|
+
export type { MenuGroup, MenuGroupInterface, MenuGroupDescription } from './menu/types/MenuGroup';
|
|
93
|
+
export type { MenuItem, MenuItemInterface, MenuItemDescription } from './menu/types/MenuItem';
|
|
94
|
+
export type { MenuLink, MenuLinkInterface } from './menu/types/MenuLink';
|
|
95
|
+
|
|
96
|
+
// --- Modal -------------------------------------------------------------------
|
|
97
|
+
export type { Modal, ModalInterface, ModalDescription } from './modal/types/Modal';
|
|
98
|
+
|
|
99
|
+
// --- Pagination --------------------------------------------------------------
|
|
100
|
+
export type { Pagination, PaginationInterface, PaginationDescription } from './pagination/types/Pagination';
|
|
101
|
+
|
|
102
|
+
// --- Popover -----------------------------------------------------------------
|
|
103
|
+
export type { Popover, PopoverInterface, PopoverDescription } from './popover/types/Popover';
|
|
104
|
+
export type { PopoverFooter, PopoverFooterInterface, PopoverFooterDescription } from './popover/types/PopoverFooter';
|
|
105
|
+
export type { PopoverHeader, PopoverHeaderInterface, PopoverHeaderDescription } from './popover/types/PopoverHeader';
|
|
106
|
+
|
|
107
|
+
// --- Progress ----------------------------------------------------------------
|
|
108
|
+
export type { Progress, ProgressInterface, ProgressDescription } from './progress/types/Progress';
|
|
109
|
+
|
|
110
|
+
// --- Skeleton ----------------------------------------------------------------
|
|
111
|
+
export type { Skeleton, SkeletonInterface, SkeletonDescription } from './skeleton/types/Skeleton';
|
|
112
|
+
|
|
113
|
+
// --- Slider ------------------------------------------------------------------
|
|
114
|
+
export type { Slider, SliderInterface, SliderDescription } from './slider/types/Slider';
|
|
115
|
+
|
|
116
|
+
// --- Spacer ------------------------------------------------------------------
|
|
117
|
+
export type { Spacer, SpacerInterface, SpacerDescription } from './spacer/types/Spacer';
|
|
118
|
+
|
|
119
|
+
// --- Spinner -----------------------------------------------------------------
|
|
120
|
+
export type { Spinner, SpinnerInterface, SpinnerDescription } from './spinner/types/Spinner';
|
|
121
|
+
|
|
122
|
+
// --- Splitter ----------------------------------------------------------------
|
|
123
|
+
export type { Splitter, SplitterInterface, SplitterDescription } from './splitter/types/Splitter';
|
|
124
|
+
export type { SplitterGutter, SplitterGutterInterface, SplitterGutterDescription } from './splitter/types/SplitterGutter';
|
|
125
|
+
export type { SplitterPanel, SplitterPanelInterface, SplitterPanelDescription } from './splitter/types/SplitterPanel';
|
|
126
|
+
|
|
127
|
+
// --- Stacks ------------------------------------------------------------------
|
|
128
|
+
export type { Stack, StackInterface, StackDescription } from './stacks/types/Stack';
|
|
129
|
+
export type { HStack, HStackInterface } from './stacks/types/HStack';
|
|
130
|
+
export type { VStack, VStackInterface } from './stacks/types/VStack';
|
|
131
|
+
export type { PositionStack, PositionStackInterface, PositionStackDescription } from './stacks/types/PositionStack';
|
|
132
|
+
export type { AbsoluteStack, AbsoluteStackInterface } from './stacks/types/AbsoluteStack';
|
|
133
|
+
export type { FixedStack, FixedStackInterface } from './stacks/types/FixedStack';
|
|
134
|
+
export type { RelativeStack, RelativeStackInterface } from './stacks/types/RelativeStack';
|
|
135
|
+
|
|
136
|
+
// --- Stepper -----------------------------------------------------------------
|
|
137
|
+
export type { Stepper, StepperInterface, StepperDescription } from './stepper/types/Stepper';
|
|
138
|
+
export type { StepperStep, StepperStepInterface, StepperStepDescription } from './stepper/types/StepperStep';
|
|
139
|
+
|
|
140
|
+
// --- Switch ------------------------------------------------------------------
|
|
141
|
+
export type { Switch, SwitchInterface, SwitchDescription } from './switch/types/Switch';
|
|
142
|
+
|
|
143
|
+
// --- Table -------------------------------------------------------------------
|
|
144
|
+
export type { Column, ColumnInterface, ColumnDescription } from './table/types/Column';
|
|
145
|
+
export type { ColumnGroup, ColumnGroupInterface, ColumnGroupDescription } from './table/types/ColumnGroup';
|
|
146
|
+
export type { DataTable, DataTableInterface, DataTableDescription } from './table/types/DataTable';
|
|
147
|
+
export type { SimpleTable, SimpleTableInterface, SimpleTableDescription } from './table/types/SimpleTable';
|
|
148
|
+
|
|
149
|
+
// --- Tabs --------------------------------------------------------------------
|
|
150
|
+
export type { Tabs, TabsInterface, TabsDescription } from './tabs/types/Tabs';
|
|
151
|
+
|
|
152
|
+
// --- Toast -------------------------------------------------------------------
|
|
153
|
+
export type { Toast, ToastInterface, ToastDescription } from './toast/types/Toast';
|
|
154
|
+
export type { ToastError, ToastErrorInterface } from './toast/types/ToastError';
|
|
155
|
+
export type { ToastInfo, ToastInfoInterface } from './toast/types/ToastInfo';
|
|
156
|
+
export type { ToastSuccess, ToastSuccessInterface } from './toast/types/ToastSuccess';
|
|
157
|
+
export type { ToastWarning, ToastWarningInterface } from './toast/types/ToastWarning';
|
|
158
|
+
|
|
159
|
+
// --- Tooltip -----------------------------------------------------------------
|
|
160
|
+
export type { Tooltip, TooltipInterface, TooltipDescription } from './tooltip/types/Tooltip';
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import ListDivider from './ListDivider';
|
|
2
|
+
import List from './List';
|
|
3
|
+
import BaseComponent from '../BaseComponent';
|
|
4
|
+
|
|
5
|
+
const EMPTY_OPTIONS = {};
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Trait that adds item/group/divider management to List and ListGroup.
|
|
9
|
+
* Mirrors the HasMenuItem pattern.
|
|
10
|
+
*
|
|
11
|
+
* @constructor
|
|
12
|
+
*/
|
|
13
|
+
export default function HasListItem() {}
|
|
14
|
+
|
|
15
|
+
HasListItem.components = {
|
|
16
|
+
ListItem: null,
|
|
17
|
+
ListGroup: null,
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* @param {ObservableArray<*>|*[]} list
|
|
23
|
+
* @returns {this}
|
|
24
|
+
*/
|
|
25
|
+
HasListItem.prototype.selectInto = function(list) {
|
|
26
|
+
this.$description.selectedValues = list;
|
|
27
|
+
return this;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @param {boolean|Observable<boolean>} [selectable=true]
|
|
32
|
+
* @returns {this}
|
|
33
|
+
*/
|
|
34
|
+
HasListItem.prototype.selectable = function(selectable = true) {
|
|
35
|
+
this.$description.selectable = BaseComponent.obs(selectable);
|
|
36
|
+
return this;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Select items on click. Mutually exclusive with selectByCheckbox.
|
|
41
|
+
* @returns {this}
|
|
42
|
+
*/
|
|
43
|
+
HasListItem.prototype.selectByClick = function() {
|
|
44
|
+
this.$description.selectByClick.set(true);
|
|
45
|
+
this.$description.selectByCheckbox.set(false);
|
|
46
|
+
return this;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Select items via a checkbox. Mutually exclusive with selectByClick.
|
|
51
|
+
* @returns {this}
|
|
52
|
+
*/
|
|
53
|
+
HasListItem.prototype.selectByCheckbox = function() {
|
|
54
|
+
this.$description.selectByClick.set(false);
|
|
55
|
+
this.$description.selectByCheckbox.set(true);
|
|
56
|
+
return this;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* @param {boolean|Observable<boolean>} [multi=true]
|
|
61
|
+
* @returns {this}
|
|
62
|
+
*/
|
|
63
|
+
HasListItem.prototype.multiSelect = function(multi = true) {
|
|
64
|
+
this.$description.multiSelect = BaseComponent.obs(multi);
|
|
65
|
+
this.$description.selectable.set(true);
|
|
66
|
+
return this;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* @param {boolean} loopOnKeyboard
|
|
71
|
+
* @returns {this}
|
|
72
|
+
*/
|
|
73
|
+
HasListItem.prototype.loopOnKeyboard = function(loopOnKeyboard) {
|
|
74
|
+
this.$description.loopOnKeyboard = loopOnKeyboard;
|
|
75
|
+
return this;
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @param {ListItem|ListGroup|ListDivider} item
|
|
80
|
+
* @returns {this}
|
|
81
|
+
*/
|
|
82
|
+
HasListItem.prototype.add = function(item) {
|
|
83
|
+
if (item === this) {
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
item.$parent = this;
|
|
87
|
+
this.$description.items.push(item);
|
|
88
|
+
return this;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @param {NdChild} label
|
|
93
|
+
* @param {NdChild|((item: ListItem) => void)} [iconOrBuilder]
|
|
94
|
+
* @param {((item: ListItem) => void)} [builder]
|
|
95
|
+
* @returns {this}
|
|
96
|
+
*/
|
|
97
|
+
HasListItem.prototype.item = function(label, iconOrBuilder, builder) {
|
|
98
|
+
const ListItem = HasListItem.components.ListItem;
|
|
99
|
+
const item = new ListItem();
|
|
100
|
+
item.$parent = this;
|
|
101
|
+
|
|
102
|
+
item.label(label);
|
|
103
|
+
|
|
104
|
+
if (typeof iconOrBuilder === 'function') {
|
|
105
|
+
iconOrBuilder(item);
|
|
106
|
+
} else if (iconOrBuilder) {
|
|
107
|
+
item.icon(iconOrBuilder);
|
|
108
|
+
if (typeof builder === 'function') {
|
|
109
|
+
builder(item);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
this.$description.items.push(item);
|
|
114
|
+
return this;
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* @param {NdChild} label
|
|
119
|
+
* @param {NdChild|((group: ListGroup) => void)} [iconOrBuilder]
|
|
120
|
+
* @param {((group: ListGroup) => void)} [builder]
|
|
121
|
+
* @returns {this}
|
|
122
|
+
*/
|
|
123
|
+
HasListItem.prototype.group = function(label, iconOrBuilder, builder) {
|
|
124
|
+
const ListGroup = HasListItem.components.ListGroup;
|
|
125
|
+
const group = new ListGroup(label);
|
|
126
|
+
group.$parent = this;
|
|
127
|
+
|
|
128
|
+
if (typeof iconOrBuilder === 'function') {
|
|
129
|
+
iconOrBuilder(group);
|
|
130
|
+
} else if (iconOrBuilder) {
|
|
131
|
+
group.icon(iconOrBuilder);
|
|
132
|
+
if (typeof builder === 'function') {
|
|
133
|
+
builder(group);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
this.$description.items.push(group);
|
|
138
|
+
return this;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @returns {this}
|
|
143
|
+
*/
|
|
144
|
+
HasListItem.prototype.divider = function() {
|
|
145
|
+
const divider = new ListDivider();
|
|
146
|
+
divider.$parent = this;
|
|
147
|
+
this.$description.items.push(divider);
|
|
148
|
+
return this;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Populate items from a data source using a builder function.
|
|
154
|
+
* The builder receives each data item and must return a ListItem or ListGroup.
|
|
155
|
+
*
|
|
156
|
+
* @param {ObservableArray<*>|*[]} source
|
|
157
|
+
* @param {(item: *) => ListItem|ListGroup} builder
|
|
158
|
+
* @returns {this}
|
|
159
|
+
*/
|
|
160
|
+
HasListItem.prototype.from = function(source, builder) {
|
|
161
|
+
this.$description.items = source;
|
|
162
|
+
this.$description.itemBuilder = (...args) => {
|
|
163
|
+
if(args[0].__$ListInstance) {
|
|
164
|
+
return args[0];
|
|
165
|
+
}
|
|
166
|
+
const item = builder(...args);
|
|
167
|
+
item.$parent = this;
|
|
168
|
+
return item;
|
|
169
|
+
};
|
|
170
|
+
return this;
|
|
171
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import BaseComponent from '../BaseComponent';
|
|
2
|
+
import HasEventEmitter from '../../core/utils/HasEventEmitter';
|
|
3
|
+
import HasItems from '../$traits/has-items/HasItems';
|
|
4
|
+
import { $ } from '../../core/data/Observable';
|
|
5
|
+
import HasListItem from './HasListItem';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Flexible list container supporting single/multi selection, checkbox or click-to-select modes, dividers, and inset styling.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const list = new List()
|
|
12
|
+
* .selectable(true)
|
|
13
|
+
* .multiSelect(true)
|
|
14
|
+
* .withDivider(true)
|
|
15
|
+
* .onItemClick((item, e) => console.log(item))
|
|
16
|
+
* .onItemSelect((item) => console.log('selected', item));
|
|
17
|
+
*
|
|
18
|
+
* List.use((description, instance) => {
|
|
19
|
+
* return Ul({ class: 'list' });
|
|
20
|
+
* });
|
|
21
|
+
*
|
|
22
|
+
* @constructor
|
|
23
|
+
* @param {GlobalAttributes} [props]
|
|
24
|
+
*/
|
|
25
|
+
export default function List(props = {}) {
|
|
26
|
+
if (!(this instanceof List)) {
|
|
27
|
+
return new List(props);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
this.$description = {
|
|
31
|
+
selectable: $(false),
|
|
32
|
+
multiSelect: $(false),
|
|
33
|
+
selectedValues: $.array(),
|
|
34
|
+
inset: $(0),
|
|
35
|
+
divider: false,
|
|
36
|
+
items: $.array(),
|
|
37
|
+
render: null,
|
|
38
|
+
selectByCheckbox: $(false),
|
|
39
|
+
selectByClick: $(false),
|
|
40
|
+
loopOnKeyboard: $(false),
|
|
41
|
+
props,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
List.defaultTemplate = null;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Registers the render template for List.
|
|
49
|
+
* @param {(description: {
|
|
50
|
+
* selectable: ObservableItem<boolean>,
|
|
51
|
+
* multiSelect: ObservableItem<boolean>,
|
|
52
|
+
* selectedValues: ObservableArray<*>,
|
|
53
|
+
* inset: ObservableItem<number>,
|
|
54
|
+
* divider: boolean,
|
|
55
|
+
* data: *|null,
|
|
56
|
+
* render: ((desc: *, instance: List) => NdChild)|null,
|
|
57
|
+
* selectByCheckbox: ObservableItem<boolean>,
|
|
58
|
+
* selectByClick: ObservableItem<boolean>,
|
|
59
|
+
* loopOnKeyboard: ObservableItem<boolean>,
|
|
60
|
+
* items: ObservableArray<*>,
|
|
61
|
+
* props: GlobalAttributes,
|
|
62
|
+
* }, instance: List) => NdChild} template
|
|
63
|
+
*/
|
|
64
|
+
List.use = function(template) {
|
|
65
|
+
List.defaultTemplate = template;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
BaseComponent.extends(List);
|
|
69
|
+
BaseComponent.use(List, HasItems, HasEventEmitter, HasListItem);
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @param {ObservableArray<*>|Observable<*[]>} observable
|
|
74
|
+
* @returns {this}
|
|
75
|
+
*/
|
|
76
|
+
List.prototype.selectedValuesModel = function(observable) {
|
|
77
|
+
this.$description.selectedValues = observable;
|
|
78
|
+
return this;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Inset padding in px applied to all items.
|
|
83
|
+
* @param {number} [inset=0]
|
|
84
|
+
* @returns {this}
|
|
85
|
+
*/
|
|
86
|
+
List.prototype.inset = function(inset = 0) {
|
|
87
|
+
this.$description.inset.set(inset);
|
|
88
|
+
return this;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @param {boolean} [divider=true]
|
|
93
|
+
* @returns {this}
|
|
94
|
+
*/
|
|
95
|
+
List.prototype.withDivider = function(divider = true) {
|
|
96
|
+
this.$description.divider = divider;
|
|
97
|
+
return this;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* @param {*} data
|
|
102
|
+
* @returns {this}
|
|
103
|
+
*/
|
|
104
|
+
List.prototype.data = function(data) {
|
|
105
|
+
this.$description.items = data;
|
|
106
|
+
return this;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @param {(item: *, event: MouseEvent) => void} handler
|
|
111
|
+
* @returns {this}
|
|
112
|
+
*/
|
|
113
|
+
List.prototype.onItemClick = function(handler) {
|
|
114
|
+
this.on('itemClick', handler);
|
|
115
|
+
return this;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* @param {(item: *) => void} handler
|
|
120
|
+
* @returns {this}
|
|
121
|
+
*/
|
|
122
|
+
List.prototype.onItemSelect = function(handler) {
|
|
123
|
+
this.on('itemSelect', handler);
|
|
124
|
+
return this;
|
|
125
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import BaseComponent from '../BaseComponent';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Visual separator between items in a List.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* List()
|
|
8
|
+
* .item('Dashboard')
|
|
9
|
+
* .divider()
|
|
10
|
+
* .item('Settings')
|
|
11
|
+
*
|
|
12
|
+
* ListDivider.use((description, instance) => {
|
|
13
|
+
* return Li({ class: 'list-divider', role: 'separator' });
|
|
14
|
+
* });
|
|
15
|
+
*
|
|
16
|
+
* @constructor
|
|
17
|
+
* @param {GlobalAttributes} [props={}]
|
|
18
|
+
*/
|
|
19
|
+
export default function ListDivider(props = {}) {
|
|
20
|
+
if (!(this instanceof ListDivider)) {
|
|
21
|
+
return new ListDivider(props);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
BaseComponent.call(this, props);
|
|
25
|
+
|
|
26
|
+
this.$description = { props };
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
BaseComponent.extends(ListDivider);
|
|
30
|
+
|
|
31
|
+
ListDivider.defaultTemplate = null;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Registers the render template for ListDivider.
|
|
35
|
+
* @param {(description: { props: GlobalAttributes }, instance: ListDivider) => NdChild} template
|
|
36
|
+
*/
|
|
37
|
+
ListDivider.use = function(template) {
|
|
38
|
+
ListDivider.defaultTemplate = template;
|
|
39
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import BaseComponent from '../BaseComponent';
|
|
2
|
+
import HasEventEmitter from '../../core/utils/HasEventEmitter';
|
|
3
|
+
import HasItems from '../$traits/has-items/HasItems';
|
|
4
|
+
import HasListItem from './HasListItem';
|
|
5
|
+
import { $ } from '../../core/data/Observable';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A collapsible group of ListItems inside a List. Can hold items, dividers, and nested groups.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ListGroup('Workspace')
|
|
12
|
+
* .icon(FolderIcon())
|
|
13
|
+
* .collapsable()
|
|
14
|
+
* .item('Dashboard', DashboardIcon())
|
|
15
|
+
* .item('Analytics', ChartIcon());
|
|
16
|
+
*
|
|
17
|
+
* // From data
|
|
18
|
+
* ListGroup('Reports')
|
|
19
|
+
* .from(reports, (report) =>
|
|
20
|
+
* ListItem().label(report.name).value(report.id)
|
|
21
|
+
* );
|
|
22
|
+
*
|
|
23
|
+
* ListGroup.use((description, instance) => {
|
|
24
|
+
* return Div({ class: 'list-group' });
|
|
25
|
+
* });
|
|
26
|
+
*
|
|
27
|
+
* @constructor
|
|
28
|
+
* @param {NdChild} label
|
|
29
|
+
* @param {GlobalAttributes} [props={}]
|
|
30
|
+
*/
|
|
31
|
+
export default function ListGroup(label, props = {}) {
|
|
32
|
+
if (!(this instanceof ListGroup)) {
|
|
33
|
+
return new ListGroup(label, props);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
BaseComponent.call(this, props);
|
|
37
|
+
|
|
38
|
+
this.$description = {
|
|
39
|
+
selectable: $(false),
|
|
40
|
+
multiSelect: $(false),
|
|
41
|
+
selectedValues: $.array(),
|
|
42
|
+
label: label,
|
|
43
|
+
icon: null,
|
|
44
|
+
items: $.array(),
|
|
45
|
+
render: null,
|
|
46
|
+
collapsable: false,
|
|
47
|
+
collapsed: null,
|
|
48
|
+
visibility: $(true),
|
|
49
|
+
selectByCheckbox: $(false),
|
|
50
|
+
selectByClick: $(false),
|
|
51
|
+
loopOnKeyboard: $(false),
|
|
52
|
+
props,
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
BaseComponent.extends(ListGroup);
|
|
57
|
+
BaseComponent.use(ListGroup, HasItems, HasEventEmitter, HasListItem);
|
|
58
|
+
|
|
59
|
+
HasListItem.components.ListGroup = ListGroup;
|
|
60
|
+
|
|
61
|
+
ListGroup.defaultTemplate = null;
|
|
62
|
+
ListGroup.prototype.__$ListInstance = true;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Registers the render template for ListGroup.
|
|
66
|
+
* @param {(description: {
|
|
67
|
+
* label: NdChild,
|
|
68
|
+
* icon: NdChild|null,
|
|
69
|
+
* items: ObservableArray<ListItem|ListGroup|ListDivider>,
|
|
70
|
+
* itemBuilder: (item: *) => ListItem|ListGroup|ListDivider,
|
|
71
|
+
* data: *|null,
|
|
72
|
+
* render: ((desc: *, instance: ListGroup) => NdChild)|null,
|
|
73
|
+
* collapsable: boolean,
|
|
74
|
+
* collapsed: ObservableItem<boolean>|null,
|
|
75
|
+
* visibility: ObservableItem<boolean>,
|
|
76
|
+
* props: GlobalAttributes,
|
|
77
|
+
* }, instance: ListGroup) => NdChild} template
|
|
78
|
+
*/
|
|
79
|
+
ListGroup.use = function(template) {
|
|
80
|
+
ListGroup.defaultTemplate = template;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* @param {NdChild} icon
|
|
85
|
+
* @returns {this}
|
|
86
|
+
*/
|
|
87
|
+
ListGroup.prototype.icon = function(icon) {
|
|
88
|
+
this.$description.icon = icon;
|
|
89
|
+
return this;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @param {boolean} [mode=true]
|
|
94
|
+
* @param {NdChild} [openedIcon]
|
|
95
|
+
* @param {NdChild} [closedIcon]
|
|
96
|
+
* @returns {this}
|
|
97
|
+
*/
|
|
98
|
+
ListGroup.prototype.collapsable = function(mode = true, openedIcon, closedIcon) {
|
|
99
|
+
this.$description.collapsable = mode;
|
|
100
|
+
this.$description.collapsed = this.$description.collapsed || $(false);
|
|
101
|
+
this.$description.collapsableOpenedIcon = openedIcon || null;
|
|
102
|
+
this.$description.collapsableClosedIcon = closedIcon || null;
|
|
103
|
+
return this;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @param {boolean} [mode=true]
|
|
108
|
+
* @returns {this}
|
|
109
|
+
*/
|
|
110
|
+
ListGroup.prototype.collapsed = function(mode = true) {
|
|
111
|
+
if (!this.$description.collapsed) {
|
|
112
|
+
this.$description.collapsed = $(mode);
|
|
113
|
+
} else {
|
|
114
|
+
this.$description.collapsed.set(mode);
|
|
115
|
+
}
|
|
116
|
+
return this;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @param {boolean|Observable<boolean>} mode
|
|
121
|
+
* @returns {this}
|
|
122
|
+
*/
|
|
123
|
+
ListGroup.prototype.visibility = function(mode) {
|
|
124
|
+
this.$description.visibility = BaseComponent.obs(mode);
|
|
125
|
+
return this;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @param {*} data
|
|
130
|
+
* @returns {this}
|
|
131
|
+
*/
|
|
132
|
+
ListGroup.prototype.data = function(data) {
|
|
133
|
+
this.$description.data = data;
|
|
134
|
+
return this;
|
|
135
|
+
};
|